engineyard-serverside 2.3.0 → 2.3.1.pre.archivefix

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. data/lib/engineyard-serverside/configuration.rb +26 -17
  2. data/lib/engineyard-serverside/dependency_manager.rb +22 -3
  3. data/lib/engineyard-serverside/dependency_manager/base.rb +5 -0
  4. data/lib/engineyard-serverside/dependency_manager/composer.rb +1 -1
  5. data/lib/engineyard-serverside/deploy.rb +11 -3
  6. data/lib/engineyard-serverside/servers.rb +10 -0
  7. data/lib/engineyard-serverside/source.rb +1 -1
  8. data/lib/engineyard-serverside/source/archive.rb +12 -6
  9. data/lib/engineyard-serverside/version.rb +1 -1
  10. data/spec/bundler_deploy_spec.rb +16 -0
  11. data/spec/fixtures/repos/bundler_disabled/Gemfile +4 -0
  12. data/spec/fixtures/repos/bundler_disabled/Gemfile.lock +12 -0
  13. data/spec/fixtures/repos/bundler_disabled/README +1 -0
  14. data/spec/fixtures/repos/bundler_disabled/config/ey.yml +2 -0
  15. data/spec/fixtures/repos/bundler_disabled/deploy/after_bundle.rb +1 -0
  16. data/spec/fixtures/repos/bundler_disabled/deploy/before_bundle.rb +1 -0
  17. data/spec/fixtures/repos/ey_yml/config/ey.yml +1 -0
  18. data/spec/fixtures/repos/npm_disabled/README +1 -0
  19. data/spec/fixtures/repos/npm_disabled/config/ey.yml +2 -0
  20. data/spec/fixtures/repos/npm_disabled/package.json +7 -0
  21. data/spec/fixtures/repos/php_composer_disabled/README +1 -0
  22. data/spec/fixtures/repos/php_composer_disabled/composer.json +5 -0
  23. data/spec/fixtures/repos/php_composer_disabled/composer.lock +462 -0
  24. data/spec/fixtures/repos/php_composer_disabled/config/ey.yml +2 -0
  25. data/spec/fixtures/repos/php_composer_disabled/public/index.php +4 -0
  26. data/spec/nodejs_deploy_spec.rb +19 -4
  27. data/spec/php_deploy_spec.rb +11 -0
  28. data/spec/source/archive_spec.rb +1 -2
  29. metadata +54 -11
  30. checksums.yaml +0 -15
  31. data/spec/fixtures/gitrepo/bar +0 -0
  32. data/spec/fixtures/gitrepo/foo +0 -0
@@ -71,27 +71,36 @@ module EY
71
71
  def_required_option :instance_roles
72
72
  def_required_option :instance_names
73
73
 
74
- def_option(:git) { fetch(:repo, nil) } # repo is deprecated
75
- def_option :archive, nil
76
- def_option :migrate, nil
77
- def_option :precompile_assets, 'detect'
74
+ def_option(:git) { fetch(:repo, nil) } # repo is deprecated
75
+ def_option :archive, nil
76
+ def_option :migrate, nil
77
+
78
+ def_option :precompile_assets, 'detect'
78
79
  def_option :precompile_assets_task, 'assets:precompile'
79
- def_option :asset_strategy, 'shifting'
80
- def_option :asset_dependencies, %w[app/assets lib/assets vendor/assets Gemfile.lock config/routes.rb config/application.rb]
81
- def_option :stack, nil
82
- def_option(:source_class) { fetch_deprecated(:strategy, :source_class, nil) } # strategy is deprecated
83
- def_option :branch, 'master'
84
- def_option :current_roles, []
85
- def_option :current_name, nil
86
- def_option :asset_roles, [:app_master, :app, :solo]
87
- def_option :copy_exclude, []
88
- def_option :bundle_options, nil
89
- def_option(:bundle_without) { %w[test development] - [framework_env] }
90
- def_option(:user) { ENV['USER'] }
91
- def_option(:group) { user }
80
+ def_option :asset_strategy, 'shifting'
81
+ def_option :asset_dependencies, %w[app/assets lib/assets vendor/assets Gemfile.lock config/routes.rb config/application.rb]
82
+ def_option :asset_roles, [:app_master, :app, :solo]
83
+
84
+ def_option :stack, nil
85
+ def_option(:source_class) { fetch_deprecated(:strategy, :source_class, nil) } # strategy is deprecated
86
+ def_option :branch, 'master'
87
+ def_option :current_roles, []
88
+ def_option :current_name, nil
89
+ def_option :copy_exclude, []
90
+
91
+ def_option :bundler, 'detect'
92
+ def_option :composer, 'detect'
93
+ def_option :npm, 'detect'
94
+ def_option :bundle_options, nil
95
+ def_option(:bundle_without) { %w[test development] - [framework_env] }
96
+
97
+ def_option(:user) { ENV['USER'] }
98
+ def_option(:group) { user }
92
99
  def_option :services_check_command, "which /usr/local/ey_resin/ruby/bin/ey-services-setup >/dev/null 2>&1"
93
100
  def_option(:services_setup_command) { "/usr/local/ey_resin/ruby/bin/ey-services-setup #{app}" }
94
101
 
102
+ def_option :restart_groups, 1
103
+
95
104
  def_boolean_option :verbose, false
96
105
  def_boolean_option :precompile_unchanged_assets, false
97
106
  def_boolean_option :ignore_database_adapter_warning, false
@@ -20,13 +20,32 @@ module EY
20
20
  # Registry pattern be damned. Hard code it and fix it when we want to
21
21
  # support dynamic loading. Right now we have no way to load dependency
22
22
  # managers dynamically, so why support it?
23
- AVAILABLE_MANAGERS = [Bundler, Composer, Npm]
23
+ AVAILABLE_MANAGERS = {
24
+ 'bundler' => Bundler,
25
+ 'composer' => Composer,
26
+ 'npm' => Npm
27
+ }
24
28
 
