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 +4 -4
- data/.travis.yml +2 -1
- data/Gemfile +0 -1
- data/Gemfile.lock +5 -11
- data/lib/zendesk_api/middleware/request/upload.rb +1 -1
- data/lib/zendesk_api/resources.rb +4 -0
- data/lib/zendesk_api/version.rb +1 -1
- data/spec/core/client_spec.rb +1 -0
- data/spec/core/middleware/request/upload_spec.rb +12 -7
- data/zendesk_api.gemspec +3 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d8919d87724c64c07d0166ff2f172e6f7d9a295
|
4
|
+
data.tar.gz: a330cb0fd9a7eefbadbbaed1e2d9a72259784c57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f7282b33e2cdd913a3a26cc0f233bfbaf7f70bfa9c11eec9a93b4ace46dd81cd07a65eb523e56dd822f2e2c6b1b4b83a7693181dc6c24298c178cd3b27e82d8
|
7
|
+
data.tar.gz: 1994bfe7e2733195335d42c7722e3bbf204f4659660274767ae89eb415e1ee275487ed53e2cef23c04b9fed4c03b491397aaaaa9d2e7de35706003c116e10435
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
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.
|
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.
|
53
|
-
multipart-post (~> 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
|
data/lib/zendesk_api/version.rb
CHANGED
data/spec/core/client_spec.rb
CHANGED
@@ -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
|
-
|
78
|
-
|
79
|
-
|
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
|
-
#
|
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.
|
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-
|
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: '
|
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: '
|
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:
|