sailthru-client 4.0.1 → 4.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZmUzNjY1NzM2ZDI3ZDNmZjdmYjFlMjUwMmI4NjIwOTQzZTQxZTYyOQ==
5
- data.tar.gz: !binary |-
6
- ZjNlY2ViMTg3OTVlYjI2MDYyNDRmOWU4M2QyOGJiOTBlODgxNDNhMQ==
2
+ SHA1:
3
+ metadata.gz: b193c03720b5d9f1c40aea0fa5560889e62fe87e
4
+ data.tar.gz: 6a5d89224f591de5eb35507bfd389b953940d846
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- Mzc0ZTM2Nzk3NTExYzEzMzFlYzA1N2U5M2E5MTgxOGJkMTllMGIwZTc3ZWJj
10
- MDAyMDRhZDk0ZDY3YzJiNThjN2U5NTVlMTc5ZWIwZjJhMmJhYWM5MzM2OTkw
11
- ODFkMjk3NjI0YzhiODVhODYyNDhhZDg3MmVmYjFmOGE5MmRkMTM=
12
- data.tar.gz: !binary |-
13
- OWY5N2E0Njc3ZWE5MWE5Nzg2MDM3MDU0NjkwMTEwMGM4MmRhYjRlYTA0Y2Y1
14
- NTMxMGFiMjAxNDI3NjBmOWYyYWIxZjEwMDYzYWJjYjRkMDEyMmE5MjcyMTQ2
15
- NmQ2MzhkOGMzYTZkOTI4ZGViNTY5YWFiNDJhMzQ4YTAxOWNhOWU=
6
+ metadata.gz: 5cf236a07cb7043a93134ea0640e05af8ee4b5255940802d5b1b149967ebc0dd4bfe0df37f8b0238c288d207940305c8f2fcb96005cff2a938680efb7022b876
7
+ data.tar.gz: 5817391a74c1aaba83ee442a4df491d575218ed690a6b8e0b598020a99bbd590f47f2d22b7f3cbac98ea89f3673add64a0d244ef2b5201941a9f6f0bfeec0322
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  For installation instructions, documentation, and examples please visit:
4
4
  [http://getstarted.sailthru.com/developers/api-libraries/ruby](http://getstarted.sailthru.com/developers/api-libraries/ruby)
5
5
 
6
- A simple client library to remotely access the `Sailthru REST API` as per [http://getstarted.sailthru.com/api](http://getstarted.sailthru.com/developers/api)
6
+ A simple client library to remotely access the `Sailthru REST API` as per [http://getstarted.sailthru.com/api](http://getstarted.sailthru.com/api)
7
7
 
8
8
  By default, it will make requests in `JSON` format.
9
9
 
@@ -788,7 +788,7 @@ module Sailthru
788
788
  end
789
789
 
790
790
  req = nil
791
- headers = {"User-Agent" => "Sailthru API Ruby Client #{VERSION}"}
791
+ headers = {"User-Agent" => "Sailthru API Ruby Client #{Sailthru::VERSION}"}
792
792
 
793
793
  _uri = URI.parse(uri)
794
794
 
@@ -11,9 +11,9 @@ module Sailthru
11
11
  def extract_param_values(params)
12
12
  values = []
13
13
  params.each do |k, v|
14
- if v.class == Hash
14
+ if v.is_a? Hash
15
15
  values.concat extract_param_values(v)
16
- elsif v.class == Array
16
+ elsif v.is_a? Array
17
17
  temp_hash = {}
18
18
  v.each_with_index do |v_,i_|
19
19
  temp_hash[i_.to_s] = v_
@@ -1,3 +1,3 @@
1
1
  module Sailthru
2
- VERSION = '4.0.1'
2
+ VERSION = '4.0.2'
3
3
  end
@@ -6,9 +6,9 @@ Gem::Specification.new do |s|
6
6
  s.name = "sailthru-client"
7
7
  s.version = Sailthru::VERSION
8
8
 
9
- s.authors = ["Prajwal Tuladhar", "Dennis Yu"]
9
+ s.authors = ["Prajwal Tuladhar", "Dennis Yu", "George Liao"]
10
10
  s.date = Date.today.to_s
11
- s.email = "praj@sailthru.com"
11
+ s.email = "gliao@sailthru.com"
12
12
  s.extra_rdoc_files = ["README.md"]
13
13
  s.files = `git ls-files`.split("\n")
14
14
  s.test_files = `git ls-files -- test/*`.split("\n")
@@ -19,5 +19,13 @@ class HelpersTest < Minitest::Test
19
19
  assert((expected_array == converted_array))
20
20
  end
21
21
 
22
+ it "converts nested custom hash to array" do
23
+ class CustomHash < Hash; end
24
+ h = CustomHash[{"Hash" => "Regular Hash", "HashWithIndifferentAccess" => "Hash accessible by strings or symbols"}]
25
+ nested_hash = {"framework" => "Rails", "hash_types" => h}
26
+ expected_array = ["Rails", "Regular Hash", "Hash accessible by strings or symbols"].sort
27
+ assert_equal expected_array, extract_param_values(nested_hash).sort
28
+ end
29
+
22
30
  end
23
31
  end
metadata CHANGED
@@ -1,102 +1,103 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sailthru-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Prajwal Tuladhar
8
8
  - Dennis Yu
9
+ - George Liao
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2014-06-30 00:00:00.000000000 Z
13
+ date: 2015-02-19 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: json
16
17
  requirement: !ruby/object:Gem::Requirement
17
18
  requirements:
18
- - - ! '>='
19
+ - - '>='
19
20
  - !ruby/object:Gem::Version
20
21
  version: '0'
21
22
  type: :runtime
22
23
  prerelease: false
23
24
  version_requirements: !ruby/object:Gem::Requirement
24
25
  requirements:
25
- - - ! '>='
26
+ - - '>='
26
27
  - !ruby/object:Gem::Version
27
28
  version: '0'
28
29
  - !ruby/object:Gem::Dependency
29
30
  name: multipart-post
30
31
  requirement: !ruby/object:Gem::Requirement
31
32
  requirements:
32
- - - ! '>='
33
+ - - '>='
33
34
  - !ruby/object:Gem::Version
34
35
  version: '0'
35
36
  type: :runtime
36
37
  prerelease: false
37
38
  version_requirements: !ruby/object:Gem::Requirement
38
39
  requirements:
39
- - - ! '>='
40
+ - - '>='
40
41
  - !ruby/object:Gem::Version
41
42
  version: '0'
42
43
  - !ruby/object:Gem::Dependency
43
44
  name: rake
44
45
  requirement: !ruby/object:Gem::Requirement
45
46
  requirements:
46
- - - ! '>='
47
+ - - '>='
47
48
  - !ruby/object:Gem::Version
48
49
  version: '0'
49
50
  type: :development
50
51
  prerelease: false
51
52
  version_requirements: !ruby/object:Gem::Requirement
52
53
  requirements:
53
- - - ! '>='
54
+ - - '>='
54
55
  - !ruby/object:Gem::Version
55
56
  version: '0'
56
57
  - !ruby/object:Gem::Dependency
57
58
  name: fakeweb
58
59
  requirement: !ruby/object:Gem::Requirement
59
60
  requirements:
60
- - - ! '>='
61
+ - - '>='
61
62
  - !ruby/object:Gem::Version
62
63
  version: '0'
63
64
  type: :development
64
65
  prerelease: false
65
66
  version_requirements: !ruby/object:Gem::Requirement
66
67
  requirements:
67
- - - ! '>='
68
+ - - '>='
68
69
  - !ruby/object:Gem::Version
69
70
  version: '0'
70
71
  - !ruby/object:Gem::Dependency
71
72
  name: minitest
72
73
  requirement: !ruby/object:Gem::Requirement
73
74
  requirements:
74
- - - ! '>='
75
+ - - '>='
75
76
  - !ruby/object:Gem::Version
76
77
  version: '5'
77
78
  type: :development
78
79
  prerelease: false
79
80
  version_requirements: !ruby/object:Gem::Requirement
80
81
  requirements:
81
- - - ! '>='
82
+ - - '>='
82
83
  - !ruby/object:Gem::Version
83
84
  version: '5'
84
85
  - !ruby/object:Gem::Dependency
85
86
  name: mocha
86
87
  requirement: !ruby/object:Gem::Requirement
87
88
  requirements:
88
- - - ! '>='
89
+ - - '>='
89
90
  - !ruby/object:Gem::Version
90
91
  version: '0'
91
92
  type: :development
92
93
  prerelease: false
93
94
  version_requirements: !ruby/object:Gem::Requirement
94
95
  requirements:
95
- - - ! '>='
96
+ - - '>='
96
97
  - !ruby/object:Gem::Version
97
98
  version: '0'
98
99
  description:
99
- email: praj@sailthru.com
100
+ email: gliao@sailthru.com
100
101
  executables: []
101
102
  extensions: []
102
103
  extra_rdoc_files:
@@ -177,17 +178,17 @@ require_paths:
177
178
  - lib
178
179
  required_ruby_version: !ruby/object:Gem::Requirement
179
180
  requirements:
180
- - - ! '>='
181
+ - - '>='
181
182
  - !ruby/object:Gem::Version
182
183
  version: '0'
183
184
  required_rubygems_version: !ruby/object:Gem::Requirement
184
185
  requirements:
185
- - - ! '>='
186
+ - - '>='
186
187
  - !ruby/object:Gem::Version
187
188
  version: '0'
188
189
  requirements: []
189
190
  rubyforge_project:
190
- rubygems_version: 2.2.2
191
+ rubygems_version: 2.0.14
191
192
  signing_key:
192
193
  specification_version: 4
193
194
  summary: A simple client library to remotely access the Sailthru REST API.