karo 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of karo might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/karo/cli.rb +22 -23
- data/lib/karo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23fa58c07c32002dda91d507fe5ac2d3ae300dcc
|
4
|
+
data.tar.gz: 99938fdcbd9a153ad0c7e411c6f1a7edcb34d657
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2739297d2f764b01eba6dbc6bee96de9fc115a243bda13a1c0b9678e87e2e1dd157e53c6fc136bf542eeec6983cd917f309b4cbb9d91a91aa9e8bd37dbe7f6a4
|
7
|
+
data.tar.gz: 5818291c051d7df77d4b37c558ab40ff3fd8f1b468ab60e7151d19e50f2fb67bdd859d47349f21d6c665b121d67626d24a9497925d6197ba350d95045962f65e
|
data/CHANGELOG.md
CHANGED
data/lib/karo/cli.rb
CHANGED
@@ -35,7 +35,7 @@ module Karo
|
|
35
35
|
desc "cache [search, remove]", "find or clears a specific or all cache from shared/cache directory on the server"
|
36
36
|
subcommand "cache", Cache
|
37
37
|
|
38
|
-
desc "assets [pull, push]", "syncs assets between server shared/system/dragonfly/<environment> directory and local system/dragonfly/development directory"
|
38
|
+
desc "assets [pull, push]", "syncs dragonfly assets between server shared/system/dragonfly/<environment> directory and local system/dragonfly/development directory"
|
39
39
|
subcommand "assets", Assets
|
40
40
|
|
41
41
|
desc "db [pull, push]", "syncs MySQL database between server and localhost"
|
@@ -58,26 +58,6 @@ module Karo
|
|
58
58
|
copy_file 'templates/karo.yml', config_file
|
59
59
|
end
|
60
60
|
|
61
|
-
desc "ssh", "open ssh console for a given server environment"
|
62
|
-
def ssh
|
63
|
-
configuration = Config.load_configuration(options)
|
64
|
-
|
65
|
-
path = File.join(configuration["path"], "current")
|
66
|
-
ssh = "ssh #{configuration["user"]}@#{configuration["host"]} -t"
|
67
|
-
cmd = "cd #{path} && $SHELL"
|
68
|
-
system "#{ssh} '#{cmd}'"
|
69
|
-
end
|
70
|
-
|
71
|
-
desc "console", "open rails console for a given server environment"
|
72
|
-
def console
|
73
|
-
configuration = Config.load_configuration(options)
|
74
|
-
|
75
|
-
path = File.join(configuration["path"], "current")
|
76
|
-
ssh = "ssh #{configuration["user"]}@#{configuration["host"]} -t"
|
77
|
-
cmd = "cd #{path} && bundle exec rails console #{options[:environment]}"
|
78
|
-
system "#{ssh} '#{cmd}'"
|
79
|
-
end
|
80
|
-
|
81
61
|
desc "command [COMMAND]", "run any command within a given server environment"
|
82
62
|
method_option :tty, aliases: "-t", desc: "force pseudo-tty allocation",
|
83
63
|
type: :boolean, default: true
|
@@ -154,12 +134,31 @@ module Karo
|
|
154
134
|
end
|
155
135
|
|
156
136
|
desc "top", "run top command on a given server environment"
|
157
|
-
method_option :tty, aliases: "-t", desc: "force pseudo-tty allocation",
|
158
|
-
type: :boolean, default: true
|
159
137
|
def top
|
160
138
|
invoke :command, ["top"]
|
161
139
|
end
|
162
140
|
|
141
|
+
desc "ssh", "open ssh console for a given server environment"
|
142
|
+
def ssh
|
143
|
+
configuration = Config.load_configuration(options)
|
144
|
+
|
145
|
+
path = File.join(configuration["path"], "current")
|
146
|
+
cmd = "cd #{path}; export RAILS_ENV=#{options[:environment]}; \
|
147
|
+
export RACK_ENV=#{options[:environment]}; $SHELL"
|
148
|
+
|
149
|
+
invoke :command, [cmd]
|
150
|
+
end
|
151
|
+
|
152
|
+
desc "console", "open rails console for a given server environment"
|
153
|
+
def console
|
154
|
+
configuration = Config.load_configuration(options)
|
155
|
+
|
156
|
+
path = File.join(configuration["path"], "current")
|
157
|
+
cmd = "cd #{path} && bundle exec rails console #{options[:environment]}"
|
158
|
+
|
159
|
+
invoke :command, [cmd]
|
160
|
+
end
|
161
|
+
|
163
162
|
desc "version", "displays karo's current version"
|
164
163
|
def version
|
165
164
|
say Karo::VERSION
|
data/lib/karo/version.rb
CHANGED