envied 0.9.1 → 0.9.2.rc1

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.
@@ -0,0 +1,17 @@
1
+ require "open3"
2
+
3
+ RSpec.describe 'envied.gemspec' do
4
+ let!(:build) { Open3.capture3("gem build envied.gemspec") }
5
+
6
+ after do
7
+ Dir.glob("envied-*.gem").each { |f| File.delete(f) }
8
+ end
9
+
10
+ it 'builds without warnings' do
11
+ expect(build[1]).to_not match(/WARNING/)
12
+ end
13
+
14
+ it 'builds successfully' do
15
+ expect(build[2].success?).to eq true
16
+ end
17
+ end
@@ -1,6 +1,74 @@
1
- require 'rubygems'
2
- require 'bundler'
3
- Bundler.setup
1
+ require "bundler/setup"
2
+ require "envied"
4
3
 
5
- $:.unshift File.expand_path("../../lib", __FILE__)
6
- require 'envied'
4
+ RSpec.configure do |config|
5
+ # rspec-expectations config goes here. You can use an alternate
6
+ # assertion/expectation library such as wrong or the stdlib/minitest
7
+ # assertions if you prefer.
8
+ config.expect_with :rspec do |expectations|
9
+ # This option will default to `true` in RSpec 4. It makes the `description`
10
+ # and `failure_message` of custom matchers include text for helper methods
11
+ # defined using `chain`, e.g.:
12
+ # be_bigger_than(2).and_smaller_than(4).description
13
+ # # => "be bigger than 2 and smaller than 4"
14
+ # ...rather than:
15
+ # # => "be bigger than 2"
16
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
17
+ end
18
+
19
+ # rspec-mocks config goes here. You can use an alternate test double
20
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
21
+ config.mock_with :rspec do |mocks|
22
+ # Prevents you from mocking or stubbing a method that does not exist on
23
+ # a real object. This is generally recommended, and will default to
24
+ # `true` in RSpec 4.
25
+ mocks.verify_partial_doubles = true
26
+ end
27
+
28
+ # These two settings work together to allow you to limit a spec run
29
+ # to individual examples or groups you care about by tagging them with
30
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
31
+ # get run.
32
+ # config.filter_run :focus
33
+ # config.run_all_when_everything_filtered = true
34
+
35
+ # Allows RSpec to persist some state between runs in order to support
36
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
37
+ # you configure your source control system to ignore this file.
38
+ config.example_status_persistence_file_path = "spec/examples.txt"
39
+
40
+ # Limits the available syntax to the non-monkey patched syntax that is
41
+ # recommended. For more details, see:
42
+ # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
43
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
44
+ # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
45
+ config.disable_monkey_patching!
46
+
47
+ # Many RSpec users commonly either run the entire suite or an individual
48
+ # file, and it's useful to allow more verbose output when running an
49
+ # individual spec file.
50
+ if config.files_to_run.one?
51
+ # Use the documentation formatter for detailed output,
52
+ # unless a formatter has already been configured
53
+ # (e.g. via a command-line flag).
54
+ config.default_formatter = 'doc'
55
+ end
56
+
57
+ # Print the 10 slowest examples and example groups at the
58
+ # end of the spec run, to help surface which specs are running
59
+ # particularly slow.
60
+ # config.profile_examples = 10
61
+
62
+ # Run specs in random order to surface order dependencies. If you find an
63
+ # order dependency and want to debug it, you can fix the order by providing
64
+ # the seed, which is printed after each run.
65
+ # --seed 1234
66
+ config.order = :random
67
+
68
+ # Seed global randomization in this process using the `--seed` CLI option.
69
+ # Setting this allows you to use `--seed` to deterministically reproduce
70
+ # test failures related to randomization by passing the same `--seed` value
71
+ # as the one that triggered the failure.
72
+ Kernel.srand config.seed
73
+
74
+ end
@@ -1,15 +1,25 @@
1
- require 'spec_helper'
2
-
3
- describe ENVied::Variable do
1
+ RSpec.describe ENVied::Variable do
4
2
  def variable(*args)
5
3
  described_class.new(*args)
6
4
  end
7
5
 
8
- def set_env(env)
9
- stub_const("ENV", env)
10
- end
11
-
12
6
  describe 'an instance' do
13
7
  subject { variable(:A, :string) }