25
29
  include Enumerable
26
30
 
27
31
  # Initialize detected dependency managers
28
- def initialize(*args)
29
- @detected = AVAILABLE_MANAGERS.map { |klass| klass.new(*args) }.select { |manager| manager.detected? }
32
+ def initialize(servers, config, shell, runner)
33
+ @config = config
34
+ @detected = select_managers(servers, config, shell, runner)
35
+ end
36
+
37
+ def select_managers(servers, config, shell, runner)
38
+ managers = AVAILABLE_MANAGERS.map do |name, klass|
39
+ enabled = config[name]
40
+ case enabled
41
+ when 'false', false then nil
42
+ when 'true', true then klass.new(servers, config, shell, runner)
43
+ when 'detect' then klass.detect(servers, config, shell, runner)
44
+ else
45
+ raise "Unknown value #{enabled.inspect} for option #{name.inspect}. Expected [true, false, detect]"
46
+ end
47
+ end
48
+ managers.compact
30
49
  end
31
50
 
32
51
  def each(&block)
@@ -4,6 +4,11 @@ module EY
4
4
  class Base
5
5
  attr_reader :servers, :config, :shell, :runner
6
6
 
7
+ def self.detect(*args)
8
+ manager = new(*args)
9
+ manager.detected? ? manager : nil
10
+ end
11
+
7
12
  def initialize(servers, config, shell, runner)
8
13
  @servers, @config, @shell, @runner = servers, config, shell, runner
9
14
  end
@@ -44,7 +44,7 @@ To fix this problem, commit your composer.lock to the repository and redeploy.
44
44
  end
45
45
 
46
46
  def composer_install
47
- run "composer install --no-interaction --working-dir #{paths.active_release}"
47
+ run "composer install --no-interaction --no-dev --optimize-autoloader --working-dir #{paths.active_release}"
48
48
  end
49
49
 
50
50
  def composer_selfupdate
@@ -130,10 +130,18 @@ module EY
130
130
  # task
131
131
  def restart
132
132
  @restart_failed = true
133
- shell.status "Restarting app servers"
134
- roles :app_master, :app, :solo do
135
- run(restart_command)
133
+ if config.restart_groups.to_i > 1
134
+ shell.status "Restarting app servers in #{config.restart_groups.to_i} groups"
135
+ else
136
+ shell.status "Restarting app servers"
137
+ end
138
+
139
+ servers.roles(:app_master, :app, :solo).in_groups(config.restart_groups.to_i) do |group|
140
+ shell.substatus "Restarting #{group.size} server#{group.size == 1 ? '' : 's'}"
141
+ group.run(restart_command)
136
142
  end
143
+
144
+ shell.status "Finished restarting app servers"
137
145
  @restart_failed = false
138
146
  end
139
147
 
@@ -47,6 +47,16 @@ module EY
47
47
  reject { |server| server.local? }
48
48
  end
49
49
 
50
+ def in_groups(number)
51
+ div, mod = size.divmod number
52
+ start = 0
53
+ number.times do |index|
54
+ length = div + (mod > 0 && mod > index ? 1 : 0)
55
+ yield self.class.new(@servers.slice(start, length), @shell)
56
+ start += length
57
+ end
58
+ end
59
+
50
60
  # We look up the same set of servers over and over.
51
61
  # Cache them so we don't have to find them every time
52
62
  # Accepts a block (because it's confusing when you send a block to this
@@ -23,7 +23,7 @@ class EY::Serverside::Source
23
23
  "Internal error: Missing keys #{missing.join(',')}. Required: #{self.class.required_opts.join(', ')}"
24
24
  end
25
25
 
26
- @ref = @opts[:ref]
26
+ @ref = @opts[:ref].to_s.strip
27
27
  @uri = @opts[:uri].to_s if @opts[:uri]
28
28
  @source_cache = Pathname.new(@opts[:repository_cache]) if @opts[:repository_cache]
29
29
  end
@@ -23,7 +23,15 @@ class EY::Serverside::Source::Archive < EY::Serverside::Source
23
23
  def update_repository_cache
24
24
  clean_cache
25
25
  in_source_cache do
26
- fetch && checksum && unarchive
26
+ unless fetch && checksum
27
+ shell.fatal "archive fetch from #{URI.parse(uri).hostname} failed."
28
+ raise "archive fetch from #{URI.parse(uri).hostname} failed."
29
+ end
30
+
31
+ unless unarchive
32
+ shell.fatal "unarchive of #{filename} failed."
33
+ raise "unarchive of #{filename} failed."
34
+ end
27
35
  end
28
36
  end
29
37
 
@@ -38,7 +46,7 @@ class EY::Serverside::Source::Archive < EY::Serverside::Source
38
46
  end
39
47
 
40
48
  def fetch_command
41
- "curl --location --silent --show-error -O --user-agent #{escape("EngineYardDeploy/#{EY::Serverside::VERSION}")} #{escape(uri)}"
49
+ "curl --location --silent --show-error --fail -o #{escape(filename)} --user-agent #{escape("EngineYardDeploy/#{EY::Serverside::VERSION}")} #{escape(uri)}"
42
50
  end
43
51
 
44
52
  def fetch
@@ -49,10 +57,8 @@ class EY::Serverside::Source::Archive < EY::Serverside::Source
49
57
  @filename ||= File.basename(URI.parse(uri).path)
50
58
  end
51
59
 
60
+ # TODO: configurable via flag
52
61
  def unarchive
53
- case File.extname(filename)
54
- when '.zip', '.war'
55
- run "unzip #{filename} && rm #{filename}"
56
- end
62
+ run_and_success? "unzip #{filename} && rm #{filename}"
57
63
  end
58
64
  end
