spout 0.5.0.beta2 → 0.5.0.beta3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1e709f6b302b8a993babfbe62068f831cdd99946
4
- data.tar.gz: 7a5443ae9f0031377891c26df59a2327499df48e
3
+ metadata.gz: 5043dfb4182d629954d9018ab7eb8e95bcb64222
4
+ data.tar.gz: 332f7a2c94d6ac1857d7c4d91e869a78d7b33124
5
5
  SHA512:
6
- metadata.gz: 59fefa97d2d335d498270abe890291ebbd2ae773889fe927a2cd098f1ea662ec6327989767dea98e5f081b8d79540c2241fb2321aec2c845d3d2866105ee2205
7
- data.tar.gz: 32ca4ccbbfb0af5cc7294d5ec3a56769429963f03e7928356119f6d7bcf76c706ede40d301a1f696277a8520220e75e9e7253ee0688edfb20596dd188c6aefcd
6
+ metadata.gz: e998358735fb59f2d1aeed5ec17087e7193a2bf7932dc6eed7e1fcb695659975ca702ce3c09c54dedcdaf34050ee136bf101bc79d2eea22ec2a878273819c219
7
+ data.tar.gz: dbeea64a98572bce672acce291f6d0042f1291e2c03f5be25d0a011b7f597b2e0f705096bfeb9cac4e33f8b611c957b3c95269a89c03a413c316070dafe63395
data/CHANGELOG.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  ### Enhancement
4
4
  - Tests added to check that variables of type choices have specified a domain
5
+ - Tests added to make sure the JSON object `id` matches the variable file name
5
6
 
6
7
  ## 0.4.1 (August 16, 2013)
7
8
 
@@ -0,0 +1,13 @@
1
+ module Spout
2
+ module Tests
3
+ module VariableNameMatch
4
+
5
+ Dir.glob("variables/**/*.json").each do |file|
6
+ define_method("test_variable_name_match: "+file) do
7
+ assert_equal file.gsub(/^.*\//, '').gsub('.json', '').downcase, (begin JSON.parse(File.read(file))["id"] rescue nil end)
8
+ end
9
+ end
10
+
11
+ end
12
+ end
13
+ end
data/lib/spout/tests.rb CHANGED
@@ -6,6 +6,7 @@ require 'json'
6
6
  require 'spout/tests/json_validation'
7
7
  require 'spout/tests/variable_type_validation'
8
8
  require 'spout/tests/variable_name_uniqueness'
9
+ require 'spout/tests/variable_name_match'
9
10
  require 'spout/tests/domain_existence_validation'
10
11
  require 'spout/tests/domain_format'
11
12
  require 'spout/tests/domain_name_uniqueness'
@@ -16,6 +17,7 @@ module Spout
16
17
  include Spout::Tests::JsonValidation
17
18
  include Spout::Tests::VariableTypeValidation
18
19
  include Spout::Tests::VariableNameUniqueness
20
+ include Spout::Tests::VariableNameMatch
19
21
  include Spout::Tests::DomainExistenceValidation
20
22
  include Spout::Tests::DomainFormat
21
23
  include Spout::Tests::DomainNameUniqueness
data/lib/spout/version.rb CHANGED
@@ -3,7 +3,7 @@ module Spout
3
3
  MAJOR = 0
4
4
  MINOR = 5
5
5
  TINY = 0
6
- BUILD = "beta2" # nil, "pre", "rc", "rc2"
6
+ BUILD = "beta3" # nil, "pre", "rc", "rc2"
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, BUILD].compact.join('.')
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0.beta2
4
+ version: 0.5.0.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Remo Mueller
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-26 00:00:00.000000000 Z
11
+ date: 2013-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -109,6 +109,7 @@ files:
109
109
  - lib/spout/tests/domain_specified.rb
110
110
  - lib/spout/tests/json_helper.rb
111
111
  - lib/spout/tests/json_validation.rb
112
+ - lib/spout/tests/variable_name_match.rb
112
113
  - lib/spout/tests/variable_name_uniqueness.rb
113
114
  - lib/spout/tests/variable_type_validation.rb
114
115
  - lib/spout/tests.rb