bozo 0.3.3 → 0.3.4

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.
@@ -1,42 +1,42 @@
1
- require 'test_helper'
2
-
3
- class BozoConfigurationVersion < Test::Unit::TestCase
4
-
5
- include FileUtils
6
-
7
- def setup
8
- @original_path = Dir.pwd
9
- @temp_dir = File.expand_path File.join(@original_path, 'temp')
10
- rm_rf @temp_dir if Dir.exist? @temp_dir
11
- mkdir_p @temp_dir
12
- Dir.chdir @temp_dir
13
- end
14
-
15
- def teardown
16
- Dir.chdir @original_path
17
- rm_rf @temp_dir
18
- end
19
-
20
- def test_loads_version
21
- File.open("VERSION", 'w') { |f| f << '1.2.3' }
22
-
23
- configuration = Bozo::BozoConfiguration.new
24
- assert_equal configuration.version.to_s, '1.2.3'
25
- end
26
-
27
- def test_version_file_does_not_exist
28
- # ensure the VERSION file doesn't exist
29
- rm 'VERSION' if File.exist? 'VERSION'
30
-
31
- configuration = Bozo::BozoConfiguration.new
32
- assert_raise(Bozo::ConfigurationError) { configuration.version }
33
- end
34
-
35
- def test_no_version
36
- touch 'VERSION'
37
-
38
- configuration = Bozo::BozoConfiguration.new
39
- assert_raise(Bozo::ConfigurationError) { configuration.version }
40
- end
41
-
1
+ require 'test_helper'
2
+
3
+ class BozoConfigurationVersion < Test::Unit::TestCase
4
+
5
+ include FileUtils
6
+
7
+ def setup
8
+ @original_path = Dir.pwd
9
+ @temp_dir = File.expand_path File.join(@original_path, 'temp')
10
+ rm_rf @temp_dir if Dir.exist? @temp_dir
11
+ mkdir_p @temp_dir
12
+ Dir.chdir @temp_dir
13
+ end
14
+
15
+ def teardown
16
+ Dir.chdir @original_path
17
+ rm_rf @temp_dir
18
+ end
19
+
20
+ def test_loads_version
21
+ File.open("VERSION", 'w') { |f| f << '1.2.3' }
22
+
23
+ configuration = Bozo::BozoConfiguration.new
24
+ assert_equal configuration.version.to_s, '1.2.3'
25
+ end
26
+
27
+ def test_version_file_does_not_exist
28
+ # ensure the VERSION file doesn't exist
29
+ rm 'VERSION' if File.exist? 'VERSION'
30
+
31
+ configuration = Bozo::BozoConfiguration.new
32
+ assert_raise(Bozo::ConfigurationError) { configuration.version }
33
+ end
34
+
35
+ def test_no_version
36
+ touch 'VERSION'
37
+
38
+ configuration = Bozo::BozoConfiguration.new
39
+ assert_raise(Bozo::ConfigurationError) { configuration.version }
40
+ end
41
+
42
42
  end
data/test/test_helper.rb CHANGED
@@ -1,3 +1,3 @@
1
- require 'bundler/setup'
2
- require 'test/unit'
1
+ require 'bundler/setup'
2
+ require 'test/unit'
3
3
  require File.dirname(__FILE__) + '/../lib/bozo'
