capgun 0.1.1 → 0.1.2
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 +7 -0
 - data/Gemfile.lock +4 -4
 - data/HISTORY.md +4 -0
 - data/capgun.gemspec +1 -1
 - data/lib/capgun/version.rb +1 -1
 - data/spec/capgun/client_spec.rb +13 -13
 - data/spec/capgun/config_spec.rb +1 -1
 - data/spec/capgun/version_spec.rb +1 -1
 - data/spec/faraday/response_spec.rb +3 -3
 - metadata +23 -49
 
    
        checksums.yaml
    ADDED
    
    | 
         @@ -0,0 +1,7 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            SHA1:
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 82e106ab5dc96fbf729c5fb2be0085182453ba08
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 7fcd3e5c56d578f657955b1db15479be4d2b49d0
         
     | 
| 
      
 5 
     | 
    
         
            +
            SHA512:
         
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 6ccf5ce211216c28371ee2693fe1cd839a10c4c65a7409da35b1a5118840f26212d39b7fbdda599e8aa8112ae2a3261bf7f493331683a8fc799e40c633b4f1d3
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: db3a2ea709c339c7314b72aadecdaa29439739b45893427851b76b6a7b89746144ca3a20af4c31e495b3b62839f24e55f3d5f878a4daaeca9a0798dd0b616b6c
         
     | 
    
        data/Gemfile.lock
    CHANGED
    
    | 
         @@ -1,10 +1,10 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            PATH
         
     | 
| 
       2 
2 
     | 
    
         
             
              remote: .
         
     | 
| 
       3 
3 
     | 
    
         
             
              specs:
         
     | 
| 
       4 
     | 
    
         
            -
                capgun (0.1. 
     | 
| 
      
 4 
     | 
    
         
            +
                capgun (0.1.2)
         
     | 
| 
       5 
5 
     | 
    
         
             
                  activesupport (>= 2.3.9, < 4)
         
     | 
| 
       6 
6 
     | 
    
         
             
                  faraday (~> 0.8)
         
     | 
| 
       7 
     | 
    
         
            -
                  json 
     | 
| 
      
 7 
     | 
    
         
            +
                  json
         
     | 
| 
       8 
8 
     | 
    
         
             
                  multi_json (~> 1.3)
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
            GEM
         
     | 
| 
         @@ -19,7 +19,7 @@ GEM 
     | 
|
| 
       19 
19 
     | 
    
         
             
                faraday (0.8.7)
         
     | 
| 
       20 
20 
     | 
    
         
             
                  multipart-post (~> 1.1)
         
     | 
| 
       21 
21 
     | 
    
         
             
                i18n (0.6.1)
         
     | 
| 
       22 
     | 
    
         
            -
                json (1. 
     | 
| 
      
 22 
     | 
    
         
            +
                json (1.8.0)
         
     | 
| 
       23 
23 
     | 
    
         
             
                multi_json (1.3.5)
         
     | 
| 
       24 
24 
     | 
    
         
             
                multipart-post (1.2.0)
         
     | 
| 
       25 
25 
     | 
    
         
             
                rake (0.9.2.2)
         
     | 
| 
         @@ -38,7 +38,7 @@ GEM 
     | 
|
| 
       38 
38 
     | 
    
         
             
                webmock (1.8.7)
         
     | 
| 
       39 
39 
     | 
    
         
             
                  addressable (>= 2.2.7)
         
     | 
| 
       40 
40 
     | 
    
         
             
                  crack (>= 0.1.7)
         
     | 
| 
       41 
     | 
    
         
            -
                yard (0.8.1)
         
     | 
| 
      
 41 
     | 
    
         
            +
                yard (0.8.6.1)
         
     | 
| 
       42 
42 
     | 
    
         | 
| 
       43 
43 
     | 
    
         
             
            PLATFORMS
         
     | 
| 
       44 
44 
     | 
    
         
             
              ruby
         
     | 
    
        data/HISTORY.md
    CHANGED
    
    | 
         @@ -1,6 +1,10 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            HISTORY
         
     | 
| 
       2 
2 
     | 
    
         
             
            =======
         
     | 
| 
       3 
3 
     | 
    
         | 
| 
      
 4 
     | 
    
         
            +
            0.1.2 - June 11th, 2013
         
     | 
| 
      
 5 
     | 
    
         
            +
            --------------------------------------------------------------------------------
         
     | 
| 
      
 6 
     | 
    
         
            +
            * loosen capgun deps on json gem
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
       4 
8 
     | 
    
         
             
            0.1.1 - May 24th, 2013
         
     | 
| 
       5 
9 
     | 
    
         
             
            --------------------------------------------------------------------------------
         
     | 
| 
       6 
10 
     | 
    
         
             
            * clean up
         
     | 
    
        data/capgun.gemspec
    CHANGED
    
    | 
         @@ -5,7 +5,7 @@ Gem::Specification.new do |gem| 
     | 
|
| 
       5 
5 
     | 
    
         | 
| 
       6 
6 
     | 
    
         
             
              gem.add_dependency 'activesupport', ['>= 2.3.9', '< 4']
         
     | 
| 
       7 
7 
     | 
    
         
             
              gem.add_dependency 'faraday', '~> 0.8'
         
     | 
| 
       8 
     | 
    
         
            -
              gem.add_dependency 'json' 
     | 
| 
      
 8 
     | 
    
         
            +
              gem.add_dependency 'json'
         
     | 
| 
       9 
9 
     | 
    
         
             
              gem.add_dependency 'multi_json', '~> 1.3'
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
       11 
11 
     | 
    
         
             
              gem.add_development_dependency "rake"
         
     | 
    
        data/lib/capgun/version.rb
    CHANGED
    
    
    
        data/spec/capgun/client_spec.rb
    CHANGED
    
    | 
         @@ -11,7 +11,7 @@ describe Capgun::Client do 
     | 
|
| 
       11 
11 
     | 
    
         
             
                specify "not allowed to get estimates without authorization" do
         
     | 
| 
       12 
12 
     | 
    
         
             
                  stub_request(:post, "https://api.capgun.io/v1/orders/estimate.json").
         
     | 
| 
       13 
13 
     | 
    
         
             
                    with(:body => "{\"url\":\"http://example.com/test\"}",
         
     | 
| 
       14 
     | 
    
         
            -
                         :headers => {'Accept'=>'application/json', 'Authorization'=>'', 'User-Agent'=>'Capgun.io Ruby Gem 0.1. 
     | 
| 
      
 14 
     | 
    
         
            +
                         :headers => {'Accept'=>'application/json', 'Authorization'=>'', 'User-Agent'=>'Capgun.io Ruby Gem 0.1.2'}).
         
     | 
| 
       15 
15 
     | 
    
         
             
                    to_return(:status => 401, :body => fixture("unauthorized.json"), :headers => {})
         
     | 
| 
       16 
16 
     | 
    
         | 
| 
       17 
17 
     | 
    
         
             
                  lambda { Capgun.estimate("http://example.com/test") }.should raise_error(Capgun::Error::Unauthorized, "Unauthorized")
         
     | 
| 
         @@ -20,7 +20,7 @@ describe Capgun::Client do 
     | 
|
| 
       20 
20 
     | 
    
         
             
                specify "no urls are submitted for capture" do
         
     | 
| 
       21 
21 
     | 
    
         
             
                  stub_request(:post, "https://api.capgun.io/v1/orders.json").
         
     | 
| 
       22 
22 
     | 
    
         
             
                    with(:body => "{\"url\":\"http://example.com/test\"}",
         
     | 
| 
       23 
     | 
    
         
            -
                         :headers => {'Accept'=>'application/json', 'Authorization'=>'', 'User-Agent'=>'Capgun.io Ruby Gem 0.1. 
     | 
| 
      
 23 
     | 
    
         
            +
                         :headers => {'Accept'=>'application/json', 'Authorization'=>'', 'User-Agent'=>'Capgun.io Ruby Gem 0.1.2'}).
         
     | 
| 
       24 
24 
     | 
    
         
             
                    to_return(:status => 401, :body => fixture("unauthorized.json"), :headers => {})
         
     | 
| 
       25 
25 
     | 
    
         | 
| 
       26 
26 
     | 
    
         
             
                  lambda { Capgun.capture("http://example.com/test") }.should raise_error(Capgun::Error::Unauthorized, "Unauthorized")
         
     | 
| 
         @@ -28,7 +28,7 @@ describe Capgun::Client do 
     | 
|
| 
       28 
28 
     | 
    
         | 
| 
       29 
29 
     | 
    
         
             
                specify "not allowed to view on order without authorization" do
         
     | 
| 
       30 
30 
     | 
    
         
             
                  stub_request(:get, "https://api.capgun.io/v1/orders/4fd20a1288f560177600000a.json").
         
     | 
| 
       31 
     | 
    
         
            -
                    with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'', 'User-Agent'=>'Capgun.io Ruby Gem 0.1. 
     | 
| 
      
 31 
     | 
    
         
            +
                    with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'', 'User-Agent'=>'Capgun.io Ruby Gem 0.1.2'}).
         
     | 
| 
       32 
32 
     | 
    
         
             
                    to_return(:status => 401, :body => fixture("unauthorized.json"), :headers => {})
         
     | 
| 
       33 
33 
     | 
    
         | 
| 
       34 
34 
     | 
    
         
             
                  lambda { Capgun.order("4fd20a1288f560177600000a") }.should raise_error(Capgun::Error::Unauthorized, "Unauthorized")
         
     | 
| 
         @@ -36,7 +36,7 @@ describe Capgun::Client do 
     | 
|
| 
       36 
36 
     | 
    
         | 
| 
       37 
37 
     | 
    
         
             
                specify "not allowed to view job status without authorization" do
         
     | 
| 
       38 
38 
     | 
    
         
             
                  stub_request(:get, "https://api.capgun.io/v1/jobs/4fd20a1288f5601776000012.json").
         
     | 
| 
       39 
     | 
    
         
            -
                    with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'', 'User-Agent'=>'Capgun.io Ruby Gem 0.1. 
     | 
| 
      
 39 
     | 
    
         
            +
                    with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'', 'User-Agent'=>'Capgun.io Ruby Gem 0.1.2'}).
         
     | 