@@ -1,5 +1,5 @@
1
1
  module EY
2
2
  module Serverside
3
- VERSION = '2.3.0'
3
+ VERSION = '2.3.1.pre.archivefix'
4
4
  end
5
5
  end
@@ -44,6 +44,22 @@ describe "Deploying an application that uses Bundler" do
44
44
  end
45
45
  end
46
46
 
47
+ context "with bundler disabled in ey.yml" do
48
+ before(:all) do
49
+ deploy_test_application('bundler_disabled')
50
+ end
51
+
52
+ it "does not run bundler commands" do
53
+ @deployer.commands.grep(/gem install bundler/).should be_empty
54
+ @deployer.commands.grep(/bundle _.*_ install/).should be_empty
55
+ end
56
+
57
+ it "still runs the hooks" do
58
+ deploy_dir.join('current', 'before_bundle.ran' ).should exist
59
+ deploy_dir.join('current', 'after_bundle.ran' ).should exist
60
+ end
61
+ end
62
+
47
63
  context "without a Gemfile.lock" do
48
64
  before(:all) do
49
65
  deploy_test_application('no_gemfile_lock')
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'rake'
4
+ gem 'ey_config'
@@ -0,0 +1,12 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ ey_config (0.0.5)
5
+ rake (0.9.2.2)
6
+
7
+ PLATFORMS
8
+ ruby
9
+
10
+ DEPENDENCIES
11
+ ey_config
12
+ rake
@@ -0,0 +1 @@
1
+ This repo looks like it should be bundled, but bundler is disabled.
@@ -0,0 +1,2 @@
1
+ defaults:
2
+ bundler: false
@@ -0,0 +1 @@
1
+ run 'touch after_bundle.ran'
@@ -0,0 +1 @@
1
+ run 'touch before_bundle.ran'
@@ -7,6 +7,7 @@ defaults:
7
7
  bundle_without: only test development
8
8
  maintenance_on_migrate: false
9
9
  maintenance_on_restart: false
10
+ bundler: true
10
11
  environments:
11
12
  env:
12
13
  branch: branch_from_ey_yml
