bolt 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bolt might be problematic. Click here for more details.

data/lib/bolt/node_uri.rb DELETED
@@ -1,42 +0,0 @@
1
- require 'addressable/uri'
2
-
3
- module Bolt
4
- class NodeURI
5
- def initialize(string, transport = 'ssh')
6
- @uri = parse(string, transport)
7
- end
8
-
9
- def parse(string, transport)
10
- if string =~ %r{^[^:]+://}
11
- Addressable::URI.parse(string)
12
- else
13
- Addressable::URI.parse("#{transport}://#{string}")
14
- end
15
- end
16
- private :parse
17
-
18
- def hostname
19
- @uri.hostname
20
- end
21
-
22
- def port
23
- @uri.port
24
- end
25
-
26
- def user
27
- Addressable::URI.unencode_component(
28
- @uri.user
29
- )
30
- end
31
-
32
- def password
33
- Addressable::URI.unencode_component(
34
- @uri.password
35
- )
36
- end
37
-
38
- def scheme
39
- @uri.scheme
40
- end
41
- end
42
- end
@@ -1,30 +0,0 @@
1
- Puppet::DataTypes.create_type('ExecutionResult') do
2
- interface <<-PUPPET
3
- attributes => {
4
- 'result_hash' => Hash[
5
- String[1],
6
- Struct[
7
- Optional[value] => Data,
8
- Optional[error] => Struct[
9
- msg => String[1],
10
- Optional[kind] => String[1],
11
- Optional[issue_code] => String[1],
12
- Optional[details] => Hash[String[1], Data]]]]
13
- },
14
- functions => {
15
- count => Callable[[], Integer],
16
- empty => Callable[[], Boolean],
17
- error_nodes => Callable[[], ExecutionResult],
18
- names => Callable[[], Array[String[1]]],
19
- ok => Callable[[], Boolean],
20
- ok_nodes => Callable[[], ExecutionResult],
21
- value => Callable[[String[1]], Variant[Error, Data]],
22
- values => Callable[[], Array[Variant[Error,Data]]],
23
- '[]' => Callable[[String[1]], Variant[Error, Data]]
24
- }
25
- PUPPET
26
-
27
- load_file('bolt/executionresult')
28
-
29
- implementation_class Bolt::ExecutionResult
30
- end