| 
       40 
40 
     | 
    
         
             
                    to_return(:status => 401, :body => fixture('unauthorized.json'), :headers => {})
         
     | 
| 
       41 
41 
     | 
    
         | 
| 
       42 
42 
     | 
    
         
             
                  lambda { Capgun.status("4fd20a1288f5601776000012") }.should raise_error(Capgun::Error::Unauthorized, "Unauthorized")
         
     | 
| 
         @@ -44,7 +44,7 @@ describe Capgun::Client do 
     | 
|
| 
       44 
44 
     | 
    
         | 
| 
       45 
45 
     | 
    
         
             
                specify "not allowed to view account" do
         
     | 
| 
       46 
46 
     | 
    
         
             
                  stub_request(:get, "https://api.capgun.io/v1/account.json").
         
     | 
| 
       47 
     | 
    
         
            -
                    with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'', 'User-Agent'=>'Capgun.io Ruby Gem 0.1. 
     | 
| 
      
 47 
     | 
    
         
            +
                    with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'', 'User-Agent'=>'Capgun.io Ruby Gem 0.1.2'}).
         
     | 
| 
       48 
48 
     | 
    
         
             
                    to_return(:status => 401, :body => fixture('unauthorized.json'), :headers => {})
         
     | 
| 
       49 
49 
     | 
    
         | 
| 
       50 
50 
     | 
    
         
             
                  lambda { Capgun.account }.should raise_error(Capgun::Error::Unauthorized, "Unauthorized")
         
     | 
| 
         @@ -67,7 +67,7 @@ describe Capgun::Client do 
     | 
|
| 
       67 
67 
     | 
    
         
             
                specify "get an estimate to capture a url" do
         
     | 
| 
       68 
68 
     | 
    
         
             
                  stub_request(:post, "https://api.capgun.io/v1/orders/estimate.json").
         
     | 
| 
       69 