@@ -0,0 +1 @@
1
+ Node.js app where npm is disabled in ey.yml
@@ -0,0 +1,2 @@
1
+ defaults:
2
+ npm: false
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "node-example",
3
+ "version": "0.0.1",
4
+ "dependencies": {
5
+ "express": "2.5.8"
6
+ }
7
+ }
@@ -0,0 +1 @@
1
+ PHP Composer app where composer is disabled in ey.yml
@@ -0,0 +1,5 @@
1
+ {
2
+ "require": {
3
+ "monolog/monolog": "1.2.*"
4
+ }
5
+ }
@@ -0,0 +1,462 @@
1
+ {
2
+ "hash": "6481f6a258c344122ba0157d5eadc0fd",
3
+ "packages": [
4
+ {
5
+ "name": "bjyoungblood/bjy-authorize",
6
+ "version": "1.2.6",
7
+ "source": {
8
+ "type": "git",
9
+ "url": "https://github.com/bjyoungblood/BjyAuthorize.git",
10
+ "reference": "1.2.6"
11
+ },
12
+ "dist": {
13
+ "type": "zip",
14
+ "url": "https://api.github.com/repos/bjyoungblood/BjyAuthorize/zipball/1.2.6",
15
+ "reference": "1.2.6",
16
+ "shasum": ""
17
+ },
18
+ "require": {
19
+ "php": ">=5.3.3",
20
+ "zendframework/zend-permissions-acl": ">=2.1,<3.0",
21
+ "zendframework/zend-mvc": ">=2.1,<3.0",
22
+ "zendframework/zend-eventmanager": ">=2.1,<3.0",
23
+ "zendframework/zend-servicemanager": ">=2.1,<3.0",
24
+ "zendframework/zend-view": ">=2.1,<3.0"
25
+ },
26
+ "require-dev": {
27
+ "doctrine/common": ">=2.3,<2.5-dev",
28
+ "zendframework/zend-developer-tools": "0.*",
29
+ "zf-commons/zfc-user": "0.*"
30
+ },
31
+ "time": "2013-05-12 16:07:25",
32
+ "type": "library",
33
+ "extra": {
34
+ "branch-alias": {
35
+ "dev-master": "1.3-dev"
36
+ }
37
+ },
38
+ "installation-source": "dist",
39
+ "autoload": {
40
+ "psr-0": {
41
+ "BjyAuthorize\\": "src/"
42
+ }
43
+ },
44
+ "license": [
45
+ "BSD-3-Clause"
46
+ ],
47
+ "authors": [
48
+ {
49
+ "name": "Marco Pivetta",
50
+ "email": "ocramius@gmail.com",
51
+ "homepage": "http://ocramius.github.com/",
52
+ "role": "Developer"
53
+ },
54
+ {
55
+ "name": "Ben Youngblood",
56
+ "email": "bx.youngblood@gmail.com",
57
+ "homepage": "http://bjyoungblood.com/",
58
+ "role": "Developer"
59
+ }
60
+ ],
61
+ "description": "Zend\\Acl based firewall system for ZF2 dispatch protection",
62
+ "homepage": "https://github.com/bjyoungblood/BjyAuthorize",
63
+ "keywords": [
64
+ "zf2",
65
+ "acl",
66
+ "zfc-user"
67
+ ]
68
+ },
69
+ {
70
+ "name": "bjyoungblood/bjy-profiler",
71
+ "version": "dev-master",
72
+ "source": {
73
+ "type": "git",
74
+ "url": "https://github.com/bjyoungblood/BjyProfiler.git",
75
+ "reference": "1ca31611b6960bcd744dced95764e3627e8d807a"
76
+ },
77
+ "dist": {
78
+ "type": "zip",
79
+ "url": "https://api.github.com/repos/bjyoungblood/BjyProfiler/zipball/1ca31611b6960bcd744dced95764e3627e8d807a",
80
+ "reference": "1ca31611b6960bcd744dced95764e3627e8d807a",
81
+ "shasum": ""
82
+ },
83
+ "require": {
84
+ "php": ">=5.3",
85
+ "zendframework/zendframework": ">=2.1.0"
86
+ },
87
+ "time": "1364225067",
88
+ "type": "library",
89
+ "installation-source": "source",
90
+ "autoload": {
91
+ "psr-0": {
92
+ "BjyProfiler": "src/"
93
+ },
94
+ "classmap": [
95
+ "./Module.php"
96
+ ]
97
+ },
98
+ "authors": [
99
+ {
100
+ "name": "Ben Youngblood",
101
+ "email": "bx.youngblood@gmail.com",
102
+ "homepage": "http://bjyoungblood.com/",
103
+ "role": "Developer"
104
+ }
105
+ ],
106
+ "description": "Database profiler for Zend\\Db (also plugin for ZendDeveloperTools)",
107
+ "homepage": "https://github.com/bjyoungblood/BjyProfiler",
108
+ "keywords": [
109
+ "db",
110
+ "zf2",
111
+ "profiler",
112
+ "zdt"
113
+ ]
114
+ },
115
+ {
116
+ "name": "darkmatus/roleuserbridge",
117
+ "version": "dev-master",
118
+ "source": {
119
+ "type": "git",
120
+ "url": "https://github.com/dshafik/roleuserbridge",
121
+ "reference": "9f70ef6f24e75c6592f769bd0cd598f135108f48"
122
+ },
123
+ "dist": {
124
+ "type": "zip",
125
+ "url": "https://github.com/dshafik/roleuserbridge/zipball/9f70ef6f24e75c6592f769bd0cd598f135108f48",
126
+ "reference": "9f70ef6f24e75c6592f769bd0cd598f135108f48",
127
+ "shasum": ""
128
+ },
129
+ "require": {
130
+ "php": ">=5.3.3",
131
+ "zendframework/zendframework": "2.*",
132
+ "zf-commons/zfc-base": "0.1.*",
133
+ "zf-commons/zfc-user": "0.1.*",
134
+ "bjyoungblood/bjy-authorize": "1.2.*"
135
+ },
136
+ "time": "1365313580",
137
+ "type": "library",
138
+ "installation-source": "source",
139
+ "autoload": {
140
+ "psr-0": {
141
+ "RoleUserBridge": "src/"
142
+ },
143
+ "classmap": [
144
+ "./"
145
+ ]
146
+ },
147
+ "authors": [
148
+ {
149
+ "name": "Darkmatus",
150
+ "email": "mueller@s-p-it.de",
151
+ "homepage": "https://github.com/darkmatus/"
152
+ }
153
+ ],
154
+ "description": "ZfcUser/BjyAuthorize Bridge for auto-adding User to the user_role_table from BjyAuthorize.",
155
+ "homepage": "https://github.com/darkmatus/roleuserbridge",
156
+ "keywords": [
157
+ "zf2"
158
+ ],
159
+ "support": {
160
+ "source": "https://github.com/dshafik/roleuserbridge/tree/master"
161
+ }
162
+ },
163
+ {
164
+ "name": "zendframework/zend-developer-tools",
165
+ "version": "dev-master",
166
+ "source": {
167
+ "type": "git",
168
+ "url": "https://github.com/zendframework/ZendDeveloperTools",
169
+ "reference": "9e2cf51ffbd3778f07be4a245e6b7a84a6a18a1c"
170
+ },
171
+ "dist": {
172
+ "type": "zip",
173
+ "url": "https://github.com/zendframework/ZendDeveloperTools/zipball/9e2cf51ffbd3778f07be4a245e6b7a84a6a18a1c",
174
+ "reference": "9e2cf51ffbd3778f07be4a245e6b7a84a6a18a1c",
175
+ "shasum": ""
176
+ },
177
+ "require": {
178
+ "php": ">=5.3.3",
179
+ "zendframework/zend-mvc": "2.*",
180
+ "zendframework/zend-eventmanager": "2.*",
181
+ "zendframework/zend-stdlib": "2.*",
182
+ "zendframework/zend-servicemanager": "2.*",
183
+ "zendframework/zend-version": "2.*"
184
+ },
185
+ "suggest": {
186
+ "bjyoungblood/bjy-profiler": "Version: dev-master, allows the usage of the (Zend) Db collector."
187
+ },
188
+ "time": "1368974025",
189
+ "type": "zf-module",
190
+ "installation-source": "source",
191
+ "autoload": {
192
+ "psr-0": {
193
+ "ZendDeveloperTools": "src/"
194
+ },
195
+ "classmap": [
196
+ "./Module.php"
197
+ ]
198
+ },
199
+ "license": [
200
+ "BSD-3-Clause"
201
+ ],
202
+ "authors": [
203
+ {
204
+ "name": "Evan Coury",
205
+ "email": "me@evancoury.com",
206
+ "homepage": "http://blog.evan.pro/"
207
+ },
208
+ {
209
+ "name": "Eric Boh",
210
+ "email": "cossish@gmail.com"
211
+ }
212
+ ],
213
+ "description": "Module for developer and debug tools for working with the ZF2 MVC layer.",
214
+ "homepage": "https://github.com/zendframework/ZendDeveloperTools",
215
+ "keywords": [
216
+ "debug",
217
+ "developer",
218
+ "zf2",
219
+ "module"
220
+ ],
221
+ "support": {
222
+ "source": "https://github.com/zendframework/ZendDeveloperTools/tree/master",
223
+ "issues": "https://github.com/zendframework/ZendDeveloperTools/issues"
224
+ }
225
+ },
226
+ {
227
+ "name": "zendframework/zendframework",
228
+ "version": "2.1.5",
229
+ "source": {
230
+ "type": "git",
231
+ "url": "https://github.com/zendframework/zf2.git",
232
+ "reference": "release-2.1.5"
233
+ },
234
+ "dist": {
235
+ "type": "zip",
236
+ "url": "https://api.github.com/repos/zendframework/zf2/zipball/release-2.1.5",
237
+ "reference": "release-2.1.5",
238
+ "shasum": ""
239
+ },
240
+ "require": {
241
+ "php": ">=5.3.3"
242
+ },
243
+ "replace": {
244
+ "zendframework/zend-authentication": "self.version",
245
+ "zendframework/zend-barcode": "self.version",
246
+ "zendframework/zend-cache": "self.version",
247
+ "zendframework/zend-captcha": "self.version",
248
+ "zendframework/zend-code": "self.version",
249
+ "zendframework/zend-config": "self.version",
250
+ "zendframework/zend-console": "self.version",
251
+ "zendframework/zend-crypt": "self.version",
252
+ "zendframework/zend-db": "self.version",
253
+ "zendframework/zend-debug": "self.version",
254
+ "zendframework/zend-di": "self.version",
255
+ "zendframework/zend-dom": "self.version",
256
+ "zendframework/zend-escaper": "self.version",
257
+ "zendframework/zend-eventmanager": "self.version",
258
+ "zendframework/zend-feed": "self.version",
259
+ "zendframework/zend-file": "self.version",
260
+ "zendframework/zend-filter": "self.version",
261
+ "zendframework/zend-form": "self.version",
262
+ "zendframework/zend-http": "self.version",
263
+ "zendframework/zend-i18n": "self.version",
264
+ "zendframework/zend-inputfilter": "self.version",
265
+ "zendframework/zend-json": "self.version",
266
+ "zendframework/zend-ldap": "self.version",
267
+ "zendframework/zend-loader": "self.version",
268
+ "zendframework/zend-log": "self.version",
269
+ "zendframework/zend-mail": "self.version",
270
+ "zendframework/zend-math": "self.version",
271
+ "zendframework/zend-memory": "self.version",
272
+ "zendframework/zend-mime": "self.version",
273
+ "zendframework/zend-modulemanager": "self.version",
274
+ "zendframework/zend-mvc": "self.version",
275
+ "zendframework/zend-navigation": "self.version",
276
+ "zendframework/zend-paginator": "self.version",
277
+ "zendframework/zend-permissions-acl": "self.version",
278
+ "zendframework/zend-permissions-rbac": "self.version",
279
+ "zendframework/zend-progressbar": "self.version",
280
+ "zendframework/zend-serializer": "self.version",
281
+ "zendframework/zend-server": "self.version",
282
+ "zendframework/zend-servicemanager": "self.version",
283
+ "zendframework/zend-session": "self.version",
284
+ "zendframework/zend-soap": "self.version",
285
+ "zendframework/zend-stdlib": "self.version",
286
+ "zendframework/zend-tag": "self.version",
287
+ "zendframework/zend-test": "self.version",
288
+ "zendframework/zend-text": "self.version",
289
+ "zendframework/zend-uri": "self.version",
290
+ "zendframework/zend-validator": "self.version",
291
+ "zendframework/zend-version": "self.version",
292
+ "zendframework/zend-view": "self.version",
293
+ "zendframework/zend-xmlrpc": "self.version"
294
+ },
295
+ "require-dev": {
296
+ "doctrine/common": ">=2.1",
297
+ "ircmaxell/random-lib": "dev-master",
298
+ "ircmaxell/security-lib": "dev-master",
299
+ "phpunit/phpunit": "3.7.*"
300
+ },
301
+ "suggest": {
302
+ "doctrine/common": "Doctrine\\Common >=2.1 for annotation features",
303
+ "ext-intl": "ext/intl for i18n features",
304
+ "ircmaxell/random-lib": "Fallback random byte generator for Zend\\Math\\Rand if OpenSSL/Mcrypt extensions are unavailable",
305
+ "pecl-weakref": "Implementation of weak references for Zend\\Stdlib\\CallbackHandler",
306
+ "zendframework/zendpdf": "ZendPdf for creating PDF representations of barcodes",
307
+ "zendframework/zendservice-recaptcha": "ZendService\\ReCaptcha for rendering ReCaptchas in Zend\\Captcha and/or Zend\\Form"
308
+ },
309
+ "time": "2013-04-17 15:15:58",
310
+ "bin": [
311
+ "bin/classmap_generator.php"
312
+ ],
313
+ "type": "library",
314
+ "extra": {
315
+ "branch-alias": {
316
+ "dev-master": "2.1-dev",
317
+ "dev-develop": "2.2-dev"
318
+ }
319
+ },
320
+ "installation-source": "dist",
321
+ "autoload": {
322
+ "psr-0": {
323
+ "Zend\\": "library/",
324
+ "ZendTest\\": "tests/"
325
+ }
326
+ },
327
+ "license": [
328
+ "BSD-3-Clause"
329
+ ],
330
+ "description": "Zend Framework 2",
331
+ "homepage": "http://framework.zend.com/",
332
+ "keywords": [
333
+ "framework",
334
+ "zf2"
335
+ ]
336
+ },
337
+ {
338
+ "name": "zf-commons/zfc-base",
339
+ "version": "v0.1.2",
340
+ "source": {
341
+ "type": "git",
342
+ "url": "https://github.com/ZF-Commons/ZfcBase.git",
343
+ "reference": "v0.1.2"
344
+ },
345
+ "dist": {
346
+ "type": "zip",
347
+ "url": "https://api.github.com/repos/ZF-Commons/ZfcBase/zipball/v0.1.2",
348
+ "reference": "v0.1.2",
349
+ "shasum": ""
350
+ },
351
+ "require": {
352
+ "php": ">=5.3.3",
353
+ "zendframework/zend-db": ">=2.1,<3.0",
354
+ "zendframework/zend-eventmanager": ">=2.1,<3.0",
355
+ "zendframework/zend-loader": ">=2.1,<3.0",
356
+ "zendframework/zend-modulemanager": ">=2.1,<3.0",
357
+ "zendframework/zend-mvc": ">=2.1,<3.0",
358
+ "zendframework/zend-servicemanager": ">=2.1,<3.0",
359
+ "zendframework/zend-stdlib": ">=2.1,<3.0"
360
+ },
361
+ "time": "2013-05-02 12:33:49",
362
+ "type": "library",
363
+ "installation-source": "dist",
364
+ "autoload": {
365
+ "psr-0": {
366
+ "ZfcBase": "src/"
367
+ },
368
+ "classmap": [
369
+ "./Module.php"
370
+ ]
371
+ },
372
+ "authors": [
373
+ {
374
+ "name": "Kyle Spraggs",
375
+ "email": "theman@spiffyjr.me",
376
+ "homepage": "http://www.spiffyjr.me/"
377
+ },
378
+ {
379
+ "name": "Evan Coury",
380
+ "email": "me@evancoury.com",
381
+ "homepage": "http://blog.evan.pro/"
382
+ }
383
+ ],
384
+ "description": "A set of genetic (abstract) classes which are commonly used across multiple modules.",
385
+ "homepage": "https://github.com/ZF-Commons/ZfcBase",
386
+ "keywords": [
387
+ "zf2"
388
+ ]
389
+ },
390
+ {
391
+ "name": "zf-commons/zfc-user",
392
+ "version": "0.1.2",
393
+ "source": {
394
+ "type": "git",
395
+ "url": "https://github.com/ZF-Commons/ZfcUser.git",
396
+ "reference": "0.1.2"
397
+ },
398
+ "dist": {
399
+ "type": "zip",
400
+ "url": "https://api.github.com/repos/ZF-Commons/ZfcUser/zipball/0.1.2",
401
+ "reference": "0.1.2",
402
+ "shasum": ""
403
+ },
404
+ "require": {
405
+ "php": ">=5.3.3",
406
+ "zendframework/zend-authentication": ">=2.1,<3.0",
407
+ "zendframework/zend-crypt": ">=2.1,<3.0",
408
+ "zendframework/zend-form": ">=2.1,<3.0",
409
+ "zendframework/zend-inputfilter": ">=2.1,<3.0",
410
+ "zendframework/zend-loader": ">=2.1,<3.0",
411
+ "zendframework/zend-modulemanager": ">=2.1,<3.0",
412
+ "zendframework/zend-mvc": ">=2.1,<3.0",
413
+ "zendframework/zend-servicemanager": ">=2.1,<3.0",
414
+ "zendframework/zend-stdlib": ">=2.1,<3.0",
415
+ "zendframework/zend-validator": ">=2.1,<3.0",
416
+ "zendframework/zend-view": ">=2.1,<3.0",
417
+ "zf-commons/zfc-base": "0.*"
418
+ },
419
+ "suggest": {
420
+ "zendframework/zend-session": "To use the default authentication adapter."
421
+ },
422
+ "time": "2013-05-02 12:33:31",
423
+ "type": "library",
424
+ "installation-source": "dist",
425
+ "autoload": {
426
+ "psr-0": {
427
+ "ZfcUser": "src/"
428
+ },
429
+ "classmap": [
430
+ "./Module.php"
431
+ ]
432
+ },
433
+ "authors": [
434
+ {
435
+ "name": "Kyle Spraggs",
436
+ "email": "theman@spiffyjr.me",
437
+ "homepage": "http://www.spiffyjr.me/"
438
+ },
439
+ {
440
+ "name": "Evan Coury",
441
+ "email": "me@evancoury.com",
442
+ "homepage": "http://blog.evan.pro/"
443
+ }
444
+ ],
445
+ "description": "A generic user registration and authentication module for ZF2. Supports Zend\\Db and Doctrine2.",
446
+ "homepage": "https://github.com/ZF-Commons/ZfcUser",
447
+ "keywords": [
448
+ "zf2"
449
+ ]
450
+ }
451
+ ],
452
+ "packages-dev": null,
453
+ "aliases": [
454
+
455
+ ],
456
+ "minimum-stability": "stable",
457
+ "stability-flags": {
458
+ "zendframework/zend-developer-tools": 20,
459
+ "bjyoungblood/bjy-profiler": 20,
460
+ "darkmatus/roleuserbridge": 20
461
+ }
462
+ }
@@ -0,0 +1,2 @@
1
+ defaults:
2
+ composer: false
@@ -0,0 +1,4 @@
1
+ <?php
2
+
3
+ echo "Hello, world!";
4
+
@@ -4,12 +4,27 @@ describe "Deploying an application that uses Node.js and NPM" do
4
4
  with_npm_mocked do |mocked|
