simple_bitly 0.0.2 → 0.0.3

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.
data/README.mdown CHANGED
@@ -4,24 +4,24 @@ A simple and lightweight wrapper for the Bitly API (v3).
4
4
 
5
5
  ## Installation
6
6
 
7
- > [sudo] gem install simple_bitly
7
+ [sudo] gem install simple_bitly
8
8
 
9
9
  ## Usage
10
10
 
11
- > bitly = SimpleBitly.new(USERNAME, API_KEY)
11
+ bitly = SimpleBitly.new(USERNAME, API_KEY)
12
12
 
13
- ##### shorten a URL
13
+ #### shorten a URL
14
14
 
15
- > result = bitly.shorten('http://reddit.com')
16
- > result.short_url
17
- > result.long_url
18
- > result.hash
19
- > result.qr_code
15
+ result = bitly.shorten('http://reddit.com')
16
+ result.short_url
17
+ result.long_url
18
+ result.hash
19
+ result.qr_code
20
20
 
21
- ##### expand one or more URLs
21
+ #### expand one or more URLs
22
22
 
23
- > results = bitly.expand('http://bit.ly/9QePJB', 'http://bit.ly/CuJU')
24
- > results.first.long_url
25
- > results.first.short_url
26
- > results.first.hash
27
- > results.first.qr_code
23
+ results = bitly.expand('http://bit.ly/9QePJB', 'http://bit.ly/CuJU')
24
+ results.first.long_url
25
+ results.first.short_url
26
+ results.first.hash
27
+ results.first.qr_code
data/lib/simple_bitly.rb CHANGED
@@ -51,6 +51,8 @@ module SimpleBitly
51
51
  end
52
52
  end
53
53
 
54
+ private
55
+
54
56
  # Raises an error containing the 'Status Code' and the 'Status Message' sent by Bitly's server
55
57
  def bitly_error(code, message)
56
58
  raise "Error from Bitly: #{code.to_s}, #{message}"
@@ -1,3 +1,3 @@
1
1
  module SimpleBitly
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/simple_bitly.gemspec CHANGED
@@ -8,9 +8,9 @@ Gem::Specification.new do |s|
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Nizar Dhamani"]
10
10
  s.email = ["nizar.dhamani@gmail.com"]
11
- s.homepage = ""
11
+ s.homepage = "https://github.com/nizardhamani/simple_bitly"
12
12
  s.summary = %q{A lightweight wrapper for the bit.ly API}
13
- s.description = %q{lightweight bit.ly API wrapper}
13
+ s.description = %q{A lightweight bit.ly API wrapper}
14
14
 
15
15
  s.add_development_dependency('rspec', '>= 2.0.0')
16
16
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_bitly
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nizar Dhamani
@@ -34,7 +34,7 @@ dependencies:
34
34
  version: 2.0.0
35
35
  type: :development
36
36
  version_requirements: *id001
37
- description: lightweight bit.ly API wrapper
37
+ description: A lightweight bit.ly API wrapper
38
38
  email:
39
39
  - nizar.dhamani@gmail.com
40
40
  executables: []
@@ -55,7 +55,7 @@ files:
55
55
  - spec/helper.rb
56
56
  - spec/simple_bitly/client_spec.rb
57
57
  has_rdoc: true
58
- homepage: ""
58
+ homepage: https://github.com/nizardhamani/simple_bitly
59
59
  licenses: []
60
60
 
61
61
  post_install_message: