structure 0.20.0 → 0.20.1

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.
@@ -1,3 +1,3 @@
1
1
  class Structure
2
- VERSION = '0.20.0'
2
+ VERSION = '0.20.1'
3
3
  end
data/lib/structure.rb CHANGED
@@ -19,7 +19,7 @@ class Structure
19
19
  # A namespaced basic object.
20
20
  #
21
21
  # If running a legacy Ruby version, we either quote Builder's or
22
- # fabricate ourselves.
22
+ # fabricate one ourselves.
23
23
  if defined?(BasicObject)
24
24
  BasicObject = ::BasicObject
25
25
  elsif defined?(BlankSlate)
@@ -79,7 +79,6 @@ class Structure
79
79
  if !default || !type || default.is_a?(type)
80
80
  defaults[name] = default
81
81
  else
82
- binding.pry
83
82
  raise TypeError, "#{default} isn't a #{type}"
84
83
  end
85
84
 
@@ -37,6 +37,7 @@ class TestStructure < Test::Unit::TestCase
37
37
 
38
38
  def test_key_errors
39
39
  assert_raise(NameError) { Person.key :class }
40
+ assert_raise(TypeError) { Person.key :foo, String, 1 }
40
41
  end
41
42
 
42
43
  def test_key_defaults
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: structure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.0
4
+ version: 0.20.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -43,7 +43,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
43
43
  version: '0'
44
44
  segments:
45
45
  - 0
46
- hash: -506799676672156126
46
+ hash: -2865426665799321471
47
47
  required_rubygems_version: !ruby/object:Gem::Requirement
48
48
  none: false
49
49
  requirements:
@@ -52,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  version: '0'
53
53
  segments:
54
54
  - 0
55
- hash: -506799676672156126
55
+ hash: -2865426665799321471
56
56
  requirements: []
57
57
  rubyforge_project: structure
58
58
  rubygems_version: 1.8.6