Skip to content

Commit

Permalink
Merge pull request #24 from bosko/master
Browse files Browse the repository at this point in the history
Use SimpleCov and abandon Ruby 1.8 support
  • Loading branch information
johnny.halife committed Dec 19, 2012
2 parents 29161f3 + 52138b6 commit 2181db9
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ pkg/*
rdoc/*
sdk/*
sdk
.rvmrc
.rvmrc
vendor/
.bundle
12 changes: 8 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
waz-storage (1.1.1)
waz-storage (1.1.2)
rest-client
ruby-hmac

Expand All @@ -10,10 +10,10 @@ GEM
specs:
diff-lcs (1.1.3)
metaclass (0.0.1)
mime-types (1.18)
mime-types (1.19)
mocha (0.10.5)
metaclass (~> 0.0.1)
rcov (1.0.0)
multi_json (1.5.0)
rest-client (1.6.7)
mime-types (>= 1.16)
rspec (2.9.0)
Expand All @@ -25,12 +25,16 @@ GEM
diff-lcs (~> 1.1.3)
rspec-mocks (2.9.0)
ruby-hmac (0.4.0)
simplecov (0.7.1)
multi_json (~> 1.0)
simplecov-html (~> 0.7.1)
simplecov-html (0.7.1)

PLATFORMS
ruby

DEPENDENCIES
mocha
rcov
rspec
simplecov
waz-storage!
4 changes: 1 addition & 3 deletions rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ require 'bundler/gem_tasks'
RSpec::Core::RakeTask.new do |t|
t.name = :specs
t.pattern = "tests/**/*_test.rb"
t.rcov = true
t.rcov_opts = ['--text-report', '--exclude', "exclude.*/.gem,test,Library,#{ENV['GEM_HOME']}", '--sort', 'coverage' ]
t.rspec_opts = ['-cfn']
end

Expand All @@ -20,4 +18,4 @@ namespace :docs do
t.rdoc_files.include('README.rdoc')
t.rdoc_files.include('lib/**/*.rb')
end
end
end
8 changes: 8 additions & 0 deletions tests/configuration.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
require 'simplecov'
SimpleCov.start do
add_group "Gem files" do |src_file|
lib_path = File.expand_path("../lib", File.dirname(__FILE__))
src_file.filename.start_with?(lib_path)
end
end

require 'rubygems'
require 'rspec'
require 'rspec/autorun'
Expand Down
4 changes: 2 additions & 2 deletions tests/waz/blobs/blob_object_test.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# enabling the load of files from root (on RSpec)
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../')
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../../')
require 'tests/configuration'
require 'lib/waz-blobs'

Expand Down Expand Up @@ -77,4 +77,4 @@
blob = WAZ::Blobs::BlobObject.new(:name => "blob_name", :url => "http://localhost/container/blob?snapshot=foo", :content_type => "application/xml")
blob.path.should == "container/blob?snapshot=foo"
end
end
end
2 changes: 1 addition & 1 deletion waz-storage.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ Gem::Specification.new do |gem|
gem.add_dependency 'ruby-hmac'

gem.add_development_dependency 'rspec'
gem.add_development_dependency 'rcov'
gem.add_development_dependency 'simplecov'
gem.add_development_dependency 'mocha'
end

0 comments on commit 2181db9

Please sign in to comment.