ec2ctl 0.6.2 → 0.7.1

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: 310049fb8897852626bb662726ada122f0b27f47
4
- data.tar.gz: 7085150b8fc0616cc6d27335ea7ace991c5b5577
3
+ metadata.gz: be9dd566ef5630b318d99e4834870b3a213e8aa8
4
+ data.tar.gz: 1978d32839a8df8168990262e39470031e9c2085
5
5
  SHA512:
6
- metadata.gz: 22a249531c6206262fa751819443ee68009b812e1bfd25864915f73e3fd0725bb3dd8189db94bd6c792f9992a638038bcde8fb88905a641215447740b6b2c75d
7
- data.tar.gz: ac98dba966f73897b505c9c3736a9e771fa551bcccf981225e50a229003d8218c3e60c3fcb19d4fc1185703caac457b8598156371e58bb2b83f853ae49c26c5e
6
+ metadata.gz: d2248fd2fd203ef10b914c7099a99932c2c24215e2bb020133a8e5e010474bb48ba4d8f1dd18e872cf91ed986295c13adb0095c6c0881ea5b721825a8778be1c
7
+ data.tar.gz: 0c73e1a13a95204a8cc5f81582984eb2df9f7c35dff056cdd9d31adf85c16bbcd31e7c1387eb318983109a2823481a81deaff210abc5adffb94504d6e841c9fa
data/README.md CHANGED
@@ -1,14 +1,14 @@
1
- # Ec2ctl
1
+ # EC2Ctl
2
2
 
3
- **!!! WORK IN PROGRESS !!!**
4
-
5
- TODO: Add spec. etc...
3
+ **!!! Version 0.7 or later is not compatible with 0.6 !!!**
6
4
 
7
5
  ## Installation
8
6
 
9
7
  Add this line to your application's Gemfile:
10
8
 
11
- gem 'ec2ctl'
9
+ ```ruby
10
+ gem 'ec2ctl'
11
+ ```
12
12
 
13
13
  And then execute:
14
14
 
@@ -20,34 +20,14 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- TODO: Write more usage instructions here
23
+ TODO: Write usage instructions here
24
24
 
25
- ```
26
- Commands:
27
- ec2ctl add NAME ELB_NAME # Add instance to ELB. Instance will be searched by Name tag.
28
- ec2ctl help [COMMAND] # Describe available commands or one specific command
29
- ec2ctl lb ELB_NAME # Show load balancer registered instance statuses.
30
- ec2ctl list PATTERN # List all instances in region. Specify PATTERN to filter results by name.
31
- ec2ctl remove NAME ELB_NAME # Remove instance from ELB. Instance will be searched by Name tag.
32
- ec2ctl ssh NAME COMMAND # Execute remote command to specified instance by given name.
33
- ec2ctl start NAME # Start instance. Instance will be searched by Name tag.
34
- ec2ctl status NAME # Show instance status. Instance will be searched by Name tag.
35
- ec2ctl stop NAME # Stop instance. Instance will be searched by Name tag.
36
- ec2ctl reboot NAME # Reboot instance. Instance will be searched by Name tag.
37
-
38
- Options:
39
- k, [--access-key-id=ACCESS_KEY_ID]
40
- s, [--secret-access-key=SECRET_ACCESS_KEY]
41
- r, [--region=REGION]
42
- [--profile=PROFILE]
43
- [--color], [--no-color]
44
- # Default: true
45
- ```
25
+ ## Development
26
+
27
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
28
+
29
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
46
30
 
47
31
  ## Contributing
48
32
 
