Permalink
Browse files

Converted to Ore.

  • Loading branch information...
1 parent 834b25c commit 548f5cc45397f9864fa16366ecc4bbcef4b679b8 @postmodern committed Oct 27, 2010
Showing with 38 additions and 108 deletions.
  1. +0 −1 .gitignore
  2. +15 −24 Rakefile
  3. +17 −0 gemspec.yml
  4. +6 −83 open_namespace.gemspec
View
@@ -1,6 +1,5 @@
pkg
doc
-tmp
.DS_Store
.yardoc
*.swp
View
@@ -1,44 +1,35 @@
require 'rubygems'
require 'rake'
-require './lib/open_namespace/version.rb'
begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = 'open_namespace'
- gem.version = OpenNamespace::VERSION
- gem.license = 'MIT'
- gem.summary = %Q{Allows namespaces to load constants on-demand}
- gem.description = %Q{OpenNamespace allows namespaces to require and find classes and modules from other RubyGems.}
- gem.email = 'postmodern.mod3@gmail.com'
- gem.homepage = 'http://github.com/postmodern/open-namespace'
- gem.authors = ['Postmodern']
- gem.add_development_dependency 'rspec', '~> 2.0.0'
- gem.add_development_dependency 'yard', '~> 0.6.0'
- gem.has_rdoc = 'yard'
- end
- Jeweler::GemcutterTasks.new
-rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
+ gem 'ore-tasks', '~> 0.1.2'
+ 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
begin
+ gem 'rspec', '~> 2.0.0'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new
- task :default => :spec
-rescue LoadError
+rescue LoadError => e
task :spec do
- abort "RSpec 2.0.0 is not available. In order to run spec, you must: gem install rspec"
+ abort "Please run `gem install rspec` to install RSpec."
end
end
+task :default => :spec
begin
+ gem 'yard', '~> 0.6.0'
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
@@ -0,0 +1,17 @@
+name: open_namespace
+summary: Allows namespaces to load constants on-demand
+description:
+ OpenNamespace allows namespaces to require and find classes and modules
+ from other RubyGems.
+
+license: MIT
+authors: Postmodern
+email: postmodern.mod3@gmail.com
+homepage: http://github.com/postmodern/open_namespace
+has_yard: true
+
+development_dependencies:
+ ore: ~> 0.2.0
+ ore-tasks: ~> 0.1.2
+ rspec: ~> 2.0.0
+ yard: ~> 0.6.0
View
@@ -1,87 +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{open_namespace}
- 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-10}
- s.description = %q{OpenNamespace allows namespaces to require and find classes and modules from other RubyGems.}
- s.email = %q{postmodern.mod3@gmail.com}
- s.extra_rdoc_files = [
- "ChangeLog.md",
- "LICENSE.txt",
- "README.md"
- ]
- s.files = [
- ".gitignore",
- ".rspec",
- ".yardopts",
- "ChangeLog.md",
- "LICENSE.txt",
- "README.md",
- "Rakefile",
- "lib/open_namespace.rb",
- "lib/open_namespace/class_methods.rb",
- "lib/open_namespace/open_namespace.rb",
- "lib/open_namespace/version.rb",
- "open_namespace.gemspec",
- "spec/classes/custom/bad_constant.rb",
- "spec/classes/custom/constant_one.rb",
- "spec/classes/custom/constant_two.rb",
- "spec/classes/custom/odd_constant.rb",
- "spec/classes/custom/sub/constant_four.rb",
- "spec/classes/custom_namespace.rb",
- "spec/classes/simple_namespace.rb",
- "spec/classes/simple_namespace/bad_constant.rb",
- "spec/classes/simple_namespace/constant_one.rb",
- "spec/classes/simple_namespace/constant_two.rb",
- "spec/classes/simple_namespace/odd_constant.rb",
- "spec/classes/simple_namespace/sub/constant_four.rb",
- "spec/open_namespace_spec.rb",
- "spec/spec_helper.rb"
- ]
- s.has_rdoc = %q{yard}
- s.homepage = %q{http://github.com/postmodern/open-namespace}
- s.licenses = ["MIT"]
- s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.7}
- s.summary = %q{Allows namespaces to load constants on-demand}
- s.test_files = [
- "spec/classes/custom/bad_constant.rb",
- "spec/classes/custom/constant_one.rb",
- "spec/classes/custom/constant_two.rb",
- "spec/classes/custom/odd_constant.rb",
- "spec/classes/custom/sub/constant_four.rb",
- "spec/classes/custom_namespace.rb",
- "spec/classes/simple_namespace.rb",
- "spec/classes/simple_namespace/bad_constant.rb",
- "spec/classes/simple_namespace/constant_one.rb",
- "spec/classes/simple_namespace/constant_two.rb",
- "spec/classes/simple_namespace/odd_constant.rb",
- "spec/classes/simple_namespace/sub/constant_four.rb",
- "spec/open_namespace_spec.rb",
- "spec/spec_helper.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"])
- else
- s.add_dependency(%q<rspec>, ["~> 2.0.0"])
- s.add_dependency(%q<yard>, ["~> 0.6.0"])
- end
- else
- s.add_dependency(%q<rspec>, ["~> 2.0.0"])
- s.add_dependency(%q<yard>, ["~> 0.6.0"])
+begin
+ Ore::Specification.new do |gemspec|
+ # custom logic here
end
+rescue NameError
+ STDERR.puts "The 'open_namespace.gemspec' file requires Ore."
+ STDERR.puts "Run `gem install ore` to install Ore."
end
-

0 comments on commit 548f5cc

Please sign in to comment.