jack-eb 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +25 -0
- data/.rspec +1 -0
- data/.travis.yml +6 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +107 -0
- data/Guardfile +12 -0
- data/LICENSE.txt +22 -0
- data/README.md +135 -0
- data/Rakefile +6 -0
- data/bin/jack +9 -0
- data/jack.gemspec +30 -0
- data/lib/jack.rb +14 -0
- data/lib/jack/cli.rb +54 -0
- data/lib/jack/cli/help.rb +107 -0
- data/lib/jack/config.rb +13 -0
- data/lib/jack/config/diff.rb +44 -0
- data/lib/jack/config/download.rb +66 -0
- data/lib/jack/config/sort.rb +19 -0
- data/lib/jack/config/transmit.rb +77 -0
- data/lib/jack/config/upload.rb +97 -0
- data/lib/jack/config/yaml_formatter.rb +30 -0
- data/lib/jack/create.rb +78 -0
- data/lib/jack/default/create.yml +1 -0
- data/lib/jack/ext/hash.rb +17 -0
- data/lib/jack/ui.rb +16 -0
- data/lib/jack/util.rb +20 -0
- data/lib/jack/version.rb +3 -0
- data/lib/jack/version_checker.rb +37 -0
- data/spec/fixtures/project/jack/cfg/stag-rails-app.cfg.yml +3 -0
- data/spec/lib/cli_spec.rb +44 -0
- data/spec/lib/config/diff_spec.rb +21 -0
- data/spec/lib/config/download_spec.rb +19 -0
- data/spec/lib/config/sort_spec.rb +16 -0
- data/spec/lib/config/transmit_spec.rb +41 -0
- data/spec/lib/config/upload_spec.rb +26 -0
- data/spec/lib/config/yaml_formatter_spec.rb +49 -0
- data/spec/lib/config_spec.rb +6 -0
- data/spec/lib/create_spec.rb +34 -0
- data/spec/lib/verison_checker_spec.rb +32 -0
- data/spec/spec_helper.rb +35 -0
- metadata +211 -0
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Jack::VersionChecker do
|
4
|
+
let(:checker) { Jack::VersionChecker.new }
|
5
|
+
|
6
|
+
describe "version checker" do
|
7
|
+
it "should exit if version is less than required version" do
|
8
|
+
expect(checker).to receive(:get_version).and_return("EB CLI 3.0.0 (Python 2.7.6)")
|
9
|
+
expect(checker).to receive(:leave).at_least(:once)
|
10
|
+
checker.run
|
11
|
+
end
|
12
|
+
|
13
|
+
it "should not exit if version matches required version" do
|
14
|
+
expect(checker).to receive(:get_version).and_return("EB CLI 3.1.2 (Python 2.7.6)")
|
15
|
+
allow(checker).to receive(:leave).and_return(true) # need to stub in order to use to_nav have_received
|
16
|
+
expect(checker).to_not have_received(:leave)
|
17
|
+
checker.run
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should not exit if version is great than required version" do
|
21
|
+
expect(checker).to receive(:get_version).and_return("EB CLI 3.2.0 (Python 2.7.6)")
|
22
|
+
allow(checker).to receive(:leave).and_return(true) # need to stub in order to use to_nav have_received
|
23
|
+
expect(checker).to_not have_received(:leave)
|
24
|
+
checker.run
|
25
|
+
end
|
26
|
+
|
27
|
+
it "parse version" do
|
28
|
+
version = checker.parse_version("EB CLI 3.2.0 (Python 2.7.6)")
|
29
|
+
expect(version).to eq [3,2,0]
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
ENV['TEST'] = '1'
|
2
|
+
|
3
|
+
require "codeclimate-test-reporter"
|
4
|
+
CodeClimate::TestReporter.start
|
5
|
+
|
6
|
+
require "pp"
|
7
|
+
|
8
|
+
root = File.expand_path('../../', __FILE__)
|
9
|
+
require "#{root}/lib/jack"
|
10
|
+
|
11
|
+
module Helpers
|
12
|
+
def execute(cmd)
|
13
|
+
puts "Running: #{cmd}" if ENV['DEBUG']
|
14
|
+
out = `#{cmd}`
|
15
|
+
puts out if ENV['DEBUG']
|
16
|
+
out
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_options
|
20
|
+
{
|
21
|
+
noop: true,
|
22
|
+
mute: true,
|
23
|
+
force: true,
|
24
|
+
root: @root,
|
25
|
+
env_name: "stag-rails-app-s9"
|
26
|
+
}
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
RSpec.configure do |c|
|
31
|
+
c.include Helpers
|
32
|
+
c.before :all do
|
33
|
+
@root = "spec/fixtures/project"
|
34
|
+
end
|
35
|
+
end
|
metadata
ADDED
@@ -0,0 +1,211 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jack-eb
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tung Nguyen
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-03-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: thor
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: colorize
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: aws-sdk
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.3'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.3'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: guard
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: guard-bundler
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: guard-rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
description: Wrapper tool to manage AWS Elastic Beanstalk environments
|
126
|
+
email:
|
127
|
+
- tongueroo@gmail.com
|
128
|
+
executables:
|
129
|
+
- jack
|
130
|
+
extensions: []
|
131
|
+
extra_rdoc_files: []
|
132
|
+
files:
|
133
|
+
- ".gitignore"
|
134
|
+
- ".rspec"
|
135
|
+
- ".travis.yml"
|
136
|
+
- Gemfile
|
137
|
+
- Gemfile.lock
|
138
|
+
- Guardfile
|
139
|
+
- LICENSE.txt
|
140
|
+
- README.md
|
141
|
+
- Rakefile
|
142
|
+
- bin/jack
|
143
|
+
- jack.gemspec
|
144
|
+
- lib/jack.rb
|
145
|
+
- lib/jack/cli.rb
|
146
|
+
- lib/jack/cli/help.rb
|
147
|
+
- lib/jack/config.rb
|
148
|
+
- lib/jack/config/diff.rb
|
149
|
+
- lib/jack/config/download.rb
|
150
|
+
- lib/jack/config/sort.rb
|
151
|
+
- lib/jack/config/transmit.rb
|
152
|
+
- lib/jack/config/upload.rb
|
153
|
+
- lib/jack/config/yaml_formatter.rb
|
154
|
+
- lib/jack/create.rb
|
155
|
+
- lib/jack/default/create.yml
|
156
|
+
- lib/jack/ext/hash.rb
|
157
|
+
- lib/jack/ui.rb
|
158
|
+
- lib/jack/util.rb
|
159
|
+
- lib/jack/version.rb
|
160
|
+
- lib/jack/version_checker.rb
|
161
|
+
- spec/fixtures/project/.elasticbeanstalk/config.yml
|
162
|
+
- spec/fixtures/project/jack/cfg/stag-rails-app.cfg.yml
|
163
|
+
- spec/lib/cli_spec.rb
|
164
|
+
- spec/lib/config/diff_spec.rb
|
165
|
+
- spec/lib/config/download_spec.rb
|
166
|
+
- spec/lib/config/sort_spec.rb
|
167
|
+
- spec/lib/config/transmit_spec.rb
|
168
|
+
- spec/lib/config/upload_spec.rb
|
169
|
+
- spec/lib/config/yaml_formatter_spec.rb
|
170
|
+
- spec/lib/config_spec.rb
|
171
|
+
- spec/lib/create_spec.rb
|
172
|
+
- spec/lib/verison_checker_spec.rb
|
173
|
+
- spec/spec_helper.rb
|
174
|
+
homepage: ''
|
175
|
+
licenses:
|
176
|
+
- MIT
|
177
|
+
metadata: {}
|
178
|
+
post_install_message:
|
179
|
+
rdoc_options: []
|
180
|
+
require_paths:
|
181
|
+
- lib
|
182
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - ">="
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '0'
|
187
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
188
|
+
requirements:
|
189
|
+
- - ">="
|
190
|
+
- !ruby/object:Gem::Version
|
191
|
+
version: '0'
|
192
|
+
requirements: []
|
193
|
+
rubyforge_project:
|
194
|
+
rubygems_version: 2.4.5
|
195
|
+
signing_key:
|
196
|
+
specification_version: 4
|
197
|
+
summary: Wrapper tool to manage AWS Elastic Beanstalk environments
|
198
|
+
test_files:
|
199
|
+
- spec/fixtures/project/.elasticbeanstalk/config.yml
|
200
|
+
- spec/fixtures/project/jack/cfg/stag-rails-app.cfg.yml
|
201
|
+
- spec/lib/cli_spec.rb
|
202
|
+
- spec/lib/config/diff_spec.rb
|
203
|
+
- spec/lib/config/download_spec.rb
|
204
|
+
- spec/lib/config/sort_spec.rb
|
205
|
+
- spec/lib/config/transmit_spec.rb
|
206
|
+
- spec/lib/config/upload_spec.rb
|
207
|
+
- spec/lib/config/yaml_formatter_spec.rb
|
208
|
+
- spec/lib/config_spec.rb
|
209
|
+
- spec/lib/create_spec.rb
|
210
|
+
- spec/lib/verison_checker_spec.rb
|
211
|
+
- spec/spec_helper.rb
|