karo 2.3.7 → 2.3.8
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/assets.rb +45 -5
- data/lib/karo/cli.rb +1 -0
- data/lib/karo/common.rb +1 -1
- data/lib/karo/templates/karo.yml +1 -0
- data/lib/karo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4af1678ba8d7e513d711d893c9036139fbb85ae9
|
4
|
+
data.tar.gz: e5695accff3d137118c7c0ec3293622dad51bb90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8f59fa373c299500c1ca622ccaeb7c4fe065e4f675ab6a746ebd5bc9197622c9a44f0d41fe2d04ba56e70cedbbeaf15cca690422b0604b324b8a442fb92e41e
|
7
|
+
data.tar.gz: 5e981778688c936dc3da4d6f71a7738055c1b8eeac5a7004f80a91675e116ab52a6ca3316e828f3db726fdf2dff53c86d7ab1ed57846e9b9a1d367a9ca97beb2
|
data/CHANGELOG.md
CHANGED
data/lib/karo/assets.rb
CHANGED
@@ -8,13 +8,33 @@ module Karo
|
|
8
8
|
include Karo::Common
|
9
9
|
|
10
10
|
desc "pull", "syncs assets from server shared/system/dragonfly/<environment> directory into local system/dragonfly/development directory"
|
11
|
+
long_desc <<-LONGDESC
|
12
|
+
You can also change assets server and local path for a given environment in the configuration file
|
13
|
+
|
14
|
+
e.g. .karo.yml
|
15
|
+
|
16
|
+
production:
|
17
|
+
|
18
|
+
--assets:
|
19
|
+
|
20
|
+
----server: /data/app/shared/assets
|
21
|
+
|
22
|
+
----local: shared/assets
|
23
|
+
LONGDESC
|
11
24
|
def pull
|
12
25
|
configuration = Config.load_configuration(options)
|
13
26
|
|
14
|
-
|
15
|
-
|
27
|
+
assets = configuration["assets"]
|
28
|
+
assets ||= {}
|
29
|
+
|
30
|
+
path_local = assets["local"]
|
31
|
+
path_local ||= "public/system/dragonfly/development"
|
32
|
+
path_local = File.expand_path(path_local)
|
33
|
+
|
34
|
+
empty_directory path_local if !File.exists?(path_local) && !options[:dryrun]
|
16
35
|
|
17
|
-
path_server
|
36
|
+
path_server = assets["server"]
|
37
|
+
path_server ||= File.join(configuration["path"], "shared/system/dragonfly/#{options[:environment]}")
|
18
38
|
|
19
39
|
host = "#{configuration["user"]}@#{configuration["host"]}"
|
20
40
|
command = "rsync -az --progress #{host}:#{path_server}/ #{path_local}/"
|
@@ -25,17 +45,37 @@ module Karo
|
|
25
45
|
end
|
26
46
|
|
27
47
|
desc "push", "syncs assets from system/dragonfly/development directory into local server shared/system/dragonfly/<environment> directory"
|
48
|
+
long_desc <<-LONGDESC
|
49
|
+
You can also change assets server and local path for a given environment in the configuration file
|
50
|
+
|
51
|
+
e.g. .karo.yml
|
52
|
+
|
53
|
+
production:
|
54
|
+
|
55
|
+
--assets:
|
56
|
+
|
57
|
+
----server: /data/app/shared/assets
|
58
|
+
|
59
|
+
----local: shared/assets
|
60
|
+
LONGDESC
|
28
61
|
def push
|
29
62
|
configuration = Config.load_configuration(options)
|
30
63
|
|
31
|
-
|
64
|
+
assets = configuration["assets"]
|
65
|
+
assets ||= {}
|
66
|
+
|
67
|
+
path_local = assets["local"]
|
68
|
+
path_local ||= "public/system/dragonfly/development"
|
69
|
+
path_local = File.expand_path(path_local)
|
70
|
+
|
32
71
|
unless File.exists?(path_local)
|
33
72
|
raise Thor::Error, "Please make sure that this local path exists? '#{path_local}'"
|
34
73
|
end
|
35
74
|
|
36
75
|
host = "#{configuration["user"]}@#{configuration["host"]}"
|
37
76
|
|
38
|
-
path_server
|
77
|
+
path_server = assets["server"]
|
78
|
+
path_server ||= File.join(configuration["path"], "shared/system/dragonfly/#{options[:environment]}")
|
39
79
|
|
40
80
|
command_1 = "ssh #{host} 'mkdir -p #{path_server}'"
|
41
81
|
command_2 = "rsync -az --progress #{path_local}/ #{host}:#{path_server}/"
|
data/lib/karo/cli.rb
CHANGED
@@ -19,6 +19,7 @@ module Karo
|
|
19
19
|
aliases: "-c", desc: "name of the file containing server configuration"
|
20
20
|
class_option :environment, aliases: "-e", desc: "server environment", default: "production"
|
21
21
|
class_option :verbose, type: :boolean, lazy_default: true, aliases: "-v", desc: "verbose"
|
22
|
+
class_option :dryrun, type: :boolean, lazy_default: true, aliases: "-d", desc: "dry-run"
|
22
23
|
|
23
24
|
desc "cache [search, remove]", "find or clears a specific or all cache from shared/cache directory on the server"
|
24
25
|
subcommand "cache", Cache
|
data/lib/karo/common.rb
CHANGED
data/lib/karo/templates/karo.yml
CHANGED
data/lib/karo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: karo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rahul Trikha
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|