Skip to content

Commit

Permalink
Updated Gemfile/gemspec/Rakefile, etc to use latest best practices ba…
Browse files Browse the repository at this point in the history
…sed on the gem skeleton that bundler generates.
  • Loading branch information
myronmarston committed Aug 26, 2010
1 parent 0a979b4 commit e57ae60
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 91 deletions.
19 changes: 3 additions & 16 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
source :rubygems
gemspec

group :development do
gem 'rspec', '>= 2.0.0.beta.19'
gem 'rspec-core', :git => 'git://github.com/myronmarston/rspec-core.git', :branch => 'parameterized_example_group_186'
gem 'rspec-expectations', :git => 'git://github.com/rspec/rspec-expectations.git'
gem 'cucumber', '>= 0.8.5'
gem 'fakeweb', '~> 1.3.0'
gem 'webmock', '~> 1.3.3'
gem 'httpclient', '~> 2.1.5.2'
gem 'capybara', '~> 0.3.9'
gem 'rack', '1.2.0'
gem 'rake', '~> 0.8.7'

platforms :ruby do
gem 'patron', '~> 0.4.6'
gem 'em-http-request', '~> 0.2.7'
end
# Our specs rely on something in rspec-core master that hasn't been released yet.
gem 'rspec-core', :git => 'git://github.com/rspec/rspec-core.git'
end

# Additional gems that are useful, but not required for development.
# These will not be added to the gemspec as development dependencies.
group :extras do
platforms :mri, :jruby do
gem 'rcov'
Expand Down
48 changes: 24 additions & 24 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
GIT
remote: git://github.com/myronmarston/rspec-core.git
revision: ec3001f
branch: parameterized_example_group_186
remote: git://github.com/rspec/rspec-core.git
revision: 6258abe
specs:
rspec-core (2.0.0.beta.19)
rspec-core (2.0.0.beta.20)

GIT
remote: git://github.com/rspec/rspec-expectations.git
revision: c1ce142
PATH
remote: .
specs:
rspec-expectations (2.0.0.beta.19)
diff-lcs (>= 1.1.2)
vcr (1.1.0)

GEM
remote: http://rubygems.org/
specs:
addressable (2.1.2)
addressable (2.2.0)
archive-tar-minitar (0.5.2)
builder (2.1.2)
capybara (0.3.9)
Expand All @@ -33,9 +30,9 @@ GEM
gherkin (~> 2.1.4)
json_pure (~> 1.4.3)
term-ansicolor (~> 1.0.4)
culerity (0.2.10)
culerity (0.2.12)
diff-lcs (1.1.2)
em-http-request (0.2.10)
em-http-request (0.2.11)
addressable (>= 2.0.0)
eventmachine (>= 0.12.9)
eventmachine (0.12.10)
Expand All @@ -48,7 +45,7 @@ GEM
gherkin (2.1.5-java)
trollop (~> 1.16.2)
httpclient (2.1.5.2)
json_pure (1.4.5)
json_pure (1.4.6)
linecache (0.43)
linecache19 (0.5.11)
ruby_core_source (>= 0.1.4)
Expand All @@ -63,17 +60,19 @@ GEM
rake (0.8.7)
rcov (0.9.8)
rcov (0.9.8-java)
rspec (2.0.0.beta.19)
rspec-core (= 2.0.0.beta.19)
rspec-expectations (= 2.0.0.beta.19)
rspec-mocks (= 2.0.0.beta.19)
rspec-mocks (2.0.0.beta.19)
rspec (2.0.0.beta.20)
rspec-core (= 2.0.0.beta.20)
rspec-expectations (= 2.0.0.beta.20)
rspec-mocks (= 2.0.0.beta.20)
rspec-expectations (2.0.0.beta.20)
diff-lcs (>= 1.1.2)
rspec-mocks (2.0.0.beta.20)
ruby-debug (0.10.3)
columnize (>= 0.1)
ruby-debug-base (~> 0.10.3.0)
ruby-debug-base (0.10.3)
linecache (>= 0.3)
ruby-debug-base19 (0.11.23)
ruby-debug-base19 (0.11.24)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
ruby_core_source (>= 0.1.4)
Expand All @@ -84,14 +83,14 @@ GEM
ruby_core_source (0.1.4)
archive-tar-minitar (>= 0.5.2)
rubyzip (0.9.4)
selenium-webdriver (0.0.27)
selenium-webdriver (0.0.28)
ffi (>= 0.6.1)
json_pure
rubyzip
term-ansicolor (1.0.5)
trollop (1.16.2)
weakling (0.0.4-java)
webmock (1.3.3)
webmock (1.3.4)
addressable (>= 2.1.1)
crack (>= 0.1.7)