69 
     | 
    
         
             
                    with(:body => "{\"url\":\"http://example.com/test\"}",
         
     | 
| 
       70 
     | 
    
         
            -
                         :headers => {'Accept'=>'application/json', 'Authorization'=>'test', 'User-Agent'=>'Capgun.io Ruby Gem 0.1. 
     | 
| 
      
 70 
     | 
    
         
            +
                         :headers => {'Accept'=>'application/json', 'Authorization'=>'test', 'User-Agent'=>'Capgun.io Ruby Gem 0.1.2'}).
         
     | 
| 
       71 
71 
     | 
    
         
             
                    to_return(:status => 200, :body => fixture("estimate.json"), :headers => {})
         
     | 
| 
       72 
72 
     | 
    
         | 
| 
       73 
73 
     | 
    
         
             
                  estimate = Capgun.estimate("http://example.com/test")
         
     | 
| 
         @@ -77,7 +77,7 @@ describe Capgun::Client do 
     | 
|
| 
       77 
77 
     | 
    
         
             
                specify "estimate with options in a block" do
         
     | 
| 
       78 
78 
     | 
    
         
             
                  stub_request(:post, "https://api.capgun.io/v1/orders/estimate.json").
         
     | 
| 
       79 
79 
     | 
    
         
             
                    with(:body => '{"viewport":"1024x2048","packages":["images","viewport"],"url":"http://example.com/test"}',
         
     | 
| 
       80 
     | 
    
         
            -
                         :headers => {'Accept'=>'application/json', 'Authorization'=>'test', 'User-Agent'=>'Capgun.io Ruby Gem 0.1. 
     | 
| 
      
 80 
     | 
    
         
            +
                         :headers => {'Accept'=>'application/json', 'Authorization'=>'test', 'User-Agent'=>'Capgun.io Ruby Gem 0.1.2'}).
         
     | 
| 
       81 
81 
     | 
    
         
             
                    to_return(:status => 200, :body => fixture("estimate-with-options.json"), :headers => {})
         
     | 
| 
       82 
82 
     | 
    
         | 
| 
       83 
83 
     | 
    
         
             
                  estimate = Capgun.estimate("http://example.com/test", :viewport => "200x100") do |options|
         
     | 
| 
         @@ -90,7 +90,7 @@ describe Capgun::Client do 
     | 
|
| 
       90 
90 
     | 
    
         
             
                specify "urls are submitted for capture" do
         
     | 
| 
       91 
91 
     | 
    
         
             
                  stub_request(:post, "https://api.capgun.io/v1/orders.json").
         
     | 
| 
       92 
92 
     | 
    
         
             
                    with(:body => "{\"url\":\"http://example.com/test\"}",
         
     | 
| 
       93 
     | 
    
         
            -
                         :headers => {'Accept'=>'application/json', 'Authorization'=>'test', 'User-Agent'=>'Capgun.io Ruby Gem 0.1. 
     | 
| 
      
 93 
     | 
    
         
            +
                         :headers => {'Accept'=>'application/json', 'Authorization'=>'test', 'User-Agent'=>'Capgun.io Ruby Gem 0.1.2'}).
         
     | 
| 
       94 
94 
     | 
    
         
             
                    to_return(:status => 200, :body => fixture("order.json"), :headers => {})
         
     | 
| 
       95 
95 
     | 
    
         | 
| 
       96 
96 
     | 
    
         
             
                  order = Capgun.capture("http://example.com/test")
         
     | 
| 
         @@ -101,7 +101,7 @@ describe Capgun::Client do 
     | 
|
| 
       101 
101 
     | 
    
         
             
                specify "capture with options can be in a block" do
         
     | 
| 
       102 
102 
     | 
    
         
             
                  stub_request(:post, "https://api.capgun.io/v1/orders.json").
         
     | 
| 
       103 
103 
     | 
    
         
             
                    with(:body => '{"packages":["images","viewport"],"viewport":"1024x2048","url":"http://example.com/test"}',
         
     | 
| 
       104 
     | 
    
         
            -
                         :headers => {'Accept'=>'application/json', 'Authorization'=>'test', 'User-Agent'=>'Capgun.io Ruby Gem 0.1. 
     | 
| 
      
 104 
     | 
    
         
            +
                         :headers => {'Accept'=>'application/json', 'Authorization'=>'test', 'User-Agent'=>'Capgun.io Ruby Gem 0.1.2'}).
         
     | 
| 
       105 
105 
     | 
    
         
             
                    to_return(:status => 200, :body => fixture("order-with-options.json"), :headers => {})
         
     | 
| 
       106 
106 
     | 
    
         | 
| 
       107 
107 
     | 
    
         
             
                  order = Capgun.capture("http://example.com/test", :packages => [ :images, :viewport ], :viewport => "1024x2048")
         
     | 
| 
         @@ -114,7 +114,7 @@ describe Capgun::Client do 
     | 
|
| 
       114 
114 
     | 
    
         
             
                specify "capture with options can be in a block" do
         
     | 
| 
       115 
115 
     | 
    
         
             
                  stub_request(:post, "https://api.capgun.io/v1/orders.json").
         
     | 
| 
       116 
116 
     | 
    
         
             
                    with(:body => '{"viewport":"1024x2048","packages":["images","viewport"],"url":"http://example.com/test"}',
         
     | 
| 
       117 
     | 
    
         
            -
                         :headers => {'Accept'=>'application/json', 'Authorization'=>'test', 'User-Agent'=>'Capgun.io Ruby Gem 0.1. 
     | 
| 
      
 117 
     | 
    
         
            +
                         :headers => {'Accept'=>'application/json', 'Authorization'=>'test', 'User-Agent'=>'Capgun.io Ruby Gem 0.1.2'}).
         
     | 
| 
       118 
118 
     | 
    
         
             
                    to_return(:status => 200, :body => fixture("order-with-options.json"), :headers => {})
         
     | 
| 
       119 
119 
     | 
    
         | 
| 
       120 
120 
     | 
    
         
             
                  order = Capgun.capture("http://example.com/test", :viewport => "200x100") do |options|
         
     | 
| 
         @@ -129,7 +129,7 @@ describe Capgun::Client do 
     | 
|
| 
       129 
129 
     | 
    
         | 
| 
       130 
130 
     | 
    
         
             
                specify "showing a capture order" do
         
     | 
| 
       131 
131 
     | 
    
         
             
                  stub_request(:get, "https://api.capgun.io/v1/orders/4fd20a1288f560177600000a.json").
         
     | 
| 
       132 
     | 
    
         
            -
                    with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'test', 'User-Agent'=>'Capgun.io Ruby Gem 0.1. 
     | 
| 
      
 132 
     | 
    
         
            +
                    with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'test', 'User-Agent'=>'Capgun.io Ruby Gem 0.1.2'}).
         
     | 
| 
       133 
133 
     | 
    
         
             
                    to_return(:status => 200, :body => fixture("order.json"), :headers => {})
         
     | 
| 
       134 
134 
     | 
    
         | 
| 
       135 
135 
     | 
    
         
             
                  order = Capgun.order("4fd20a1288f560177600000a")
         
     | 
| 
         @@ -139,7 +139,7 @@ describe Capgun::Client do 
     | 
|
| 
       139 
139 
     | 
    
         | 
| 
       140 
140 
     | 
    
         
             
                specify "capture jobs have a status" do
         
     | 
| 
       141 
141 
     | 
    
         
             
                  stub_request(:get, "https://api.capgun.io/v1/jobs/4fd20a1288f5601776000012.json").
         
     | 
| 
       142 
     | 
    
         
            -
                    with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'test', 'User-Agent'=>'Capgun.io Ruby Gem 0.1. 
     | 
| 
      
 142 
     | 
    
         
            +
                    with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'test', 'User-Agent'=>'Capgun.io Ruby Gem 0.1.2'}).
         
     | 
| 
       143 
143 
     | 
    
         
             
                    to_return(:status => 200, :body => fixture('job.json'), :headers => {})
         
     | 
| 
       144 
144 
     | 
    
         | 
| 
       145 
145 
     | 
    
         | 
| 
         @@ -150,7 +150,7 @@ describe Capgun::Client do 
     | 
|
| 
       150 
150 
     | 
    
         | 
| 
       151 
151 
     | 
    
         
             
                specify "account can be retrieved" do
         
     | 
| 
       152 
152 
     | 
    
         
             
                  stub_request(:get, "https://api.capgun.io/v1/account.json").
         
     | 
| 
       153 
     | 
    
         
            -
                    with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'test', 'User-Agent'=>'Capgun.io Ruby Gem 0.1. 
     | 
| 
      
 153 
     | 
    
         
            +
                    with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'test', 'User-Agent'=>'Capgun.io Ruby Gem 0.1.2'}).
         
     | 
