gem_polisher 0.2.2 → 0.3.2

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
  SHA1:
3
- metadata.gz: 9de31d417bf8dfa9949561e0f8abc7c2caa078f7
4
- data.tar.gz: fc728c559a92ae1c960dc361ca07299709c35b0e
3
+ metadata.gz: ba92c8a81c78845d0a8a36dd2080a2389a6050d6
4
+ data.tar.gz: 42ba1253a00c2bbbab2131964c333582d9186d66
5
5
  SHA512:
6
- metadata.gz: 39b6d1cd5595f009fd31376d39e90f86884eda44099f4efc5286ab02487799cb38dd72da1c258e69c0b9800beb05efdedccc560414fe25fc4667ae840d1d5989
7
- data.tar.gz: 8d832c773d4b89baeef432d3567ab75164d648538136bf2e956a08bf242b11c3b7de9c4afb0298f42baf87a4da09ff7379eae4f4777b894f657e53cc325bcc81
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
@@ -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
@@ -1,3 +1,3 @@
1
1
  class GemPolisher
2
- VERSION = '0.2.2'
2
+ VERSION = '0.3.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem_polisher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabio Pugliese Ornellas