bitly_quickly 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e67efff2c50fdd060829833683d1a6c5ac27cd0
4
- data.tar.gz: 142fe6f00a88cae85c77eab9da6b1a3b4d5dd759
3
+ metadata.gz: 63dd1b93398c8f64dfedb5fd187f74257d4b612d
4
+ data.tar.gz: 544f7bd45d92e35caaa34f859e20f198497a9b8c
5
5
  SHA512:
6
- metadata.gz: 0df43a8e345ad56d5a559b3e346f7b82ddfdf7c60a7c89d9879fa5048d20034caf2cdfb3f51a8491e294be9ab7fc33d0deb9955d0761a8688bf175fc0ae2c70d
7
- data.tar.gz: 05f8ec93196e05bac5a646e226364a4f259c2fa95e897eb90e216aef53927156c5fdeac76d039776732cbe68353b22cc7f8a4d27fb13902af9418149ef7e288b
6
+ metadata.gz: 71141e4ae5b260e34aedd4f64caa75c374760a987d42d34c363ce229b7a303eccbae4bab153775eca41fda47b0acf89700cc56ce3da72242dbed87932a171f39
7
+ data.tar.gz: 87b4d282ffe2bf6aa10da60ee922a0f0403ac7fec294e59667add7c98a10b90c1115efbdac9ab60b1bcf03519d86e5d1cdfbb6431fa0c93d31da26d51fa53a8e
@@ -1,3 +1,3 @@
1
1
  class BitlyQuickly
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
data/lib/bitly_quickly.rb CHANGED
@@ -6,10 +6,10 @@ require 'bitly_quickly/version'
6
6
  # V3 Wrapper
7
7
  class BitlyQuickly
8
8
  class BitlyError < StandardError; end
9
- class RateLimitExceededError < BitlyError; end
10
- class TemporarilyUnavailableError < BitlyError; end
11
- class NotFoundError < BitlyError; end
12
- class InvalidRequestOrResponseError < BitlyError; end
9
+ class RateLimitExceededError < BitlyError; end # 403
10
+ class TemporarilyUnavailableError < BitlyError; end # 503
11
+ class NotFoundError < BitlyError; end # 404
12
+ class InvalidRequestOrResponseError < BitlyError; end # 500
13
13
  class UnknownError < BitlyError; end
14
14
 
15
15
  DEFAULT_API_ADDRESS = 'https://api-ssl.bitly.com'
@@ -93,7 +93,7 @@ describe BitlyQuickly do
93
93
  end
94
94
 
95
95
  it 'raises an execption' do
96
- expect { @client.shorten('http://example.org/403') }.to raise_error
96
+ expect { @client.shorten('http://example.org/403') }.to raise_error(BitlyQuickly::RateLimitExceededError)
97
97
  end
98
98
  end
99
99
 
@@ -103,7 +103,7 @@ describe BitlyQuickly do
103
103
  end
104
104
 
105
105
  it 'raises an execption' do
106
- expect { @client.shorten('http://example.org/503') }.to raise_error
106
+ expect { @client.shorten('http://example.org/503') }.to raise_error(BitlyQuickly::TemporarilyUnavailableError)
107
107
  end
108
108
  end
109
109
 
@@ -113,7 +113,7 @@ describe BitlyQuickly do
113
113
  end
114
114
 
115
115
  it 'raises an execption' do
116
- expect { @client.shorten('http://example.org/404') }.to raise_error
116
+ expect { @client.shorten('http://example.org/404') }.to raise_error(BitlyQuickly::NotFoundError)
117
117
  end
118
118
  end
119
119
 
@@ -123,7 +123,7 @@ describe BitlyQuickly do
123
123
  end
124
124
 
125
125
  it 'raises an execption' do
126
- expect { @client.shorten('http://example.org/500') }.to raise_error
126
+ expect { @client.shorten('http://example.org/500') }.to raise_error(BitlyQuickly::InvalidRequestOrResponseError)
127
127
  end
128
128
  end
129
129
 
@@ -133,7 +133,7 @@ describe BitlyQuickly do
133
133
  end
134
134
 
135
135
  it 'raises an execption' do
136
- expect { @client.shorten('http://example.org/666') }.to raise_error
136
+ expect { @client.shorten('http://example.org/666') }.to raise_error(BitlyQuickly::UnknownError)
137
137
  end
138
138
  end
139
139
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitly_quickly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oldrich Vetesnik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-05 00:00:00.000000000 Z
11
+ date: 2014-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler