karo 1.1.0 → 1.2.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 +10 -0
- data/lib/karo/assets.rb +4 -0
- data/lib/karo/cache.rb +4 -0
- data/lib/karo/cli.rb +13 -1
- data/lib/karo/db.rb +5 -1
- data/lib/karo/templates/karo.yml +8 -0
- data/lib/karo/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6412b96a09152c57b747a5b598281a960341177a
|
4
|
+
data.tar.gz: 86bf8989096685da28d41543f8c55525dee8720c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0159dbf955624062988815439ec8e210d72ccd53b080dc6b3d1fd91d514c69a89e9c4ef91d2df59a0854f9cc68a21272b791d689a9f495ed11d886a3481cf187
|
7
|
+
data.tar.gz: 02f5f646e498ddc6539d18dffd7883d83c9c58742e3617a7398dc7e637e70b944f89bca3755e01da595f6f004cf91e16db38b963f79737fa7bc9ac2e375c7e68
|
data/CHANGELOG.md
CHANGED
data/lib/karo/assets.rb
CHANGED
@@ -7,6 +7,10 @@ module Karo
|
|
7
7
|
|
8
8
|
include Thor::Actions
|
9
9
|
|
10
|
+
class_option :config_file, type: :string, default: Config.default_file_name,
|
11
|
+
aliases: "-c", desc: "name of the file containing server configuration"
|
12
|
+
class_option :environment, aliases: "-e", desc: "server environment", default: "production"
|
13
|
+
|
10
14
|
desc "pull", "syncs assets from server shared/system/dragonfly/<environment> directory into local system/dragonfly/development directory"
|
11
15
|
def pull
|
12
16
|
configuration = Config.load_configuration(options)
|
data/lib/karo/cache.rb
CHANGED
@@ -5,6 +5,10 @@ module Karo
|
|
5
5
|
|
6
6
|
class Cache < Thor
|
7
7
|
|
8
|
+
class_option :config_file, type: :string, default: Config.default_file_name,
|
9
|
+
aliases: "-c", desc: "name of the file containing server configuration"
|
10
|
+
class_option :environment, aliases: "-e", desc: "server environment", default: "production"
|
11
|
+
|
8
12
|
desc "search", "searches for any matching cache files from the shared/cache directory"
|
9
13
|
def search(name="")
|
10
14
|
configuration = Config.load_configuration(options)
|
data/lib/karo/cli.rb
CHANGED
@@ -10,6 +10,8 @@ module Karo
|
|
10
10
|
|
11
11
|
class CLI < Thor
|
12
12
|
|
13
|
+
include Thor::Actions
|
14
|
+
|
13
15
|
class_option :config_file, type: :string, default: Config.default_file_name,
|
14
16
|
aliases: "-c", desc: "name of the file containing server configuration"
|
15
17
|
class_option :environment, aliases: "-e", desc: "server environment", default: "production"
|
@@ -37,7 +39,7 @@ module Karo
|
|
37
39
|
subcommand "assets", Assets
|
38
40
|
|
39
41
|
desc "db [pull, push]", "syncs MySQL database between server and localhost"
|
40
|
-
subcommand "db",
|
42
|
+
subcommand "db", Db
|
41
43
|
|
42
44
|
desc "config", "displays server configuration stored in a config file"
|
43
45
|
def config
|
@@ -46,6 +48,16 @@ module Karo
|
|
46
48
|
ap configuration if configuration
|
47
49
|
end
|
48
50
|
|
51
|
+
def self.source_root
|
52
|
+
File.dirname(__FILE__)
|
53
|
+
end
|
54
|
+
|
55
|
+
desc "generate", "generate a sample configuration file to be used by karo [default is .karo.yml]"
|
56
|
+
def generate
|
57
|
+
config_file = File.expand_path(options[:config_file])
|
58
|
+
copy_file 'templates/karo.yml', config_file
|
59
|
+
end
|
60
|
+
|
49
61
|
desc "ssh", "open ssh console for a given server environment"
|
50
62
|
def ssh
|
51
63
|
configuration = Config.load_configuration(options)
|
data/lib/karo/db.rb
CHANGED
@@ -6,10 +6,14 @@ require 'ap'
|
|
6
6
|
|
7
7
|
module Karo
|
8
8
|
|
9
|
-
class
|
9
|
+
class Db < Thor
|
10
10
|
|
11
11
|
include Thor::Actions
|
12
12
|
|
13
|
+
class_option :config_file, type: :string, default: Config.default_file_name,
|
14
|
+
aliases: "-c", desc: "name of the file containing server configuration"
|
15
|
+
class_option :environment, aliases: "-e", desc: "server environment", default: "production"
|
16
|
+
|
13
17
|
method_option :migrate, aliases: "-m", desc: "run migrations after sync", default: true
|
14
18
|
desc "pull", "syncs MySQL database from server to localhost"
|
15
19
|
def pull
|
data/lib/karo/version.rb
CHANGED
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
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rahul Trikha
|
@@ -149,6 +149,7 @@ files:
|
|
149
149
|
- lib/karo/cli.rb
|
150
150
|
- lib/karo/config.rb
|
151
151
|
- lib/karo/db.rb
|
152
|
+
- lib/karo/templates/karo.yml
|
152
153
|
- lib/karo/version.rb
|
153
154
|
- test/tc_something.rb
|
154
155
|
homepage: http://rahult.github.io/karo/
|