speculate 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/.circle-ruby +3 -0
- data/.gitignore +5 -0
- data/.prospectus +11 -0
- data/.rspec +2 -0
- data/.rubocop.yml +2 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +22 -0
- data/Rakefile +14 -0
- data/bin/speculate +20 -0
- data/circle.yml +6 -0
- data/lib/speculate.rb +17 -0
- data/lib/speculate/assumption.rb +6 -0
- data/lib/speculate/version.rb +5 -0
- data/spec/spec_helper.rb +11 -0
- data/spec/speculate_spec.rb +1 -0
- data/speculate.gemspec +23 -0
- metadata +146 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 34c067c32dad1620b96437cf3daceb9161be8c16
|
4
|
+
data.tar.gz: 89bba6d1e2a5e77dcfbeef174ddca5ebc427ebec
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d0450bb9b0c9ab16eb8075adbb508b6424eb6a1412c835df57f30103fc5ee1258dca7ca4ce3f84b7619b672d0410116aaa1e83057efb1dacd1ecd8786ba1b59c
|
7
|
+
data.tar.gz: 42cda06e782a40816c533c5eb032ca19a87d7df0026b139a344fc8cb60515bcd08fe7443e14560662b1b36b039b26ea58e1bc16e611312d3dfc795f49984fb35
|
data/.circle-ruby
ADDED
data/.gitignore
ADDED
data/.prospectus
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Les Aker
|
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
|
13
|
+
all 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
|
21
|
+
THE SOFTWARE.
|
22
|
+
|
data/README.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
speculate
|
2
|
+
=========
|
3
|
+
|
4
|
+
[![Gem Version](https://img.shields.io/gem/v/speculate.svg)](https://rubygems.org/gems/speculate)
|
5
|
+
[![Dependency Status](https://img.shields.io/gemnasium/akerl/speculate.svg)](https://gemnasium.com/akerl/speculate)
|
6
|
+
[![Build Status](https://img.shields.io/circleci/project/akerl/speculate.svg)](https://circleci.com/gh/akerl/speculate)
|
7
|
+
[![Coverage Status](https://img.shields.io/codecov/c/github/akerl/speculate.svg)](https://codecov.io/github/akerl/speculate)
|
8
|
+
[![Code Quality](https://img.shields.io/codacy/.svg)](https://www.codacy.com/app/akerl/speculate)
|
9
|
+
[![MIT Licensed](https://img.shields.io/badge/license-MIT-green.svg)](https://tldrlegal.com/license/mit-license)
|
10
|
+
|
11
|
+
Tool for assuming roles in AWS accounts
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
## Installation
|
16
|
+
|
17
|
+
gem install speculate
|
18
|
+
|
19
|
+
## License
|
20
|
+
|
21
|
+
speculate is released under the MIT License. See the bundled LICENSE file for details.
|
22
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rspec/core/rake_task'
|
3
|
+
require 'rubocop/rake_task'
|
4
|
+
|
5
|
+
desc 'Run tests'
|
6
|
+
RSpec::Core::RakeTask.new(:spec)
|
7
|
+
|
8
|
+
desc 'Run Rubocop on the gem'
|
9
|
+
RuboCop::RakeTask.new(:rubocop) do |task|
|
10
|
+
task.patterns = ['lib/**/*.rb', 'spec/**/*.rb']
|
11
|
+
task.fail_on_error = true
|
12
|
+
end
|
13
|
+
|
14
|
+
task default: [:spec, :rubocop, :build, :install]
|
data/bin/speculate
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'speculate'
|
4
|
+
require 'mercenary'
|
5
|
+
|
6
|
+
# rubocop:disable Metrics/BlockLength
|
7
|
+
Mercenary.program(:speculate) do |p|
|
8
|
+
p.version Speculate::VERSION
|
9
|
+
p.description 'Tool for assuming roles in AWS accounts'
|
10
|
+
p.syntax 'speculate [options] account-id role-name'
|
11
|
+
|
12
|
+
p.action do |_, options|
|
13
|
+
account_id, role_name = ARGV.shift 2
|
14
|
+
if !account_id || !role_name
|
15
|
+
puts p
|
16
|
+
exit 1
|
17
|
+
end
|
18
|
+
Speculate.new(account_id: account_id, role_name: role_name).print!
|
19
|
+
end
|
20
|
+
end
|
data/circle.yml
ADDED
data/lib/speculate.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'aws-sdk'
|
2
|
+
|
3
|
+
##
|
4
|
+
# Base module for Speculate
|
5
|
+
module Speculate
|
6
|
+
class << self
|
7
|
+
##
|
8
|
+
# Insert a helper .new() method for creating a new Assumption object
|
9
|
+
|
10
|
+
def new(*args)
|
11
|
+
self::Assumption.new(*args)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
require 'speculate/version'
|
17
|
+
require 'speculate/assumption'
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'spec_helper'
|
data/speculate.gemspec
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = 'speculate'
|
3
|
+
s.version = '0.0.1'
|
4
|
+
s.date = Time.now.strftime('%Y-%m-%d')
|
5
|
+
|
6
|
+
s.summary = 'Tool for assuming roles in AWS accounts'
|
7
|
+
s.description = "Tool for assuming roles in AWS accounts"
|
8
|
+
s.authors = ['Les Aker']
|
9
|
+
s.email = 'me@lesaker.org'
|
10
|
+
s.homepage = 'https://github.com/akerl/speculate'
|
11
|
+
s.license = 'MIT'
|
12
|
+
|
13
|
+
s.files = `git ls-files`.split
|
14
|
+
s.test_files = `git ls-files spec/*`.split
|
15
|
+
|
16
|
+
s.add_dependency 'aws-sdk', '~> 2.6.0'
|
17
|
+
|
18
|
+
s.add_development_dependency 'rubocop', '~> 0.42.0'
|
19
|
+
s.add_development_dependency 'rake', '~> 11.2.0'
|
20
|
+
s.add_development_dependency 'codecov', '~> 0.1.1'
|
21
|
+
s.add_development_dependency 'rspec', '~> 3.5.0'
|
22
|
+
s.add_development_dependency 'fuubar', '~> 2.1.0'
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,146 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: speculate
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Les Aker
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-12-01 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: aws-sdk
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.6.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.6.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rubocop
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.42.0
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.42.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 11.2.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 11.2.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: codecov
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.1.1
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.1.1
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 3.5.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 3.5.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: fuubar
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 2.1.0
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 2.1.0
|
97
|
+
description: Tool for assuming roles in AWS accounts
|
98
|
+
email: me@lesaker.org
|
99
|
+
executables: []
|
100
|
+
extensions: []
|
101
|
+
extra_rdoc_files: []
|
102
|
+
files:
|
103
|
+
- ".circle-ruby"
|
104
|
+
- ".gitignore"
|
105
|
+
- ".prospectus"
|
106
|
+
- ".rspec"
|
107
|
+
- ".rubocop.yml"
|
108
|
+
- Gemfile
|
109
|
+
- LICENSE
|
110
|
+
- README.md
|
111
|
+
- Rakefile
|
112
|
+
- bin/speculate
|
113
|
+
- circle.yml
|
114
|
+
- lib/speculate.rb
|
115
|
+
- lib/speculate/assumption.rb
|
116
|
+
- lib/speculate/version.rb
|
117
|
+
- spec/spec_helper.rb
|
118
|
+
- spec/speculate_spec.rb
|
119
|
+
- speculate.gemspec
|
120
|
+
homepage: https://github.com/akerl/speculate
|
121
|
+
licenses:
|
122
|
+
- MIT
|
123
|
+
metadata: {}
|
124
|
+
post_install_message:
|
125
|
+
rdoc_options: []
|
126
|
+
require_paths:
|
127
|
+
- lib
|
128
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
requirements: []
|
139
|
+
rubyforge_project:
|
140
|
+
rubygems_version: 2.5.2
|
141
|
+
signing_key:
|
142
|
+
specification_version: 4
|
143
|
+
summary: Tool for assuming roles in AWS accounts
|
144
|
+
test_files:
|
145
|
+
- spec/spec_helper.rb
|
146
|
+
- spec/speculate_spec.rb
|