reuters 0.8.5 → 0.8.6

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Zjk0NzBkNTExZjE2MjgzNDY4NzBhN2UxODdlN2VjNmY4NTk2YjIxMg==
4
+ ZWZmZDJkNjMwNGE0MmU4ODNhZWJhMzI2NjY2Y2UwMjQ0MzQxYzAzOQ==
5
5
  data.tar.gz: !binary |-
6
- MDVlM2NmZGEwOWU3ZDE5OTg0MjRlNWQ4MDNjZmIzODlkY2RiZTU5OQ==
6
+ Y2Q3ZTE1OGE1ODMwOGJkNWZjYmVkYTIwYWIzNmNlODAyNmNjOTA5Mw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZTMxMTg2ZDEwMDNlNjgzMWM3YTY1ZWUyYzJhMGM4NzY1MTNiOTBmNGU5ZGI1
10
- MjAyNGFjMDA3YzdmNzRiNjg0OTMxNWQzYjAxMzI2OGQxMDJmNjM3M2Q2N2Qz
11
- MTI0ODQ2NTA0MmI4OTE5N2M4ZWFjZGNhYzcyN2E2Mjg1MzBjYzM=
9
+ MDg5OWY2MTVjOWM0NTBiZTE5MmYyMzc3NDYyMjU2ZGQxZjkyYzJlNWU5ZWM3
10
+ NjU0YTJiYmUxZTZmZTUxNDhmM2VmNzc0NzFmMTExZjg2ZTNjZjVlMzFmMTVk
11
+ ZGQzMGRmYWVmMzJiNzU5YThlNzk2NjIzZGY5OTg3Yzk4YjMwYWI=
12
12
  data.tar.gz: !binary |-
13
- MDE0YjFhNGQ4NWRlY2EwYzQ3ZGZkNzlkM2FjNmM0OTA2YmVjMzRkNzE1NWE0
14
- MTMzYmMyNmJiMTdlOTRjZTI2N2Y5YzU1ODI4YjhmNTc2NDJhNjRjM2NlOGRi
15
- N2EzN2MzMTJiYWUwMGE0MmNjM2U0NTk1OGQwMWRlMWRhODQ0OTE=
13
+ MmQ5M2VkNDU0N2M1ZTVlMTU4ZGQwZDI2Y2M1NmVkMGRmMGRlZWIyMGMyNzVi
14
+ ODUwNWZlNjQ2N2E5OWUwMWNlMzQzYTUyZjQ3ZTgxZWEzYmQxY2M1MDAyN2Yx
15
+ MTk5ZDlmNTcwOGU1YWIwYWEzZjM0YzVkMTI1NjkxNTk5Y2NjYWY=
@@ -22,13 +22,14 @@ module Reuters
22
22
  if key?(name)
23
23
  val = self[name]
24
24
  case val
25
- when String then val
26
25
  when Array
27
26
  val.collect do |v|
28
27
  self.class.new v
29
28
  end
30
- else
29
+ when Hash
31
30
  self.class.new val
31
+ else
32
+ val
32
33
  end
33
34
  end
34
35
  end
@@ -2,5 +2,5 @@
2
2
  # Knowledge Direct API.
3
3
  module Reuters
4
4
  # Current version of the Reuters gem.
5
- VERSION = '0.8.5'
5
+ VERSION = '0.8.6'
6
6
  end
@@ -6,6 +6,8 @@ describe Reuters::Response do
6
6
  {
7
7
  info: {
8
8
  ticker: "ABC",
9
+ number: 1,
10
+ boolean: false,
9
11
  name: {
10
12
  full_name: "ABC Solutions Ltd.",
11
13
  short_name: "ABC Ltd."
@@ -27,6 +29,18 @@ describe Reuters::Response do
27
29
 
28
30
  it { should respond_to(:attributes) }
29
31
 
32
+ describe "when a value is mixed type" do
33
+
34
+ it "should return a number" do
35
+ expect(@response.info.number).to eq 1
36
+ end
37
+
38
+ it "should a boolean" do
39
+ expect(@response.info.boolean).to eq false
40
+ end
41
+
42
+ end
43
+
30
44
  describe "when a value is an array" do
31
45
 
32
46
  it "should return an array" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reuters
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.5
4
+ version: 0.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stockflare
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-07 00:00:00.000000000 Z
11
+ date: 2014-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon