dnapi 1.1.78 → 1.1.79.ruby19
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dnapi.rb +1 -1
- data/lib/dnapi/environment.rb +1 -1
- data/lib/dnapi/struct.rb +4 -1
- data/lib/dnapi/test.rb +1 -1
- data/lib/dnapi/version.rb +1 -1
- data/spec/proxies_spec.rb +1 -1
- data/spec/stack_spec.rb +1 -0
- metadata +55 -73
- data/lib/dnapi/extensions.rb +0 -32
data/lib/dnapi.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'forwardable'
|
2
2
|
require 'extlib'
|
3
3
|
require 'json'
|
4
|
+
require 'jexp'
|
4
5
|
|
5
6
|
module DNApi
|
6
7
|
def self.build(attributes = {})
|
@@ -32,7 +33,6 @@ module DNApi
|
|
32
33
|
end
|
33
34
|
|
34
35
|
require 'dnapi/component'
|
35
|
-
require 'dnapi/extensions'
|
36
36
|
require 'dnapi/struct'
|
37
37
|
require 'dnapi/component_possessor'
|
38
38
|
require 'dnapi/recipe'
|
data/lib/dnapi/environment.rb
CHANGED
@@ -10,7 +10,7 @@ module DNApi
|
|
10
10
|
:stack_name, :name, :framework_env,
|
11
11
|
:stats_password, :ssh_username, :ssh_password,
|
12
12
|
:ssh_keys, :db_stack_name,
|
13
|
-
:monitoring, :region, :backup_bucket)
|
13
|
+
:monitoring, :region, :backup_bucket, :run_list)
|
14
14
|
|
15
15
|
include ComponentPossessor
|
16
16
|
|
data/lib/dnapi/struct.rb
CHANGED
@@ -129,7 +129,10 @@ module DNApi
|
|
129
129
|
def to_hash
|
130
130
|
data = members.zip(values)
|
131
131
|
association_data = _many.zip(_many_values) + _ones.zip(_ones_values)
|
132
|
-
(data + association_data).inject({})
|
132
|
+
hash = (data + association_data).inject({}) do |h,(k,v)|
|
133
|
+
h.update(k => v)
|
134
|
+
end #.reject {|k,v| v.nil? }
|
135
|
+
hash
|
133
136
|
end
|
134
137
|
|
135
138
|
def ==(other)
|
data/lib/dnapi/test.rb
CHANGED
data/lib/dnapi/version.rb
CHANGED
data/spec/proxies_spec.rb
CHANGED
data/spec/stack_spec.rb
CHANGED
metadata
CHANGED
@@ -1,74 +1,67 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: dnapi
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 1
|
9
|
-
- 78
|
10
|
-
version: 1.1.78
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.79.ruby19
|
5
|
+
prerelease: 7
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Engine Yard
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-07-26 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: json
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &2156364040 !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
segments:
|
30
|
-
- 0
|
31
|
-
version: "0"
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
32
22
|
type: :runtime
|
33
|
-
version_requirements: *id001
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: extlib
|
36
23
|
prerelease: false
|
37
|
-
|
24
|
+
version_requirements: *2156364040
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: extlib
|
27
|
+
requirement: &2156361680 !ruby/object:Gem::Requirement
|
38
28
|
none: false
|
39
|
-
requirements:
|
40
|
-
- -
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
|
43
|
-
segments:
|
44
|
-
- 0
|
45
|
-
version: "0"
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
46
33
|
type: :runtime
|
47
|
-
|
48
|
-
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *2156361680
|
36
|
+
- !ruby/object:Gem::Dependency
|
49
37
|
name: sexp_processor
|
38
|
+
requirement: &2156360180 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :runtime
|
50
45
|
prerelease: false
|
51
|
-
|
46
|
+
version_requirements: *2156360180
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: jexp
|
49
|
+
requirement: &2156358300 !ruby/object:Gem::Requirement
|
52
50
|
none: false
|
53
|
-
requirements:
|
54
|
-
- -
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
|
57
|
-
segments:
|
58
|
-
- 0
|
59
|
-
version: "0"
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.1.1
|
60
55
|
type: :runtime
|
61
|
-
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *2156358300
|
62
58
|
description: API for chef DNA.
|
63
|
-
email:
|
59
|
+
email:
|
64
60
|
- gems@engineyard.com
|
65
61
|
executables: []
|
66
|
-
|
67
62
|
extensions: []
|
68
|
-
|
69
63
|
extra_rdoc_files: []
|
70
|
-
|
71
|
-
files:
|
64
|
+
files:
|
72
65
|
- lib/dnapi/app.rb
|
73
66
|
- lib/dnapi/component.rb
|
74
67
|
- lib/dnapi/component_possessor.rb
|
@@ -92,7 +85,6 @@ files:
|
|
92
85
|
- lib/dnapi/db_stack.rb
|
93
86
|
- lib/dnapi/ebuild_dep.rb
|
94
87
|
- lib/dnapi/environment.rb
|
95
|
-
- lib/dnapi/extensions.rb
|
96
88
|
- lib/dnapi/gem_dep.rb
|
97
89
|
- lib/dnapi/instance.rb
|
98
90
|
- lib/dnapi/monitoring.rb
|
@@ -126,40 +118,29 @@ files:
|
|
126
118
|
- spec/struct_spec.rb
|
127
119
|
homepage: http://github.com/engineyard/dnapi
|
128
120
|
licenses: []
|
129
|
-
|
130
121
|
post_install_message:
|
131
122
|
rdoc_options: []
|
132
|
-
|
133
|
-
require_paths:
|
123
|
+
require_paths:
|
134
124
|
- lib
|
135
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
125
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
136
126
|
none: false
|
137
|
-
requirements:
|
138
|
-
- -
|
139
|
-
- !ruby/object:Gem::Version
|
140
|
-
|
141
|
-
|
142
|
-
- 0
|
143
|
-
version: "0"
|
144
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - ! '>='
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
131
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
132
|
none: false
|
146
|
-
requirements:
|
147
|
-
- -
|
148
|
-
- !ruby/object:Gem::Version
|
149
|
-
hash: 25
|
150
|
-
segments:
|
151
|
-
- 1
|
152
|
-
- 3
|
153
|
-
- 1
|
133
|
+
requirements:
|
134
|
+
- - ! '>'
|
135
|
+
- !ruby/object:Gem::Version
|
154
136
|
version: 1.3.1
|
155
137
|
requirements: []
|
156
|
-
|
157
138
|
rubyforge_project:
|
158
139
|
rubygems_version: 1.8.10
|
159
140
|
signing_key:
|
160
141
|
specification_version: 3
|
161
142
|
summary: API for chef DNA.
|
162
|
-
test_files:
|
143
|
+
test_files:
|
163
144
|
- spec/app_spec.rb
|
164
145
|
- spec/component_spec.rb
|
165
146
|
- spec/components/addons_spec.rb
|
@@ -178,3 +159,4 @@ test_files:
|
|
178
159
|
- spec/spec_helper.rb
|
179
160
|
- spec/stack_spec.rb
|
180
161
|
- spec/struct_spec.rb
|
162
|
+
has_rdoc:
|
data/lib/dnapi/extensions.rb
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
class Array
|
2
|
-
def to_jexp
|
3
|
-
map {|v| JSON.jexp(v) }
|
4
|
-
end
|
5
|
-
end
|
6
|
-
|
7
|
-
class Hash
|
8
|
-
def to_jexp
|
9
|
-
inject(self::class.new) do |h, (key, value)|
|
10
|
-
h.update key.to_s => JSON.jexp(value)
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
class Integer
|
16
|
-
def to_jexp() self end
|
17
|
-
end
|
18
|
-
|
19
|
-
module JSON
|
20
|
-
def self.jexp(*a)
|
21
|
-
if a.size == 1 && RUBY_VERSION >= "1.9.0"
|
22
|
-
o = a.first
|
23
|
-
o.respond_to?(:to_jexp) ? o.to_jexp : JSON.parse(JSON.dump([o])).first
|
24
|
-
else
|
25
|
-
return *a.map{|o| o.respond_to?(:to_jexp) ? o.to_jexp : JSON.parse(JSON.dump([o])).first}
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
class String
|
31
|
-
def to_jexp() self end
|
32
|
-
end
|