Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and changes to support custom user_home. #30

Merged
merged 4 commits into from
Aug 15, 2020

Conversation

kigster
Copy link
Owner

@kigster kigster commented Aug 15, 2020

We only use Dir.home in a couple of places, so it's not a bit deal to allow user_home to be overridden.

This is now possible via the --user-home/-u [DIR] flag.

Utility:
   The following flag helps with Sym installation by hooking to
   your ~/.bashrc. If you are running Sym on an environment without
   user home available, you may need to force set user's home to any existing
   directory using the --user-home flag.

  -B, --bash-support     [file]     append bash completion & utils to a file
                                    such as ~/.bash_profile or ~/.bashrc
  -u, --user-home        [DIR]      Overrides ${HOME} ==> supports AWS Lambda

[fixes #25]

We only use `Dir.home` in a couple of places, so
it's not a bit deal to allow user_home to be overridden.

This is now possible via the --user-home/-u [DIR] flag.

[fixes #25]
@kigster kigster self-assigned this Aug 15, 2020
@codecov
Copy link

codecov bot commented Aug 15, 2020

Codecov Report

Merging #30 into master will decrease coverage by 3.0%.
The diff coverage is 92.4%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master     #30     +/-   ##
========================================
- Coverage    92.3%   89.3%   -3.1%     
========================================
  Files          49      49             
  Lines        1524    1442     -82     
========================================
- Hits         1408    1288    -120     
- Misses        116     154     +38     
Impacted Files Coverage Δ
lib/sym/app.rb 63.4% <ø> (-31.3%) ⬇️
lib/sym/app/cli.rb 91.2% <83.3%> (-6.3%) ⬇️
lib/sym.rb 95.3% <100.0%> (ø)
lib/sym/app/cli_slop.rb 98.8% <100.0%> (-1.2%) ⬇️
lib/sym/app/commands/bash_completion.rb 87.8% <100.0%> (+4.8%) ⬆️
lib/sym/constants.rb 100.0% <100.0%> (ø)
lib/sym/errors.rb 95.4% <100.0%> (-0.4%) ⬇️
lib/sym/extensions/with_timeout.rb 66.6% <0.0%> (-33.4%) ⬇️
lib/sym/extensions/with_retry.rb 40.0% <0.0%> (-20.0%) ⬇️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0602431...003f80f. Read the comment docs.

@kigster kigster added the work-in-progress Do not merge, this PR is not yet ready label Aug 15, 2020
@kigster kigster merged commit 146c48d into master Aug 15, 2020
@kigster kigster deleted the kig/support-aws-lambda branch August 15, 2020 07:54
@kigster kigster added feature-request and removed work-in-progress Do not merge, this PR is not yet ready labels Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

This gem is failing on environment without HOME (like AWS Lambda)
1 participant