Expand All @@ -100,18 +99,19 @@ PLATFORMS
ruby

DEPENDENCIES
bundler (~> 1.0.0.rc6)
capybara (~> 0.3.9)
cucumber (>= 0.8.5)
cucumber (~> 0.8.5)
em-http-request (~> 0.2.7)
fakeweb (~> 1.3.0)
httpclient (~> 2.1.5.2)
patron (~> 0.4.6)
rack (= 1.2.0)
rake (~> 0.8.7)
rcov
rspec (>= 2.0.0.beta.19)
rspec (~> 2.0.0.beta.20)
rspec-core!
rspec-expectations!
ruby-debug
ruby-debug19
vcr!
webmock (~> 1.3.3)
44 changes: 4 additions & 40 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
require 'rubygems'
require 'bundler'
require 'bundler/setup'
Bundler::GemHelper.install_tasks

require 'rake'
require "rspec/core/rake_task"

Expand Down Expand Up @@ -65,42 +68,3 @@ end

task :default => [:spec, :features]

require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION') : ""

rdoc.rdoc_dir = 'rdoc'
rdoc.title = "vcr #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end

def gemspec
@gemspec ||= begin
file = File.expand_path('../vcr.gemspec', __FILE__)
eval(File.read(file), binding, file)
end
end

begin
require 'rake/gempackagetask'
rescue LoadError
task(:gem) { $stderr.puts '`gem install rake` to package gems' }
else
Rake::GemPackageTask.new(gemspec) do |pkg|
pkg.gem_spec = gemspec
end
task :gem => :gemspec
end

desc "install the gem locally"
task :install => :package do
sh %{gem install pkg/#{gemspec.name}-#{gemspec.version}}
end

desc "validate the gemspec"
task :gemspec do
gemspec.validate
end

task :package => :gemspec
1 change: 0 additions & 1 deletion features/support/env.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../spec/support')

if ENV['HTTP_STUBBING_ADAPTER'].to_s == ''
Expand Down
2 changes: 0 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'rubygems'
require 'bundler'
Bundler.setup
Expand Down
38 changes: 30 additions & 8 deletions vcr.gemspec
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
lib = File.expand_path('../lib/', __FILE__)
$:.unshift lib unless $:.include?(lib)

require 'vcr/version'
require 'bundler'
require File.expand_path("../lib/vcr/version", __FILE__)

Gem::Specification.new do |s|
s.name = "vcr"
Expand All @@ -11,11 +7,37 @@ Gem::Specification.new do |s|
s.summary = "Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests."
s.description = "VCR provides helpers to record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests. It works with any ruby testing framework, and provides built-in support for cucumber."
s.email = "myron.marston@gmail.com"
s.files = Dir.glob("lib/**/*") + %w[LICENSE README.md CHANGELOG.md]
s.require_paths = ["lib"]
s.require_path = "lib"
s.files = `git ls-files`.split("\n")
s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact

s.version = VCR.version
s.platform = Gem::Platform::RUBY
s.required_ruby_version = '>= 1.8.6'
s.required_rubygems_version = '>= 1.3.5'
s.add_bundler_dependencies

{
'bundler' => '~> 1.0.0.rc6',
'rake' => '~> 0.8.7',

'rspec' => '~> 2.0.0.beta.20',
'cucumber' => '~> 0.8.5',

'fakeweb' => '~> 1.3.0',
'webmock' => '~> 1.3.3',

'httpclient' => '~> 2.1.5.2',

'capybara' => '~> 0.3.9',
'rack' => '1.2.0'
}.each do |lib, version|
s.add_development_dependency lib, version
end

{
'patron' => '~> 0.4.6',
'em-http-request' => '~> 0.2.7',
}.each do |lib, version|
s.add_development_dependency lib, version
end unless RUBY_PLATFORM == 'java'
end

0 comments on commit e57ae60

Please sign in to comment.