Skip to content
This repository
Newer
Older
100644 125 lines (103 sloc) 3.659 kb
34a31064 » jyurek
2007-12-18 Added hoptoad_notifier
1 require 'rake'
2 require 'rake/testtask'
3 require 'rake/rdoctask'
bf486bbb » jferris
2010-01-13 Addd a gemspec
4 require 'rake/gempackagetask'
7df97d79 » jferris
2010-01-13 Added a test for the installation process
5 require 'cucumber/rake/task'
34a31064 » jyurek
2007-12-18 Added hoptoad_notifier
6
7 desc 'Default: run unit tests.'
7df97d79 » jferris
2010-01-13 Added a test for the installation process
8 task :default => [:test, :cucumber]
34a31064 » jyurek
2007-12-18 Added hoptoad_notifier
9
e1e6a383 » mike-burns
2010-01-04 Change wording to refer to the gem instead of plugin, and start a lis…
10 desc 'Test the hoptoad_notifier gem.'
34a31064 » jyurek
2007-12-18 Added hoptoad_notifier
11 Rake::TestTask.new(:test) do |t|
12 t.libs << 'lib'
13 t.pattern = 'test/**/*_test.rb'
14 t.verbose = true
15 end
16
b1ece683 » qrush
2009-03-18 Vendoring ginger and adding rake ginger task
17 desc 'Run ginger tests'
18 task :ginger do
19 $LOAD_PATH << File.join(*%w[vendor ginger lib])
20 ARGV.clear
21 ARGV << 'test'
22 load File.join(*%w[vendor ginger bin ginger])
23 end
c4e26cbe » qrush
2009-08-20 Starting YARD'ing up the plugin
24
25 begin
26 require 'yard'
27 YARD::Rake::YardocTask.new do |t|
df14a504 » qrush
2009-08-21 Removing INSTALL and making sure the testing and license file show up
28 t.files = ['lib/**/*.rb', 'TESTING.rdoc']
c4e26cbe » qrush
2009-08-20 Starting YARD'ing up the plugin
29 end
30 rescue LoadError
31 end
bf486bbb » jferris
2010-01-13 Addd a gemspec
32
7df97d79 » jferris
2010-01-13 Added a test for the installation process
33 GEM_ROOT = File.dirname(__FILE__).freeze
34 VERSION_FILE = File.join(GEM_ROOT, 'lib', 'hoptoad_notifier', 'version')
bf486bbb » jferris
2010-01-13 Addd a gemspec
35
36 require VERSION_FILE
37
38 gemspec = Gem::Specification.new do |s|
39 s.name = %q{hoptoad_notifier}
40 s.version = HoptoadNotifier::VERSION
41 s.summary = %q{Send your application errors to our hosted service and reclaim your inbox.}
42
43 s.files = FileList['[A-Z]*', 'generators/**/*.*', 'lib/**/*.rb',
243db663 » jferris
2010-01-21 Include rescue.erb in the gem (bumped to 2.1.2)
44 'test/**/*.rb', 'rails/**/*.rb', 'script/*',
45 'lib/templates/*.erb']
bf486bbb » jferris
2010-01-13 Addd a gemspec
46 s.require_path = 'lib'
47 s.test_files = Dir[*['test/**/*_test.rb']]
48
49 s.has_rdoc = true
50 s.extra_rdoc_files = ["README.rdoc"]
51 s.rdoc_options = ['--line-numbers', "--main", "README.rdoc"]
52
59a9be6d » qrush
2010-01-27 Bump to 2.1.3 and adding dependencies to the gemspec
53 s.add_runtime_dependency("activesupport")
54 s.add_development_dependency("activerecord")
55 s.add_development_dependency("actionpack")
56 s.add_development_dependency("jferris-mocha")
57 s.add_development_dependency("nokogiri")
58 s.add_development_dependency("shoulda")
59
bf486bbb » jferris
2010-01-13 Addd a gemspec
60 s.authors = ["thoughtbot, inc"]
61 s.email = %q{support@hoptoadapp.com}
62 s.homepage = "http://www.hoptoadapp.com"
63
64 s.platform = Gem::Platform::RUBY
65 end
66
67 Rake::GemPackageTask.new gemspec do |pkg|
68 pkg.need_tar = true
69 pkg.need_zip = true
70 end
71
72 desc "Clean files generated by rake tasks"
73 task :clobber => [:clobber_rdoc, :clobber_package]
74
75 desc "Generate a gemspec file"
76 task :gemspec do
77 File.open("#{gemspec.name}.gemspec", 'w') do |f|
78 f.write gemspec.to_ruby
79 end
80 end
81
7df97d79 » jferris
2010-01-13 Added a test for the installation process
82 LOCAL_GEM_ROOT = File.join(GEM_ROOT, 'tmp', 'local_gems').freeze
1f878913 » jferris
2010-01-19 Added integration coverage and fixes for older versions of Rails
83 RAILS_VERSIONS = IO.read('SUPPORTED_RAILS_VERSIONS').strip.split("\n")
84 LOCAL_GEMS = [['sham_rack', nil], ['capistrano', nil], ['sqlite3-ruby', nil]] +
85 RAILS_VERSIONS.collect { |version| ['rails', version] }
7df97d79 » jferris
2010-01-13 Added a test for the installation process
86
87 task :vendor_test_gems do
1f878913 » jferris
2010-01-19 Added integration coverage and fixes for older versions of Rails
88 LOCAL_GEMS.each do |gem_name, version|
89 gem_file_pattern = [gem_name, version || '*'].compact.join('-')
90 version_option = version ? "-v #{version}" : ''
91 pattern = File.join(LOCAL_GEM_ROOT, 'gems', "#{gem_file_pattern}")
7df97d79 » jferris
2010-01-13 Added a test for the installation process
92 existing = Dir.glob(pattern).first
93 unless existing
1f878913 » jferris
2010-01-19 Added integration coverage and fixes for older versions of Rails
94 command = "gem install -i #{LOCAL_GEM_ROOT} --no-ri --no-rdoc #{version_option} #{gem_name}"
95 puts "Vendoring #{gem_file_pattern}..."
7df97d79 » jferris
2010-01-13 Added a test for the installation process
96 unless system(command)
97 $stderr.puts "Command failed: #{command}"
98 end
99 end
100 end
101 end
102
103 Cucumber::Rake::Task.new(:cucumber) do |t|
104 t.fork = true
105 t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'progress')]
106 end
107
108 task :cucumber => [:gemspec, :vendor_test_gems]
1f878913 » jferris
2010-01-19 Added integration coverage and fixes for older versions of Rails
109
110 OLD_RAILS_VERSIONS = RAILS_VERSIONS[0...-1]
111
112 namespace :cucumber do
113 namespace :rails do
114 OLD_RAILS_VERSIONS.each do |version|
115 desc "Test integration of the gem with Rails #{version}"
116 task version do
117 ENV['RAILS_VERSION'] = version
118 system("cucumber --format progress features/rails.feature")
119 end
120 end
121
122 desc "Test integration of the gem with all Rails versions"
123 task :all => [:cucumber, *OLD_RAILS_VERSIONS]
124 end
125 end
Something went wrong with that request. Please try again.