Skip to content

Commit

Permalink
remove dependency on echoe
Browse files Browse the repository at this point in the history
- Update all gem meta-stuff to use bundler for managing dependencies and minimal gem-related rake tasks
- Remove dependency on Echoe
- Update dev dependency and rake task to use Rspec 2
  • Loading branch information
Gabriel Gilder committed Nov 23, 2011
1 parent 7e1674b commit d9cbac7
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 122 deletions.
11 changes: 4 additions & 7 deletions .gitignore
Original file line number Original file line Diff line number Diff line change
@@ -1,8 +1,5 @@
old
pkg
doc
test
.DS_Store
*.cache
*.gem *.gem
/.rvmrc .bundle
Gemfile.lock
pkg/*
.rvmrc
17 changes: 2 additions & 15 deletions DEVELOPMENT
Original file line number Original file line Diff line number Diff line change
@@ -1,28 +1,15 @@
To run the development rake tasks, you need rake and echoe gems installed. To run the development rake tasks, you need bundler installed.

To install the rest of the development dependencies:

$ rake dev_setup


Before you push any changes, run the RSpec suite: Before you push any changes, run the RSpec suite:


$ rake spec $ rake spec


Build the docs:

$ rake docs

Build and check the docs:

$ rake docs:open

To build a new version of the gem: To build a new version of the gem:


$ rake build $ rake build
$ rake gem


To push the new version to Rubygems: To push the new version to Rubygems:


$ gem push pkg/commander-*.gem $ rake release


(http://rubygems.org/gems/commander) (http://rubygems.org/gems/commander)
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,3 @@
source "http://rubygems.org"

gemspec
38 changes: 6 additions & 32 deletions Rakefile
Original file line number Original file line Diff line number Diff line change
@@ -1,34 +1,8 @@
$:.unshift 'lib' require "rspec/core/rake_task"
require "bundler/gem_tasks"


require 'psych' if RUBY_VERSION >= "1.9.2" desc "Run specs"
require 'rubygems' RSpec::Core::RakeTask.new do |t|

t.verbose = false
load_errors = ['highline', 'echoe'].map do |g| t.rspec_opts = '--color'
begin
require g
nil
rescue LoadError
"The #{g} gem is not installed. Please run:\n\tgem install #{g}"
end
end.compact
abort "Missing dependencies!\n" + load_errors.join("\n") unless load_errors.empty?

require 'commander'
require 'rake'

Echoe.new "commander", Commander::VERSION do |p|
p.email = "ggilder@tractionco.com"
p.summary = "The complete solution for Ruby command-line executables"
p.url = "http://visionmedia.github.com/commander"
p.runtime_dependencies << "highline ~>1.5.0"
p.development_dependencies << "echoe ~>4.0.0"
p.development_dependencies << "sdoc ~>0.3.11"
p.development_dependencies << "rspec <2"

p.eval = Proc.new do
self.authors = ["TJ Holowaychuk", "Gabriel Gilder"]
self.default_executable = "commander"
end
end end

Dir['tasks/**/*.rake'].sort.each { |lib| load lib }
49 changes: 15 additions & 34 deletions commander.gemspec
Original file line number Original file line Diff line number Diff line change
@@ -1,42 +1,23 @@
# -*- encoding: utf-8 -*- # -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "commander/version"


Gem::Specification.new do |s| Gem::Specification.new do |s|
s.name = "commander" s.name = "commander"
s.version = "4.0.6" s.version = Commander::VERSION
s.authors = ["TJ Holowaychuk", "Gabriel Gilder"]
s.email = ["ggilder@tractionco.com"]
s.homepage = "http://visionmedia.github.com/commander"
s.summary = "The complete solution for Ruby command-line executables"
s.description = "The complete solution for Ruby command-line executables. Commander bridges the gap between other terminal related libraries you know and love (OptionParser, HighLine), while providing many new features, and an elegant API."


s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
s.authors = ["TJ Holowaychuk", "Gabriel Gilder"]
s.date = "2011-09-15"
s.description = "The complete solution for Ruby command-line executables"
s.email = "ggilder@tractionco.com"
s.executables = ["commander"]
s.extra_rdoc_files = ["README.rdoc", "bin/commander", "lib/commander.rb", "lib/commander/blank.rb", "lib/commander/command.rb", "lib/commander/core_ext.rb", "lib/commander/core_ext/array.rb", "lib/commander/core_ext/object.rb", "lib/commander/delegates.rb", "lib/commander/help_formatters.rb", "lib/commander/help_formatters/base.rb", "lib/commander/help_formatters/terminal.rb", "lib/commander/help_formatters/terminal/command_help.erb", "lib/commander/help_formatters/terminal/help.erb", "lib/commander/help_formatters/terminal_compact.rb", "lib/commander/help_formatters/terminal_compact/command_help.erb", "lib/commander/help_formatters/terminal_compact/help.erb", "lib/commander/import.rb", "lib/commander/platform.rb", "lib/commander/runner.rb", "lib/commander/user_interaction.rb", "lib/commander/version.rb", "tasks/dev_setup.rake", "tasks/docs.rake", "tasks/gemspec.rake"]
s.files = ["DEVELOPMENT", "History.rdoc", "Manifest", "README.rdoc", "Rakefile", "bin/commander", "commander.gemspec", "lib/commander.rb", "lib/commander/blank.rb", "lib/commander/command.rb", "lib/commander/core_ext.rb", "lib/commander/core_ext/array.rb", "lib/commander/core_ext/object.rb", "lib/commander/delegates.rb", "lib/commander/help_formatters.rb", "lib/commander/help_formatters/base.rb", "lib/commander/help_formatters/terminal.rb", "lib/commander/help_formatters/terminal/command_help.erb", "lib/commander/help_formatters/terminal/help.erb", "lib/commander/help_formatters/terminal_compact.rb", "lib/commander/help_formatters/terminal_compact/command_help.erb", "lib/commander/help_formatters/terminal_compact/help.erb", "lib/commander/import.rb", "lib/commander/platform.rb", "lib/commander/runner.rb", "lib/commander/user_interaction.rb", "lib/commander/version.rb", "spec/command_spec.rb", "spec/core_ext/array_spec.rb", "spec/core_ext/object_spec.rb", "spec/help_formatters/terminal_spec.rb", "spec/runner_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "spec/ui_spec.rb", "tasks/dev_setup.rake", "tasks/docs.rake", "tasks/gemspec.rake"]
s.homepage = "http://visionmedia.github.com/commander"
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Commander", "--main", "README.rdoc"]
s.require_paths = ["lib"]
s.rubyforge_project = "commander" s.rubyforge_project = "commander"
s.rubygems_version = "1.8.10"
s.summary = "The complete solution for Ruby command-line executables"


if s.respond_to? :specification_version then s.files = `git ls-files`.split("\n")
s.specification_version = 3 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"]


if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then s.add_runtime_dependency("highline", ["~> 1.5.0"])
s.add_runtime_dependency(%q<highline>, ["~> 1.5.0"]) s.add_development_dependency("rspec", ["~> 2"])
s.add_development_dependency(%q<echoe>, ["~> 4.0.0"])
s.add_development_dependency(%q<sdoc>, ["~> 0.3.11"])
s.add_development_dependency(%q<rspec>, ["< 2"])
else
s.add_dependency(%q<highline>, ["~> 1.5.0"])
s.add_dependency(%q<echoe>, ["~> 4.0.0"])
s.add_dependency(%q<sdoc>, ["~> 0.3.11"])
s.add_dependency(%q<rspec>, ["< 2"])
end
else
s.add_dependency(%q<highline>, ["~> 1.5.0"])
s.add_dependency(%q<echoe>, ["~> 4.0.0"])
s.add_dependency(%q<sdoc>, ["~> 0.3.11"])
s.add_dependency(%q<rspec>, ["< 2"])
end
end end
1 change: 0 additions & 1 deletion spec/spec.opts

This file was deleted.

11 changes: 0 additions & 11 deletions tasks/dev_setup.rake

This file was deleted.

19 changes: 0 additions & 19 deletions tasks/docs.rake

This file was deleted.

3 changes: 0 additions & 3 deletions tasks/gemspec.rake

This file was deleted.

0 comments on commit d9cbac7

Please sign in to comment.