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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1cd656f6ce56c5a2e9e66d0f0ae3459cb4b2be65
4
- data.tar.gz: 4583053b91edd2469581b6abfc0f83e415650246
3
+ metadata.gz: 6412b96a09152c57b747a5b598281a960341177a
4
+ data.tar.gz: 86bf8989096685da28d41543f8c55525dee8720c
5
5
  SHA512:
6
- metadata.gz: 6f1539cc884ea2788b7f3dcb0d666ecb92ca221edcd5762e5171b02940b25185d39d8f83d2da7661a9fba78ce921293f94abb4a2e2a5c5d2528078d82fc24eb1
7
- data.tar.gz: 0cff60cb102c528f20779405a0b4cd5e112e8638bf943c8dc755b2fd95a98a1b8e12d7fe9a64f9a9a0e8de0556ecb4d0c5bd3faf79913074bf56fea0c93c1340
6
+ metadata.gz: 0159dbf955624062988815439ec8e210d72ccd53b080dc6b3d1fd91d514c69a89e9c4ef91d2df59a0854f9cc68a21272b791d689a9f495ed11d886a3481cf187
7
+ data.tar.gz: 02f5f646e498ddc6539d18dffd7883d83c9c58742e3617a7398dc7e637e70b944f89bca3755e01da595f6f004cf91e16db38b963f79737fa7bc9ac2e375c7e68
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.2.0
4
+
5
+ ### Features
6
+
7
+ - Added a .karo.yml template generator
8
+
9
+ ### Bug Fixes
10
+
11
+ - Fixed a bug causing conflict passing global option to sub commands
12
+
3
13
  ## v1.1.0
4
14
 
5
15
  ### Features
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", 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 DB < Thor
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
@@ -0,0 +1,8 @@
1
+ production:
2
+ host: example.com
3
+ user: deploy
4
+ path: /data/app_name
5
+ staging:
6
+ host: example.com
7
+ user: deploy
8
+ path: /data/app_name
data/lib/karo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Karo
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.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.1.0
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/