Permalink
Browse files

Convert to Ore.

* Added Combinatorics::VERSION.
* Added ore/tasks.
  • Loading branch information...
1 parent 1292099 commit 7d035c36d04cbd70ed4326ec990cd42f4c55fbd2 @postmodern committed Oct 26, 2010
Showing with 47 additions and 112 deletions.
  1. +0 −1 .document
  2. +15 −22 Rakefile
  3. +0 −1 VERSION
  4. +6 −87 combinatorics.gemspec
  5. +16 −0 gemspec.yml
  6. +1 −0 lib/combinatorics.rb
  7. +4 −0 lib/combinatorics/version.rb
  8. +5 −1 spec/combinatorics_spec.rb
View
@@ -1,4 +1,3 @@
-lib/**/*.rb
-
LICENSE.txt
Benchmarks.md
View
@@ -2,35 +2,28 @@ require 'rubygems'
require 'rake'
begin
- gem 'jeweler', '~> 1.4.0'
- require 'jeweler'
+ require 'ore/tasks'
+ Ore::Tasks.new
+rescue LoadError => e
+ STDERR.puts e.message
+ STDERR.puts "Run `gem install ore-tasks` to install 'ore/tasks'."
+end
- Jeweler::Tasks.new do |gem|
- gem.name = 'combinatorics'
- gem.summary = %Q{Bringing (more) Combinatorics to Ruby}
- gem.description = %Q{A collection of modules and methods for performing Combinatoric calculations.}
- gem.email = 'postmodern.mod3@gmail.com'
- gem.homepage = 'http://github.com/postmodern/combinatorics'
- gem.authors = ['Postmodern']
- gem.add_development_dependency 'rspec', '~> 2.0.0'
- gem.add_development_dependency 'yard', '~> 0.6.0'
- gem.add_development_dependency 'jeweler', '~> 1.4.0'
+begin
+ require 'rspec/core/rake_task'
+ RSpec::Core::RakeTask.new
+rescue LoadError => e
+ task :spec do
+ abort "Please run `gem install rspec` to install RSpec."
end
- Jeweler::GemcutterTasks.new
-rescue LoadError
- puts 'Jeweler (or a dependency) not available. Install it with: gem install jeweler'
end
-
-require 'rspec/core/rake_task'
-RSpec::Core::RakeTask.new
task :default => :spec
begin
require 'yard'
-
- YARD::Rake::YardocTask.new
-rescue LoadError
+ YARD::Rake::YardocTask.new
+rescue LoadError => e
task :yard do
- abort 'YARD is not available. In order to run yard, you must: gem install yard'
+ abort "Please run `gem install yard` to install YARD."
end
end
View
@@ -1 +0,0 @@
-0.3.0
View
@@ -1,91 +1,10 @@
-# Generated by jeweler
-# DO NOT EDIT THIS FILE DIRECTLY
-# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# -*- encoding: utf-8 -*-
-Gem::Specification.new do |s|
- s.name = %q{combinatorics}
- s.version = "0.3.0"
-
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Postmodern"]
- s.date = %q{2010-10-17}
- s.description = %q{A collection of modules and methods for performing Combinatoric calculations.}
- s.email = %q{postmodern.mod3@gmail.com}
- s.extra_rdoc_files = [
- "ChangeLog.md",
- "LICENSE.txt",
- "README.md"
- ]
- s.files = [
- ".document",
- ".gitignore",
- ".rspec",
- ".yardopts",
- "Benchmarks.md",
- "ChangeLog.md",
- "LICENSE.txt",
- "README.md",
- "Rakefile",
- "VERSION",
- "benchmarks/list_comprehension.rb",
- "combinatorics.gemspec",
- "lib/combinatorics.rb",
- "lib/combinatorics/enumerator.rb",
- "lib/combinatorics/extensions.rb",
- "lib/combinatorics/extensions/range.rb",
- "lib/combinatorics/generator.rb",
- "lib/combinatorics/list_comprehension.rb",
- "lib/combinatorics/power_set.rb",
- "lib/combinatorics/power_set/extensions.rb",
- "lib/combinatorics/power_set/extensions/array.rb",
- "lib/combinatorics/power_set/extensions/set.rb",
- "lib/combinatorics/power_set/mixin.rb",
- "spec/.rspec",
- "spec/combinatorics_spec.rb",
- "spec/enumerator_spec.rb",
- "spec/extensions/range_spec.rb",
- "spec/generator_spec.rb",
- "spec/list_comprehension_spec.rb",
- "spec/power_set/array_spec.rb",
- "spec/power_set/mixin_examples.rb",
- "spec/power_set/set_spec.rb",
- "spec/spec_helper.rb"
- ]
- s.homepage = %q{http://github.com/postmodern/combinatorics}
- s.rdoc_options = ["--charset=UTF-8"]
- s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.7}
- s.summary = %q{Bringing (more) Combinatorics to Ruby}
- s.test_files = [
- "spec/enumerator_spec.rb",
- "spec/combinatorics_spec.rb",
- "spec/list_comprehension_spec.rb",
- "spec/generator_spec.rb",
- "spec/extensions/range_spec.rb",
- "spec/spec_helper.rb",
- "spec/power_set/set_spec.rb",
- "spec/power_set/array_spec.rb",
- "spec/power_set/mixin_examples.rb"
- ]
-
- if s.respond_to? :specification_version then
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 3
-
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- s.add_development_dependency(%q<rspec>, ["~> 2.0.0"])
- s.add_development_dependency(%q<yard>, ["~> 0.6.0"])
- s.add_development_dependency(%q<jeweler>, ["~> 1.4.0"])
- else
- s.add_dependency(%q<rspec>, ["~> 2.0.0"])
- s.add_dependency(%q<yard>, ["~> 0.6.0"])
- s.add_dependency(%q<jeweler>, ["~> 1.4.0"])
- end
- else
- s.add_dependency(%q<rspec>, ["~> 2.0.0"])
- s.add_dependency(%q<yard>, ["~> 0.6.0"])
- s.add_dependency(%q<jeweler>, ["~> 1.4.0"])
+begin
+ Ore::Specification.new do |gemspec|
+ # custom logic here
end
+rescue NameError
+ STDERR.puts "The 'combinatorics.gemspec' file requires Ore."
+ STDERR.puts "Run `gem install ore` to install Ore."
end
-
View
@@ -0,0 +1,16 @@
+name: combinatorics
+summary: Bringing (more) Combinatorics to Ruby
+description:
+ A collection of modules and methods for performing Combinatoric
+ calculations.
+license: MIT
+authors: Postmodern
+email: postmodern.mod3@gmail.com
+homepage: http://github.com/postmodern/combinatorics
+has_yard: true
+
+development_dependencies:
+ ore: ~> 0.1.0
+ ore-tasks: ~> 0.1.0
+ rspec: ~> 2.0.0
+ yard: ~> 0.6.0
@@ -1,3 +1,4 @@
require 'combinatorics/extensions'
require 'combinatorics/list_comprehension'
require 'combinatorics/power_set'
+require 'combinatorics/version'
@@ -0,0 +1,4 @@
+module Combinatorics
+ # combinatorics version
+ VERSION = '0.3.0'
+end
@@ -1,4 +1,8 @@
require 'spec_helper'
+require 'combinatorics/version'
-describe "Combinatorics" do
+describe Combinatorics do
+ it "should have a VERSION constant" do
+ subject.const_get('VERSION').should_not be_empty
+ end
end

0 comments on commit 7d035c3

Please sign in to comment.