shapewear 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.7
3
+ ## 0.1.8
4
4
  * Better key lookup on hashes.
5
5
  * Changed #camelize to work the same way as in Rails.
6
6
 
@@ -135,7 +135,7 @@ module Shapewear::Request
135
135
  # @param type [Class] The type to convert.
136
136
  def extract_and_serialize_value(builder, obj, field, type)
137
137
  v = if obj.is_a?(Hash)
138
- obj[field] or obj[field.underscore]
138
+ obj[field] or obj[field.to_sym] or obj[field.to_s.underscore] or obj[field.to_s.underscore.to_sym]
139
139
  elsif obj.respond_to?(field)
140
140
  obj.send(field)
141
141
  elsif obj.respond_to?(field.underscore)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Shapewear
4
4
 
5
- Version = "0.1.7"
5
+ Version = "0.1.8"
6
6
 
7
7
  end
@@ -33,7 +33,7 @@ describe Shapewear do
33
33
 
34
34
  r = response.body[:get_structured_data_response][:get_structured_data_result]
35
35
  r.should be_a Hash
36
- r.should include :text => 'text from the struct'
36
+ r.should include :text => 'text from the struct', :xyz => 'xyz'
37
37
  end
38
38
 
39
39
  it "should work for structured responses from hashes" do
@@ -44,7 +44,7 @@ describe Shapewear do
44
44
 
45
45
  r = response.body[:get_structured_data_response][:get_structured_data_result]
46
46
  r.should be_a Hash
47
- r.should include :text => 'text from a hash'
47
+ r.should include :text => 'text from a hash', :xyz => 'xyz'
48
48
  end
49
49
 
50
50
  it "should raise SOAP 1.1 Faults" do
@@ -33,7 +33,7 @@ class CompleteService
33
33
  when 0 then
34
34
  Structured.new('text from the struct')
35
35
  when 1 then
36
- { :text => 'text from a hash', :random_value => rand(999), :created_at => DateTime.now }
36
+ { :text => 'text from a hash', :random_value => rand(999), :created_at => DateTime.now, :xyz => 'xyz' }
37
37
  else
38
38
  raise "ID must be 0 or 1"
39
39
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shapewear
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 7
10
- version: 0.1.7
9
+ - 8
10
+ version: 0.1.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - "F\xC3\xA1bio Batista"