manifests-vmc-plugin 0.4.19 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -117,11 +117,11 @@ module VMCManifests
117
117
  # returns the names that were not paths
118
118
  def specific_apps_or_all(input = nil, use_name = true, &blk)
119
119
  names_or_paths =
120
- if input.given?(:apps)
120
+ if input.has?(:apps)
121
121
  # names may be given but be [], which will still cause
122
- # interaction, so use #given instead of #[] here
123
- input.given(:apps)
124
- elsif input.given?(:app)
122
+ # interaction, so use #direct instead of #[] here
123
+ input.direct(:apps)
124
+ elsif input.has?(:app)
125
125
  [input[:app]]
126
126
  else
127
127
  []
@@ -22,7 +22,7 @@ class Manifests < VMC::App::Base
22
22
  next cmd.call if input[:all]
23
23
 
24
24
  unless manifest
25
- if optional_name && !input.given?(:app)
25
+ if optional_name && !input.has?(:app)
26
26
  no_apps
27
27
  else
28
28
  next cmd.call
@@ -89,7 +89,7 @@ class Manifests < VMC::App::Base
89
89
 
90
90
  around(:push) do |push, input|
91
91
  particular =
92
- if input.given?(:name)
92
+ if input.has?(:name)
93
93
  path = File.expand_path(input[:name])
94
94
  find_by = File.exists?(path) ? path : input[:name]
95
95
 
@@ -1,3 +1,3 @@
1
1
  module VMCManifests
2
- VERSION = "0.4.19".freeze
2
+ VERSION = "0.5.0".freeze
3
3
  end
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
  require 'manifests-vmc-plugin'
3
3
 
4
- require 'cfoundry/spec_helper'
4
+ require 'cfoundry/test_support'
5
5
 
6
6
  describe VMCManifests do
7
7
  let(:cmd) do
@@ -28,32 +28,30 @@ describe VMCManifests do
28
28
 
29
29
  describe '#create_manifest_for' do
30
30
  let(:app) {
31
- FactoryGirl.build(
32
- :app,
33
- :framework => FactoryGirl.build(:framework),
34
- :runtime => FactoryGirl.build(:runtime),
31
+ fake :app,
32
+ :framework => fake(:framework),
33
+ :runtime => fake(:runtime),
35
34
  :memory => 2048,
36
35
  :instances => 2,
37
36
  :command => "ruby main.rb",
38
37
  :routes => [
39
- FactoryGirl.build(
40
- :route,
41
- :host => "some-app-name",
42
- :domain => FactoryGirl.build(:domain, :name => target_base))
38
+ fake(:route,
39
+ :host => "some-app-name",
40
+ :domain => fake(:domain, :name => target_base))
43
41
  ],
44
42
  :service_bindings => [
45
- FactoryGirl.build(
43
+ fake(
46
44
  :service_binding,
47
45
  :service_instance =>
48
- FactoryGirl.build(
46
+ fake(
49
47
  :service_instance,
50
48
  :name => "service-1",
51
49
  :service_plan =>
52
- FactoryGirl.build(
50
+ fake(
53
51
  :service_plan,
54
52
  :name => "P200",
55
- :service => FactoryGirl.build(:service))))
56
- ])
53
+ :service => fake(:service))))
54
+ ]
57
55
  }
58
56
 
59
57
  subject { cmd.create_manifest_for(app, "some-path") }
@@ -95,12 +93,11 @@ describe VMCManifests do
95
93
 
96
94
  context 'when there is no url' do
97
95
  let(:app) {
98
- FactoryGirl.build(
99
- :app,
100
- :framework => FactoryGirl.build(:framework),
101
- :runtime => FactoryGirl.build(:runtime),
96
+ fake :app,
97
+ :framework => fake(:framework),
98
+ :runtime => fake(:runtime),
102
99
  :memory => 2048,
103
- :instances => 2)
100
+ :instances => 2
104
101
  }
105
102
 
106
103
  its(["url"]) { should eq "none" }
@@ -108,12 +105,11 @@ describe VMCManifests do
108
105
 
109
106
  context 'when there is no command' do
110
107
  let(:app) {
111
- FactoryGirl.build(
112
- :app,
113
- :framework => FactoryGirl.build(:framework),
114
- :runtime => FactoryGirl.build(:runtime),
108
+ fake :app,
109
+ :framework => fake(:framework),
110
+ :runtime => fake(:runtime),
115
111
  :memory => 2048,
116
- :instances => 2)
112
+ :instances => 2
117
113
  }
118
114
 
119
115
  it { should_not include "command" }
@@ -121,12 +117,11 @@ describe VMCManifests do
121
117
 
122
118
  context 'when there are no service bindings' do
123
119
  let(:app) {
124
- FactoryGirl.build(
125
- :app,
126
- :framework => FactoryGirl.build(:framework),
127
- :runtime => FactoryGirl.build(:runtime),
120
+ fake :app,
121
+ :framework => fake(:framework),
122
+ :runtime => fake(:runtime),
128
123
  :memory => 2048,
129
- :instances => 2)
124
+ :instances => 2
130
125
  }
131
126
 
132
127
  it { should_not include "services" }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: manifests-vmc-plugin
3
3
  version: !ruby/object:Gem::Version
4
- hash: 41
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 4
9
- - 19
10
- version: 0.4.19
8
+ - 5
9
+ - 0
10
+ version: 0.5.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alex Suraci
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-12-15 00:00:00 -08:00
19
- default_executable:
18
+ date: 2013-01-15 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: cfoundry
@@ -34,26 +33,10 @@ dependencies:
34
33
  version: 0.4.0
35
34
  type: :runtime
36
35
  version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: vmc
39
- prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- hash: 1
46
- segments:
47
- - 0
48
- - 4
49
- - 7
50
- version: 0.4.7
51
- type: :development
52
- version_requirements: *id002
53
36
  - !ruby/object:Gem::Dependency
54
37
  name: rake
55
38
  prerelease: false
56
- requirement: &id003 !ruby/object:Gem::Requirement
39
+ requirement: &id002 !ruby/object:Gem::Requirement
57
40
  none: false
58
41
  requirements:
59
42
  - - ~>
@@ -64,11 +47,11 @@ dependencies:
64
47
  - 9
65
48
  version: "0.9"
66
49
  type: :development
67
- version_requirements: *id003
50
+ version_requirements: *id002
68
51
  - !ruby/object:Gem::Dependency
69
52
  name: rspec
70
53
  prerelease: false
71
- requirement: &id004 !ruby/object:Gem::Requirement
54
+ requirement: &id003 !ruby/object:Gem::Requirement
72
55
  none: false
73
56
  requirements:
74
57
  - - ~>
@@ -79,26 +62,11 @@ dependencies:
79
62
  - 11
80
63
  version: "2.11"
81
64
  type: :development
82
- version_requirements: *id004
83
- - !ruby/object:Gem::Dependency
84
- name: simplecov
85
- prerelease: false
86
- requirement: &id005 !ruby/object:Gem::Requirement
87
- none: false
88
- requirements:
89
- - - ~>
90
- - !ruby/object:Gem::Version
91
- hash: 7
92
- segments:
93
- - 0
94
- - 6
95
- version: "0.6"
96
- type: :development
97
- version_requirements: *id005
65
+ version_requirements: *id003
98
66
  - !ruby/object:Gem::Dependency
99
67
  name: webmock
100
68
  prerelease: false
101
- requirement: &id006 !ruby/object:Gem::Requirement
69
+ requirement: &id004 !ruby/object:Gem::Requirement
102
70
  none: false
103
71
  requirements:
104
72
  - - ~>
@@ -109,11 +77,11 @@ dependencies:
109
77
  - 9
110
78
  version: "1.9"
111
79
  type: :development
112
- version_requirements: *id006
80
+ version_requirements: *id004
113
81
  - !ruby/object:Gem::Dependency
114
82
  name: rr
115
83
  prerelease: false
116
- requirement: &id007 !ruby/object:Gem::Requirement
84
+ requirement: &id005 !ruby/object:Gem::Requirement
117
85
  none: false
118
86
  requirements:
119
87
  - - ~>
@@ -124,22 +92,7 @@ dependencies:
124
92
  - 0
125
93
  version: "1.0"
126
94
  type: :development
127
- version_requirements: *id007
128
- - !ruby/object:Gem::Dependency
129
- name: factory_girl
130
- prerelease: false
131
- requirement: &id008 !ruby/object:Gem::Requirement
132
- none: false
133
- requirements:
134
- - - ~>
135
- - !ruby/object:Gem::Version
136
- hash: 15
137
- segments:
138
- - 2
139
- - 6
140
- version: "2.6"
141
- type: :development
142
- version_requirements: *id008
95
+ version_requirements: *id005
143
96
  description:
144
97
  email:
145
98
  - asuraci@vmware.com
@@ -151,18 +104,17 @@ extra_rdoc_files: []
151
104
 
152
105
  files:
153
106
  - Rakefile
154
- - lib/manifests-vmc-plugin/version.rb
155
107
  - lib/manifests-vmc-plugin/errors.rb
156
- - lib/manifests-vmc-plugin/plugin.rb
157
- - lib/manifests-vmc-plugin/loader.rb
108
+ - lib/manifests-vmc-plugin/loader/builder.rb
158
109
  - lib/manifests-vmc-plugin/loader/normalizer.rb
159
110
  - lib/manifests-vmc-plugin/loader/resolver.rb
160
- - lib/manifests-vmc-plugin/loader/builder.rb
111
+ - lib/manifests-vmc-plugin/loader.rb
112
+ - lib/manifests-vmc-plugin/plugin.rb
113
+ - lib/manifests-vmc-plugin/version.rb
161
114
  - lib/manifests-vmc-plugin.rb
162
- - spec/spec_helper.rb
163
- - spec/manifests-vmc-plugin_spec.rb
164
115
  - spec/loader/normalizer_spec.rb
165
- has_rdoc: true
116
+ - spec/manifests-vmc-plugin_spec.rb
117
+ - spec/spec_helper.rb
166
118
  homepage: http://cloudfoundry.com/
167
119
  licenses: []
168
120
 
@@ -192,11 +144,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
144
  requirements: []
193
145
 
194
146
  rubyforge_project: manifests-vmc-plugin
195
- rubygems_version: 1.6.2
147
+ rubygems_version: 1.8.24
196
148
  signing_key:
197
149
  specification_version: 3
198
150
  summary: Cloud Foundry automation via manifest documents.
199
151
  test_files:
200
- - spec/spec_helper.rb
201
- - spec/manifests-vmc-plugin_spec.rb
202
152
  - spec/loader/normalizer_spec.rb
153
+ - spec/manifests-vmc-plugin_spec.rb
154
+ - spec/spec_helper.rb