makit 0.0.10 → 0.0.11

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
  SHA256:
3
- metadata.gz: 67614c09c77680a05d686c144f1f87376d1c461094b77ad78b1efc1f2cae7a43
4
- data.tar.gz: 1c961240bbfe7f70b8fec3789393201ce889017a306ce58216459ff844591256
3
+ metadata.gz: b3b0bd628ce6938847e0c743475a4470310984241499f201f575283bfe59c8ec
4
+ data.tar.gz: beddf5e7aa6b289da3529ff7206d00fe182f9b9d8aa6131e2bf8945894f4c4f4
5
5
  SHA512:
6
- metadata.gz: a35cf43e425bbc868fc876955bdba9b93069737e059789663ef42d09eb026efb6feb994e7e995e7d24685b621a26519430f8e1aa9dd1582152a9a60ddd63c29b
7
- data.tar.gz: 379069559c59c4c6f18cb2b17a3d95ea79c3c016872b2878b905d57db091a0ff18d518e21c475459c312116cd6f394b82ffbe446cea9c7672714d6f4a82b6d1d
6
+ metadata.gz: 0a5427cb8a91b71f971139a831f0acc3ffcd8f8f82c73651e1b57562cd2392fa4a2ef69fbb7376f027855b40080e2b18b728b09ee754d3c2164d78f264c89111
7
+ data.tar.gz: efe201b5a68a095140b3f34ca5f8e16087439f3841963c25b805ce6623bf7cd424154c4c3a3d087045130324516bddf0161ce0a4dc9fc56574455f6925918913
@@ -52,7 +52,9 @@ module Makit
52
52
  #puts "cache file date: #{File.mtime(cache_filename)}"
53
53
  if (File.mtime(cache_filename) > timestamp)
54
54
  #puts "cache_filename exists and is newer than #{timestamp}"
55
- return Makit::Serializer.open(cache_filename, Makit::V1::Command)
55
+ command = Makit::Serializer.open(cache_filename, Makit::V1::Command)
56
+ show_command(command)
57
+ return command #Makit::Serializer.open(cache_filename, Makit::V1::Command)
56
58
  else
57
59
  #puts "cache_filename exists, but is older than #{timestamp}"
58
60
  end
@@ -67,14 +69,7 @@ module Makit
67
69
  command
68
70
  end
69
71
 
70
- # Run a command and return a Makit::V1::Command.
71
- def run(command_request)
72
- raise "Invalid command_request" unless command_request.is_a? Makit::V1::CommandRequest
73
- command = execute(command_request)
74
- show_output = true
75
- exit_on_error = true
76
-
77
- log_to_artifacts(command) if @log_to_artifacts
72
+ def show_command(command)
78
73
  if command.exit_code != 0
79
74
  puts Makit::CommandRunner.get_command_summary(command) + " (exit code #{command.exit_code})".colorize(:default)
80
75
  puts " directory: #{command.directory}\n"
@@ -86,6 +81,28 @@ module Makit
86
81
  puts Makit::CommandRunner.get_command_summary(command) + " (#{command.duration.seconds} seconds)".colorize(:cyan)
87
82
  puts Makit::Humanize::indent_string(command.output, 2).colorize(:default) if show_output_on_success
88
83
  end
84
+ end
85
+
86
+ # Run a command and return a Makit::V1::Command.
87
+ def run(command_request)
88
+ raise "Invalid command_request" unless command_request.is_a? Makit::V1::CommandRequest
89
+ command = execute(command_request)
90
+ show_output = true
91
+ exit_on_error = true
92
+
93
+ log_to_artifacts(command) if @log_to_artifacts
94
+ show_command(command)
95
+ #if command.exit_code != 0
96
+ # puts Makit::CommandRunner.get_command_summary(command) + " (exit code #{command.exit_code})".colorize(:default)
97
+ # puts " directory: #{command.directory}\n"
98
+ # puts " duration: #{command.duration.seconds} seconds\n"
99
+ # puts Makit::Humanize::indent_string(command.output, 2) if command.output.length > 0
100
+ # puts Makit::Humanize::indent_string(command.error, 2) if command.error.length > 0
101
+ # exit 1 if command_request.exit_on_error
102
+ #else
103
+ # puts Makit::CommandRunner.get_command_summary(command) + " (#{command.duration.seconds} seconds)".colorize(:cyan)
104
+ # puts Makit::Humanize::indent_string(command.output, 2).colorize(:default) if show_output_on_success
105
+ #end
89
106
 
90
107
  commands.push(command)
91
108
  command
data/lib/makit/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Makit
4
- VERSION = "0.0.10"
4
+ VERSION = "0.0.11"
5
5
 
6
6
  class Version
7
7
  # given an array of version strings, return the highest version
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: makit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow