k_builder-watch 0.0.15 → 0.0.21
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/.rubocop.yml +1 -0
- data/Gemfile +16 -12
- data/ToDo.md +67 -0
- data/bin/run +11 -7
- data/exe/k_builder-watch +11 -7
- data/k_builder-watch.gemspec +9 -6
- data/lib/k_builder/watch.rb +22 -2
- data/lib/k_builder/watch/action_display_debug.rb +18 -0
- data/lib/k_builder/watch/action_display_help.rb +33 -0
- data/lib/k_builder/watch/action_new_builder.rb +25 -0
- data/lib/k_builder/watch/{watcher.rb → action_watcher.rb} +7 -8
- data/lib/k_builder/watch/base_action.rb +18 -0
- data/lib/k_builder/watch/cli.rb +57 -134
- data/lib/k_builder/watch/cli_options.rb +83 -0
- data/lib/k_builder/watch/execute.rb +66 -0
- data/lib/k_builder/watch/new_builder.rb +20 -0
- data/lib/k_builder/watch/version.rb +1 -1
- metadata +11 -87
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: beb43eb634fe2900d78e60ccae0e11176b17f62b3f75947df04fe0426f485d40
         | 
| 4 | 
            +
              data.tar.gz: '05283ca26fbdd2b5b4dcb4b9b4d82dbcfa95f6a8c01f4fc7eddb9506ccaa9c16'
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 432b1b107773bd19ad0819fee9fceae944a19f0e46e4d31bc177791a6b5fdd49e5821bd7729f05fade15222134ecc43dcc9cb388f294a8abb1ba4877428200b5
         | 
| 7 | 
            +
              data.tar.gz: 6ef93003737f13c9765e5fda13fd9e8ee6b9013518c398fc42d6c17c59391d723cc56ae9f71f67d2e787054b4df06b5b07d813964c40f326c143e91b70e79618
         | 
    
        data/.rubocop.yml
    CHANGED
    
    
    
        data/Gemfile
    CHANGED
    
    | @@ -24,15 +24,19 @@ group :development, :test do | |
| 24 24 | 
             
              gem 'rubocop-rspec', require: false
         | 
| 25 25 | 
             
            end
         | 
| 26 26 |  | 
| 27 | 
            -
            #  | 
| 28 | 
            -
             | 
| 29 | 
            -
             | 
| 30 | 
            -
             | 
| 31 | 
            -
             | 
| 32 | 
            -
             | 
| 33 | 
            -
             | 
| 34 | 
            -
             | 
| 35 | 
            -
             | 
| 36 | 
            -
             | 
| 37 | 
            -
             | 
| 38 | 
            -
             | 
| 27 | 
            +
            # If local dependency
         | 
| 28 | 
            +
            if ENV['KLUE_LOCAL_GEMS']&.to_s&.downcase == 'true'
         | 
| 29 | 
            +
              group :development, :test do
         | 
| 30 | 
            +
                puts 'Using Local GEMs'
         | 
| 31 | 
            +
                gem 'handlebars-helpers'      , path: '../handlebars-helpers'
         | 
| 32 | 
            +
                gem 'k_builder'               , path: '../k_builder'
         | 
| 33 | 
            +
                gem 'k_builder-dotnet'        , path: '../k_builder-dotnet'
         | 
| 34 | 
            +
                gem 'k_builder-package_json'  , path: '../k_builder-package_json'
         | 
| 35 | 
            +
                gem 'k_builder-webpack5'      , path: '../k_builder-webpack5'
         | 
| 36 | 
            +
                gem 'k_decor'                 , path: '../k_decor'
         | 
| 37 | 
            +
                gem 'k_doc'                   , path: '../k_doc'
         | 
| 38 | 
            +
                gem 'k_log'                   , path: '../k_log'
         | 
| 39 | 
            +
                gem 'k_type'                  , path: '../k_type'
         | 
| 40 | 
            +
                gem 'k_util'                  , path: '../k_util'
         | 
| 41 | 
            +
              end
         | 
| 42 | 
            +
            end
         | 
    
        data/ToDo.md
    ADDED
    
    | @@ -0,0 +1,67 @@ | |
| 1 | 
            +
            # ToDo today
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            - Watch
         | 
| 4 | 
            +
              - CLI - Unit Test
         | 
| 5 | 
            +
              - Add create new builder
         | 
| 6 | 
            +
                - Touch and code for now
         | 
| 7 | 
            +
                - Later on it can create from template
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            - domains: KafeOwner.com (KafeManager.com)
         | 
| 10 | 
            +
            - New csharp solution
         | 
| 11 | 
            +
              - KafeOwner
         | 
| 12 | 
            +
                - kw -t csharp -n KafeOwner
         | 
| 13 | 
            +
                  - Creates a folder called KafeOwner and then a folder called .builders
         | 
| 14 | 
            +
                - kw -n csharp
         | 
| 15 | 
            +
                  - Creates a folder called .builders and touches setup.rb
         | 
| 16 | 
            +
             | 
| 17 | 
            +
            - 11:30 Go see Ken (Move Car)
         | 
| 18 | 
            +
            - 2pm Go See Angus
         | 
| 19 | 
            +
              - Take some receipts
         | 
| 20 | 
            +
            - 12pm Go to Council and get a new permit
         | 
| 21 | 
            +
             | 
| 22 | 
            +
             | 
| 23 | 
            +
             | 
| 24 | 
            +
            Tonight:
         | 
| 25 | 
            +
             | 
| 26 | 
            +
            - GPT3 Experiments across the cafe segmentation's
         | 
| 27 | 
            +
            - CLI - Unit Test
         | 
| 28 | 
            +
             | 
| 29 | 
            +
            - Call Chris
         | 
| 30 | 
            +
             | 
| 31 | 
            +
             | 
| 32 | 
            +
             | 
| 33 | 
            +
             | 
| 34 | 
            +
             | 
| 35 | 
            +
             | 
| 36 | 
            +
             | 
| 37 | 
            +
             | 
| 38 | 
            +
             | 
| 39 | 
            +
            I figured out the issue was environmental and that got me looking up a line of code that was generated automatically in the `bin/console` file in my GEM.
         | 
| 40 | 
            +
             | 
| 41 | 
            +
            The line of code was `require 'bundler/setup'` which I had often seen but never understood it's purpose [Bundler Setup](https://bundler.io/guides/bundler_setup.html).
         | 
| 42 | 
            +
             | 
| 43 | 
            +
            I added that line of code to my `exe/k_builder-watch` file and now the local GEM dependencies are being loaded via the Gemfile.
         | 
| 44 | 
            +
             | 
| 45 | 
            +
            ```ruby
         | 
| 46 | 
            +
            #!/usr/bin/env ruby
         | 
| 47 | 
            +
             | 
| 48 | 
            +
            # frozen_string_literal: true
         | 
| 49 | 
            +
             | 
| 50 | 
            +
            $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '../lib'))
         | 
| 51 | 
            +
             | 
| 52 | 
            +
            # LINE to ADD
         | 
| 53 | 
            +
            require 'bundler/setup' # <-- ADD THIS LINE
         | 
| 54 | 
            +
             | 
| 55 | 
            +
            require 'k_builder/watch'
         | 
| 56 | 
            +
             | 
| 57 | 
            +
            cli = KBuilder::Watch::Cli.new
         | 
| 58 | 
            +
            cli.execute
         | 
| 59 | 
            +
             | 
| 60 | 
            +
            watcher = KBuilder::Watch::Watcher.new(cli.watch_path)
         | 
| 61 | 
            +
            watcher.start
         | 
| 62 | 
            +
            ```
         | 
| 63 | 
            +
             | 
| 64 | 
            +
            [![Local Dependencies][1]][1]
         | 
| 65 | 
            +
             | 
| 66 | 
            +
             | 
| 67 | 
            +
              [1]: https://i.stack.imgur.com/KQeAb.png
         | 
    
        data/bin/run
    CHANGED
    
    | @@ -2,14 +2,18 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            # frozen_string_literal: true
         | 
| 4 4 |  | 
| 5 | 
            -
             | 
| 5 | 
            +
            require 'pry'
         | 
| 6 6 |  | 
| 7 | 
            -
             | 
| 7 | 
            +
            lib_path = File.expand_path(File.join(File.dirname(__FILE__), '../lib'))
         | 
| 8 | 
            +
            gem_path = File.expand_path(File.join(File.dirname(__FILE__), '../Gemfile'))
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            $LOAD_PATH.unshift(lib_path)
         | 
| 8 11 |  | 
| 9 | 
            -
             | 
| 12 | 
            +
            ENV['BUNDLE_GEMFILE'] = gem_path
         | 
| 13 | 
            +
             | 
| 14 | 
            +
            require 'bundler/setup'
         | 
| 15 | 
            +
            require 'k_builder/watch'
         | 
| 10 16 |  | 
| 11 | 
            -
             | 
| 12 | 
            -
            cli.execute
         | 
| 17 | 
            +
            options = KBuilder::Watch::Cli.parse_options
         | 
| 13 18 |  | 
| 14 | 
            -
             | 
| 15 | 
            -
            watcher.start
         | 
| 19 | 
            +
            KBuilder::Watch::Execute.new(options).run
         | 
    
        data/exe/k_builder-watch
    CHANGED
    
    | @@ -2,14 +2,18 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            # frozen_string_literal: true
         | 
| 4 4 |  | 
| 5 | 
            -
             | 
| 5 | 
            +
            require 'pry'
         | 
| 6 6 |  | 
| 7 | 
            -
             | 
| 7 | 
            +
            lib_path = File.expand_path(File.join(File.dirname(__FILE__), '../lib'))
         | 
| 8 | 
            +
            gem_path = File.expand_path(File.join(File.dirname(__FILE__), '../Gemfile'))
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            $LOAD_PATH.unshift(lib_path)
         | 
| 8 11 |  | 
| 9 | 
            -
             | 
| 12 | 
            +
            ENV['BUNDLE_GEMFILE'] = gem_path
         | 
| 13 | 
            +
             | 
| 14 | 
            +
            require 'bundler/setup'
         | 
| 15 | 
            +
            require 'k_builder/watch'
         | 
| 10 16 |  | 
| 11 | 
            -
             | 
| 12 | 
            -
            cli.execute
         | 
| 17 | 
            +
            options = KBuilder::Watch::Cli.parse_options
         | 
| 13 18 |  | 
| 14 | 
            -
             | 
| 15 | 
            -
            watcher.start
         | 
| 19 | 
            +
            KBuilder::Watch::Execute.new(options).run
         | 
    
        data/k_builder-watch.gemspec
    CHANGED
    
    | @@ -39,10 +39,13 @@ Gem::Specification.new do |spec| | |
| 39 39 | 
             
              # spec.extensions    = ['ext/k_builder/watch/extconf.rb']
         | 
| 40 40 |  | 
| 41 41 | 
             
              spec.add_dependency 'filewatcher', '~> 2.0.0.beta3'
         | 
| 42 | 
            -
             | 
| 43 | 
            -
              spec.add_dependency ' | 
| 44 | 
            -
              spec.add_dependency 'k_builder | 
| 45 | 
            -
              spec.add_dependency ' | 
| 46 | 
            -
              spec.add_dependency ' | 
| 47 | 
            -
              spec.add_dependency ' | 
| 42 | 
            +
             | 
| 43 | 
            +
              # spec.add_dependency 'handlebars-helpers', '~> 0.0'
         | 
| 44 | 
            +
              # spec.add_dependency 'k_builder', '~> 0.0'
         | 
| 45 | 
            +
              # spec.add_dependency 'k_builder-dotnet', '~> 0.0'
         | 
| 46 | 
            +
              # spec.add_dependency 'k_builder-package_json', '~> 0.0'
         | 
| 47 | 
            +
              # spec.add_dependency 'k_builder-webpack5', '~> 0.0'
         | 
| 48 | 
            +
              # spec.add_dependency 'k_doc', '~> 0.0'
         | 
| 49 | 
            +
              # spec.add_dependency 'k_log', '~> 0.0'
         | 
| 50 | 
            +
              # spec.add_dependency 'k_util', '~> 0.0'
         | 
| 48 51 | 
             
            end
         | 
    
        data/lib/k_builder/watch.rb
    CHANGED
    
    | @@ -1,9 +1,24 @@ | |
| 1 1 | 
             
            # frozen_string_literal: true
         | 
| 2 2 |  | 
| 3 | 
            +
            require 'handlebars/helpers'
         | 
| 4 | 
            +
             | 
| 3 5 | 
             
            require 'k_doc'
         | 
| 6 | 
            +
            require 'k_util'
         | 
| 7 | 
            +
            require 'k_log'
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            require 'k_builder/dotnet'
         | 
| 10 | 
            +
            require 'k_builder/package_json'
         | 
| 11 | 
            +
            require 'k_builder/webpack5'
         | 
| 12 | 
            +
             | 
| 4 13 | 
             
            require 'k_builder/watch/version'
         | 
| 5 14 | 
             
            require 'k_builder/watch/cli'
         | 
| 6 | 
            -
            require 'k_builder/watch/ | 
| 15 | 
            +
            require 'k_builder/watch/cli_options'
         | 
| 16 | 
            +
            require 'k_builder/watch/base_action'
         | 
| 17 | 
            +
            require 'k_builder/watch/action_display_help'
         | 
| 18 | 
            +
            require 'k_builder/watch/action_display_debug'
         | 
| 19 | 
            +
            require 'k_builder/watch/action_new_builder'
         | 
| 20 | 
            +
            require 'k_builder/watch/action_watcher'
         | 
| 21 | 
            +
            require 'k_builder/watch/execute'
         | 
| 7 22 |  | 
| 8 23 | 
             
            module KBuilder
         | 
| 9 24 | 
             
              module Watch
         | 
| @@ -12,4 +27,9 @@ module KBuilder | |
| 12 27 | 
             
              end
         | 
| 13 28 | 
             
            end
         | 
| 14 29 |  | 
| 15 | 
            -
             | 
| 30 | 
            +
            if ENV['KLUE_DEBUG']&.to_s&.downcase == 'true'
         | 
| 31 | 
            +
              namespace = 'KBuilder::Watch::Version'
         | 
| 32 | 
            +
              file_path = $LOADED_FEATURES.find { |f| f.include?('k_builder/watch/version') }
         | 
| 33 | 
            +
              version   = KBuilder::Watch::VERSION.ljust(9)
         | 
| 34 | 
            +
              puts "#{namespace.ljust(35)} : #{version.ljust(9)} : #{file_path}"
         | 
| 35 | 
            +
            end
         | 
| @@ -0,0 +1,18 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            require 'pry'
         | 
| 4 | 
            +
            require 'k_builder'
         | 
| 5 | 
            +
            require 'json'
         | 
| 6 | 
            +
            require 'getoptlong'
         | 
| 7 | 
            +
            require 'forwardable'
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            module KBuilder
         | 
| 10 | 
            +
              module Watch
         | 
| 11 | 
            +
                # Action for displaying CLI debug options
         | 
| 12 | 
            +
                class ActionDisplayDebug < KBuilder::Watch::BaseAction
         | 
| 13 | 
            +
                  def run
         | 
| 14 | 
            +
                    puts JSON.pretty_generate(@options.to_h)
         | 
| 15 | 
            +
                  end
         | 
| 16 | 
            +
                end
         | 
| 17 | 
            +
              end
         | 
| 18 | 
            +
            end
         | 
| @@ -0,0 +1,33 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            require 'pry'
         | 
| 4 | 
            +
            require 'k_builder'
         | 
| 5 | 
            +
            require 'json'
         | 
| 6 | 
            +
            require 'getoptlong'
         | 
| 7 | 
            +
            require 'forwardable'
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            module KBuilder
         | 
| 10 | 
            +
              module Watch
         | 
| 11 | 
            +
                # Action for displaying CLI help
         | 
| 12 | 
            +
                class ActionDisplayHelp < KBuilder::Watch::BaseAction
         | 
| 13 | 
            +
                  def run
         | 
| 14 | 
            +
                    puts 'HELP: k_watcher [OPTION] ... DIR'
         | 
| 15 | 
            +
                    puts ''
         | 
| 16 | 
            +
                    puts '  -h, --help:                                   - show help'
         | 
| 17 | 
            +
                    puts '  --debug                                       - display debug options'
         | 
| 18 | 
            +
                    puts '  -n, --new [folder_name]                       - create a new .builders folder with setup file, optionally create it under the [FolderName]'
         | 
| 19 | 
            +
                    puts ''
         | 
| 20 | 
            +
                    puts ' DIR:                                           - The directory to watch, will default to current directory "."'
         | 
| 21 | 
            +
                    puts ''
         | 
| 22 | 
            +
                    puts 'examples'
         | 
| 23 | 
            +
                    puts ''
         | 
| 24 | 
            +
                    puts 'Get Help                                        - k_watcher -h'
         | 
| 25 | 
            +
                    puts 'Debug                                           - k_watcher --debug'
         | 
| 26 | 
            +
                    puts 'New builder project   (./.builders)             - k_watcher -n'
         | 
| 27 | 
            +
                    puts 'New builder project   (./HelloWorld/.builders)  - k_watcher -n HelloWorld'
         | 
| 28 | 
            +
                    puts 'Watch current folder  (.)                       - k_watcher'
         | 
| 29 | 
            +
                    puts 'Watch the subfolder   (.builders)               - k_watcher .builders'
         | 
| 30 | 
            +
                  end
         | 
| 31 | 
            +
                end
         | 
| 32 | 
            +
              end
         | 
| 33 | 
            +
            end
         | 
| @@ -0,0 +1,25 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            require 'pry'
         | 
| 4 | 
            +
            require 'k_builder'
         | 
| 5 | 
            +
            require 'json'
         | 
| 6 | 
            +
            require 'getoptlong'
         | 
| 7 | 
            +
            require 'forwardable'
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            module KBuilder
         | 
| 10 | 
            +
              module Watch
         | 
| 11 | 
            +
                # Action for creating a new app with .builders
         | 
| 12 | 
            +
                class ActionNewBuilder < KBuilder::Watch::BaseAction
         | 
| 13 | 
            +
                  def run
         | 
| 14 | 
            +
                    setup_file = File.join(options.new_watch_path, 'setup.rb')
         | 
| 15 | 
            +
                    config_file = File.join(options.new_watch_path, 'config', '_.rb')
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                    FileUtils.mkdir_p(File.dirname(config_file))
         | 
| 18 | 
            +
                    File.write(setup_file, "require 'config/_'")                                unless File.exist?(setup_file)
         | 
| 19 | 
            +
                    File.write(config_file, "puts '_'\n\n#require 'config/_initialize'")        unless File.exist?(config_file)
         | 
| 20 | 
            +
             | 
| 21 | 
            +
                    system("code #{File.join(options.new_app_path, '.')}")
         | 
| 22 | 
            +
                  end
         | 
| 23 | 
            +
                end
         | 
