namelessjon-jeweler 0.7.2 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +7 -0
- data/ChangeLog.markdown +65 -5
- data/README.markdown +99 -19
- data/ROADMAP +12 -0
- data/Rakefile +87 -23
- data/VERSION.yml +3 -3
- data/bin/jeweler +1 -65
- 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 +110 -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 +65 -0
- data/features/step_definitions/generator_steps.rb +251 -0
- data/features/step_definitions/task_steps.rb +6 -0
- data/features/support/env.rb +19 -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 +204 -0
- data/lib/jeweler.rb +52 -147
- data/lib/jeweler/commands.rb +12 -0
- data/lib/jeweler/commands/build_gem.rb +31 -0
- data/lib/jeweler/commands/install_gem.rb +26 -0
- data/lib/jeweler/commands/release.rb +83 -0
- data/lib/jeweler/commands/release_to_rubyforge.rb +51 -0
- data/lib/jeweler/commands/setup_rubyforge.rb +38 -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 +13 -1
- data/lib/jeweler/gemspec_helper.rb +76 -0
- data/lib/jeweler/generator.rb +160 -66
- data/lib/jeweler/generator/application.rb +54 -0
- data/lib/jeweler/generator/bacon_mixin.rb +39 -0
- data/lib/jeweler/generator/micronaut_mixin.rb +38 -0
- data/lib/jeweler/generator/minitest_mixin.rb +39 -0
- data/lib/jeweler/generator/options.rb +77 -0
- data/lib/jeweler/generator/rspec_mixin.rb +39 -0
- data/lib/jeweler/generator/shoulda_mixin.rb +39 -0
- data/lib/jeweler/generator/testunit_mixin.rb +39 -0
- data/lib/jeweler/rubyforge_tasks.rb +46 -0
- data/lib/jeweler/specification.rb +65 -0
- data/lib/jeweler/tasks.rb +64 -51
- data/lib/jeweler/templates/.document +5 -0
- data/lib/jeweler/templates/.gitignore +3 -1
- data/lib/jeweler/templates/LICENSE +1 -1
- data/lib/jeweler/templates/README.rdoc +7 -0
- data/lib/jeweler/templates/Rakefile +85 -26
- data/lib/jeweler/templates/bacon/{flunking_spec.rb → flunking.rb} +1 -1
- data/lib/jeweler/templates/bacon/{spec_helper.rb → helper.rb} +2 -2
- 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 +9 -0
- data/lib/jeweler/templates/shoulda/{flunking_test.rb → flunking.rb} +2 -2
- data/lib/jeweler/templates/shoulda/{test_helper.rb → helper.rb} +2 -2
- 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/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/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 +21 -0
- data/test/jeweler/commands/test_release.rb +405 -0
- data/test/jeweler/commands/test_release_to_rubyforge.rb +157 -0
- data/test/jeweler/commands/test_setup_rubyforge.rb +88 -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/test_application.rb +139 -0
- data/test/{test_gemspec.rb → test_gemspec_helper.rb} +13 -5
- data/test/test_generator.rb +118 -233
- data/test/test_generator_initialization.rb +113 -0
- data/test/test_generator_mixins.rb +18 -0
- data/test/test_helper.rb +98 -28
- data/test/test_jeweler.rb +136 -95
- data/test/test_options.rb +116 -0
- data/test/test_specification.rb +61 -0
- data/test/test_tasks.rb +17 -6
- data/test/test_version_helper.rb +153 -0
- metadata +160 -34
- data/TODO +0 -13
- data/lib/jeweler/gemspec.rb +0 -41
- data/lib/jeweler/templates/README +0 -9
- data/lib/jeweler/version.rb +0 -83
- data/test/generators/initialization_test.rb +0 -146
- data/test/test_version.rb +0 -115
data/TODO
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
* use some sort of logger instead of stdout and stderr
|
2
|
-
* jeweler --delete-repo
|
3
|
-
* output gemspec as yaml
|
4
|
-
* move interactions with github into separate class
|
5
|
-
* use Net::HTTP.post_form instead of `` for enabling gem creation
|
6
|
-
* Generators
|
7
|
-
* Rails generator for making a plugin that's Jeweler enabled
|
8
|
-
* Support rspec?
|
9
|
-
* Support test/unit
|
10
|
-
* Change generated test filename (test_foo not foo_test)
|
11
|
-
* Releasing
|
12
|
-
* Open hasmygembuiltyet.org
|
13
|
-
* enable runcoderun by default
|
data/lib/jeweler/gemspec.rb
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
class Jeweler
|
2
|
-
|
3
|
-
class GemSpecHelper
|
4
|
-
|
5
|
-
attr_accessor :spec, :base_dir
|
6
|
-
|
7
|
-
def initialize(spec, base_dir = nil)
|
8
|
-
self.spec = spec
|
9
|
-
self.base_dir = base_dir || ''
|
10
|
-
|
11
|
-
yield spec if block_given?
|
12
|
-
end
|
13
|
-
|
14
|
-
def valid?
|
15
|
-
begin
|
16
|
-
parse
|
17
|
-
true
|
18
|
-
rescue
|
19
|
-
false
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
def write
|
24
|
-
File.open(path, 'w') do |f|
|
25
|
-
f.write @spec.to_ruby
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
def path
|
30
|
-
denormalized_path = File.join(@base_dir, "#{@spec.name}.gemspec")
|
31
|
-
absolute_path = File.expand_path(denormalized_path)
|
32
|
-
absolute_path.gsub(Dir.getwd + File::SEPARATOR, '')
|
33
|
-
end
|
34
|
-
|
35
|
-
def parse
|
36
|
-
data = File.read(path)
|
37
|
-
Thread.new { eval("$SAFE = 3\n#{data}", binding, path) }.join
|
38
|
-
end
|
39
|
-
|
40
|
-
end
|
41
|
-
end
|
data/lib/jeweler/version.rb
DELETED
@@ -1,83 +0,0 @@
|
|
1
|
-
require 'yaml'
|
2
|
-
|
3
|
-
class Jeweler
|
4
|
-
class Version
|
5
|
-
attr_accessor :base_dir
|
6
|
-
attr_reader :major, :minor, :patch
|
7
|
-
|
8
|
-
def initialize(base_dir)
|
9
|
-
self.base_dir = base_dir
|
10
|
-
|
11
|
-
if File.exists?(yaml_path)
|
12
|
-
parse_yaml
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
def bump_major
|
17
|
-
@major += 1
|
18
|
-
@minor = 0
|
19
|
-
@patch = 0
|
20
|
-
end
|
21
|
-
|
22
|
-
def bump_minor
|
23
|
-
@minor += 1
|
24
|
-
@patch = 0
|
25
|
-
end
|
26
|
-
|
27
|
-
def bump_patch
|
28
|
-
@patch += 1
|
29
|
-
end
|
30
|
-
|
31
|
-
def update_to(major, minor, patch)
|
32
|
-
@major = major
|
33
|
-
@minor = minor
|
34
|
-
@patch = patch
|
35
|
-
end
|
36
|
-
|
37
|
-
def write
|
38
|
-
File.open(yaml_path, 'w+') do |f|
|
39
|
-
YAML.dump(self.to_hash, f)
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
def to_s
|
44
|
-
"#{major}.#{minor}.#{patch}"
|
45
|
-
end
|
46
|
-
|
47
|
-
def to_hash
|
48
|
-
{
|
49
|
-
:major => major,
|
50
|
-
:minor => minor,
|
51
|
-
:patch => patch
|
52
|
-
}
|
53
|
-
end
|
54
|
-
|
55
|
-
def refresh
|
56
|
-
parse_yaml
|
57
|
-
end
|
58
|
-
|
59
|
-
def yaml_path
|
60
|
-
denormalized_path = File.join(@base_dir, 'VERSION.yml')
|
61
|
-
absolute_path = File.expand_path(denormalized_path)
|
62
|
-
absolute_path.gsub(Dir.getwd + File::SEPARATOR, '')
|
63
|
-
end
|
64
|
-
|
65
|
-
protected
|
66
|
-
|
67
|
-
def parse_yaml
|
68
|
-
yaml = read_yaml
|
69
|
-
@major = (yaml['major'] || yaml[:major]).to_i
|
70
|
-
@minor = (yaml['minor'] || yaml[:minor]).to_i
|
71
|
-
@patch = (yaml['patch'] || yaml[:patch]).to_i
|
72
|
-
end
|
73
|
-
|
74
|
-
def read_yaml
|
75
|
-
if File.exists?(yaml_path)
|
76
|
-
YAML.load_file(yaml_path)
|
77
|
-
else
|
78
|
-
raise VersionYmlError, "#{yaml_path} does not exist!"
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
end
|
83
|
-
end
|
@@ -1,146 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
-
|
3
|
-
class JewelerGeneratorInitializerTest < Test::Unit::TestCase
|
4
|
-
context "given a nil github repo name" do
|
5
|
-
setup do
|
6
|
-
@block = lambda { Jeweler::Generator.new(nil) }
|
7
|
-
end
|
8
|
-
|
9
|
-
should "raise an error" do
|
10
|
-
assert_raise Jeweler::NoGitHubRepoNameGiven do
|
11
|
-
@block.call
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
context "without git user's name set" do
|
17
|
-
setup do
|
18
|
-
Jeweler::Generator.any_instance.stubs(:read_git_config).returns({'user.email' => 'bar@example.com'})
|
19
|
-
end
|
20
|
-
|
21
|
-
context "instantiating new generator" do
|
22
|
-
setup do
|
23
|
-
@block = lambda { Jeweler::Generator.new('the-perfect-gem')}
|
24
|
-
end
|
25
|
-
|
26
|
-
should "raise no git user name exception" do
|
27
|
-
assert_raise Jeweler::NoGitUserName do
|
28
|
-
@block.call
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
context "without git user's email set" do
|
35
|
-
setup do
|
36
|
-
Jeweler::Generator.any_instance.stubs(:read_git_config).returns({'user.name' => 'foo'})
|
37
|
-
end
|
38
|
-
|
39
|
-
context "instantiating new generator" do
|
40
|
-
setup do
|
41
|
-
@block = lambda { Jeweler::Generator.new('the-perfect-gem')}
|
42
|
-
end
|
43
|
-
|
44
|
-
should "raise no git user name exception" do
|
45
|
-
assert_raise Jeweler::NoGitUserEmail do
|
46
|
-
@block.call
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
context "without github username set" do
|
53
|
-
setup do
|
54
|
-
Jeweler::Generator.any_instance.stubs(:read_git_config).
|
55
|
-
returns({'user.email' => 'bar@example.com', 'user.name' => 'foo'})
|
56
|
-
end
|
57
|
-
|
58
|
-
context "instantiating new generator" do
|
59
|
-
setup do
|
60
|
-
@block = lambda { Jeweler::Generator.new('the-perfect-gem')}
|
61
|
-
end
|
62
|
-
|
63
|
-
should "raise no github user exception" do
|
64
|
-
assert_raise Jeweler::NoGitHubUser do
|
65
|
-
@block.call
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
context "without github token set" do
|
72
|
-
setup do
|
73
|
-
Jeweler::Generator.any_instance.stubs(:read_git_config).
|
74
|
-
returns({'user.email' => 'bar@example.com', 'user.name' => 'foo', 'github.user' => 'technicalpickles'})
|
75
|
-
end
|
76
|
-
|
77
|
-
context "instantiating new generator" do
|
78
|
-
setup do
|
79
|
-
@block = lambda { Jeweler::Generator.new('the-perfect-gem')}
|
80
|
-
end
|
81
|
-
|
82
|
-
should "raise no github user exception" do
|
83
|
-
assert_raise Jeweler::NoGitHubToken do
|
84
|
-
@block.call
|
85
|
-
end
|
86
|
-
end
|
87
|
-
end
|
88
|
-
end
|
89
|
-
|
90
|
-
context "with valid git user configuration" do
|
91
|
-
setup do
|
92
|
-
Jeweler::Generator.any_instance.stubs(:read_git_config).
|
93
|
-
returns({'user.name' => 'foo', 'user.email' => 'bar@example.com', 'github.user' => 'technicalpickles', 'github.token' => 'zomgtoken'})
|
94
|
-
end
|
95
|
-
|
96
|
-
context "for technicalpickle's the-perfect-gem repository" do
|
97
|
-
setup do
|
98
|
-
@generator = Jeweler::Generator.new('the-perfect-gem')
|
99
|
-
end
|
100
|
-
|
101
|
-
should "assign 'foo' to user's name" do
|
102
|
-
assert_equal 'foo', @generator.user_name
|
103
|
-
end
|
104
|
-
|
105
|
-
should "assign 'bar@example.com to user's email" do
|
106
|
-
assert_equal 'bar@example.com', @generator.user_email
|
107
|
-
end
|
108
|
-
|
109
|
-
should "assign github remote" do
|
110
|
-
assert_equal 'git@github.com:technicalpickles/the-perfect-gem.git', @generator.github_remote
|
111
|
-
end
|
112
|
-
|
113
|
-
should "determine github username as technicalpickles" do
|
114
|
-
assert_equal 'technicalpickles', @generator.github_username
|
115
|
-
end
|
116
|
-
|
117
|
-
should "determine github repository name as the-perfect-gem" do
|
118
|
-
assert_equal 'the-perfect-gem', @generator.github_repo_name
|
119
|
-
end
|
120
|
-
|
121
|
-
should "determine github url as http://github.com/technicalpickles/the-perfect-gem" do
|
122
|
-
assert_equal 'http://github.com/technicalpickles/the-perfect-gem', @generator.github_url
|
123
|
-
end
|
124
|
-
|
125
|
-
should "determine target directory as the same as the github repository name" do
|
126
|
-
assert_equal @generator.github_repo_name, @generator.target_dir
|
127
|
-
end
|
128
|
-
|
129
|
-
should "determine lib directory as being inside the target directory" do
|
130
|
-
assert_equal File.join(@generator.target_dir, 'lib'), @generator.lib_dir
|
131
|
-
end
|
132
|
-
|
133
|
-
should "determine test directory as being inside the target directory" do
|
134
|
-
assert_equal File.join(@generator.target_dir, 'test'), @generator.test_dir
|
135
|
-
end
|
136
|
-
|
137
|
-
should "determine constant name as ThePerfectGem" do
|
138
|
-
assert_equal 'ThePerfectGem', @generator.constant_name
|
139
|
-
end
|
140
|
-
|
141
|
-
should "determine file name prefix as the_perfect_gem" do
|
142
|
-
assert_equal 'the_perfect_gem', @generator.file_name_prefix
|
143
|
-
end
|
144
|
-
end
|
145
|
-
end
|
146
|
-
end
|
data/test/test_version.rb
DELETED
@@ -1,115 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/test_helper'
|
2
|
-
|
3
|
-
class TestVersion < 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.major
|
10
|
-
end
|
11
|
-
|
12
|
-
should "have minor version #{minor}" do
|
13
|
-
assert_equal minor, @version.minor
|
14
|
-
end
|
15
|
-
|
16
|
-
should "have patch version #{patch}" do
|
17
|
-
assert_equal patch, @version.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.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.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 = Jeweler::Version.new VERSION_TMP_DIR
|
40
|
-
end
|
41
|
-
|
42
|
-
should_have_version 3, 5, 4
|
43
|
-
|
44
|
-
context "bumping major version" do
|
45
|
-
setup { @version.bump_major }
|
46
|
-
should_have_version 4, 0, 0
|
47
|
-
end
|
48
|
-
|
49
|
-
context "bumping the minor version" do
|
50
|
-
setup { @version.bump_minor }
|
51
|
-
should_have_version 3, 6, 0
|
52
|
-
end
|
53
|
-
|
54
|
-
context "bumping the patch version" do
|
55
|
-
setup { @version.bump_patch }
|
56
|
-
should_have_version 3, 5, 5
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
context "Non-existant VERSION.yml" do
|
61
|
-
setup do
|
62
|
-
FileUtils.rm_rf VERSION_TMP_DIR
|
63
|
-
FileUtils.mkdir_p VERSION_TMP_DIR
|
64
|
-
end
|
65
|
-
|
66
|
-
should "not raise error if the VERSION.yml doesn't exist" do
|
67
|
-
assert_nothing_raised Jeweler::VersionYmlError do
|
68
|
-
Jeweler::Version.new(VERSION_TMP_DIR)
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
context "setting an initial version" do
|
73
|
-
setup do
|
74
|
-
@version = Jeweler::Version.new(VERSION_TMP_DIR)
|
75
|
-
@version.update_to 0, 0, 1
|
76
|
-
end
|
77
|
-
|
78
|
-
should_have_version 0, 0, 1
|
79
|
-
should "not create VERSION.yml" do
|
80
|
-
assert ! File.exists?(File.join(VERSION_TMP_DIR, 'VERSION.yml'))
|
81
|
-
end
|
82
|
-
|
83
|
-
context "outputting" do
|
84
|
-
setup do
|
85
|
-
@version.write
|
86
|
-
end
|
87
|
-
|
88
|
-
should "create VERSION.yml" do
|
89
|
-
assert File.exists?(File.join(VERSION_TMP_DIR, 'VERSION.yml'))
|
90
|
-
end
|
91
|
-
|
92
|
-
context "re-reading VERSION.yml" do
|
93
|
-
setup do
|
94
|
-
@version = Jeweler::Version.new(VERSION_TMP_DIR)
|
95
|
-
end
|
96
|
-
|
97
|
-
should_have_version 0, 0, 1
|
98
|
-
end
|
99
|
-
end
|
100
|
-
end
|
101
|
-
end
|
102
|
-
|
103
|
-
def build_version_yml(base_dir, major, minor, patch)
|
104
|
-
version_yaml_path = File.join(base_dir, 'VERSION.yml')
|
105
|
-
|
106
|
-
File.open(version_yaml_path, 'w+') do |f|
|
107
|
-
version_hash = {
|
108
|
-
'major' => major.to_i,
|
109
|
-
'minor' => minor.to_i,
|
110
|
-
'patch' => patch.to_i
|
111
|
-
}
|
112
|
-
YAML.dump(version_hash, f)
|
113
|
-
end
|
114
|
-
end
|
115
|
-
end
|