momentum 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 920876f50fcc8cb7bcb36a614a1974fa45c6877b
4
- data.tar.gz: 702954bd2ea2406c4f9c62e3793b53c4297f06a2
3
+ metadata.gz: 1f0149ba8b46a7d55c702254909243a62474c664
4
+ data.tar.gz: 651a98e07b3a42aff25fa4a413cd8f153525b82a
5
5
  SHA512:
6
- metadata.gz: fe10c239130e2c920fd194eb26ca28ee8adcbe238407b4faef0252ce7e4b9d2401cceedfa562c9adf73938e5de1ffa031572bcdd07a6644c7caa35781680857a
7
- data.tar.gz: c8dbd16cd579e68c8b7c9e3f8a094b148cacd0eeea9cc01b2fea40e2bd9b849b682f4d4463cc766e641612505ef0263f0c58272e7fc7a090b822e63e5c73da54
6
+ metadata.gz: 6957fdd5f8894a80f6fb65c3ca003446d485d5daff7f1a74c7e4b8b17c3ff2540e9b1bf0571ebf8d48599444da8e60d522ce7138cf1d72f016a8d5fe117ccc54
7
+ data.tar.gz: 90936ccf9409422c09fcf85c43a268ddcf65a907423a935febbb8d7287d1f123ed2c5f544e82a96f3a1cd034f138eb3eba7d2470410ec18338f1c5772339e822
data/README.md CHANGED
@@ -7,7 +7,7 @@ Shared utilities for managing and deploying OpsWorks apps at Artsy.
7
7
 
8
8
  Add this line to your application's Gemfile, probably in the `:development` group:
9
9
 
10
- gem 'momentum', github: 'artsy/momentum', require: false
10
+ gem 'momentum', require: false
11
11
 
12
12
  In your application's Rakefile, add this line above the `load_tasks` command:
13
13
 
@@ -17,3 +17,8 @@ end
17
17
  def cookbooks_zip
18
18
  "#{Momentum.config[:cookbooks_install_path]}.zip"
19
19
  end
20
+
21
+ def system!(command)
22
+ success = system(command)
23
+ fail "Failed with status #{$?.exitstatus}" unless success
24
+ end
@@ -1,3 +1,3 @@
1
1
  module Momentum
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/lib/momentum.rb CHANGED
@@ -4,6 +4,7 @@ require 'momentum/railtie' if defined?(::Rails)
4
4
  module Momentum
5
5
 
6
6
  DEFAULT_CONFIG = {
7
+ # app_base_name: ..., # required
7
8
  cookbooks_install_path: 'tmp/cookbooks',
8
9
  custom_cookbooks_bucket: 'artsy-cookbooks',
9
10
  rails_console_layer: 'rails-app',
@@ -18,7 +18,13 @@ LIBRARIAN_CHEF_INSTALL__STRIP_DOT_GIT: '1'
18
18
  # librarian-chef and rails declare incompatible json dependencies,
19
19
  # so librarian-chef must be installed but can't be in the bundle
20
20
  Bundler.with_clean_env do
21
- system "librarian-chef init"
21
+ system! "librarian-chef init"
22
+ end
23
+ end
24
+
25
+ task :install => :require do
26
+ Bundler.with_clean_env do
27
+ system! "librarian-chef install"
22
28
  end
23
29
  end
24
30
 
@@ -4,18 +4,12 @@ namespace :ow do
4
4
  require 'momentum/opsworks'
5
5
  require 'momentum/tasks'
6
6
 
7
- # TODO add dependency on librarian-chef once chef/json conflict resolved
8
- # desc "Run librarian-chef install"
9
- # task :install do
10
- # `librarian-chef install`
11
- # end
12
-
13
7
  desc "Zip the #{Momentum.config[:cookbooks_install_path]} directory into #{Momentum.config[:cookbooks_install_path]}.zip"
14
8
  task :zip do
15
9
  raise "No cookbooks found at #{Momentum.config[:cookbooks_install_path]}! Run librarian-chef install." unless File.exists?(Momentum.config[:cookbooks_install_path])
16
10
  dir = File.dirname(Momentum.config[:cookbooks_install_path])
17
11
  base = File.basename(Momentum.config[:cookbooks_install_path])
18
- system "rm -f #{cookbooks_zip} && pushd #{dir} && zip -r #{base} #{base} && popd"
12
+ system! "rm -f #{cookbooks_zip} && pushd #{dir} && zip -r #{base} #{base} && popd"
19
13
  $stderr.puts "Zipped cookbooks to #{cookbooks_zip}"
20
14
  end
21
15
 
@@ -33,7 +27,7 @@ namespace :ow do
33
27
  end
34
28
 
35
29
  desc "Install, zip and upload custom cookbooks, then trigger update_custom_cookbooks command."
36
- task :update, [:to, :aws_id, :aws_secret] => [:require_app_base_name, :zip, :upload] do |t, args|
30
+ task :update, [:to, :aws_id, :aws_secret] => [:require_app_base_name, 'librarian:install', :zip, :upload] do |t, args|
37
31
  require_credentials!(args)
38
32
 
39
33
  ow = Momentum::OpsWorks.client(args[:aws_id], args[:aws_secret])
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: momentum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joey Aghion
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-17 00:00:00.000000000 Z
11
+ date: 2014-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk