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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 742fafe45e1d1395f8f579a88b3fb4c537481c91
4
- data.tar.gz: c85269a286f75601dfeb54083bc2bad8319b8a2a
3
+ metadata.gz: 23fa58c07c32002dda91d507fe5ac2d3ae300dcc
4
+ data.tar.gz: 99938fdcbd9a153ad0c7e411c6f1a7edcb34d657
5
5
  SHA512:
6
- metadata.gz: 90bddb90a979c4a9cf146197f04c62d8839f1f1c73e3e89cc2afc776ad10d3820349fdbdd4ae32a76c927fe786b922c7f521598ede759234972be9c25955c4a2
7
- data.tar.gz: 46b8df075a2839bd684d6879aa7c5244a1cb1715d07c3e6cae22c6fc68f958b7d3fc2dd74a3f95bc2d17e4611b720d4a38ed661744668263dfda30a625b5490e
6
+ metadata.gz: 2739297d2f764b01eba6dbc6bee96de9fc115a243bda13a1c0b9678e87e2e1dd157e53c6fc136bf542eeec6983cd917f309b4cbb9d91a91aa9e8bd37dbe7f6a4
7
+ data.tar.gz: 5818291c051d7df77d4b37c558ab40ff3fd8f1b468ab60e7151d19e50f2fb67bdd859d47349f21d6c665b121d67626d24a9497925d6197ba350d95045962f65e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.5.0
4
+
5
+ ### Bug Fixes
6
+
7
+ - Fixed ssh command to export RAILS_ENV and RACK_ENV before starting the shell
8
+ - Updated description for assets command to specify dragonfly
9
+
3
10
  ## v1.4.0
4
11
 
5
12
  ### Features
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
@@ -1,3 +1,3 @@
1
1
  module Karo
2
- VERSION = "1.4.0"
2
+ VERSION = "1.5.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: karo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rahul Trikha