instructions_list 0.1.9.beta → 0.1.10.beta

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eeeb7b989e730f0e09c81a00a85debaa0b74ff18
4
- data.tar.gz: 55b67350b31507b2b51239c2547d8656e5ae5ad1
3
+ metadata.gz: 1497553aa8abff25bc1219f50dbcef8a8e21cec8
4
+ data.tar.gz: 63a131707d79a6d9bfe4f85c9bc0d383efd2a918
5
5
  SHA512:
6
- metadata.gz: 5f2cb6aa6e1ff73cc11491a40b37e52fd812f2abee91bafffe71fe6af804a265b8f7439df37eb6c57e510ad1d01efa78477c009253a7b507f237c8f92bb2c658
7
- data.tar.gz: 4dbea52633b7e12316286f298ff06c5335960f27955e22d8a05c241af6306cceaee6a7edf0aefa2b992eb924166a9afc4d6a9849fc8f56e07318fbee99c105d1
6
+ metadata.gz: f9b345d168ae227bafd3dc90defd53e6e6c0ffd3127e9b4102493204240c5019ff24a19d20232678c55dbb23df1dd415917a010665667aeeea4aac0565a036c4
7
+ data.tar.gz: 448f86e67be65f1c80127e4459de890056a3868d547f0c33ea95d1253f31f891491d35548673944b35ebff0add2a64903f8ed956f114d967cdb99a3a8fbcdbac
data/exe/il CHANGED
@@ -16,10 +16,6 @@ module InstructionsList
16
16
  def add name
17
17
  puts "add #{name} instruction"
18
18
  end
19
- desc "list", "list all instructions"
20
- def list
21
- puts "add a new instruction"
22
- end
23
19
  end
24
20
 
25
21
  class CLI < Thor
@@ -37,6 +33,23 @@ module InstructionsList
37
33
  def reset
38
34
  `rm ./.instructions/state`
39
35
  end
36
+ desc "instructions", "list all instructions"
37
+ def instructions
38
+ puts ""
39
+ list_from "Core","#{File.join(File.dirname(__FILE__), "../instructions/")}" do |path|
40
+ say show_command_for path
41
+ end
42
+ puts ""
43
+ list_from "Home Directory","~/instructions/" do |path|
44
+ say show_command_for path
45
+ end
46
+ puts ""
47
+ list_from "Current Project","./instructions/" do |path|
48
+ say show_command_for path
49
+
50
+ end
51
+ puts ""
52
+ end
40
53
  desc "do", "do an instruction"
41
54
  def do instruction=:all
42
55
 
@@ -58,6 +71,21 @@ module InstructionsList
58
71
  end
59
72
 
60
73
  no_tasks do
74
+ def show_command_for path
75
+ return " None" if path == " None"
76
+ " il do #{path}"
77
+ end
78
+ def list_from location,path
79
+ puts "#{location}"
80
+ if Dir["#{path}*.rb"].any?
81
+ Dir["#{path}*.rb"].each {|file|
82
+ pn = Pathname.new(file)
83
+ yield "#{File.basename(pn)}".gsub(".rb","")
84
+ }
85
+ else
86
+ yield " None"
87
+ end
88
+ end
61
89
  def load_from name, path
62
90
  #puts "search in #{name}"
63
91
 
@@ -1,3 +1,3 @@
1
1
  module InstructionsList
2
- VERSION = "0.1.9.beta"
2
+ VERSION = "0.1.10.beta"
3
3
  end
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: 0.1.9.beta
4
+ version: 0.1.10.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-10-25 00:00:00.000000000 Z
11
+ date: 2017-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler