zendesk_api 1.2.8 → 1.2.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e146239de70d0901e0639c008355d837f8bc03d6
4
- data.tar.gz: 423b3b9ceda7c77bb7a96869d2c1637f413f280f
3
+ metadata.gz: 7d8919d87724c64c07d0166ff2f172e6f7d9a295
4
+ data.tar.gz: a330cb0fd9a7eefbadbbaed1e2d9a72259784c57
5
5
  SHA512:
6
- metadata.gz: bf95b0aeb33d7c20943d6a552d40ef441de14123c39727d838750d70a404a6b79a13c01725c8169b4dbddf86273a0f0670a1b3e37db0dc348db843bd9c6e8468
7
- data.tar.gz: 5d1f6776c38ea889b645a0b8265a57f37dfd429a690bc97875a7bc7e5e73c8d96ac71520a79711614429e8cdc0a0700cd4a9ebe153bdc95bee1010bffbb95b1d
6
+ metadata.gz: 5f7282b33e2cdd913a3a26cc0f233bfbaf7f70bfa9c11eec9a93b4ace46dd81cd07a65eb523e56dd822f2e2c6b1b4b83a7693181dc6c24298c178cd3b27e82d8
7
+ data.tar.gz: 1994bfe7e2733195335d42c7722e3bbf204f4659660274767ae89eb415e1ee275487ed53e2cef23c04b9fed4c03b491397aaaaa9d2e7de35706003c116e10435
data/.travis.yml CHANGED
@@ -2,7 +2,8 @@ rvm:
2
2
  - ree
3
3
  - 1.9.3
4
4
  - 2.0.0
5
- - 2.1.0
5
+ - 2.1.1
6
6
  - jruby
7
7
  bundler_args: --without=server console
8
+ before_install: gem i bundler
8
9
  cache: bundler
data/Gemfile CHANGED
@@ -5,7 +5,6 @@ source 'https://rubygems.org'
5
5
 
6
6
  gem "simplecov", :platforms => :ruby_19, :group => :test
7
7
  gem "jruby-openssl", :platforms => :jruby
8
- gem "multipart-post", :git => "https://github.com/steved555/multipart-post.git"
9
8
 
10
9
  group :server do
11
10
  gem "thin"
data/Gemfile.lock CHANGED
@@ -1,20 +1,14 @@
1
- GIT
2
- remote: https://github.com/steved555/multipart-post.git
3
- revision: 57c66998c05143a684c13694937c8adfd335cae1
4
- specs:
5
- multipart-post (1.1.5)
6
-
7
1
  PATH
8
2
  remote: .
9
3
  specs:
10
- zendesk_api (1.2.8)
4
+ zendesk_api (1.2.9)
11
5
  faraday (~> 0.8.0)
12
6
  faraday_middleware (~> 0.8.7)
13
7
  hashie (>= 1.2)
14
8
  inflection
15
9
  mime-types (~> 1.0)
16
10
  multi_json
17
- multipart-post
11
+ multipart-post (~> 1.1)
18
12
 
19
13
  GEM
20
14
  remote: https://rubygems.org/
@@ -49,8 +43,8 @@ GEM
49
43
  diff-lcs (1.2.4)
50
44
  eventmachine (1.0.3)
51
45
  eventmachine (1.0.3-java)
52
- faraday (0.8.7)
53
- multipart-post (~> 1.1)
46
+ faraday (0.8.9)
47
+ multipart-post (~> 1.2.0)
54
48
  faraday_middleware (0.8.8)
55
49
  faraday (>= 0.7.4, < 0.9)
56
50
  fssm (0.2.10)
@@ -70,6 +64,7 @@ GEM
70
64
  tzinfo (~> 0.3.22)
71
65
  moped (1.5.0)
72
66
  multi_json (1.7.7)
67
+ multipart-post (1.2.0)
73
68
  newrelic_rpm (3.6.4.122)
74
69
  origin (1.1.0)
75
70
  rack (1.5.2)
@@ -134,7 +129,6 @@ DEPENDENCIES
134
129
  jruby-openssl
135
130
  json
136
131
  mongoid
137
- multipart-post!
138
132
  newrelic_rpm
139
133
  rack-ssl-enforcer
140
134
  rake
@@ -58,7 +58,7 @@ module ZendeskAPI
58
58
  File.basename(path)
59
59
  end
60
60
 
61
- hash[:uploaded_data] = Faraday::UploadIO.new(path, mime_type)
61
+ hash[:uploaded_data] = Faraday::UploadIO.new(path, mime_type, hash[:filename])
62
62
  end
