Skip to content

Commit 5549c59

Browse files
committed
switch to bundler for gem tasks
1 parent 1f94a76 commit 5549c59

File tree

5 files changed

+28
-76
lines changed

5 files changed

+28
-76
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
pkg
44
doc
55
.bundle
6+
Gemfile.lock

Gemfile

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
source "http://rubygems.org"
1+
source "https://rubygems.org"
22

3-
group :build do
4-
gem "yard"
5-
end
6-
7-
group :test do
8-
gem "json"
9-
gem "rspec", "~>1.3.2"
10-
end
3+
gemspec

Rakefile

+3-35
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
1-
require 'rubygems'
2-
require 'bundler'
3-
Bundler.setup(:default,:build,:test)
1+
require "bundler/gem_tasks"
42

53
require 'rake'
64
require 'rake/clean'
7-
require 'rake/gempackagetask'
85
require 'yard'
96
require 'yard/rake/yardoc_task'
10-
require 'fileutils'
11-
include FileUtils
127

13-
# Default Rake task is to run all tests
14-
task :default => :test
158
CLEAN << Rake::FileList['doc/**', '.yardoc']
169
#Yard
1710
YARD::Rake::YardocTask.new do |t|
@@ -32,30 +25,5 @@ rescue LoadError
3225
end
3326
task :test => :spec
3427

35-
spec = Gem::Specification.new do |s|
36-
s.name = 'cookiejar'
37-
s.version = '0.3.0'
38-
s.summary = "Client-side HTTP Cookie library"
39-
s.description =
40-
%{Allows for parsing and returning cookies in Ruby HTTP client code}
41-
s.files = Dir['lib/**/*.rb'] + Dir['test/**/*.rb']
42-
s.require_path = 'lib'
43-
s.has_rdoc = true
44-
# s.extra_rdoc_files = Dir['[A-Z]*']
45-
s.rdoc_options << '--title' << 'CookieJar -- Client-side HTTP Cookies'
46-
s.author = "David Waite"
47-
s.email = "[email protected]"
48-
s.homepage = "http://alkaline-solutions.com"
49-
end
50-
51-
Rake::GemPackageTask.new(spec) do |pkg|
52-
pkg.need_zip = true
53-
pkg.need_tar = true
54-
end
55-
56-
desc "create a .gemspec file"
57-
task :gemspec do
58-
File.open("#{spec.name}.gemspec", 'w') do |f|
59-
f.write spec.to_ruby
60-
end
61-
end
28+
# Default Rake task is to run all tests
29+
task :default => :test

cookiejar.gemspec

+19-32
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,27 @@
11
# -*- encoding: utf-8 -*-
22

3-
Gem::Specification.new do |s|
4-
s.name = %q{cookiejar}
5-
s.version = "0.3.0"
3+
lib = File.expand_path('../lib', __FILE__)
4+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5+
require 'cookiejar/version'
66

7-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8-
s.authors = ["David Waite"]
9-
s.date = %q{2010-06-12}
7+
Gem::Specification.new do |s|
8+
s.name = "cookiejar"
9+
s.version = CookieJar::VERSION
10+
s.authors = ["David Waite"]
11+
s.email = ["[email protected]"]
1012
s.description = %q{Allows for parsing and returning cookies in Ruby HTTP client code}
11-
s.email = %q{[email protected]}
12-
s.files = [
13-
"LICENSE",
14-
"README.markdown",
15-
"Rakefile",
16-
"contributors.yaml",
17-
"lib/cookiejar/cookie.rb",
18-
"lib/cookiejar/cookie_validation.rb",
19-
"lib/cookiejar/jar.rb",
20-
"lib/cookiejar.rb",
21-
"test/cookie_test.rb",
22-
"test/cookie_validation_test.rb",
23-
"test/jar_test.rb"
24-
]
25-
s.homepage = %q{http://alkaline-solutions.com}
26-
s.rdoc_options = ["--title", "CookieJar -- Client-side HTTP Cookies"]
13+
s.summary = %q{Client-side HTTP Cookie library}
14+
s.homepage = %q{http://alkaline-solutions.com}
15+
s.date = %q{2014-02-01}
16+
17+
s.files = `git ls-files`.split($/)
18+
s.test_files = s.files.grep(%r{^(spec)/})
19+
s.rdoc_options = ["--title", "CookieJar -- Client-side HTTP Cookies"]
2720
s.require_paths = ["lib"]
28-
s.rubygems_version = %q{1.3.7}
29-
s.summary = %q{Client-side HTTP Cookie library}
3021

31-
if s.respond_to? :specification_version then
32-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
33-
s.specification_version = 3
3422

35-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
36-
else
37-
end
38-
else
39-
end
23+
s.add_development_dependency 'yard'
24+
s.add_development_dependency 'rspec'
25+
s.add_development_dependency 'json'
26+
4027
end

lib/cookiejar/version.rb

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module CookieJar
2+
VERSION = "0.3.0"
3+
end

0 commit comments

Comments
 (0)