twenty-cli 0.5.6 → 0.5.8
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 +2 -1
- data/lib/twenty/cli/command/migrate.rb +2 -1
- data/lib/twenty/cli/command/up.rb +1 -1
- data/lib/twenty/cli/command.rb +6 -0
- metadata +4 -4
- 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: ee53c65c70b4b86e7a704b6a0f5646a76caa2eaa75aed898b5aa3f03f3a12b76
|
4
|
+
data.tar.gz: 6b6f92b83d5a2537300f9b57ab6c1e710921e2d999bc3e9ba2cc7efe007c80cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08da7934a95bf1d166965508de4adaa636af05f0704aebe67b6f9781fbdc7b9eb3174a87f84c41d9fb87a887840a629e1df5f6cea8e2819947ac552689c49c1a'
|
7
|
+
data.tar.gz: 63ee6b5690bdb01f09e5b50f67bca26bf0b88e4136cef5024ca0a5b916225cdb5eb14b71d6b106bf9514f4747d8541896e98e574ab0f01eeaae860cb1c0d3496
|
@@ -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:
|
@@ -7,6 +7,7 @@ class Twenty::Command::Disconnect < Twenty::Command
|
|
7
7
|
|
8
8
|
##
|
9
9
|
# Hooks
|
10
|
+
# Rescue -> SQLiteConn -> RequireMigration -> command
|
10
11
|
prepend Hook::RequireMigration
|
11
12
|
prepend Hook::SQLiteConn
|
12
13
|
prepend Hook::Rescue
|
@@ -19,8 +20,8 @@ class Twenty::Command::Disconnect < Twenty::Command
|
|
19
20
|
private
|
20
21
|
|
21
22
|
def run_command(options)
|
22
|
-
require "twenty/server/model"
|
23
23
|
path = File.realpath(options.path ? options.path : Dir.getwd)
|
24
|
+
require_models!
|
24
25
|
Twenty::Project
|
25
26
|
.where(path:)
|
26
27
|
.first!
|
data/lib/twenty/cli/command.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- '0x1eef'
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04
|
11
|
+
date: 2024-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cmd.rb
|
@@ -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"
|
@@ -130,7 +129,8 @@ files:
|
|
130
129
|
homepage: https://github.com/0x1eef/twenty#readme
|
131
130
|
licenses:
|
132
131
|
- 0BSD
|
133
|
-
metadata:
|
132
|
+
metadata:
|
133
|
+
source_code_uri: https://github.com/0x1eef/twenty#readme
|
134
134
|
post_install_message:
|
135
135
|
rdoc_options: []
|
136
136
|
require_paths:
|
@@ -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
|