@@ -1,62 +1,62 @@
1
- require 'test_helper'
2
-
3
- class VersionBumperTests < Test::Unit::TestCase
4
-
5
- include FileUtils
6
-
7
- def setup
8
- @original_path = Dir.pwd
9
- @temp_dir = File.expand_path File.join(@original_path, 'temp')
10
- rm_rf @temp_dir if Dir.exist? @temp_dir
11
- mkdir_p @temp_dir
12
- Dir.chdir @temp_dir
13
- end
14
-
15
- def teardown
16
- Dir.chdir @original_path
17
- rm_rf @temp_dir
18
- end
19
-
20
- def test_bumps_version_file
21
- git_init_and_commit_initial
22
- File.open("VERSION", 'w') { |f| f << '1.1.1' }
23
-
24
- version_bumper = Bozo::Versioning::VersionBumper.new
25
- version_bumper.bump :major
26
-
27
- assert_equal File.read('VERSION').strip, '2.0.0'
28
- end
29
-
30
- def test_bump_commits_file
31
- git_init_and_commit_initial
32
- File.open("VERSION", 'w') { |f| f << '1.1.1' }
33
-
34
- version_bumper = Bozo::Versioning::VersionBumper.new
35
- version_bumper.bump :major
36
-
37
- assert_true `git log -1 --oneline`.include?('Bumped 1.1.1 to 2.0.0')
38
- end
39
-
40
- def test_git_staging_pending_stops_bump
41
- git_init_and_commit_initial
42
-
43
- touch 'tempfile2'
44
- `git add tempfile2` # add file to staging to block bump
45
-
46
- File.open("VERSION", 'w') { |f| f << '1.1.1' }
47
-
48
- version_bumper = Bozo::Versioning::VersionBumper.new
49
-
50
- assert_raise(Bozo::Versioning::VersionBumpError) { version_bumper.bump :major }
51
- end
52
-
53
- private
54
-
55
- def git_init_and_commit_initial
56
- touch 'tempfile'
57
- `git init`
58
- `git add tempfile`
59
- `git commit -m "initial commit"`
60
- end
61
-
1
+ require 'test_helper'
2
+
3
+ class VersionBumperTests < Test::Unit::TestCase
4
+
5
+ include FileUtils
6
+
7
+ def setup
8
+ @original_path = Dir.pwd
9
+ @temp_dir = File.expand_path File.join(@original_path, 'temp')
10
+ rm_rf @temp_dir if Dir.exist? @temp_dir
11
+ mkdir_p @temp_dir
12
+ Dir.chdir @temp_dir
13
+ end
14
+
15
+ def teardown
16
+ Dir.chdir @original_path
17
+ rm_rf @temp_dir
18
+ end
19
+
20
+ def test_bumps_version_file
21
+ git_init_and_commit_initial
22
+ File.open("VERSION", 'w') { |f| f << '1.1.1' }
23
+
24
+ version_bumper = Bozo::Versioning::VersionBumper.new
25
+ version_bumper.bump :major
26
+
27
+ assert_equal File.read('VERSION').strip, '2.0.0'
28
+ end
29
+
30
+ def test_bump_commits_file
31
+ git_init_and_commit_initial
32
+ File.open("VERSION", 'w') { |f| f << '1.1.1' }
33
+
34
+ version_bumper = Bozo::Versioning::VersionBumper.new
35
+ version_bumper.bump :major
36
+
37
+ assert_true `git log -1 --oneline`.include?('Bumped 1.1.1 to 2.0.0')
38
+ end
39
+
40
+ def test_git_staging_pending_stops_bump
41
+ git_init_and_commit_initial
42
+
43
+ touch 'tempfile2'
44
+ `git add tempfile2` # add file to staging to block bump
45
+
46
+ File.open("VERSION", 'w') { |f| f << '1.1.1' }
47
+
48
+ version_bumper = Bozo::Versioning::VersionBumper.new
49
+
50
+ assert_raise(Bozo::Versioning::VersionBumpError) { version_bumper.bump :major }
51
+ end
52
+
53
+ private
54
+
55
+ def git_init_and_commit_initial
56
+ touch 'tempfile'
57
+ `git init`
58
+ `git add tempfile`
59
+ `git commit -m "initial commit"`
60
+ end
61
+
62
62
  end
@@ -1,26 +1,26 @@
1
- require 'test_helper'
2
-
3
- class VersionTests < Test::Unit::TestCase
4
-
5
- def test_bumps_major
6
- version = Bozo::Versioning::Version.parse '1.1.1'
7
- version.bump :major
8
-
9
- assert_equal version.to_s, '2.0.0'
10
- end
11
-
12
- def test_bumps_minor
13
- version = Bozo::Versioning::Version.parse '1.1.1'
14
- version.bump :minor
15
-
16
- assert_equal version.to_s, '1.2.0'
17
- end
18
-
19
- def test_bumps_patch
20
- version = Bozo::Versioning::Version.parse '1.1.1'
21
- version.bump :patch
22
-
23
- assert_equal version.to_s, '1.1.2'
24
- end
25
-
1
+ require 'test_helper'
2
+
3
+ class VersionTests < Test::Unit::TestCase
4
+
5
+ def test_bumps_major
6
+ version = Bozo::Versioning::Version.parse '1.1.1'
7
+ version.bump :major
8
+
9
+ assert_equal version.to_s, '2.0.0'
10
+ end
11
+
12
+ def test_bumps_minor
13
+ version = Bozo::Versioning::Version.parse '1.1.1'
14
+ version.bump :minor
15
+
16
+ assert_equal version.to_s, '1.2.0'
17
+ end
18
+
19
+ def test_bumps_patch
20
+ version = Bozo::Versioning::Version.parse '1.1.1'
21
+ version.bump :patch
22
+
23
+ assert_equal version.to_s, '1.1.2'
24
+ end
25
+
26
26
  end
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bozo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Garry Shutler
@@ -9,11 +10,12 @@ authors:
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2014-03-06 00:00:00.000000000 Z
13
+ date: 2014-03-10 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: gli
16
17
  requirement: !ruby/object:Gem::Requirement