| 24 | 
            +
              end
         | 
| 25 | 
            +
            end
         | 
| @@ -6,23 +6,22 @@ require 'io/console' | |
| 6 6 | 
             
            # require 'bundler/setup'
         | 
| 7 7 | 
             
            # require 'webpack5/builder'
         | 
| 8 8 | 
             
            # require 'handlebars/helpers/configuration'
         | 
| 9 | 
            -
             | 
| 10 9 | 
             
            module KBuilder
         | 
| 11 10 | 
             
              # Watch supports any watch and execute processes for builders
         | 
| 12 11 | 
             
              module Watch
         | 
| 13 12 | 
             
                # Watcher does the actual file watching and run the processor
         | 
| 14 | 
            -
                class  | 
| 13 | 
            +
                class ActionWatcher < KBuilder::Watch::BaseAction
         | 
| 15 14 | 
             
                  attr_accessor :directory
         | 
| 16 15 |  | 
| 17 | 
            -
                   | 
| 18 | 
            -
                    @directory = directory
         | 
| 19 | 
            -
                  end
         | 
| 16 | 
            +
                  # TODO: Need to support folder exclusions so that I can place .templates, in with .builders
         | 
| 20 17 |  | 
| 21 | 
            -
                   | 
| 22 | 
            -
             | 
| 18 | 
            +
                  def run
         | 
| 19 | 
            +
                    @directory = options.watch_path
         | 
| 20 | 
            +
                    start
         | 
| 21 | 
            +
                  end
         | 
| 23 22 |  | 
| 24 23 | 
             
                  def start
         | 
| 25 | 
            -
                    clear_screen
         | 
| 24 | 
            +
                    # clear_screen
         | 
| 26 25 | 
             
                    puts "KBuilder-Watch: v#{KBuilder::Watch::VERSION} is watching for file changes"
         | 
| 27 26 | 
             
                    puts "Directory: #{directory}"
         | 
| 28 27 | 
             
                    # puts "Watch File: #{watch_file}"
         | 
| @@ -0,0 +1,18 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            module KBuilder
         | 
| 4 | 
            +
              module Watch
         | 
| 5 | 
            +
                # Base Action
         | 
| 6 | 
            +
                class BaseAction
         | 
| 7 | 
            +
                  attr_accessor :options
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                  def initialize(options)
         | 
| 10 | 
            +
                    @options = options
         | 
| 11 | 
            +
                  end
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                  def run
         | 
| 14 | 
            +
                    raise KBuilder::Watch::Error, 'Descendants of BaseAction must implement the run method'
         | 
| 15 | 
            +
                  end
         | 
| 16 | 
            +
                end
         | 
| 17 | 
            +
              end
         | 
| 18 | 
            +
            end
         | 
    
        data/lib/k_builder/watch/cli.rb
    CHANGED
    
    | @@ -4,176 +4,99 @@ require 'pry' | |
| 4 4 | 
             
            require 'k_builder'
         | 
| 5 5 | 
             
            require 'json'
         | 
| 6 6 | 
             
            require 'getoptlong'
         | 
| 7 | 
            +
            require 'forwardable'
         | 
| 7 8 |  | 
| 8 9 | 
             
            module KBuilder
         | 
| 9 10 | 
             
              module Watch
         | 
| 10 11 | 
             
                # Command line interface for starting the watcher
         | 
| 11 12 | 
             
                class Cli
         | 
| 12 | 
            -
                   | 
| 13 | 
            -
             | 
| 14 | 
            -
                  attr_accessor : | 
| 15 | 
            -
             | 
| 16 | 
            -
                   | 
| 17 | 
            -
                  attr_accessor :path_relative
         | 
| 18 | 
            -
                  attr_accessor :new_path
         | 
| 19 | 
            -
                  attr_accessor :new_path_relative
         | 
| 20 | 
            -
                  attr_accessor :new
         | 
| 21 | 
            -
                  attr_accessor :app_path
         | 
| 22 | 
            -
                  attr_accessor :watch_path
         | 
| 23 | 
            -
                  attr_accessor :help
         | 
| 13 | 
            +
                  extend Forwardable
         | 
| 14 | 
            +
             | 
| 15 | 
            +
                  attr_accessor :opts
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                  def_delegators :opts, :base_path, :debug?, :help?, :new?
         | 
| 24 18 |  | 
| 25 19 | 
             
                  def initialize
         | 
| 26 | 
            -
                     | 
| 27 | 
            -
             | 
| 28 | 
            -
                     | 
| 29 | 
            -
             | 
| 30 | 
            -
                    @watch_path = nil
         | 
| 31 | 
            -
                    @base_path = Dir.pwd
         | 
| 32 | 
            -
                    @path_relative = nil # '.'
         | 
| 33 | 
            -
                    @path = nil
         | 
| 34 | 
            -
                    @app_path = nil
         | 
| 35 | 
            -
                    @new_path = nil
         | 
| 36 | 
            -
                    @new_path_relative = nil
         | 
| 37 | 
            -
                    @new = nil
         | 
| 20 | 
            +
                    @opts = KBuilder::Watch::CliOptions.new
         | 
| 21 | 
            +
             | 
| 22 | 
            +
                    process_arguments
         | 
| 23 | 
            +
                  end
         | 
| 38 24 |  | 
| 25 | 
            +
                  def self.parse_options
         | 
| 26 | 
            +
                    new.opts
         | 
| 27 | 
            +
                  end
         | 
| 28 | 
            +
             | 
| 29 | 
            +
                  def process_arguments
         | 
| 39 30 | 
             
                    parse_arguments
         | 
| 40 | 
            -
             | 
| 31 | 
            +
             | 
| 32 | 
            +
                    set_watch_path_arg
         | 
| 33 | 
            +
                    set_watch_path
         | 
| 41 34 | 
             
                  end
         | 
| 42 35 |  | 
| 43 36 | 
             
                  def options
         | 
| 44 | 
            -
                    # ['--repeat'  , '-r', GetoptLong::REQUIRED_ARGUMENT],
         | 
| 45 37 | 
             
                    GetoptLong.new(
         | 
| 46 | 
            -
                      ['--help' | 
| 47 | 
            -
                      ['--debug' | 
| 48 | 
            -
                      ['--new' | 
| 38 | 
            +
                      ['--help' , '-h', GetoptLong::NO_ARGUMENT],
         | 
| 39 | 
            +
                      ['--debug' , GetoptLong::NO_ARGUMENT],
         | 
| 40 | 
            +
                      ['--new' , '-n', GetoptLong::OPTIONAL_ARGUMENT]
         | 
| 49 41 | 
             
                    )
         | 
| 50 42 | 
             
                  end
         | 
| 51 43 |  | 
| 52 | 
            -
                  def post_process_arguments
         | 
| 53 | 
            -
                    set_watch_path
         | 
| 54 | 
            -
                  end
         | 
| 55 | 
            -
             | 
| 56 44 | 
             
                  def parse_arguments
         | 
| 57 | 
            -
                    # bin/run -l -r 2 --name -- spec/samples
         | 
| 58 45 | 
             
                    options.each do |opt, arg|
         | 
| 59 | 
            -
                       | 
| 46 | 
            +
                      # Arguments like -nKafeOwner and -n KafeOwner should both become 'KafeOwner'
         | 
| 47 | 
            +
                      parse_option(opt, arg.strip)
         | 
| 60 48 | 
             
                    end
         | 
| 61 | 
            -
             | 
| 62 | 
            -
                    parse_final_argument
         | 
| 63 49 | 
             
                  end
         | 
| 64 50 |  | 
| 65 | 
            -
                  def  | 
| 66 | 
            -
                     | 
| 67 | 
            -
                    #   puts 'Missing dir argument (try --help)'
         | 
| 68 | 
            -
                    #   exit 0
         | 
| 69 | 
            -
                    # end
         | 
| 70 | 
            -
             | 
| 71 | 
            -
                    @path_relative = if ARGV.length == 1
         | 
| 72 | 
            -
                                       ARGV.shift
         | 
| 73 | 
            -
                                     else
         | 
| 74 | 
            -
                                       '.'
         | 
| 75 | 
            -
                                     end
         | 
| 76 | 
            -
             | 
| 77 | 
            -
                    return unless @path.nil?
         | 
| 78 | 
            -
             | 
| 79 | 
            -
                    @path = File.join(base_path, path_relative)
         | 
| 51 | 
            +
                  def to_h
         | 
| 52 | 
            +
                    @opts.to_h
         | 
| 80 53 | 
             
                  end
         | 
| 81 54 |  | 
| 55 | 
            +
                  private
         | 
| 56 | 
            +
             | 
| 57 | 
            +
                  # rubocop:disable Metrics/AbcSize
         | 
| 82 58 | 
             
                  def parse_option(opt, arg)
         | 
| 83 59 | 
             
                    case opt
         | 
| 84 60 | 
             
                    when '--help'
         | 
| 85 | 
            -
                      @help = true
         | 
| 61 | 
            +
                      @opts.help = true
         | 
| 86 62 | 
             
                    when '--debug'
         | 
| 87 | 
            -
                      @debug = true
         | 
| 88 | 
            -
                      # when '--repeat'
         | 
| 89 | 
            -
                      #   @repetitions = arg.to_i
         | 
| 63 | 
            +
                      @opts.debug = true
         | 
| 90 64 | 
             
                    when '--new'
         | 
| 91 | 
            -
                       | 
| 92 | 
            -
                      @new = arg
         | 
| 93 | 
            -
                      @app_path = File.join(base_path, arg)
         | 
| 94 | 
            -
                      @new_path_relative = arg == '' ? '.builders' : File.join(arg.to_s, '.builders')
         | 
| 95 | 
            -
                      @new_path = File.join(base_path, @new_path_relative)
         | 
| 96 | 
            -
                      @path = @new_path_relative
         | 
| 65 | 
            +
                      parse_new_option(arg)
         | 
| 97 66 | 
             
                    end
         | 
| 98 67 | 
             
                  end
         | 
| 99 68 |  | 
| 100 | 
            -
                  def  | 
| 101 | 
            -
                     | 
| 102 | 
            -
                     | 
| 103 | 
            -
             | 
| 104 | 
            -
             | 
| 105 | 
            -
                     | 
| 106 | 
            -
             | 
| 107 | 
            -
             | 
| 108 | 
            -
                     | 
| 109 | 
            -
                    #     print ", #{name}"
         | 
| 110 | 
            -
                    #   end
         | 
| 111 | 
            -
                    #   puts
         | 
| 112 | 
            -
                    # end
         | 
| 113 | 
            -
                  end
         | 
| 114 | 
            -
             | 
| 115 | 
            -
                  def new_builder
         | 
| 116 | 
            -
                    setup_file = File.join(new_path, 'setup.rb')
         | 
| 117 | 
            -
                    config_file = File.join(new_path, 'config', '_.rb')
         | 
| 118 | 
            -
             | 
| 119 | 
            -
                    FileUtils.mkdir_p(File.dirname(config_file))
         | 
| 120 | 
            -
                    File.write(setup_file, "require 'config/_'")                                unless File.exist?(setup_file)
         | 
| 121 | 
            -
                    File.write(config_file, "puts '_'\n\n#require 'config/_initialize'")        unless File.exist?(config_file)
         | 
| 122 | 
            -
             | 
| 123 | 
            -
                    system("code #{File.join(app_path, '.')}")
         | 
| 124 | 
            -
                  end
         | 
| 125 | 
            -
             | 
| 126 | 
            -
                  def display_help
         | 
| 127 | 
            -
                    puts 'HELP: k_watcher [OPTION] ... DIR'
         | 
| 128 | 
            -
                    puts ''
         | 
| 129 | 
            -
                    puts '  -h, --help:                                   - show help'
         | 
| 130 | 
            -
                    puts '  --debug                                       - display debug options'
         | 
| 131 | 
            -
                    puts '  -n, --new [folder_name]                       - create a new .builders folder with setup file, optionally create it under the [FolderName]'
         | 
| 132 | 
            -
                    puts ''
         | 
| 133 | 
            -
                    puts ' DIR:                                           - The directory to watch, will default to current directory "."'
         | 
| 134 | 
            -
                    puts ''
         | 
| 135 | 
            -
                    puts 'examples'
         | 
| 136 | 
            -
                    puts ''
         | 
| 137 | 
            -
                    puts 'Get Help                                        - k_watcher -h'
         | 
| 138 | 
            -
                    puts 'Debug                                           - k_watcher --debug'
         | 
| 139 | 
            -
                    puts 'New builder project   (./.builders)             - k_watcher -n'
         | 
| 140 | 
            -
                    puts 'New builder project   (./HelloWorld/.builders)  - k_watcher -n HelloWorld'
         | 
| 141 | 
            -
                    puts 'Watch current folder  (.)                       - k_watcher'
         | 
| 142 | 
            -
                    puts 'Watch the subfolder   (.builders)               - k_watcher .builders'
         | 
| 143 | 
            -
             | 
| 144 | 
            -
                    exit
         | 
| 69 | 
            +
                  def parse_new_option(arg)
         | 
| 70 | 
            +
                    @opts.new_arg = arg.to_s
         | 
| 71 | 
            +
                    if @opts.new_arg == ''
         | 
| 72 | 
            +
                      @opts.new_app_path = @opts.base_path
         | 
| 73 | 
            +
                      @opts.new_watch_path = File.join(@opts.base_path, '.builders')
         | 
| 74 | 
            +
                    else
         | 
| 75 | 
            +
                      @opts.new_app_path = File.join(@opts.base_path, @opts.new_arg)
         | 
| 76 | 
            +
                      @opts.new_watch_path = File.join(@opts.base_path, @opts.new_arg, '.builders')
         | 
| 77 | 
            +
                    end
         | 
| 145 78 | 
             
                  end
         | 
| 79 | 
            +
                  # rubocop:enable Metrics/AbcSize
         | 
| 146 80 |  | 
| 147 | 
            -
                  def  | 
| 148 | 
            -
                     | 
| 149 | 
            -
             | 
| 150 | 
            -
             | 
| 81 | 
            +
                  def set_watch_path
         | 
| 82 | 
            +
                    if new?
         | 
| 83 | 
            +
                      @opts.watch_path = @opts.new_watch_path
         | 
| 84 | 
            +
                      return
         | 
| 85 | 
            +
                    end
         | 
| 151 86 |  | 
| 152 | 
            -
             | 
| 153 | 
            -
             | 
| 154 | 
            -
             | 
| 155 | 
            -
             | 
| 156 | 
            -
             | 
| 157 | 
            -
                      app_path: app_path,
         | 
| 158 | 
            -
                      base_path: base_path,
         | 
| 159 | 
            -
                      path_relative: path_relative,
         | 
| 160 | 
            -
                      watch_path: watch_path,
         | 
| 161 | 
            -
                      new_path: new_path,
         | 
| 162 | 
            -
                      new_path_relative: new_path_relative,
         | 
| 163 | 
            -
                      new: new
         | 
| 164 | 
            -
                    }
         | 
| 87 | 
            +
                    @opts.watch_path = if KUtil.file.home_or_absolute?(@opts.watch_path_arg)
         | 
| 88 | 
            +
                                         File.expand_path(@opts.watch_path_arg)
         | 
| 89 | 
            +
                                       else
         | 
| 90 | 
            +
                                         File.absolute_path(@opts.watch_path_arg, @opts.base_path)
         | 
| 91 | 
            +
                                       end
         | 
| 165 92 | 
             
                  end
         | 
| 166 93 |  | 
| 167 | 
            -
                   | 
| 168 | 
            -
             | 
| 169 | 
            -
             | 
| 170 | 
            -
             | 
| 171 | 
            -
             | 
| 172 | 
            -
             | 
| 173 | 
            -
                                    File.expand_path(path)
         | 
| 174 | 
            -
                                  else
         | 
| 175 | 
            -
                                    File.absolute_path(path, base_path)
         | 
| 176 | 
            -
                                  end
         | 
| 94 | 
            +
                  def set_watch_path_arg
         | 
| 95 | 
            +
                    @opts.watch_path_arg = if ARGV.length == 1
         | 
| 96 | 
            +
                                             ARGV.shift
         | 
| 97 | 
            +
                                           else
         | 
| 98 | 
            +
                                             '.'
         | 
| 99 | 
            +
                                           end
         | 
| 177 100 | 
             
                  end
         | 
| 178 101 | 
             
                end
         | 
| 179 102 | 
             
              end
         | 
| @@ -0,0 +1,83 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            require 'pry'
         | 
| 4 | 
            +
            require 'k_builder'
         | 
| 5 | 
            +
            require 'json'
         | 
| 6 | 
            +
            require 'getoptlong'
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            module KBuilder
         | 
| 9 | 
            +
              module Watch
         | 
| 10 | 
            +
                # List of and options paths that are relevant to the KBuilder::Watch::Cli
         | 
| 11 | 
            +
                class CliOptions
         | 
| 12 | 
            +
                  # This is the path that the watcher was started from.
         | 
| 13 | 
            +
                  # It is the default base path that other paths are relative to.
         | 
| 14 | 
            +
                  #
         | 
| 15 | 
            +
                  # Note: it is not used when paths are supplied in absolute form
         | 
| 16 | 
            +
                  attr_accessor :base_path
         | 
| 17 | 
            +
                  # attr_accessor :path
         | 
| 18 | 
            +
             | 
| 19 | 
            +
                  # What watch_path argument is passed in for watching
         | 
| 20 | 
            +
                  #
         | 
| 21 | 
            +
                  # This attribute will be help to build :watch_path
         | 
| 22 | 
            +
                  #
         | 
| 23 | 
            +
                  # A relative path will be relative to base_path
         | 
| 24 | 
            +
                  # An absolute path is used as is
         | 
| 25 | 
            +
                  # A home path is used as is
         | 
| 26 | 
            +
                  attr_accessor :watch_path_arg
         | 
| 27 | 
            +
                  attr_accessor :watch_path
         | 
| 28 | 
            +
             | 
| 29 | 
            +
                  # What :new_arg is passed in for creating a new application with
         | 
| 30 | 
            +
                  # with .builder watch capability
         | 
| 31 | 
            +
                  attr_accessor :new_arg
         | 
| 32 | 
            +
             | 
| 33 | 
            +
                  # Path to where the application will reside
         | 
| 34 | 
            +
                  attr_accessor :new_app_path
         | 
| 35 | 
            +
             | 
| 36 | 
            +
                  # Path to where the .builder files will reside
         | 
| 37 | 
            +
                  attr_accessor :new_watch_path
         | 
| 38 | 
            +
             | 
| 39 | 
            +
                  attr_accessor :debug
         | 
| 40 | 
            +
                  attr_accessor :help
         | 
| 41 | 
            +
             | 
| 42 | 
            +
                  def initialize
         | 
| 43 | 
            +
                    @base_path = Dir.pwd
         | 
| 44 | 
            +
             | 
| 45 | 
            +
                    @watch_path_arg = nil
         | 
| 46 | 
            +
                    @watch_path = nil
         | 
| 47 | 
            +
             | 
| 48 | 
            +
                    @new_arg = nil
         | 
| 49 | 
            +
                    @new_app_path = nil
         | 
| 50 | 
            +
                    @new_watch_path = nil
         | 
| 51 | 
            +
             | 
| 52 | 
            +
                    @debug = false
         | 
| 53 | 
            +
                    @help = false
         | 
| 54 | 
            +
                  end
         | 
| 55 | 
            +
             | 
| 56 | 
            +
                  def help?
         | 
| 57 | 
            +
                    !!@help
         | 
| 58 | 
            +
                  end
         | 
| 59 | 
            +
             | 
| 60 | 
            +
                  def debug?
         | 
| 61 | 
            +
                    !!@debug
         | 
| 62 | 
            +
                  end
         | 
| 63 | 
            +
             | 
| 64 | 
            +
                  def new?
         | 
| 65 | 
            +
                    !!@new_arg
         | 
| 66 | 
            +
                  end
         | 
| 67 | 
            +
             | 
| 68 | 
            +
                  def to_h
         | 
| 69 | 
            +
                    {
         | 
| 70 | 
            +
                      debug: debug?,
         | 
| 71 | 
            +
                      help: help?,
         | 
| 72 | 
            +
                      new: new?,
         | 
| 73 | 
            +
                      base_path: base_path,
         | 
| 74 | 
            +
                      watch_path_arg: watch_path_arg,
         | 
| 75 | 
            +
                      watch_path: watch_path,
         | 
| 76 | 
            +
                      new_arg: new_arg,
         | 
| 77 | 
            +
                      new_app_path: new_app_path,
         | 
| 78 | 
            +
                      new_watch_path: new_watch_path
         | 
| 79 | 
            +
                    }
         | 
| 80 | 
            +
                  end
         | 
| 81 | 
            +
                end
         | 
| 82 | 
            +
              end
         | 
| 83 | 
            +
            end
         | 
| @@ -0,0 +1,66 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            require 'pry'
         | 
| 4 | 
            +
            require 'k_builder'
         | 
| 5 | 
            +
            require 'json'
         | 
| 6 | 
            +
            require 'getoptlong'
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            module KBuilder
         | 
| 9 | 
            +
              module Watch
         | 
| 10 | 
            +
                # Execute based on CLI options
         | 
| 11 | 
            +
                class Execute
         | 
| 12 | 
            +
                  DEFAULT_ACTIONS = {
         | 
| 13 | 
            +
                    help: KBuilder::Watch::ActionDisplayHelp,
         | 
| 14 | 
            +
                    debug: KBuilder::Watch::ActionDisplayDebug,
         | 
| 15 | 
            +
                    new_builder: KBuilder::Watch::ActionNewBuilder,
         | 
| 16 | 
            +
                    watcher: KBuilder::Watch::ActionWatcher
         | 
| 17 | 
            +
                  }.freeze
         | 
| 18 | 
            +
             | 
| 19 | 
            +
                  # watcher = KBuilder::Watch::Watcher.new(cli.watch_path)
         | 
| 20 | 
            +
                  # watcher.start
         | 
| 21 | 
            +
             | 
| 22 | 
            +
                  attr_accessor :actions
         | 
| 23 | 
            +
                  attr_accessor :options
         | 
| 24 | 
            +
             | 
| 25 | 
            +
                  # Execute one or more actions based on supplied options
         | 
| 26 | 
            +
                  #
         | 
| 27 | 
            +
                  # You can use dependency injection to provide your actions
         | 
| 28 | 
            +
                  def initialize(options, actions: DEFAULT_ACTIONS)
         | 
| 29 | 
            +
                    @actions = actions
         | 
| 30 | 
            +
                    @options = options
         | 
| 31 | 
            +
                  end
         | 
| 32 | 
            +
             | 
| 33 | 
            +
                  def run_action(action_key)
         | 
| 34 | 
            +
                    raise KBuilder::Watch::Error, "Unknown action: #{action_key}" unless @actions.key?(action_key)
         | 
| 35 | 
            +
             | 
| 36 | 
            +
                    action = actions[action_key].new(options)
         | 
| 37 | 
            +
                    action.run
         | 
| 38 | 
            +
                  end
         | 
| 39 | 
            +
             | 
| 40 | 
            +
                  def run
         | 
| 41 | 
            +
                    if options.help?
         | 
| 42 | 
            +
                      run_action(:help)
         | 
| 43 | 
            +
             | 
| 44 | 
            +
                      exit
         | 
| 45 | 
            +
                    end
         | 
| 46 | 
            +
             | 
| 47 | 
            +
                    if options.debug?
         | 
| 48 | 
            +
                      run_action(:debug)
         | 
| 49 | 
            +
             | 
| 50 | 
            +
                      exit
         | 
| 51 | 
            +
                    end
         | 
| 52 | 
            +
             | 
| 53 | 
            +
                    if options.new?
         | 
| 54 | 
            +
                      run_action(:new_builder)
         | 
| 55 | 
            +
             | 
| 56 | 
            +
                      # Originally I allowed new to proceed straight into watcher, but it is problematic to mix
         | 
| 57 | 
            +
                      # builder creation in with builder watching, they are two different tasks that should be
         | 
| 58 | 
            +
                      # run separately
         | 
| 59 | 
            +
                      exit
         | 
| 60 | 
            +
                    end
         | 
| 61 | 
            +
             | 
| 62 | 
            +
                    run_action(:watcher)
         | 
| 63 | 
            +
                  end
         | 
| 64 | 
            +
                end
         | 
| 65 | 
            +
              end
         | 
| 66 | 
            +
            end
         | 
| @@ -0,0 +1,20 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            module KBuilder
         | 
| 4 | 
            +
              # Watch supports any watch and execute processes for builders
         | 
| 5 | 
            +
              module Watch
         | 
| 6 | 
            +
                # Create a new folder for application with builders
         | 
| 7 | 
            +
                class NewBuilder
         | 
| 8 | 
            +
                  def execute(_paths)
         | 
| 9 | 
            +
                    setup_file = File.join(new_watch_path, 'setup.rb')
         | 
| 10 | 
            +
                    config_file = File.join(new_watch_path, 'config', '_.rb')
         | 
| 11 | 
            +
             | 
| 12 | 
            +
                    FileUtils.mkdir_p(File.dirname(config_file))
         | 
| 13 | 
            +
                    File.write(setup_file, "require 'config/_'")                                unless File.exist?(setup_file)
         | 
| 14 | 
            +
                    File.write(config_file, "puts '_'\n\n#require 'config/_initialize'")        unless File.exist?(config_file)
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                    system("code #{File.join(new_app_path, '.')}")
         | 
| 17 | 
            +
                  end
         | 
| 18 | 
            +
                end
         | 
| 19 | 
            +
              end
         | 
| 20 | 
            +
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: k_builder-watch
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.21
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - David Cruwys
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2021- | 
| 11 | 
            +
            date: 2021-07-15 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: filewatcher
         | 
| @@ -24,90 +24,6 @@ dependencies: | |
| 24 24 | 
             
                - - "~>"
         | 
| 25 25 | 
             
                  - !ruby/object:Gem::Version
         | 
| 26 26 | 
             
                    version: 2.0.0.beta3
         | 
| 27 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 28 | 
            -
              name: k_builder
         | 
| 29 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 30 | 
            -
                requirements:
         | 
| 31 | 
            -
                - - "~>"
         | 
| 32 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 33 | 
            -
                    version: '0.0'
         | 
| 34 | 
            -
              type: :runtime
         | 
| 35 | 
            -
              prerelease: false
         | 
| 36 | 
            -
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 37 | 
            -
                requirements:
         | 
| 38 | 
            -
                - - "~>"
         | 
| 39 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 40 | 
            -
                    version: '0.0'
         | 
| 41 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 42 | 
            -
              name: k_builder-package_json
         | 
| 43 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 44 | 
            -
                requirements:
         | 
| 45 | 
            -
                - - "~>"
         | 
| 46 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 47 | 
            -
                    version: '0.0'
         | 
| 48 | 
            -
              type: :runtime
         | 
| 49 | 
            -
              prerelease: false
         | 
| 50 | 
            -
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 51 | 
            -
                requirements:
         | 
| 52 | 
            -
                - - "~>"
         | 
| 53 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 54 | 
            -
                    version: '0.0'
         | 
| 55 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 56 | 
            -
              name: k_builder-webpack5
         | 
| 57 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 58 | 
            -
                requirements:
         | 
| 59 | 
            -
                - - "~>"
         | 
| 60 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 61 | 
            -
                    version: '0.0'
         | 
| 62 | 
            -
              type: :runtime
         | 
| 63 | 
            -
              prerelease: false
         | 
| 64 | 
            -
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 65 | 
            -
                requirements:
         | 
| 66 | 
            -
                - - "~>"
         | 
| 67 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 68 | 
            -
                    version: '0.0'
         | 
| 69 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 70 | 
            -
              name: k_doc
         | 
| 71 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 72 | 
            -
                requirements:
         | 
| 73 | 
            -
                - - "~>"
         | 
| 74 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 75 | 
            -
                    version: '0.0'
         | 
| 76 | 
            -
              type: :runtime
         | 
| 77 | 
            -
              prerelease: false
         | 
| 78 | 
            -
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 79 | 
            -
                requirements:
         | 
| 80 | 
            -
                - - "~>"
         | 
| 81 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 82 | 
            -
                    version: '0.0'
         | 
| 83 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 84 | 
            -
              name: k_log
         | 
| 85 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 86 | 
            -
                requirements:
         | 
| 87 | 
            -
                - - "~>"
         | 
| 88 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 89 | 
            -
                    version: '0.0'
         | 
| 90 | 
            -
              type: :runtime
         | 
| 91 | 
            -
              prerelease: false
         | 
| 92 | 
            -
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 93 | 
            -
                requirements:
         | 
| 94 | 
            -
                - - "~>"
         | 
| 95 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 96 | 
            -
                    version: '0.0'
         | 
| 97 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 98 | 
            -
              name: k_util
         | 
| 99 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 100 | 
            -
                requirements:
         | 
| 101 | 
            -
                - - "~>"
         | 
| 102 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 103 | 
            -
                    version: '0.0'
         | 
| 104 | 
            -
              type: :runtime
         | 
| 105 | 
            -
              prerelease: false
         | 
| 106 | 
            -
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 107 | 
            -
                requirements:
         | 
| 108 | 
            -
                - - "~>"
         | 
| 109 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 110 | 
            -
                    version: '0.0'
         | 
| 111 27 | 
             
            description: "    K-Builder-Watch will watch k_builder files and when they change,
         | 
| 112 28 | 
             
              execute them\n"
         | 
| 113 29 | 
             
            email:
         | 
| @@ -131,6 +47,7 @@ files: | |
| 131 47 | 
             
            - README.md
         | 
| 132 48 | 
             
            - Rakefile
         | 
| 133 49 | 
             
            - STORIES.md
         | 
| 50 | 
            +
            - ToDo.md
         | 
| 134 51 | 
             
            - USAGE.md
         | 
| 135 52 | 
             
            - bin/console
         | 
| 136 53 | 
             
            - bin/k
         | 
| @@ -143,9 +60,16 @@ files: | |
| 143 60 | 
             
            - hooks/update-version
         | 
| 144 61 | 
             
            - k_builder-watch.gemspec
         | 
| 145 62 | 
             
            - lib/k_builder/watch.rb
         | 
| 63 | 
            +
            - lib/k_builder/watch/action_display_debug.rb
         | 
| 64 | 
            +
            - lib/k_builder/watch/action_display_help.rb
         | 
| 65 | 
            +
            - lib/k_builder/watch/action_new_builder.rb
         | 
| 66 | 
            +
            - lib/k_builder/watch/action_watcher.rb
         | 
| 67 | 
            +
            - lib/k_builder/watch/base_action.rb
         | 
| 146 68 | 
             
            - lib/k_builder/watch/cli.rb
         | 
| 69 | 
            +
            - lib/k_builder/watch/cli_options.rb
         | 
| 70 | 
            +
            - lib/k_builder/watch/execute.rb
         | 
| 71 | 
            +
            - lib/k_builder/watch/new_builder.rb
         | 
| 147 72 | 
             
            - lib/k_builder/watch/version.rb
         | 
| 148 | 
            -
            - lib/k_builder/watch/watcher.rb
         | 
| 149 73 | 
             
            homepage: http://appydave.com/gems/k-builder-watch
         | 
| 150 74 | 
             
            licenses:
         | 
| 151 75 | 
             
            - MIT
         |