SPAM 0.0.1.a

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2f7f8852fe41e26cf0e5b75f1d7e01b8919c8ca4
4
+ data.tar.gz: b398a786f11b0ba69ff993ade36513bf3b4dd8e5
5
+ SHA512:
6
+ metadata.gz: ab6831b1b3981d86bb325915e8a945a70626c93638ef09136bf5870d9fade061bdd9c00985d2e1d63b3ef5edbd62dcf3a3b6dbf689ab268e363d13c2cba803cc
7
+ data.tar.gz: e372954733ade25f8b4504e71e2c974ffed810ca850d16b01f3fed0cd76c531ce2f5e27c91fd361ab8bcff82739258a4a7ad443ecfb51608fb93a00a9e2e1c20
@@ -0,0 +1,11 @@
1
+ # ignore any config files
2
+ ./config/*.yml
3
+ ./.bundle/
4
+ ./.vendor/bundle
5
+ ./.lib/bundler/man/
6
+ ./.bin
7
+ ./examples
8
+ ./.vscode
9
+ ./.github
10
+ ./Gemfile.lock
11
+ ./brain
data/.gemrc ADDED
@@ -0,0 +1 @@
1
+ gem: --no-document
@@ -0,0 +1,48 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+
13
+ # Mac specificg
14
+ .DS_Store
15
+
16
+ # Used by dotenv library to load environment variables.
17
+ # .env
18
+
19
+ ## Specific to RubyMotion:
20
+ .dat*
21
+ .repl_history
22
+ build/
23
+
24
+ ## Documentation cache and generated files:
25
+ /.yardoc/
26
+ /_yardoc/
27
+ /doc/
28
+ /rdoc/
29
+
30
+ ## Environment normalization:
31
+ .bundle/
32
+ vendor/bundle
33
+ lib/bundler/man/
34
+ bin/*
35
+ !bin/spam
36
+
37
+
38
+ # for a library or gem, you might want to ignore these files since the code is
39
+ # intended to run in multiple environments; otherwise, check them in:
40
+ # Gemfile.lock
41
+ # .ruby-version
42
+ # .ruby-gemset
43
+
44
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
45
+ .rvmrc
46
+
47
+ *.test.yml
48
+ *.local.yml
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --color
2
+ --require spec_helper
3
+ --format progress
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+ source 'https://rubygems.org'
3
+
4
+ gemspec
@@ -0,0 +1,88 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ SPAM (0.1.0)
5
+ aws-sdk-elasticloadbalancingv2 (~> 1.0.0.rc6)
6
+ httparty
7
+ thor (~> 0.19.0)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ ast (2.3.0)
13
+ aws-partitions (1.8.0)
14
+ aws-sdk-core (3.0.0.rc12)
15
+ aws-partitions (~> 1.0)
16
+ aws-sigv4 (~> 1.0)
17
+ jmespath (~> 1.0)
18
+ aws-sdk-elasticloadbalancingv2 (1.0.0.rc6)
19
+ aws-sdk-core (~> 3.0.0.rc12)
20
+ aws-sigv4 (~> 1.0)
21
+ aws-sigv4 (1.0.0)
22
+ codeclimate-test-reporter (1.0.8)
23
+ simplecov (<= 0.13)
24
+ debase (0.2.2.beta10)
25
+ debase-ruby_core_source
26
+ debase-ruby_core_source (0.9.9)
27
+ diff-lcs (1.3)
28
+ docile (1.1.5)
29
+ httparty (0.15.5)
30
+ multi_xml (>= 0.5.2)
31
+ jmespath (1.3.1)
32
+ json (2.1.0)
33
+ multi_xml (0.6.0)
34
+ parallel (1.11.2)
35
+ parser (2.4.0.0)
36
+ ast (~> 2.2)
37
+ powerpack (0.1.1)
38
+ rainbow (2.2.2)
39
+ rake
40
+ rake (12.0.0)
41
+ rspec (3.6.0)
42
+ rspec-core (~> 3.6.0)
43
+ rspec-expectations (~> 3.6.0)
44
+ rspec-mocks (~> 3.6.0)
45
+ rspec-core (3.6.0)
46
+ rspec-support (~> 3.6.0)
47
+ rspec-expectations (3.6.0)
48
+ diff-lcs (>= 1.2.0, < 2.0)
49
+ rspec-support (~> 3.6.0)
50
+ rspec-mocks (3.6.0)
51
+ diff-lcs (>= 1.2.0, < 2.0)
52
+ rspec-support (~> 3.6.0)
53
+ rspec-support (3.6.0)
54
+ rubocop (0.49.0)
55
+ parallel (~> 1.10)
56
+ parser (>= 2.3.3.1, < 3.0)
57
+ powerpack (~> 0.1)
58
+ rainbow (>= 1.99.1, < 3.0)
59
+ ruby-progressbar (~> 1.7)
60
+ unicode-display_width (~> 1.0, >= 1.0.1)
61
+ ruby-debug-ide (0.6.1.beta4)
62
+ rake (>= 0.8.1)
63
+ ruby-progressbar (1.8.1)
64
+ simplecov (0.13.0)
65
+ docile (~> 1.1.0)
66
+ json (>= 1.8, < 3)
67
+ simplecov-html (~> 0.10.0)
68
+ simplecov-html (0.10.1)
69
+ thor (0.19.4)
70
+ unicode-display_width (1.2.1)
71
+ yard (0.9.9)
72
+
73
+ PLATFORMS
74
+ ruby
75
+
76
+ DEPENDENCIES
77
+ SPAM!
78
+ codeclimate-test-reporter (~> 1.0.0)
79
+ debase (~> 0.2.2.beta10)
80
+ rake
81
+ rspec (~> 3.4)
82
+ rubocop
83
+ ruby-debug-ide (~> 0.6.1.beta4)
84
+ simplecov
85
+ yard
86
+
87
+ BUNDLED WITH
88
+ 1.14.6
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2017 Hearst Automation Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,57 @@
1
+ # SPAM (Smart Proxy Alb Manager)
2
+ CLI Tool to manage ALB Listener and Rules for Foreman Smart Proxy Setups
3
+
4
+ ## Prerequisites
5
+
6
+ - Ruby 2.3 or later
7
+ - Bundler
8
+
9
+ ## Info
10
+
11
+ ## Usage
12
+
13
+ ### Install
14
+
15
+ #### Global Install
16
+
17
+ Run the following
18
+
19
+ ```bash
20
+ gem install bundler
21
+ bundle install
22
+ ```
23
+ ### Local Install
24
+
25
+ ```bash
26
+ gem install bundler
27
+ bundle install --binstubs --path vendor/bundle
28
+ ```
29
+
30
+ ### Commands
31
+
32
+ | Command | Arguments |
33
+ | ------- | --------- |
34
+
35
+ ## Development
36
+
37
+ ## How to Contribute
38
+
39
+ ### External Contributors
40
+
41
+ - [Fork](https://github.com/ImperialLabs/slapi#fork-destination-box) the repo on GitHub
42
+ - Clone the project to your own machine
43
+ - Commit changes to your own branch
44
+ - Push your work back up to your fork
45
+ - Submit a Pull Request so that we can review your changes
46
+
47
+ **NOTE**: Be sure to merge the latest from "upstream" before making a pull request!
48
+
49
+ ### Internal Contributors
50
+
51
+ - Clone the project to your own machine
52
+ - Create a new branch from master
53
+ - Commit changes to your own branch
54
+ - Push your work back up to your branch
55
+ - Submit a Pull Request so the changes can be reviewed
56
+
57
+ **NOTE**: Be sure to merge the latest from "upstream" before making a pull request!
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib')
5
+ require "#{File.dirname(__FILE__)}/../lib/spam"
6
+ SPAM::SPAMCLI.start
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'thor'
5
+ require 'spam/version'
6
+
7
+ Dir["#{File.dirname(__FILE__)}/spam/commands/*.rb"].each { |item| load(item) }
8
+
9
+ module SPAM
10
+ # Main class to include Thor and load sub commands
11
+ class SPAMCLI < Thor
12
+ def initialize(*args)
13
+ super
14
+ @region = ENV['AWS_REGION'] ? ENV['AWS_REGION'] : args[0]
15
+ @albclient = Aws::ElasticLoadBalancingV2::Client.new(region: @region)
16
+ end
17
+
18
+ desc 'target', 'target group'
19
+ subcommand 'target', SPAM::COMMANDS::Target
20
+
21
+ desc 'rule', 'listener rules'
22
+ subcommand 'rule', SPAM::COMMANDS::Rule
23
+
24
+ desc 'register', 'register targets'
25
+ subcommand 'register', SPAM::COMMANDS::Register
26
+
27
+ desc 'version', 'Get the version of the SPAM Tool'
28
+ def version
29
+ puts "SPAM version: #{SPAM::VERSION}"
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'httparty'
5
+ require 'thor'
6
+ require 'yaml'
7
+ require 'date'
8
+ require 'pp'
9
+
10
+ module SPAM
11
+ module COMMANDS
12
+ # Target Commands
13
+ class Register < Thor
14
+ def initialize(*args)
15
+ super
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'httparty'
5
+ require 'thor'
6
+ require 'yaml'
7
+ require 'date'
8
+ require 'pp'
9
+
10
+ module SPAM
11
+ module COMMANDS
12
+ # Target Commands
13
+ class Rule < Thor
14
+ def initialize(*args)
15
+ super
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'httparty'
5
+ require 'thor'
6
+ require 'yaml'
7
+ require 'date'
8
+ require 'pp'
9
+
10
+ module SPAM
11
+ module COMMANDS
12
+ # Target Commands
13
+ class Target < Thor
14
+ def initialize(*args)
15
+ super
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SPAM
4
+ VERSION = '0.0.1.a'
5
+ end
data/spam ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ $LOAD_PATH.unshift(File.dirname(__FILE__) + '/lib')
5
+ require "#{File.dirname(__FILE__)}/lib/spam"
6
+ SPAM::SPAMCLI.start
@@ -0,0 +1,38 @@
1
+ # coding: utf-8
2
+ # frozen_string_literal: true
3
+
4
+ lib = File.expand_path('../lib', __FILE__)
5
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
+ require 'spam/version'
7
+ require 'rbconfig'
8
+
9
+ Gem::Specification.new do |spec|
10
+ spec.name = 'SPAM'
11
+ spec.version = SPAM::VERSION
12
+ spec.authors = ['Levi Smith']
13
+ spec.email = ['atat@hearst.com']
14
+
15
+ spec.summary = 'SPAM (Smart Proxy Alb Manager) - CLI Tool to manage ALB
16
+ Listener and Rules for Foreman Smart Proxy Setups'
17
+ spec.description = ''
18
+ spec.homepage = 'https://github.com/hearstat/SPAM'
19
+
20
+ spec.license = 'MIT'
21
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
22
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
23
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
24
+ spec.require_paths = ['lib']
25
+
26
+ spec.add_dependency 'aws-sdk-elasticloadbalancingv2', '~> 1.0.0.rc6'
27
+ spec.add_dependency 'httparty'
28
+ spec.add_dependency 'thor', '~> 0.19.0'
29
+
30
+ spec.add_development_dependency 'codeclimate-test-reporter', '~> 1.0.0'
31
+ spec.add_development_dependency 'rake'
32
+ spec.add_development_dependency 'rspec', '~> 3.4'
33
+ spec.add_development_dependency 'rubocop'
34
+ spec.add_development_dependency 'debase', '~>0.2.2.beta10'
35
+ spec.add_development_dependency 'ruby-debug-ide', '~> 0.6.1.beta4'
36
+ spec.add_development_dependency 'yard'
37
+ spec.add_development_dependency 'simplecov'
38
+ end
metadata ADDED
@@ -0,0 +1,216 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: SPAM
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1.a
5
+ platform: ruby
6
+ authors:
7
+ - Levi Smith
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-05-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: aws-sdk-elasticloadbalancingv2
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 1.0.0.rc6
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.0.0.rc6
27
+ - !ruby/object:Gem::Dependency
28
+ name: httparty
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: thor
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 0.19.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.19.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: codeclimate-test-reporter
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 1.0.0
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 1.0.0
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: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '3.4'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '3.4'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop
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: debase
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 0.2.2.beta10
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 0.2.2.beta10
125
+ - !ruby/object:Gem::Dependency
126
+ name: ruby-debug-ide
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 0.6.1.beta4
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 0.6.1.beta4
139
+ - !ruby/object:Gem::Dependency
140
+ name: yard
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: simplecov
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ description: ''
168
+ email:
169
+ - atat@hearst.com
170
+ executables:
171
+ - spam
172
+ extensions: []
173
+ extra_rdoc_files: []
174
+ files:
175
+ - ".dockerignore"
176
+ - ".gemrc"
177
+ - ".gitignore"
178
+ - ".rspec"
179
+ - Gemfile
180
+ - Gemfile.lock
181
+ - LICENSE
182
+ - README.md
183
+ - bin/spam
184
+ - lib/spam.rb
185
+ - lib/spam/commands/register.rb
186
+ - lib/spam/commands/rule.rb
187
+ - lib/spam/commands/target.rb
188
+ - lib/spam/version.rb
189
+ - spam
190
+ - spam.gemspec
191
+ homepage: https://github.com/hearstat/SPAM
192
+ licenses:
193
+ - MIT
194
+ metadata: {}
195
+ post_install_message:
196
+ rdoc_options: []
197
+ require_paths:
198
+ - lib
199
+ required_ruby_version: !ruby/object:Gem::Requirement
200
+ requirements:
201
+ - - ">="
202
+ - !ruby/object:Gem::Version
203
+ version: '0'
204
+ required_rubygems_version: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">"
207
+ - !ruby/object:Gem::Version
208
+ version: 1.3.1
209
+ requirements: []
210
+ rubyforge_project:
211
+ rubygems_version: 2.5.1
212
+ signing_key:
213
+ specification_version: 4
214
+ summary: SPAM (Smart Proxy Alb Manager) - CLI Tool to manage ALB Listener and Rules
215
+ for Foreman Smart Proxy Setups
216
+ test_files: []