eb-docker-deploy 0.0.8 → 0.0.9

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: e29adfe0238660e12dbf72c3c61312ca8119eec5
4
- data.tar.gz: e29fc212596b9a58f608e7e45b2727843c40aae3
3
+ metadata.gz: 73edace8d80c803f35dfd13f9c2f267ec53fa3e4
4
+ data.tar.gz: 89db8ab46b2bdc6c651dc6dbaa065c86932060c7
5
5
  SHA512:
6
- metadata.gz: f132cb170ad9c3cbe30e824d11d5707eb303d7d42e0e88bafa1b25f17126c649fa7f0e407bb038b56c5a464bedc5dabc6c30d7323e333b6d359f18e85943a955
7
- data.tar.gz: 3d1de0d80dc55d8309e8eea7326e5d9fc3d847cba34539ac17b4f93b14e130cc3afca9fcd2c63ce56a8edaa0993886abefbe9a70dafcba32c4468965e7e9b7e3
6
+ metadata.gz: b5f00b54456eca2af91c4d8ba66394a43ed5f06f09ebc979a73f164feab55166d2d564ffc3e6a30ee369f33d85b9d1ddf0ae815f3c398ed240af45c10b65f28e
7
+ data.tar.gz: b0e2cd31a142e568fb7dcd5e40b27cc162d60c6c4e632df108a7306beca630a799c721dcb179c5e0380863dab6c1dca2d7f5af981d74c8cbc5dfe63b193b3232
data/bin/ebd ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'deploy'
4
+
5
+ Deploy::Deployer.start(ARGV)
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
17
- spec.executables = ['eb-deploy']
17
+ spec.executables = ['eb-deploy', 'ebd']
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ['lib']
20
20
 
@@ -22,5 +22,5 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency "rake", "~> 10.0"
23
23
 
24
24
  spec.add_dependency 'thor'
25
- spec.add_dependency 'user_config'
25
+ spec.add_dependency 'highline'
26
26
  end
data/lib/deploy.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  require 'thor'
2
- require 'user_config'
2
+ require 'highline/import'
3
3
 
4
4
  require 'deploy/output'
5
5
 
@@ -4,8 +4,17 @@ module Deploy
4
4
 
5
5
  desc 'setup config', 'setup config'
6
6
  def setup
7
- command = 'eb init'
8
- system(command)
7
+ (shout('AWS creds already configured at ~/.aws/config.'); exit(1)) if File.exist?(File.expand_path('~/.aws/config'))
8
+
9
+ key = ask('Enter AWS Key:')
10
+ secret = ask('Enter AWS Secret:')
11
+
12
+ File.open(File.expand_path('~/.aws/config'), 'w') do |f|
13
+ f.puts '[eb-cli]'
14
+ f.puts "aws_access_key_id = #{key}"
15
+ f.puts "aws_secret_access_key = #{secret}"
16
+ end
17
+ (shout('AWS creds successfully configured at ~/.aws/config.'); exit(0)) if File.exist?(File.expand_path('~/.aws/config'))
9
18
  end
10
19
 
11
20
  method_option :version, aliases: '-v', desc: 'Version'
@@ -69,6 +78,7 @@ module Deploy
69
78
  end
70
79
 
71
80
  def run_deploy(version)
81
+ shout "Deploying #{version} to elastic beanstalk"
72
82
  command = "eb deploy --label #{version}"
73
83
  exit(1) unless system(command)
74
84
  end
@@ -77,15 +87,15 @@ module Deploy
77
87
  #config_file['current_version'] = version
78
88
  end
79
89
 
80
- def config_file
90
+ def aws_config_file
81
91
  #UserConfig.new('.eb-deploy')['versions']
82
92
  end
83
93
 
84
94
  def check_setup
85
95
  (shout('docker not installed'); exit(1)) unless command?('docker')
86
96
  (shout('eb command not installed'); exit(1)) unless command?('eb')
87
- (shout('elasticbeanstalk not configured. run setup command'); exit(1)) unless File.exist?('.elasticbeanstalk')
88
- (shout('aws credentials not configured.'); exit(1)) unless File.exist?(File.expand_path('~/.aws/config'))
97
+ (shout('elasticbeanstalk not configured for this project. run "eb init".'); exit(1)) unless File.exist?('.elasticbeanstalk')
98
+ (shout('AWS credentials not configured.'); exit(1)) unless File.exist?(File.expand_path('~/.aws/config'))
89
99
  (shout('ENV DOCKER_REPO not set'); exit(1)) unless ENV['DOCKER_REPO']
90
100
  end
91
101
 
@@ -1,3 +1,3 @@
1
1
  module Deploy
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eb-docker-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-12 00:00:00.000000000 Z
11
+ date: 2015-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: user_config
56
+ name: highline
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
@@ -71,6 +71,7 @@ email:
71
71
  - thogg4@gmail.com
72
72
  executables:
73
73
  - eb-deploy
74
+ - ebd
74
75
  extensions: []
75
76
  extra_rdoc_files: []
76
77
  files:
@@ -80,6 +81,7 @@ files:
80
81
  - README.md
81
82
  - Rakefile
82
83
  - bin/eb-deploy
84
+ - bin/ebd
83
85
  - eb-docker-deploy.gemspec
84
86
  - lib/deploy.rb
85
87
  - lib/deploy/deployer.rb