instructions_list 0.1.9.beta → 0.1.10.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 +32 -4
 - 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: 1497553aa8abff25bc1219f50dbcef8a8e21cec8
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 63a131707d79a6d9bfe4f85c9bc0d383efd2a918
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 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 
     | 
    
         | 
    
        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. 
     | 
| 
      
 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- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2017-10-26 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bundler
         
     |