simple_infrastructure 0.1.1 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e385493d93d7dfcd60c781d825f600533ccf48337f313885d10fffa726b2a02
4
- data.tar.gz: '0080d9b750515015b00970b7c63fbdc4c2f6d2b982699f1cba1699ac97ee2205'
3
+ metadata.gz: 55184dee56e24b9300bf725d4594bd803110b97f48f8b4d61a2eb896903affcf
4
+ data.tar.gz: bbbd09a4162cb33839a6b8667cb2b0b4d85ac9f5c50eec6298fe4a051ec8b3ba
5
5
  SHA512:
6
- metadata.gz: ce28beebdecd09f418264a75ceb04c6b631a18bc01e2660b8fbca441a12694f89800ddb7f9e2801c2fed38fa0b27e37581d8e714b30610c0d4106860d8e511dd
7
- data.tar.gz: 83e65e12633c0fea67edae3d6c16fd0f00f916e3dd9c32bc23f8226c897b2c6cf02b7a5ff38f6b4fcbd0ba9bcd02d7a2f71f3f8f69bb8d757bd3e6f973b71900
6
+ metadata.gz: 21abb10a5bcf5f2763a183c50b076c226a5b88c233d8db98b609a67d7bca7ab89ad608c22476130d4792f569913455e33350da5c1114cdcc7c7654b629bda191
7
+ data.tar.gz: c63a565b95cbf6afc843ae28b45aeb93fb677497565f0bb65632a0fbc8b383e06d3692e36ae41aa09367b6400c310ed8783f7bcd90e7c42a93891309672d11ec
@@ -278,6 +278,9 @@ module SimpleInfrastructure
278
278
  .join
279
279
  .strip
280
280
 
281
+ change_summary = success.is_a?(Integer) && success > 0 ?
282
+ " (#{success} change#{'s' unless success == 1} applied)" : ""
283
+
281
284
  if error || !success
282
285
  print "#{CLEAR_LINE}#{RED}⚠️ #{label}#{RESET}\n"
283
286
  puts output unless output.empty?
@@ -285,12 +288,12 @@ module SimpleInfrastructure
285
288
  puts
286
289
  @results << false
287
290
  elsif show_output && !output.empty?
288
- print "#{CLEAR_LINE}⏳ #{label}\n"
291
+ print "#{CLEAR_LINE}⏳ #{label}#{change_summary}\n"
289
292
  puts output
290
293
  puts
291
294
  @results << true
292
295
  else
293
- print "#{CLEAR_LINE}✅ #{label}\n"
296
+ print "#{CLEAR_LINE}✅ #{label}#{change_summary}\n"
294
297
  @results << true
295
298
  end
296
299
  end
@@ -55,7 +55,7 @@ module SimpleInfrastructure
55
55
  SimpleInfrastructure.logger.debug "\r\e[K"
56
56
  if pending.empty?
57
57
  SimpleInfrastructure.logger.debug "#{server}: up to date"
58
- return true
58
+ return 0
59
59
  end
60
60
 
61
61
  SimpleInfrastructure.logger.debug "#{server}: #{pending.length} pending change(s)"
@@ -84,7 +84,7 @@ module SimpleInfrastructure
84
84
  SimpleInfrastructure.logger.debug " DONE: #{change.name}"
85
85
  SimpleInfrastructure.logger.debug "" if index < pending.length - 1
86
86
  end
87
- true
87
+ pending.length
88
88
  rescue StandardError => e
89
89
  SimpleInfrastructure.logger.debug "\r\e[K"
90
90
  SimpleInfrastructure.logger.debug "#{server}: FAILED - #{e.message}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimpleInfrastructure
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_infrastructure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - FounderCatalyst