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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c3212e3ec85019a29c8bc8e13ce742f47af7e1b
4
- data.tar.gz: 3c62fb7a83eff7832b5e88c8fd56123bfdb574d4
3
+ metadata.gz: fe6d7d2254e5d9eb31f8a8a00b74c418574c5281
4
+ data.tar.gz: 82bb000982c583127e1e5e389e1c673045001c80
5
5
  SHA512:
6
- metadata.gz: 067df1d738b3a2aa1c959e374d1fec5544932badab420485a3471e97b3e31724be707493179cdd8ae8da8c69eca6aa0e88dd456bc9a8f2c96b3c546a46c658dc
7
- data.tar.gz: 35a6ae2e4d80cdc9fa6f8ac1bbd1558781b4576e15b3e937bb1b9cc4c57619761ad625f8b7b08876351f5d1d6ea760603577207ee65b3316ee061859315b8fcd
6
+ metadata.gz: 10fccdae72f0b4d2e6a52fd074078a0d068f0e574759ccd22c97b19ab0dfdf03b727d95d2c750c57d866219fafa5ebba446b09943a34a3f9faef1e1cf370ed1c
7
+ data.tar.gz: 0992b9f3aa18fe2a144ae5c30e20c20f0837153f342d48a53db486625670850dcbb2d612e5cded689eac210640caa6aa99dff798bce7e68a6a5af0f8e012297f
@@ -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] = {}
@@ -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?
@@ -1,3 +1,3 @@
1
1
  module YaQueen
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
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
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-20 00:00:00.000000000 Z
11
+ date: 2013-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler