ultron 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/README.md +24 -1
- data/lib/ultron/models/entities.rb +2 -0
- data/lib/ultron/version.rb +1 -1
- data/spec/cassettes/exceptions/should_throw_a_Resource_Throttled_Exception_when_we_hit_our_limit.yml +33 -0
- data/spec/cassettes/searching/should_let_us_get_comics_by_a_creator_with_params_.yml +1575 -17
- data/spec/ultron/exceptions_spec.rb +8 -0
- metadata +4 -2
@@ -40,6 +40,14 @@ module Ultron
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
+
it 'should throw a Resource Throttled Exception when we hit our limit', :vcr do
|
44
|
+
begin
|
45
|
+
events = Events.get
|
46
|
+
rescue UltronException => e
|
47
|
+
e.status.should == 'You have exceeded your rate limit. Please try again later'
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
43
51
|
after :each do
|
44
52
|
Timecop.return
|
45
53
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ultron
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pikesley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curb
|
@@ -291,6 +291,7 @@ files:
|
|
291
291
|
- spec/cassettes/exceptions/should_throw_a_404_wrapped_in_a_Marvel_exception_on_a_404.yml
|
292
292
|
- spec/cassettes/exceptions/should_throw_a_No_Idea_What_This_Param_Is_exception.yml
|
293
293
|
- spec/cassettes/exceptions/should_throw_a_Resource_Not_Found_exception_when_we_search_for_something_nonsensical.yml
|
294
|
+
- spec/cassettes/exceptions/should_throw_a_Resource_Throttled_Exception_when_we_hit_our_limit.yml
|
294
295
|
- spec/cassettes/exceptions/should_throw_an_Ultron_exception_when_we_do_something_dumb.yml
|
295
296
|
- spec/cassettes/sample/let_us_pick_a_random_item/should_get_a_count_of_items_for_a_lookup.yml
|
296
297
|
- spec/cassettes/sample/let_us_pick_a_random_item/should_give_us_a_random_comic.yml
|
@@ -357,6 +358,7 @@ test_files:
|
|
357
358
|
- spec/cassettes/exceptions/should_throw_a_404_wrapped_in_a_Marvel_exception_on_a_404.yml
|
358
359
|
- spec/cassettes/exceptions/should_throw_a_No_Idea_What_This_Param_Is_exception.yml
|
359
360
|
- spec/cassettes/exceptions/should_throw_a_Resource_Not_Found_exception_when_we_search_for_something_nonsensical.yml
|
361
|
+
- spec/cassettes/exceptions/should_throw_a_Resource_Throttled_Exception_when_we_hit_our_limit.yml
|
360
362
|
- spec/cassettes/exceptions/should_throw_an_Ultron_exception_when_we_do_something_dumb.yml
|
361
363
|
- spec/cassettes/sample/let_us_pick_a_random_item/should_get_a_count_of_items_for_a_lookup.yml
|
362
364
|
- spec/cassettes/sample/let_us_pick_a_random_item/should_give_us_a_random_comic.yml
|