makit 0.0.12 → 0.0.13

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: cdf53edb505a1689db1bfe4743d6a2e59ba8922eb5f654f03145108508b1d8ce
4
- data.tar.gz: 1d763150671938b48fa5eb90646f1a0cc36ee0f078da8b25379acf460b6e025b
3
+ metadata.gz: 6f39460448bac4ce031da8056f71e2463224bb71962a381838c13493a32301fa
4
+ data.tar.gz: c4e56572edf0ce96be33cf4eafbd0bc7406d089c3abc5b163627535b4dea307c
5
5
  SHA512:
6
- metadata.gz: a7ed4c70f7b28b8925b5adf20ad3924c7f3c686316e79a2a7c23d22c522059d11b22a7aa1f32c89f7797e00704b34407701359cf037ed5f6fb1f1408d3083ca6
7
- data.tar.gz: cc1306cf328f50e6014bca73bdf7b0fd7899e8ae7c7e6e5738aab19b5441750fba8f96545e63daefdbc8941dc3e2806a0741993264724de8ddc8ac4cc802e7e2
6
+ metadata.gz: b6ad560c7e79326e6786d157ac14a419d126d61067b332822d5d40db36e1e97e8a923de99390b446c4563a6a8491c56288619da227a28d5b4e324f612402cd58
7
+ data.tar.gz: fe4eaae6ebfe9237e291f307d69396531823d05715a2057cce83d214fca86c9d5ec673f655b99058120a91a67301944b7105cc19a02114f882b4228ec60092b3
@@ -101,6 +101,10 @@ module Makit
101
101
  get_git_tracked_files(directory_path).select { |f| File.file?(f) }.max_by { |f| File.mtime(f) }
102
102
  end
103
103
 
104
+ def self.get_newest_git_file_timestamp(directory_path)
105
+ get_newest_git_file(directory_path).nil? ? Time.now : File.mtime(get_newest_git_file(directory_path))
106
+ end
107
+
104
108
  def self.get_newest_file_timestamp(directory_path)
105
109
  newest_file = get_git_tracked_files(directory_path).select { |f| File.file?(f) }.max_by { |f| File.mtime(f) }
106
110
  newest_file.nil? ? Time.now : File.mtime(newest_file)
data/lib/makit/dotnet.rb CHANGED
@@ -92,7 +92,7 @@ module Makit
92
92
  Dir.glob("**/*.csproj").each do |project_path|
93
93
  project_name = File.basename(project_path, ".csproj")
94
94
  if (sln_content.include?("\"#{project_name}\""))
95
- puts " #{project_name}".colorize(:green) + " is in ".colorize(:grey) + "#{sln_path}".colorize(:green)
95
+ #puts " #{project_name}".colorize(:green) + " is in ".colorize(:grey) + "#{sln_path}".colorize(:green)
96
96
  #puts "Project #{project_name} already exists in #{sln_path}".colorize(:yellow)
97
97
  else
98
98
  "dotnet sln #{sln_path} add #{project_path}".run
@@ -35,6 +35,27 @@ class String
35
35
  end
36
36
  end
37
37
 
38
+ def cache_run(args = nil, timestamp = nil)
39
+
40
+ if timestamp.nil?
41
+ timestamp = Makit::Directory.get_newest_git_file_timestamp(Makit::Directories::PROJECT_ROOT)
42
+ #timestamp = Makit::Timestamp.now
43
+ end
44
+ if args.nil?
45
+ command = self
46
+ Makit::RUNNER.cache_run(Makit::RUNNER::parse_command_request(command), timestamp)
47
+ else
48
+ command = self
49
+ request = Makit::RUNNER.parse_args(command)
50
+ if args.is_a?(Hash)
51
+ args.each do |key, value|
52
+ request.send("#{key}=", value)
53
+ end
54
+ end
55
+ Makit::RUNNER.cache_run(request, timestamp)
56
+ end
57
+ end
58
+
38
59
  # Read a value from a JSON file
39
60
  # key is a string with the key to read, e.g. "AzureAd.Authority"
40
61
  def get_json_value(key)
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.12"
4
+ VERSION = "0.0.13"
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.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow