Permalink
Browse files

Updates gem structure to follow Bundler best practices

  • Loading branch information...
1 parent 140d5c1 commit 8d1eade96aabed5bb8d3e7a83e9e055dd2bcc557 @stephenmckinney stephenmckinney committed Dec 2, 2012
Showing with 93 additions and 146 deletions.
  1. +17 −1 .gitignore
  2. +15 −0 DEVELOPMENT
  3. +4 −0 Gemfile
  4. +22 −0 LICENSE.txt
  5. +6 −15 Rakefile
  6. +7 −25 Readme.md
  7. +0 −23 lib/pomo.rb
  8. +1 −1 lib/pomo/version.rb
  9. +21 −38 pomo.gemspec
  10. +0 −2 spec/spec.opts
  11. +0 −13 tasks/docs.rake
  12. +0 −3 tasks/gemspec.rake
  13. +0 −25 tasks/spec.rake
View
@@ -1 +1,17 @@
-.pomo
+*.gem
+*.rbc
+.bundle
+.config
+.yardoc
+Gemfile.lock
+InstalledFiles
+_yardoc
+coverage
+doc/
+lib/bundler/man
+pkg
+rdoc
+spec/reports
+test/tmp
+test/version_tmp
+tmp
View
@@ -0,0 +1,15 @@
+To run the development rake tasks, you need bundler installed.
+
+Before you push any changes, run the RSpec suite:
+
+ $ rake spec
+
+To build a new version of the gem:
+
+ $ rake build
+
+To push the new version to Rubygems:
+
+ $ rake release
+
+(http://rubygems.org/gems/pomo)
View
@@ -0,0 +1,4 @@
+source 'https://rubygems.org'
+
+# Specify your gem's dependencies in pomo.gemspec
+gemspec
View
@@ -0,0 +1,22 @@
+Copyright (c) 2009 TJ Holowaychuk <tj@vision-media.ca>
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -1,17 +1,8 @@
+require "rspec/core/rake_task"
+require "bundler/gem_tasks"
-$:.unshift 'lib'
-require 'pomo'
-require 'rubygems'
-require 'rake'
-require 'echoe'
-
-Echoe.new "pomo", Pomo::VERSION do |p|
- p.author = "TJ Holowaychuk"
- p.email = "tj@vision-media.ca"
- p.summary = "Pomodoro time management for the command-line"
- p.url = "http://github.com/visionmedia/pomo"
- p.runtime_dependencies << 'commander >=4.0.2'
- p.runtime_dependencies << 'growl >=1.0.3'
+desc "Run specs"
+RSpec::Core::RakeTask.new do |t|
+ t.verbose = false
+ t.rspec_opts = '--color'
end
-
-Dir['tasks/**/*.rake'].sort.each { |f| load f }
View
@@ -131,28 +131,10 @@ Taken from `pomo help`:
$ pomo init
-## License
-
-> (The MIT License)
->
-> Copyright (c) 2009 TJ Holowaychuk <tj@vision-media.ca>
->
-> Permission is hereby granted, free of charge, to any person
-> obtaining a copy of this software and associated documentation files
-> (the 'Software'), to deal in the Software without restriction,
-> including without limitation the rights to use, copy, modify, merge,
-> publish, distribute, sublicense, an d/or sell copies of the
-> Software, and to permit persons to whom the Software is furnished to
-> do so, subject to the following conditions:
->
-> The above copyright notice and this permission notice shall be
-> included in all copies or substantial portions of the Software.
->
-> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-> BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-> ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-> CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-> THE SOFTWARE.
+## Contributing
+
+1. Fork it
+2. Create your feature branch (`git checkout -b my-new-feature`)
+3. Commit your changes (`git commit -am 'Add some feature'`)
+4. Push to the branch (`git push origin my-new-feature`)
+5. Create new Pull Request
View
@@ -1,26 +1,3 @@
-#--
-# Copyright (c) 2009 TJ Holowaychuk <tj@vision-media.ca>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#++
-
require 'yaml'
require 'terminal-notifier' if /darwin/ =~ RUBY_PLATFORM
require 'growl' if /darwin/ =~ RUBY_PLATFORM
View
@@ -1,4 +1,4 @@
module Pomo
VERSION = '1.0.1'
-end
+end
View
@@ -1,44 +1,27 @@
# -*- encoding: utf-8 -*-
+lib = File.expand_path('../lib', __FILE__)
+$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
+require 'pomo/version'
-Gem::Specification.new do |s|
- s.name = %q{pomo}
- s.version = "1.0.1"
+Gem::Specification.new do |gem|
+ gem.name = "pomo"
+ gem.version = Pomo::VERSION
+ gem.authors = ["TJ Holowaychuk"]
+ gem.email = ["tj@vision-media.ca"]
+ gem.summary = "pomo-#{Pomo::VERSION}"
+ gem.description = "Pomodoro time management for the command-line"
+ gem.homepage = "http://github.com/visionmedia/pomo"
- s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
- s.authors = ["TJ Holowaychuk"]
- s.date = %q{2010-03-10}
- s.default_executable = %q{pomo}
- s.description = %q{Pomodoro time management for the command-line}
- s.email = %q{tj@vision-media.ca}
- s.executables = ["pomo"]
- s.extra_rdoc_files = ["bin/pomo", "lib/pomo.rb", "lib/pomo/github_task.rb", "lib/pomo/list.rb", "lib/pomo/notifier.rb", "lib/pomo/task.rb", "lib/pomo/version.rb", "tasks/docs.rake", "tasks/gemspec.rake", "tasks/spec.rake"]
- s.files = ["History.md", "Manifest", "Rakefile", "Readme.md", "bin/pomo", "lib/pomo.rb", "lib/pomo/github_task.rb", "lib/pomo/list.rb", "lib/pomo/notifier.rb", "lib/pomo/task.rb", "lib/pomo/version.rb", "pomo.gemspec", "spec/pomo_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "tasks/docs.rake", "tasks/gemspec.rake", "tasks/spec.rake"]
- s.homepage = %q{http://github.com/visionmedia/pomo}
- s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Pomo", "--main", "Readme.md"]
- s.require_paths = ["lib"]
- s.rubyforge_project = %q{pomo}
- s.rubygems_version = %q{1.3.6}
- s.summary = %q{Pomodoro time management for the command-line}
+ gem.rubyforge_project = "pomo"
- if s.respond_to? :specification_version then
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 3
+ gem.files = `git ls-files`.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"]
+ gem.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Pomo", "--main", "Readme.md"]
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
- s.add_runtime_dependency(%q<commander>, [">= 4.1.2"])
- s.add_runtime_dependency(%q<growl>, [">= 1.0.3"]) if /darwin/ =~ RUBY_PLATFORM
- s.add_runtime_dependency(%q<terminal-notifier>, [">= 1.4.2"]) if /darwin/ =~ RUBY_PLATFORM
- s.add_runtime_dependency(%q<libnotify>, [">= 0.8.0"]) if /linux/ =~ RUBY_PLATFORM
- else
- s.add_dependency(%q<commander>, [">= 4.1.2"])
- s.add_dependency(%q<growl>, [">= 1.0.3"]) if /darwin/ =~ RUBY_PLATFORM
- s.add_dependency(%q<terminal-notifier>, [">= 1.4.2"]) if /darwin/ =~ RUBY_PLATFORM
- s.add_dependency(%q<libnotify>, [">= 0.8.0"]) if /linux/ =~ RUBY_PLATFORM
- end
- else
- s.add_dependency(%q<commander>, [">= 4.1.2"])
- s.add_dependency(%q<growl>, [">= 1.0.3"]) if /darwin/ =~ RUBY_PLATFORM
- s.add_dependency(%q<terminal-notifier>, [">= 1.4.2"]) if /darwin/ =~ RUBY_PLATFORM
- s.add_dependency(%q<libnotify>, [">= 0.8.0"]) if /linux/ =~ RUBY_PLATFORM
- end
+ gem.add_dependency("commander", [">= 4.1.2"])
+ gem.add_dependency("terminal-notifier", [">= 1.4.2"]) if /darwin/ =~ RUBY_PLATFORM
+ gem.add_dependency("growl", [">= 1.0.3"]) if /darwin/ =~ RUBY_PLATFORM
+ gem.add_dependency("libnotify", [">= 0.8.0"]) if /linux/ =~ RUBY_PLATFORM
end
View
@@ -1,2 +0,0 @@
---color
---format specdoc
View
@@ -1,13 +0,0 @@
-
-namespace :docs do
-
- desc 'Remove rdoc products'
- task :remove => [:clobber_docs]
-
- desc 'Build docs, and open in browser for viewing (specify BROWSER)'
- task :open do
- browser = ENV["BROWSER"] || "safari"
- sh "open -a #{browser} doc/index.html"
- end
-
-end
View
@@ -1,3 +0,0 @@
-
-desc 'Build gemspec file'
-task :gemspec => [:build_gemspec]
View
@@ -1,25 +0,0 @@
-
-require 'spec/rake/spectask'
-
-desc "Run all specifications"
-Spec::Rake::SpecTask.new(:spec) do |t|
- t.libs << "lib"
- t.spec_opts = ["--color", "--require", "spec/spec_helper.rb"]
-end
-
-namespace :spec do
-
- desc "Run all specifications verbosely"
- Spec::Rake::SpecTask.new(:verbose) do |t|
- t.libs << "lib"
- t.spec_opts = ["--color", "--format", "specdoc", "--require", "spec/spec_helper.rb"]
- end
-
- desc "Run specific specification verbosely (specify SPEC)"
- Spec::Rake::SpecTask.new(:select) do |t|
- t.libs << "lib"
- t.spec_files = [ENV["SPEC"]]
- t.spec_opts = ["--color", "--format", "specdoc", "--require", "spec/spec_helper.rb"]
- end
-
-end

0 comments on commit 8d1eade

Please sign in to comment.