gem_polisher 0.2.2 → 0.3.2
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/lib/gem_polisher/release_task.rb +6 -6
- data/lib/gem_polisher/task.rb +18 -0
- data/lib/gem_polisher/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba92c8a81c78845d0a8a36dd2080a2389a6050d6
|
4
|
+
data.tar.gz: 42ba1253a00c2bbbab2131964c333582d9186d66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6af2c07124d919b657ba86c083b40a9ed413ba4a204399c9ad9bef98dac11edfa22b5ff220e7a1fda7e8ed7351a3499b3835ff0567cf111cf0903f1fd8393bc7
|
7
|
+
data.tar.gz: 7179359d12260c3416e44992a8822a60b63340a45311a882e17b6d48381d2c4858f2f6d41ea024dc84b893a829f6fd92c36d4dc0d1f3fafc375a5f0ab4710446
|
@@ -14,12 +14,12 @@ class GemPolisher
|
|
14
14
|
desc 'Update bundle, run tests, increment version, build and publish Gem; type can be major, minor or patch.'
|
15
15
|
task :release, [:type] do |t, args|
|
16
16
|
type = args[:type]
|
17
|
-
git_ensure_master_updated_clean
|
18
|
-
bundle_update
|
19
|
-
Rake::Task[:test].invoke
|
20
|
-
inc_version(type)
|
21
|
-
gem_build
|
22
|
-
gem_publish
|
17
|
+
step("Validating Git status") { git_ensure_master_updated_clean }
|
18
|
+
step("Updating Bundle") { bundle_update }
|
19
|
+
step("Running tests") { Rake::Task[:test].invoke }
|
20
|
+
step("Incrementing #{type} version") { inc_version(type) }
|
21
|
+
step("Building Gem") { gem_build }
|
22
|
+
step("Publishing Gem") { gem_publish }
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
data/lib/gem_polisher/task.rb
CHANGED
@@ -23,5 +23,23 @@ class GemPolisher
|
|
23
23
|
raise "Not implemented!"
|
24
24
|
end
|
25
25
|
|
26
|
+
ANSI_RESET = "\e[0m"
|
27
|
+
ANSI_ATTR_BRIGHT = "\e[1m"
|
28
|
+
ANSI_FG_GREEN = "\e[32m"
|
29
|
+
ANSI_FG_RED = "\e[31m"
|
30
|
+
|
31
|
+
# Log and execute block
|
32
|
+
def step name
|
33
|
+
print "#{ANSI_RESET}#{ANSI_ATTR_BRIGHT}#{name}...#{ANSI_RESET} "
|
34
|
+
begin
|
35
|
+
yield
|
36
|
+
rescue
|
37
|
+
puts "#{ANSI_RESET}#{ANSI_FG_RED}[FAIL]#{ANSI_RESET}"
|
38
|
+
raise $!
|
39
|
+
else
|
40
|
+
puts "#{ANSI_RESET}#{ANSI_FG_GREEN}[OK]#{ANSI_RESET}"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
26
44
|
end
|
27
45
|
end
|
data/lib/gem_polisher/version.rb
CHANGED