From 024d08fc91b89e24397ca5ec7fea19892f000e0e Mon Sep 17 00:00:00 2001 From: Igor Alexandrov Date: Wed, 16 Oct 2013 00:01:26 +0400 Subject: [PATCH] Issue #18, Issue #19 + removed Jeweler --- .travis.yml | 2 +- Gemfile | 13 +-- Gemfile.lock | 170 +++++++++++++++++++++++------------ README.md | 18 ++-- Rakefile | 36 +------- VERSION | 1 - lib/wisepdf/rails.rb | 2 +- lib/wisepdf/rails/engine.rb | 4 +- lib/wisepdf/rails/railtie.rb | 2 +- lib/wisepdf/version.rb | 12 +++ pdf.gemspec | 66 -------------- test/helper_assets_test.rb | 8 +- test/helper_legacy_test.rb | 8 +- wisepdf.gemspec | 149 +++++++----------------------- 14 files changed, 183 insertions(+), 308 deletions(-) delete mode 100644 VERSION create mode 100644 lib/wisepdf/version.rb delete mode 100644 pdf.gemspec diff --git a/.travis.yml b/.travis.yml index 23ed7be..418ef34 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ language: ruby rvm: - - 1.9.2 - 1.9.3 + - 2.0.0 \ No newline at end of file diff --git a/Gemfile b/Gemfile index 1e9f768..8926307 100644 --- a/Gemfile +++ b/Gemfile @@ -1,12 +1,3 @@ -source "http://rubygems.org" +source 'http://rubygems.org' -group :development, :test do - gem 'sqlite3' - gem 'wkhtmltopdf-binary' - - gem "shoulda", ">= 0" - gem "bundler", ">= 1.0.0" - gem "jeweler" - - gem 'rails', '>=3.0.0' -end +gemspec \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 44ad441..a0a6574 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,12 +1,17 @@ +PATH + remote: . + specs: + wisepdf (1.3.0) + GEM remote: http://rubygems.org/ specs: - actionmailer (3.2.12) - actionpack (= 3.2.12) - mail (~> 2.4.4) - actionpack (3.2.12) - activemodel (= 3.2.12) - activesupport (= 3.2.12) + actionmailer (3.2.14) + actionpack (= 3.2.14) + mail (~> 2.5.4) + actionpack (3.2.14) + activemodel (= 3.2.14) + activesupport (= 3.2.14) builder (~> 3.0.0) erubis (~> 2.7.0) journey (~> 1.0.4) @@ -14,44 +19,61 @@ GEM rack-cache (~> 1.2) rack-test (~> 0.6.1) sprockets (~> 2.2.1) - activemodel (3.2.12) - activesupport (= 3.2.12) + activemodel (3.2.14) + activesupport (= 3.2.14) builder (~> 3.0.0) - activerecord (3.2.12) - activemodel (= 3.2.12) - activesupport (= 3.2.12) + activerecord (3.2.14) + activemodel (= 3.2.14) + activesupport (= 3.2.14) arel (~> 3.0.2) tzinfo (~> 0.3.29) - activeresource (3.2.12) - activemodel (= 3.2.12) - activesupport (= 3.2.12) - activesupport (3.2.12) - i18n (~> 0.6) + activeresource (3.2.14) + activemodel (= 3.2.14) + activesupport (= 3.2.14) + activesupport (3.2.14) + i18n (~> 0.6, >= 0.6.4) multi_json (~> 1.0) + addressable (2.3.5) arel (3.0.2) - bourne (1.1.2) - mocha (= 0.10.5) builder (3.0.4) + capybara (2.1.0) + mime-types (>= 1.16) + nokogiri (>= 1.3.3) + rack (>= 1.0.0) + rack-test (>= 0.5.4) + xpath (~> 2.0) + coffee-rails (3.2.2) + coffee-script (>= 2.2.0) + railties (~> 3.2.0) + coffee-script (2.2.0) + coffee-script-source + execjs + coffee-script-source (1.6.3) + coveralls (0.7.0) + multi_json (~> 1.3) + rest-client + simplecov (>= 0.7) + term-ansicolor + thor + crack (0.4.1) + safe_yaml (~> 0.9.0) + diff-lcs (1.2.4) erubis (2.7.0) - git (1.2.5) - hike (1.2.1) - i18n (0.6.4) - jeweler (1.8.4) - bundler (~> 1.0) - git (>= 1.2.5) - rake - rdoc + execjs (2.0.2) + faker (1.2.0) + i18n (~> 0.5) + hike (1.2.3) + i18n (0.6.5) journey (1.0.4) - json (1.7.7) - mail (2.4.4) - i18n (>= 0.4.0) + json (1.8.0) + mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) - metaclass (0.0.1) - mime-types (1.21) - mocha (0.10.5) - metaclass (~> 0.0.1) - multi_json (1.6.1) + mime-types (1.25) + mini_portile (0.5.1) + multi_json (1.8.2) + nokogiri (1.6.0) + mini_portile (~> 0.5.0) polyglot (0.3.3) rack (1.4.5) rack-cache (1.2) @@ -60,52 +82,82 @@ GEM rack rack-test (0.6.2) rack (>= 1.0) - rails (3.2.12) - actionmailer (= 3.2.12) - actionpack (= 3.2.12) - activerecord (= 3.2.12) - activeresource (= 3.2.12) - activesupport (= 3.2.12) + rails (3.2.14) + actionmailer (= 3.2.14) + actionpack (= 3.2.14) + activerecord (= 3.2.14) + activeresource (= 3.2.14) + activesupport (= 3.2.14) bundler (~> 1.0) - railties (= 3.2.12) - railties (3.2.12) - actionpack (= 3.2.12) - activesupport (= 3.2.12) + railties (= 3.2.14) + railties (3.2.14) + actionpack (= 3.2.14) + activesupport (= 3.2.14) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) thor (>= 0.14.6, < 2.0) - rake (10.0.3) + rake (10.1.0) rdoc (3.12.2) json (~> 1.4) - shoulda (3.3.2) - shoulda-context (~> 1.0.1) - shoulda-matchers (~> 1.4.1) - shoulda-context (1.0.2) - shoulda-matchers (1.4.2) + rest-client (1.6.7) + mime-types (>= 1.16) + rspec (2.14.1) + rspec-core (~> 2.14.0) + rspec-expectations (~> 2.14.0) + rspec-mocks (~> 2.14.0) + rspec-core (2.14.5) + rspec-expectations (2.14.3) + diff-lcs (>= 1.1.3, < 2.0) + rspec-mocks (2.14.3) + safe_yaml (0.9.7) + shoulda (3.5.0) + shoulda-context (~> 1.0, >= 1.0.1) + shoulda-matchers (>= 1.4.1, < 3.0) + shoulda-context (1.1.5) + shoulda-matchers (2.4.0) activesupport (>= 3.0.0) - bourne (~> 1.1.2) + simplecov (0.7.1) + multi_json (~> 1.0) + simplecov-html (~> 0.7.1) + simplecov-html (0.7.1) sprockets (2.2.2) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - sqlite3 (1.3.7) - thor (0.17.0) - tilt (1.3.5) - treetop (1.4.12) + sqlite3 (1.3.8) + term-ansicolor (1.2.2) + tins (~> 0.8) + thor (0.18.1) + tilt (1.4.1) + tins (0.12.0) + treetop (1.4.15) polyglot polyglot (>= 0.3.1) - tzinfo (0.3.36) + tzinfo (0.3.38) + webmock (1.9.3) + addressable (>= 2.2.7) + crack (>= 0.3.2) wkhtmltopdf-binary (0.9.9.1) + xpath (2.0.0) + nokogiri (~> 1.3) PLATFORMS ruby DEPENDENCIES - bundler (>= 1.0.0) - jeweler - rails (>= 3.0.0) + bundler + capybara + coffee-rails + coveralls + faker + rails (~> 3.2.13) + rake + rspec shoulda + simplecov sqlite3 + webmock (~> 1.9.0) + wisepdf! wkhtmltopdf-binary diff --git a/README.md b/README.md index 01d1c41..d3ec731 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,12 @@ Add this to your Gemfile: gem 'wisepdf' +if you don't already have wkhtmltopdf installed on your machine you can get up and running quickly by adding this to your Gemfile: + + gem 'wkhtmltopdf-binary' + then do: - + bundle install ## How does it work? @@ -125,10 +129,10 @@ If you need to just create a pdf and not display it: # create a pdf from a string pdf = Wisepdf::Writer.new.to_pdf('

