rake_announcer 1.2.0 → 1.3.0
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +13 -2
- data/lib/rake_announcer/version.rb +1 -1
- data/lib/rake_announcer.rb +1 -2
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e27868a0e46643bf5041710acc7b032871945b2461936e3743a65a6ff585dc9f
|
|
4
|
+
data.tar.gz: efbd43a86834a29196e9cf0926db0f68a437b07391b3d76f64954665e30ad4a0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 35baded4a0509c801cda2badd08f485dfe61da10db0ac9411f3cf13885225baf558ba7a5549aad786dd519b07aaf4c5e5391419fad99c6079f4e6ea75167b5c6
|
|
7
|
+
data.tar.gz: 6384acf693afa7a7ebcfc218b10defed975a638aa98350c746f160f0def0b5e6110892207e9e340c994148cd3fb70bff2f82c014bf1d093c61ca68b307af43cc
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -33,9 +33,20 @@ require "rake_announcer/rake_task"
|
|
|
33
33
|
RakeAnnouncer::RakeTask.new(tasks: %i[spec rubocop])
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
Include the names of any rake tasks that you want announced in the `tasks` array. The above example will print a message before the `spec` and `rubocop` tasks.
|
|
36
|
+
Include the names of any rake tasks that you want announced in the `tasks` array. The above example will print a message before the `spec` and `rubocop` tasks run.
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
If you have a default Rake task defined you can automatically announce all of the dependent tasks like so avoiding any duplication:
|
|
39
|
+
|
|
40
|
+
```ruby
|
|
41
|
+
task default: %i[spec rubocop]
|
|
42
|
+
|
|
43
|
+
require "rake_announcer/rake_task"
|
|
44
|
+
RakeAnnouncer::RakeTask.new(tasks: Rake::Task[:default].prereqs, prepend: true)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
By default announcements are displayed immediately before each task runs, but after the task's dependencies/prerequisites have run. If you prefer the announcement to be displayed before any of the task's dependencies/prerequisites have run then you can use the `prepend: true` option.
|
|
48
|
+
|
|
49
|
+
Finally, you can print a simple "All Tests Passed" message by adding the `rake_announcer:ok` task, e.g.:
|
|
39
50
|
|
|
40
51
|
```ruby
|
|
41
52
|
task default: %i[spec rubocop rake_announcer:ok]
|
data/lib/rake_announcer.rb
CHANGED
|
@@ -23,7 +23,7 @@ module RakeAnnouncer
|
|
|
23
23
|
puts "\n#{Term::ANSIColor.blue}#{Term::ANSIColor.underline}● #{message}#{Term::ANSIColor.reset}"
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
# rubocop:disable Metrics/MethodLength
|
|
26
|
+
# rubocop:disable-next Metrics/MethodLength
|
|
27
27
|
def self.ok(message = "ALL TESTS PASSED")
|
|
28
28
|
puts
|
|
29
29
|
print Term::ANSIColor.bold,
|
|
@@ -41,5 +41,4 @@ module RakeAnnouncer
|
|
|
41
41
|
Term::ANSIColor.clear
|
|
42
42
|
puts
|
|
43
43
|
end
|
|
44
|
-
# rubocop:enable Metrics/MethodLength
|
|
45
44
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rake_announcer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Bull
|
|
@@ -67,14 +67,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
67
67
|
requirements:
|
|
68
68
|
- - ">="
|
|
69
69
|
- !ruby/object:Gem::Version
|
|
70
|
-
version: 3.
|
|
70
|
+
version: 3.3.0
|
|
71
71
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
73
|
- - ">="
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
75
|
version: '0'
|
|
76
76
|
requirements: []
|
|
77
|
-
rubygems_version:
|
|
77
|
+
rubygems_version: 4.0.20
|
|
78
78
|
specification_version: 4
|
|
79
79
|
summary: Print a message before each rake task
|
|
80
80
|
test_files: []
|