zendesk_api 1.2.3 → 1.2.4
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 +4 -4
- data/.travis.yml +3 -1
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/zendesk_api/collection.rb +1 -1
- data/lib/zendesk_api/resources.rb +1 -1
- data/lib/zendesk_api/version.rb +1 -1
- data/spec/core/collection_spec.rb +21 -2
- data/spec/live/tag_spec.rb +7 -0
- data/zendesk_api.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e08c78d51da14faeccebcd04694a6e70281946a3
|
4
|
+
data.tar.gz: 62b948f0e1abd8f218000bc1715bf21f3e76bd6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 960691a181fa66cfe3fd1ea3859001ec3f13340e93963a962863dd6efaaca24ffff35e0fcf57e936813c8c0006a12e850b40e60dfdf9c498bd9ec0d5cda24a0c
|
7
|
+
data.tar.gz: 589a1292ab9fa3d4064346be770c47c1aa46e90136744ecc1d7212f15e1e15877c9cf1a241d95c0c6668d317d5075d05fa44923d089f6b0310c9b74e14f277aa
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -386,7 +386,7 @@ ZendeskAPI::App::Installation.destroy!(client, :id => 123)
|
|
386
386
|
|
387
387
|
## Supported Ruby Versions
|
388
388
|
|
389
|
-
Tested with Ruby 1.8.7
|
389
|
+
Tested with Ruby 1.8.7, 1.9.3, 2.0.0, 2.1.0, and jRuby.
|
390
390
|
[](http://travis-ci.org/zendesk/zendesk_api_client_rb)
|
391
391
|
|
392
392
|
## Copyright and license
|
data/lib/zendesk_api/version.rb
CHANGED
@@ -391,7 +391,7 @@ describe ZendeskAPI::Collection do
|
|
391
391
|
end
|
392
392
|
|
393
393
|
context "with a hash" do
|
394
|
-
let(:object) { mock('ZendeskAPI::TestResource', :changes => [:xxx], :changed? => true) }
|
394
|
+
let(:object) { mock('ZendeskAPI::TestResource', :changes => [:xxx], :changed? => true, :destroyed? => false) }
|
395
395
|
|
396
396
|
it "should call create with those options" do
|
397
397
|
ZendeskAPI::TestResource.should_receive(:new).
|
@@ -425,7 +425,7 @@ describe ZendeskAPI::Collection do
|
|
425
425
|
|
426
426
|
context "with everything else" do
|
427
427
|
it "should pass to new, since this is how attachment handles it" do
|
428
|
-
attachment = mock(:changes => [:xxx], :changed? => true)
|
428
|
+
attachment = mock(:changes => [:xxx], :changed? => true, :destroyed? => false)
|
429
429
|
ZendeskAPI::TestResource.should_receive(:new).
|
430
430
|
with(client, :id => "img.jpg", :association => instance_of(ZendeskAPI::Association)).
|
431
431
|
and_return attachment
|
@@ -436,6 +436,25 @@ describe ZendeskAPI::Collection do
|
|
436
436
|
subject.save
|
437
437
|
end
|
438
438
|
end
|
439
|
+
|
440
|
+
context "with a destroyed object" do
|
441
|
+
let(:object) { ZendeskAPI::TestResource.new(client, options) }
|
442
|
+
|
443
|
+
before(:each) do
|
444
|
+
subject << object
|
445
|
+
end
|
446
|
+
|
447
|
+
it "should not save object" do
|
448
|
+
object.should_receive(:destroyed?).and_return(true)
|
449
|
+
object.should_not_receive(:save)
|
450
|
+
|
451
|
+
subject.save
|
452
|
+
end
|
453
|
+
|
454
|
+
it "should have object in collection" do
|
455
|
+
subject.should include(object)
|
456
|
+
end
|
457
|
+
end
|
439
458
|
end
|
440
459
|
|
441
460
|
context "without real data" do
|
data/spec/live/tag_spec.rb
CHANGED
@@ -20,6 +20,13 @@ describe ZendeskAPI::Tag, :vcr, :not_findable do
|
|
20
20
|
tags.should == %w{tag3}
|
21
21
|
end
|
22
22
|
|
23
|
+
it "shouldn't re-save destroyed tags" do
|
24
|
+
parent.tags.first.destroy!
|
25
|
+
parent.tags.save!
|
26
|
+
|
27
|
+
tags.should == %w{tag3}
|
28
|
+
end
|
29
|
+
|
23
30
|
it "should be updatable" do
|
24
31
|
parent.tags.update!(:id => "tag4")
|
25
32
|
|
data/zendesk_api.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.homepage = "http://developer.zendesk.com"
|
14
14
|
s.summary = %q{Zendesk REST API Client}
|
15
15
|
s.description = %q{Ruby wrapper for the REST API at http://www.zendesk.com. Documentation at http://developer.zendesk.com.}
|
16
|
-
s.license
|
16
|
+
s.license = 'Apache License Version 2.0'
|
17
17
|
|
18
18
|
s.required_ruby_version = ">= 1.8.7"
|
19
19
|
s.required_rubygems_version = ">= 1.3.6"
|
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.4
|
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-01-
|
12
|
+
date: 2014-01-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bump
|