rubyfox-sfsobject 0.5.0.pre-java → 0.5.1-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -95,6 +95,8 @@ module Rubyfox
95
95
 
96
96
  def unwrap_value!(object, key)
97
97
  value = object.get(key)
98
+ raise ArgumentError, "nil value for #{key.inspect}" unless value
99
+
98
100
  if wrapper_method = _unwrapper(value)
99
101
  case wrapper_method
100
102
  when Symbol
@@ -1,5 +1,5 @@
1
1
  module Rubyfox
2
2
  module SFSObject
3
- VERSION = "0.5.0.pre"
3
+ VERSION = "0.5.1"
4
4
  end
5
5
  end
@@ -12,6 +12,13 @@ class RubyfoxSFSObjectBulkTest < RubyfoxCase
12
12
  assert_conversion({ "key" => nil }, { :key => nil })
13
13
  end
14
14
 
15
+ test "raise ArgumentError for nil values" do
16
+ object = Rubyfox::SFSObject.new
17
+ assert_raises ArgumentError, :message => /nil value for :foo/ do
18
+ Rubyfox::SFSObject::Bulk.unwrap_value!(object, :foo)
19
+ end
20
+ end
21
+
15
22
  context "plain" do
16
23
  test "nil" do
17
24
  assert_conversion :null => nil
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyfox-sfsobject
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: 6
5
- version: 0.5.0.pre
4
+ version: 0.5.1
5
+ prerelease:
6
6
  platform: java
7
7
  authors:
8
8
  - Peter Suschlik
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-22 00:00:00.000000000 Z
12
+ date: 2012-12-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -142,16 +142,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
142
142
  - !ruby/object:Gem::Version
143
143
  segments:
144
144
  - 0
145
- hash: 2
146
145
  version: !binary |-
147
146
  MA==
147
+ hash: 2
148
148
  none: false
149
149
  required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  requirements:
151
- - - !binary |-
152
- Pg==
151
+ - - ! '>='
153
152
  - !ruby/object:Gem::Version
154
- version: 1.3.1
153
+ segments:
154
+ - 0
155
+ version: !binary |-
156
+ MA==
157
+ hash: 2
155
158
  none: false
156
159
  requirements: []
157
160
  rubyforge_project: