Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

using bundler now

  • Loading branch information...
commit 9798331d4275e82cd377d4323b8a4a8f422c6d93 1 parent 946e97e
@qoobaa authored
View
1  .gitignore
@@ -4,3 +4,4 @@ coverage
rdoc
pkg
*.gem
+.bundle
View
4 Gemfile
@@ -0,0 +1,4 @@
+source :gemcutter
+
+# Specify your gem's dependencies in s3.gemspec
+gemspec
View
27 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
View
27 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"
@@ -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
View
2  lib/s3/version.rb
@@ -1,3 +1,3 @@
module S3
- VERSION = "0.3.0"
+ VERSION = "0.3.1"
end
View
28 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
View
4 test/object_test.rb
@@ -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)
@@ -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
View
11 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"
Please sign in to comment.
Something went wrong with that request. Please try again.