5
5
  before(:all) do
6
6
  mock_npm if mocked
7
- deploy_test_application('nodejs')
8
7
  end
9
8
 
10
- it "runs 'npm install'" do
11
- install_cmd = @deployer.commands.grep(/npm install/).first
12
- install_cmd.should_not be_nil
9
+ context "npm in detect mode" do
10
+ before do
11
+ deploy_test_application('nodejs')
12
+ end
13
+
14
+ it "runs 'npm install'" do
15
+ install_cmd = @deployer.commands.grep(/npm install/).first
16
+ install_cmd.should_not be_nil
17
+ end
18
+ end
19
+
20
+ context "npm disabled" do
21
+ before do
22
+ deploy_test_application('npm_disabled')
23
+ end
24
+
25
+ it "does not run 'npm install'" do
26
+ @deployer.commands.grep(/npm/).should be_empty
27
+ end
13
28
  end
14
29
  end
15
30
  end
@@ -5,6 +5,7 @@ describe "Deploying an application that uses PHP and Composer" do
5
5
  with_composer_mocked do |mocked|
6
6
  context "with composer available" do
7
7
  before(:all) { mock_composer if mocked }
8
+
8
9
  context "with a composer.lock" do
9
10
  before(:all) do
10
11
  deploy_test_application('php_composer_lock')
