Permalink
Browse files

updated gem to be bundlerified

  • Loading branch information...
1 parent b51d1eb commit 2167bfac13c2fe72e790150379d04a1a52cec7d1 @shawn42 shawn42 committed Sep 27, 2011
Showing with 84 additions and 20 deletions.
  1. +12 −0 .gitignore
  2. +4 −0 Gemfile
  3. +3 −17 Rakefile
  4. +37 −0 Rakefile.old
  5. +1 −3 lib/publisher.rb
  6. +3 −0 lib/publisher/version.rb
  7. +24 −0 publisher.gemspec
View
@@ -0,0 +1,12 @@
+pkg
+*.swp
+*.log
+doc
+coverage
+.DS_Store
+.yardoc
+tmp
+tags
+ctags
+.bundle
+*.lock
View
@@ -0,0 +1,4 @@
+source "http://rubygems.org"
+
+# Specify your gem's dependencies in publisher.gemspec
+gemspec
View
@@ -1,7 +1,5 @@
-require 'rubygems'
-require 'hoe'
-require './lib/publisher.rb'
-require 'rake'
+require "bundler/gem_tasks"
+
require 'rake/testtask'
task :default => [ :test ]
@@ -13,19 +11,7 @@ Rake::TestTask.new("test") { |t|
t.verbose = true
}
-#
-# Hoe stuff: rubyforge project release
-#
-Hoe.new('publisher', Publisher::VERSION) do |p|
- p.rubyforge_name = 'atomicobjectrb'
- p.author = 'Atomic Object'
- p.email = 'dev@atomicobject.com'
- p.summary = 'Event subscription and firing mechanism'
- p.description = p.paragraphs_of('README.rdoc', 2..5).join("\n\n")
- p.url = p.paragraphs_of('README.rdoc', 1).first.gsub(/\* /,'').split(/\n/)
- p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
-end
-
+# See crosby or fletcher about these tasks
if File.exists?("../tools/")
load "../tools/tasks/homepage.rake"
load "../tools/tasks/release_tagging.rake"
View
@@ -0,0 +1,37 @@
+require 'rubygems'
+require 'hoe'
+require './lib/publisher.rb'
+require 'rake'
+require 'rake/testtask'
+
+task :default => [ :test ]
+
+desc "Run the unit tests in test"
+Rake::TestTask.new("test") { |t|
+ t.libs << "test"
+ t.pattern = 'test/**/*_test.rb'
+ t.verbose = true
+}
+
+#
+# Hoe stuff: rubyforge project release
+#
+Hoe.new('publisher', Publisher::VERSION) do |p|
+ p.rubyforge_name = 'atomicobjectrb'
+ p.author = 'Atomic Object'
+ p.email = 'dev@atomicobject.com'
+ p.summary = 'Event subscription and firing mechanism'
+ p.description = 'publisher is a module for extending a class with event subscription and firing capabilities. This is helpful for implementing objects that participate in the Observer design pattern.'
+ p.url = 'http://atomicobject.github.com/publisher'
+
+ p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
+end
+
+if File.exists?("../tools/")
+ load "../tools/tasks/homepage.rake"
+ load "../tools/tasks/release_tagging.rake"
+ ReleaseTagging.new do |t|
+ t.package = "publisher"
+ t.version = Publisher::VERSION
+ end
+end
View
@@ -1,7 +1,5 @@
-# See README.txt for synopsis
+# See README.rdoc for synopsis
module Publisher
- VERSION = "1.1.2" #:nodoc:#
-
# Use this method (or one of the aliases) to declare which events you support
# Once invoked, your class will have the neccessary supporting methods for subscribing and firing.
def has_events(*args)
View
@@ -0,0 +1,3 @@
+module Publisher
+ VERSION = "1.1.2"
+end
View
@@ -0,0 +1,24 @@
+# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require "publisher/version"
+
+Gem::Specification.new do |s|
+ s.rubyforge_project = "publisher"
+ s.name = "publisher"
+ s.version = Publisher::VERSION
+ s.authors = ["Atomic Object"]
+ s.email = ["dev@atomicobject.com"]
+ s.homepage = 'http://atomicobject.github.com/publisher'
+
+ s.summary = 'Event subscription and firing mechanism'
+ s.description = 'publisher is a module for extending a class with event subscription and firing capabilities. This is helpful for implementing objects that participate in the Observer design pattern.'
+
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.require_paths = ["lib"]
+
+ # specify any dependencies here; for example:
+ # s.add_development_dependency "rspec"
+ # s.add_runtime_dependency "rest-client"
+end

0 comments on commit 2167bfa

Please sign in to comment.