Skip to content

rdoctask unsupported, DOS newlines, typos #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 53 additions & 53 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
require 'rubygems'
require 'rake'
begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "array_stats"
gem.summary = %Q{Easy mean, median, percentile, and sum statistics for Ruby Arrays}
gem.description = %Q{Easy mean, median, percentile, and sum statistics for Ruby Arrays}
gem.email = "[email protected]"
gem.homepage = "http://github.com/bkoski/array_stats"
gem.authors = ["Ben Koski"]
gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
end
begin
require 'rcov/rcovtask'
Rcov::RcovTask.new do |test|
test.libs << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
end
rescue LoadError
task :rcov do
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
end
end
task :test => :check_dependencies
task :default => :test
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "array_stats #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
require 'rubygems'
require 'rake'

begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "array_stats"
gem.summary = %Q{Easy mean, median, percentile, and sum statistics for Ruby Arrays}
gem.description = %Q{Easy mean, median, percentile, and sum statistics for Ruby Arrays}
gem.email = "[email protected]"
gem.homepage = "http://github.com/bkoski/array_stats"
gem.authors = ["Ben Koski"]
gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end

require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
end

begin
require 'rcov/rcovtask'
Rcov::RcovTask.new do |test|
test.libs << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
end
rescue LoadError
task :rcov do
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
end
end

task :test => :check_dependencies

task :default => :test

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

rdoc.rdoc_dir = 'rdoc'
rdoc.title = "array_stats #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
2 changes: 1 addition & 1 deletion lib/array_stats.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))

module ArrayStats
VERSION = '0.5.0'
VERSION = '0.6.0'
end

require "#{File.dirname(__FILE__)}/array_stats/float"
Expand Down
2 changes: 1 addition & 1 deletion test/test_array_stats.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class TestArrayStats < Test::Unit::TestCase
end

context "mean" do
should "return the mean for the array " do
should "return the mean for the array" do
assert_equal 7, [2,4,6,8,10,12].mean
assert_equal 25, [48,29,26,19,3].mean
end
Expand Down
4 changes: 2 additions & 2 deletions test/test_float_extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ class TestFloatExtensions < Test::Unit::TestCase
assert_in_delta 0.2456, n.fractional_part, 0.00000001
end

should "retrun the decimal parts, even if they are 0" do
should "return the decimal parts, even if they are 0" do
n = 12.0
assert_equal 0.0, n.fractional_part
end

should "retrun the decimal as a positive number, even if the original float is negative" do
should "return the decimal as a positive number, even if the original float is negative" do
n = -12.2399
assert_in_delta 0.2399, n.fractional_part, 0.00000001
end
Expand Down