instructions_list 1.0.7.1.beta → 1.0.7.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 95b18ad1f8761806819c4322d03c2c2b72cc4fc0
4
- data.tar.gz: dd31b6726f9b9a093f04b9551d6eebd648b98361
3
+ metadata.gz: c18448048e7594a46d847f6a5f92ca9c30034a63
4
+ data.tar.gz: 9c0a3730bed3ac017b56b7e7308b817b60e6dd3d
5
5
  SHA512:
6
- metadata.gz: 50c6a7a7447599ad9d7f90bf463aae2c0462c43d3d80eb14a7c107ac3d3cbeb949f3deafd78a7b10f2e566c0596d3d3f959603cf043a0b16e2e14fa7041aab77
7
- data.tar.gz: ff6b78f5f70b21a3565b7419c659c0d018b095b76dbb9a7dcc354a417842e146e4ff003622758908c4e0753561337ba8f7858bfe79ad449442e03b134b9bb9eb
6
+ metadata.gz: c98b14e20d383e832baadd035157f3e0197cec7e87518fbd500e391f2e07d25d3a954cb802488a8e8096d493fb24e77e59e74b7d7350b76b3cbb60cc76ffc0e5
7
+ data.tar.gz: d8ab5027c24594659eac50e855c268081d2634bc95f1484666ab3cbcdf7d87a770de6cb95bf606795d93e4a4a40daf4ec922ab8c4defe6e8bdf28669ad44fed4
data/exe/il CHANGED
@@ -14,30 +14,24 @@ module InstructionsList
14
14
  end
15
15
  desc "init KEY", "initialize a il directory with list key"
16
16
  def init key
17
- `mkdir -p #{INSTRUCTIONS_DIR}`
18
- `touch #{KEY_PATH}`
19
- `echo #{key} > #{KEY_PATH}`
17
+ system "mkdir -p #{INSTRUCTIONS_DIR}"
18
+ system "touch #{KEY_PATH}"
19
+ system "echo #{key} > #{KEY_PATH}"
20
20
  end
21
21
  desc "reset", "reset state"
22
- def reset name=:all
22
+ def reset
23
23
  instructable do
24
- if name == :all
25
- `rm #{STATE}` if File.exists? STATE
26
- `rm -rf .instructions`
27
- return
28
- end
29
-
30
- `ex +g/#{name}/d -cwq #{STATE}`
24
+ system "rm -rf .instructions" if File.exists? STATE
31
25
  end
32
26
  end
33
27
  desc "sync", "synchronize the instructions"
34
28
  option :reset
35
29
  def sync
36
30
  if instructable?
37
- `mkdir -p #{PROJECT_CACHE}`
38
- `mkdir -p #{PROJECT_CACHE_ARTIFACTS}`
31
+ system "mkdir -p #{PROJECT_CACHE}"
32
+ system "mkdir -p #{PROJECT_CACHE_ARTIFACTS}"
39
33
  if options[:reset]
40
- `rm -rf #{PROJECT_CACHE}` if Dir.exists? PROJECT_CACHE
34
+ system "rm -rf #{PROJECT_CACHE}" if Dir.exists? PROJECT_CACHE
41
35
  return
42
36
  end
43
37
  instructable do
@@ -101,7 +95,7 @@ module InstructionsList
101
95
  instructable do
102
96
  load_from "Instructions", HOME_CACHE << "/" if home?
103
97
  load_from "Projects", PROJECT_CACHE << "/" if project?
104
- do_instruction name, STACK, options[:force], p
98
+ do_instruction name, STACK, options[:force]
105
99
 
106
100
  end
107
101
  rescue => e
@@ -128,14 +122,14 @@ module InstructionsList
128
122
  instructable do
129
123
  load_from "Instructions", HOME_CACHE << "/" if home?
130
124
  load_from "Projects", PROJECT_CACHE << "/" if project?
131
- undo_instruction name, STACK, options[:force], p
125
+ undo_instruction name, STACK, options[:force]
132
126
 
133
127
  end
134
128
  rescue => e
135
129
  puts ""
136
130
  puts e.message
137
131
  puts ""
138
- puts `il list`
132
+ system "il list"
139
133
  puts ""
