atk_toolbox 0.0.83 → 0.0.84
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/atk/cmd.rb +15 -1
- data/lib/atk/file_sys.rb +1 -1
- data/lib/atk/yaml_info_parser.rb +8 -0
- data/lib/atk_toolbox/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8841a9aa0feefe4e47ae2e17eabaaf215250ae696c34609451568378413d64bf
|
4
|
+
data.tar.gz: '04488e8100cb9104c52170b481154140a2ccac0bbb9ed3d9aaa671ee7dc34f2d'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b559b9aa56477166b510d1d3a12ca3be8f7fb1f0d560a1e8c290941ac2c5a65454341de6b512a30f61c0c1ad53d6613d4ef0f657e9b286d6409df39b127e897
|
7
|
+
data.tar.gz: a27421f4c09fee847348920fcdcdac08ef84bc026e3d85da4e78f9f36900909c3622b40f110a82e571e8d7f2f4a2b6132f8317a8b608bb8c08bcb5edfee727d9
|
data/lib/atk/cmd.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
require "tty-prompt"
|
2
|
+
require_relative "./os.rb"
|
2
3
|
require "colorize"
|
3
4
|
|
5
|
+
|
4
6
|
# TODO: switch to using https://github.com/piotrmurach/tty-command#2-interface
|
5
7
|
|
6
8
|
# easy access to the commandline
|
@@ -47,6 +49,18 @@ class TTY::Prompt
|
|
47
49
|
end
|
48
50
|
return @stdin
|
49
51
|
end
|
52
|
+
|
53
|
+
def path_for(name_of_executable)
|
54
|
+
if OS.is?(:windows)
|
55
|
+
return `where '#{name_of_executable}'`.strip
|
56
|
+
else
|
57
|
+
return `which '#{name_of_executable}'`.strip
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def has_command(name_of_executable)
|
62
|
+
return Console.path_for(name_of_executable) != ''
|
63
|
+
end
|
50
64
|
end
|
51
65
|
|
52
66
|
Console = TTY::Prompt.new
|
@@ -55,4 +69,4 @@ def log(*args)
|
|
55
69
|
if Console.verbose
|
56
70
|
puts(*args)
|
57
71
|
end
|
58
|
-
end
|
72
|
+
end
|
data/lib/atk/file_sys.rb
CHANGED
data/lib/atk/yaml_info_parser.rb
CHANGED
@@ -4,6 +4,7 @@ require_relative './os'
|
|
4
4
|
require_relative './file_sys'
|
5
5
|
require_relative './extra_yaml'
|
6
6
|
require 'fileutils'
|
7
|
+
require_relative './remove_indent.rb'
|
7
8
|
|
8
9
|
#
|
9
10
|
# Create loaders for ruby code literal and console code literal
|
@@ -225,6 +226,13 @@ class Info
|
|
225
226
|
if FS.file?(Info.source_path)
|
226
227
|
begin
|
227
228
|
@@data = YAML.load_file(Info.source_path)
|
229
|
+
if @@data['(using_atk_version)'] != 1.0
|
230
|
+
raise <<-HEREDOC.remove_indent
|
231
|
+
When opening the info.yaml file, the (using_atk_version) was listed as: #{@@data['(using_atk_version)']}
|
232
|
+
The version of atk_toolbox you have installed is only capable of handling version 1.0
|
233
|
+
either atk_toolbox needs to be updated, or the info.yaml version needs to be updated.
|
234
|
+
HEREDOC
|
235
|
+
end
|
228
236
|
rescue => exception
|
229
237
|
puts "\n\nI'm having trouble loading the info.yaml file. Here's the error:\n"
|
230
238
|
raise exception
|
data/lib/atk_toolbox/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atk_toolbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.84
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Hykin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: zip
|
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
135
|
version: '0'
|
136
136
|
requirements: []
|
137
137
|
rubyforge_project:
|
138
|
-
rubygems_version: 2.7.
|
138
|
+
rubygems_version: 2.7.3
|
139
139
|
signing_key:
|
140
140
|
specification_version: 4
|
141
141
|
summary: The Ruby gem for all the standard tools ATK uses internally
|