mcornick-jeweler 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +9 -0
- data/ChangeLog.markdown +111 -0
- data/LICENSE +20 -0
- data/README.markdown +185 -0
- data/ROADMAP +12 -0
- data/Rakefile +103 -0
- data/VERSION.yml +4 -0
- data/bin/jeweler +8 -0
- data/features/generator/cucumber.feature +83 -0
- data/features/generator/directory_layout.feature +76 -0
- data/features/generator/dotdocument.feature +14 -0
- data/features/generator/env_options.feature +9 -0
- data/features/generator/git.feature +94 -0
- data/features/generator/license.feature +11 -0
- data/features/generator/rakefile.feature +151 -0
- data/features/generator/readme.feature +12 -0
- data/features/generator/test.feature +41 -0
- data/features/generator/test_helper.feature +49 -0
- data/features/placeholder.feature +5 -0
- data/features/step_definitions/debug_steps.rb +6 -0
- data/features/step_definitions/filesystem_steps.rb +68 -0
- data/features/step_definitions/generator_steps.rb +284 -0
- data/features/step_definitions/task_steps.rb +6 -0
- data/features/support/env.rb +29 -0
- data/features/tasks/build_gem.feature +9 -0
- data/features/tasks/version.feature +24 -0
- data/features/tasks/version_bumping.feature +33 -0
- data/jeweler.gemspec +225 -0
- data/lib/jeweler.rb +153 -0
- data/lib/jeweler/commands.rb +14 -0
- data/lib/jeweler/commands/build_gem.rb +31 -0
- data/lib/jeweler/commands/check_dependencies.rb +52 -0
- data/lib/jeweler/commands/install_gem.rb +40 -0
- data/lib/jeweler/commands/release.rb +86 -0
- data/lib/jeweler/commands/release_to_rubyforge.rb +51 -0
- data/lib/jeweler/commands/setup_rubyforge.rb +57 -0
- data/lib/jeweler/commands/validate_gemspec.rb +30 -0
- data/lib/jeweler/commands/version/base.rb +41 -0
- data/lib/jeweler/commands/version/bump_major.rb +13 -0
- data/lib/jeweler/commands/version/bump_minor.rb +12 -0
- data/lib/jeweler/commands/version/bump_patch.rb +14 -0
- data/lib/jeweler/commands/version/write.rb +12 -0
- data/lib/jeweler/commands/write_gemspec.rb +39 -0
- data/lib/jeweler/errors.rb +20 -0
- data/lib/jeweler/gemspec_helper.rb +79 -0
- data/lib/jeweler/generator.rb +306 -0
- data/lib/jeweler/generator/application.rb +54 -0
- data/lib/jeweler/generator/bacon_mixin.rb +43 -0
- data/lib/jeweler/generator/micronaut_mixin.rb +41 -0
- data/lib/jeweler/generator/minitest_mixin.rb +42 -0
- data/lib/jeweler/generator/options.rb +102 -0
- data/lib/jeweler/generator/rdoc_mixin.rb +9 -0
- data/lib/jeweler/generator/rspec_mixin.rb +42 -0
- data/lib/jeweler/generator/shoulda_mixin.rb +42 -0
- data/lib/jeweler/generator/testunit_mixin.rb +39 -0
- data/lib/jeweler/generator/yard_mixin.rb +14 -0
- data/lib/jeweler/rubyforge_tasks.rb +98 -0
- data/lib/jeweler/specification.rb +66 -0
- data/lib/jeweler/tasks.rb +135 -0
- data/lib/jeweler/templates/.document +5 -0
- data/lib/jeweler/templates/.gitignore +5 -0
- data/lib/jeweler/templates/LICENSE +20 -0
- data/lib/jeweler/templates/README.rdoc +18 -0
- data/lib/jeweler/templates/Rakefile +153 -0
- data/lib/jeweler/templates/bacon/flunking.rb +7 -0
- data/lib/jeweler/templates/bacon/helper.rb +8 -0
- data/lib/jeweler/templates/features/default.feature +9 -0
- data/lib/jeweler/templates/features/support/env.rb +8 -0
- data/lib/jeweler/templates/micronaut/flunking.rb +7 -0
- data/lib/jeweler/templates/micronaut/helper.rb +17 -0
- data/lib/jeweler/templates/minitest/flunking.rb +7 -0
- data/lib/jeweler/templates/minitest/helper.rb +11 -0
- data/lib/jeweler/templates/rspec/flunking.rb +7 -0
- data/lib/jeweler/templates/rspec/helper.rb +10 -0
- data/lib/jeweler/templates/shoulda/flunking.rb +7 -0
- data/lib/jeweler/templates/shoulda/helper.rb +10 -0
- data/lib/jeweler/templates/testunit/flunking.rb +7 -0
- data/lib/jeweler/templates/testunit/helper.rb +9 -0
- data/lib/jeweler/version_helper.rb +128 -0
- data/test/fixtures/bar/VERSION.yml +4 -0
- data/test/fixtures/bar/bin/foo_the_ultimate_bin +1 -0
- data/test/fixtures/bar/hey_include_me_in_gemspec +0 -0
- data/test/fixtures/bar/lib/foo_the_ultimate_lib.rb +1 -0
- data/test/fixtures/existing-project-with-version-plaintext/.document +5 -0
- data/test/fixtures/existing-project-with-version-plaintext/.gitignore +5 -0
- data/test/fixtures/existing-project-with-version-plaintext/LICENSE +20 -0
- data/test/fixtures/existing-project-with-version-plaintext/README.rdoc +7 -0
- data/test/fixtures/existing-project-with-version-plaintext/Rakefile +82 -0
- data/test/fixtures/existing-project-with-version-plaintext/VERSION +1 -0
- data/test/fixtures/existing-project-with-version-plaintext/existing-project-with-version.gemspec +29 -0
- data/test/fixtures/existing-project-with-version-plaintext/lib/existing_project_with_version.rb +0 -0
- data/test/fixtures/existing-project-with-version-plaintext/test/existing_project_with_version_test.rb +7 -0
- data/test/fixtures/existing-project-with-version-plaintext/test/test_helper.rb +10 -0
- data/test/fixtures/existing-project-with-version-yaml/.document +5 -0
- data/test/fixtures/existing-project-with-version-yaml/.gitignore +5 -0
- data/test/fixtures/existing-project-with-version-yaml/LICENSE +20 -0
- data/test/fixtures/existing-project-with-version-yaml/README.rdoc +7 -0
- data/test/fixtures/existing-project-with-version-yaml/Rakefile +82 -0
- data/test/fixtures/existing-project-with-version-yaml/VERSION.yml +4 -0
- data/test/fixtures/existing-project-with-version-yaml/bin/foo_the_ultimate_bin +0 -0
- data/test/fixtures/existing-project-with-version-yaml/existing-project-with-version.gemspec +29 -0
- data/test/fixtures/existing-project-with-version-yaml/lib/existing_project_with_version.rb +0 -0
- data/test/fixtures/existing-project-with-version-yaml/test/existing_project_with_version_test.rb +7 -0
- data/test/fixtures/existing-project-with-version-yaml/test/test_helper.rb +10 -0
- data/test/geminstaller.yml +12 -0
- data/test/jeweler/commands/test_build_gem.rb +72 -0
- data/test/jeweler/commands/test_install_gem.rb +74 -0
- data/test/jeweler/commands/test_release.rb +362 -0
- data/test/jeweler/commands/test_release_to_rubyforge.rb +157 -0
- data/test/jeweler/commands/test_setup_rubyforge.rb +182 -0
- data/test/jeweler/commands/test_validate_gemspec.rb +27 -0
- data/test/jeweler/commands/test_write_gemspec.rb +92 -0
- data/test/jeweler/commands/version/test_base.rb +32 -0
- data/test/jeweler/commands/version/test_bump_major.rb +22 -0
- data/test/jeweler/commands/version/test_bump_minor.rb +19 -0
- data/test/jeweler/commands/version/test_bump_patch.rb +20 -0
- data/test/jeweler/commands/version/test_write.rb +23 -0
- data/test/shoulda_macros/jeweler_macros.rb +35 -0
- data/test/test_application.rb +139 -0
- data/test/test_gemspec_helper.rb +40 -0
- data/test/test_generator.rb +166 -0
- data/test/test_generator_initialization.rb +156 -0
- data/test/test_generator_mixins.rb +18 -0
- data/test/test_helper.rb +159 -0
- data/test/test_jeweler.rb +174 -0
- data/test/test_options.rb +149 -0
- data/test/test_specification.rb +61 -0
- data/test/test_tasks.rb +35 -0
- data/test/test_version_helper.rb +153 -0
- metadata +283 -0
@@ -0,0 +1,149 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class TestOptions < Test::Unit::TestCase
|
4
|
+
|
5
|
+
def self.should_have_testing_framework(testing_framework)
|
6
|
+
should "use #{testing_framework} for testing" do
|
7
|
+
assert_equal testing_framework.to_sym, @options[:testing_framework]
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.should_have_docmentation_framework(documentation_framework)
|
12
|
+
should "use #{documentation_framework} for documentation" do
|
13
|
+
assert_equal documentation_framework.to_sym, @options[:documentation_framework]
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def setup_options(*arguments)
|
18
|
+
@options = Jeweler::Generator::Options.new(arguments)
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.for_options(*options)
|
22
|
+
context options.join(' ') do
|
23
|
+
setup { setup_options *options }
|
24
|
+
yield
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
context "default options" do
|
29
|
+
setup { setup_options }
|
30
|
+
should_have_testing_framework :shoulda
|
31
|
+
should_have_docmentation_framework :rdoc
|
32
|
+
should 'not create repository' do
|
33
|
+
assert ! @options[:create_repo]
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
for_options '--shoulda' do
|
38
|
+
should_have_testing_framework :shoulda
|
39
|
+
end
|
40
|
+
|
41
|
+
for_options "--bacon" do
|
42
|
+
should_have_testing_framework :bacon
|
43
|
+
end
|
44
|
+
|
45
|
+
for_options "--testunit" do
|
46
|
+
should_have_testing_framework :testunit
|
47
|
+
end
|
48
|
+
|
49
|
+
for_options '--minitest' do
|
50
|
+
should_have_testing_framework :minitest
|
51
|
+
end
|
52
|
+
|
53
|
+
for_options '--rspec' do
|
54
|
+
should_have_testing_framework :rspec
|
55
|
+
end
|
56
|
+
|
57
|
+
for_options '--micronaut' do
|
58
|
+
should_have_testing_framework :micronaut
|
59
|
+
end
|
60
|
+
|
61
|
+
for_options '--cucumber' do
|
62
|
+
should 'enable cucumber' do
|
63
|
+
assert_equal true, @options[:use_cucumber]
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
for_options '--reek' do
|
68
|
+
should 'enable reek' do
|
69
|
+
assert_equal true, @options[:use_reek]
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
for_options '--roodi' do
|
74
|
+
should 'enable roodi' do
|
75
|
+
assert_equal true, @options[:use_roodi]
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
for_options '--create-repo' do
|
80
|
+
should 'create repository' do
|
81
|
+
assert @options[:create_repo]
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
for_options '--rubyforge' do
|
86
|
+
should 'enable rubyforge' do
|
87
|
+
assert @options[:rubyforge]
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
for_options '--rdoc' do
|
92
|
+
should_have_docmentation_framework :rdoc
|
93
|
+
end
|
94
|
+
|
95
|
+
for_options '--yard' do
|
96
|
+
should_have_docmentation_framework :yard
|
97
|
+
end
|
98
|
+
|
99
|
+
for_options '--summary', 'zomg so awesome' do
|
100
|
+
should 'have summary zomg so awesome' do
|
101
|
+
assert_equal 'zomg so awesome', @options[:summary]
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
for_options '--description', 'Descriptive' do
|
106
|
+
should 'have description Descriptive' do
|
107
|
+
assert_equal 'Descriptive', @options[:description]
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
for_options '--directory', 'foo' do
|
112
|
+
should 'have directory foo' do
|
113
|
+
assert_equal 'foo', @options[:directory]
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
for_options '--help' do
|
118
|
+
should 'show help' do
|
119
|
+
assert @options[:show_help]
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
for_options '-h' do
|
124
|
+
should 'show help' do
|
125
|
+
assert @options[:show_help]
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
for_options '--zomg-invalid' do
|
130
|
+
should 'be an invalid argument' do
|
131
|
+
assert @options[:invalid_argument]
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
context "merging options" do
|
136
|
+
should "take options from each" do
|
137
|
+
options = Jeweler::Generator::Options.new(["--rspec"]).
|
138
|
+
merge Jeweler::Generator::Options.new(["--create-repo"])
|
139
|
+
assert_equal :rspec, options[:testing_framework]
|
140
|
+
assert options[:create_repo]
|
141
|
+
end
|
142
|
+
|
143
|
+
should "shadow options" do
|
144
|
+
options = Jeweler::Generator::Options.new(["--bacon"]).
|
145
|
+
merge Jeweler::Generator::Options.new(["--rspec"])
|
146
|
+
assert_equal :rspec, options[:testing_framework]
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class TestSpecification < Test::Unit::TestCase
|
4
|
+
def setup
|
5
|
+
remove_tmpdir!
|
6
|
+
path = File.join(FIXTURE_DIR, "existing-project-with-version-yaml")
|
7
|
+
Git.init(path)
|
8
|
+
FileUtils.cp_r path, tmp_dir
|
9
|
+
#breakpoint
|
10
|
+
|
11
|
+
|
12
|
+
@spec = Gem::Specification.new
|
13
|
+
@spec.extend(Jeweler::Specification)
|
14
|
+
@spec.set_jeweler_defaults(tmp_dir)
|
15
|
+
end
|
16
|
+
|
17
|
+
def teardown
|
18
|
+
remove_tmpdir!
|
19
|
+
end
|
20
|
+
|
21
|
+
context "Gem::Specification with Jeweler monkey-patches" do
|
22
|
+
context "when setting defaults" do
|
23
|
+
should_eventually "should populate `files'" do
|
24
|
+
# this implementation changed to use ruby-git
|
25
|
+
assert_equal %w{Rakefile VERSION.yml bin/foo_the_ultimate_bin lib/foo_the_ultimate_lib.rb }, @spec.files.sort
|
26
|
+
end
|
27
|
+
|
28
|
+
should "should populate `executables'" do
|
29
|
+
assert_equal %w{ foo_the_ultimate_bin }, @spec.executables
|
30
|
+
end
|
31
|
+
|
32
|
+
context "with values already set" do
|
33
|
+
setup do
|
34
|
+
@spec.files = %w{ hey_include_me_in_gemspec }
|
35
|
+
@spec.set_jeweler_defaults(fixture_dir)
|
36
|
+
end
|
37
|
+
|
38
|
+
should "not re-populate `files'" do
|
39
|
+
assert_equal %w{ hey_include_me_in_gemspec }, @spec.files
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
context "for rdoc" do
|
44
|
+
should "be enabled" do
|
45
|
+
assert @spec.has_rdoc
|
46
|
+
end
|
47
|
+
|
48
|
+
should "be utf-8" do
|
49
|
+
assert @spec.rdoc_options.include?('--charset=UTF-8')
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
should "allow the user to concat files to the existing `files' array" do
|
55
|
+
before = @spec.files.dup
|
56
|
+
@spec.files << 'extra'
|
57
|
+
|
58
|
+
assert_equal before + %w{ extra }, @spec.files
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
data/test/test_tasks.rb
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
require 'rake'
|
4
|
+
class TestTasks < Test::Unit::TestCase
|
5
|
+
include Rake
|
6
|
+
|
7
|
+
context 'instantiating Jeweler::Tasks' do
|
8
|
+
setup do
|
9
|
+
@jt = Jeweler::Tasks.new {}
|
10
|
+
end
|
11
|
+
|
12
|
+
teardown do
|
13
|
+
Task.clear
|
14
|
+
end
|
15
|
+
|
16
|
+
should 'assign @gemspec' do
|
17
|
+
assert_not_nil @jt.gemspec
|
18
|
+
end
|
19
|
+
|
20
|
+
should 'assign @jeweler' do
|
21
|
+
assert_not_nil @jt.jeweler
|
22
|
+
end
|
23
|
+
|
24
|
+
should 'yield the gemspec instance' do
|
25
|
+
spec = nil; Jeweler::Tasks.new { |s| spec = s }
|
26
|
+
assert_not_nil spec
|
27
|
+
end
|
28
|
+
|
29
|
+
should 'set the gemspec defaults before yielding it' do
|
30
|
+
Jeweler::Tasks.new do |s|
|
31
|
+
assert !s.files.empty?
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,153 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class TestVersionHelper < Test::Unit::TestCase
|
4
|
+
|
5
|
+
VERSION_TMP_DIR = File.dirname(__FILE__) + '/version_tmp'
|
6
|
+
|
7
|
+
def self.should_have_version(major, minor, patch)
|
8
|
+
should "have major version #{major}" do
|
9
|
+
assert_equal major, @version_helper.major
|
10
|
+
end
|
11
|
+
|
12
|
+
should "have minor version #{minor}" do
|
13
|
+
assert_equal minor, @version_helper.minor
|
14
|
+
end
|
15
|
+
|
16
|
+
should "have patch version #{patch}" do
|
17
|
+
assert_equal patch, @version_helper.patch
|
18
|
+
end
|
19
|
+
|
20
|
+
version_s = "#{major}.#{minor}.#{patch}"
|
21
|
+
should "render string as #{version_s.inspect}" do
|
22
|
+
assert_equal version_s, @version_helper.to_s
|
23
|
+
end
|
24
|
+
|
25
|
+
#version_hash = {:major => major, :minor => minor, :patch => patch}
|
26
|
+
#should "render hash as #{version_hash.inspect}" do
|
27
|
+
#assert_equal version_hash, @version_helper.to_hash
|
28
|
+
#end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
context "VERSION.yml with 3.5.4" do
|
33
|
+
setup do
|
34
|
+
FileUtils.rm_rf VERSION_TMP_DIR
|
35
|
+
FileUtils.mkdir_p VERSION_TMP_DIR
|
36
|
+
|
37
|
+
build_version_yml VERSION_TMP_DIR, 3, 5, 4
|
38
|
+
|
39
|
+
@version_helper = Jeweler::VersionHelper.new VERSION_TMP_DIR
|
40
|
+
end
|
41
|
+
|
42
|
+
should_have_version 3, 5, 4
|
43
|
+
|
44
|
+
context "bumping major version" do
|
45
|
+
setup { @version_helper.bump_major }
|
46
|
+
should_have_version 4, 0, 0
|
47
|
+
end
|
48
|
+
|
49
|
+
context "bumping the minor version" do
|
50
|
+
setup { @version_helper.bump_minor }
|
51
|
+
should_have_version 3, 6, 0
|
52
|
+
end
|
53
|
+
|
54
|
+
context "bumping the patch version" do
|
55
|
+
setup { @version_helper.bump_patch }
|
56
|
+
should_have_version 3, 5, 5
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
context "VERSION with 3.5.4" do
|
61
|
+
setup do
|
62
|
+
FileUtils.rm_rf VERSION_TMP_DIR
|
63
|
+
FileUtils.mkdir_p VERSION_TMP_DIR
|
64
|
+
|
65
|
+
build_version_plaintext VERSION_TMP_DIR, 3, 5, 4
|
66
|
+
|
67
|
+
@version_helper = Jeweler::VersionHelper.new VERSION_TMP_DIR
|
68
|
+
end
|
69
|
+
|
70
|
+
should_have_version 3, 5, 4
|
71
|
+
|
72
|
+
context "bumping major version" do
|
73
|
+
setup { @version_helper.bump_major }
|
74
|
+
should_have_version 4, 0, 0
|
75
|
+
end
|
76
|
+
|
77
|
+
context "bumping the minor version" do
|
78
|
+
setup { @version_helper.bump_minor }
|
79
|
+
should_have_version 3, 6, 0
|
80
|
+
end
|
81
|
+
|
82
|
+
context "bumping the patch version" do
|
83
|
+
setup { @version_helper.bump_patch }
|
84
|
+
should_have_version 3, 5, 5
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
context "Non-existant VERSION.yml" do
|
89
|
+
setup do
|
90
|
+
FileUtils.rm_rf VERSION_TMP_DIR
|
91
|
+
FileUtils.mkdir_p VERSION_TMP_DIR
|
92
|
+
end
|
93
|
+
|
94
|
+
should "not raise error if the VERSION.yml doesn't exist" do
|
95
|
+
assert_nothing_raised Jeweler::VersionYmlError do
|
96
|
+
Jeweler::VersionHelper.new(VERSION_TMP_DIR)
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
context "setting an initial version" do
|
101
|
+
setup do
|
102
|
+
@version_helper = Jeweler::VersionHelper.new(VERSION_TMP_DIR)
|
103
|
+
@version_helper.update_to 0, 0, 1
|
104
|
+
end
|
105
|
+
|
106
|
+
should_have_version 0, 0, 1
|
107
|
+
should "not create VERSION.yml" do
|
108
|
+
assert ! File.exists?(File.join(VERSION_TMP_DIR, 'VERSION.yml'))
|
109
|
+
end
|
110
|
+
should "not create VERSION" do
|
111
|
+
assert ! File.exists?(File.join(VERSION_TMP_DIR, 'VERSION'))
|
112
|
+
end
|
113
|
+
|
114
|
+
context "outputting" do
|
115
|
+
setup do
|
116
|
+
@version_helper.write
|
117
|
+
end
|
118
|
+
|
119
|
+
should "create VERSION" do
|
120
|
+
assert File.exists?(File.join(VERSION_TMP_DIR, 'VERSION'))
|
121
|
+
end
|
122
|
+
|
123
|
+
context "re-reading VERSION" do
|
124
|
+
setup do
|
125
|
+
@version_helper = Jeweler::VersionHelper.new(VERSION_TMP_DIR)
|
126
|
+
end
|
127
|
+
|
128
|
+
should_have_version 0, 0, 1
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
def build_version_yml(base_dir, major, minor, patch)
|
135
|
+
version_path = File.join(base_dir, 'VERSION.yml')
|
136
|
+
|
137
|
+
File.open(version_path, 'w+') do |f|
|
138
|
+
version_hash = {
|
139
|
+
'major' => major.to_i,
|
140
|
+
'minor' => minor.to_i,
|
141
|
+
'patch' => patch.to_i
|
142
|
+
}
|
143
|
+
YAML.dump(version_hash, f)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
def build_version_plaintext(base_dir, major, minor, patch)
|
148
|
+
version_path = File.join(base_dir, 'VERSION')
|
149
|
+
File.open(version_path, 'w+') do |f|
|
150
|
+
f.puts "#{major}.#{minor}.#{patch}"
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
metadata
ADDED
@@ -0,0 +1,283 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mcornick-jeweler
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.2.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Josh Nichols
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-08-06 00:00:00 -07:00
|
13
|
+
default_executable: jeweler
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: git
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 1.2.1
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rubyforge
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: "0"
|
34
|
+
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: thoughtbot-shoulda
|
37
|
+
type: :development
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: "0"
|
44
|
+
version:
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: mhennemeyer-output_catcher
|
47
|
+
type: :development
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: "0"
|
54
|
+
version:
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rr
|
57
|
+
type: :development
|
58
|
+
version_requirement:
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: "0"
|
64
|
+
version:
|
65
|
+
- !ruby/object:Gem::Dependency
|
66
|
+
name: mocha
|
67
|
+
type: :development
|
68
|
+
version_requirement:
|
69
|
+
version_requirements: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: "0"
|
74
|
+
version:
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: redgreen
|
77
|
+
type: :development
|
78
|
+
version_requirement:
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: "0"
|
84
|
+
version:
|
85
|
+
description: Simple and opinionated helper for creating Rubygem projects on GitHub
|
86
|
+
email: josh@technicalpickles.com
|
87
|
+
executables:
|
88
|
+
- jeweler
|
89
|
+
extensions: []
|
90
|
+
|
91
|
+
extra_rdoc_files:
|
92
|
+
- ChangeLog.markdown
|
93
|
+
- LICENSE
|
94
|
+
- README.markdown
|
95
|
+
files:
|
96
|
+
- .gitignore
|
97
|
+
- ChangeLog.markdown
|
98
|
+
- LICENSE
|
99
|
+
- README.markdown
|
100
|
+
- ROADMAP
|
101
|
+
- Rakefile
|
102
|
+
- VERSION.yml
|
103
|
+
- bin/jeweler
|
104
|
+
- features/generator/cucumber.feature
|
105
|
+
- features/generator/directory_layout.feature
|
106
|
+
- features/generator/dotdocument.feature
|
107
|
+
- features/generator/env_options.feature
|
108
|
+
- features/generator/git.feature
|
109
|
+
- features/generator/license.feature
|
110
|
+
- features/generator/rakefile.feature
|
111
|
+
- features/generator/readme.feature
|
112
|
+
- features/generator/test.feature
|
113
|
+
- features/generator/test_helper.feature
|
114
|
+
- features/placeholder.feature
|
115
|
+
- features/step_definitions/debug_steps.rb
|
116
|
+
- features/step_definitions/filesystem_steps.rb
|
117
|
+
- features/step_definitions/generator_steps.rb
|
118
|
+
- features/step_definitions/task_steps.rb
|
119
|
+
- features/support/env.rb
|
120
|
+
- features/tasks/build_gem.feature
|
121
|
+
- features/tasks/version.feature
|
122
|
+
- features/tasks/version_bumping.feature
|
123
|
+
- jeweler.gemspec
|
124
|
+
- lib/jeweler.rb
|
125
|
+
- lib/jeweler/commands.rb
|
126
|
+
- lib/jeweler/commands/build_gem.rb
|
127
|
+
- lib/jeweler/commands/check_dependencies.rb
|
128
|
+
- lib/jeweler/commands/install_gem.rb
|
129
|
+
- lib/jeweler/commands/release.rb
|
130
|
+
- lib/jeweler/commands/release_to_rubyforge.rb
|
131
|
+
- lib/jeweler/commands/setup_rubyforge.rb
|
132
|
+
- lib/jeweler/commands/validate_gemspec.rb
|
133
|
+
- lib/jeweler/commands/version/base.rb
|
134
|
+
- lib/jeweler/commands/version/bump_major.rb
|
135
|
+
- lib/jeweler/commands/version/bump_minor.rb
|
136
|
+
- lib/jeweler/commands/version/bump_patch.rb
|
137
|
+
- lib/jeweler/commands/version/write.rb
|
138
|
+
- lib/jeweler/commands/write_gemspec.rb
|
139
|
+
- lib/jeweler/errors.rb
|
140
|
+
- lib/jeweler/gemspec_helper.rb
|
141
|
+
- lib/jeweler/generator.rb
|
142
|
+
- lib/jeweler/generator/application.rb
|
143
|
+
- lib/jeweler/generator/bacon_mixin.rb
|
144
|
+
- lib/jeweler/generator/micronaut_mixin.rb
|
145
|
+
- lib/jeweler/generator/minitest_mixin.rb
|
146
|
+
- lib/jeweler/generator/options.rb
|
147
|
+
- lib/jeweler/generator/rdoc_mixin.rb
|
148
|
+
- lib/jeweler/generator/rspec_mixin.rb
|
149
|
+
- lib/jeweler/generator/shoulda_mixin.rb
|
150
|
+
- lib/jeweler/generator/testunit_mixin.rb
|
151
|
+
- lib/jeweler/generator/yard_mixin.rb
|
152
|
+
- lib/jeweler/rubyforge_tasks.rb
|
153
|
+
- lib/jeweler/specification.rb
|
154
|
+
- lib/jeweler/tasks.rb
|
155
|
+
- lib/jeweler/templates/.document
|
156
|
+
- lib/jeweler/templates/.gitignore
|
157
|
+
- lib/jeweler/templates/LICENSE
|
158
|
+
- lib/jeweler/templates/README.rdoc
|
159
|
+
- lib/jeweler/templates/Rakefile
|
160
|
+
- lib/jeweler/templates/bacon/flunking.rb
|
161
|
+
- lib/jeweler/templates/bacon/helper.rb
|
162
|
+
- lib/jeweler/templates/features/default.feature
|
163
|
+
- lib/jeweler/templates/features/support/env.rb
|
164
|
+
- lib/jeweler/templates/micronaut/flunking.rb
|
165
|
+
- lib/jeweler/templates/micronaut/helper.rb
|
166
|
+
- lib/jeweler/templates/minitest/flunking.rb
|
167
|
+
- lib/jeweler/templates/minitest/helper.rb
|
168
|
+
- lib/jeweler/templates/rspec/flunking.rb
|
169
|
+
- lib/jeweler/templates/rspec/helper.rb
|
170
|
+
- lib/jeweler/templates/shoulda/flunking.rb
|
171
|
+
- lib/jeweler/templates/shoulda/helper.rb
|
172
|
+
- lib/jeweler/templates/testunit/flunking.rb
|
173
|
+
- lib/jeweler/templates/testunit/helper.rb
|
174
|
+
- lib/jeweler/version_helper.rb
|
175
|
+
- test/fixtures/bar/VERSION.yml
|
176
|
+
- test/fixtures/bar/bin/foo_the_ultimate_bin
|
177
|
+
- test/fixtures/bar/hey_include_me_in_gemspec
|
178
|
+
- test/fixtures/bar/lib/foo_the_ultimate_lib.rb
|
179
|
+
- test/fixtures/existing-project-with-version-plaintext/.document
|
180
|
+
- test/fixtures/existing-project-with-version-plaintext/.gitignore
|
181
|
+
- test/fixtures/existing-project-with-version-plaintext/LICENSE
|
182
|
+
- test/fixtures/existing-project-with-version-plaintext/README.rdoc
|
183
|
+
- test/fixtures/existing-project-with-version-plaintext/Rakefile
|
184
|
+
- test/fixtures/existing-project-with-version-plaintext/VERSION
|
185
|
+
- test/fixtures/existing-project-with-version-plaintext/existing-project-with-version.gemspec
|
186
|
+
- test/fixtures/existing-project-with-version-plaintext/lib/existing_project_with_version.rb
|
187
|
+
- test/fixtures/existing-project-with-version-plaintext/test/existing_project_with_version_test.rb
|
188
|
+
- test/fixtures/existing-project-with-version-plaintext/test/test_helper.rb
|
189
|
+
- test/fixtures/existing-project-with-version-yaml/.document
|
190
|
+
- test/fixtures/existing-project-with-version-yaml/.gitignore
|
191
|
+
- test/fixtures/existing-project-with-version-yaml/LICENSE
|
192
|
+
- test/fixtures/existing-project-with-version-yaml/README.rdoc
|
193
|
+
- test/fixtures/existing-project-with-version-yaml/Rakefile
|
194
|
+
- test/fixtures/existing-project-with-version-yaml/VERSION.yml
|
195
|
+
- test/fixtures/existing-project-with-version-yaml/bin/foo_the_ultimate_bin
|
196
|
+
- test/fixtures/existing-project-with-version-yaml/existing-project-with-version.gemspec
|
197
|
+
- test/fixtures/existing-project-with-version-yaml/lib/existing_project_with_version.rb
|
198
|
+
- test/fixtures/existing-project-with-version-yaml/test/existing_project_with_version_test.rb
|
199
|
+
- test/fixtures/existing-project-with-version-yaml/test/test_helper.rb
|
200
|
+
- test/geminstaller.yml
|
201
|
+
- test/jeweler/commands/test_build_gem.rb
|
202
|
+
- test/jeweler/commands/test_install_gem.rb
|
203
|
+
- test/jeweler/commands/test_release.rb
|
204
|
+
- test/jeweler/commands/test_release_to_rubyforge.rb
|
205
|
+
- test/jeweler/commands/test_setup_rubyforge.rb
|
206
|
+
- test/jeweler/commands/test_validate_gemspec.rb
|
207
|
+
- test/jeweler/commands/test_write_gemspec.rb
|
208
|
+
- test/jeweler/commands/version/test_base.rb
|
209
|
+
- test/jeweler/commands/version/test_bump_major.rb
|
210
|
+
- test/jeweler/commands/version/test_bump_minor.rb
|
211
|
+
- test/jeweler/commands/version/test_bump_patch.rb
|
212
|
+
- test/jeweler/commands/version/test_write.rb
|
213
|
+
- test/shoulda_macros/jeweler_macros.rb
|
214
|
+
- test/test_application.rb
|
215
|
+
- test/test_gemspec_helper.rb
|
216
|
+
- test/test_generator.rb
|
217
|
+
- test/test_generator_initialization.rb
|
218
|
+
- test/test_generator_mixins.rb
|
219
|
+
- test/test_helper.rb
|
220
|
+
- test/test_jeweler.rb
|
221
|
+
- test/test_options.rb
|
222
|
+
- test/test_specification.rb
|
223
|
+
- test/test_tasks.rb
|
224
|
+
- test/test_version_helper.rb
|
225
|
+
has_rdoc: false
|
226
|
+
homepage: http://github.com/technicalpickles/jeweler
|
227
|
+
licenses:
|
228
|
+
post_install_message:
|
229
|
+
rdoc_options:
|
230
|
+
- --charset=UTF-8
|
231
|
+
require_paths:
|
232
|
+
- lib
|
233
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
234
|
+
requirements:
|
235
|
+
- - ">="
|
236
|
+
- !ruby/object:Gem::Version
|
237
|
+
version: "0"
|
238
|
+
version:
|
239
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
240
|
+
requirements:
|
241
|
+
- - ">="
|
242
|
+
- !ruby/object:Gem::Version
|
243
|
+
version: "0"
|
244
|
+
version:
|
245
|
+
requirements: []
|
246
|
+
|
247
|
+
rubyforge_project: pickles
|
248
|
+
rubygems_version: 1.3.5
|
249
|
+
signing_key:
|
250
|
+
specification_version: 3
|
251
|
+
summary: Simple and opinionated helper for creating Rubygem projects on GitHub
|
252
|
+
test_files:
|
253
|
+
- test/fixtures/bar/lib/foo_the_ultimate_lib.rb
|
254
|
+
- test/fixtures/existing-project-with-version-plaintext/lib/existing_project_with_version.rb
|
255
|
+
- test/fixtures/existing-project-with-version-plaintext/test/existing_project_with_version_test.rb
|
256
|
+
- test/fixtures/existing-project-with-version-plaintext/test/test_helper.rb
|
257
|
+
- test/fixtures/existing-project-with-version-yaml/lib/existing_project_with_version.rb
|
258
|
+
- test/fixtures/existing-project-with-version-yaml/test/existing_project_with_version_test.rb
|
259
|
+
- test/fixtures/existing-project-with-version-yaml/test/test_helper.rb
|
260
|
+
- test/jeweler/commands/test_build_gem.rb
|
261
|
+
- test/jeweler/commands/test_install_gem.rb
|
262
|
+
- test/jeweler/commands/test_release.rb
|
263
|
+
- test/jeweler/commands/test_release_to_rubyforge.rb
|
264
|
+
- test/jeweler/commands/test_setup_rubyforge.rb
|
265
|
+
- test/jeweler/commands/test_validate_gemspec.rb
|
266
|
+
- test/jeweler/commands/test_write_gemspec.rb
|
267
|
+
- test/jeweler/commands/version/test_base.rb
|
268
|
+
- test/jeweler/commands/version/test_bump_major.rb
|
269
|
+
- test/jeweler/commands/version/test_bump_minor.rb
|
270
|
+
- test/jeweler/commands/version/test_bump_patch.rb
|
271
|
+
- test/jeweler/commands/version/test_write.rb
|
272
|
+
- test/shoulda_macros/jeweler_macros.rb
|
273
|
+
- test/test_application.rb
|
274
|
+
- test/test_gemspec_helper.rb
|
275
|
+
- test/test_generator.rb
|
276
|
+
- test/test_generator_initialization.rb
|
277
|
+
- test/test_generator_mixins.rb
|
278
|
+
- test/test_helper.rb
|
279
|
+
- test/test_jeweler.rb
|
280
|
+
- test/test_options.rb
|
281
|
+
- test/test_specification.rb
|
282
|
+
- test/test_tasks.rb
|
283
|
+
- test/test_version_helper.rb
|