Created
September 6, 2010 06:40
-
-
Save mitchellh/566719 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 3b9abad80034f7aeef96a4b3f247d95cb42a4dee Mon Sep 17 00:00:00 2001 | |
From: Mitchell Hashimoto <mitchell.hashimoto@gmail.com> | |
Date: Sun, 5 Sep 2010 23:39:10 -0700 | |
Subject: [PATCH] Gemfile for easier development. Updated gemspec to be more modern. | |
--- | |
.gitignore | 1 + | |
Gemfile | 3 + | |
Gemfile.lock | 21 ++++++++ | |
Thorfile | 33 +----------- | |
lib/thor/version.rb | 2 +- | |
spec/spec_helper.rb | 5 +- | |
thor.gemspec | 133 +++++++-------------------------------------------- | |
7 files changed, 50 insertions(+), 148 deletions(-) | |
create mode 100644 Gemfile | |
create mode 100644 Gemfile.lock | |
diff --git a/.gitignore b/.gitignore | |
index 2e5768e..d9d7bda 100644 | |
--- a/.gitignore | |
+++ b/.gitignore | |
@@ -2,3 +2,4 @@ | |
/coverage | |
/spec/sandbox | |
/rdoc | |
+.bundle/ | |
\ No newline at end of file | |
diff --git a/Gemfile b/Gemfile | |
new file mode 100644 | |
index 0000000..c80ee36 | |
--- /dev/null | |
+++ b/Gemfile | |
@@ -0,0 +1,3 @@ | |
+source "http://rubygems.org" | |
+ | |
+gemspec | |
diff --git a/Gemfile.lock b/Gemfile.lock | |
new file mode 100644 | |
index 0000000..70aa7de | |
--- /dev/null | |
+++ b/Gemfile.lock | |
@@ -0,0 +1,21 @@ | |
+PATH | |
+ remote: . | |
+ specs: | |
+ thor (0.14.0) | |
+ | |
+GEM | |
+ remote: http://rubygems.org/ | |
+ specs: | |
+ diff-lcs (1.1.2) | |
+ fakeweb (1.3.0) | |
+ rspec (1.3.0) | |
+ | |
+PLATFORMS | |
+ ruby | |
+ | |
+DEPENDENCIES | |
+ bundler (= 1.0.0) | |
+ diff-lcs (~> 1.1.2) | |
+ fakeweb (~> 1.3.0) | |
+ rspec (= 1.3.0) | |
+ thor! | |
diff --git a/Thorfile b/Thorfile | |
index b212768..fe3f4ed 100644 | |
--- a/Thorfile | |
+++ b/Thorfile | |
@@ -1,9 +1,9 @@ | |
-# enconding: utf-8 | |
- | |
-require File.join(File.dirname(__FILE__), "lib", "thor", "version") | |
+# -*- coding: iso-8859-1 -*- | |
require 'rubygems' | |
+require 'bundler/setup' | |
require 'thor/rake_compat' | |
require 'spec/rake/spectask' | |
+ | |
begin | |
require 'rdoc/task' | |
rescue LoadError | |
@@ -39,31 +39,4 @@ class Default < Thor | |
rdoc.options << '--line-numbers' << '--inline-source' | |
end | |
end | |
- | |
- begin | |
- require 'jeweler' | |
- Jeweler::Tasks.new do |s| | |
- s.name = GEM_NAME | |
- s.version = Thor::VERSION.dup | |
- s.rubyforge_project = "textmate" | |
- s.platform = Gem::Platform::RUBY | |
- s.summary = "A scripting framework that replaces rake, sake and rubigen" | |
- s.email = "ruby-thor@googlegroups.com" | |
- s.homepage = "http://yehudakatz.com" | |
- s.description = "A scripting framework that replaces rake, sake and rubigen" | |
- s.authors = ['Yehuda Katz', 'José Valim'] | |
- s.has_rdoc = true | |
- s.extra_rdoc_files = EXTRA_RDOC_FILES | |
- s.require_path = 'lib' | |
- s.bindir = "bin" | |
- s.executables = %w( thor rake2thor ) | |
- s.files = s.extra_rdoc_files + Dir.glob("{bin,lib}/**/*") | |
- s.test_files.include 'spec/**/*' | |
- s.test_files.exclude 'spec/sandbox/**/*' | |
- end | |
- | |
- Jeweler::GemcutterTasks.new | |
- rescue LoadError | |
- puts "Jeweler, or one of its dependencies, is not available. Install it with: gem install jeweler" | |
- end | |
end | |
diff --git a/lib/thor/version.rb b/lib/thor/version.rb | |
index b3efbb5..6aba1c9 100644 | |
--- a/lib/thor/version.rb | |
+++ b/lib/thor/version.rb | |
@@ -1,3 +1,3 @@ | |
class Thor | |
- VERSION = "0.14.0".freeze | |
+ VERSION = "0.14.0" | |
end | |
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb | |
index 98e4ff1..d598af7 100644 | |
--- a/spec/spec_helper.rb | |
+++ b/spec/spec_helper.rb | |
@@ -1,6 +1,7 @@ | |
$TESTING=true | |
-$:.unshift(File.join(File.dirname(__FILE__), "..", "lib")) | |
+require 'rubygems' | |
+require 'bundler/setup' | |
require 'thor' | |
require 'thor/group' | |
require 'stringio' | |
@@ -36,7 +37,7 @@ Spec::Runner.configure do |config| | |
eval "$#{stream} = StringIO.new" | |
yield | |
result = eval("$#{stream}").string | |
- ensure | |
+ ensure | |
eval("$#{stream} = #{stream.upcase}") | |
end | |
diff --git a/thor.gemspec b/thor.gemspec | |
index 43adbef..6359460 100644 | |
--- a/thor.gemspec | |
+++ b/thor.gemspec | |
@@ -1,123 +1,26 @@ | |
-# Generated by jeweler | |
-# DO NOT EDIT THIS FILE DIRECTLY | |
-# Instead, edit Jeweler::Tasks in Thorfile, and run the gemspec command | |
# -*- encoding: utf-8 -*- | |
+require File.expand_path("../lib/thor/version", __FILE__) | |
Gem::Specification.new do |s| | |
- s.name = %q{thor} | |
- s.version = "0.14.0" | |
+ s.name = "thor" | |
+ s.version = Thor::VERSION | |
+ s.platform = Gem::Platform::RUBY | |
+ s.authors = ["Yehuda Katz", "Jos\303\251 Valim"] | |
+ s.email = "ruby-thor@googlegroups.com" | |
+ s.homepage = "http://yehudakatz.com" | |
+ s.summary = "A scripting framework that replaces rake, sake and rubigen" | |
+ s.description = "A scripting framework that replaces rake, sake and rubigen" | |
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= | |
- s.authors = ["Yehuda Katz", "Jos\303\251 Valim"] | |
- s.date = %q{2010-07-26} | |
- s.description = %q{A scripting framework that replaces rake, sake and rubigen} | |
- s.email = %q{ruby-thor@googlegroups.com} | |
- s.executables = ["thor", "rake2thor"] | |
- s.extra_rdoc_files = [ | |
- "CHANGELOG.rdoc", | |
- "LICENSE", | |
- "README.md", | |
- "Thorfile" | |
- ] | |
- s.files = [ | |
- "CHANGELOG.rdoc", | |
- "LICENSE", | |
- "README.md", | |
- "Thorfile", | |
- "bin/rake2thor", | |
- "bin/thor", | |
- "lib/thor.rb", | |
- "lib/thor/actions.rb", | |
- "lib/thor/actions/create_file.rb", | |
- "lib/thor/actions/directory.rb", | |
- "lib/thor/actions/empty_directory.rb", | |
- "lib/thor/actions/file_manipulation.rb", | |
- "lib/thor/actions/inject_into_file.rb", | |
- "lib/thor/base.rb", | |
- "lib/thor/core_ext/file_binary_read.rb", | |
- "lib/thor/core_ext/hash_with_indifferent_access.rb", | |
- "lib/thor/core_ext/ordered_hash.rb", | |
- "lib/thor/error.rb", | |
- "lib/thor/group.rb", | |
- "lib/thor/invocation.rb", | |
- "lib/thor/parser.rb", | |
- "lib/thor/parser/argument.rb", | |
- "lib/thor/parser/arguments.rb", | |
- "lib/thor/parser/option.rb", | |
- "lib/thor/parser/options.rb", | |
- "lib/thor/rake_compat.rb", | |
- "lib/thor/runner.rb", | |
- "lib/thor/shell.rb", | |
- "lib/thor/shell/basic.rb", | |
- "lib/thor/shell/color.rb", | |
- "lib/thor/shell/html.rb", | |
- "lib/thor/task.rb", | |
- "lib/thor/util.rb", | |
- "lib/thor/version.rb" | |
- ] | |
- s.homepage = %q{http://yehudakatz.com} | |
- s.rdoc_options = ["--charset=UTF-8"] | |
- s.require_paths = ["lib"] | |
- s.rubyforge_project = %q{textmate} | |
- s.rubygems_version = %q{1.3.7} | |
- s.summary = %q{A scripting framework that replaces rake, sake and rubigen} | |
- s.test_files = [ | |
- "spec/actions/create_file_spec.rb", | |
- "spec/actions/directory_spec.rb", | |
- "spec/actions/empty_directory_spec.rb", | |
- "spec/actions/file_manipulation_spec.rb", | |
- "spec/actions/inject_into_file_spec.rb", | |
- "spec/actions_spec.rb", | |
- "spec/base_spec.rb", | |
- "spec/core_ext/hash_with_indifferent_access_spec.rb", | |
- "spec/core_ext/ordered_hash_spec.rb", | |
- "spec/fixtures/application.rb", | |
- "spec/fixtures/bundle/execute.rb", | |
- "spec/fixtures/doc/config.rb", | |
- "spec/group_spec.rb", | |
- "spec/invocation_spec.rb", | |
- "spec/parser/argument_spec.rb", | |
- "spec/parser/arguments_spec.rb", | |
- "spec/parser/option_spec.rb", | |
- "spec/parser/options_spec.rb", | |
- "spec/rake_compat_spec.rb", | |
- "spec/runner_spec.rb", | |
- "spec/shell/basic_spec.rb", | |
- "spec/shell/color_spec.rb", | |
- "spec/shell/html_spec.rb", | |
- "spec/shell_spec.rb", | |
- "spec/spec_helper.rb", | |
- "spec/task_spec.rb", | |
- "spec/thor_spec.rb", | |
- "spec/util_spec.rb", | |
- "spec/actions", | |
- "spec/core_ext", | |
- "spec/fixtures", | |
- "spec/fixtures/bundle", | |
- "spec/fixtures/bundle/main.thor", | |
- "spec/fixtures/doc", | |
- "spec/fixtures/doc/%file_name%.rb.tt", | |
- "spec/fixtures/doc/components/.empty_directory", | |
- "spec/fixtures/doc/README", | |
- "spec/fixtures/group.thor", | |
- "spec/fixtures/invoke.thor", | |
- "spec/fixtures/path with spaces", | |
- "spec/fixtures/script.thor", | |
- "spec/fixtures/task.thor", | |
- "spec/parser", | |
- "spec/sandbox", | |
- "spec/shell", | |
- "spec/spec.opts" | |
- ] | |
+ s.required_rubygems_version = ">= 1.3.6" | |
+ s.rubyforge_project = "thor" | |
- if s.respond_to? :specification_version then | |
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION | |
- s.specification_version = 3 | |
+ s.add_development_dependency "rspec", "1.3.0" | |
+ s.add_development_dependency "diff-lcs", "~> 1.1.2" | |
+ s.add_development_dependency "fakeweb", "~> 1.3.0" | |
+ s.add_development_dependency "bundler", "1.0.0" | |
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then | |
- else | |
- end | |
- else | |
- end | |
+ s.files = `git ls-files`.split("\n") | |
+ s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact | |
+ s.require_path = 'lib' | |
end | |
-- | |
1.7.2.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment