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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 45818231a43b49cd55e11b772096e421cc9fd8bb3b8e49e9dff182f33e976109
4
- data.tar.gz: 996432efeb696acc28aaa135737a113f65e068ba773f62f68178cbaecbe24fe6
3
+ metadata.gz: 8841a9aa0feefe4e47ae2e17eabaaf215250ae696c34609451568378413d64bf
4
+ data.tar.gz: '04488e8100cb9104c52170b481154140a2ccac0bbb9ed3d9aaa671ee7dc34f2d'
5
5
  SHA512:
6
- metadata.gz: ca9574932a23d7eec24c200bcdc4b915676ba2dcbea42777df761854319db41f30bd6c4400d53f3755bce9dbfd89661b21cf45fab5f275e83ed882048fa346ee
7
- data.tar.gz: b6b4323ebe425248cf898c7651d42b959acf8e305f747d62a6e9d8e6db2b9a111d95514fa5eb3d967446e72f38bce57e6b77f1799d01eeaf5989da411d5b82c5
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
@@ -45,7 +45,7 @@ class FileSys
45
45
  # actually download the file
46
46
  IO.write(to, data)
47
47
  end
48
-
48
+
49
49
  def self.save(value, to:nil, as:nil)
50
50
  # assume string if as was not given
51
51
  if as == nil
@@ -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
@@ -1,3 +1,3 @@
1
1
  module AtkToolbox
2
- VERSION = '0.0.83'
2
+ VERSION = '0.0.84'
3
3
  end
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.83
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-27 00:00:00.000000000 Z
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.6.2
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