lucid_works 0.6.28 → 0.6.29

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module LucidWorks
2
- VERSION = "0.6.28"
2
+ VERSION = "0.6.29"
3
3
  end
@@ -124,9 +124,14 @@ module LucidWorks
124
124
  @attributes[:#{attribute}] # @attributes[:foo]
125
125
  end # end
126
126
 
127
- def #{attribute}=(new_value) # def foo=(new_value)
128
- @attributes[:#{attribute}] = to_bool(new_value) # @attributes[:foo] = to_bool(new_value)
129
- end # end
127
+ def #{attribute}=(new_value) # def foo=(new_value)
128
+ begin # begin
129
+ @attributes[:#{attribute}] = to_bool(new_value) # @attributes[:foo] = to_bool(new_value)
130
+ rescue # rescue
131
+ raise "Expected #{attribute} to take a boolean"+ # raise "Expected <some_bool> to take a boolean
132
+ " value, but '\#\{new_value}' is ambiguous" # " value, but 'frozbot' is ambiguous"
133
+ end # end
134
+ end # end
130
135
  EOF
131
136
  when :string
132
137
  klass.class_eval <<-EOF, __FILE__, __LINE__+1
@@ -121,6 +121,13 @@ describe LucidWorks::Schema do
121
121
  @model.abool.should === true
122
122
  end
123
123
  end
124
+
125
+ it "should raise an exception mentioning the attribute and value if unconvertible" do
126
+ lambda {
127
+ @model.abool = "frozbot"
128
+ }.should raise_error(RuntimeError, /abool.*frozbot/)
129
+
130
+ end
124
131
  end
125
132
 
126
133
  context "for an integer attribute" do
metadata CHANGED
@@ -1,101 +1,105 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: lucid_works
3
- version: !ruby/object:Gem::Version
4
- version: 0.6.28
3
+ version: !ruby/object:Gem::Version
5
4
  prerelease:
5
+ version: 0.6.29
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Sam Pierson
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-07-07 00:00:00.000000000 -07:00
12
+
13
+ date: 2011-07-15 00:00:00 -04:00
13
14
  default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
16
17
  name: activesupport
17
- requirement: &2153193580 !ruby/object:Gem::Requirement
18
+ prerelease: false
19
+ requirement: &id001 !ruby/object:Gem::Requirement
18
20
  none: false
19
- requirements:
20
- - - ! '>='
21
- - !ruby/object:Gem::Version
22
- version: '3'
21
+ requirements:
22
+ - - ">="
23
+ - !ruby/object:Gem::Version
24
+ version: "3"
23
25
  type: :runtime
24
- prerelease: false
25
- version_requirements: *2153193580
26
- - !ruby/object:Gem::Dependency
26
+ version_requirements: *id001
27
+ - !ruby/object:Gem::Dependency
27
28
  name: activemodel
28
- requirement: &2153193080 !ruby/object:Gem::Requirement
29
+ prerelease: false
30
+ requirement: &id002 !ruby/object:Gem::Requirement
29
31
  none: false
30
- requirements:
31
- - - ! '>='
32
- - !ruby/object:Gem::Version
33
- version: '3'
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: "3"
34
36
  type: :runtime
35
- prerelease: false
36
- version_requirements: *2153193080
37
- - !ruby/object:Gem::Dependency
37
+ version_requirements: *id002
38
+ - !ruby/object:Gem::Dependency
38
39
  name: rest-client
39
- requirement: &2153192620 !ruby/object:Gem::Requirement
40
+ prerelease: false
41
+ requirement: &id003 !ruby/object:Gem::Requirement
40
42
  none: false
41
- requirements:
42
- - - ! '>='
43
- - !ruby/object:Gem::Version
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
44
46
  version: 1.6.1
45
47
  type: :runtime
46
- prerelease: false
47
- version_requirements: *2153192620
48
- - !ruby/object:Gem::Dependency
48
+ version_requirements: *id003
49
+ - !ruby/object:Gem::Dependency
49
50
  name: json
50
- requirement: &2153192240 !ruby/object:Gem::Requirement
51
+ prerelease: false
52
+ requirement: &id004 !ruby/object:Gem::Requirement
51
53
  none: false
52
- requirements:
53
- - - ! '>='
54
- - !ruby/object:Gem::Version
55
- version: '0'
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: "0"
56
58
  type: :runtime
57
- prerelease: false
58
- version_requirements: *2153192240
59
- - !ruby/object:Gem::Dependency
59
+ version_requirements: *id004
60
+ - !ruby/object:Gem::Dependency
60
61
  name: rsolr
61
- requirement: &2153191780 !ruby/object:Gem::Requirement
62
+ prerelease: false
63
+ requirement: &id005 !ruby/object:Gem::Requirement
62
64
  none: false
63
- requirements:
64
- - - ! '>='
65
- - !ruby/object:Gem::Version
66
- version: '0'
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: "0"
67
69
  type: :runtime
68
- prerelease: false
69
- version_requirements: *2153191780
70
- - !ruby/object:Gem::Dependency
70
+ version_requirements: *id005
71
+ - !ruby/object:Gem::Dependency
71
72
  name: rsolr-ext
72
- requirement: &2153191360 !ruby/object:Gem::Requirement
73
+ prerelease: false
74
+ requirement: &id006 !ruby/object:Gem::Requirement
73
75
  none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: "0"
78
80
  type: :runtime
79
- prerelease: false
80
- version_requirements: *2153191360
81
- - !ruby/object:Gem::Dependency
81
+ version_requirements: *id006
82
+ - !ruby/object:Gem::Dependency
82
83
  name: nokogiri
83
- requirement: &2153190940 !ruby/object:Gem::Requirement
84
+ prerelease: false
85
+ requirement: &id007 !ruby/object:Gem::Requirement
84
86
  none: false
85
- requirements:
86
- - - ! '>='
87
- - !ruby/object:Gem::Version
88
- version: '0'
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: "0"
89
91
  type: :runtime
90
- prerelease: false
91
- version_requirements: *2153190940
92
+ version_requirements: *id007
92
93
  description: Ruby wrapper for the LucidWorks REST API
93
- email:
94
+ email:
94
95
  - sam.pierson@lucidimagination.com
95
96
  executables: []
97
+
96
98
  extensions: []
99
+
97
100
  extra_rdoc_files: []
98
- files:
101
+
102
+ files:
99
103
  - .autotest
100
104
  - .gitignore
101
105
  - .rspec
@@ -165,31 +169,34 @@ files:
165
169
  - spec/lib/lucid_works/utils_spec.rb
166
170
  - spec/spec_helper.rb
167
171
  has_rdoc: true
168
- homepage: ''
172
+ homepage: ""
169
173
  licenses: []
174
+
170
175
  post_install_message:
171
176
  rdoc_options: []
172
- require_paths:
177
+
178
+ require_paths:
173
179
  - lib
174
- required_ruby_version: !ruby/object:Gem::Requirement
180
+ required_ruby_version: !ruby/object:Gem::Requirement
175
181
  none: false
176
- requirements:
177
- - - ! '>='
178
- - !ruby/object:Gem::Version
179
- version: '0'
180
- required_rubygems_version: !ruby/object:Gem::Requirement
182
+ requirements:
183
+ - - ">="
184
+ - !ruby/object:Gem::Version
185
+ version: "0"
186
+ required_rubygems_version: !ruby/object:Gem::Requirement
181
187
  none: false
182
- requirements:
183
- - - ! '>='
184
- - !ruby/object:Gem::Version
185
- version: '0'
188
+ requirements:
189
+ - - ">="
190
+ - !ruby/object:Gem::Version
191
+ version: "0"
186
192
  requirements: []
193
+
187
194
  rubyforge_project: lucid_works
188
195
  rubygems_version: 1.6.2
189
196
  signing_key:
190
197
  specification_version: 3
191
198
  summary: Ruby wrapper for the LucidWorks REST API
192
- test_files:
199
+ test_files:
193
200
  - spec/lib/lucid_works/associations/has_many_spec.rb
194
201
  - spec/lib/lucid_works/associations/has_one_spec.rb
195
202
  - spec/lib/lucid_works/associations_spec.rb