8
+ it { is_expected.to respond_to :name }
9
+ it { is_expected.to respond_to :type }
10
+ it { is_expected.to respond_to :group }
11
+ it { is_expected.to respond_to :default }
12
+ it { is_expected.to respond_to :== }
13
+ it { is_expected.to respond_to :default_value }
14
+ end
15
+
16
+ describe 'defaults' do
17
+ it 'returns the default value as it is' do
18
+ expect(variable(:A, :string, default: 'A').default_value).to eq 'A'
19
+ end
20
+
21
+ it 'returns the default value from calling the proc provided' do
22
+ expect(variable(:A, :string, default: ->{ 'A' * 2 }).default_value).to eq 'AA'
23
+ end
14
24
  end
15
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: envied
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gert Goet
@@ -9,22 +9,8 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-07-06 00:00:00.000000000 Z
12
+ date: 2019-06-12 00:00:00.000000000 Z
13
13
  dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: coercible
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - "~>"
19
- - !ruby/object:Gem::Version
20
- version: '1.0'
21
- type: :runtime
22
- prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - "~>"
26
- - !ruby/object:Gem::Version
27
- version: '1.0'
28
14
  - !ruby/object:Gem::Dependency
29
15
  name: thor
30
16
  requirement: !ruby/object:Gem::Requirement
@@ -45,28 +31,28 @@ dependencies:
45
31
  requirements:
46
32
  - - "~>"
47
33
  - !ruby/object:Gem::Version
48
- version: '1.5'
34
+ version: '2.0'
49
35
  type: :development
50
36
  prerelease: false
51
37
  version_requirements: !ruby/object:Gem::Requirement
52
38
  requirements:
53
39
  - - "~>"
54
40
  - !ruby/object:Gem::Version
55
- version: '1.5'
41
+ version: '2.0'
56
42
  - !ruby/object:Gem::Dependency
57
43
  name: rake
58
44
  requirement: !ruby/object:Gem::Requirement
59
45
  requirements:
60
- - - ">="
46
+ - - "~>"
61
47
  - !ruby/object:Gem::Version
62
- version: '0'
48
+ version: '12.0'
63
49
  type: :development
64
50
  prerelease: false
65
51
  version_requirements: !ruby/object:Gem::Requirement
66
52
  requirements:
67
- - - ">="
53
+ - - "~>"
68
54
  - !ruby/object:Gem::Version
69
- version: '0'
55
+ version: '12.0'
70
56
  - !ruby/object:Gem::Dependency
71
57
  name: rspec
72
58
  requirement: !ruby/object:Gem::Requirement
@@ -86,7 +72,9 @@ email:
86
72
  - gert@thinkcreate.nl
87
73
  - jjfutbol@gmail.com
88
74
  executables:
75
+ - console
89
76
  - envied
77
+ - setup
90
78
  extensions: []
91
79
  extra_rdoc_files: []
92
80
  files:
@@ -98,7 +86,9 @@ files:
98
86
  - LICENSE.txt
99
87
  - README.md
100
88
  - Rakefile
89
+ - bin/console
101
90
  - bin/envied
91
+ - bin/setup
102
92
  - envied.gemspec
103
93
  - examples/extensive_envfile
104
94
  - lib/envied.rb
@@ -116,6 +106,7 @@ files:
116
106
  - spec/configuration_spec.rb
117
107
  - spec/env_var_extractor_spec.rb
118
108
  - spec/envied_spec.rb
109
+ - spec/gemspec_spec.rb
119
110
  - spec/spec_helper.rb
120
111
  - spec/variable_spec.rb
121
112
  homepage: https://github.com/eval/envied
@@ -130,15 +121,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
130
121
  requirements:
131
122
  - - ">="
132
123
  - !ruby/object:Gem::Version
133
- version: 2.1.9
124
+ version: '2.4'
134
125
  required_rubygems_version: !ruby/object:Gem::Requirement
135
126
  requirements:
136
- - - ">="
127
+ - - ">"
137
128
  - !ruby/object:Gem::Version
138
- version: '0'
129
+ version: 1.3.1
139
130
  requirements: []
140
- rubyforge_project:
141
- rubygems_version: 2.6.12
131
+ rubygems_version: 3.0.3
142
132
  signing_key:
143
133
  specification_version: 4
144
134
  summary: Ensure presence and type of ENV-variables
@@ -147,5 +137,6 @@ test_files:
147
137
  - spec/configuration_spec.rb
148
138
  - spec/env_var_extractor_spec.rb
149
139
  - spec/envied_spec.rb
140
+ - spec/gemspec_spec.rb
150
141
  - spec/spec_helper.rb
151
142
  - spec/variable_spec.rb