49
- 1. Fork it ( http://github.com/y13i/ec2ctl/fork )
50
- 2. Create your feature branch (`git checkout -b my-new-feature`)
51
- 3. Commit your changes (`git commit -am 'Add some feature'`)
52
- 4. Push to the branch (`git push origin my-new-feature`)
53
- 5. Create new Pull Request
33
+ Bug reports and pull requests are welcome on GitHub at https://github.com/y13i/ec2ctl.
data/Rakefile CHANGED
@@ -1 +1,6 @@
1
1
  require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "ec2ctl"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ require "pry"
11
+ Pry.start
data/bin/setup ADDED
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
data/ec2ctl.gemspec CHANGED
@@ -5,29 +5,25 @@ require 'ec2ctl/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "ec2ctl"
8
- spec.version = Ec2ctl::VERSION
8
+ spec.version = EC2Ctl::VERSION
9
9
  spec.authors = ["y13i"]
10
10
  spec.email = ["email@y13i.com"]
11
- spec.summary = %q{Yet another handy EC2 tools.}
12
- spec.description = %q{Can start/stop instances, add/remove to load balancer, remote command via ssh.}
11
+
12
+ spec.summary = %q{A minimum tool for EC2 instances.}
13
+ spec.description = %q{A minimum tool for EC2 instances.}
13
14
  spec.homepage = "https://github.com/y13i/ec2ctl"
14
- spec.license = "MIT"
15
15
 
16
- spec.files = `git ls-files -z`.split("\x0")
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.bindir = "exe"
18
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "thor"
22
- spec.add_dependency "nokogiri"
23
- spec.add_dependency "aws-sdk-v1"
24
- spec.add_dependency "aws-sdk"
25
- spec.add_dependency "net-ssh"
26
- spec.add_dependency "colorize"
21
+ spec.add_dependency "commander"
22
+ spec.add_dependency "aws-sdk", ">= 2.0"
27
23
  spec.add_dependency "terminal-table"
28
- spec.add_dependency "unindent"
29
- spec.add_dependency "aws_config"
30
24
 
31
- spec.add_development_dependency "bundler", "~> 1.5"
32
- spec.add_development_dependency "rake"
25
+ spec.add_development_dependency "bundler", "~> 1.10"
26
+ spec.add_development_dependency "rake", "~> 10.0"
27
+ spec.add_development_dependency "rspec"
28
+ spec.add_development_dependency "pry"
33
29
  end
data/exe/ec2ctl ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "ec2ctl"
4
+
5
+ EC2Ctl::CLI.new.run if $0 == __FILE__
data/lib/ec2ctl/cli.rb ADDED
@@ -0,0 +1,75 @@
1
+ require "commander"
2
+ require "json"
3
+ require "yaml"
4
+ require "terminal-table"
5
+
6
+ module EC2Ctl
7
+ class CLI
8
+ include Commander::Methods
9
+
10
+ def run
11
+ program :name, "EC2Ctl"
12
+ program :version, EC2Ctl::VERSION
13
+ program :description, "A minimum tool for EC2 instances."
14
+
15
+ global_option "-p", "--profile PROFILE", "Load AWS credentials from shared credentials file by specified name."
16
+ global_option "-r", "--region REGION", "Specify AWS region."
17
+
18
+ default_command :list
19
+
20
+ command :list do |c|
21
+ c.syntax = "list [options]"
22
+ c.description = "List EC2 instances"
23
+
24
+ c.option "-a", "--attributes STRING", String, "Attribute of EC2 instances separated by commas."
25
+ c.option "-s", "--search STRING", String, "Search instance with given KEY=VALUE attributes."
26
+ c.option "-o", "--order STRING", String, "Order list by specified attribute."
27
+ c.option "-f", "--format STRING", String, "Output format (table/json/yaml)."
28
+
29
+ c.action do |args, options|
30
+ options.default(
31
+ attributes: "id,tag:Name,instance_type,private_ip_address,public_ip_address,state",
32
+ format: "table",
33
+ order: "tag:Name",
34
+ )
35
+
36
+ set_client(options)
37
+
38
+ search = options.search ? options.search.split(",").map {|s| s.split("=")}.to_h : {}
39
+ attributes = (options.attributes.split(",") + search.keys).uniq
40
+ instance_infos = client.instance_infos(attributes, search).sort_by {|i| i[options.order]}
41
+
42
+ if instance_infos.empty?
43
+ say "Instance not found."
44
+ else
45
+ case options.format
46
+ when /table/i
47
+ say Terminal::Table.new(
48
+ headings: attributes,
49
+ rows: instance_infos.map {|i| attributes.map {|a| i[a]}}
50
+ )
51
+ when /json/i
52
+ say JSON.pretty_generate(instance_infos)
53
+ when /yaml/i
54
+ say instance_infos.to_yaml
55
+ end
56
+ end
57
+ end
58
+ end
59
+
60
+ alias_command :ls, :list
61
+
62
+ run!
63
+ end
64
+
65
+ private
66
+
67
+ def client
68
+ @client
69
+ end
70
+
71
+ def set_client(options)
72
+ @client = EC2Ctl::Client.new(profile: options.profile, region: options.region)
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,34 @@
1
+ require "aws-sdk"
2
+
3
+ module EC2Ctl
4
+ class Client
5
+ def initialize(config = {})
6
+ @ec2_resource = Aws::EC2::Resource.new(config)
7
+ end
8
+
9
+ def instance_infos(attributes = [], search = {})
10
+ @ec2_resource.instances.inject Array.new do |acc, instance|
11
+ instance_info = attributes.inject Hash.new do |acc, attribute|
12
+ acc[attribute] = case attribute
13
+ when /\Atag:/i
14
+ instance.tags.find {|tag| tag.key == attribute.split(":").last}.value
15
+ when "state"
16
+ instance.state.name
17
+ else
18
+ instance.send attribute.intern
19
+ end
20
+
21
+ acc
22
+ end
23
+
24
+ if search.empty?
25
+ acc.push instance_info
26
+ else
27
+ acc.push instance_info if search.all? {|sk, sv| instance_info[sk].match Regexp.new(sv)}
28
+ end
29
+
30
+ acc
31
+ end
32
+ end
33
+ end
34
+ end
@@ -1,3 +1,3 @@
1
- module Ec2ctl
2
- VERSION = "0.6.2"
1
+ module EC2Ctl
2
+ VERSION = "0.7.1"
3
3
  end
data/lib/ec2ctl.rb CHANGED
@@ -1,243 +1,3 @@
1
- #require "lib/ec2ctl/version"
2
-
3
- require "thor"
4
- require "aws-sdk-v1"
5
- require "aws-sdk"
6
- require "aws"
7
- require "net/ssh"
8
- require "net/http"
9
- require "colorize"
10
- require "terminal-table"
11
- require "timeout"
12
- require "unindent"
13
- require "aws_config"
14
-
15
- module Ec2ctl
16
- class CLI < Thor
17
- own_region = begin
18
- timeout 3 do
19
- Net::HTTP.get("169.254.169.254", "/latest/meta-data/placement/availability-zone")[0..-2]
20
- end
21
- rescue
22
- nil
23
- end
24
-
25
- class_option :access_key_id, default: nil, aliases: [:k]
26
- class_option :secret_access_key, default: nil, aliases: [:s]
27
- class_option :region, default: own_region, aliases: [:r]
28
- class_option :profile
29
- class_option :color, default: true, type: :boolean
30
-
31
- desc "version", "Show ec2ctl gem version."
32
- def version
33
- puts VERSION
34
- end
35
-
36
- option :only, default: false
37
- option :sort, default: name, aliases: [:S]
38
- option :limit, type: :numeric, aliases: [:l]
39
- desc "list PATTERN", "List all instances in region. Specify PATTERN to filter results by name."
40
- def list pattern = ""
41
- rows = []
42
-
43
- ec2.instances.each do |instance|
44
- name = instance.tags["Name"].to_s
45
- next if !pattern.empty? and !name.match pattern
46
-
47
- rows << [
48
- instance.id,
49
- name,
50
- instance.instance_type,
51
- instance.private_ip_address,
52
- instance.public_ip_address,
53
- status_colorize(instance.status),
54
- ]
55
- end
56
-
57
- col = case options[:sort]
58
- when /ID/i then 0
59
- when /Name/i then 1
60
- when /Type/i then 2
61
- when /private/i then 3
62
- when /public/i then 4
63
- when /status/i then 5
64
- end
65
-
66
- rows.sort_by! {|row| row[col].to_s} if col
67
- rows = rows[0, options[:limit]] if options[:limit]
68
-
69
- unless options[:only]
70
- puts Terminal::Table.new headings: ["ID", "Name", "Type", "Private IP", "Public IP", "Status"], rows: rows
71
- else
72
- rows.each { |r| puts r[col] }
73
- end
74
- end
75
-
76
- desc "status NAME", "Show instance status. Instance will be searched by Name tag."
77
- def status name
78
- instance = find_instance_by_name name
79
- tags = instance.tags.to_h
80
-
81
- puts <<-EOS.unindent
82
- * Name: #{tags["Name"]}
83
- * Status: #{status_colorize instance.status}
84
- * Instance Type: #{instance.instance_type}
85
- * Private IP: #{instance.private_ip_address}
86
- * Public IP: #{instance.public_ip_address}
87
- * Availability Zone: #{instance.availability_zone}
88
- * Other Tags: #{tags.reject {|k, v| k == "Name"}.inspect}
89
- EOS
90
- end
91
-
92
- desc "start NAME", "Start instance. Instance will be searched by Name tag."
93
- def start name
94
- instance = find_instance_by_name name
95
- abort "Instance is not stopped!" unless instance.status == :stopped
96
- instance.start
97
- sleep 2
98
- puts "Instance is now #{status_colorize instance.status}."
99
- end
100
-
101
- desc "stop NAME", "Stop instance. Instance will be searched by Name tag."
102
- def stop name
103
- instance = find_instance_by_name name
104
- abort "Instance is not running!" unless instance.status == :running
105
- instance.stop
106
- sleep 2
107
- puts "Instance is now #{status_colorize instance.status}."
108
- end
109
-
110
- desc "reboot NAME", "Reboot instance. Instance will be searched by Name tag."
111
- def reboot name
112
- instance = find_instance_by_name name
113
- abort "Instance is not running!" unless instance.status == :running
114
- instance.reboot
115
- sleep 2
116
- end
117
-
118
- option :user, default: "ec2-user", aliases: [:u]
119
- option :port, default: 22, aliases: [:p]
120
- option :identity_file, default: "~/.ssh/id_rsa", aliases: [:i]
121
- option :passphrase, default: nil, aliases: [:P]
122
- option :via_public_ip, default: false, type: :boolean
123
- desc "ssh NAME COMMAND", "Execute remote command to specified instance by given name."
124
- def ssh name, command
125
- instance = find_instance_by_name name
126
- ip_address = options[:via_public_ip] ? instance.public_ip_address : instance.private_ip_address
127
-
128
- ssh_options = {
129
- keys: [options[:identity_file]],
130
- passphrase: options[:passphrase],
131
- }
132
-
133
- Net::SSH.start ip_address, options[:user], ssh_options do |ssh|
134
- puts ssh.exec!(command)
135
- end
136
- end
137
-
138
- desc "add NAME ELB_NAME", "Add instance to ELB. Instance will be searched by Name tag."
139
- def add name, elb_name
140
- instance = find_instance_by_name name
141
- load_balancer = find_load_balancer_by_name elb_name
142
-
143
- abort "Instance is already registered to the load balancer!" if load_balancer.instances.include? instance
144
-
145
- puts "Adding instance to the load balancer..."
146
- load_balancer.instances.add instance
147
- end
148
-
149
- desc "remove NAME ELB_NAME", "Remove instance from ELB. Instance will be searched by Name tag."
150
- def remove name, elb_name
151
- instance = find_instance_by_name name
152
- load_balancer = find_load_balancer_by_name elb_name
153
-
154
- abort "Instance is not registered to the load balancer!" unless load_balancer.instances.include? instance
155
-
156
- puts "Removing instance from the load balancer..."
157
- load_balancer.instances.remove instance
158
- end
159
-
160
- desc "lb ELB_NAME", "Show load balancer registered instance statuses."
161
- def lb elb_name
162
- load_balancer = find_load_balancer_by_name elb_name
163
- instances = load_balancer.instances
164
- rows = []
165
-
166
- load_balancer.instances.health.each do |instance_health|
167
- next unless instances.any? {|instance| instance.id == instance_health[:instance].id}
168
-
169
- rows << [
170
- instance_health[:instance].tags["Name"],
171
- instance_health[:instance].id,
172
- instance_health[:description],
173
- instance_health[:state],
174
- ]
175
- end
176
-
177
- puts Terminal::Table.new headings: ["Name", "Instance ID", "Description", "State"], rows: rows
178
- end
179
-
180
- private
181
-
182
- def get_profile_name
183
- profile_name = (options[:profile] == nil) ? "default" : options[:profile]
184
- profile_name
185
- end
186
-
187
- def aws_config
188
- hash = {}
189
-
190
- if options[:access_key_id] && options[:secret_access_key]
191
- hash.update access_key_id: options[:access_key_id]
192
- hash.update secret_access_key: options[:secret_access_key]
193
- else
194
- provider = AWS::Core::CredentialProviders::SharedCredentialFileProvider.new profile_name: get_profile_name
195
- #config.update credential_provider: provider
196
-
197
- # aws credential bug fix
198
- hash = provider.get_credentials
199
- hash[:access_key_id].strip! if hash[:access_key_id]
200
- end
201
-
202
- hash.update region: options[:region] if options[:region]
203
- hash
204
- end
205
-
206
- def ec2
207
- @ec2 ||= AWS::EC2.new aws_config
208
- end
209
-
210
- def elb
211
- @elb ||= AWS::ELB.new aws_config
212
- end
213
-
214
- def status_colorize status
215
- return status unless options[:color]
216
-
217
- color = case status
218
- when :pending, :stopping then :magenta
219
- when :running then :green
220
- when :stopped then :light_blue
221
- when :shutting_down then :yellow
222
- when :terminated then :red
223
- else :default
224
- end
225
-
226
- status.to_s.colorize color
227
- end
228
-
229
- def find_instance_by_name name
230
- instance = ec2.instances.with_tag("Name", name).first
231
- abort "No instance found!" unless instance
232
- puts "Instance found: " + instance.inspect
233
- instance
234
- end
235
-
236
- def find_load_balancer_by_name name
237
- load_balancer = elb.load_balancers[name]
238
- abort "No load balancer found!" unless load_balancer
239
- puts "Load balancer found: " + load_balancer.inspect
240
- load_balancer
241
- end
242
- end
243
- end
1
+ require "ec2ctl/version"
2
+ require "ec2ctl/cli"
3
+ require "ec2ctl/client"
metadata CHANGED
@@ -1,45 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ec2ctl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - y13i
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-28 00:00:00.000000000 Z
11
+ date: 2015-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
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: nokogiri
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-v1
14
+ name: commander
43
15
  requirement: !ruby/object:Gem::Requirement
44
16
  requirements:
45
17
  - - ">="
@@ -58,30 +30,16 @@ dependencies:
58
30
  requirements:
59
31
  - - ">="
60
32
  - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :runtime
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: net-ssh
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
33
+ version: '2.0'
76
34
  type: :runtime
77
35
  prerelease: false
78
36
  version_requirements: !ruby/object:Gem::Requirement
79
37
  requirements:
80
38
  - - ">="
81
39
  - !ruby/object:Gem::Version
82
- version: '0'
40
+ version: '2.0'
83
41
  - !ruby/object:Gem::Dependency
84
- name: colorize
42
+ name: terminal-table
85
43
  requirement: !ruby/object:Gem::Requirement
86
44
  requirements:
87
45
  - - ">="
@@ -95,41 +53,41 @@ dependencies:
95
53
  - !ruby/object:Gem::Version
96
54
  version: '0'
97
55
  - !ruby/object:Gem::Dependency
98
- name: terminal-table
56
+ name: bundler
99
57
  requirement: !ruby/object:Gem::Requirement
100
58
  requirements:
101
- - - ">="
59
+ - - "~>"
102
60
  - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :runtime
61
+ version: '1.10'
62
+ type: :development
105
63
  prerelease: false
106
64
  version_requirements: !ruby/object:Gem::Requirement
107
65
  requirements:
108
- - - ">="
66
+ - - "~>"
109
67
  - !ruby/object:Gem::Version
110
- version: '0'
68
+ version: '1.10'
111
69
  - !ruby/object:Gem::Dependency
112
- name: unindent
70
+ name: rake
113
71
  requirement: !ruby/object:Gem::Requirement
114
72
  requirements:
115
- - - ">="
73
+ - - "~>"
116
74
  - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :runtime
75
+ version: '10.0'
76
+ type: :development
119
77
  prerelease: false
120
78
  version_requirements: !ruby/object:Gem::Requirement
121
79
  requirements:
122
- - - ">="
80
+ - - "~>"
123
81
  - !ruby/object:Gem::Version
124
- version: '0'
82
+ version: '10.0'
125
83
  - !ruby/object:Gem::Dependency
126
- name: aws_config
84
+ name: rspec
127
85
  requirement: !ruby/object:Gem::Requirement
128
86
  requirements:
129
87
  - - ">="
130
88
  - !ruby/object:Gem::Version
131
89
  version: '0'
132
- type: :runtime
90
+ type: :development
133
91
  prerelease: false
134
92
  version_requirements: !ruby/object:Gem::Requirement
135
93
  requirements:
@@ -137,21 +95,7 @@ dependencies:
137
95
  - !ruby/object:Gem::Version
138
96
  version: '0'
139
97
  - !ruby/object:Gem::Dependency
140
- name: bundler
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: '1.5'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: '1.5'
153
- - !ruby/object:Gem::Dependency
154
- name: rake
98
+ name: pry
155
99
  requirement: !ruby/object:Gem::Requirement
156
100
  requirements:
157
101
  - - ">="
@@ -164,8 +108,7 @@ dependencies:
164
108
  - - ">="
165
109
  - !ruby/object:Gem::Version
166
110
  version: '0'
167
- description: Can start/stop instances, add/remove to load balancer, remote command
168
- via ssh.
111
+ description: A minimum tool for EC2 instances.
169
112
  email:
170
113
  - email@y13i.com
171
114
  executables:
@@ -175,16 +118,18 @@ extra_rdoc_files: []
175
118
  files:
176
119
  - ".gitignore"
177
120
  - Gemfile
178
- - LICENSE.txt
179
121
  - README.md
180
122
  - Rakefile
181
- - bin/ec2ctl
123
+ - bin/console
124
+ - bin/setup
182
125
  - ec2ctl.gemspec
126
+ - exe/ec2ctl
183
127
  - lib/ec2ctl.rb
128
+ - lib/ec2ctl/cli.rb
129
+ - lib/ec2ctl/client.rb
184
130
  - lib/ec2ctl/version.rb
185
131
  homepage: https://github.com/y13i/ec2ctl
186
- licenses:
187
- - MIT
132
+ licenses: []
188
133
  metadata: {}
189
134
  post_install_message:
190
135
  rdoc_options: []
@@ -202,8 +147,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
202
147
  version: '0'
203
148
  requirements: []
204
149
  rubyforge_project:
205
- rubygems_version: 2.4.5
150
+ rubygems_version: 2.4.5.1
206
151
  signing_key:
207
152
  specification_version: 4
208
- summary: Yet another handy EC2 tools.
153
+ summary: A minimum tool for EC2 instances.
209
154
  test_files: []
data/LICENSE.txt DELETED
@@ -1,22 +0,0 @@
1
- Copyright (c) 2014 y13i
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/bin/ec2ctl DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require "ec2ctl"
3
-
4
- Ec2ctl::CLI.start ARGV