spout 0.3.0 → 0.4.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: 817b70a8f509f65b21718337e60446af0e9b4a74
4
- data.tar.gz: 54d3e4a39576a577a8e6a5e21a43ac5f893d7407
3
+ metadata.gz: 183c463f4fb95033bacbc37bc91770157c97e9c2
4
+ data.tar.gz: b7fbd368451f77e8108e6cfe34e7c97b2e0cb2ca
5
5
  SHA512:
6
- metadata.gz: 6743ef9de28d8ed56930dde738980b028af3021b770c218a18ae86b97a7fb7ab565fc408cbec2425f8531fe6922fdc02795c429cf4f79bbd5589538aa9fe3cfc
7
- data.tar.gz: 507db95089fb399b6c91db9e4b8bfa1a175fdb59d52428bda5935c50542bbbe6873d207f15ca07b9d9403bc09aa4e3076cd18056186edf5af58a5ffa54c18699
6
+ metadata.gz: 5239e0291b8c1a3f978aff684d631abd4d7d257b946f38bfacc1c8118cd93d8be852f908c380dc7ceaeaaf15cc7e015751891563c6c2b102a6dfbbff0bf47127
7
+ data.tar.gz: 4b4787a8eefcc6ced48d9aa7035ad736a233bc71a801cbfe60a4a368e3eeeb3cc9ff48273143755a42286ea0985cab502c89b9955789f336377d3c30d554170f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.4.0
2
+
3
+ ### Enhancements
4
+ - Tests for domain existence have changed and now only require the domain name be referenced from the variable instead of the entire domain path
5
+ - To reference a domain from a variable, only the domain name is now required.
6
+ - This change decouples the relative domain folder location from needing to be added among multiple variables which now allows domains to be reorganized without requiring the corresponding variables to be updated to reflect the new path
7
+ - This change is possible since domains need to have a unique name regardless of where they are located
8
+
1
9
  ## 0.3.0 (July 11, 2013)
2
10
 
3
11
  ### Enhancements
@@ -3,13 +3,17 @@ module Spout
3
3
  module DomainExistenceValidation
4
4
 
5
5
  def assert_domain_existence(item, msg = nil)
6
+ domain_names = Dir.glob("domains/**/*.json").collect{|file| file.split('/').last.to_s.downcase.split('.json').first}
7
+
6
8
  result = begin
7
- domain_name = JSON.parse(File.read(item))["domain"]+".json"
8
- Dir.glob(File.join("domains", domain_name), File::FNM_CASEFOLD).size > 0
9
+ domain_name = JSON.parse(File.read(item))["domain"]
10
+ domain_names.include?(domain_name)
9
11
  rescue JSON::ParserError
12
+ domain_name = ''
10
13
  false
11
14
  end
12
- full_message = build_message(msg, "The domain \"domains/#{domain_name}\" referenced by ? does not exist.", item)
15
+
16
+ full_message = build_message(msg, "The domain #{domain_name} referenced by ? does not exist.", item)
13
17
  assert_block(full_message) do
14
18
  result
15
19
  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 = 3
4
+ MINOR = 4
5
5
  TINY = 0
6
- BUILD = nil # nil, "pre", "rc", "rc2"
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.3.0
4
+ version: 0.4.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-07-11 00:00:00.000000000 Z
11
+ date: 2013-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -131,9 +131,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
131
131
  version: '0'
132
132
  required_rubygems_version: !ruby/object:Gem::Requirement
133
133
  requirements:
134
- - - '>='
134
+ - - '>'
135
135
  - !ruby/object:Gem::Version
136
- version: '0'
136
+ version: 1.3.1
137
137
  requirements: []
138
138
  rubyforge_project:
139
139
  rubygems_version: 2.0.3