dnapi 1.1.84 → 1.1.85.metadata

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,13 @@
1
+ require 'dnapi/components/metadata'
2
+
3
+ module DNApi
4
+ module Components
5
+ class AppMetadata < Metadata
6
+ include Component
7
+
8
+ key :app_metadata
9
+
10
+ belongs_to App
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require 'dnapi/components/metadata'
2
+
3
+ module DNApi
4
+ module Components
5
+ class EnvironmentMetadata < Metadata
6
+ include Component
7
+
8
+ key :environment_metadata
9
+
10
+ belongs_to Environment
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,22 @@
1
+ require 'ostruct'
2
+
3
+ module DNApi
4
+ module Components
5
+ class Metadata < OpenStruct
6
+ include Component
7
+
8
+ desc "Adds arbitrary data to the DNA. DO UNDER NO CIRCUMSTANCE ADD ANY VALIDATION TO THIS!"
9
+
10
+ def [](key)
11
+ self.send(key)
12
+ end
13
+
14
+
15
+ def to_json(*args)
16
+ vals = @table.clone
17
+ vals.delete :parent
18
+ JSON.dump(({:key => key}).merge(vals))
19
+ end
20
+ end
21
+ end
22
+ end
data/lib/dnapi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module DNApi
2
- VERSION = '1.1.84'
2
+ VERSION = '1.1.85.metadata'
3
3
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dnapi
3
3
  version: !ruby/object:Gem::Version
4
- hash: 187
5
- prerelease:
4
+ hash: 329158785
5
+ prerelease: 7
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 84
10
- version: 1.1.84
9
+ - 85
10
+ - metadata
11
+ version: 1.1.85.metadata
11
12
  platform: ruby
12
13
  authors:
13
14
  - Engine Yard
@@ -15,7 +16,8 @@ autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2011-07-26 00:00:00 Z
19
+ date: 2011-07-26 00:00:00 -07:00
20
+ default_executable:
19
21
  dependencies:
20
22
  - !ruby/object:Gem::Dependency
21
23
  name: json
@@ -74,9 +76,12 @@ files:
74
76
  - lib/dnapi/component_possessor.rb
75
77
  - lib/dnapi/components/addons.rb
76
78
  - lib/dnapi/components/apache.rb
79
+ - lib/dnapi/components/app_metadata.rb
77
80
  - lib/dnapi/components/cloudkick.rb
78
81
  - lib/dnapi/components/encrypted_backup.rb
82
+ - lib/dnapi/components/environment_metadata.rb
79
83
  - lib/dnapi/components/exim.rb
84
+ - lib/dnapi/components/metadata.rb
80
85
  - lib/dnapi/components/monitor.rb
81
86
  - lib/dnapi/components/nagios.rb
82
87
  - lib/dnapi/components/newrelic.rb
@@ -125,6 +130,7 @@ files:
125
130
  - spec/spec_helper.rb
126
131
  - spec/stack_spec.rb
127
132
  - spec/struct_spec.rb
133
+ has_rdoc: true
128
134
  homepage: http://github.com/engineyard/dnapi
129
135
  licenses: []
130
136
 
@@ -156,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
162
  requirements: []
157
163
 
158
164
  rubyforge_project:
159
- rubygems_version: 1.8.6
165
+ rubygems_version: 1.5.2
160
166
  signing_key:
161
167
  specification_version: 3
162
168
  summary: API for chef DNA.