From a58648a35c5604625fbfb9fdbcbe0ab9948fd96b Mon Sep 17 00:00:00 2001 From: Sam Woodard Date: Sun, 19 Feb 2012 10:17:54 -0800 Subject: [PATCH 1/3] use current versioning style to make Rake and gemspec work --- VERSION | 1 - lib/scribd_fu/version.rb | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) delete mode 100644 VERSION create mode 100644 lib/scribd_fu/version.rb diff --git a/VERSION b/VERSION deleted file mode 100644 index da37822..0000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -2.0.11 \ No newline at end of file diff --git a/lib/scribd_fu/version.rb b/lib/scribd_fu/version.rb new file mode 100644 index 0000000..e07fcd8 --- /dev/null +++ b/lib/scribd_fu/version.rb @@ -0,0 +1,3 @@ +module ScribdFu + VERSION = "2.1.0" +end From a6038543d4bdbdde09e86d451194e9e2d80b6d50 Mon Sep 17 00:00:00 2001 From: Sam Woodard Date: Sun, 19 Feb 2012 10:16:57 -0800 Subject: [PATCH 2/3] use git for gemspec and no Jewler --- scribd_fu.gemspec | 69 ++++++++++++----------------------------------- 1 file changed, 17 insertions(+), 52 deletions(-) diff --git a/scribd_fu.gemspec b/scribd_fu.gemspec index ad6c42a..7834cfc 100644 --- a/scribd_fu.gemspec +++ b/scribd_fu.gemspec @@ -1,58 +1,23 @@ -# Generated by jeweler -# DO NOT EDIT THIS FILE DIRECTLY -# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec' # -*- encoding: utf-8 -*- +require File.expand_path('../lib/scribd_fu/version', __FILE__) -Gem::Specification.new do |s| - s.name = %q{scribd_fu} - s.version = "2.0.11" +Gem::Specification.new do |gem| + gem.authors = ["Matt Darby"] + gem.email = ["matt@matt-darby.com"] + gem.description = %q{A Rails gem that streamlines interactions with the Scribd service} + gem.summary = %q{A Rails gem that streamlines interactions with the Scribd service} + gem.homepage = "http://github.com/mdarby/scribd_fu" - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= - s.authors = ["Matt Darby"] - s.date = %q{2011-03-29} - s.description = %q{A Rails gem that streamlines interactions with the Scribd service} - s.email = %q{matt@matt-darby.com} - s.extra_rdoc_files = [ - "LICENSE", - "README.textile" - ] - s.files = [ - ".document", - "LICENSE", - "README.textile", - "Rakefile", - "VERSION", - "generators/scribd_fu/scribd_fu_generator.rb", - "generators/scribd_fu/templates/scribd_fu.yml", - "init.rb", - "lib/scribd_fu.rb", - "lib/scribd_fu/attachment_fu.rb", - "lib/scribd_fu/paperclip.rb", - "scribd_fu.gemspec", - "spec/database.yml", - "spec/scribd_fu.yml", - "spec/scribd_fu_spec.rb", - "spec/spec_helper.rb" - ] - s.homepage = %q{http://github.com/mdarby/scribd_fu} - s.require_paths = ["lib"] - s.rubygems_version = %q{1.6.1} - s.summary = %q{A Rails gem that streamlines interactions with the Scribd service} - s.test_files = [ - "spec/scribd_fu_spec.rb", - "spec/spec_helper.rb" - ] + gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } + gem.files = `git ls-files`.split("\n") + gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") + gem.name = "scribd_fu" + gem.require_paths = ["lib"] + gem.version = ScribdFu::VERSION - if s.respond_to? :specification_version then - s.specification_version = 3 + gem.add_runtime_dependency "rscribd" - if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then - s.add_runtime_dependency(%q, [">= 0"]) - else - s.add_dependency(%q, [">= 0"]) - end - else - s.add_dependency(%q, [">= 0"]) - end + gem.add_development_dependency "rspec" + gem.add_development_dependency "rails" + gem.add_development_dependency "sqlite3" end - From 4ca0def6e22b10a1d350918733ad4a73ae4132a3 Mon Sep 17 00:00:00 2001 From: Sam Woodard Date: Sun, 19 Feb 2012 10:15:59 -0800 Subject: [PATCH 3/3] bring Rakefile up to modern days --- Rakefile | 52 +++++++++------------------------------------------- 1 file changed, 9 insertions(+), 43 deletions(-) diff --git a/Rakefile b/Rakefile index 9356bb9..a0dad8b 100644 --- a/Rakefile +++ b/Rakefile @@ -1,56 +1,22 @@ -require 'rubygems' -require 'rake' -require 'spec/rake/spectask' - -begin - require 'jeweler' - Jeweler::Tasks.new do |gem| - gem.name = "scribd_fu" - gem.summary = %Q{A Rails gem that streamlines interactions with the Scribd service} - gem.description = %Q{A Rails gem that streamlines interactions with the Scribd service} - gem.email = "matt@matt-darby.com" - gem.homepage = "http://github.com/mdarby/scribd_fu" - gem.authors = ["Matt Darby"] - gem.add_dependency('rscribd') - # 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: sudo gem install jeweler" -end +#!/usr/bin/env rake +require "bundler/gem_tasks" +require "rspec/core/rake_task" desc "Run all specs" -Spec::Rake::SpecTask.new('spec') do |t| - t.spec_files = FileList['spec/*_spec.rb'] -end +RSpec::Core::RakeTask.new :spec + desc "Run all specs with RCov" -Spec::Rake::SpecTask.new('coverage') do |t| - t.spec_files = FileList['spec/*_spec.rb'] +RSpec::Core::RakeTask.new(:coverage) do |t| t.rcov = true end -task :test => :check_dependencies - -begin - require 'cucumber/rake/task' - Cucumber::Rake::Task.new(:features) +task :default => :spec - task :features => :check_dependencies -rescue LoadError - task :features do - abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber" - end -end - -task :default => :test - -require 'rake/rdoctask' +require 'rdoc/task' Rake::RDocTask.new do |rdoc| - version = File.exist?('VERSION') ? File.read('VERSION') : "" - rdoc.rdoc_dir = 'rdoc' - rdoc.title = "scribd_fu #{version}" + rdoc.title = "scribd_fu #{ScribdFu::VERSION}" rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('lib/**/*.rb') end