eks 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 +16 -0
- data/.rspec +2 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +93 -0
- data/Guardfile +19 -0
- data/LICENSE.txt +22 -0
- data/README.md +42 -0
- data/Rakefile +6 -0
- data/eks.gemspec +32 -0
- data/exe/eks +14 -0
- data/lib/eks.rb +7 -0
- data/lib/eks/cli.rb +19 -0
- data/lib/eks/cli/help.rb +13 -0
- data/lib/eks/command.rb +25 -0
- data/lib/eks/version.rb +3 -0
- data/spec/lib/cli_spec.rb +19 -0
- data/spec/spec_helper.rb +22 -0
- metadata +190 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d6c90d8dc9852285159d0493e241e15984bab0e8
|
4
|
+
data.tar.gz: 4721299808f408a479378cb1ab5d73d45df4160b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c67a30af7f593aa3fe5c0ba2eb3de8cffd20fd2016a6ae65d4de7713a8ff3fc8e1e61f8fe1614f77308b5f8ef700a1f7170d1efcf959df8cd1df144ed49f920d
|
7
|
+
data.tar.gz: fe26fc117949493f6abc2505bf24bdba4758660ffe69b8ec571a56c1da7f07c8cf739f29b54710c5d8e3424795a68b5396c092c8ce1e57f10c927923f02a8edd
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
eks (0.0.1)
|
5
|
+
colorize
|
6
|
+
hashie
|
7
|
+
thor
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
byebug (9.1.0)
|
13
|
+
celluloid (0.16.0)
|
14
|
+
timers (~> 4.0.0)
|
15
|
+
codeclimate-test-reporter (0.4.4)
|
16
|
+
simplecov (>= 0.7.1, < 1.0.0)
|
17
|
+
coderay (1.1.0)
|
18
|
+
colorize (0.7.5)
|
19
|
+
diff-lcs (1.2.5)
|
20
|
+
docile (1.1.5)
|
21
|
+
ffi (1.9.6)
|
22
|
+
formatador (0.2.5)
|
23
|
+
guard (2.10.5)
|
24
|
+
formatador (>= 0.2.4)
|
25
|
+
listen (~> 2.7)
|
26
|
+
lumberjack (~> 1.0)
|
27
|
+
nenv (~> 0.1)
|
28
|
+
pry (>= 0.9.12)
|
29
|
+
thor (>= 0.18.1)
|
30
|
+
guard-bundler (2.1.0)
|
31
|
+
bundler (~> 1.0)
|
32
|
+
guard (~> 2.2)
|
33
|
+
guard-compat (~> 1.1)
|
34
|
+
guard-compat (1.2.0)
|
35
|
+
guard-rspec (4.5.0)
|
36
|
+
guard (~> 2.1)
|
37
|
+
guard-compat (~> 1.1)
|
38
|
+
rspec (>= 2.99.0, < 4.0)
|
39
|
+
hashie (3.3.2)
|
40
|
+
hitimes (1.2.2)
|
41
|
+
listen (2.8.4)
|
42
|
+
celluloid (>= 0.15.2)
|
43
|
+
rb-fsevent (>= 0.9.3)
|
44
|
+
rb-inotify (>= 0.9)
|
45
|
+
lumberjack (1.0.9)
|
46
|
+
method_source (0.8.2)
|
47
|
+
multi_json (1.10.1)
|
48
|
+
nenv (0.1.1)
|
49
|
+
pry (0.10.1)
|
50
|
+
coderay (~> 1.1.0)
|
51
|
+
method_source (~> 0.8.1)
|
52
|
+
slop (~> 3.4)
|
53
|
+
rake (10.4.2)
|
54
|
+
rb-fsevent (0.9.4)
|
55
|
+
rb-inotify (0.9.5)
|
56
|
+
ffi (>= 0.5.0)
|
57
|
+
rspec (3.1.0)
|
58
|
+
rspec-core (~> 3.1.0)
|
59
|
+
rspec-expectations (~> 3.1.0)
|
60
|
+
rspec-mocks (~> 3.1.0)
|
61
|
+
rspec-core (3.1.7)
|
62
|
+
rspec-support (~> 3.1.0)
|
63
|
+
rspec-expectations (3.1.2)
|
64
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
65
|
+
rspec-support (~> 3.1.0)
|
66
|
+
rspec-mocks (3.1.3)
|
67
|
+
rspec-support (~> 3.1.0)
|
68
|
+
rspec-support (3.1.2)
|
69
|
+
simplecov (0.9.1)
|
70
|
+
docile (~> 1.1.0)
|
71
|
+
multi_json (~> 1.0)
|
72
|
+
simplecov-html (~> 0.8.0)
|
73
|
+
simplecov-html (0.8.0)
|
74
|
+
slop (3.6.0)
|
75
|
+
thor (0.19.1)
|
76
|
+
timers (4.0.1)
|
77
|
+
hitimes
|
78
|
+
|
79
|
+
PLATFORMS
|
80
|
+
ruby
|
81
|
+
|
82
|
+
DEPENDENCIES
|
83
|
+
bundler
|
84
|
+
byebug
|
85
|
+
codeclimate-test-reporter
|
86
|
+
eks!
|
87
|
+
guard
|
88
|
+
guard-bundler
|
89
|
+
guard-rspec
|
90
|
+
rake
|
91
|
+
|
92
|
+
BUNDLED WITH
|
93
|
+
1.16.0
|
data/Guardfile
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
guard "bundler", cmd: "bundle" do
|
2
|
+
watch("Gemfile")
|
3
|
+
watch(/^.+\.gemspec/)
|
4
|
+
end
|
5
|
+
|
6
|
+
guard :rspec, cmd: "bundle exec rspec" do
|
7
|
+
require "guard/rspec/dsl"
|
8
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
9
|
+
|
10
|
+
# RSpec files
|
11
|
+
rspec = dsl.rspec
|
12
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
13
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
14
|
+
watch(rspec.spec_files)
|
15
|
+
|
16
|
+
# Ruby files
|
17
|
+
ruby = dsl.ruby
|
18
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
19
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Tung Nguyen
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# Eks
|
2
|
+
|
3
|
+
[![Build Status](https://magnum.travis-ci.com/)](https://magnum.travis-ci.com/)
|
4
|
+
[![Code Climate](https://codeclimate.com/)](https://codeclimate.com/)
|
5
|
+
[![Code Climate](https://codeclimate.com/)](https://codeclimate.com/)
|
6
|
+
|
7
|
+
To these the eks, run these commands:
|
8
|
+
|
9
|
+
TODO: Write a gem description
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
Add this line to your application's Gemfile:
|
14
|
+
|
15
|
+
```sh
|
16
|
+
gem "eks"
|
17
|
+
```
|
18
|
+
|
19
|
+
And then execute:
|
20
|
+
|
21
|
+
```sh
|
22
|
+
$ bundle
|
23
|
+
```
|
24
|
+
|
25
|
+
Or install it yourself as:
|
26
|
+
|
27
|
+
```sh
|
28
|
+
$ gem install eks
|
29
|
+
```
|
30
|
+
## Usage
|
31
|
+
|
32
|
+
```sh
|
33
|
+
exe/eks hello yourname
|
34
|
+
```
|
35
|
+
|
36
|
+
## Contributing
|
37
|
+
|
38
|
+
1. Fork it
|
39
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
40
|
+
3. Commit your changes (`git commit -am "Add some feature"`)
|
41
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
42
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
data/eks.gemspec
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "eks/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "eks"
|
8
|
+
spec.version = Eks::VERSION
|
9
|
+
spec.authors = ["Tung Nguyen"]
|
10
|
+
spec.email = ["tongueroo@gmail.com"]
|
11
|
+
spec.description = %q{eks tool}
|
12
|
+
spec.summary = %q{eks tool}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.bindir = "exe"
|
18
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_dependency "thor"
|
23
|
+
spec.add_dependency "hashie"
|
24
|
+
spec.add_dependency "colorize"
|
25
|
+
|
26
|
+
spec.add_development_dependency "bundler"
|
27
|
+
spec.add_development_dependency "byebug"
|
28
|
+
spec.add_development_dependency "rake"
|
29
|
+
spec.add_development_dependency "guard"
|
30
|
+
spec.add_development_dependency "guard-bundler"
|
31
|
+
spec.add_development_dependency "guard-rspec"
|
32
|
+
end
|
data/exe/eks
ADDED
data/lib/eks.rb
ADDED
data/lib/eks/cli.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require "thor"
|
2
|
+
require "eks/cli/help"
|
3
|
+
|
4
|
+
module Eks
|
5
|
+
|
6
|
+
class CLI < Command
|
7
|
+
class_option :verbose, type: :boolean
|
8
|
+
class_option :noop, type: :boolean
|
9
|
+
|
10
|
+
desc "hello NAME", "say hello to NAME"
|
11
|
+
long_desc Help.hello
|
12
|
+
option :from, desc: "from person"
|
13
|
+
def hello(name)
|
14
|
+
puts "from: #{options[:from]}" if options[:from]
|
15
|
+
puts "Hello #{name}"
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
data/lib/eks/cli/help.rb
ADDED
data/lib/eks/command.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
require "thor"
|
2
|
+
|
3
|
+
module Eks
|
4
|
+
class Command < Thor
|
5
|
+
class << self
|
6
|
+
def dispatch(m, args, options, config)
|
7
|
+
# Allow calling for help via:
|
8
|
+
# eks command help
|
9
|
+
# eks command -h
|
10
|
+
# eks command --help
|
11
|
+
# eks command -D
|
12
|
+
#
|
13
|
+
# as well thor's normal way:
|
14
|
+
#
|
15
|
+
# eks help command
|
16
|
+
help_flags = Thor::HELP_MAPPINGS + ["help"]
|
17
|
+
if args.length > 1 && !(args & help_flags).empty?
|
18
|
+
args -= help_flags
|
19
|
+
args.insert(-2, "help")
|
20
|
+
end
|
21
|
+
super
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/eks/version.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
# to run specs with what"s remembered from vcr
|
4
|
+
# $ rake
|
5
|
+
#
|
6
|
+
# to run specs with new fresh data from aws api calls
|
7
|
+
# $ rake clean:vcr ; time rake
|
8
|
+
describe Eks::CLI do
|
9
|
+
before(:all) do
|
10
|
+
@args = "--from Tung"
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "eks" do
|
14
|
+
it "should hello world" do
|
15
|
+
out = execute("exe/eks hello world #{@args}")
|
16
|
+
expect(out).to include("from: Tung\nHello world")
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
ENV["TEST"] = "1"
|
2
|
+
|
3
|
+
require "simplecov"
|
4
|
+
SimpleCov.start
|
5
|
+
|
6
|
+
require "pp"
|
7
|
+
|
8
|
+
root = File.expand_path("../../", __FILE__)
|
9
|
+
require "#{root}/lib/eks"
|
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
|
+
end
|
19
|
+
|
20
|
+
RSpec.configure do |c|
|
21
|
+
c.include Helpers
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,190 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: eks
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tung Nguyen
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-11-30 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: hashie
|
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: colorize
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: byebug
|
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: rake
|
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
|
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-bundler
|
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
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: guard-rspec
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
description: eks tool
|
140
|
+
email:
|
141
|
+
- tongueroo@gmail.com
|
142
|
+
executables:
|
143
|
+
- eks
|
144
|
+
extensions: []
|
145
|
+
extra_rdoc_files: []
|
146
|
+
files:
|
147
|
+
- ".gitignore"
|
148
|
+
- ".rspec"
|
149
|
+
- Gemfile
|
150
|
+
- Gemfile.lock
|
151
|
+
- Guardfile
|
152
|
+
- LICENSE.txt
|
153
|
+
- README.md
|
154
|
+
- Rakefile
|
155
|
+
- eks.gemspec
|
156
|
+
- exe/eks
|
157
|
+
- lib/eks.rb
|
158
|
+
- lib/eks/cli.rb
|
159
|
+
- lib/eks/cli/help.rb
|
160
|
+
- lib/eks/command.rb
|
161
|
+
- lib/eks/version.rb
|
162
|
+
- spec/lib/cli_spec.rb
|
163
|
+
- spec/spec_helper.rb
|
164
|
+
homepage: ''
|
165
|
+
licenses:
|
166
|
+
- MIT
|
167
|
+
metadata: {}
|
168
|
+
post_install_message:
|
169
|
+
rdoc_options: []
|
170
|
+
require_paths:
|
171
|
+
- lib
|
172
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
173
|
+
requirements:
|
174
|
+
- - ">="
|
175
|
+
- !ruby/object:Gem::Version
|
176
|
+
version: '0'
|
177
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
178
|
+
requirements:
|
179
|
+
- - ">="
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: '0'
|
182
|
+
requirements: []
|
183
|
+
rubyforge_project:
|
184
|
+
rubygems_version: 2.6.13
|
185
|
+
signing_key:
|
186
|
+
specification_version: 4
|
187
|
+
summary: eks tool
|
188
|
+
test_files:
|
189
|
+
- spec/lib/cli_spec.rb
|
190
|
+
- spec/spec_helper.rb
|