atk_toolbox 0.0.102 → 0.0.103

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: 509f74e9be3a6bac94742a25877a7200ae9cb44fe7821cc7821d7e6124a7573f
4
- data.tar.gz: 01a0236d612a0d55ec37039880d33f149e2b2dd5ef2ee33de4f80ef6bc07a787
3
+ metadata.gz: e2460aed2031cdaff8ce3ad1462bb7ff132f1c2f9bba1a08aad2e01f62d436c4
4
+ data.tar.gz: 2ea9f6a60938c47469b09193b6ec8961181ce81bdbf24ba23f1fe15aa1c8b20f
5
5
  SHA512:
6
- metadata.gz: 9f0c64cac3e4afbe5b94c9d1889a67f08c268756a4e771cf4da23ee0248f836c00855c77f7d04089a28b5b76093febc1e2853045bf90734dfca7c54f3863c89f
7
- data.tar.gz: 6f24af29f4b2f56bbd9c7324b13721c82e993bce95944b5b1979b2264ddaba4d97c7b18294c7341b60611bdf63e8fba20c756092786a227eac7d3143545c6fe0
6
+ metadata.gz: 7ad280dcdd1a99b0acda1a26d0c45e6e865b17ee4ee74b9eaf4ce38236181a41f89847a29f4f3c51b1d1cf859e3b0986c216c4af68228847f4a119366185343c
7
+ data.tar.gz: a7706b272bae670227ae640631c5088762f3f3f78140205af7791fed8671cd036ccecde31164f1fffe8f3d63f73274976459127fa699bdd74937d6d7417d2181
data/lib/atk/atk_info.rb CHANGED
@@ -29,8 +29,7 @@ class AtkPaths
29
29
  elsif OS.is?(:unix)
30
30
  ruby_path = "/usr/bin/ruby"
31
31
  else
32
- # TODO: fix this case
33
- ruby_path = ""
32
+ ruby_path = OS.path_for_executable("ruby")
34
33
  end
35
34
  return ruby_path
36
35
  when 'core_yaml'
@@ -133,7 +132,9 @@ module ATK
133
132
  if not project_folder
134
133
  # then use the current folder
135
134
  project_folder = FS.pwd
136
- puts "\nDefaulting to #{"your current directory".yellow}\nsince there's no #{"project_folder".blue} in the home settings\n"
135
+ puts "Project will be downloaded to #{project_folder.to_s.yellow}"
136
+ puts "(your current directory)"
137
+ puts ""
137
138
  end
138
139
  project_name = Console.ask("What do you want to name the project?")
139
140
  project_path = project_folder/project_name
@@ -1,43 +1,25 @@
1
1
  (using_atk_version): 1.0
2
2
  (project):
3
- name: A Project
4
- description: A new project
3
+ name: Your Project Name Here
4
+ description: Describe your project here
5
5
 
6
6
  commands: &commands # if you dont know what the & means, see https://blog.daemonl.com/2016/02/yaml.html
7
7
  run: echo 'no run command written yet'
8
- run_ruby: !language/ruby |
8
+ run_ruby_example: !language/ruby |
9
9
  puts 'this is just a default value'
10
10
  puts 'replace this with your own ruby code'
11
-
12
- paths: &paths
13
- root: ./
14
-
15
- dependencies: &dependencies
16
- atk: 0.0.1
11
+ (setup): echo 'setup command unset'
17
12
 
18
13
  (advanced_setup):
19
- (put_new_dependencies_under): [ '(project)', 'basic_info', 'dependencies' ]
14
+ (project_commands):
15
+ <<: *commands
20
16
  # caveats for a specific OS
21
17
  when(--os is 'mac'):
22
18
  (project_commands):
23
19
  <<: *commands
24
- (dependencies):
25
- <<: *dependencies
26
- (paths):
27
- <<: *paths
28
-
29
20
  when(--os is 'windows'):
30
21
  (project_commands):
31
22
  <<: *commands
32
- (dependencies):
33
- <<: *dependencies
34
- (paths):
35
- <<: *paths
36
-
37
23
  when(--os is 'linux'):
38
24
  (project_commands):
39
- <<: *commands
40
- (dependencies):
41
- <<: *dependencies
42
- (paths):
43
- <<: *paths
25
+ <<: *commands
data/lib/atk/os.rb CHANGED
@@ -106,7 +106,14 @@ module OS
106
106
 
107
107
  def self.path_for_executable(name_of_executable)
108
108
  if OS.is?(:windows)
109
- return `where '#{name_of_executable}'`.strip
109
+ begin
110
+ # TODO: need to escape this value for both double quote and single quotes
111
+ output = `powershell -command "(Get-Command '#{name_of_executable}')"`.strip
112
+ # if the command doesn't exist it throws an error
113
+ rescue
114
+ output = ""
115
+ end
116
+ return output
110
117
  else
111
118
  return `which '#{name_of_executable}'`.strip
112
119
  end
@@ -1,3 +1,3 @@
1
1
  module AtkToolbox
2
- VERSION = '0.0.102'
2
+ VERSION = '0.0.103'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atk_toolbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.102
4
+ version: 0.0.103
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Hykin