@@ -26,6 +27,16 @@ describe "Deploying an application that uses PHP and Composer" do
26
27
  end
27
28
  end
28
29
 
30
+ context "with composer disabled in ey.yml" do
31
+ before(:all) do
32
+ deploy_test_application('php_composer_disabled')
33
+ end
34
+
35
+ it "does not run composer" do
36
+ @deployer.commands.grep(/composer/).should be_empty
37
+ end
38
+ end
39
+
29
40
  context "WITHOUT a composer.lock but with composer.json" do
30
41
  before(:all) do
31
42
  deploy_test_application('php_no_composer_lock')
@@ -26,8 +26,7 @@ describe EY::Serverside::Source::Archive do
26
26
  end
27
27
 
28
28
  it "updates the cache" do
29
- last_output = subject.update_repository_cache.output
30
- expect(last_output).to eq("unzip app.war && rm app.war")
29
+ subject.update_repository_cache
31
30
  end
32
31
 
33
32
  end
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: engineyard-serverside
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1.pre.archivefix
5
+ prerelease: 6
5
6
  platform: ruby
6
7
  authors:
7
8
  - EY Cloud Team
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-08-07 00:00:00.000000000 Z
12
+ date: 2013-09-23 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rspec
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :development
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: rake
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ! '>='
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :development
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ! '>='
39
44
  - !ruby/object:Gem::Version
