google_url_shortener 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,4 +1,5 @@
1
1
  pkg/*
2
2
  *.gem
3
3
  .bundle
4
- examples/*
4
+ examples/*
5
+ .rvmrc
data/Gemfile CHANGED
@@ -2,5 +2,6 @@ source :gemcutter
2
2
  gemspec
3
3
 
4
4
  gem "fakeweb"
5
- gem "json", "1.4.6"
5
+ gem "rspec", '2.8.0'
6
+ gem "json", ">= 1.4.6"
6
7
  gem "rest-client", "1.6.1", :require => "restclient"
data/Gemfile.lock CHANGED
@@ -1,18 +1,29 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- google_url_shortener (0.0.3)
5
- json (= 1.4.6)
4
+ google_url_shortener (0.0.5)
5
+ json (>= 1.4.6)
6
6
  rest-client (= 1.6.1)
7
+ trollop (= 1.16.2)
7
8
 
8
9
  GEM
9
10
  remote: http://rubygems.org/
10
11
  specs:
12
+ diff-lcs (1.1.3)
11
13
  fakeweb (1.3.0)
12
- json (1.4.6)
13
- mime-types (1.16)
14
+ json (1.6.5)
15
+ mime-types (1.17.2)
14
16
  rest-client (1.6.1)
15
17
  mime-types (>= 1.16)
18
+ rspec (2.8.0)
19
+ rspec-core (~> 2.8.0)
20
+ rspec-expectations (~> 2.8.0)
21
+ rspec-mocks (~> 2.8.0)
22
+ rspec-core (2.8.0)
23
+ rspec-expectations (2.8.0)
24
+ diff-lcs (~> 1.1.2)
25
+ rspec-mocks (2.8.0)
26
+ trollop (1.16.2)
16
27
 
17
28
  PLATFORMS
18
29
  ruby
@@ -21,5 +32,6 @@ DEPENDENCIES
21
32
  bundler (>= 1.0.0)
22
33
  fakeweb
23
34
  google_url_shortener!
24
- json (= 1.4.6)
35
+ json (>= 1.4.6)
25
36
  rest-client (= 1.6.1)
37
+ rspec
data/bin/googl CHANGED
File without changes
@@ -11,16 +11,16 @@ Gem::Specification.new do |s|
11
11
  s.homepage = "http://rubygems.org/gems/google_url_shortener"
12
12
  s.summary = "A simple library to shorten and expand goo.gl URL's."
13
13
  s.description = "Google URL Shortener is a library to compress and expand goo.gl URL's. It also provides an interface to review the analytics of a short URL."
14
-
14
+
15
15
  s.required_rubygems_version = ">= 1.3.6"
16
16
  s.rubyforge_project = "google_url_shortener"
17
- s.add_dependency "json", "1.4.6"
17
+ s.add_dependency "json", ">= 1.4.6"
18
18
  s.add_dependency "rest-client", "1.6.1"
19
- s.add_dependency('trollop', '1.16.2')
19
+ s.add_dependency 'trollop', '1.16.2'
20
20
  s.add_development_dependency "bundler", ">= 1.0.0"
21
-
21
+ s.add_development_dependency "rspec", "2.8.0"
22
+
22
23
  s.files = `git ls-files`.split("\n")
23
24
  s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
24
25
  s.require_path = 'lib'
25
-
26
26
  end
@@ -1,6 +1,6 @@
1
1
  module Google
2
2
  module UrlShortener
3
- VERSION = "0.0.5"
4
-
3
+ VERSION = "0.0.6"
4
+
5
5
  end
6
6
  end
data/readme.textile CHANGED
@@ -4,6 +4,7 @@ h1. Google Url Shortener.
4
4
  * Installation
5
5
  * Usage
6
6
  * CLI
7
+ * Specs
7
8
  * Bugs
8
9
 
9
10
 
@@ -118,7 +119,7 @@ pre. googl expand http://goo.gl/1234 -a
118
119
 
119
120
  h3. Tips
120
121
 
121
- You can use the CLI alonsgide something like @pbcopy@ to make shortening URL's crazy fast:
122
+ You can use the CLI alongside something like @pbcopy@ to make shortening URL's crazy fast:
122
123
 
123
124
  pre. googl shorten http://example.com | pbcopy
124
125
 
@@ -134,6 +135,12 @@ Which can be used as:
134
135
  pre. shorten http://example.com
135
136
 
136
137
 
138
+ h2. Specs
139
+
140
+ Run the specs with the following command:
141
+
142
+ pre. bundle exec rspec --require ./spec/spec_helper.rb --format nested --color spec/lib/*.rb spec/lib/**/*.rb
143
+
137
144
 
138
145
  h2. Bugs
139
146
 
@@ -142,7 +149,7 @@ If you have any problems with Google Url Shortener, please file an "issue":http:
142
149
 
143
150
 
144
151
  h2. Note on Patches/Pull Requests
145
-
152
+
146
153
  * Fork the project.
147
154
  * Make your feature addition or bug fix.
148
155
  * Add tests for it. This is important so I don't break it in a
data/spec/spec_helper.rb CHANGED
@@ -3,16 +3,15 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
3
  Dir[File.dirname(__FILE__) + "/helpers/*"].each { |f| require(f) }
4
4
  require 'google_url_shortener'
