instructions_list 1.0.10.beta → 1.0.10.1.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/il +28 -10
- data/lib/instructions_list/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f062859e33300288bb0fb499a4bb6fc8d3c887e9
|
4
|
+
data.tar.gz: 36ad516881ddbc952233d0fe0086048f69bd3fd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f8c1714da2f1eac4915a8a7daddd5d300ef1ee7ca8200f3dd0dbe083bdbab63521bc3c9e0cd80b964d25069bd5c49beb2194741d48f4bd90dbdc615de3fe3a7
|
7
|
+
data.tar.gz: 0c532855dee48c715061798530e92a1805bd6872bc2d4ff442205c8c70c797229b0a1015e7b20568bc6a689060b3d6f8c7a227637174454ca2709c757a4c149e
|
data/exe/il
CHANGED
@@ -69,6 +69,8 @@ module InstructionsList
|
|
69
69
|
desc "list", "list all instructions"
|
70
70
|
def instructions
|
71
71
|
|
72
|
+
sync
|
73
|
+
|
72
74
|
instructable do
|
73
75
|
|
74
76
|
if project?
|
@@ -143,7 +145,7 @@ module InstructionsList
|
|
143
145
|
|
144
146
|
desc "undo", "undo an instruction"
|
145
147
|
option :force
|
146
|
-
def undo name
|
148
|
+
def undo name=:last
|
147
149
|
|
148
150
|
instructable do
|
149
151
|
sync
|
@@ -199,6 +201,11 @@ module InstructionsList
|
|
199
201
|
File.exist? LIST_DATA_PATH
|
200
202
|
end
|
201
203
|
|
204
|
+
def find_name_of_last_intruction
|
205
|
+
|
206
|
+
File.readlines(STATE).last.chomp if File.readlines(STATE).last
|
207
|
+
end
|
208
|
+
|
202
209
|
|
203
210
|
def home?
|
204
211
|
`pwd`.chomp == ENV['HOME']
|
@@ -253,16 +260,27 @@ module InstructionsList
|
|
253
260
|
|
254
261
|
end
|
255
262
|
|
256
|
-
def undo_instruction name, stack, force
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
263
|
+
def undo_instruction name=:last, stack, force
|
264
|
+
InstructionsList::INSTRUCTIONS
|
265
|
+
|
266
|
+
if name==:last
|
267
|
+
|
268
|
+
name = find_name_of_last_intruction
|
269
|
+
|
270
|
+
if name.nil?
|
271
|
+
raise "Ooooops no instructions to undo"
|
265
272
|
end
|
273
|
+
|
274
|
+
instruction = InstructionsList::INSTRUCTIONS.find { |i|
|
275
|
+
command_name(i.name.gsub(" ","_")) == command_name(name)
|
276
|
+
}
|
277
|
+
raise "Ooooops cant find #{command_name(name)}" if instruction.nil?
|
278
|
+
say "undo last"
|
279
|
+
else
|
280
|
+
instruction = InstructionsList::INSTRUCTIONS.find { |i|
|
281
|
+
command_name(i.name.gsub(" ","_")) == command_name(name)
|
282
|
+
}
|
283
|
+
raise "Ooooops cant find #{command_name(name)}" if instruction.nil?
|
266
284
|
end
|
267
285
|
|
268
286
|
execute_uninstruction instruction, force: force
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: instructions_list
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.10.beta
|
4
|
+
version: 1.0.10.1.beta
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Coco Coder (aka Delaney Burke)
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|