Skip to content

Commit

Permalink
using bundler now
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Kuźma committed Sep 3, 2010
1 parent 946e97e commit 9798331
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 48 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -4,3 +4,4 @@ coverage
rdoc
pkg
*.gem
.bundle
4 changes: 4 additions & 0 deletions Gemfile
@@ -0,0 +1,4 @@
source :gemcutter

# Specify your gem's dependencies in s3.gemspec
gemspec
27 changes: 27 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,27 @@
PATH
remote: .
specs:
s3 (0.3.1)
proxies
trollop

GEM
remote: http://rubygems.org/
specs:
mocha (0.9.8)
rake
proxies (0.1.1)
rake (0.8.7)
test-unit (2.1.1)
trollop (1.16.2)

PLATFORMS
ruby

DEPENDENCIES
bundler (>= 1.0.0)
mocha
proxies
s3!
test-unit (>= 2.0)
trollop
27 changes: 2 additions & 25 deletions Rakefile
@@ -1,16 +1,8 @@
$:.unshift File.expand_path("../lib", __FILE__)
require "bundler"
Bundler::GemHelper.install_tasks

require "rubygems"
require "rubygems/specification"
require "rake/testtask"
require "rake/rdoctask"
require "rake/gempackagetask"
require "s3"

def gemspec
file = File.expand_path('../s3.gemspec', __FILE__)
eval(File.read(file), binding, file)
end

Rake::TestTask.new(:test) do |test|
test.libs << "lib" << "test"
Expand All @@ -25,19 +17,4 @@ Rake::RDocTask.new do |rdoc|
rdoc.rdoc_files.include("lib/**/*.rb")
end

Rake::GemPackageTask.new(gemspec) do |pkg|
pkg.gem_spec = 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 :gem => :gemspec
task :default => :test
2 changes: 1 addition & 1 deletion lib/s3/version.rb
@@ -1,3 +1,3 @@
module S3
VERSION = "0.3.0"
VERSION = "0.3.1"
end
28 changes: 14 additions & 14 deletions s3.gemspec
@@ -1,27 +1,27 @@
# -*- coding: utf-8 -*-
# -*- encoding: utf-8 -*-

lib = File.expand_path("../lib/", __FILE__)
$:.unshift lib unless $:.include?(lib)

require "s3/version"
require File.expand_path("../lib/s3/version", __FILE__)

Gem::Specification.new do |s|
s.name = "s3"
s.version = S3::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["Jakub Kuźma"]
s.email = "qoobaa@gmail.com"
s.homepage = "http://jah.pl/projects/s3.html"
s.summary = "Library for accessing S3 objects and buckets, with command line tool"
s.name = "s3"
s.version = S3::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["Jakub Kuźma"]
s.email = ["qoobaa@gmail.com"]
s.homepage = "http://jah.pl/projects/s3.html"
s.summary = "Library for accessing S3 objects and buckets, with command line tool"
s.description = "S3 library provides access to Amazon's Simple Storage Service. It supports both: European and US buckets through REST API."

s.required_rubygems_version = ">= 1.3.6"
s.rubyforge_project = "s3"

s.add_dependency "trollop"
s.add_dependency "proxies"
s.add_development_dependency "test-unit", ">= 2.0"
s.add_development_dependency "mocha"
s.add_development_dependency "bundler", ">= 1.0.0"

s.files = Dir.glob("{bin,extra,lib}/**/*") + %w(LICENSE README.rdoc)
s.executables = ["s3"]
s.files = `git ls-files`.split("\n")
s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
s.require_path = "lib"
end
4 changes: 2 additions & 2 deletions test/object_test.rb
Expand Up @@ -23,7 +23,7 @@ def setup

@xml_body = <<-EOXML
<?xml version="1.0" encoding="UTF-8"?>
<CopyObjectResult> <LastModified>timestamp</LastModified> <ETag>"etag"</ETag> </CopyObjectResult>
<CopyObjectResult> <LastModified>#{Time.now.httpdate}</LastModified> <ETag>"etag"</ETag> </CopyObjectResult>
EOXML
@response_xml = Net::HTTPOK.new("1.1", "200", "OK")
@response_xml.stubs(:body).returns(@xml_body)
Expand All @@ -40,7 +40,7 @@ def setup
S3::Object.send(:new, nil, :key => "/images/pictures/test images/Lena not full.png")
end
end

test "==" do
expected = false
actual = @object_lena == nil
Expand Down
11 changes: 5 additions & 6 deletions test/test_helper.rb
@@ -1,8 +1,7 @@
require "rubygems"
gem "test-unit"
require "bundler"

Bundler.setup
Bundler.require

require "test/unit"
require "mocha"

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
require "s3"

0 comments on commit 9798331

Please sign in to comment.