Permalink
Browse files

feat(framework): "Null" support added

Resolves #47
  • Loading branch information...
ajgon committed Sep 14, 2016
1 parent 89252b3 commit b9e7b631443f1aaf8d9399cc15d5559ab80ee018
Showing with 30 additions and 3 deletions.
  1. +2 −1 README.md
  2. +10 −0 libraries/drivers_framework_null.rb
  3. +2 −2 recipes/deploy.rb
  4. +16 −0 spec/unit/libraries/drivers_framework_null_spec.rb
View
@@ -24,6 +24,7 @@ then [add recipes to the corresponding OpsWorks actions](#recipes).
* SCM
* git
* Framework
* Null (no framework)
* Ruby on Rails
* App server
* Null (no appserver)
@@ -141,7 +142,7 @@ Pre-optimalization for specific frameworks (like migrations, cache etc.).
Currently only `Rails` is supported.
* `app['framework']['adapter']`
* **Supported values:** `rails`
* **Supported values:** `null`, `rails`
* **Default:** `rails`
* Ruby framework used in project.
* `app['framework']['migrate']`
@@ -0,0 +1,10 @@
# frozen_string_literal: true
module Drivers
module Framework
class Null < Drivers::Framework::Base
adapter :null
allowed_engines :null
output filter: []
end
end
end
View
@@ -26,7 +26,7 @@
user node['deployer']['user'] || 'root'
group www_group
rollback_on_error true
environment application['environment'].merge(framework.out[:deploy_environment])
environment application['environment'].merge(framework.out[:deploy_environment] || {})
keep_releases deploy[:keep_releases]
create_dirs_before_symlink(
@@ -50,7 +50,7 @@
end
end
migration_command(framework.out[:migration_command])
migration_command(framework.out[:migration_command]) if framework.out[:migration_command]
migrate framework.out[:migrate]
before_migrate do
perform_bundle_install(shared_path, bundle_env)
@@ -0,0 +1,16 @@
# frozen_string_literal: true
require 'spec_helper'
describe Drivers::Framework::Null do
it 'receives and exposes app and node' do
driver = described_class.new(aws_opsworks_app, node)
expect(driver.app).to eq aws_opsworks_app
expect(driver.node).to eq node
expect(driver.options).to eq({})
end
it 'returns proper out data' do
expect(described_class.new(aws_opsworks_app, node).out).to eq({})
end
end

0 comments on commit b9e7b63

Please sign in to comment.