snap_deploy 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 28b334c6d5f03496d83237a7fb848182b6efab1f
4
- data.tar.gz: 17bc61e0fa1760094a78d89ef1320f538ca56b22
3
+ metadata.gz: 07f88a4168240141141e6d5325b09e0f479a5fa5
4
+ data.tar.gz: 1d0ada9448940d0065717d35c01b66f321c82d46
5
5
  SHA512:
6
- metadata.gz: aef70d6009ed5c5597cc707697070bf1d5e4f8ffdbc4eceaa5345e3fc8249e215a87c29feaee0e6603fb4283458a9bf892dc7c09eeba60f2d1ff638f0fdcbd25
7
- data.tar.gz: 7099e235dedfcf8b22b4a5ad42f9f30a1b9e064dba105aaea61a2dcfc3b6dc289db062acd5ca71b22bd8d03a4cebeb8d7992046971c8c2dc8a765347724db22e
6
+ metadata.gz: 4b1bf0ae4569d4f23357c6f3ab7924caaffdd75e8f4c31a621be5efcffb3a510aa95abef2b4fe05ee531dfde7a7ab21ba6d707d3771f2bf43c7bfc9d3cc437a2
7
+ data.tar.gz: 00985260c24faf580136ef82fb590005f1037412fbc5331d40057c97940de101e2f557ab265c97aa5133521b10166263449834e37377fe058034498abd64c087
data/README.md CHANGED
@@ -2,11 +2,13 @@
2
2
 
3
3
  # SnapDeploy
4
4
 
5
- A deploy tool for continuous deployment. Used by [Snap CI](https://snap-ci.com)
5
+ A simple cli tool to help with Heroku and AWS deployments. Used by [Snap CI](https://snap-ci.com)
6
6
 
7
7
  ## Installation
8
8
 
9
- Add this line to your application's Gemfile:
9
+ SnapDeploy is already available in the Snap CI build environment. You can simply start using it in your builds by invoking the `snap-deploy` command.
10
+
11
+ If you want to use `snap-deploy` outside the Snap CI environment, you can add this line to your application's Gemfile:
10
12
 
11
13
  gem 'snap_deploy'
12
14
 
@@ -18,6 +20,8 @@ Or install it yourself as:
18
20
 
19
21
  $ gem install snap_deploy
20
22
 
23
+ > Ruby version support: We will supporting this gem only with ruby 2.2.4. If there is reason you would like to use this gem with some other version of ruby, please get in touch with us by writing to support@snap-ci.com
24
+
21
25
  ## Usage
22
26
 
23
27
  Currently, it supports aws and heroku deploy. You can use the commands below for more informations:
data/bin/snap-deploy CHANGED
@@ -1,10 +1,11 @@
1
- #!/usr/bin/env ruby
1
+ #!/bin/bash
2
+ set -e
2
3
 
3
- $:.unshift(File.join(File.expand_path('../../', __FILE__), 'bundle'))
4
- require 'bundler/setup'
4
+ CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
5
+ # More info about this: https://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
5
6
 
6
- Process.respond_to?(:setproctitle) ? Process.setproctitle('snap-deploy') : $0 = 'snap-deploy'
7
-
8
- require 'snap_deploy'
9
-
10
- SnapDeploy::CLI.run
7
+ if [ "$( ruby --version )" != "$( cat $CURRENT_DIR/../.ruby-version )" ]; then
8
+ exec env RBENV_VERSION="$( cat $CURRENT_DIR/../.ruby-version )" $CURRENT_DIR/snap-deploy-assuming-ruby-version-set "$@"
9
+ else
10
+ exec $CURRENT_DIR/snap-deploy-assuming-ruby-version-set "$@"
11
+ fi
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ ENV.delete('BUNDLE_BIN_PATH')
4
+ ENV.delete('BUNDLE_GEMFILE')
5
+ ENV.delete('GEM_HOME')
6
+ ENV.delete('GEM_PATH')
7
+ ENV.delete('RUBYLIB')
8
+ ENV.delete('RUBYOPT')
9
+
10
+ Process.respond_to?(:setproctitle) ? Process.setproctitle('snap-deploy') : $0 = 'snap-deploy'
11
+
12
+ $:.unshift(File.join(File.expand_path('../../', __FILE__), 'bundle'))
13
+ require 'bundler/setup'
14
+
15
+ require 'snap_deploy'
16
+
17
+ SnapDeploy::CLI.run('snap-deploy')
@@ -1,3 +1,3 @@
1
1
  module SnapDeploy
2
- VERSION = "0.1.4"
2
+ VERSION = "0.2.0"
3
3
  end
data/snap_deploy.gemspec CHANGED
@@ -17,6 +17,8 @@ Gem::Specification.new do |spec|
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
+
21
+ spec.required_ruby_version = '~> 2.2'
20
22
 
21
23
  spec.add_development_dependency "bundler", "~> 1.6"
22
24
  spec.add_runtime_dependency 'ansi'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snap_deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Snap CI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-21 00:00:00.000000000 Z
11
+ date: 2016-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -113,6 +113,7 @@ email:
113
113
  - support@snap-ci.com
114
114
  executables:
115
115
  - snap-deploy
116
+ - snap-deploy-assuming-ruby-version-set
116
117
  extensions: []
117
118
  extra_rdoc_files: []
118
119
  files:
@@ -128,7 +129,7 @@ files:
128
129
  - README.md
129
130
  - Rakefile
130
131
  - bin/snap-deploy
131
- - install.sh
132
+ - bin/snap-deploy-assuming-ruby-version-set
132
133
  - lib/snap_deploy.rb
133
134
  - lib/snap_deploy/cli.rb
134
135
  - lib/snap_deploy/helpers.rb
@@ -156,9 +157,9 @@ require_paths:
156
157
  - lib
157
158
  required_ruby_version: !ruby/object:Gem::Requirement
158
159
  requirements:
159
- - - ">="
160
+ - - "~>"
160
161
  - !ruby/object:Gem::Version
161
- version: '0'
162
+ version: '2.2'
162
163
  required_rubygems_version: !ruby/object:Gem::Requirement
163
164
  requirements:
164
165
  - - ">="
data/install.sh DELETED
@@ -1,18 +0,0 @@
1
- #!/bin/bash
2
-
3
- set -e
4
-
5
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd)"
6
- cd $SCRIPT_DIR
7
-
8
- export NOKOGIRI_USE_SYSTEM_LIBRARIES=1
9
- export PATH="/opt/local/ruby/2.0.0-p598/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
10
-
11
- # change ownership to nobody to not screw up things (even accidentally)
12
- chown nobody -R $SCRIPT_DIR
13
-
14
- # perform the bundle install
15
- su -l nobody -s /bin/bash -c "cd $SCRIPT_DIR && env PATH=$PATH NOKOGIRI_USE_SYSTEM_LIBRARIES=1 $(which bundle) install --local --standalone --clean"
16
-
17
- # change ownership back to root
18
- chown root -R $SCRIPT_DIR