Skip to content

Commit bbd5cf5

Browse files
committed
- Remove dependency on Jeweler / Bundler (use gem release instead!)
- Move version to a .rb file - Cleanup Gemfile, gemspec, and Rakefile
1 parent cb917a0 commit bbd5cf5

File tree

6 files changed

+26
-135
lines changed

6 files changed

+26
-135
lines changed

Gemfile

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
11
source "http://rubygems.org"
22

3-
gem "httparty", "~> 0.10"
4-
gem "json", ">= 1.4.6"
5-
6-
group :development do
7-
gem "rspec", "~> 2.10"
8-
gem "jeweler", ">= 1.8.3"
9-
gem "webmock", "~> 1.8.6"
10-
gem "timecop", "~> 0.7.1"
11-
end
3+
gemspec

Rakefile

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,10 @@
1-
require 'rubygems'
2-
require 'bundler'
3-
begin
4-
Bundler.setup(:default, :development)
5-
rescue Bundler::BundlerError => e
6-
$stderr.puts e.message
7-
$stderr.puts "Run `bundle install` to install missing gems"
8-
exit e.status_code
9-
end
101
require 'rake'
11-
12-
require 'jeweler'
13-
Jeweler::Tasks.new do |gem|
14-
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
15-
gem.name = "googl"
16-
gem.homepage = "http://github.com/zigotto/googl"
17-
gem.license = "MIT"
18-
gem.summary = %Q{Wrapper for Google URL Shortener API}
19-
gem.description = %Q{Small library for Google URL Shortener API}
20-
gem.email = "[email protected]"
21-
gem.authors = ["Jesus Lopes"]
22-
# dependencies defined in Gemfile
23-
end
24-
Jeweler::RubygemsDotOrgTasks.new
25-
262
require 'rspec/core'
273
require 'rspec/core/rake_task'
4+
285
RSpec::Core::RakeTask.new(:spec) do |spec|
296
spec.pattern = FileList['spec/**/*_spec.rb']
30-
spec.rspec_opts = %w(-fp --color)
31-
end
32-
33-
RSpec::Core::RakeTask.new(:rcov) do |spec|
34-
spec.pattern = 'spec/**/*_spec.rb'
35-
spec.rcov = true
7+
spec.rspec_opts = '--color --format progress'
368
end
379

3810
task :default => :spec

VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

googl.gemspec

Lines changed: 19 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,24 @@
1-
# Generated by jeweler
2-
# DO NOT EDIT THIS FILE DIRECTLY
3-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4-
# -*- encoding: utf-8 -*-
5-
# stub: googl 0.7.1 ruby lib
1+
$:.push File.expand_path('../lib', __FILE__)
2+
require 'googl/version'
63

74
Gem::Specification.new do |s|
8-
s.name = "googl"
9-
s.version = "0.7.1"
5+
s.name = 'googl'
6+
s.version = Googl::VERSION
7+
s.authors = ['Jesus Lopes']
8+
s.homepage = 'http://github.com/zigotto/googl'
9+
s.email = '[email protected]'
10+
s.licenses = ['MIT']
11+
s.summary = 'Wrapper for the Google URL Shortener API'
12+
s.description = 'Wrapper for the Google URL Shortener API'
1013

11-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12-
s.require_paths = ["lib"]
13-
s.authors = ["Jesus Lopes"]
14-
s.date = "2015-05-21"
15-
s.description = "Small library for Google URL Shortener API"
16-
s.email = "[email protected]"
17-
s.extra_rdoc_files = [
18-
"README.markdown"
19-
]
20-
s.files = [
21-
".travis.yml",
22-
"Gemfile",
23-
"MIT-LICENSE",
24-
"README.markdown",
25-
"Rakefile",
26-
"VERSION",
27-
"googl.gemspec",
28-
"lib/googl.rb",
29-
"lib/googl/base.rb",
30-
"lib/googl/client_login.rb",
31-
"lib/googl/error.rb",
32-
"lib/googl/expand.rb",
33-
"lib/googl/oauth2/native.rb",
34-
"lib/googl/oauth2/server.rb",
35-
"lib/googl/oauth2/utils.rb",
36-
"lib/googl/request.rb",
37-
"lib/googl/ruby_extensions.rb",
38-
"lib/googl/shorten.rb",
39-
"lib/googl/utils.rb",
40-
"spec/fixtures/client_login_invalid.json",
41-
"spec/fixtures/client_login_valid.json",
42-
"spec/fixtures/expand.json",
43-
"spec/fixtures/expand_404.json",
44-
"spec/fixtures/expand_projection_clicks.json",
45-
"spec/fixtures/expand_projection_full.json",
46-
"spec/fixtures/expand_projection_strings.json",
47-
"spec/fixtures/expand_removed.json",
48-
"spec/fixtures/history.json",
49-
"spec/fixtures/history_projection_clicks.json",
50-
"spec/fixtures/oauth2/native.json",
51-
"spec/fixtures/oauth2/native_invalid.json",
52-
"spec/fixtures/oauth2/native_token_expires.json",
53-
"spec/fixtures/oauth2/server.json",
54-
"spec/fixtures/oauth2/server_invalid.json",
55-
"spec/fixtures/oauth2/server_token_expires.json",
56-
"spec/fixtures/shorten.json",
57-
"spec/fixtures/shorten_authenticated.json",
58-
"spec/fixtures/shorten_invalid_content_type.json",
59-
"spec/googl/client_spec.rb",
60-
"spec/googl/expand_spec.rb",
61-
"spec/googl/oauth2/native_spec.rb",
62-
"spec/googl/oauth2/server_spec.rb",
63-
"spec/googl/request_spec.rb",
64-
"spec/googl/shorten_spec.rb",
65-
"spec/shared_examples.rb",
66-
"spec/spec_helper.rb"
67-
]
68-
s.homepage = "http://github.com/zigotto/googl"
69-
s.licenses = ["MIT"]
70-
s.rubygems_version = "2.4.5"
71-
s.summary = "Wrapper for Google URL Shortener API"
14+
s.files = Dir['lib/**/*'] + %w(MIT-LICENSE Rakefile README.rdoc VERSION)
15+
s.test_files = Dir['spec/**/*']
16+
s.require_paths = ['lib']
7217

73-
if s.respond_to? :specification_version then
74-
s.specification_version = 4
75-
76-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
77-
s.add_runtime_dependency(%q<httparty>, ["~> 0.10"])
78-
s.add_runtime_dependency(%q<json>, [">= 1.4.6"])
79-
s.add_development_dependency(%q<rspec>, ["~> 2.10"])
80-
s.add_development_dependency(%q<jeweler>, [">= 1.8.3"])
81-
s.add_development_dependency(%q<webmock>, ["~> 1.8.6"])
82-
s.add_development_dependency(%q<timecop>, ["~> 0.7.1"])
83-
else
84-
s.add_dependency(%q<httparty>, ["~> 0.10"])
85-
s.add_dependency(%q<json>, [">= 1.4.6"])
86-
s.add_dependency(%q<rspec>, ["~> 2.10"])
87-
s.add_dependency(%q<jeweler>, [">= 1.8.3"])
88-
s.add_dependency(%q<webmock>, ["~> 1.8.6"])
89-
s.add_dependency(%q<timecop>, ["~> 0.7.1"])
90-
end
91-
else
92-
s.add_dependency(%q<httparty>, ["~> 0.10"])
93-
s.add_dependency(%q<json>, [">= 1.4.6"])
94-
s.add_dependency(%q<rspec>, ["~> 2.10"])
95-
s.add_dependency(%q<jeweler>, [">= 1.8.3"])
96-
s.add_dependency(%q<webmock>, ["~> 1.8.6"])
97-
s.add_dependency(%q<timecop>, ["~> 0.7.1"])
98-
end
18+
s.add_dependency('httparty', '~> 0.10.0')
19+
s.add_dependency('json', '>= 1.4.6')
20+
s.add_development_dependency('rake', '~> 10')
21+
s.add_development_dependency('rspec', '~> 2.10.0')
22+
s.add_development_dependency('timecop', '~> 0.7.1')
23+
s.add_development_dependency('webmock', '~> 1.8.6')
9924
end
100-

lib/googl.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
require 'ostruct'
33
require 'json'
44

5+
require 'googl/version'
56
require 'googl/error'
67
require 'googl/utils'
78
require 'googl/base'

lib/googl/version.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module Googl
2+
VERSION = '0.7.1'
3+
end

0 commit comments

Comments
 (0)