Skip to content
GitLab
About GitLab
GitLab: the DevOps platform
Explore GitLab
Install GitLab
How GitLab compares
Get started
GitLab docs
GitLab Learn
Pricing
Talk to an expert
/
Help
What's new
2
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Projects
Groups
Snippets
Register
Sign in
Toggle navigation
Menu
Open sidebar
ENVied
envied
Commits
9b1ffd03
Commit
9b1ffd03
authored
Jul 04, 2019
by
Gert Goet
🦀
Browse files
Resolve "key_alias using rails makes `envied check` barf"
Closes
#10
See merge request
!9
parents
bc1822ce
e7059988
Pipeline
#71934545
passed with stage
in 1 minute and 36 seconds
Changes
1
Pipelines
6
Hide whitespace changes
Inline
Side-by-side
lib/envied/cli.rb
View file @
9b1ffd03
...
...
@@ -70,6 +70,9 @@ class ENVied
option
:groups
,
type: :array
,
desc:
"uses ENV['ENVIED_GROUPS'] as default if present"
,
default:
ENV
[
'ENVIED_GROUPS'
]
||
%w(default)
,
banner:
'default production'
option
:quiet
,
type: :boolean
,
desc:
'Communicate success of the check only via the exit status.'
def
check
if
rails_project?
require
File
.
expand_path
'config/environment.rb'
end
ENVied
.
require
(
*
options
[
:groups
])
unless
options
[
:quiet
]
puts
"All variables for group(s)
#{
options
[
:groups
]
}
are present and valid"
...
...
@@ -126,5 +129,11 @@ class ENVied
template
(
"heroku-env-check.tt"
,
full_dest
)
FileUtils
.
chmod
0755
,
full_dest
end
no_tasks
do
def
rails_project?
File
.
exists?
(
'config/environment.rb'
)
end
end
end
end
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment