ya_queen 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ya_queen/base.rb +2 -1
- data/lib/ya_queen/config.rb +4 -1
- data/lib/ya_queen/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: fe6d7d2254e5d9eb31f8a8a00b74c418574c5281
|
4
|
+
data.tar.gz: 82bb000982c583127e1e5e389e1c673045001c80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10fccdae72f0b4d2e6a52fd074078a0d068f0e574759ccd22c97b19ab0dfdf03b727d95d2c750c57d866219fafa5ebba446b09943a34a3f9faef1e1cf370ed1c
|
7
|
+
data.tar.gz: 0992b9f3aa18fe2a144ae5c30e20c20f0837153f342d48a53db486625670850dcbb2d612e5cded689eac210640caa6aa99dff798bce7e68a6a5af0f8e012297f
|
data/lib/ya_queen/base.rb
CHANGED
@@ -3,13 +3,14 @@ require 'ya_queen'
|
|
3
3
|
|
4
4
|
module YaQueen
|
5
5
|
class Base
|
6
|
-
attr_reader :context, :name, :config, :root, :servers
|
6
|
+
attr_reader :context, :name, :config, :root, :servers, :root_dir
|
7
7
|
def initialize(context, name, configs)
|
8
8
|
raise ArgumentError, "name must be given" if name.nil? || name.empty? || (name =~ /\A\@\s*\Z/)
|
9
9
|
@context = context
|
10
10
|
@name = name
|
11
11
|
@root = configs
|
12
12
|
@config = configs[name.to_sym] || configs[name.to_s]
|
13
|
+
@root_dir = @config[:root_dir]
|
13
14
|
@servers = @config["servers"] || {}
|
14
15
|
if s = @config["server"]
|
15
16
|
@servers[s] = {}
|
data/lib/ya_queen/config.rb
CHANGED
@@ -2,13 +2,16 @@ require 'ya_queen'
|
|
2
2
|
|
3
3
|
module YaQueen
|
4
4
|
class Config
|
5
|
+
attr_accessor :root_dir
|
6
|
+
|
5
7
|
def initialize(context, path)
|
6
8
|
@configs = YAML.load_file(path)
|
7
9
|
@context = context
|
8
10
|
end
|
9
11
|
|
10
12
|
def define_server_tasks(name, options = {})
|
11
|
-
config = @configs[name]
|
13
|
+
config = @configs[name.to_sym] || @configs[name.to_s]
|
14
|
+
config[:root_dir] = self.root_dir
|
12
15
|
klass = options[:class] || Base
|
13
16
|
t = klass.new(@context, name, @configs)
|
14
17
|
yield(t, config) if block_given?
|
data/lib/ya_queen/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ya_queen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- akima
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|