zendesk_api 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: .
9
9
  specs:
10
- zendesk_api (1.1.1)
10
+ zendesk_api (1.1.2)
11
11
  faraday (>= 0.8.0)
12
12
  faraday_middleware (>= 0.8.7)
13
13
  hashie (>= 1.2)
@@ -302,6 +302,8 @@ module ZendeskAPI
302
302
  end
303
303
 
304
304
  def _all(start_page = @options["page"], bang = false, &block)
305
+ raise(ArgumentError, "must pass a block") unless block
306
+
305
307
  page(start_page)
306
308
  clear_cache
307
309
 
@@ -1,3 +1,3 @@
1
1
  module ZendeskAPI
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
@@ -239,6 +239,18 @@ describe ZendeskAPI::Collection do
239
239
  [ZendeskAPI::TestResource.new(client, :id => 2), 2]
240
240
  )
241
241
  end
242
+
243
+ it "raises an ArgumentError without a block (all)" do
244
+ expect do |b|
245
+ subject.all
246
+ end.to raise_error(ArgumentError)
247
+ end
248
+
249
+ it "raises an ArgumentError without a block (all!)" do
250
+ expect do |b|
251
+ subject.all!
252
+ end.to raise_error(ArgumentError)
253
+ end
242
254
  end
243
255
 
244
256
  context "successful requests" do
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.1.1
4
+ version: 1.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-10-24 00:00:00.000000000 Z
13
+ date: 2013-10-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bump