instructions_list 1.0.7.2.beta → 1.0.8.beta
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/exe/il +15 -2
- data/lib/instructions_list/version.rb +1 -1
- data/lib/instructions_list.rb +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1182ed93fe9b12d4db2b3bbfceef01569cc78061
|
4
|
+
data.tar.gz: 5645f15f354c1630d03e75bc2bfcecb9a5c5b012
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb5d122e266e954db4a7f63170fdc3d4669c4bbd362141b8b75da14dd3977320f83abba765ca9610c863dc523a882d1c9fc749f323acf47f83d096af3a153e05
|
7
|
+
data.tar.gz: 6eb5f9c2f2120b883432279496e08f98ddea95e52ce9aa3d1fad738bb1ddb068c277577674273403f0e565ea25633e0e0256850406de5669618e6bced8d2fc8f
|
data/exe/il
CHANGED
@@ -47,7 +47,7 @@ module InstructionsList
|
|
47
47
|
end
|
48
48
|
|
49
49
|
|
50
|
-
desc "
|
50
|
+
desc "list", "list all instructions"
|
51
51
|
def instructions
|
52
52
|
|
53
53
|
if project?
|
@@ -76,7 +76,11 @@ module InstructionsList
|
|
76
76
|
|
77
77
|
desc "info" , "display information"
|
78
78
|
def info
|
79
|
-
|
79
|
+
if has_name?
|
80
|
+
say "connected to : #{get_name}"
|
81
|
+
else
|
82
|
+
say "connected to\ key: #{get_key}"
|
83
|
+
end
|
80
84
|
say "host: #{HOST}"
|
81
85
|
end
|
82
86
|
|
@@ -164,6 +168,15 @@ module InstructionsList
|
|
164
168
|
File.read(KEY_PATH).chomp
|
165
169
|
end
|
166
170
|
|
171
|
+
def get_name()
|
172
|
+
File.read(LIST_DATA_PATH).chomp
|
173
|
+
end
|
174
|
+
|
175
|
+
def has_name?
|
176
|
+
File.exist? LIST_DATA_PATH
|
177
|
+
end
|
178
|
+
|
179
|
+
|
167
180
|
def instructable?
|
168
181
|
|
169
182
|
if Dir.exists? "./.instructions"
|
data/lib/instructions_list.rb
CHANGED
@@ -14,6 +14,7 @@ module InstructionsList
|
|
14
14
|
PROJECT_CACHE = "./.instructions/cache"
|
15
15
|
PROJECT_CACHE_ARTIFACTS="#{PROJECT_CACHE}/artifacts"
|
16
16
|
KEY_PATH="./#{INSTRUCTIONS_DIR}/key"
|
17
|
+
LIST_DATA_PATH="./#{INSTRUCTIONS_DIR}/list_data"
|
17
18
|
STATE="./.instructions/state"
|
18
19
|
HOST= ENV.fetch('INSTRUCTIONS_LIST_HOST',"instructionslist.com")
|
19
20
|
|
@@ -147,6 +148,10 @@ module InstructionsList
|
|
147
148
|
def build
|
148
149
|
begin
|
149
150
|
content = JSON.parse open("http://#{@host}/lists/#{@key}.json").read
|
151
|
+
|
152
|
+
`touch #{LIST_DATA_PATH}`
|
153
|
+
`echo #{content['name']} > #{LIST_DATA_PATH}`
|
154
|
+
|
150
155
|
`mkdir -p #{@cache}`
|
151
156
|
content["instructions"].each do |instruction|
|
152
157
|
|