howzit 2.0.16 → 2.0.19
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/CHANGELOG.md +20 -0
 - data/bin/howzit +14 -10
 - data/lib/howzit/config.rb +1 -0
 - data/lib/howzit/task.rb +10 -10
 - data/lib/howzit/topic.rb +1 -1
 - data/lib/howzit/version.rb +1 -1
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 7c08d6ceea211cc4e603a59c5e2f1ac7c2db806d55a8eaa1f260e1f0994bdf45
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: c5b6c284c725a8f1edabc07723a18d0e9d9c56204be0b7fb50e0d3bb1b5efccf
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 8c456e2c7f820777d6e07a26fcc677bfa8ac09a12bd409e870c37dbaa431f186ac551575b6eead585d446a02b533b5c729eba4dfac40b2caa876ff9f63400c9b
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 03717f2b209cf812b31e5da66ab57000e7e54cd52efa08b8bc7e4c2840e30581509af401e76e8ccef9e5cd0b232d04601eb6d5723b49cc1e6ae3bb7e760bff29
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,3 +1,23 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ### 2.0.19
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            2022-08-08 06:18
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            #### IMPROVED
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            - Sort options in help output
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            ### 2.0.18
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            2022-08-08 03:48
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            #### NEW
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            - Use --ask to require confirmation of all tasks when running a topic
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            ### 2.0.17
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
            2022-08-07 06:09
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
       1 
21 
     | 
    
         
             
            ### 2.0.16
         
     | 
| 
       2 
22 
     | 
    
         | 
| 
       3 
23 
     | 
    
         
             
            2022-08-07 06:05
         
     | 
    
        data/bin/howzit
    CHANGED
    
    | 
         @@ -20,6 +20,10 @@ OptionParser.new do |opts| 
     | 
|
| 
       20 
20 
     | 
    
         | 
| 
       21 
21 
     | 
    
         
             
              opts.separator "  Behavior:\n\n" #=================================================================== BEHAVIOR
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
      
 23 
     | 
    
         
            +
              opts.on('--ask', 'Request confirmation for all tasks when running a topic') do
         
     | 
| 
      
 24 
     | 
    
         
            +
                Howzit.options[:ask] = true
         
     | 
| 
      
 25 
     | 
    
         
            +
              end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
       23 
27 
     | 
    
         
             
              opts.on('--default', 'Answer all prompts with default response') do
         
     | 
| 
       24 
28 
     | 
    
         
             
                Howzit.options[:default] = true
         
     | 
| 
       25 
29 
     | 
    
         
             
              end
         
     | 
| 
         @@ -40,7 +44,7 @@ OptionParser.new do |opts| 
     | 
|
| 
       40 
44 
     | 
    
         | 
| 
       41 
45 
     | 
    
         
             
              opts.separator "\n  Listing:\n\n" #=================================================================== LISTING
         
     | 
| 
       42 
46 
     | 
    
         | 
| 
       43 
     | 
    
         
            -
              opts.on('-L', '--list-completions', 'List topics  
     | 
| 
      
 47 
     | 
    
         
            +
              opts.on('-L', '--list-completions', 'List topics (completion-compatible)') do
         
     | 
| 
       44 
48 
     | 
    
         
             
                Howzit.options[:list_topics] = true
         
     | 
| 
       45 
49 
     | 
    
         
             
                Howzit.options[:list_topic_titles] = true
         
     | 
| 
       46 
50 
     | 
    
         
             
              end
         
     | 
| 
         @@ -94,11 +98,6 @@ OptionParser.new do |opts| 
     | 
|
| 
       94 
98 
     | 
    
         
             
                Process.exit 0
         
     | 
| 
       95 
99 
     | 
    
         
             
              end
         
     | 
| 
       96 
100 
     | 
    
         | 
| 
       97 
     | 
    
         
            -
              opts.on('--edit-template NAME', 'Create or edit a template') do |template|
         
     | 
| 
       98 
     | 
    
         
            -
                Howzit.buildnote.edit_template(template)
         
     | 
| 
       99 
     | 
    
         
            -
                Process.exit 0
         
     | 
| 
       100 
     | 
    
         
            -
              end
         
     | 
| 
       101 
     | 
    
         
            -
             
     | 
| 
       102 
101 
     | 
    
         
             
              opts.on('--config-get [KEY]', 'Display the configuration settings or setting for a specific key') do |k|
         
     | 
| 
       103 
102 
     | 
    
         
             
                if k.nil?
         
     | 
| 
       104 
103 
     | 
    
         
             
                  Howzit::Config::DEFAULTS.sort_by { |key, _| key }.each do |key, _|
         
     | 
| 
         @@ -132,14 +131,19 @@ OptionParser.new do |opts| 
     | 
|
| 
       132 
131 
     | 
    
         
             
                Process.exit 0
         
     | 
| 
       133 
132 
     | 
    
         
             
              end
         
     | 
| 
       134 
133 
     | 
    
         | 
| 
       135 
     | 
    
         
            -
               
     | 
| 
      
 134 
     | 
    
         
            +
              desc = %(Edit buildnotes file in current working directory using editor (#{File.basename(Howzit.options[:config_editor])}))
         
     | 
| 
      
 135 
     | 
    
         
            +
              opts.on('-e', '--edit', desc) do
         
     | 
| 
      
 136 
     | 
    
         
            +
                Howzit.buildnote.edit
         
     | 
| 
      
 137 
     | 
    
         
            +
                Process.exit 0
         
     | 
| 
      
 138 
     | 
    
         
            +
              end
         
     | 
| 
      
 139 
     | 
    
         
            +
             
     | 
| 
      
 140 
     | 
    
         
            +
              opts.on('--edit-config', "Edit configuration file using editor (#{File.basename(Howzit.options[:editor])})") do
         
     | 
| 
       136 
141 
     | 
    
         
             
                Howzit.config.editor
         
     | 
| 
       137 
142 
     | 
    
         
             
                Process.exit 0
         
     | 
| 
       138 
143 
     | 
    
         
             
              end
         
     | 
| 
       139 
144 
     | 
    
         | 
| 
       140 
     | 
    
         
            -
               
     | 
| 
       141 
     | 
    
         
            -
             
     | 
| 
       142 
     | 
    
         
            -
                Howzit.buildnote.edit
         
     | 
| 
      
 145 
     | 
    
         
            +
              opts.on('--edit-template NAME', 'Create or edit a template') do |template|
         
     | 
| 
      
 146 
     | 
    
         
            +
                Howzit.buildnote.edit_template(template)
         
     | 
| 
       143 
147 
     | 
    
         
             
                Process.exit 0
         
     | 
| 
       144 
148 
     | 
    
         
             
              end
         
     | 
| 
       145 
149 
     | 
    
         | 
    
        data/lib/howzit/config.rb
    CHANGED
    
    
    
        data/lib/howzit/task.rb
    CHANGED
    
    | 
         @@ -73,9 +73,9 @@ module Howzit 
     | 
|
| 
       73 
73 
     | 
    
         
             
                  matches = Howzit.buildnote.find_topic(@action)
         
     | 
| 
       74 
74 
     | 
    
         
             
                  raise "Topic not found: #{@action}" if matches.empty?
         
     | 
| 
       75 
75 
     | 
    
         | 
| 
       76 
     | 
    
         
            -
                   
     | 
| 
      
 76 
     | 
    
         
            +
                  Howzit.console.info("{by}Running tasks from {bw}#{matches[0].title}{x}".c)
         
     | 
| 
       77 
77 
     | 
    
         
             
                  output.concat(matches[0].run(nested: true))
         
     | 
| 
       78 
     | 
    
         
            -
                   
     | 
| 
      
 78 
     | 
    
         
            +
                  Howzit.console.info("{by}End include: #{matches[0].tasks.count} tasks{x}".c)
         
     | 
| 
       79 
79 
     | 
    
         
             
                  [output, matches[0].tasks.count]
         
     | 
| 
       80 
80 
     | 
    
         
             
                end
         
     | 
| 
       81 
81 
     | 
    
         | 
| 
         @@ -84,7 +84,7 @@ module Howzit 
     | 
|
| 
       84 
84 
     | 
    
         
             
                ##
         
     | 
| 
       85 
85 
     | 
    
         
             
                def run_run
         
     | 
| 
       86 
86 
     | 
    
         
             
                  title = Howzit.options[:show_all_code] ? @action : @title
         
     | 
| 
       87 
     | 
    
         
            -
                   
     | 
| 
      
 87 
     | 
    
         
            +
                  Howzit.console.info("{bg}Running {bw}#{title}{x}".c)
         
     | 
| 
       88 
88 
     | 
    
         
             
                  system(@action)
         
     | 
| 
       89 
89 
     | 
    
         
             
                end
         
     | 
| 
       90 
90 
     | 
    
         | 
| 
         @@ -93,7 +93,7 @@ module Howzit 
     | 
|
| 
       93 
93 
     | 
    
         
             
                ##
         
     | 
| 
       94 
94 
     | 
    
         
             
                def run_copy
         
     | 
| 
       95 
95 
     | 
    
         
             
                  title = Howzit.options[:show_all_code] ? @action : @title
         
     | 
| 
       96 
     | 
    
         
            -
                   
     | 
| 
      
 96 
     | 
    
         
            +
                  Howzit.console.info("{bg}Copied {bw}#{title}{bg} to clipboard{x}".c)
         
     | 
| 
       97 
97 
     | 
    
         
             
                  os_copy(@action)
         
     | 
| 
       98 
98 
     | 
    
         
             
                end
         
     | 
| 
       99 
99 
     | 
    
         | 
| 
         @@ -107,21 +107,21 @@ module Howzit 
     | 
|
| 
       107 
107 
     | 
    
         
             
                  out = "{bg}Copying {bw}#{string}".c
         
     | 
| 
       108 
108 
     | 
    
         
             
                  case os
         
     | 
| 
       109 
109 
     | 
    
         
             
                  when /darwin.*/i
         
     | 
| 
       110 
     | 
    
         
            -
                     
     | 
| 
      
 110 
     | 
    
         
            +
                    Howzit.console.debug("#{out} (macOS){x}".c)
         
     | 
| 
       111 
111 
     | 
    
         
             
                    `echo #{Shellwords.escape(string)}'\\c'|pbcopy`
         
     | 
| 
       112 
112 
     | 
    
         
             
                  when /mingw|mswin/i
         
     | 
| 
       113 
     | 
    
         
            -
                     
     | 
| 
      
 113 
     | 
    
         
            +
                    Howzit.console.debug("#{out} (Windows){x}".c)
         
     | 
| 
       114 
114 
     | 
    
         
             
                    `echo #{Shellwords.escape(string)} | clip`
         
     | 
| 
       115 
115 
     | 
    
         
             
                  else
         
     | 
| 
       116 
116 
     | 
    
         
             
                    if 'xsel'.available?
         
     | 
| 
       117 
     | 
    
         
            -
                       
     | 
| 
      
 117 
     | 
    
         
            +
                      Howzit.console.debug("#{out} (Linux, xsel){x}".c)
         
     | 
| 
       118 
118 
     | 
    
         
             
                      `echo #{Shellwords.escape(string)}'\\c'|xsel -i`
         
     | 
| 
       119 
119 
     | 
    
         
             
                    elsif 'xclip'.available?
         
     | 
| 
       120 
     | 
    
         
            -
                       
     | 
| 
      
 120 
     | 
    
         
            +
                      Howzit.console.debug("#{out} (Linux, xclip){x}".c)
         
     | 
| 
       121 
121 
     | 
    
         
             
                      `echo #{Shellwords.escape(string)}'\\c'|xclip -i`
         
     | 
| 
       122 
122 
     | 
    
         
             
                    else
         
     | 
| 
       123 
     | 
    
         
            -
                       
     | 
| 
       124 
     | 
    
         
            -
                       
     | 
| 
      
 123 
     | 
    
         
            +
                      Howzit.console.debug(out)
         
     | 
| 
      
 124 
     | 
    
         
            +
                      Howzit.console.warn('Unable to determine executable for clipboard.')
         
     | 
| 
       125 
125 
     | 
    
         
             
                    end
         
     | 
| 
       126 
126 
     | 
    
         
             
                  end
         
     | 
| 
       127 
127 
     | 
    
         
             
                end
         
     | 
    
        data/lib/howzit/topic.rb
    CHANGED
    
    
    
        data/lib/howzit/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: howzit
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 2.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.0.19
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Brett Terpstra
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2022-08- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2022-08-08 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bundler
         
     |