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 +4 -4
- data/lib/atk/atk_info.rb +4 -3
- data/lib/atk/default_info.yaml +7 -25
- data/lib/atk/os.rb +8 -1
- data/lib/atk_toolbox/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2460aed2031cdaff8ce3ad1462bb7ff132f1c2f9bba1a08aad2e01f62d436c4
|
4
|
+
data.tar.gz: 2ea9f6a60938c47469b09193b6ec8961181ce81bdbf24ba23f1fe15aa1c8b20f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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 "
|
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
|
data/lib/atk/default_info.yaml
CHANGED
@@ -1,43 +1,25 @@
|
|
1
1
|
(using_atk_version): 1.0
|
2
2
|
(project):
|
3
|
-
name:
|
4
|
-
description:
|
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
|
-
|
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
|
-
(
|
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
|
-
|
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
|
data/lib/atk_toolbox/version.rb
CHANGED