| 
       154 
154 
     | 
    
         
             
                    to_return(:status => 200, :body => fixture('account.json'), :headers => {})
         
     | 
| 
       155 
155 
     | 
    
         | 
| 
       156 
156 
     | 
    
         
             
                  account = Capgun.account
         
     | 
    
        data/spec/capgun/config_spec.rb
    CHANGED
    
    
    
        data/spec/capgun/version_spec.rb
    CHANGED
    
    
| 
         @@ -19,7 +19,7 @@ describe Faraday::Response do 
     | 
|
| 
       19 
19 
     | 
    
         
             
                  context "when HTTP status is #{status}" do
         
     | 
| 
       20 
20 
     | 
    
         
             
                    before do
         
     | 
| 
       21 
21 
     | 
    
         
             
                      stub_request(:get, "https://api.capgun.io/v1/jobs/abc123.json").
         
     | 
| 
       22 
     | 
    
         
            -
                        with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'', 'User-Agent'=>'Capgun.io Ruby Gem 0.1. 
     | 
| 
      
 22 
     | 
    
         
            +
                        with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'', 'User-Agent'=>'Capgun.io Ruby Gem 0.1.2'}).
         
     | 
| 
       23 
23 
     | 
    
         
             
                        to_return(:status => status, :body => "", :headers => {})
         
     | 
| 
       24 
24 
     | 
    
         
             
                    end
         
     | 
| 
       25 
25 
     | 
    
         | 
| 
         @@ -35,7 +35,7 @@ describe Faraday::Response do 
     | 
|
| 
       35 
35 
     | 
    
         
             
                      before do
         
     | 
| 
       36 
36 
     | 
    
         
             
                        body_message = '{"'+body+'":"test"}' unless body.nil?
         
     | 
| 
       37 
37 
     | 
    
         
             
                        stub_request(:get, "https://api.capgun.io/v1/jobs/abc123.json").
         
     | 
| 
       38 
     | 
    
         
            -
                          with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'', 'User-Agent'=>'Capgun.io Ruby Gem 0.1. 
     | 
| 
      
 38 
     | 
    
         
            +
                          with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'', 'User-Agent'=>'Capgun.io Ruby Gem 0.1.2'}).
         
     | 
| 
       39 
39 
     | 
    
         
             
                          to_return(:status => status, :body => body_message, :headers => {})
         
     | 
| 
       40 
40 
     | 
    
         
             
                      end
         
     | 
| 
       41 
41 
     | 
    
         | 
| 
         @@ -54,7 +54,7 @@ describe Faraday::Response do 
     | 
|
| 
       54 
54 
     | 
    
         
             
                before do
         
     | 
| 
       55 
55 
     | 
    
         | 
| 
       56 
56 
     | 
    
         
             
                  stub_request(:get, "https://api.capgun.io/v1/jobs/abc123.json").
         
     | 
| 
       57 
     | 
    
         
            -
                    with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'', 'User-Agent'=>'Capgun.io Ruby Gem 0.1. 
     | 
| 
      
 57 
     | 
    
         
            +
                    with(:headers => {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'', 'User-Agent'=>'Capgun.io Ruby Gem 0.1.2'}).
         
     | 
| 
       58 
58 
     | 
    
         
             
                    to_return(:status => 404, :body => fixture('notfound.json'), :headers => {})
         
     | 
| 
       59 
59 
     | 
    
         
             
                end
         
     | 
| 
       60 
60 
     | 
    
         | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,22 +1,20 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: capgun
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.1. 
     | 
| 
       5 
     | 
    
         
            -
              prerelease: 
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.2
         
     | 
| 
       6 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       7 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       8 
7 
     | 
    
         
             
            - Mike Mondragon
         
     | 
| 
       9 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2013- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2013-06-12 00:00:00.000000000 Z
         
     | 
| 
       13 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
14 
     | 
    
         
             
              name: activesupport
         
     | 
| 
       16 
15 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       17 
     | 
    
         
            -
                none: false
         
     | 
| 
       18 
16 
     | 
    
         
             
                requirements:
         
     | 
| 
       19 
     | 
    
         
            -
                - -  
     | 
| 
      
 17 
     | 
    
         
            +
                - - '>='
         
     | 
| 
       20 
18 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       21 
19 
     | 
    
         
             
                    version: 2.3.9
         
     | 
| 
       22 
20 
     | 
    
         
             
                - - <
         
     | 
| 
         @@ -25,9 +23,8 @@ dependencies: 
     | 
|
| 
       25 
23 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       26 
24 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       27 
25 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       28 
     | 
    
         
            -
                none: false
         
     | 
| 
       29 
26 
     | 
    
         
             
                requirements:
         
     | 
| 
       30 
     | 
    
         
            -
                - -  
     | 
| 
      
 27 
     | 
    
         
            +
                - - '>='
         
     | 
| 
       31 
28 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       32 
29 
     | 
    
         
             
                    version: 2.3.9
         
     | 
| 
       33 
30 
     | 
    
         
             
                - - <
         
     | 
| 
         @@ -36,7 +33,6 @@ dependencies: 
     | 
|
| 
       36 
33 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       37 
34 
     | 
    
         
             
              name: faraday
         
     | 
| 
       38 
35 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       39 
     | 
    
         
            -
                none: false
         
     | 
| 
       40 
36 
     | 
    
         
             
                requirements:
         
     | 
| 
       41 
37 
     | 
    
         
             
                - - ~>
         
     | 
| 
       42 
38 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
         @@ -44,7 +40,6 @@ dependencies: 
     | 
|
| 
       44 
40 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       45 
41 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       46 
42 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       47 
     | 
    
         
            -
                none: false
         
     | 
| 
       48 
43 
     | 
    
         
             
                requirements:
         
     | 
| 
       49 
44 
     | 
    
         
             
                - - ~>
         
     | 
| 
       50 
45 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
         @@ -52,23 +47,20 @@ dependencies: 
     | 
|
| 
       52 
47 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       53 
48 
     | 
    
         
             
              name: json
         
     | 
| 
       54 
49 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       55 
     | 
    
         
            -
                none: false
         
     | 
| 
       56 