18
+ none: false
17
19
  requirements:
18
20
  - - ~>
19
21
  - !ruby/object:Gem::Version
@@ -21,6 +23,7 @@ dependencies:
21
23
  type: :runtime
22
24
  prerelease: false
23
25
  version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
24
27
  requirements:
25
28
  - - ~>
26
29
  - !ruby/object:Gem::Version
@@ -28,6 +31,7 @@ dependencies:
28
31
  - !ruby/object:Gem::Dependency
29
32
  name: rainbow
30
33
  requirement: !ruby/object:Gem::Requirement
34
+ none: false
31
35
  requirements:
32
36
  - - ~>
33
37
  - !ruby/object:Gem::Version
@@ -35,6 +39,7 @@ dependencies:
35
39
  type: :runtime
36
40
  prerelease: false
37
41
  version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
38
43
  requirements:
39
44
  - - ~>
40
45
  - !ruby/object:Gem::Version
@@ -42,6 +47,7 @@ dependencies:
42
47
  - !ruby/object:Gem::Dependency
43
48
  name: test-unit
44
49
  requirement: !ruby/object:Gem::Requirement
50
+ none: false
45
51
  requirements:
46
52
  - - ~>
47
53
  - !ruby/object:Gem::Version
@@ -49,6 +55,7 @@ dependencies:
49
55
  type: :development
50
56
  prerelease: false
51
57
  version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
52
59
  requirements:
53
60
  - - ~>
54
61
  - !ruby/object:Gem::Version
@@ -71,8 +78,8 @@ files:
71
78
  - lib/bozo/logging.rb
72
79
  - lib/bozo/runner.rb
73
80
  - lib/bozo/versioning/version.rb
74
- - lib/bozo/versioning/version_bumper.rb
75
81
  - lib/bozo/versioning/version_bump_error.rb
82
+ - lib/bozo/versioning/version_bumper.rb
76
83
  - lib/bozo.rb
77
84
  - README.md
78
85
  - VERSION
@@ -83,26 +90,33 @@ files:
83
90
  - bin/bozo
84
91
  homepage: https://github.com/zopaUK/bozo
85
92
  licenses: []
86
- metadata: {}
87
93
  post_install_message:
88
94
  rdoc_options: []
89
95
  require_paths:
90
96
  - lib
91
97
  required_ruby_version: !ruby/object:Gem::Requirement
98
+ none: false
92
99
  requirements:
93
100
  - - ! '>='
94
101
  - !ruby/object:Gem::Version
95
102
  version: '0'
103
+ segments:
104
+ - 0
105
+ hash: -2802098740477698780
96
106
  required_rubygems_version: !ruby/object:Gem::Requirement
107
+ none: false
97
108
  requirements:
98
109
  - - ! '>='
99
110
  - !ruby/object:Gem::Version
100
111
  version: '0'
112
+ segments:
113
+ - 0
114
+ hash: -2802098740477698780
101
115
  requirements: []
102
116
  rubyforge_project: bozo
103
- rubygems_version: 2.0.3
117
+ rubygems_version: 1.8.24
104
118
  signing_key:
105
- specification_version: 4
119
+ specification_version: 3
106
120
  summary: Zopa build system
107
121
  test_files:
108
122
  - test/bozo_configuration_version_tests.rb
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YzliYmE5YTJhYmMzY2NiOWZmZWQyMGUwZGIxMzdjOTkzYWNiZmYzOA==
5
- data.tar.gz: !binary |-
6
- YTYyZGFjZjNiODRhMzBjZjM4MTU4ZmQzYmNhMmYwOWI5OWUyOTYyMA==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- MmExMTBhMDEwNmQwYWEwYjIyNWExOTU4ZGQxN2MwMmYxNjdkYjlkNjM0NzFj
10
- OTk3MmEwZDYyOTA3MDhhY2U5ZDM2ZTE5ODRhMzk5NDkzNzM4ZmEwMGNlZDBi
11
- NzAyZDQ1YTM4MzljYTBmMzM2NDY3YTFlMTg3ZWRmZDg2NzFlNTc=
12
- data.tar.gz: !binary |-
13
- OGFmNDE3NGY2OGU0ZTRlYTQ5YmYxYzJiOTJkZDVlNDcxOTM3YTg1MjU4MTVi
14
- ZTQ0MjU2NDNjMzhmODczN2FlZmU0MjJiMTg4MWViMTQ3MDQ5ODAzYmNkMmRh
15
- MzhiMWUyOTM4ZjNlYWRmZjM1NDIzMDE0NzNhZTYxMzcyYjIwMmQ=