pele 0.1.1.pre.pre

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8dee3c7fb02e233fcb5246850b6a767b358f2a42
4
+ data.tar.gz: d1930aaf37532cdc47aa426d752e0f57d33ccd37
5
+ SHA512:
6
+ metadata.gz: acb8664349387e61703180eab9800b5396ddaa4df56076963b2a36a95073f42e28ac85a3bf85c3615a27897d8f9ecf4a6357226405f7bceabd2e91b6d05a414d
7
+ data.tar.gz: dafad77fadb2c04231bf76704f6f7b2a766679f294556844233a90a6372426b25a74bd609b4e9093a61b65de5c936d604efb1249314d80e5d879483e0124cb9c
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in covfefe.gemspec
6
+ gemspec
data/README.md ADDED
@@ -0,0 +1,9 @@
1
+ # pele
2
+
3
+ Doesn't Work yet. Still work in pregress.
4
+
5
+ Maybe you can just use it to setup AWS in your computer using
6
+
7
+ ```ruby
8
+ pele init
9
+ ```
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "pele"
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
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/exe/pele ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'pele'
4
+
5
+ Pele::Cli.start(ARGV)
@@ -0,0 +1,20 @@
1
+ module Pele
2
+ module Regions
3
+ ALL = [
4
+ 'us-east-1',
5
+ 'us-east-2',
6
+ 'us-west-1',
7
+ 'us-west-2',
8
+ 'ca-central-1',
9
+ 'eu-west-1',
10
+ 'eu-central-1',
11
+ 'eu-west-2',
12
+ 'ap-northeast-1',
13
+ 'ap-northeast-2',
14
+ 'ap-southeast-1',
15
+ 'ap-southeast-2',
16
+ 'ap-south-1',
17
+ 'sa-east-1'
18
+ ].freeze
19
+ end
20
+ end
data/lib/pele/cli.rb ADDED
@@ -0,0 +1,40 @@
1
+ module Pele
2
+ class Cli < Thor
3
+ include Thor::Actions
4
+
5
+ desc 'attack init', 'Initializes the AWS credentials on your Machine'
6
+ def init
7
+ os = OS.windows? || OS.mac? || OS.linux?
8
+ unless os
9
+ puts ''
10
+ say("Looks like we could not identify your OS.\n\nPlease setup your ENV values as follows:\n\nAWS_ACCESS_KEY_ID=[YOUR ACCES KEY ID]\nAWS_SECRET_ACCESS_KEY=[YOUR SECRET KEY ID]", :red)
11
+ abort
12
+ end
13
+ puts "\e[H\e[2J"
14
+ say('Your OS identified: ', :yellow)
15
+ puts ''
16
+ puts OS.report
17
+ puts ''
18
+ prompt = TTY::Prompt.new active_color: :green
19
+ say('Provide your aws credentials below', :yellow)
20
+ puts ''
21
+ _aws_access_key_id = prompt.ask('AWS Access Key ID: '.colorize(:blue), required: true)
22
+ _aws_secret_access_key = prompt.ask('AWS Secret Access Key: '.colorize(:blue),required: true)
23
+ _aws_region = prompt.select('Choose a AWS region?'.colorize(:blue), Pele::Regions::ALL)
24
+ if _aws_access_key_id.empty? || _aws_secret_access_key.empty? || _aws_region.empty?
25
+ say('You need to provide all three credentials. Please try again', :red)
26
+ abort
27
+ end
28
+ if OS.windows?
29
+ create_file '%USERPROFILE%.awscredentials' do
30
+ "[default]\naws_access_key_id = #{_aws_access_key_id}\naws_secret_access_key = #{_aws_secret_access_key}\naws_region = #{_aws_region}"
31
+ end
32
+ else
33
+ create_file '~/.aws/credentials' do
34
+ "[default]\naws_access_key_id = #{_aws_access_key_id}\naws_secret_access_key = #{_aws_secret_access_key}\naws_region = #{_aws_region}"
35
+ end
36
+ end
37
+ end
38
+
39
+ end
40
+ end
@@ -0,0 +1,3 @@
1
+ module Pele
2
+ VERSION = "0.1.1-pre"
3
+ end
data/lib/pele.rb ADDED
@@ -0,0 +1,10 @@
1
+ require 'pele/version'
2
+ require 'thor'
3
+ require 'os'
4
+ require 'tty-prompt'
5
+ require 'pele/aws_regions'
6
+ require 'colorize'
7
+ require 'pele/cli'
8
+
9
+ module Pele
10
+ end
data/pele.gemspec ADDED
@@ -0,0 +1,39 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "pele/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "pele"
8
+ spec.version = Pele::VERSION
9
+ spec.authors = ["Suyesh Bhandari"]
10
+ spec.email = ["suyeshb@gmail.com"]
11
+
12
+ spec.summary = "Pele lets you deploy multiple servers and run load test"
13
+ spec.description = "Pele lets you deploy multiple servers and run load test"
14
+ spec.homepage = "https://github.com/suyesh/pele"
15
+
16
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
18
+ if spec.respond_to?(:metadata)
19
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
20
+ else
21
+ raise "RubyGems 2.0 or newer is required to protect against " \
22
+ "public gem pushes."
23
+ end
24
+
25
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
26
+ f.match(%r{^(test|spec|features)/})
27
+ end
28
+ spec.bindir = "exe"
29
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ["lib"]
31
+
32
+ spec.add_development_dependency "bundler", "~> 1.15"
33
+ spec.add_development_dependency "rake", "~> 10.0"
34
+ spec.add_dependency 'aws-sdk', '~> 2'
35
+ spec.add_dependency 'thor'
36
+ spec.add_dependency 'os'
37
+ spec.add_dependency 'tty-prompt'
38
+ spec.add_dependency 'colorize'
39
+ end
metadata ADDED
@@ -0,0 +1,155 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pele
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1.pre.pre
5
+ platform: ruby
6
+ authors:
7
+ - Suyesh Bhandari
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2017-08-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.15'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.15'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.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: thor
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !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: os
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
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: tty-prompt
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
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: colorize
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ description: Pele lets you deploy multiple servers and run load test
112
+ email:
113
+ - suyeshb@gmail.com
114
+ executables:
115
+ - pele
116
+ extensions: []
117
+ extra_rdoc_files: []
118
+ files:
119
+ - ".gitignore"
120
+ - Gemfile
121
+ - README.md
122
+ - Rakefile
123
+ - bin/console
124
+ - bin/setup
125
+ - exe/pele
126
+ - lib/pele.rb
127
+ - lib/pele/aws_regions.rb
128
+ - lib/pele/cli.rb
129
+ - lib/pele/version.rb
130
+ - pele.gemspec
131
+ homepage: https://github.com/suyesh/pele
132
+ licenses: []
133
+ metadata:
134
+ allowed_push_host: https://rubygems.org
135
+ post_install_message:
136
+ rdoc_options: []
137
+ require_paths:
138
+ - lib
139
+ required_ruby_version: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - ">="
142
+ - !ruby/object:Gem::Version
143
+ version: '0'
144
+ required_rubygems_version: !ruby/object:Gem::Requirement
145
+ requirements:
146
+ - - ">"
147
+ - !ruby/object:Gem::Version
148
+ version: 1.3.1
149
+ requirements: []
150
+ rubyforge_project:
151
+ rubygems_version: 2.6.12
152
+ signing_key:
153
+ specification_version: 4
154
+ summary: Pele lets you deploy multiple servers and run load test
155
+ test_files: []