spout 0.4.1 → 0.5.0.beta

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2fc153d6a98113f7275ab271795063c1357438a0
4
- data.tar.gz: b9ee7b4ee4fc7c53a6dfb93cb7be5723e519f091
3
+ metadata.gz: 4656d0dfc77b8cae70ee35d560a322ea1c244698
4
+ data.tar.gz: 680f510137330da88ce782a06174b5a18f600363
5
5
  SHA512:
6
- metadata.gz: f900b334e9533ed0045d9dedfc2b3600ae0282890cb8b35d5f83e7e044b0c82ee24bb0623b3a2f76998a66810a9bd1fa4d5f08c5ab78e5cb337a52f56ef5d81d
7
- data.tar.gz: eab6616bae9014cf310b375f8743932fcd4a5b08b5e04a0602e1346ec57db7f7e4e457f53034f40e2859300384ee999b01b077685d4f478487bfdcacd7085304
6
+ metadata.gz: 3c4d79f42e8ed2aa84dc8db26f3f983316405b25f7eac606f605e21d7197f69bb43ed4506f2bc575c9ac9357e8846ad54600f50f6f6df17e0d3706a46e649e4d
7
+ data.tar.gz: 4655ecf2e6470ae53d38419b9fe739498067c693830ac60fbb2258f04bab32f02d198812d644a639972ba57981cf4f9cd8df6c089a51627046dcb0d01cc364e6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.5.0
2
+
3
+ ### Enhancement
4
+ - Tests added to check that variables of type choices have specified a domain
5
+
1
6
  ## 0.4.1 (August 16, 2013)
2
7
 
3
8
  ### Enhancement
@@ -0,0 +1,24 @@
1
+ require 'spout/tests/json_helper'
2
+
3
+ module Spout
4
+ module Tests
5
+ module DomainSpecified
6
+
7
+ def assert_domain_specified(domain_name, msg = nil)
8
+ full_message = build_message(msg, "Variables of type choices need to specify a domain.")
9
+ assert_block(full_message) do
10
+ domain_name != nil
11
+ end
12
+ end
13
+
14
+ Dir.glob("variables/**/*.json").each do |file|
15
+ if json_value(file, :type) == "choices"
16
+ define_method("test_domain_specified:"+file) do
17
+ assert_domain_present json_value(file, :domain)
18
+ end
19
+ end
20
+ end
21
+
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,5 @@
1
+ require 'json'
2
+
3
+ def json_value(file, key)
4
+ begin JSON.parse(File.read(file))[key.to_s] rescue nil end
5
+ end
data/lib/spout/tests.rb CHANGED
@@ -9,6 +9,7 @@ require 'spout/tests/variable_name_uniqueness'
9
9
  require 'spout/tests/domain_existence_validation'
10
10
  require 'spout/tests/domain_format'
11
11
  require 'spout/tests/domain_name_uniqueness'
12
+ require 'spout/tests/domain_specified'
12
13
 
13
14
  module Spout
14
15
  module Tests
@@ -18,6 +19,7 @@ module Spout
18
19
  include Spout::Tests::DomainExistenceValidation
19
20
  include Spout::Tests::DomainFormat
20
21
  include Spout::Tests::DomainNameUniqueness
22
+ include Spout::Tests::DomainSpecified
21
23
 
22
24
  Turn.config.trace = 1
23
25
  end
data/lib/spout/version.rb CHANGED
@@ -1,9 +1,9 @@
1
1
  module Spout
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
- MINOR = 4
5
- TINY = 1
6
- BUILD = nil # nil, "pre", "rc", "rc2"
4
+ MINOR = 5
5
+ TINY = 0
6
+ BUILD = "beta" # 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.4.1
4
+ version: 0.5.0.beta
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-16 00:00:00.000000000 Z
11
+ date: 2013-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -106,6 +106,8 @@ files:
106
106
  - lib/spout/tests/domain_existence_validation.rb
107
107
  - lib/spout/tests/domain_format.rb
108
108
  - lib/spout/tests/domain_name_uniqueness.rb
109
+ - lib/spout/tests/domain_specified.rb
110
+ - lib/spout/tests/json_helper.rb
109
111
  - lib/spout/tests/json_validation.rb
110
112
  - lib/spout/tests/variable_name_uniqueness.rb
111
113
  - lib/spout/tests/variable_type_validation.rb
@@ -132,9 +134,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
132
134
  version: '0'
133
135
  required_rubygems_version: !ruby/object:Gem::Requirement
134
136
  requirements:
135
- - - '>='
137
+ - - '>'
136
138
  - !ruby/object:Gem::Version
137
- version: '0'
139
+ version: 1.3.1
138
140
  requirements: []
139
141
  rubyforge_project:
140
142
  rubygems_version: 2.0.3