buildar 3.0.2.1 → 3.1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 833e11b9319991ccfebdaa2e20555b9fb4f2fdfa6bc40210897ed98282c67f40
4
- data.tar.gz: 5527c38a72f392b139a1fa3a8cd865f541e642be6bf5feca512f593229d94d14
3
+ metadata.gz: 650a802bd480f4a737731c48790225ea2e9ad1732da301f5822614b707e37b6b
4
+ data.tar.gz: eaeb74445dde4a5ff0473e2970f1bebc93d7eb2f5f1e022c8648514c1607c6f4
5
5
  SHA512:
6
- metadata.gz: ec66531a9d2ac8e5d0b9af9bbf8f1f3b27817c8c84af8210c049ed67f500313908cd3326555a146b8e193ddc145527a132de0062c1889cf2ffd16701573ef2be
7
- data.tar.gz: bb1b780d9c9245cc7a5ccafb9802e539ef5e5c045e35e6463c631be477239ddd1f22c25b33ca267a710d687060842d07112c979993f1aa0c34b2b7ec8a11932a
6
+ metadata.gz: 87797a5cfb12eb28bba7f4d3f05b9e59acf45bb3ed4904f2f1bf9d583deb4157b04570c9d165d516e79bd5950cf43d8ce03f61c9951b3824bc0ddcbdecbf7b29
7
+ data.tar.gz: 50e207e7441d6d5ee26bb441318e9607d88b368301378dff4fafd89320ba6ae09d011a4426d2a27945652a1dd58dbf7c1ba2428d5a5eaf74610959be8f8f77cf
data/README.md CHANGED
@@ -1,6 +1,4 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/buildar.svg)](http://badge.fury.io/rb/buildar)
2
- [![Dependency Status](https://gemnasium.com/rickhull/buildar.svg)](https://gemnasium.com/rickhull/buildar)
3
- [![Security Status](https://hakiri.io/github/rickhull/buildar/master.svg)](https://hakiri.io/github/rickhull/buildar/master/shield)
4
2
 
5
3
  # Buildar
6
4
 
@@ -211,15 +209,4 @@ Buildar.new do |b|
211
209
  You'll need to keep your gemspec file in synch with `b.version_file`.
212
210
  Here's [how Buildar does it](https://github.com/rickhull/buildar/blob/master/buildar.gemspec):
213
211
 
214
- ```ruby
215
- # Gem::Specification.new do |s|
216
- # ...
217
- s.version = File.read(File.join(__dir__, 'VERSION')).chomp
218
- s.files =
219
- File.readlines(File.join(__dir__, 'MANIFEST.txt')).map { |f| f.chomp }
220
- ```
221
-
222
- Buildar maintains a
223
- [MANIFEST.txt](https://github.com/rickhull/buildar/blob/master/MANIFEST.txt)
224
- -- the canonical list of files belonging to the project --
225
- outside of the gemspec.
212
+ https://github.com/rickhull/buildar/blob/04ee729169bc4f77fc6f68778e565c7fcf914e7d/buildar.gemspec#L12-L15
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.2.1
1
+ 3.1.0.1
data/buildar.gemspec CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |s|
9
9
 
10
10
  s.required_ruby_version = ">= 2"
11
11
 
12
- # dynamic assignments
13
12
  s.version = File.read(File.join(__dir__, 'VERSION')).chomp
14
- s.files =
15
- File.readlines(File.join(__dir__, 'MANIFEST.txt')).map { |f| f.chomp }
13
+ s.files = %w[buildar.gemspec VERSION README.md Rakefile]
14
+ s.files += Dir['lib/**/*.rb']
15
+ s.files += Dir['test/**/*.rb']
16
16
  end
data/test/buildar.rb ADDED
@@ -0,0 +1,55 @@
1
+ require 'minitest/autorun'
2
+ require 'buildar'
3
+
4
+ describe Buildar do
5
+ describe :bump do
6
+ it "must handle empty version" do
7
+ expect(Buildar.bump(:build, '')).must_equal '0.0.0.1'
8
+ expect(Buildar.bump(:patch, '')).must_equal '0.0.1'
9
+ expect(Buildar.bump(:minor, '')).must_equal '0.1'
10
+ expect(Buildar.bump(:major, '')).must_equal '1'
11
+ end
12
+
13
+ it "must handle 0 version" do
14
+ expect(Buildar.bump(:build, '0')).must_equal '0.0.0.1'
15
+ expect(Buildar.bump(:patch, '0')).must_equal '0.0.1'
16
+ expect(Buildar.bump(:minor, '0')).must_equal '0.1'
17
+ expect(Buildar.bump(:major, '0')).must_equal '1'
18
+ end
19
+
20
+ it "must handle 1 version" do
21
+ expect(Buildar.bump(:build, '1')).must_equal '1.0.0.1'
22
+ expect(Buildar.bump(:patch, '1')).must_equal '1.0.1'
23
+ expect(Buildar.bump(:minor, '1')).must_equal '1.1'
24
+ expect(Buildar.bump(:major, '1')).must_equal '2'
25
+ end
26
+
27
+ it "must handle 0.1 version" do
28
+ expect(Buildar.bump(:build, '0.1')).must_equal '0.1.0.1'
29
+ expect(Buildar.bump(:patch, '0.1')).must_equal '0.1.1'
30
+ expect(Buildar.bump(:minor, '0.1')).must_equal '0.2'
31
+ expect(Buildar.bump(:major, '0.1')).must_equal '1.0'
32
+ end
33
+
34
+ it "must handle 0.1.2 version" do
35
+ expect(Buildar.bump(:build, '0.1.2')).must_equal '0.1.2.1'
36
+ expect(Buildar.bump(:patch, '0.1.2')).must_equal '0.1.3'
37
+ expect(Buildar.bump(:minor, '0.1.2')).must_equal '0.2.0'
38
+ expect(Buildar.bump(:major, '0.1.2')).must_equal '1.0.0'
39
+ end
40
+
41
+ it "must handle 9.9.9 version" do
42
+ expect(Buildar.bump(:build, '9.9.9')).must_equal '9.9.9.1'
43
+ expect(Buildar.bump(:patch, '9.9.9')).must_equal '9.9.10'
44
+ expect(Buildar.bump(:minor, '9.9.9')).must_equal '9.10.0'
45
+ expect(Buildar.bump(:major, '9.9.9')).must_equal '10.0.0'
46
+ end
47
+
48
+ it "must handle 0.1.2.3 version" do
49
+ expect(Buildar.bump(:build, '0.1.2.3')).must_equal '0.1.2.4'
50
+ expect(Buildar.bump(:patch, '0.1.2.3')).must_equal '0.1.3.0'
51
+ expect(Buildar.bump(:minor, '0.1.2.3')).must_equal '0.2.0.0'
52
+ expect(Buildar.bump(:major, '0.1.2.3')).must_equal '1.0.0.0'
53
+ end
54
+ end
55
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buildar
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2.1
4
+ version: 3.1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rick Hull
@@ -17,12 +17,12 @@ executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
- - MANIFEST.txt
21
20
  - README.md
22
21
  - Rakefile
23
22
  - VERSION
24
23
  - buildar.gemspec
25
24
  - lib/buildar.rb
25
+ - test/buildar.rb
26
26
  homepage: https://github.com/rickhull/buildar
27
27
  licenses:
28
28
  - MIT
data/MANIFEST.txt DELETED
@@ -1,6 +0,0 @@
1
- buildar.gemspec
2
- MANIFEST.txt
3
- VERSION
4
- README.md
5
- Rakefile
6
- lib/buildar.rb