Permalink
Browse files

Switching from Jeweler to Ore with RSpec2.

  • Loading branch information...
1 parent 3e9baa6 commit 6615e78eaedf574665b7b207c90415d5898b9ab5 @postmodern committed Nov 5, 2010
Showing with 105 additions and 138 deletions.
  1. +1 −0 .rspec
  2. +6 −9 Gemfile
  3. +57 −18 Gemfile.lock
  4. +14 −19 Rakefile
  5. +6 −75 dm-is-counter_cacheable.gemspec
  6. +17 −0 gemspec.yml
  7. +2 −0 spec/integration/counter_cacheable_spec.rb
  8. +2 −17 spec/spec_helper.rb
View
@@ -0,0 +1 @@
+--colour --format documentation
View
@@ -1,6 +1,6 @@
-source 'http://rubygems.org'
+source :rubygems
-DATA_MAPPER = 'git://github.com/datamapper'
+DATA_MAPPER = 'http://github.com/datamapper'
DM_VERSION = '~> 1.0.0'
# We bundle both AS and extlib while extlib compatibility needs to be kept
@@ -71,18 +71,17 @@ end
gem 'dm-core', DM_VERSION, :git => "#{DATA_MAPPER}/dm-core.git"
group :development do
- gem 'rake', '~> 0.8.7'
- gem 'jeweler', '~> 1.5.0.pre'
-end
-
-group :doc do
case RUBY_PLATFORM
when 'java'
gem 'maruku', '~> 0.6.0'
else
gem 'rdiscount', '~> 1.6.3'
end
+ gem 'rake', '~> 0.8.7'
+ gem 'ore', '~> 0.2.0'
+ gem 'ore-tasks', '~> 0.1.2'
+ gem 'rspec', '~> 2.0.0'
gem 'yard', '~> 0.6.0'
end
@@ -117,5 +116,3 @@ group :test do
gem plugin, DM_VERSION, :git => "#{DATA_MAPPER}/#{plugin}.git"
end
end
-
-gem 'rspec', '~> 1.3.0', :group => [:development, :test]
View
@@ -1,43 +1,82 @@
GIT
- remote: git://github.com/datamapper/dm-core.git
- revision: 613f0593b92f026469cf171b237b4f3bf3db7ac5
+ remote: http://github.com/datamapper/dm-core.git
+ revision: 89fc6eca3a198468617db6f77d8d157f6a013c52
specs:
- dm-core (1.0.0)
+ dm-core (1.0.2)
addressable (~> 2.2)
extlib (~> 0.9.15)
GIT
- remote: git://github.com/datamapper/dm-migrations.git
- revision: 6fec31c554f4dcc6773abf27896bf28353df29cd
+ remote: http://github.com/datamapper/dm-do-adapter.git
+ revision: c919095ae1a9a60229d0fda690f6fd7146c5d969
specs:
- dm-migrations (1.0.0)
- dm-core (~> 1.0.0)
+ dm-do-adapter (1.0.2)
+ data_objects (~> 0.10.2)
+ dm-core (~> 1.0.2)
+
+GIT
+ remote: http://github.com/datamapper/dm-migrations.git
+ revision: a6ef38db64449a8f7594f116fecaa9b90313a249
+ specs:
+ dm-migrations (1.0.2)
+ dm-core (~> 1.0.2)
+
+GIT
+ remote: http://github.com/datamapper/dm-sqlite-adapter.git
+ revision: be5eb74de8ce118d761f4fc55f3e5c3eb3b92315
+ specs:
+ dm-sqlite-adapter (1.0.2)
+ dm-do-adapter (~> 1.0.2)
+ do_sqlite3 (~> 0.10.2)
+
+GIT
+ remote: http://github.com/datamapper/do.git
+ revision: 962a33c6ac2efa486206e60ddb10ab4da2c48927
+ specs:
+ data_objects (0.10.3)
+ addressable (~> 2.1)
+ do_sqlite3 (0.10.3)
+ data_objects (= 0.10.3)
GEM
remote: http://rubygems.org/
specs:
- activesupport (3.0.0)
- addressable (2.2.0)
+ activesupport (3.0.1)
+ addressable (2.2.2)
+ diff-lcs (1.1.2)
extlib (0.9.15)
- git (1.2.5)
- jeweler (1.5.0.pre2)
- bundler (>= 1.0.0.rc.5)
- git (>= 1.2.5)
- rake
+ ore (0.2.3)
+ thor (~> 0.14.3)
+ ore-tasks (0.1.3)
rake (0.8.7)
rdiscount (1.6.5)
- rspec (1.3.0)
- yard (0.6.0)
+ rspec (2.0.1)
+ rspec-core (~> 2.0.1)
+ rspec-expectations (~> 2.0.1)
+ rspec-mocks (~> 2.0.1)
+ rspec-core (2.0.1)
+ rspec-expectations (2.0.1)
+ diff-lcs (>= 1.1.2)
+ rspec-mocks (2.0.1)
+ rspec-core (~> 2.0.1)
+ rspec-expectations (~> 2.0.1)
+ thor (0.14.4)
+ yard (0.6.1)
PLATFORMS
ruby
DEPENDENCIES
activesupport (~> 3.0.0)
+ data_objects (~> 0.10.3)!
dm-core (~> 1.0.0)!
+ dm-do-adapter (~> 1.0.0)!
dm-migrations (~> 1.0.0)!
- jeweler (~> 1.5.0.pre)
+ dm-sqlite-adapter (~> 1.0.0)!
+ do_sqlite3 (~> 0.10.3)!
+ ore (~> 0.2.0)
+ ore-tasks (~> 0.1.2)
rake (~> 0.8.7)
rdiscount (~> 1.6.3)
- rspec (~> 1.3.0)
+ rspec (~> 2.0.0)
yard (~> 0.6.0)
View
@@ -1,33 +1,28 @@
require 'rubygems'
-require 'bundler'
begin
- Bundler.setup(:development, :doc)
+ require 'bundler'
+rescue LoadError => e
+ STDERR.puts e.message
+ STDERR.puts "Run `gem install bundler` to install Bundler."
+ exit e.status_code
+end
+
+begin
+ Bundler.setup(:development)
rescue Bundler::BundlerError => e
STDERR.puts e.message
STDERR.puts "Run `bundle install` to install missing gems"
exit e.status_code
end
require 'rake'
-require 'jeweler'
-Jeweler::Tasks.new do |gem|
- gem.name = 'dm-is-counter_cacheable'
- gem.license = 'MIT'
- gem.summary = %Q{A DataMapper plugin for adding counter-cache properties to related models.}
- gem.description = %Q{A DataMapper plugin for adding counter-cache properties to related models.}
- gem.email = 'postmodern.mod3@gmail.com'
- gem.homepage = 'http://github.com/postmodern/dm-is-counter_cacheable'
- gem.authors = ['Postmodern']
- gem.has_rdoc = 'yard'
-end
-require 'spec/rake/spectask'
-Spec::Rake::SpecTask.new(:spec) do |spec|
- spec.libs += ['lib', 'spec']
- spec.spec_files = FileList['spec/**/*_spec.rb']
- spec.spec_opts = ['--options', '.specopts']
-end
+require 'ore/tasks'
+Ore::Tasks.new
+
+require 'rspec/core/rake_task'
+RSpec::Core::RakeTask.new
task :default => :spec
require 'yard'
@@ -1,79 +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{dm-is-counter_cacheable}
- s.version = "0.1.0"
-
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Postmodern"]
- s.date = %q{2010-09-04}
- s.description = %q{A DataMapper plugin for adding counter-cache properties to related models.}
- s.email = %q{postmodern.mod3@gmail.com}
- s.extra_rdoc_files = [
- "ChangeLog.md",
- "LICENSE.txt",
- "README.md"
- ]
- s.files = [
- ".gitignore",
- ".specopts",
- ".yardopts",
- "ChangeLog.md",
- "Gemfile",
- "Gemfile.lock",
- "LICENSE.txt",
- "README.md",
- "Rakefile",
- "VERSION",
- "dm-is-counter_cacheable.gemspec",
- "lib/dm-is-counter_cacheable.rb",
- "lib/dm-is-counter_cacheable/is/counter_cacheable.rb",
- "spec/integration/counter_cacheable_spec.rb",
- "spec/integration/models/comment.rb",
- "spec/integration/models/post.rb",
- "spec/integration/models/user.rb",
- "spec/spec_helper.rb"
- ]
- s.has_rdoc = %q{yard}
- s.homepage = %q{http://github.com/postmodern/dm-is-counter_cacheable}
- s.licenses = ["MIT"]
- s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.7}
- s.summary = %q{A DataMapper plugin for adding counter-cache properties to related models.}
- s.test_files = [
- "spec/integration/counter_cacheable_spec.rb",
- "spec/integration/models/comment.rb",
- "spec/integration/models/post.rb",
- "spec/integration/models/user.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_runtime_dependency(%q<activesupport>, ["~> 3.0.0"])
- s.add_runtime_dependency(%q<dm-core>, ["~> 1.0.0"])
- s.add_development_dependency(%q<rake>, ["~> 0.8.7"])
- s.add_development_dependency(%q<jeweler>, ["~> 1.5.0.pre"])
- s.add_development_dependency(%q<rspec>, ["~> 1.3.0"])
- else
- s.add_dependency(%q<activesupport>, ["~> 3.0.0"])
- s.add_dependency(%q<dm-core>, ["~> 1.0.0"])
- s.add_dependency(%q<rake>, ["~> 0.8.7"])
- s.add_dependency(%q<jeweler>, ["~> 1.5.0.pre"])
- s.add_dependency(%q<rspec>, ["~> 1.3.0"])
- end
- else
- s.add_dependency(%q<activesupport>, ["~> 3.0.0"])
- s.add_dependency(%q<dm-core>, ["~> 1.0.0"])
- s.add_dependency(%q<rake>, ["~> 0.8.7"])
- s.add_dependency(%q<jeweler>, ["~> 1.5.0.pre"])
- s.add_dependency(%q<rspec>, ["~> 1.3.0"])
+begin
+ Ore::Specification.new do |gemspec|
+ # custom logic here
end
+rescue NameError
+ STDERR.puts "The 'contextify.gemspec' file requires Ore."
+ STDERR.puts "Run `gem install ore` to install Ore."
end
-
View
@@ -0,0 +1,17 @@
+name: dm-is-counter_cacheable
+summary: DataMapper plugin for adding counter-caching to models.
+description:
+ A DataMapper plugin for adding counter-cache properties to related models.
+
+license: MIT
+authors: Postmodern
+email: postmodern.mod3@gmail.com
+homepage: http://github.com/postmodern/dm-is-counter_cacheable
+has_yard: true
+
+dependencies:
+ dm-core: ~> 1.0.0
+
+development_dependencies:
+ bundler: ~> 1.0.0
+ yard: ~> 0.6.0
@@ -2,6 +2,8 @@
describe DataMapper::Is::CounterCacheable do
before(:all) do
+ DataMapper.auto_migrate!
+
User.create(
:name => 'bob',
:posts => [
View
@@ -1,15 +1,4 @@
-require 'rubygems'
-require 'bundler'
-
-begin
- Bundler.setup(:test)
-rescue Bundler::BundlerError => e
- STDERR.puts e.message
- STDERR.puts "Run `bundle install` to install missing gems"
- exit e.status_code
-end
-
-require 'spec'
+require 'rspec'
require 'dm-core/spec/setup'
require 'dm-core/spec/lib/adapter_helpers'
@@ -21,10 +10,6 @@
DataMapper::Spec.setup
-Spec::Runner.configure do |config|
+RSpec.configure do |config|
config.extend(DataMapper::Spec::Adapters::Helpers)
-
- config.before(:suite) do
- DataMapper.auto_migrate!
- end
end

0 comments on commit 6615e78

Please sign in to comment.