@@ -41,6 +46,7 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: rdoc
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - ! '>='
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - ! '>='
53
60
  - !ruby/object:Gem::Version
@@ -55,6 +62,7 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: timecop
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - '='
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :development
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - '='
67
76
  - !ruby/object:Gem::Version
@@ -69,6 +78,7 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: simplecov
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
83
  - - ! '>='
74
84
  - !ruby/object:Gem::Version
@@ -76,6 +86,7 @@ dependencies:
76
86
  type: :development
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
91
  - - ! '>='
81
92
  - !ruby/object:Gem::Version
@@ -83,20 +94,23 @@ dependencies:
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: engineyard-cloud-client
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
99
  - - ~>
88
100
  - !ruby/object:Gem::Version
89
- version: 1.0.11
101
+ version: 1.0.14
90
102
  type: :development
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
107
  - - ~>
95
108
  - !ruby/object:Gem::Version
96
- version: 1.0.11
109
+ version: 1.0.14
97
110
  - !ruby/object:Gem::Dependency
98
111
  name: engineyard-serverside-adapter
99
112
  requirement: !ruby/object:Gem::Requirement
113
+ none: false
100
114
  requirements:
101
115
  - - ~>
102
116
  - !ruby/object:Gem::Version
@@ -104,6 +118,7 @@ dependencies:
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
107
122
  requirements:
108
123
  - - ~>
109
124
  - !ruby/object:Gem::Version
@@ -111,6 +126,7 @@ dependencies:
111
126
  - !ruby/object:Gem::Dependency
112
127
  name: sqlite3
113
128
  requirement: !ruby/object:Gem::Requirement
129
+ none: false
114
130
  requirements:
115
131
  - - ! '>='
116
132
  - !ruby/object:Gem::Version
@@ -118,6 +134,7 @@ dependencies:
118
134
  type: :development
119
135
  prerelease: false
120
136
  version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
121
138
  requirements:
122
139
  - - ! '>='
123
140
  - !ruby/object:Gem::Version
@@ -231,8 +248,6 @@ files:
231
248
  - spec/deploy_hook_spec.rb
232
249
  - spec/deprecation_spec.rb
233
250
  - spec/ey_yml_customized_deploy_spec.rb
234
- - spec/fixtures/gitrepo/bar
235
- - spec/fixtures/gitrepo/foo
236
251
  - spec/fixtures/gitrepo.tar.gz
237
252
  - spec/fixtures/invalid_hook.rb
238
253
  - spec/fixtures/lockfiles/0.9-no-bundler
@@ -307,6 +322,12 @@ files:
307
322
  - spec/fixtures/repos/bundle_fails/deploy/after_bundle.rb
308
323
  - spec/fixtures/repos/bundle_fails/Gemfile
309
324
  - spec/fixtures/repos/bundle_fails/README
325
+ - spec/fixtures/repos/bundler_disabled/config/ey.yml
326
+ - spec/fixtures/repos/bundler_disabled/deploy/after_bundle.rb
327
+ - spec/fixtures/repos/bundler_disabled/deploy/before_bundle.rb
328
+ - spec/fixtures/repos/bundler_disabled/Gemfile
329
+ - spec/fixtures/repos/bundler_disabled/Gemfile.lock
330
+ - spec/fixtures/repos/bundler_disabled/README
310
331
  - spec/fixtures/repos/default/ey.yml
311
332
  - spec/fixtures/repos/default/Gemfile
312
333
  - spec/fixtures/repos/default/Gemfile.lock
@@ -349,6 +370,14 @@ files:
349
370
  - spec/fixtures/repos/nodejs/package.json
350
371
  - spec/fixtures/repos/nodejs/README
351
372
  - spec/fixtures/repos/not_bundled/README