63
63
  end
64
64
 
@@ -543,6 +543,10 @@ module ZendeskAPI
543
543
  namespace "channels/voice"
544
544
  end
545
545
 
546
+ class Address < Resource
547
+ namespace "channels/voice"
548
+ end
549
+
546
550
  class Greeting < Resource
547
551
  namespace "channels/voice"
548
552
  end
@@ -1,3 +1,3 @@
1
1
  module ZendeskAPI
2
- VERSION = "1.2.8"
2
+ VERSION = "1.2.9"
3
3
  end
@@ -240,6 +240,7 @@ describe ZendeskAPI::Client do
240
240
  end
241
241
 
242
242
  it "manages namespace correctly" do
243
+ client.addresses.path.should match(/channels\/voice\/addresses/)
243
244
  client.phone_numbers.path.should match(/channels\/voice\/phone_numbers/)
244
245
  client.greetings.path.should match(/channels\/voice\/greetings/)
245
246
  client.greeting_categories.path.should match(/channels\/voice\/greeting_categories/)
@@ -71,16 +71,21 @@ describe ZendeskAPI::Middleware::Request::Upload do
71
71
  end
72
72
 
73
73
  it "should add filename if none exist" do
74
- @env[:body][:filename].should == "hello"
74
+ @env[:body][:filename].should == "hello.jpg"
75
75
  end
76
76
 
77
- context "when path does not resolve a mime_type" do
78
- it "should use the content_type of ActionDispatch::Http::UploadedFile " do
79
- @upload.tempfile.path = "XXX"
80
- @env = subject.call(:body => { :file => @upload })
81
- @env[:body][:uploaded_data][:content_type].should == "image/jpeg"
82
- end
77
+ it "should pass correct filename to Faraday::UploadIO" do
78
+ @env[:body][:filename].should == "hello.jpg"
79
+ @env[:body][:uploaded_data].original_filename.should == @env[:body][:filename]
83
80
  end
81
+
82
+ # context "when path does not resolve a mime_type" do
83
+ # it "should use the content_type of ActionDispatch::Http::UploadedFile " do
84
+ # @upload.tempfile.path = "XXX"
85
+ # @env = subject.call(:body => { :file => @upload })
86
+ # @env[:body][:uploaded_data][:content_type].should == "image/jpeg"
87
+ # end
88
+ # end
84
89
  end
85
90
  end
86
91
 
data/zendesk_api.gemspec CHANGED
@@ -25,8 +25,8 @@ Gem::Specification.new do |s|
25
25
  s.add_development_dependency "webmock", "~> 1.9.0"
26
26
  s.add_development_dependency "yard"
27
27
 
28
- # Optional. Only used for uploads testing.
29
- # s.add_development_dependency "actionpack"
28
+ # Optional. Only used for uploads testing.
29
+ # s.add_development_dependency "actionpack", "~> 3.2.0"
30
30
 
31
31
  s.add_runtime_dependency "faraday", "~> 0.8.0"
32
32
  s.add_runtime_dependency "faraday_middleware", "~> 0.8.7"
@@ -34,7 +34,7 @@ Gem::Specification.new do |s|
34
34
  s.add_runtime_dependency "inflection"
35
35
  s.add_runtime_dependency "multi_json"
36
36
  s.add_runtime_dependency "mime-types", "~> 1.0"
37
- s.add_runtime_dependency "multipart-post"
37
+ s.add_runtime_dependency "multipart-post", "~> 1.1"
38
38
 
39
39
  s.files = `git ls-files -x Gemfile.lock`.split("\n") rescue ''
40
40
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zendesk_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.8
4
+ version: 1.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Davidovitz
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-22 00:00:00.000000000 Z
12
+ date: 2014-05-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bump
@@ -183,16 +183,16 @@ dependencies:
183
183
  name: multipart-post
184
184
  requirement: !ruby/object:Gem::Requirement
185
185
  requirements:
186
- - - ">="
186
+ - - "~>"
187
187
  - !ruby/object:Gem::Version
188
- version: '0'
188
+ version: '1.1'
189
189
  type: :runtime
190
190
  prerelease: false
191
191
  version_requirements: !ruby/object:Gem::Requirement
192
192
  requirements:
193
- - - ">="
193
+ - - "~>"
194
194
  - !ruby/object:Gem::Version
195
- version: '0'
195
+ version: '1.1'
196
196
  description: Ruby wrapper for the REST API at http://www.zendesk.com. Documentation
197
197
  at http://developer.zendesk.com.
198
198
  email: