envied 0.10.0.alpha3 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/README.md +82 -176
- data/lib/envied/cli.rb +0 -9
- data/lib/envied/coercer/envied_string.rb +0 -4
- data/lib/envied/coercer.rb +1 -1
- data/lib/envied/configuration.rb +24 -16
- data/lib/envied/env_proxy.rb +9 -12
- data/lib/envied/variable.rb +11 -2
- data/lib/envied/version.rb +1 -1
- data/lib/envied.rb +6 -36
- metadata +25 -89
- data/.envrc.sample +0 -9
- data/.github/pull_request_template.md +0 -2
- data/.gitignore +0 -15
- data/.gitlab-ci.yml +0 -50
- data/.rspec +0 -3
- data/CHANGELOG.md +0 -208
- data/Gemfile +0 -4
- data/Rakefile +0 -6
- data/bin/bundle +0 -105
- data/bin/console +0 -10
- data/bin/envied +0 -5
- data/bin/rspec +0 -29
- data/bin/setup +0 -8
- data/envied.gemspec +0 -38
- data/examples/extensive_envfile +0 -64
- data/lib/envied/env_interceptor.rb +0 -19
- data/lib/envied/templates/Envfile.tt +0 -10
- data/lib/envied/templates/heroku-env-check.tt +0 -9
metadata
CHANGED
@@ -1,131 +1,67 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: envied
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gert Goet
|
8
|
-
|
8
|
+
- Javier Julio
|
9
|
+
autorequire:
|
9
10
|
bindir: exe
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2024-08-12 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: thor
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
16
17
|
requirements:
|
17
|
-
- - "
|
18
|
+
- - ">="
|
18
19
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
20
|
-
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0.20'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: bundler
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '2.0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
20
|
+
version: '0.15'
|
21
|
+
- - "<"
|
39
22
|
- !ruby/object:Gem::Version
|
40
23
|
version: '2.0'
|
41
|
-
|
42
|
-
name: pry
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0.12'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0.12'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rake
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '12.0'
|
62
|
-
type: :development
|
24
|
+
type: :runtime
|
63
25
|
prerelease: false
|
64
26
|
version_requirements: !ruby/object:Gem::Requirement
|
65
27
|
requirements:
|
66
|
-
- - "
|
28
|
+
- - ">="
|
67
29
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
69
|
-
-
|
70
|
-
name: rspec
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '3.0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
30
|
+
version: '0.15'
|
31
|
+
- - "<"
|
81
32
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
33
|
+
version: '2.0'
|
83
34
|
description: Ensure presence and type of your app's ENV-variables.
|
84
35
|
email:
|
85
36
|
- gert@thinkcreate.nl
|
37
|
+
- jjfutbol@gmail.com
|
86
38
|
executables:
|
87
39
|
- envied
|
88
40
|
extensions: []
|
89
41
|
extra_rdoc_files: []
|
90
42
|
files:
|
91
|
-
- ".envrc.sample"
|
92
|
-
- ".github/pull_request_template.md"
|
93
|
-
- ".gitignore"
|
94
|
-
- ".gitlab-ci.yml"
|
95
|
-
- ".rspec"
|
96
|
-
- CHANGELOG.md
|
97
|
-
- Gemfile
|
98
43
|
- LICENSE.txt
|
99
44
|
- README.md
|
100
|
-
- Rakefile
|
101
|
-
- bin/bundle
|
102
|
-
- bin/console
|
103
|
-
- bin/envied
|
104
|
-
- bin/rspec
|
105
|
-
- bin/setup
|
106
|
-
- envied.gemspec
|
107
|
-
- examples/extensive_envfile
|
108
45
|
- exe/envied
|
109
46
|
- lib/envied.rb
|
110
47
|
- lib/envied/cli.rb
|
111
48
|
- lib/envied/coercer.rb
|
112
49
|
- lib/envied/coercer/envied_string.rb
|
113
50
|
- lib/envied/configuration.rb
|
114
|
-
- lib/envied/env_interceptor.rb
|
115
51
|
- lib/envied/env_proxy.rb
|
116
52
|
- lib/envied/env_var_extractor.rb
|
117
|
-
- lib/envied/templates/Envfile.tt
|
118
|
-
- lib/envied/templates/heroku-env-check.tt
|
119
53
|
- lib/envied/variable.rb
|
120
54
|
- lib/envied/version.rb
|
121
|
-
homepage: https://
|
55
|
+
homepage: https://github.com/javierjulio/envied
|
122
56
|
licenses:
|
123
57
|
- MIT
|
124
58
|
metadata:
|
125
|
-
|
126
|
-
|
127
|
-
changelog_uri: https://
|
128
|
-
|
59
|
+
source_code_uri: https://github.com/javierjulio/envied
|
60
|
+
bug_tracker_uri: https://github.com/javierjulio/envied/issues
|
61
|
+
changelog_uri: https://github.com/javierjulio/envied/blob/master/CHANGELOG.md
|
62
|
+
wiki_uri: https://github.com/javierjulio/envied/wiki
|
63
|
+
rubygems_mfa_required: 'true'
|
64
|
+
post_install_message:
|
129
65
|
rdoc_options: []
|
130
66
|
require_paths:
|
131
67
|
- lib
|
@@ -133,15 +69,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
133
69
|
requirements:
|
134
70
|
- - ">="
|
135
71
|
- !ruby/object:Gem::Version
|
136
|
-
version: '
|
72
|
+
version: '3.0'
|
137
73
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
74
|
requirements:
|
139
|
-
- - "
|
75
|
+
- - ">="
|
140
76
|
- !ruby/object:Gem::Version
|
141
|
-
version:
|
77
|
+
version: '0'
|
142
78
|
requirements: []
|
143
|
-
rubygems_version: 3.
|
144
|
-
signing_key:
|
79
|
+
rubygems_version: 3.5.16
|
80
|
+
signing_key:
|
145
81
|
specification_version: 4
|
146
82
|
summary: Ensure presence and type of ENV-variables
|
147
83
|
test_files: []
|
data/.envrc.sample
DELETED
data/.gitignore
DELETED
data/.gitlab-ci.yml
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
.rspec: &rspec
|
2
|
-
stage: test
|
3
|
-
tags:
|
4
|
-
- docker
|
5
|
-
before_script:
|
6
|
-
- "echo 'gem: --no-document' > ~/.gemrc"
|
7
|
-
- gem install bundler
|
8
|
-
- 'git -v || apk --update add git'
|
9
|
-
- bundle install -j $(nproc)
|
10
|
-
script:
|
11
|
-
- ./bin/rspec
|
12
|
-
|
13
|
-
rspec ruby-2.4:
|
14
|
-
image: ruby:2.4-alpine
|
15
|
-
<<: *rspec
|
16
|
-
|
17
|
-
rspec ruby-2.5:
|
18
|
-
image: ruby:2.5-alpine
|
19
|
-
<<: *rspec
|
20
|
-
|
21
|
-
rspec ruby-2.6:
|
22
|
-
image: ruby:2.6-alpine
|
23
|
-
<<: *rspec
|
24
|
-
|
25
|
-
rspec ruby-2.7:
|
26
|
-
image: ruby:2.7-rc-alpine
|
27
|
-
<<: *rspec
|
28
|
-
|
29
|
-
rspec jruby-9.2:
|
30
|
-
image: jruby:9.2-alpine
|
31
|
-
<<: *rspec
|
32
|
-
only:
|
33
|
-
- master
|
34
|
-
|
35
|
-
release:
|
36
|
-
stage: deploy
|
37
|
-
image: ruby:2.6-alpine
|
38
|
-
tags:
|
39
|
-
- docker
|
40
|
-
script:
|
41
|
-
- "echo 'gem: --no-document' > ~/.gemrc"
|
42
|
-
- gem install bundler
|
43
|
-
- 'git -v || apk --update add git'
|
44
|
-
- bundle install -j $(nproc)
|
45
|
-
- 'ruby -ryaml -e "puts YAML.dump({rubygems_api_key: ENV.fetch(%{RUBYGEMS_API_KEY})})" > ~/.gem/credentials'
|
46
|
-
- chmod 600 ~/.gem/credentials
|
47
|
-
- bundle exec rake release
|
48
|
-
only:
|
49
|
-
- tags
|
50
|
-
environment: production
|
data/.rspec
DELETED
data/CHANGELOG.md
DELETED
@@ -1,208 +0,0 @@
|
|
1
|
-
## master / unreleased
|
2
|
-
|
3
|
-
### Added
|
4
|
-
|
5
|
-
* key alias
|
6
|
-
|
7
|
-
# file: Envfile
|
8
|
-
key_alias! { Rails.env }
|
9
|
-
variable :FOO
|
10
|
-
|
11
|
-
The value of ENV['FOO_DEVELOPMENT'] will take precedence over ENV['FOO'] when running in development.
|
12
|
-
|
13
|
-
## 0.9.3 / 2019-06-29
|
14
|
-
|
15
|
-
* Project moved to GitLab (https://gitlab.com/envied/envied)
|
16
|
-
* Now requiring Ruby 2.4+ [#48], [#51]
|
17
|
-
* Removed `coercible` dependency as now all coercion functionality is implemented locally. This is a backwards compatible change. [#49]
|
18
|
-
* Lots of refactoring and bringing the project up-to-date
|
19
|
-
|
20
|
-
### Deprecated
|
21
|
-
|
22
|
-
* default values
|
23
|
-
|
24
|
-
See https://gitlab.com/envied/envied/tree/0-9-releases#defaults
|
25
|
-
|
26
|
-
## 0.9.1 / 2017-07-06
|
27
|
-
|
28
|
-
* Updates `envied check:heroku` to support multiline ENV variables [#42](../../pull/42)
|
29
|
-
|
30
|
-
## 0.9.0 / 2017-03-01
|
31
|
-
|
32
|
-
* Support multiple groups [#16](../../pull/16)
|
33
|
-
* Replaced rack dependency with stdlib solution using CGI for supporting hash type
|
34
|
-
* Now requiring Ruby 2.1.x and up
|
35
|
-
* Added float type which resolves [#30](../../pull/30)
|
36
|
-
* Added uri type [#22](../../pull/22)
|
37
|
-
* Updated extractor to find interpolated ENV vars which fixes [#21](../../pull/21)
|
38
|
-
* Various typo fixes [#24](../../pull/24) and [#28](../../pull/28)
|
39
|
-
* Resolved warnings when running tests
|
40
|
-
|
41
|
-
## 0.8.2 / 2017-02-21
|
42
|
-
|
43
|
-
### Added
|
44
|
-
|
45
|
-
* Rails 5 support [#25](../../pull/25)
|
46
|
-
|
47
|
-
### Fixed
|
48
|
-
|
49
|
-
* Envfile: type string is also correctly implied when providing a default.
|
50
|
-
|
51
|
-
## 0.8.1 / 2014-10-18
|
52
|
-
|
53
|
-
### Added
|
54
|
-
|
55
|
-
* the `check` task uses ENV['ENVIED_GROUPS'] as default groups-option if present
|
56
|
-
|
57
|
-
### Fixed
|
58
|
-
|
59
|
-
* Rails: you can use ENVied now in config/application.rb and config/environments/*.rb
|
60
|
-
|
61
|
-
For existing projects: rerun the `init:rails`-task
|
62
|
-
|
63
|
-
* running `check:heroku` takes Heroku's value of ENVIED_GROUPS into account
|
64
|
-
* calling `enable_defaults!` without arguments now does what it says
|
65
|
-
|
66
|
-
### Deprecated
|
67
|
-
|
68
|
-
* doing `ENVied.require` in `config/initializers/envied.rb` (as previously generated by `init:rails`-task)
|
69
|
-
is not recommended anymore. It triggers a deprecation warning.
|
70
|
-
|
71
|
-
It's recommended to rerun the `init:rails`-task.
|
72
|
-
|
73
|
-
## 0.8.0 / 2014-10-04
|
74
|
-
|
75
|
-
### Added
|
76
|
-
|
77
|
-
* the `check:heroku:binstub` task uses ENV['HEROKU_APP'] as app-option if present
|
78
|
-
* the `check` and `check:heroku` task now have a `--quiet` option
|
79
|
-
|
80
|
-
This prevents output on STDOUT for a successful check.
|
81
|
-
Handy for wrapper-scripts:
|
82
|
-
|
83
|
-
# some bash-script 'ensure-env'
|
84
|
-
#!/usr/bin/env bash
|
85
|
-
bundle exec envied check --quiet --groups default && $@
|
86
|
-
|
87
|
-
$ ./ensure-env echo 'works!'
|
88
|
-
works!
|
89
|
-
|
90
|
-
* ENVied.require accepts string with groups, e.g. 'default,production'
|
91
|
-
|
92
|
-
This way it's possible to easily require groups using the ENV:
|
93
|
-
|
94
|
-
# config/initializers/envied.rb
|
95
|
-
ENVied.require(*ENV['ENVIED_GROUPS'] || Rails.groups)
|
96
|
-
|
97
|
-
$ ENVIED_GROUPS='default,production' bin/rails server
|
98
|
-
|
99
|
-
### Fixed
|
100
|
-
|
101
|
-
* extract-task would report at most one variable per line of code.
|
102
|
-
* extract-task would not extract variable names with digits
|
103
|
-
|
104
|
-
### Deprecated
|
105
|
-
|
106
|
-
* titlecase variable types. Use downcased instead: `variable :PORT, :integer`
|
107
|
-
|
108
|
-
### Removed
|
109
|
-
|
110
|
-
* extract: test/spec-folder are no longer part of the default globs.
|
111
|
-
|
112
|
-
Use the option `--tests` to include it:
|
113
|
-
|
114
|
-
$ bundle exec envied extract --tests
|
115
|
-
|
116
|
-
## 0.7.2 / 2014-09-07
|
117
|
-
|
118
|
-
### Added
|
119
|
-
|
120
|
-
* extract-task: see all ENV-variables used in your project.
|
121
|
-
|
122
|
-
$ envied extract
|
123
|
-
Found 63 occurrences of 45 variables:
|
124
|
-
BUNDLE_GEMFILE
|
125
|
-
* config/boot.rb:4
|
126
|
-
* config/boot.rb:6
|
127
|
-
...
|
128
|
-
|
129
|
-
* version-task (i.e. bin/envied --version)
|
130
|
-
|
131
|
-
## 0.7.1 / 2014-08-29
|
132
|
-
|
133
|
-
* Total refactor (TM).
|
134
|
-
|
135
|
-
* Fix bug in Heroku binstub.
|
136
|
-
|
137
|
-
It checked for group 'default,production' instead of 'default' and 'production'.
|
138
|
-
|
139
|
-
## 0.7.0 / 2014-08-24
|
140
|
-
|
141
|
-
* Add init:rails-task for setup in Rails applications.
|
142
|
-
|
143
|
-
## 0.6.3 / 2014-08-22
|
144
|
-
|
145
|
-
* Fix bug: 'false' was not a coercible value.
|
146
|
-
|
147
|
-
## 0.6.2 / 2014-08-20
|
148
|
-
|
149
|
-
* Add `envied check:heroku` to do a check on your Heroku app.
|
150
|
-
|
151
|
-
* Add `envied check:heroku:binstub` to generate script for convenient 'check:heroku'
|
152
|
-
|
153
|
-
## 0.6.1 / 2014-08-13
|
154
|
-
|
155
|
-
* Add `envied check` to check whether defined variables are present and valid.
|
156
|
-
|
157
|
-
## 0.6.0 / 2014-08-13
|
158
|
-
|
159
|
-
* The configuration now lives in `Envfile` by default.
|
160
|
-
|
161
|
-
## 0.5.0 / 2014-07-02
|
162
|
-
|
163
|
-
* add Array Hash types
|
164
|
-
|
165
|
-
# in env.rb
|
166
|
-
ENVied.configure { variable :TAGS, :Array; variable :HASH, :Hash }
|
167
|
-
ENVied.require
|
168
|
-
|
169
|
-
$ HASH=a=1&b=2 TAGS=tag1,tag2 ruby -renvied -r./env.rb -e 'p ENVied.TAGS'
|
170
|
-
# ["tag1", "tag2"]
|
171
|
-
$ HASH='a=1&b=2' TAGS=tag1,tag2 ruby -renvied -r./env.rb -e 'p ENVied.HASH'
|
172
|
-
# {'a' => '1', 'b' => '2'}
|
173
|
-
|
174
|
-
## 0.4.0 / 2014-05-16
|
175
|
-
|
176
|
-
* groups added
|
177
|
-
|
178
|
-
This allows for more fine-grained requiring.
|
179
|
-
See the section in the [README](https://github.com/eval/envied/tree/v0.4.0#groups).
|
180
|
-
|
181
|
-
* configuring is now simpler:
|
182
|
-
|
183
|
-
ENVied.configure { variable :RACK_ENV }
|
184
|
-
# vs
|
185
|
-
ENVied.configure {|env| env.variable :RACK_ENV }
|
186
|
-
|
187
|
-
* Deprecate `require!`. Use `require` instead.
|
188
|
-
|
189
|
-
Just like requiring groups with Bundler.
|
190
|
-
|
191
|
-
* Deprecate lowercase methods for uppercase ENV-variables.
|
192
|
-
|
193
|
-
`ENV['RACK_ENV']` is no longer accessible as `ENVied.rack_env`, only as `ENVied.RACK_ENV`.
|
194
|
-
This is not only what you would expect, but it also reduces the chance of clashing with existing class-methods.
|
195
|
-
|
196
|
-
## 0.3.0 / 2014-03-14
|
197
|
-
|
198
|
-
* defaults need to be enabled explicitly:
|
199
|
-
|
200
|
-
`ENVied.configure(enable_defaults: Rails.env.development?) { ... }`
|
201
|
-
|
202
|
-
## 0.2.0 / 2014-03-14
|
203
|
-
|
204
|
-
* add defaults
|
205
|
-
|
206
|
-
## 0.1.0 / 2014-03-13
|
207
|
-
|
208
|
-
* add defaults
|
data/Gemfile
DELETED
data/Rakefile
DELETED
data/bin/bundle
DELETED
@@ -1,105 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
#
|
5
|
-
# This file was generated by Bundler.
|
6
|
-
#
|
7
|
-
# The application 'bundle' is installed as part of a gem, and
|
8
|
-
# this file is here to facilitate running it.
|
9
|
-
#
|
10
|
-
|
11
|
-
require "rubygems"
|
12
|
-
|
13
|
-
m = Module.new do
|
14
|
-
module_function
|
15
|
-
|
16
|
-
def invoked_as_script?
|
17
|
-
File.expand_path($0) == File.expand_path(__FILE__)
|
18
|
-
end
|
19
|
-
|
20
|
-
def env_var_version
|
21
|
-
ENV["BUNDLER_VERSION"]
|
22
|
-
end
|
23
|
-
|
24
|
-
def cli_arg_version
|
25
|
-
return unless invoked_as_script? # don't want to hijack other binstubs
|
26
|
-
return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
|
27
|
-
bundler_version = nil
|
28
|
-
update_index = nil
|
29
|
-
ARGV.each_with_index do |a, i|
|
30
|
-
if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
|
31
|
-
bundler_version = a
|
32
|
-
end
|
33
|
-
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
|
34
|
-
bundler_version = $1 || ">= 0.a"
|
35
|
-
update_index = i
|
36
|
-
end
|
37
|
-
bundler_version
|
38
|
-
end
|
39
|
-
|
40
|
-
def gemfile
|
41
|
-
gemfile = ENV["BUNDLE_GEMFILE"]
|
42
|
-
return gemfile if gemfile && !gemfile.empty?
|
43
|
-
|
44
|
-
File.expand_path("../../Gemfile", __FILE__)
|
45
|
-
end
|
46
|
-
|
47
|
-
def lockfile
|
48
|
-
lockfile =
|
49
|
-
case File.basename(gemfile)
|
50
|
-
when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
|
51
|
-
else "#{gemfile}.lock"
|
52
|
-
end
|
53
|
-
File.expand_path(lockfile)
|
54
|
-
end
|
55
|
-
|
56
|
-
def lockfile_version
|
57
|
-
return unless File.file?(lockfile)
|
58
|
-
lockfile_contents = File.read(lockfile)
|
59
|
-
return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
|
60
|
-
Regexp.last_match(1)
|
61
|
-
end
|
62
|
-
|
63
|
-
def bundler_version
|
64
|
-
@bundler_version ||= begin
|
65
|
-
env_var_version || cli_arg_version ||
|
66
|
-
lockfile_version || "#{Gem::Requirement.default}.a"
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
def load_bundler!
|
71
|
-
ENV["BUNDLE_GEMFILE"] ||= gemfile
|
72
|
-
|
73
|
-
# must dup string for RG < 1.8 compatibility
|
74
|
-
activate_bundler(bundler_version.dup)
|
75
|
-
end
|
76
|
-
|
77
|
-
def activate_bundler(bundler_version)
|
78
|
-
if Gem::Version.correct?(bundler_version) && Gem::Version.new(bundler_version).release < Gem::Version.new("2.0")
|
79
|
-
bundler_version = "< 2"
|
80
|
-
end
|
81
|
-
gem_error = activation_error_handling do
|
82
|
-
gem "bundler", bundler_version
|
83
|
-
end
|
84
|
-
return if gem_error.nil?
|
85
|
-
require_error = activation_error_handling do
|
86
|
-
require "bundler/version"
|
87
|
-
end
|
88
|
-
return if require_error.nil? && Gem::Requirement.new(bundler_version).satisfied_by?(Gem::Version.new(Bundler::VERSION))
|
89
|
-
warn "Activating bundler (#{bundler_version}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_version}'`"
|
90
|
-
exit 42
|
91
|
-
end
|
92
|
-
|
93
|
-
def activation_error_handling
|
94
|
-
yield
|
95
|
-
nil
|
96
|
-
rescue StandardError, LoadError => e
|
97
|
-
e
|
98
|
-
end
|
99
|
-
end
|
100
|
-
|
101
|
-
m.load_bundler!
|
102
|
-
|
103
|
-
if m.invoked_as_script?
|
104
|
-
load Gem.bin_path("bundler", "bundle")
|
105
|
-
end
|
data/bin/console
DELETED
data/bin/envied
DELETED
data/bin/rspec
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
#
|
5
|
-
# This file was generated by Bundler.
|
6
|
-
#
|
7
|
-
# The application 'rspec' is installed as part of a gem, and
|
8
|
-
# this file is here to facilitate running it.
|
9
|
-
#
|
10
|
-
|
11
|
-
require "pathname"
|
12
|
-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
-
Pathname.new(__FILE__).realpath)
|
14
|
-
|
15
|
-
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
-
|
17
|
-
if File.file?(bundle_binstub)
|
18
|
-
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
-
load(bundle_binstub)
|
20
|
-
else
|
21
|
-
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
-
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
require "rubygems"
|
27
|
-
require "bundler/setup"
|
28
|
-
|
29
|
-
load Gem.bin_path("rspec-core", "rspec")
|
data/bin/setup
DELETED
data/envied.gemspec
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path("../lib", __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require "envied/version"
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "envied"
|
8
|
-
spec.version = ENVied::VERSION
|
9
|
-
spec.authors = ["Gert Goet"]
|
10
|
-
spec.email = ["gert@thinkcreate.nl"]
|
11
|
-
spec.summary = %q{Ensure presence and type of ENV-variables}
|
12
|
-
spec.description = %q{Ensure presence and type of your app's ENV-variables.}
|
13
|
-
spec.homepage = "https://gitlab.com/envied/envied/tree/master#envied"
|
14
|
-
spec.license = "MIT"
|
15
|
-
|
16
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
17
|
-
spec.metadata["source_code_uri"] = "https://gitlab.com/envied/envied.git"
|
18
|
-
spec.metadata["changelog_uri"] = "https://gitlab.com/envied/envied/blob/master/CHANGELOG.md"
|
19
|
-
|
20
|
-
# Specify which files should be added to the gem when it is released.
|
21
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
22
|
-
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
23
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
24
|
-
end
|
25
|
-
spec.bindir = 'exe'
|
26
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
27
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
28
|
-
spec.require_paths = ["lib"]
|
29
|
-
|
30
|
-
spec.required_ruby_version = ">= 2.4"
|
31
|
-
|
32
|
-
spec.add_dependency "thor", "~> 0.20"
|
33
|
-
|
34
|
-
spec.add_development_dependency "bundler", "~> 2.0"
|
35
|
-
spec.add_development_dependency "pry", "~> 0.12"
|
36
|
-
spec.add_development_dependency "rake", "~> 12.0"
|
37
|
-
spec.add_development_dependency "rspec", "~> 3.0"
|
38
|
-
end
|