5
5
  require 'fakeweb'
6
- require 'spec'
7
6
  include FakewebHelper
8
7
 
9
- Spec::Runner.configure do |config|
10
-
8
+ RSpec.configure do |config|
9
+
11
10
  config.before(:all) do
12
11
  Google::UrlShortener::Base.api_key = "TESTKEY"
13
12
  @key = Google::UrlShortener::Base.api_key
14
13
  @short_url = "http://goo.gl/r5akx"
15
14
  @long_url = "http://blog.josh-nesbitt.net/"
16
15
  end
17
-
16
+
18
17
  end
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_url_shortener
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 0
8
- - 5
9
- version: 0.0.5
4
+ prerelease:
5
+ version: 0.0.6
10
6
  platform: ruby
11
7
  authors:
12
8
  - Josh Nesbitt
@@ -14,7 +10,7 @@ autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
12
 
17
- date: 2011-01-19 00:00:00 +00:00
13
+ date: 2012-02-02 00:00:00 +00:00
18
14
  default_executable:
19
15
  dependencies:
20
16
  - !ruby/object:Gem::Dependency
@@ -23,12 +19,8 @@ dependencies:
23
19
  requirement: &id001 !ruby/object:Gem::Requirement
24
20
  none: false
25
21
  requirements:
26
- - - "="
22
+ - - ">="
27
23
  - !ruby/object:Gem::Version
28
- segments:
29
- - 1
30
- - 4
31
- - 6
32
24
  version: 1.4.6
33
25
  type: :runtime
34
26
  version_requirements: *id001
@@ -40,10 +32,6 @@ dependencies:
40
32
  requirements:
41
33
  - - "="
42
34
  - !ruby/object:Gem::Version
43
- segments:
44
- - 1
45
- - 6
46
- - 1
47
35
  version: 1.6.1
48
36
  type: :runtime
49
37
  version_requirements: *id002
@@ -55,10 +43,6 @@ dependencies:
55
43
  requirements:
56
44
  - - "="
57
45
  - !ruby/object:Gem::Version
58
- segments:
59
- - 1
60
- - 16
61
- - 2
62
46
  version: 1.16.2
63
47
  type: :runtime
64
48
  version_requirements: *id003
@@ -70,13 +54,20 @@ dependencies:
70
54
  requirements:
71
55
  - - ">="
72
56
  - !ruby/object:Gem::Version
73
- segments:
74
- - 1
75
- - 0
76
- - 0
77
57
  version: 1.0.0
78
58
  type: :development
79
59
  version_requirements: *id004
60
+ - !ruby/object:Gem::Dependency
61
+ name: rspec
62
+ prerelease: false
63
+ requirement: &id005 !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - "="
67
+ - !ruby/object:Gem::Version
68
+ version: 2.8.0
69
+ type: :development
70
+ version_requirements: *id005
80
71
  description: Google URL Shortener is a library to compress and expand goo.gl URL's. It also provides an interface to review the analytics of a short URL.
81
72
  email:
82
73
  - josh@josh-nesbitt.net
@@ -114,7 +105,6 @@ files:
114
105
  - spec/lib/google/url_spec.rb
115
106
  - spec/lib/url_shortener_spec.rb
116
107
  - spec/spec_helper.rb
117
- - spec/watch.rb
118
108
  has_rdoc: true
119
109
  homepage: http://rubygems.org/gems/google_url_shortener
120
110
  licenses: []
@@ -129,23 +119,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
129
119
  requirements:
130
120
  - - ">="
131
121
  - !ruby/object:Gem::Version
132
- segments:
133
- - 0
134
122
  version: "0"
135
123
  required_rubygems_version: !ruby/object:Gem::Requirement
136
124
  none: false
137
125
  requirements:
138
126
  - - ">="
139
127
  - !ruby/object:Gem::Version
140
- segments:
141
- - 1
142
- - 3
143
- - 6
144
128
  version: 1.3.6
145
129
  requirements: []
146
130
 
147
131
  rubyforge_project: google_url_shortener
148
- rubygems_version: 1.3.7
132
+ rubygems_version: 1.6.2
149
133
  signing_key:
150
134
  specification_version: 3
151
135
  summary: A simple library to shorten and expand goo.gl URL's.
data/spec/watch.rb DELETED
@@ -1,28 +0,0 @@
1
- # A simple alternative to autotest that isnt painful
2
-
3
- options = {
4
- :options => "--require '#{File.expand_path(File.dirname(__FILE__)) + "/spec_helper"}' --format nested --color",
5
- :binary => "spec"
6
- }
7
-
8
- watch("(lib|spec)/(.*)\.rb") do |match|
9
- puts %x[ clear ]
10
-
11
- file = match[match.size - 1]
12
- opts = options[:options]
13
- binary = options[:binary]
14
-
15
- files = []
16
-
17
- ["spec/lib/*.rb", "spec/lib/*/*.rb"].each do |glob|
18
- Dir.glob(glob).each { |f| files << f }
19
- end
20
-
21
- puts "Found:"
22
- files.each { |f| puts "+ #{f}" }
23
- puts ""
24
- command = "#{binary} #{files.collect! { |f| File.expand_path(f) }.join(" ")} #{opts}"
25
-
26
- system(command)
27
-
28
- end