google_url_shortener 0.0.9 → 1.0.0

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: 7e051c5d1187a75d31c1719c3049fa07abc54239
4
- data.tar.gz: 453977d8dc8274bfed9aba278d1e75d06ea72e84
3
+ metadata.gz: 2e693d729a1c38168b11ac491d139f4cd8efe335
4
+ data.tar.gz: f4768070ba1e107ba617633751987012ebf86982
5
5
  SHA512:
6
- metadata.gz: 15a9a2a96f4bf9df9230ad93f6cea91f2222017a5327603ad7782342e6e31a11454a16f5f5e29d5a650fde4fa03c378217178ed1543e8267fec381782dd83f0c
7
- data.tar.gz: e067b5f8f38d281c5d0b2107cc3b6e64cc492df1bec87cb94f2e7d09996aec694cb7bf0185a52d0ffac026bcfdfcd138dfb6606ad0de0a95143fa17233d8a0cd
6
+ metadata.gz: 46263d288b88a6908440cd5bac278cd6845d78b86b4cf31526f8c700f99fb5fed374220ff50b25cc5cea6f80db4cbc7c78199b389779d3f2a67b4ae336de590f
7
+ data.tar.gz: e23f39138c0bd85ab1ed4319af91b8faed54f68ead536a9edfb78b27e304582e7e64dc87d59995f5ebacacda2cabbe0532a5cffba27385629eed6c29994a3bda
data/Gemfile CHANGED
@@ -1,7 +1,5 @@
1
- source :gemcutter
1
+ source 'https://rubygems.org'
2
+
2
3
  gemspec
3
4
 
4
- gem "fakeweb"
5
- gem "rspec", '2.8.0'
6
- gem "json", ">= 1.4.6"
7
5
  gem "rest-client", ">= 1.6.7", :require => "restclient"
@@ -1,20 +1,22 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- google_url_shortener (0.0.9)
4
+ google_url_shortener (1.0.0)
5
5
  json (>= 1.4.6)
6
6
  rest-client (>= 1.6.7)
7
7
  trollop (= 1.16.2)
8
8
 
9
9
  GEM
10
- remote: http://rubygems.org/
10
+ remote: https://rubygems.org/
11
11
  specs:
12
12
  diff-lcs (1.1.3)
13
13
  fakeweb (1.3.0)
14
- json (1.6.5)
15
- mime-types (1.19)
16
- rest-client (1.6.7)
17
- mime-types (>= 1.16)
14
+ json (1.8.2)
15
+ mime-types (2.4.3)
16
+ netrc (0.10.3)
17
+ rest-client (1.7.3)
18
+ mime-types (>= 1.16, < 3.0)
19
+ netrc (~> 0.7)
18
20
  rspec (2.8.0)
19
21
  rspec-core (~> 2.8.0)
20
22
  rspec-expectations (~> 2.8.0)
@@ -32,6 +34,5 @@ DEPENDENCIES
32
34
  bundler (>= 1.0.0)
33
35
  fakeweb
34
36
  google_url_shortener!
35
- json (>= 1.4.6)
36
37
  rest-client (>= 1.6.7)
37
38
  rspec (= 2.8.0)
@@ -14,11 +14,14 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.required_rubygems_version = ">= 1.3.6"
16
16
  s.rubyforge_project = "google_url_shortener"
17
+
17
18
  s.add_dependency "json", ">= 1.4.6"
18
19
  s.add_dependency "rest-client", ">= 1.6.7"
19
20
  s.add_dependency 'trollop', '1.16.2'
21
+
20
22
  s.add_development_dependency "bundler", ">= 1.0.0"
21
23
  s.add_development_dependency "rspec", "2.8.0"
24
+ s.add_development_dependency "fakeweb"
22
25
 
23
26
  s.files = `git ls-files`.split("\n")
24
27
  s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
@@ -7,15 +7,20 @@ module Google
7
7
  def post(params={})
8
8
  response = RestClient.post(format_url, format_post_params(params), REQUEST_HEADERS)
9
9
  parse(response)
10
+ rescue => e
11
+ puts e.inspect
10
12
  end
11
13
 
12
14
  def get(params={})
13
15
  full_url = [format_url, "&", format_get_params(params)].join
14
16
  response = RestClient.get(full_url)
15
17
  parse(response)
18
+ rescue => e
19
+ puts e.inspect
16
20
  end
17
21
 
18
- private
22
+ private
23
+
19
24
  def parse(response)
20
25
  JSON.parse(response)
21
26
  end
@@ -1,5 +1,5 @@
1
1
  module Google
2
2
  module UrlShortener
3
- VERSION = "0.0.9"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_url_shortener
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Nesbitt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-23 00:00:00.000000000 Z
11
+ date: 2015-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
82
  version: 2.8.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: fakeweb
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  description: Google URL Shortener is a library to compress and expand goo.gl URL's.
84
98
  It also provides an interface to review the analytics of a short URL.
85
99
  email: