lino 2.2.0.pre.4 → 2.2.0.pre.5
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/Gemfile.lock +1 -1
- data/lib/lino/appliables.rb +23 -0
- data/lib/lino/command_line_builder.rb +2 -0
- data/lib/lino/options.rb +4 -0
- data/lib/lino/subcommand_builder.rb +2 -0
- data/lib/lino/version.rb +1 -1
- metadata +2 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 729c96dd84a7a44337298eb3de557d061565d5f4defc5bd2077431e20f0917cc
         | 
| 4 | 
            +
              data.tar.gz: 03c7697d78175ad6e2135540d2babeee039a9cdfd77cbcd789137db66561aa80
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 95af24c97c8d11bdbcdd44be3f78a72e0474fa8665f3bf3b67546caf34f6e93c7ba971b94df2efc8ae9a9b6f3e831a17c1dd04e07416fd54d48d9dd5ffed12e3
         | 
| 7 | 
            +
              data.tar.gz: 151036608c99015ea9494e6ec17b21cb0055e6616d34669ca54009fe7b033b72de5323a240972763d512395ed3374a4d2134865f9ff89db535b5f5ca5bd9ae01
         | 
    
        data/Gemfile.lock
    CHANGED
    
    
| @@ -0,0 +1,23 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            require_relative 'utilities'
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            module Lino
         | 
| 6 | 
            +
              module Appliables
         | 
| 7 | 
            +
                include Lino::Utilities
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                def with_appliable(appliable)
         | 
| 10 | 
            +
                  return self if missing?(appliable)
         | 
| 11 | 
            +
             | 
| 12 | 
            +
                  appliable.apply(self)
         | 
| 13 | 
            +
                end
         | 
| 14 | 
            +
             | 
| 15 | 
            +
                def with_appliables(appliables)
         | 
| 16 | 
            +
                  return self if missing?(appliables)
         | 
| 17 | 
            +
             | 
| 18 | 
            +
                  appliables.inject(self) do |s, appliable|
         | 
| 19 | 
            +
                    s.with_appliable(appliable)
         | 
| 20 | 
            +
                  end
         | 
| 21 | 
            +
                end
         | 
| 22 | 
            +
              end
         | 
| 23 | 
            +
            end
         | 
| @@ -5,6 +5,7 @@ require_relative 'utilities' | |
| 5 5 | 
             
            require_relative 'command_line'
         | 
| 6 6 | 
             
            require_relative 'subcommand_builder'
         | 
| 7 7 | 
             
            require_relative 'options'
         | 
| 8 | 
            +
            require_relative 'appliables'
         | 
| 8 9 |  | 
| 9 10 | 
             
            module Lino
         | 
| 10 11 | 
             
              # rubocop:disable Metrics/ClassLength
         | 
| @@ -20,6 +21,7 @@ module Lino | |
| 20 21 |  | 
| 21 22 | 
             
                include Lino::Utilities
         | 
| 22 23 | 
             
                include Lino::Options
         | 
| 24 | 
            +
                include Lino::Appliables
         | 
| 23 25 |  | 
| 24 26 | 
             
                class << self
         | 
| 25 27 | 
             
                  def for_command(command)
         | 
    
        data/lib/lino/options.rb
    CHANGED
    
    
| @@ -3,11 +3,13 @@ | |
| 3 3 | 
             
            require 'hamster'
         | 
| 4 4 | 
             
            require_relative 'utilities'
         | 
| 5 5 | 
             
            require_relative 'options'
         | 
| 6 | 
            +
            require_relative 'appliables'
         | 
| 6 7 |  | 
| 7 8 | 
             
            module Lino
         | 
| 8 9 | 
             
              class SubcommandBuilder
         | 
| 9 10 | 
             
                include Lino::Utilities
         | 
| 10 11 | 
             
                include Lino::Options
         | 
| 12 | 
            +
                include Lino::Appliables
         | 
| 11 13 |  | 
| 12 14 | 
             
                class <<self
         | 
| 13 15 | 
             
                  def for_subcommand(subcommand)
         | 
    
        data/lib/lino/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: lino
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 2.2.0.pre. | 
| 4 | 
            +
              version: 2.2.0.pre.5
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Toby Clemson
         | 
| @@ -222,6 +222,7 @@ files: | |
| 222 222 | 
             
            - bin/console
         | 
| 223 223 | 
             
            - bin/setup
         | 
| 224 224 | 
             
            - lib/lino.rb
         | 
| 225 | 
            +
            - lib/lino/appliables.rb
         | 
| 225 226 | 
             
            - lib/lino/command_line.rb
         | 
| 226 227 | 
             
            - lib/lino/command_line_builder.rb
         | 
| 227 228 | 
             
            - lib/lino/options.rb
         |