taketo 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
@@ -39,6 +39,10 @@ module Taketo
39
39
  end
40
40
 
41
41
  def get_node
42
+ resolve_by_global_alias || get_node_by_path
43
+ end
44
+
45
+ def get_node_by_path
42
46
  matching_nodes = nodes.select { |n| n.path == @path }
43
47
  disambiguate(matching_nodes)
44
48
  end
@@ -1,7 +1,6 @@
1
1
  require 'spec_helper'
2
2
  require 'support/helpers/construct_spec_helper'
3
3
  require 'taketo/destination_resolver'
4
- require 'taketo/support/named_nodes_collection'
5
4
 
6
5
  include Taketo
7
6
 
@@ -163,6 +162,10 @@ describe "DestinationResolver" do
163
162
  expect(resolver(config, "").get_node).to eq(config)
164
163
  end
165
164
 
165
+ it "resolves to server by global server alias" do
166
+ expect(resolver(config, "the_alias").get_node).to eq(server1)
167
+ end
168
+
166
169
  it "raises NonExistentDestinationError when path is not correct" do
167
170
  expect { resolver(config, "i").get_node }.to raise_error(NonExistentDestinationError)
168
171
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taketo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,72 +9,72 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-12 00:00:00.000000000 Z
12
+ date: 2012-12-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
+ prerelease: false
16
17
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
21
  version: '2.11'
22
+ none: false
22
23
  type: :development
23
- prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
25
  requirements:
27
26
  - - ~>
28
27
  - !ruby/object:Gem::Version
29
28
  version: '2.11'
29
+ none: false
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: rake
32
+ prerelease: false
32
33
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
34
  requirements:
35
35
  - - ~>
36
36
  - !ruby/object:Gem::Version
37
37
  version: '0.9'
38
+ none: false
38
39
  type: :development
39
- prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
41
  requirements:
43
42
  - - ~>
44
43
  - !ruby/object:Gem::Version
45
44
  version: '0.9'
45
+ none: false
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: simplecov
48
+ prerelease: false
48
49
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
50
  requirements:
51
51
  - - ~>
52
52
  - !ruby/object:Gem::Version
53
53
  version: '0.6'
54
+ none: false
54
55
  type: :development
55
- prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
57
  requirements:
59
58
  - - ~>
60
59
  - !ruby/object:Gem::Version
61
60
  version: '0.6'
61
+ none: false
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: open4
64
+ prerelease: false
64
65
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
66
  requirements:
67
67
  - - ~>
68
68
  - !ruby/object:Gem::Version
69
69
  version: '1.3'
70
+ none: false
70
71
  type: :development
71
- prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
73
  requirements:
75
74
  - - ~>
76
75
  - !ruby/object:Gem::Version
77
76
  version: '1.3'
77
+ none: false
78
78
  description: ! " Taketo is an utility to aid quick access to often used servers
79
79
  for web-developers.\n Taketo uses a config written in ruby using light DSL.\n
80
80
  \ See http://github.com/v-yarotsky/taketo for additional instructions\n"
@@ -158,17 +158,17 @@ rdoc_options: []
158
158
  require_paths:
159
159
  - lib
160
160
  required_ruby_version: !ruby/object:Gem::Requirement
161
- none: false
162
161
  requirements:
163
162
  - - ! '>='
164
163
  - !ruby/object:Gem::Version
165
164
  version: '0'
166
- required_rubygems_version: !ruby/object:Gem::Requirement
167
165
  none: false
166
+ required_rubygems_version: !ruby/object:Gem::Requirement
168
167
  requirements:
169
168
  - - ! '>='
170
169
  - !ruby/object:Gem::Version
171
170
  version: 1.3.6
171
+ none: false
172
172
  requirements: []
173
173
  rubyforge_project:
174
174
  rubygems_version: 1.8.24