50 
     | 
    
         
             
                requirements:
         
     | 
| 
       57 
     | 
    
         
            -
                - -  
     | 
| 
      
 51 
     | 
    
         
            +
                - - '>='
         
     | 
| 
       58 
52 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       59 
     | 
    
         
            -
                    version:  
     | 
| 
      
 53 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       60 
54 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       61 
55 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       62 
56 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       63 
     | 
    
         
            -
                none: false
         
     | 
| 
       64 
57 
     | 
    
         
             
                requirements:
         
     | 
| 
       65 
     | 
    
         
            -
                - -  
     | 
| 
      
 58 
     | 
    
         
            +
                - - '>='
         
     | 
| 
       66 
59 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       67 
     | 
    
         
            -
                    version:  
     | 
| 
      
 60 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       68 
61 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       69 
62 
     | 
    
         
             
              name: multi_json
         
     | 
| 
       70 
63 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       71 
     | 
    
         
            -
                none: false
         
     | 
| 
       72 
64 
     | 
    
         
             
                requirements:
         
     | 
| 
       73 
65 
     | 
    
         
             
                - - ~>
         
     | 
| 
       74 
66 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
         @@ -76,7 +68,6 @@ dependencies: 
     | 
|
| 
       76 
68 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       77 
69 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       78 
70 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       79 
     | 
    
         
            -
                none: false
         
     | 
| 
       80 
71 
     | 
    
         
             
                requirements:
         
     | 
| 
       81 
72 
     | 
    
         
             
                - - ~>
         
     | 
| 
       82 
73 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
         @@ -84,81 +75,71 @@ dependencies: 
     | 
|
| 
       84 
75 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       85 
76 
     | 
    
         
             
              name: rake
         
     | 
| 
       86 
77 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       87 
     | 
    
         
            -
                none: false
         
     | 
| 
       88 
78 
     | 
    
         
             
                requirements:
         
     | 
| 
       89 
     | 
    
         
            -
                - -  
     | 
| 
      
 79 
     | 
    
         
            +
                - - '>='
         
     | 
| 
       90 
80 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       91 
81 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       92 
82 
     | 
    
         
             
              type: :development
         
     | 
| 
       93 
83 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       94 
84 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       95 
     | 
    
         
            -
                none: false
         
     | 
| 
       96 
85 
     | 
    
         
             
                requirements:
         
     | 
| 
       97 
     | 
    
         
            -
                - -  
     | 
| 
      
 86 
     | 
    
         
            +
                - - '>='
         
     | 
| 
       98 
87 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       99 
88 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       100 
89 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       101 
90 
     | 
    
         
             
              name: rspec
         
     | 
| 
       102 
91 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       103 
     | 
    
         
            -
                none: false
         
     | 
| 
       104 
92 
     | 
    
         
             
                requirements:
         
     | 
| 
       105 
     | 
    
         
            -
                - -  
     | 
| 
      
 93 
     | 
    
         
            +
                - - '>='
         
     | 
| 
       106 
94 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       107 
95 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       108 
96 
     | 
    
         
             
              type: :development
         
     | 
| 
       109 
97 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       110 
98 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       111 
     | 
    
         
            -
                none: false
         
     | 
| 
       112 
99 
     | 
    
         
             
                requirements:
         
     | 
| 
       113 
     | 
    
         
            -
                - -  
     | 
| 
      
 100 
     | 
    
         
            +
                - - '>='
         
     | 
| 
       114 
101 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       115 
102 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       116 
103 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       117 
104 
     | 
    
         
             
              name: simplecov
         
     | 
| 
       118 
105 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       119 
     | 
    
         
            -
                none: false
         
     | 
| 
       120 
106 
     | 
    
         
             
                requirements:
         
     | 
| 
       121 
     | 
    
         
            -
                - -  
     | 
| 
      
 107 
     | 
    
         
            +
                - - '>='
         
     | 
| 
       122 
108 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       123 
109 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       124 
110 
     | 
    
         
             
              type: :development
         
     | 
| 
       125 
111 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       126 
112 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       127 
     | 
    
         
            -
                none: false
         
     | 
| 
       128 
113 
     | 
    
         
             
                requirements:
         
     | 
| 
       129 
     | 
    
         
            -
                - -  
     | 
| 
      
 114 
     | 
    
         
            +
                - - '>='
         
     | 
| 
       130 
115 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       131 
116 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       132 
117 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       133 
118 
     | 
    
         
             
              name: webmock
         
     | 
| 
       134 
119 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       135 
     | 
    
         
            -
                none: false
         
     | 
