twenty-cli 0.5.6 → 0.5.7
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/lib/twenty/cli/command/connect.rb +1 -1
 - data/lib/twenty/cli/command/console.rb +1 -1
 - data/lib/twenty/cli/command/disconnect.rb +1 -1
 - data/lib/twenty/cli/command/up.rb +1 -1
 - data/lib/twenty/cli/command.rb +6 -0
 - metadata +1 -2
 - data/lib/twenty/cli/command/mixin/common_option_mixin.rb +0 -15
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 39b8553e6aa621c07c81e4379940c7da72e535b26ac3c98714288ad75ad80f0e
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 2742e7429d90c5affec8e5d335773c776f9a4bfb1299b853fc97b4dd471a2b7a
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: e94e2a9446e37590d542ab101588cffd2fa8fbf31406f30f1113c72b79e23cb4f1a0d7b84680c1bb778e1210b15013fddbd20fe49e547a612150df84f8a05d8b
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 46a6643af111fbdb0dfa5c52eda52d68150948a2aa377ba0065d3ae131bf0b9c43193173e4bc1d6b8ec0a544b7bc3a34484ca143076e4932ae8cfba39a70756c
         
     | 
| 
         @@ -21,9 +21,9 @@ class Twenty::Command::Connect < Twenty::Command 
     | 
|
| 
       21 
21 
     | 
    
         
             
              private
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
       23 
23 
     | 
    
         
             
              def run_command(options)
         
     | 
| 
       24 
     | 
    
         
            -
                require "twenty/server/model"
         
     | 
| 
       25 
24 
     | 
    
         
             
                path = File.realpath(options.path ? options.path : Dir.getwd)
         
     | 
| 
       26 
25 
     | 
    
         
             
                if File.exist?(path)
         
     | 
| 
      
 26 
     | 
    
         
            +
                  require_models!
         
     | 
| 
       27 
27 
     | 
    
         
             
                  project = Twenty::Project.create(
         
     | 
| 
       28 
28 
     | 
    
         
             
                    name: File.basename(path),
         
     | 
| 
       29 
29 
     | 
    
         
             
                    path:
         
     | 
| 
         @@ -19,8 +19,8 @@ class Twenty::Command::Disconnect < Twenty::Command 
     | 
|
| 
       19 
19 
     | 
    
         
             
              private
         
     | 
| 
       20 
20 
     | 
    
         | 
| 
       21 
21 
     | 
    
         
             
              def run_command(options)
         
     | 
| 
       22 
     | 
    
         
            -
                require "twenty/server/model"
         
     | 
| 
       23 
22 
     | 
    
         
             
                path = File.realpath(options.path ? options.path : Dir.getwd)
         
     | 
| 
      
 23 
     | 
    
         
            +
                require_models!
         
     | 
| 
       24 
24 
     | 
    
         
             
                Twenty::Project
         
     | 
| 
       25 
25 
     | 
    
         
             
                  .where(path:)
         
     | 
| 
       26 
26 
     | 
    
         
             
                  .first!
         
     | 
    
        data/lib/twenty/cli/command.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: twenty-cli
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.5. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.5.7
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - '0x1eef'
         
     | 
| 
         @@ -115,7 +115,6 @@ files: 
     | 
|
| 
       115 
115 
     | 
    
         
             
            - "./lib/twenty/cli/command/hook/rescue.rb"
         
     | 
| 
       116 
116 
     | 
    
         
             
            - "./lib/twenty/cli/command/hook/sqlite_conn.rb"
         
     | 
| 
       117 
117 
     | 
    
         
             
            - "./lib/twenty/cli/command/migrate.rb"
         
     | 
| 
       118 
     | 
    
         
            -
            - "./lib/twenty/cli/command/mixin/common_option_mixin.rb"
         
     | 
| 
       119 
118 
     | 
    
         
             
            - "./lib/twenty/cli/command/option.rb"
         
     | 
| 
       120 
119 
     | 
    
         
             
            - "./lib/twenty/cli/command/option/database.rb"
         
     | 
| 
       121 
120 
     | 
    
         
             
            - "./lib/twenty/cli/command/up.rb"
         
     | 
| 
         @@ -1,15 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # frozen_string_literal: true
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            class Twenty::Command
         
     | 
| 
       4 
     | 
    
         
            -
              module CommonOptionMixin
         
     | 
| 
       5 
     | 
    
         
            -
                def self.included(mod)
         
     | 
| 
       6 
     | 
    
         
            -
                  mod.module_eval do
         
     | 
| 
       7 
     | 
    
         
            -
                    set_option "-d PATH",
         
     | 
| 
       8 
     | 
    
         
            -
                               "--database PATH",
         
     | 
| 
       9 
     | 
    
         
            -
                               "The path to an alternate SQLite database",
         
     | 
| 
       10 
     | 
    
         
            -
                               as: String,
         
     | 
| 
       11 
     | 
    
         
            -
                               default: nil
         
     | 
| 
       12 
     | 
    
         
            -
                  end
         
     | 
| 
       13 
     | 
    
         
            -
                end
         
     | 
| 
       14 
     | 
    
         
            -
              end
         
     | 
| 
       15 
     | 
    
         
            -
            end
         
     |