Permalink
Browse files

fix gemspec and get rspecs partly working again

  • Loading branch information...
turadg committed Sep 2, 2011
1 parent 8d0b3c8 commit 634b6ac1ccf4d9f0ddfecfc8123a58adf3d20eb8
Showing with 78 additions and 81 deletions.
  1. +38 −38 Rakefile
  2. +2 −1 VERSION.yml
  3. +36 −40 annotate.gemspec
  4. +2 −2 spec/spec_helper.rb
View
@@ -1,51 +1,51 @@
require 'rubygems'
require 'rake'
-require 'lib/annotate'
# want other tests/tasks run by default? Add them to the list
task :default => [:spec]
-begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = "annotate"
- gem.executables = "annotate"
- gem.summary = "Annotates Rails Models, routes, fixtures, and others based on the database schema."
- gem.description = gem.summary
- gem.email = ["alex@stinky.com", 'ctran@pragmaquest.com', "x@nofxx.com"]
- gem.homepage = "http://github.com/ctran/annotate"
- gem.authors = ['Cuong Tran', "Alex Chaffee", "Marcos Piccinini"]
- gem.files = FileList["[A-Z]*.*", "{bin,lib,tasks,spec}/**/*"]
- gem.rubyforge_project = "annotate"
-
- # note that Jeweler automatically reads the version from VERSION.yml
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
- end
-
- Jeweler::RubyforgeTasks.new do |rubyforge|
- rubyforge.doc_task = "rdoc"
- end
+require 'jeweler'
+Jeweler::Tasks.new do |gem|
+ gem.name = "annotate"
+ gem.summary = "Annotates Rails models, routes, fixtures, and others based on the database schema."
+ gem.description = "When run, inserts table descriptions from db.schema into a comment block of relevant source code."
+ gem.email = ["alex@stinky.com", 'ctran@pragmaquest.com', "x@nofxx.com", "turadg@aleahmad.net"]
+ gem.homepage = "http://github.com/ctran/annotate_models"
+ gem.authors = ['Cuong Tran', "Alex Chaffee", "Marcos Piccinini", "Turadg Aleahmad"]
+
+ gem.rubyforge_project = "annotate"
+
+ gem.add_development_dependency "rspec"
+
+ gem.test_files = `git ls-files -- {spec,features}/*`.split("\n")
+ gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ gem.require_path = 'lib'
-rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
+ # note that Jeweler automatically reads the version from VERSION.yml
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
-require 'spec/rake/spectask'
-Spec::Rake::SpecTask.new(:spec) do |spec|
- spec.libs << 'lib' << 'spec'
- spec.spec_files = FileList['spec/**/*_spec.rb']
-end
+Jeweler::GemcutterTasks.new
+
-Spec::Rake::SpecTask.new(:rcov) do |spec|
- spec.libs << 'lib' << 'spec'
- spec.pattern = 'spec/**/*_spec.rb'
- spec.rcov = true
+require "rspec/core/rake_task" # RSpec 2.0
+RSpec::Core::RakeTask.new(:spec) do |t|
+ t.pattern = 'spec/*_spec.rb'
+ # TODO this leaves out the specs on the library itself
end
-require 'rake/rdoctask'
-Rake::RDocTask.new do |rdoc|
- rdoc.rdoc_dir = 'rdoc'
- rdoc.title = "annotate #{Annotate.version}"
- rdoc.rdoc_files.include('README*')
- rdoc.rdoc_files.include('lib/**/*.rb')
+# FIXME not working yet
+RSpec::Core::RakeTask.new(:rcov) do |t|
+ t.pattern = 'spec/**/*_spec.rb'
+ t.rcov = true
end
+
+# FIXME warns "already initialized constant Task"
+# FIXME throws "uninitialized constant RDoc::VISIBILITIES"
+# require 'rdoc/task'
+# RDoc::Task.new do |rdoc|
+# rdoc.main = "README.rdoc"
+# rdoc.rdoc_files.include("README.rdoc", "lib/**/*.rb")
+# # require 'lib/annotate'
+# # rdoc.title = "annotate #{Annotate.version}"
+# end
View
@@ -1,4 +1,5 @@
---
:major: 2
:minor: 4
- :patch: 0
+ :patch: 1
+ :build: 'beta1'
View
@@ -1,62 +1,58 @@
# Generated by jeweler
-# DO NOT EDIT THIS FILE
-# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
+# DO NOT EDIT THIS FILE DIRECTLY
+# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
- s.name = %q{annotate}
- s.version = "2.4.0"
+ s.name = "annotate"
+ s.version = "2.4.1.beta1"
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Cuong Tran", "Alex Chaffee", "Marcos Piccinini"]
- s.date = %q{2009-10-23}
- #s.default_executable = %q{annotate}
- s.description = %q{Annotates Rails Models, routes, fixtures, and others based on the database schema.}
- s.email = ["alex@stinky.com", "ctran@pragmaquest.com", "x@nofxx.com"]
+ s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Cuong Tran", "Alex Chaffee", "Marcos Piccinini", "Turadg Aleahmad"]
+ s.date = "2011-09-02"
+ s.description = "When run, inserts table descriptions from db.schema into a comment block of relevant source code."
+ s.email = ["alex@stinky.com", "ctran@pragmaquest.com", "x@nofxx.com", "turadg@aleahmad.net"]
s.executables = ["annotate"]
s.extra_rdoc_files = [
"README.rdoc"
]
s.files = [
"History.txt",
- "README.rdoc",
- "VERSION.yml",
- "bin/annotate",
- "lib/annotate.rb",
- "lib/annotate/annotate_models.rb",
- "lib/annotate/annotate_routes.rb",
- "lib/tasks/annotate_models.rake",
- "lib/tasks/annotate_routes.rake",
- "spec/annotate/annotate_models_spec.rb",
- "spec/annotate/annotate_routes_spec.rb",
- "spec/annotate_spec.rb",
- "spec/spec.opts",
- "spec/spec_helper.rb",
- "tasks/migrate.rake"
- ]
- s.homepage = %q{http://github.com/ctran/annotate_models}
- s.rdoc_options = ["--charset=UTF-8"]
- s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.5}
- s.summary = %q{Annotates Rails Models, routes, fixtures, and others based on the database schema.}
- s.test_files = [
+ "README.rdoc",
+ "Rakefile",
+ "VERSION.yml",
+ "annotate.gemspec",
+ "bin/annotate",
+ "lib/annotate.rb",
+ "lib/annotate/annotate_models.rb",
+ "lib/annotate/annotate_routes.rb",
+ "lib/tasks/annotate_models.rake",
+ "lib/tasks/annotate_routes.rake",
"spec/annotate/annotate_models_spec.rb",
- "spec/annotate/annotate_routes_spec.rb",
- "spec/annotate_spec.rb",
- "spec/spec_helper.rb"
+ "spec/annotate/annotate_routes_spec.rb",
+ "spec/annotate_spec.rb",
+ "spec/spec.opts",
+ "spec/spec_helper.rb",
+ "tasks/migrate.rake",
+ "todo.txt"
]
- s.add_runtime_dependency('rake')
- s.add_development_dependency('jeweler')
- s.add_development_dependency('rspec', '~> 1.3.2')
- s.add_development_dependency('activesupport', '>= 2.1.0')
+ s.homepage = "http://github.com/ctran/annotate_models"
+ s.require_paths = ["lib"]
+ s.rubyforge_project = "annotate"
+ s.rubygems_version = "1.8.10"
+ s.summary = "Annotates Rails models, routes, fixtures, and others based on the database schema."
+ s.test_files = ["spec/annotate/annotate_models_spec.rb", "spec/annotate/annotate_routes_spec.rb", "spec/annotate_spec.rb", "spec/spec.opts", "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::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
+ s.add_development_dependency(%q<rspec>, [">= 0"])
else
+ s.add_dependency(%q<rspec>, [">= 0"])
end
else
+ s.add_dependency(%q<rspec>, [">= 0"])
end
end
+
View
@@ -2,8 +2,8 @@
require 'spec'
rescue LoadError
require 'rubygems'
- gem 'rspec'
- require 'spec'
+ gem 'rspec-core'
+ require 'rspec'
end
$:.unshift(File.dirname(__FILE__) + '/../lib')

0 comments on commit 634b6ac

Please sign in to comment.