Hello There!

') - + # or from your controller, using views & templates and all other options as normal pdf = render_to_string :pdf => "some_file_name" - + # then save to a file save_path = Rails.root.join('pdfs','filename.pdf') File.open(save_path, 'wb') do |file| @@ -200,7 +204,7 @@ You can put your default configuration, applied to all pdf's at "configure_wisep c.options = { :layout => "layout.html", :use_xserver => true, - :footer => { + :footer => { :right => "#{Date.today.year}", :font_size => 8, :spacing => 8 @@ -209,9 +213,9 @@ You can put your default configuration, applied to all pdf's at "configure_wisep :bottom => 15 } } - + end - + ### Problems with with wkhtmltopdf-0.10 and above? If you experience problems with wkhtmltopdf-0.10 and above like getting `Broken Pipe` error or something similar, then you probably should compile wkhtmltopdf from source. @@ -238,7 +242,7 @@ However, the wisepdf_* helpers will use file:// paths for assets when using :sho <%= params[:debug].present? ? image_tag('foo') : wisepdf_image_tag('foo') %> -## Production? +## Production? **wisepdf** is used at: diff --git a/Rakefile b/Rakefile index be22097..efc03f5 100644 --- a/Rakefile +++ b/Rakefile @@ -1,28 +1,6 @@ # encoding: utf-8 -require 'rubygems' -require 'bundler' -begin - Bundler.setup(:default, :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 = "wisepdf" - gem.homepage = "http://github.com/igor-alexandrov/wisepdf" - gem.license = "MIT" - gem.summary = "wkhtmltopdf for Rails done right" - gem.description = %Q{wisepdf uses the shell utility wkhtmltopdf to serve a PDF file to a user from HTML. In other words, rather than dealing with a PDF generation DSL of some sort, you simply write an HTML view as you would normally, and let pdf take care of the hard stuff.} - gem.email = "igor.alexandrov@gmail.com" - gem.authors = [ "Igor Alexandrov" ] -end -Jeweler::RubygemsDotOrgTasks.new - +require 'bundler/gem_tasks' require 'rake/testtask' Rake::TestTask.new(:test) do |test| test.libs << 'lib' << 'test' @@ -30,14 +8,4 @@ Rake::TestTask.new(:test) do |test| test.verbose = true end -task :default => :test - -require 'rdoc/task' -Rake::RDocTask.new do |rdoc| - version = File.exist?('VERSION') ? File.read('VERSION') : "" - - rdoc.rdoc_dir = 'rdoc' - rdoc.title = "wisepdf #{version}" - rdoc.rdoc_files.include('README*') - rdoc.rdoc_files.include('lib/**/*.rb') -end +task :default => :test \ No newline at end of file diff --git a/VERSION b/VERSION deleted file mode 100644 index 732aa7d..0000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -1.2.10 \ No newline at end of file diff --git a/lib/wisepdf/rails.rb b/lib/wisepdf/rails.rb index addfdec..dd86822 100644 --- a/lib/wisepdf/rails.rb +++ b/lib/wisepdf/rails.rb @@ -3,7 +3,7 @@ module Rails if ::Rails::VERSION::MAJOR == 2 require 'wisepdf/rails/legacy' elsif ::Rails::VERSION::MAJOR > 2 - if ::Rails::VERSION::MINOR < 1 + if ::Rails::VERSION::MAJOR == 3 && ::Rails::VERSION::MINOR < 1 require 'wisepdf/rails/railtie' else require 'wisepdf/rails/engine' diff --git a/lib/wisepdf/rails/engine.rb b/lib/wisepdf/rails/engine.rb index 84a70c5..1491cc7 100644 --- a/lib/wisepdf/rails/engine.rb +++ b/lib/wisepdf/rails/engine.rb @@ -1,9 +1,9 @@ module Wisepdf module Rails class Engine < ::Rails::Engine - initializer "wicked_pdf.register" do + initializer "wise_pdf.register" do ActionController::Base.send :include, Render - if ::Rails.configuration.assets.enabled + if !!(::Rails.configuration.assets.enabled) ActionView::Base.send :include, Helper::Assets else ActionView::Base.send :include, Helper::Legacy diff --git a/lib/wisepdf/rails/railtie.rb b/lib/wisepdf/rails/railtie.rb index 40745f8..3486f8f 100644 --- a/lib/wisepdf/rails/railtie.rb +++ b/lib/wisepdf/rails/railtie.rb @@ -1,7 +1,7 @@ module Wisepdf module Rails class Railtie < ::Rails::Railtie - initializer "wicked_pdf.register" do + initializer "wise_pdf.register" do ActionController::Base.send :include, Render ActionView::Base.send :include, Helper::Legacy end diff --git a/lib/wisepdf/version.rb b/lib/wisepdf/version.rb new file mode 100644 index 0000000..b6a839e --- /dev/null +++ b/lib/wisepdf/version.rb @@ -0,0 +1,12 @@ +# encoding: utf-8 + +module Wisepdf + module Version + MAJOR = 1 + MINOR = 3 + PATCH = 0 + BUILD = nil + + STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.') + end +end \ No newline at end of file diff --git a/pdf.gemspec b/pdf.gemspec deleted file mode 100644 index 6f75c15..0000000 --- a/pdf.gemspec +++ /dev/null @@ -1,66 +0,0 @@ -# Generated by jeweler -# 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 = "pdf" - s.version = "1.0.0" - - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= - s.authors = ["Igor Alexandrov"] - s.date = "2012-03-09" - s.description = "pdf uses the shell utility wkhtmltopdf to serve a PDF file to a user from HTML. In other words, rather than dealing with a PDF generation DSL of some sort, you simply write an HTML view as you would normally, and let pdf take care of the hard stuff." - s.email = "igor.alexandrov@gmail.com" - s.extra_rdoc_files = [ - "README.md" - ] - s.files = [ - "Gemfile", - "Gemfile.lock", - "MIT-LICENSE", - "README.md", - "Rakefile", - "VERSION", - "generators/pdf/pdf_generator.rb", - "generators/pdf/templates/configure_pdf.rb", - "lib/generators/pdf_generator.rb", - "lib/pdf.rb", - "lib/pdf/configuration.rb", - "lib/pdf/errors.rb", - "lib/pdf/helper.rb", - "lib/pdf/rails.rb", - "lib/pdf/rails/engine.rb", - "lib/pdf/rails/legacy.rb", - "lib/pdf/rails/railtie.rb", - "lib/pdf/render.rb", - "lib/pdf/tempfile.rb", - "lib/pdf/writer.rb", - "test/fixtures/wicked.css", - "test/helper_test.rb", - "test/test_helper.rb", - "test/wicked_pdf_helper_test.rb", - "test/writer_test.rb" - ] - s.homepage = "http://github.com/igor-alexandrov/pdf" - s.licenses = ["MIT"] - s.require_paths = ["lib"] - s.rubygems_version = "1.8.15" - s.summary = "PDF generator for Ruby on Rails" - - if s.respond_to? :specification_version then - s.specification_version = 3 - - if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then - s.add_development_dependency(%q, ["~> 1.0.0"]) - s.add_development_dependency(%q, ["~> 1.6.4"]) - else - s.add_dependency(%q, ["~> 1.0.0"]) - s.add_dependency(%q, ["~> 1.6.4"]) - end - else - s.add_dependency(%q, ["~> 1.0.0"]) - s.add_dependency(%q, ["~> 1.6.4"]) - end -end - diff --git a/test/helper_assets_test.rb b/test/helper_assets_test.rb index 3876e64..0e4df2e 100644 --- a/test/helper_assets_test.rb +++ b/test/helper_assets_test.rb @@ -5,21 +5,21 @@ class AssetsHelperTest < ActionView::TestCase context "wisepdf_stylesheet_tag" do should 'include stylesheet if no extension is given' do - assert_match wisepdf_stylesheet_tag('wisepdf').strip, /Wisepdf styles/ + assert_match /Wisepdf styles/, wisepdf_stylesheet_tag('wisepdf').strip end should 'include stylesheet if .css extension is given' do - assert_match wisepdf_stylesheet_tag('wisepdf.css').strip, /Wisepdf styles/ + assert_match /Wisepdf styles/, wisepdf_stylesheet_tag('wisepdf.css').strip end end context "wisepdf_javascript_tag" do should 'include javascript if no extension is given' do - assert_match wisepdf_javascript_tag('wisepdf').strip, /Wisepdf javascript/ + assert_match /Wisepdf javascript/, wisepdf_javascript_tag('wisepdf').strip end should 'include javascript if .js extension is given' do - assert_match wisepdf_javascript_tag('wisepdf.js').strip, /Wisepdf javascript/ + assert_match /Wisepdf javascript/, wisepdf_javascript_tag('wisepdf.js').strip end end end diff --git a/test/helper_legacy_test.rb b/test/helper_legacy_test.rb index a59275d..de437b7 100644 --- a/test/helper_legacy_test.rb +++ b/test/helper_legacy_test.rb @@ -5,21 +5,21 @@ class LegacyHelperTest < ActionView::TestCase context "wisepdf_stylesheet_tag" do should 'include stylesheet if no extension is given' do - assert_match wisepdf_stylesheet_tag('wisepdf').strip, /Wisepdf styles/ + assert_match /Wisepdf styles/, wisepdf_stylesheet_tag('wisepdf').strip end should 'include stylesheet if .css extension is given' do - assert_match wisepdf_stylesheet_tag('wisepdf.css').strip, /Wisepdf styles/ + assert_match /Wisepdf styles/, wisepdf_stylesheet_tag('wisepdf.css').strip end end context "wisepdf_javascript_tag" do should 'include javascript if no extension is given' do - assert_match wisepdf_javascript_tag('wisepdf').strip, /Wisepdf javascript/ + assert_match /Wisepdf javascript/, wisepdf_javascript_tag('wisepdf').strip end should 'include javascript if .js extension is given' do - assert_match wisepdf_javascript_tag('wisepdf.js').strip, /Wisepdf javascript/ + assert_match /Wisepdf javascript/, wisepdf_javascript_tag('wisepdf.js').strip end end end diff --git a/wisepdf.gemspec b/wisepdf.gemspec index bb8dc8d..483be2b 100644 --- a/wisepdf.gemspec +++ b/wisepdf.gemspec @@ -1,122 +1,37 @@ -# Generated by jeweler -# DO NOT EDIT THIS FILE DIRECTLY -# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec' -# -*- encoding: utf-8 -*- +# encoding: utf-8 -Gem::Specification.new do |s| - s.name = "wisepdf" - s.version = "1.2.10" +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +require 'wisepdf/version' - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= - s.authors = ["Igor Alexandrov"] - s.date = "2013-03-11" - s.description = "wisepdf uses the shell utility wkhtmltopdf to serve a PDF file to a user from HTML. In other words, rather than dealing with a PDF generation DSL of some sort, you simply write an HTML view as you would normally, and let pdf take care of the hard stuff." - s.email = "igor.alexandrov@gmail.com" - s.extra_rdoc_files = [ - "README.md" - ] - s.files = [ - ".travis.yml", - "Gemfile", - "Gemfile.lock", - "MIT-LICENSE", - "README.md", - "Rakefile", - "VERSION", - "generators/wisepdf/templates/configure_wisepdf.rb", - "generators/wisepdf/wisepdf_generator.rb", - "lib/generators/wisepdf_generator.rb", - "lib/wisepdf.rb", - "lib/wisepdf/configuration.rb", - "lib/wisepdf/errors.rb", - "lib/wisepdf/ext.rb", - "lib/wisepdf/helper.rb", - "lib/wisepdf/parser.rb", - "lib/wisepdf/rails.rb", - "lib/wisepdf/rails/engine.rb", - "lib/wisepdf/rails/legacy.rb", - "lib/wisepdf/rails/railtie.rb", - "lib/wisepdf/render.rb", - "lib/wisepdf/writer.rb", - "pdf.gemspec", - "test/application_controller_test.rb", - "test/configuration_test.rb", - "test/dummy/README.rdoc", - "test/dummy/Rakefile", - "test/dummy/app/assets/javascripts/application.js", - "test/dummy/app/assets/javascripts/wisepdf.js", - "test/dummy/app/assets/stylesheets/application.css", - "test/dummy/app/assets/stylesheets/wisepdf.css", - "test/dummy/app/controllers/application_controller.rb", - "test/dummy/app/helpers/application_helper.rb", - "test/dummy/app/mailers/.gitkeep", - "test/dummy/app/models/.gitkeep", - "test/dummy/app/views/application/index.pdf.erb", - "test/dummy/app/views/layouts/application.html.erb", - "test/dummy/app/views/layouts/pdf.html.erb", - "test/dummy/config.ru", - "test/dummy/config/application.rb", - "test/dummy/config/boot.rb", - "test/dummy/config/database.yml", - "test/dummy/config/environment.rb", - "test/dummy/config/environments/development.rb", - "test/dummy/config/environments/production.rb", - "test/dummy/config/environments/test.rb", - "test/dummy/config/initializers/backtrace_silencers.rb", - "test/dummy/config/initializers/inflections.rb", - "test/dummy/config/initializers/mime_types.rb", - "test/dummy/config/initializers/secret_token.rb", - "test/dummy/config/initializers/session_store.rb", - "test/dummy/config/initializers/wrap_parameters.rb", - "test/dummy/config/locales/en.yml", - "test/dummy/config/routes.rb", - "test/dummy/lib/assets/.gitkeep", - "test/dummy/log/.gitkeep", - "test/dummy/public/404.html", - "test/dummy/public/422.html", - "test/dummy/public/500.html", - "test/dummy/public/favicon.ico", - "test/dummy/public/javascripts/wisepdf.js", - "test/dummy/public/stylesheets/wisepdf.css", - "test/dummy/script/rails", - "test/helper.rb", - "test/helper_assets_test.rb", - "test/helper_legacy_test.rb", - "test/parser_test.rb", - "test/writer_test.rb", - "wisepdf.gemspec" - ] - s.homepage = "http://github.com/igor-alexandrov/wisepdf" - s.licenses = ["MIT"] - s.require_paths = ["lib"] - s.rubygems_version = "1.8.24" - s.summary = "wkhtmltopdf for Rails done right" +Gem::Specification.new do |gem| + gem.name = 'wisepdf' + gem.version = Wisepdf::Version::STRING + gem.authors = ['Igor Alexandrov'] + gem.email = 'igor.alexandrov@gmail.com' + gem.summary = "wkhtmltopdf for Rails done right" + gem.description = "Wisepdf uses the shell utility wkhtmltopdf to serve a PDF file to a user from HTML. In other words, rather than dealing with a PDF generation DSL of some sort, you simply write an HTML view as you would normally, and let pdf take care of the hard stuff." + gem.homepage = 'http://github.com/igor-alexandrov/wisepdf' + gem.licenses = ['MIT'] - if s.respond_to? :specification_version then - s.specification_version = 3 + gem.files = `git ls-files | grep -v 'build/*'`.split($/) + gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) } + gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) + gem.require_paths = ["lib"] - if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then - s.add_development_dependency(%q, [">= 0"]) - s.add_development_dependency(%q, [">= 0"]) - s.add_development_dependency(%q, [">= 0"]) - s.add_development_dependency(%q, [">= 1.0.0"]) - s.add_development_dependency(%q, ["~> 1.6.4"]) - s.add_development_dependency(%q, [">= 3.0.0"]) - else - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 1.0.0"]) - s.add_dependency(%q, ["~> 1.6.4"]) - s.add_dependency(%q, [">= 3.0.0"]) - end - else - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 1.0.0"]) - s.add_dependency(%q, ["~> 1.6.4"]) - s.add_dependency(%q, [">= 3.0.0"]) - end -end + gem.add_development_dependency 'rspec' + gem.add_development_dependency 'webmock', '~> 1.9.0' + gem.add_development_dependency 'shoulda' + gem.add_development_dependency 'simplecov' + gem.add_development_dependency 'coveralls' + gem.add_development_dependency 'rake' + gem.add_development_dependency 'bundler' + gem.add_development_dependency 'sqlite3' + gem.add_development_dependency 'faker' + gem.add_development_dependency 'capybara' + gem.add_development_dependency 'rails', '~> 3.2.13' + gem.add_development_dependency 'coffee-rails' + + gem.add_development_dependency 'wkhtmltopdf-binary' +end \ No newline at end of file