atk_toolbox 0.0.1 → 0.0.2
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/default_info.yaml +30 -0
- data/lib/atk/yaml_info_parser.rb +11 -3
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d30b684f981e870dfdf01eca774615408648658e6214c0aa8215c1e1e6aa459
|
4
|
+
data.tar.gz: 42bfbf5f7d275460ab65f369c46ef6d72ee3c235c2c4f41cda0cef5a47e99ffd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5cbe854e04598032e58e3326b2dd3ccd3d67a2201a3499d5dbf4fc1a79c6fad02de25fc59bb58899fe05b12297df489b1258cf4a780d42f35710336237dc0af
|
7
|
+
data.tar.gz: 8aa630262d6193f6fae07be5a2ac3becc10582d80040d58272a1dd4ff62bf6da882932f451280ac5dfd6edb4f75b31a34e4fd417fb55821167d7ea01bb775977
|
@@ -0,0 +1,30 @@
|
|
1
|
+
(using_atk_version): 1.0
|
2
|
+
(project):
|
3
|
+
name: A Project
|
4
|
+
description: A new project
|
5
|
+
|
6
|
+
commands: &commands # if you dont know what the & means, see https://blog.daemonl.com/2016/02/yaml.html
|
7
|
+
run: echo 'no run command written yet'
|
8
|
+
dependencies: &dependencies
|
9
|
+
atk: 0.0.1
|
10
|
+
|
11
|
+
(advanced_setup):
|
12
|
+
(put_new_dependencies_under): [ '(project)', 'basic_info', 'dependencies' ]
|
13
|
+
# caveats for a specific OS
|
14
|
+
when(--os is 'mac'):
|
15
|
+
(project_commands):
|
16
|
+
<<: *commands
|
17
|
+
(dependencies):
|
18
|
+
<<: *dependencies
|
19
|
+
|
20
|
+
when(--os is 'windows'):
|
21
|
+
(project_commands):
|
22
|
+
<<: *commands
|
23
|
+
(dependencies):
|
24
|
+
<<: *dependencies
|
25
|
+
|
26
|
+
when(--os is 'linux'):
|
27
|
+
(project_commands):
|
28
|
+
<<: *commands
|
29
|
+
(dependencies):
|
30
|
+
<<: *dependencies
|
data/lib/atk/yaml_info_parser.rb
CHANGED
@@ -92,6 +92,11 @@ class Info
|
|
92
92
|
@@valid_variables = ['context', 'os']
|
93
93
|
@@valid_operators = ['is']
|
94
94
|
|
95
|
+
def self.init
|
96
|
+
# copy the default yaml to the current dir
|
97
|
+
FileUtils.cp(File.join(__dir__, "default_info.yaml"), Dir.pwd)
|
98
|
+
end
|
99
|
+
|
95
100
|
# TODO: write tests for this function
|
96
101
|
def self.parse_when_statment(statement)
|
97
102
|
# remove the 'when' and paraentheses
|
@@ -206,14 +211,17 @@ class Info
|
|
206
211
|
|
207
212
|
# get the local yaml file
|
208
213
|
# TODO: have this search the parent dir's to find it
|
209
|
-
|
214
|
+
begin
|
215
|
+
@@data = YAML.load_file("./info.yaml")
|
216
|
+
rescue => exception
|
217
|
+
puts "Couldn't find an info.yaml file in #{Dir.pwd}"
|
218
|
+
exit
|
219
|
+
end
|
210
220
|
@@project = @@data['(project)']
|
211
221
|
if @@project == nil
|
212
222
|
# TODO: maybe change this to be optional in the future and have default settings
|
213
223
|
raise "\n\nThere is no (project): key in the info.yaml\n(so ATK is unable to parse the project settings)"
|
214
224
|
end
|
215
|
-
# TODO: remove this
|
216
|
-
# @@project = Info.parse_language_evaluations(@@project)
|
217
225
|
|
218
226
|
@@settings = @@project['(advanced_setup)']
|
219
227
|
if @@settings == nil
|
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.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Hykin
|
@@ -17,6 +17,7 @@ extensions: []
|
|
17
17
|
extra_rdoc_files: []
|
18
18
|
files:
|
19
19
|
- lib/atk/cmd.rb
|
20
|
+
- lib/atk/default_info.yaml
|
20
21
|
- lib/atk/download.rb
|
21
22
|
- lib/atk/os.rb
|
22
23
|
- lib/atk/output.rb
|