buildar 3.0.0.1 → 3.0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (7) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +96 -69
  3. data/Rakefile +8 -12
  4. data/VERSION +1 -1
  5. data/buildar.gemspec +1 -2
  6. data/lib/buildar.rb +2 -3
  7. metadata +8 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d66f1821b6fed8ae765cb0863bcc94d2e1d26e4f
4
- data.tar.gz: 9abd4f6724a248baf196221945d443f630aa32b7
2
+ SHA256:
3
+ metadata.gz: 833e11b9319991ccfebdaa2e20555b9fb4f2fdfa6bc40210897ed98282c67f40
4
+ data.tar.gz: 5527c38a72f392b139a1fa3a8cd865f541e642be6bf5feca512f593229d94d14
5
5
  SHA512:
6
- metadata.gz: 7b675e519283d5a47c67a87e8709961f590febc2e64dad02e4406fc3ef29413cc99ecf57e8fb09b08cc9f84b9b4579fe9ffa880fd29cec0c695c287340fbe20e
7
- data.tar.gz: 4ffdd5035cbf607a5b719e6c8f551575a5c9cf09da3892d48c0a92bcfb4e6d4c8ef5f5e6c12d90debde397b0bd5765342c7af60528c26a2e65cabae8824977bb
6
+ metadata.gz: ec66531a9d2ac8e5d0b9af9bbf8f1f3b27817c8c84af8210c049ed67f500313908cd3326555a146b8e193ddc145527a132de0062c1889cf2ffd16701573ef2be
7
+ data.tar.gz: bb1b780d9c9245cc7a5ccafb9802e539ef5e5c045e35e6463c631be477239ddd1f22c25b33ca267a710d687060842d07112c979993f1aa0c34b2b7ec8a11932a
data/README.md CHANGED
@@ -2,8 +2,8 @@
2
2
  [![Dependency Status](https://gemnasium.com/rickhull/buildar.svg)](https://gemnasium.com/rickhull/buildar)
3
3
  [![Security Status](https://hakiri.io/github/rickhull/buildar/master.svg)](https://hakiri.io/github/rickhull/buildar/master/shield)
4
4
 
5
- Buildar
6
- =======
5
+ # Buildar
6
+
7
7
  Buildar provides a set of rake tasks to help automate releasing your gem:
8
8
  * Versioning
9
9
  * Building / Packaging
@@ -11,45 +11,49 @@ Buildar provides a set of rake tasks to help automate releasing your gem:
11
11
 
12
12
  With a set of options to integrate with your current project.
13
13
 
14
- Rake tasks
15
- ----------
16
- Core
17
- * `release` - `build` `publish` `tag`
18
- * `build` - `pre_build` gem build a pkg/.gem
19
- * `gem_package` - `pre_build` Gem::PackageTask builds a pkg/.gem
20
- * `publish` - `built` gem push
21
- * `buildar` - config check
22
-
23
- Aux
24
- * `pre_build` - invoke `test` and `bump:build` conditionally
25
- * `built` - `build` conditionally
26
- * `install` - `built` gem install .gem
27
- * `install_new` - `build` install built .gem
28
- * `version` - show the current project version
29
-
30
- With git integration
31
- * `tag` - `message` git tag current version, push to origin
32
- * `message` - capture a message from ENV['message'] or prompt STDIN
33
-
34
- With version file integration
35
- * `bump:build` - increment the 4th version number (1.2.3.4 -> 1.2.3.5)
36
- * `bump:patch` - increment the 3rd version number (1.2.3.4 -> 1.2.4.0)
37
- * `bump:minor` - increment the 2nd version number (1.2.3.4 -> 1.3.0.0)
38
- * `bump:major` - increment the 1st version number (1.2.3.4 -> 2.0.0.0)
39
- * `release:patch` - `bump:patch` `release`
40
- * `release:minor` - `bump:minor` `release`
41
- * `release:major` - `bump:major` `release`
14
+ ## Rake tasks
15
+
16
+ ### Core
17
+
18
+ * **`release`** - *`build`*, *`publish`*, *`tag`*
19
+ * **`build`** - *`prebuild`*, `gem build`
20
+ * **`gem_package`** - *`pre_build`*, build with `Gem::PackageTask`
21
+ * **`publish`** - *`built`*, `gem push`
22
+ * **`buildar`** - config check
23
+
24
+ ### Aux
25
+
26
+ * **`pre_build`** - invoke *`test`* and *`bump:build`* conditionally
27
+ * **`built`** - invoke *`build`* conditionally
28
+ * **`install`** - *`built`*, `gem install`
29
+ * **`install_new`** - *`build`*, `gem install`
30
+ * **`version`** - show the current project version
31
+
32
+ ### With git integration
33
+
34
+ * **`tag`** - *`message`*, `git tag` current version, `git push` to origin
35
+ * **`message`** - capture a message from `ENV['message']` or prompt STDIN
36
+
37
+ ### With version file integration
38
+
39
+ * **`bump:build`** - increment the 4th version number (1.2.3.4 -> 1.2.3.5)
40
+ * **`bump:patch`** - increment the 3rd version number (1.2.3.4 -> 1.2.4.0)
41
+ * **`bump:minor`** - increment the 2nd version number (1.2.3.4 -> 1.3.0.0)
42
+ * **`bump:major`** - increment the 1st version number (1.2.3.4 -> 2.0.0.0)
43
+ * **`release:patch`** - *`bump:patch`*, *`release`*
44
+ * **`release:minor`** - *`bump:minor`*, *`release`*
45
+ * **`release:major`** - *`bump:major`*, *`release`*
42
46
 
43
47
  [Just show me the tasks](https://github.com/rickhull/buildar/blob/master/lib/buildar.rb#L73)
44
48
 
45
- Install
46
- -------
49
+ ## Install
50
+
47
51
  ```shell
48
52
  $ gem install buildar # sudo as necessary
49
53
  ```
50
54
 
51
- Usage
52
- -----
55
+ ## Usage
56
+
53
57
  Edit your Rakefile. Add to the top:
54
58
 
55
59
  ```ruby
@@ -60,10 +64,15 @@ Buildar.new do |b|
60
64
  end
61
65
  ```
62
66
 
63
- That is basically the minimal Rakefile needed for Buildar to operate, assuming you have a valid gemspec file named `example.gemspec`.
67
+ That is basically the minimal Rakefile needed for Buildar to operate, assuming
68
+ you have a valid gemspec file named `example.gemspec`.
69
+
70
+
71
+ Let's try a Buildar task, **`release`**:
64
72
 
65
73
  ```
66
74
  $ rake release
75
+
67
76
  gem build example.gemspec
68
77
  WARNING: no email specified
69
78
  Successfully built RubyGem
@@ -76,8 +85,8 @@ Pushing gem to https://rubygems.org...
76
85
  Successfully registered gem: example (1.2.3)
77
86
  ```
78
87
 
79
- Without a gemspec file
80
- ----------------------
88
+ ### Without a gemspec file
89
+
81
90
  ```ruby
82
91
  Buildar.new do |b|
83
92
  b.gemspec.name = 'example'
@@ -92,24 +101,30 @@ end
92
101
 
93
102
  From [examples/no_gemspec_file.rb](https://github.com/rickhull/buildar/blob/master/examples/no_gemspec_file.rb)
94
103
 
95
- Dogfood
96
- -------
104
+ ### Dogfood
105
+
97
106
  Here is Buildar's [Rakefile](https://github.com/rickhull/buildar/blob/master/Rakefile):
98
107
 
99
108
  ```ruby
100
- require 'buildar'
109
+ begin
110
+ require 'buildar'
101
111
 
102
- Buildar.new do |b|
103
- b.gemspec_file = 'buildar.gemspec'
104
- b.version_file = 'VERSION'
105
- b.use_git = true
112
+ Buildar.new do |b|
113
+ b.gemspec_file = 'buildar.gemspec'
114
+ b.version_file = 'VERSION'
115
+ b.use_git = true
116
+ end
117
+
118
+ rescue LoadError => e
119
+ warn "buildar failed to load: #{e}"
106
120
  end
107
121
  ```
108
122
 
109
- With `b.version_file` and `b.use_git`
123
+ Let's try **`release:patch`**, this time with `b.version_file` and `b.use_git`:
110
124
 
111
125
  ```
112
126
  $ rake release:patch message="added version task; demonstrating Usage"
127
+
113
128
  bumping 2.0.0.9 to 2.0.1.0
114
129
  git commit VERSION -m "Buildar version:bump_patch to 2.0.1.0"
115
130
  [master 5df1ff8] Buildar version:bump_patch to 2.0.1.0
@@ -134,28 +149,39 @@ To https://github.com/rickhull/buildar.git
134
149
  * [new tag] v2.0.1.1 -> v2.0.1.1
135
150
  ```
136
151
 
137
- Use a VERSION file
138
- ------------------
152
+ ### Use a VERSION file
153
+
139
154
  * Buildar can manage your version numbers with `b.version_file`
140
- * The version only matters in the context of a release. For internal development, git SHAs vastly outclass version numbers.
141
- * "The right version number" for the next release is a function of the current release version and the magnitude (or breakiness) of the change
155
+ * The version only matters in the context of a release. For internal
156
+ development, git SHAs vastly outclass version numbers.
157
+ * "The right version number" for the next release is a function of the current
158
+ release version and the magnitude (or breakiness) of the change
142
159
  * http://guides.rubygems.org/patterns/#semantic-versioning
143
160
  * http://semver.org/
144
161
  * Automate everything
145
162
 
146
163
  The [VERSION](https://github.com/rickhull/buildar/blob/master/VERSION) file at your project root should look something like
164
+
147
165
  ```
148
166
  1.2.3.4
149
167
  ```
150
168
 
151
- Buildar will be able to `bump:major` `bump:minor` `bump:patch` and `bump:build`. This helps with a repeatable, identifiable builds: `build` invokes `bump:build` etc.
169
+ Buildar will be able to **`bump:major`**, **`bump:minor`**, **`bump:patch`**,
170
+ and **`bump:build`**. This helps with a repeatable, identifiable builds:
171
+ **`build`** invokes **`bump:build`** etc.
152
172
 
153
- Every build bumps the build number. Since the build operates off of your potentially dirty working copy, and not some commit SHA, there is no guarantee that things haven't changed between builds, even if "nothing is supposed to have changed". This guarantees that you can't have 2 builds floating around with the same version number but different contents.
173
+ Every build bumps the build number. Since the build operates off of your
174
+ potentially dirty working copy, and not some commit SHA, there is no guarantee
175
+ that things haven't changed between builds, even if "nothing is supposed to
176
+ have changed". This guarantees that you can't have 2 builds floating around
177
+ with the same version number but different contents.
154
178
 
155
- Typically you'll want to let Buildar manage the build number, and you manage the major, minor, and patch numbers with:
156
- * `release:major` - `bump:major`
157
- * `release:minor` - `bump:minor`
158
- * `release:patch` - `bump:patch`
179
+ Typically you'll want to let Buildar manage the build number, and you manage
180
+ the major, minor, and patch numbers with:
181
+
182
+ * **`release:major`** - *`bump:major`*
183
+ * **`release:minor`** - *`bump:minor`*
184
+ * **`release:patch`** - *`bump:patch`*
159
185
 
160
186
  To make your app or lib aware of its version via this file, simply:
161
187
 
@@ -165,15 +191,16 @@ To make your app or lib aware of its version via this file, simply:
165
191
  module Foo
166
192
  def self.version
167
193
  file = File.expand_path('../../VERSION', __FILE__)
168
- File.read(file).chomp
194
+ File.read(file).chomp
169
195
  end
170
196
  end
171
197
  ```
172
198
 
173
- `b.version_file` defaults to nil, so if you don't set it, you'll have to keep your gemspec's version attribute updated.
199
+ `b.version_file` defaults to nil, so if you don't set it, you'll have to keep
200
+ your gemspec's version attribute updated.
201
+
202
+ ### Gemspec file tricks
174
203
 
175
- Gemspec file tricks
176
- -------------------
177
204
  With
178
205
  ```ruby
179
206
  Buildar.new do |b|
@@ -181,18 +208,18 @@ Buildar.new do |b|
181
208
  b.version_file = 'VERSION'
182
209
  ```
183
210
 
184
- You'll need to keep your gemspec file in synch with the version_file. Here's [how Buildar does it](https://github.com/rickhull/buildar/blob/master/buildar.gemspec):
211
+ You'll need to keep your gemspec file in synch with `b.version_file`.
212
+ Here's [how Buildar does it](https://github.com/rickhull/buildar/blob/master/buildar.gemspec):
213
+
185
214
  ```ruby
186
215
  # Gem::Specification.new do |s|
187
216
  # ...
188
- # dynamic setup
189
- this_dir = File.expand_path('..', __FILE__)
190
- version_file = File.join(this_dir, 'VERSION')
191
- manifest_file = File.join(this_dir, 'MANIFEST.txt')
192
-
193
- # dynamic assignments
194
- s.version = File.read(version_file).chomp
195
- s.files = File.readlines(manifest_file).map { |f| f.chomp }
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 }
196
220
  ```
197
221
 
198
- I also like to maintain a [MANIFEST.txt](https://github.com/rickhull/buildar/blob/master/MANIFEST.txt) -- the canonical list of files belonging to the project -- outside of the gemspec.
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.
data/Rakefile CHANGED
@@ -1,3 +1,11 @@
1
+ require 'rake/testtask'
2
+
3
+ Rake::TestTask.new do |t|
4
+ t.test_files = FileList['test/**/*.rb']
5
+ end
6
+
7
+ task default: :test
8
+
1
9
  begin
2
10
  require 'buildar'
3
11
 
@@ -10,15 +18,3 @@ begin
10
18
  rescue LoadError => e
11
19
  warn "buildar failed to load: #{e}"
12
20
  end
13
-
14
- begin
15
- require 'rake/testtask'
16
-
17
- Rake::TestTask.new do |t|
18
- t.test_files = FileList['test/**/*.rb']
19
- end
20
-
21
- task default: :test
22
- rescue Exception => e
23
- warn "rake/testtask error: #{e}"
24
- end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.0.1
1
+ 3.0.2.1
data/buildar.gemspec CHANGED
@@ -5,10 +5,9 @@ Gem::Specification.new do |s|
5
5
  s.author = 'Rick Hull'
6
6
  s.homepage = 'https://github.com/rickhull/buildar'
7
7
  s.license = 'MIT'
8
- s.has_rdoc = true
9
8
  s.description = 'Buildar helps automate the release process with versioning, building, packaging, and publishing. Optional git integration.'
10
9
 
11
- s.required_ruby_version = "~> 2"
10
+ s.required_ruby_version = ">= 2"
12
11
 
13
12
  # dynamic assignments
14
13
  s.version = File.read(File.join(__dir__, 'VERSION')).chomp
data/lib/buildar.rb CHANGED
@@ -4,8 +4,7 @@ require 'rake/tasklib'
4
4
 
5
5
  class Buildar < Rake::TaskLib
6
6
  def self.version
7
- file = File.expand_path('../../VERSION', __FILE__)
8
- File.read(file).chomp
7
+ File.read(File.join(__dir__, '..', 'VERSION')).chomp
9
8
  end
10
9
 
11
10
  # e.g. bump(:minor, '1.2.3') #=> '1.3.0'
@@ -160,7 +159,7 @@ EOF
160
159
 
161
160
  # desc "used internally; make sure we have .gem for the current version"
162
161
  task :built do
163
- Rake::Task[:build].invoke unless File.exists? self.gem_file
162
+ Rake::Task[:build].invoke unless File.exist? self.gem_file
164
163
  end
165
164
 
166
165
  desc "publish the current version to rubygems.org"
metadata CHANGED
@@ -1,18 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buildar
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.1
4
+ version: 3.0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rick Hull
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-27 00:00:00.000000000 Z
11
+ date: 1980-01-01 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Buildar helps automate the release process with versioning, building,
14
14
  packaging, and publishing. Optional git integration.
15
- email:
15
+ email:
16
16
  executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
@@ -27,13 +27,13 @@ homepage: https://github.com/rickhull/buildar
27
27
  licenses:
28
28
  - MIT
29
29
  metadata: {}
30
- post_install_message:
30
+ post_install_message:
31
31
  rdoc_options: []
32
32
  require_paths:
33
33
  - lib
34
34
  required_ruby_version: !ruby/object:Gem::Requirement
35
35
  requirements:
36
- - - "~>"
36
+ - - ">="
37
37
  - !ruby/object:Gem::Version
38
38
  version: '2'
39
39
  required_rubygems_version: !ruby/object:Gem::Requirement
@@ -42,9 +42,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
42
42
  - !ruby/object:Gem::Version
43
43
  version: '0'
44
44
  requirements: []
45
- rubyforge_project:
46
- rubygems_version: 2.6.8
47
- signing_key:
45
+ rubygems_version: 3.4.4
46
+ signing_key:
48
47
  specification_version: 4
49
48
  summary: Buildar adds rake tasks to assist with gem publishing
50
49
  test_files: []