Permalink
Browse files

Addd a gemspec

  • Loading branch information...
1 parent 9835e26 commit bf486bbbed7695067e07da3b503c15db78612d66 @jferris jferris committed Jan 13, 2010
Showing with 48 additions and 1 deletion.
  1. +1 −0 .gitignore
  2. +44 −0 Rakefile
  3. +0 −1 lib/hoptoad_notifier.rb
  4. +3 −0 lib/hoptoad_notifier/version.rb
View
@@ -10,3 +10,4 @@ rdoc/
tags
.yardoc
doc
+pkg
View
@@ -1,6 +1,7 @@
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
+require 'rake/gempackagetask'
desc 'Default: run unit tests.'
task :default => :test
@@ -27,3 +28,46 @@ begin
end
rescue LoadError
end
+
+PLUGIN_ROOT = File.dirname(__FILE__).freeze
+VERSION_FILE = File.join(PLUGIN_ROOT, 'lib', 'hoptoad_notifier', 'version')
+
+require VERSION_FILE
+
+gemspec = Gem::Specification.new do |s|
+ s.name = %q{hoptoad_notifier}
+ s.version = HoptoadNotifier::VERSION
+ s.summary = %q{Send your application errors to our hosted service and reclaim your inbox.}
+
+ s.files = FileList['[A-Z]*', 'generators/**/*.*', 'lib/**/*.rb',
+ 'test/**/*.rb', 'rails/**.*.rb', 'recipes/**/*.rb',
+ 'tasks/**/*.rake']
+ s.require_path = 'lib'
+ s.test_files = Dir[*['test/**/*_test.rb']]
+
+ s.has_rdoc = true
+ s.extra_rdoc_files = ["README.rdoc"]
+ s.rdoc_options = ['--line-numbers', "--main", "README.rdoc"]
+
+ s.authors = ["thoughtbot, inc"]
+ s.email = %q{support@hoptoadapp.com}
+ s.homepage = "http://www.hoptoadapp.com"
+
+ s.platform = Gem::Platform::RUBY
+end
+
+Rake::GemPackageTask.new gemspec do |pkg|
+ pkg.need_tar = true
+ pkg.need_zip = true
+end
+
+desc "Clean files generated by rake tasks"
+task :clobber => [:clobber_rdoc, :clobber_package]
+
+desc "Generate a gemspec file"
+task :gemspec do
+ File.open("#{gemspec.name}.gemspec", 'w') do |f|
+ f.write gemspec.to_ruby
+ end
+end
+
@@ -11,7 +11,6 @@
# Gem for applications to automatically post errors to the Hoptoad of their choice.
module HoptoadNotifier
- VERSION = "2.0.21"
API_VERSION = "2.0"
LOG_PREFIX = "** [Hoptoad] "
@@ -0,0 +1,3 @@
+module HoptoadNotifier
+ VERSION = "2.0.21".freeze
+end

0 comments on commit bf486bb

Please sign in to comment.