| 
       136 
120 
     | 
    
         
             
                requirements:
         
     | 
| 
       137 
     | 
    
         
            -
                - -  
     | 
| 
      
 121 
     | 
    
         
            +
                - - '>='
         
     | 
| 
       138 
122 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       139 
123 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       140 
124 
     | 
    
         
             
              type: :development
         
     | 
| 
       141 
125 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       142 
126 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       143 
     | 
    
         
            -
                none: false
         
     | 
| 
       144 
127 
     | 
    
         
             
                requirements:
         
     | 
| 
       145 
     | 
    
         
            -
                - -  
     | 
| 
      
 128 
     | 
    
         
            +
                - - '>='
         
     | 
| 
       146 
129 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       147 
130 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       148 
131 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       149 
132 
     | 
    
         
             
              name: yard
         
     | 
| 
       150 
133 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       151 
     | 
    
         
            -
                none: false
         
     | 
| 
       152 
134 
     | 
    
         
             
                requirements:
         
     | 
| 
       153 
     | 
    
         
            -
                - -  
     | 
| 
      
 135 
     | 
    
         
            +
                - - '>='
         
     | 
| 
       154 
136 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       155 
137 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       156 
138 
     | 
    
         
             
              type: :development
         
     | 
| 
       157 
139 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       158 
140 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       159 
     | 
    
         
            -
                none: false
         
     | 
| 
       160 
141 
     | 
    
         
             
                requirements:
         
     | 
| 
       161 
     | 
    
         
            -
                - -  
     | 
| 
      
 142 
     | 
    
         
            +
                - - '>='
         
     | 
| 
       162 
143 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       163 
144 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       164 
145 
     | 
    
         
             
            description: Ruby wrapper for the capgun.io web thumb service API
         
     | 
| 
         @@ -228,33 +209,26 @@ files: 
     | 
|
| 
       228 
209 
     | 
    
         
             
            - spec/spec_helper.rb
         
     | 
| 
       229 
210 
     | 
    
         
             
            homepage: http://capgun.io/
         
     | 
| 
       230 
211 
     | 
    
         
             
            licenses: []
         
     | 
| 
      
 212 
     | 
    
         
            +
            metadata: {}
         
     | 
| 
       231 
213 
     | 
    
         
             
            post_install_message: 
         
     | 
| 
       232 
214 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       233 
215 
     | 
    
         
             
            require_paths:
         
     | 
| 
       234 
216 
     | 
    
         
             
            - lib
         
     | 
| 
       235 
217 
     | 
    
         
             
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
       236 
     | 
    
         
            -
              none: false
         
     | 
| 
       237 
218 
     | 
    
         
             
              requirements:
         
     | 
| 
       238 
     | 
    
         
            -
              - -  
     | 
| 
      
 219 
     | 
    
         
            +
              - - '>='
         
     | 
| 
       239 
220 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       240 
221 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       241 
     | 
    
         
            -
                  segments:
         
     | 
| 
       242 
     | 
    
         
            -
                  - 0
         
     | 
| 
       243 
     | 
    
         
            -
                  hash: -3140388304714263018
         
     | 
| 
       244 
222 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       245 
     | 
    
         
            -
              none: false
         
     | 
| 
       246 
223 
     | 
    
         
             
              requirements:
         
     | 
| 
       247 
     | 
    
         
            -
              - -  
     | 
| 
      
 224 
     | 
    
         
            +
              - - '>='
         
     | 
| 
       248 
225 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       249 
226 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       250 
     | 
    
         
            -
                  segments:
         
     | 
| 
       251 
     | 
    
         
            -
                  - 0
         
     | 
| 
       252 
     | 
    
         
            -
                  hash: -3140388304714263018
         
     | 
| 
       253 
227 
     | 
    
         
             
            requirements: []
         
     | 
| 
       254 
228 
     | 
    
         
             
            rubyforge_project: capgun
         
     | 
| 
       255 
     | 
    
         
            -
            rubygems_version:  
     | 
| 
      
 229 
     | 
    
         
            +
            rubygems_version: 2.0.2
         
     | 
| 
       256 
230 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       257 
     | 
    
         
            -
            specification_version:  
     | 
| 
      
 231 
     | 
    
         
            +
            specification_version: 4
         
     | 
| 
       258 
232 
     | 
    
         
             
            summary: capgun.io API wrapper
         
     | 
| 
       259 
233 
     | 
    
         
             
            test_files:
         
     | 
| 
       260 
234 
     | 
    
         
             
            - spec/capgun/account_spec.rb
         
     |