373
+ - spec/fixtures/repos/npm_disabled/config/ey.yml
374
+ - spec/fixtures/repos/npm_disabled/package.json
375
+ - spec/fixtures/repos/npm_disabled/README
376
+ - spec/fixtures/repos/php_composer_disabled/composer.json
377
+ - spec/fixtures/repos/php_composer_disabled/composer.lock
378
+ - spec/fixtures/repos/php_composer_disabled/config/ey.yml
379
+ - spec/fixtures/repos/php_composer_disabled/public/index.php
380
+ - spec/fixtures/repos/php_composer_disabled/README
352
381
  - spec/fixtures/repos/php_composer_lock/composer.json
353
382
  - spec/fixtures/repos/php_composer_lock/composer.lock
354
383
  - spec/fixtures/repos/php_composer_lock/public/index.php
@@ -381,26 +410,27 @@ files:
381
410
  homepage: http://github.com/engineyard/engineyard-serverside
382
411
  licenses:
383
412
  - MIT
384
- metadata: {}
385
413
  post_install_message:
386
414
  rdoc_options: []
387
415
  require_paths:
388
416
  - lib
389
417
  required_ruby_version: !ruby/object:Gem::Requirement
418
+ none: false
390
419
  requirements:
391
420
  - - ! '>='
392
421
  - !ruby/object:Gem::Version
393
422
  version: '0'
394
423
  required_rubygems_version: !ruby/object:Gem::Requirement
424
+ none: false
395
425
  requirements:
396
426
  - - ! '>='
397
427
  - !ruby/object:Gem::Version
398
428
  version: 1.3.6
399
429
  requirements: []
400
430
  rubyforge_project:
401
- rubygems_version: 2.0.6
431
+ rubygems_version: 1.8.23
402
432
  signing_key:
403
- specification_version: 4
433
+ specification_version: 3
404
434
  summary: A gem that deploys ruby applications on EY Cloud instances
405
435
  test_files:
406
436
  - spec/archive_deploy_spec.rb
@@ -411,8 +441,6 @@ test_files:
411
441
  - spec/deploy_hook_spec.rb
412
442
  - spec/deprecation_spec.rb
413
443
  - spec/ey_yml_customized_deploy_spec.rb
414
- - spec/fixtures/gitrepo/bar
415
- - spec/fixtures/gitrepo/foo
416
444
  - spec/fixtures/gitrepo.tar.gz
417
445
  - spec/fixtures/invalid_hook.rb
418
446
  - spec/fixtures/lockfiles/0.9-no-bundler
@@ -487,6 +515,12 @@ test_files:
487
515
  - spec/fixtures/repos/bundle_fails/deploy/after_bundle.rb
488
516
  - spec/fixtures/repos/bundle_fails/Gemfile
489
517
  - spec/fixtures/repos/bundle_fails/README
518
+ - spec/fixtures/repos/bundler_disabled/config/ey.yml
519
+ - spec/fixtures/repos/bundler_disabled/deploy/after_bundle.rb
520
+ - spec/fixtures/repos/bundler_disabled/deploy/before_bundle.rb
521
+ - spec/fixtures/repos/bundler_disabled/Gemfile
522
+ - spec/fixtures/repos/bundler_disabled/Gemfile.lock
523
+ - spec/fixtures/repos/bundler_disabled/README
490
524
  - spec/fixtures/repos/default/ey.yml
491
525
  - spec/fixtures/repos/default/Gemfile
492
526
  - spec/fixtures/repos/default/Gemfile.lock
@@ -529,6 +563,14 @@ test_files:
529
563
  - spec/fixtures/repos/nodejs/package.json
530
564
  - spec/fixtures/repos/nodejs/README
531
565
  - spec/fixtures/repos/not_bundled/README
566
+ - spec/fixtures/repos/npm_disabled/config/ey.yml
567
+ - spec/fixtures/repos/npm_disabled/package.json
568
+ - spec/fixtures/repos/npm_disabled/README
569
+ - spec/fixtures/repos/php_composer_disabled/composer.json
570
+ - spec/fixtures/repos/php_composer_disabled/composer.lock
571
+ - spec/fixtures/repos/php_composer_disabled/config/ey.yml
572
+ - spec/fixtures/repos/php_composer_disabled/public/index.php
573
+ - spec/fixtures/repos/php_composer_disabled/README
532
574
  - spec/fixtures/repos/php_composer_lock/composer.json
533
575
  - spec/fixtures/repos/php_composer_lock/composer.lock
534
576
  - spec/fixtures/repos/php_composer_lock/public/index.php
@@ -558,3 +600,4 @@ test_files:
558
600
  - spec/sqlite3_deploy_spec.rb
559
601
  - spec/support/integration.rb
560
602
  - spec/support/source_doubles.rb
603
+ has_rdoc:
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZTMyNDZmY2M5YmMyN2RjN2I3OWM1MGRlNjlhN2NjY2FkODExYjVmMg==
5
- data.tar.gz: !binary |-
6
- M2ZmMWQ0Y2E5MDE5NTkzNjQ0ODFmYTJkZGJlYjlhMDc0NDMyMWQxYg==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- MzA1YWVmMDUxMjhjNjdkNzhhN2FhOWU3NTJmZjYzNTJmNjk0MDUxYmJiYTY4
10
- ZWQ0YTg0OGEyYTg5M2Y5MmRkMmM1YzIwNzhhZmY5NjhiYTMwY2RkMWFhMWFk
11
- MmIzNmY3ZjU1YjQxNzU4NTE4MDg4YzUzMGQxYjY5MDk2MDAyYTM=
12
- data.tar.gz: !binary |-
13
- YzQyZTQzZGEyNGQ0MmU2MWZkOTJmNTdjNzM0MmJhOWYxZjllMGE1NWE3OWRi
14
- ZTFiNDMxZDJlNTJhZjU2OTdiNjU4MzIxOTIyNDYwZjNjMzVjODc4NzQzNDBh
15
- YmExMzE0NzA0N2QxMDNjMDE3Yjk1NDc1NzI3ZWI0MTNjZjJhNTU=
File without changes
File without changes