fig_newton 0.14 → 0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/ChangeLog +5 -1
- data/config/yaml/test_config.yml +5 -0
- data/features/fig_newton.feature +5 -0
- data/features/step_definitions/fig_newton_steps.rb +6 -0
- data/lib/fig_newton/missing.rb +1 -1
- data/lib/fig_newton/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4da62a7cd8e566070bb9e904667652303d44fdde
|
4
|
+
data.tar.gz: 5561c9d2a8a258d17ee2f62a9d8dd070a90d0588
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f834ae62dc542578515076adafbc6cb3b86fa3b51881fda192132a705680875e6fc079bd4611e053162d1298cb61fe109668c6607b50c8b88df35557390038a
|
7
|
+
data.tar.gz: 44280762d020f9bda76aa62e9ac5d2dda6f951b2169ea5c562c8d92b3e49b87566b3e0a7f135c97e8b5cef42ef545d3ffee69b0d1636a2f90d2e274de8262875
|
data/.travis.yml
CHANGED
data/ChangeLog
CHANGED
data/config/yaml/test_config.yml
CHANGED
data/features/fig_newton.feature
CHANGED
@@ -50,6 +50,11 @@ Feature: Functionality of the fig_newton gem
|
|
50
50
|
When I ask for the value for "my_float"
|
51
51
|
Then I should see 0.25
|
52
52
|
|
53
|
+
Scenario: Requesting an Array of values
|
54
|
+
Given I have read the configuration file
|
55
|
+
When I ask for the value for "my_array"
|
56
|
+
Then I should see an array containing "one", 2, 3.0, :four
|
57
|
+
|
53
58
|
Scenario: Requesting a true boolean value
|
54
59
|
Given I have read the configuration file
|
55
60
|
When I ask for the value for "set_flag"
|
@@ -28,6 +28,12 @@ Then (/^I should see :([^\"]*)$/) do |value|
|
|
28
28
|
expect(@value).to eql value.to_sym
|
29
29
|
end
|
30
30
|
|
31
|
+
Then(/^I should see an array containing "(.*?)", (\d+), (\d+)\.(\d+), :([^\"]*)$/) do |string, int, val1, val2, symbol|
|
32
|
+
decimal = val1 + '.' + val2
|
33
|
+
array = [string, int.to_i, decimal.to_f, symbol.to_sym]
|
34
|
+
expect(@value).to eql(array)
|
35
|
+
end
|
36
|
+
|
31
37
|
Then (/^I should see true$/) do
|
32
38
|
expect(@value).to be true
|
33
39
|
end
|
data/lib/fig_newton/missing.rb
CHANGED
@@ -28,7 +28,7 @@ module FigNewton
|
|
28
28
|
private
|
29
29
|
|
30
30
|
def type_known?(value)
|
31
|
-
known_types = [String, Integer, TrueClass, FalseClass, Symbol, Float]
|
31
|
+
known_types = [String, Integer, TrueClass, FalseClass, Symbol, Float, Array]
|
32
32
|
known_types.any? { |type| value.kind_of? type }
|
33
33
|
end
|
34
34
|
end
|
data/lib/fig_newton/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fig_newton
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.15'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Morgan
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-03
|
12
|
+
date: 2017-08-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: yml_reader
|