140
134
  end
141
135
 
@@ -146,11 +140,11 @@ module InstructionsList
146
140
 
147
141
  no_tasks do
148
142
  def sync_home_instructions
149
- `mkdir -p /tmp/il/cache`
143
+ system "mkdir -p /tmp/il/cache"
150
144
  Dir.chdir ENV['HOME'] do
151
145
 
152
146
  if options[:reset]
153
- `rm -rf #{HOME_CACHE}` if Dir.exists? HOME_CACHE
147
+ system "rm -rf #{HOME_CACHE}" if Dir.exists? HOME_CACHE
154
148
  return
155
149
  end
156
150
 
@@ -224,7 +218,7 @@ module InstructionsList
224
218
  end
225
219
  end
226
220
 
227
- def do_instruction name, stack, force, progressbar
221
+ def do_instruction name, stack, force
228
222
  instruction = InstructionsList::INSTRUCTIONS.find { |i|
229
223
  command_name(i.name.gsub(" ","_")) == command_name(name)
230
224
  }
@@ -232,14 +226,14 @@ module InstructionsList
232
226
  instruction.depends_on.each do |dependancy|
233
227
  unless stack.include? command_name(dependancy.gsub(" ","_"))
234
228
  stack << command_name(dependancy.gsub(" ","_"))
235
- do_instruction(command_name(dependancy.gsub(" ", "_")), stack, force, progressbar)
229
+ do_instruction(command_name(dependancy.gsub(" ", "_")), stack, force)
236
230
  end
237
231
  end
238
232
  execute_instruction instruction, force: force
239
233
 
240
234
  end
241
235
 
242
- def undo_instruction name, stack, force, progressbar
236
+ def undo_instruction name, stack, force
243
237
  instruction = InstructionsList::INSTRUCTIONS.find { |i|
244
238
  command_name(i.name.gsub(" ","_")) == command_name(name)
245
239
  }
@@ -247,7 +241,7 @@ module InstructionsList
247
241
  instruction.depends_on.each do |dependancy|
248
242
  unless stack.include? command_name(dependancy.gsub(" ","_"))
249
243
  stack << command_name(dependancy.gsub(" ","_"))
250
- undo_instruction(command_name(dependancy.gsub(" ", "_")), stack, force, progressbar)
244
+ undo_instruction(command_name(dependancy.gsub(" ", "_")), stack, force)
251
245
  end
252
246
  end
253
247
 
@@ -1,3 +1,3 @@
1
1
  module InstructionsList
2
- VERSION = "1.0.7.1.beta"
2
+ VERSION = "1.0.7.2.beta"
3
3
  end
@@ -40,7 +40,7 @@ module InstructionsList
40
40
  @depends_on = []
41
41
  end
42
42
  attr_reader :depends_on
43
- attr_accessor :name,:instructed,:instruct
43
+ attr_accessor :name,:instructed,:instruct,:uninstruct
44
44
  end
45
45
 
46
46
  module DSL
@@ -84,13 +84,13 @@ module InstructionsList
84
84
  end
85
85
 
86
86
  def mark_as_done(name)
87
- `mkdir -p './.instructions/'`
88
- `touch #{STATE}`
89
- `echo #{command_name(name.to_s.gsub(" ","_"))} >> #{STATE}`
87
+ system "mkdir -p './.instructions/'"
88
+ system "touch #{STATE}"
89
+ system "echo #{command_name(name.to_s.gsub(" ","_"))} >> #{STATE}"
90
90
  check command_name(name)
91
91
  end
92
92
  def mark_as_undone(name)
93
- `ex +g/#{name}/d -cwq #{STATE}`
93
+ system "ex +g/#{name}/d -cwq #{STATE}"
94
94
  end
95
95
 
96
96
  def command_name(name)
@@ -103,7 +103,7 @@ module InstructionsList
103
103
  def check name
104
104
 
105
105
  unless CHECKED.include? command_name(name)
106
- `echo #{command_name(name)} ✔︎`
106
+ system "echo #{command_name(name)} ✔︎"
107
107
  return
108
108
  end
109
109
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: instructions_list
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7.1.beta
4
+ version: 1.0.7.2.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Coco Coder (aka Delaney Burke)