buildar 3.0.2.1 → 3.1.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 833e11b9319991ccfebdaa2e20555b9fb4f2fdfa6bc40210897ed98282c67f40
4
- data.tar.gz: 5527c38a72f392b139a1fa3a8cd865f541e642be6bf5feca512f593229d94d14
3
+ metadata.gz: c68f97a6e97d236d6da6f0b58f24abb7fbac187d063a021571e0fef592758678
4
+ data.tar.gz: 936070240b17a42bc3393810d5c07592189ca11ef22d306836f3abe16bf8d0aa
5
5
  SHA512:
6
- metadata.gz: ec66531a9d2ac8e5d0b9af9bbf8f1f3b27817c8c84af8210c049ed67f500313908cd3326555a146b8e193ddc145527a132de0062c1889cf2ffd16701573ef2be
7
- data.tar.gz: bb1b780d9c9245cc7a5ccafb9802e539ef5e5c045e35e6463c631be477239ddd1f22c25b33ca267a710d687060842d07112c979993f1aa0c34b2b7ec8a11932a
6
+ metadata.gz: 124938fd2aa51cfbf7f65351d540e9c6a2bfb49f3387eb46d8c23efcea045a4febdfa5a015b74ba72be195f9a55bf157fe52f64fb47db5c3e70cb17e4fe982a2
7
+ data.tar.gz: 4a85c35a71bd91438d87516d9a2da74cad639c9fa5dc37a8ca1131a334e08a6295f6d7c39145ebe599efb2bfc0d165a508419ff528a5642db524e4c1cb27c45f
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/Rakefile CHANGED
@@ -16,5 +16,5 @@ begin
16
16
  end
17
17
 
18
18
  rescue LoadError => e
19
- warn "buildar failed to load: #{e}"
19
+ warn "buildar tasks unavailable"
20
20
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.2.1
1
+ 3.1.1.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/lib/buildar.rb CHANGED
@@ -167,7 +167,7 @@ EOF
167
167
  sh "gem push #{self.gem_file}"
168
168
  end
169
169
 
170
- desc "build, publish" << (@use_git ? ", tag " : '')
170
+ desc "build, publish" + (@use_git ? ", tag " : '')
171
171
  task release: [:build, :publish] do
172
172
  Rake::Task[:tag].invoke if @use_git
173
173
  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.1.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
@@ -42,7 +42,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
42
42
  - !ruby/object:Gem::Version
43
43
  version: '0'
44
44
  requirements: []
45
- rubygems_version: 3.4.4
45
+ rubygems_version: 3.4.1
46
46
  signing_key:
47
47
  specification_version: 4
48
48
  summary: Buildar adds rake tasks to assist with gem publishing
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