lamby-no-rails 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +15 -0
  3. data/.python-version +1 -0
  4. data/.ruby-version +1 -0
  5. data/.travis.yml +17 -0
  6. data/Brewfile +5 -0
  7. data/CHANGELOG.md +109 -0
  8. data/CODE_OF_CONDUCT.md +74 -0
  9. data/Gemfile +3 -0
  10. data/Gemfile.lock +168 -0
  11. data/LICENSE.txt +21 -0
  12. data/Pipfile +13 -0
  13. data/Pipfile.lock +370 -0
  14. data/README.md +37 -0
  15. data/Rakefile +12 -0
  16. data/bin/bootstrap +20 -0
  17. data/bin/console +14 -0
  18. data/bin/setup +6 -0
  19. data/bin/test +5 -0
  20. data/bin/update +7 -0
  21. data/lamby.gemspec +29 -0
  22. data/lib/lamby.rb +25 -0
  23. data/lib/lamby/debug.rb +46 -0
  24. data/lib/lamby/handler.rb +71 -0
  25. data/lib/lamby/logger.rb +23 -0
  26. data/lib/lamby/rack.rb +85 -0
  27. data/lib/lamby/rack_alb.rb +73 -0
  28. data/lib/lamby/rack_api.rb +36 -0
  29. data/lib/lamby/railtie.rb +12 -0
  30. data/lib/lamby/sam_helpers.rb +9 -0
  31. data/lib/lamby/ssm_parameter_store.rb +154 -0
  32. data/lib/lamby/tasks.rake +15 -0
  33. data/lib/lamby/templates.rake +36 -0
  34. data/lib/lamby/templates/api_gateway.rb +25 -0
  35. data/lib/lamby/templates/api_gateway/app.rb +10 -0
  36. data/lib/lamby/templates/api_gateway/build +23 -0
  37. data/lib/lamby/templates/api_gateway/deploy +22 -0
  38. data/lib/lamby/templates/api_gateway/template.yaml +84 -0
  39. data/lib/lamby/templates/application_load_balancer.rb +25 -0
  40. data/lib/lamby/templates/application_load_balancer/app.rb +10 -0
  41. data/lib/lamby/templates/application_load_balancer/build +23 -0
  42. data/lib/lamby/templates/application_load_balancer/deploy +39 -0
  43. data/lib/lamby/templates/application_load_balancer/template.yaml +90 -0
  44. data/lib/lamby/templates/shared.rb +15 -0
  45. data/lib/lamby/version.rb +3 -0
  46. metadata +199 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: dbbaf549a938e7792d4bc1bbf495828fc0e72801903067c29bb47b1cb74a9cb7
4
+ data.tar.gz: 0e23588619f706f076d9e646e360e0766e787ead9bcd3f25473e82cefb3e058c
5
+ SHA512:
6
+ metadata.gz: 647d493e8deb9f4e2be2e7f9e2fe4bd9a8bd42f27c6ab6ce8f1e72ea94e1dfbaaadaaed63567057acfe8ab8c615603141d1225675cab9f08f9c93203ee3ee2e0
7
+ data.tar.gz: c26c7da83e4bc00bbc369dbf1b37dc9de2be1505e720d0c65df2914dbbda1f6a2dd797f6ad2ba1f5dbc5d35d16efa50b538690dd8414c2db920ab9a5b2226b37
data/.gitignore ADDED
@@ -0,0 +1,15 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /pkg/
6
+ /spec/reports/
7
+ /tmp/
8
+ test/dummy_app/.gitignore
9
+ test/dummy_app/app.rb
10
+ test/dummy_app/template.yaml
11
+ test/dummy_app/bin/build
12
+ test/dummy_app/bin/deploy
13
+ test/dummy_app/tmp
14
+ test/dummy_app/log/**/*
15
+ test/dummy_app/public/**/*
data/.python-version ADDED
@@ -0,0 +1 @@
1
+ 3.6.7
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.5.7
data/.travis.yml ADDED
@@ -0,0 +1,17 @@
1
+ ---
2
+ if: branch = master OR type = pull_request
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.5.5
7
+ install:
8
+ - pushd /opt/pyenv/plugins/python-build && git pull origin master && popd
9
+ before_script:
10
+ - ls -lAGp
11
+ - pyenv install --skip-existing $(cat .python-version)
12
+ - sudo apt-get install python3-pip python3-dev
13
+ - pip3 install pipenv
14
+ - sudo gem install bundler -v 1.17.3
15
+ - bin/setup
16
+ script:
17
+ - bin/test
data/Brewfile ADDED
@@ -0,0 +1,5 @@
1
+ cask 'docker'
2
+ brew 'zlib'
3
+ brew 'rbenv'
4
+ brew 'pyenv'
5
+ brew 'pipenv'
data/CHANGELOG.md ADDED
@@ -0,0 +1,109 @@
1
+ # Keep A Changelog!
2
+
3
+ See this http://keepachangelog.com link for information on how we want this documented formatted.
4
+
5
+ ## v1.0.3
6
+
7
+ #### Changed
8
+
9
+ * Change shebangs to `#!/usr/bin/env bash`
10
+
11
+
12
+ ## v1.0.2
13
+
14
+ #### Changed
15
+
16
+ * Adds an optional 'overwrite' parameter to #to_env.
17
+
18
+ ## v1.0.1
19
+
20
+ #### Changed
21
+
22
+ * Links in bin/build templates to point to lamby.custominktech.com site.
23
+
24
+
25
+ ## v1.0.0
26
+
27
+ #### Fixed
28
+
29
+ * ALB query params & binary responses. Fixes #38.
30
+
31
+
32
+ ## v0.6.0
33
+
34
+ #### Added
35
+
36
+ * APPLICATION LOAD BALANACER SUPPORT!!! The new default. Use `rack: :api` option to handler for API Gateway support.
37
+
38
+ #### Changed
39
+
40
+ * Rake task `lamby:install` now defaults to `application_load_balancer`
41
+
42
+
43
+ ## v0.5.1
44
+
45
+ #### Fixed
46
+
47
+ * The .gitignore file template. Fix .aws-sam dir.
48
+
49
+
50
+ ## v0.5.0
51
+
52
+ #### Added
53
+
54
+ * Template generators for first install. Ex: `./bin/rake -r lamby lamby:install:api_gateway`.
55
+ * New `Lamby::SsmParameterStore.get!` helper.
56
+
57
+
58
+ ## v0.4.1
59
+
60
+ #### Fixed
61
+
62
+ * Fix type in v0.4.0 fix below.
63
+
64
+
65
+ ## v0.4.0
66
+
67
+ #### Fixed
68
+
69
+ * File uploads in #33 using `CONTENT_TYPE` and `CONTENT_LENGTH`.
70
+
71
+
72
+ ## v0.3.2
73
+
74
+ #### Added
75
+
76
+ * Pass Request ID for CloudWatch logs. Fixes #30.
77
+
78
+
79
+ ## v0.3.1
80
+
81
+ #### Changed
82
+
83
+ * Docs and SAM template tweaks.
84
+
85
+
86
+ ## v0.3.0
87
+
88
+ #### Added
89
+
90
+ * Secure configs rake task.
91
+ * Project bin setup and tests.
92
+
93
+ #### Changed
94
+
95
+ * SAM template tweaks.
96
+
97
+
98
+ ## v0.2.0
99
+
100
+ #### Changed
101
+
102
+ * Simple docs and project re-organization.
103
+
104
+
105
+ ## v0.1.0
106
+
107
+ #### Added
108
+
109
+ * New gem and placeholder in rubygems.
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at ken@metaskills.net. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
3
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,168 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ lamby (1.0.3)
5
+ rack
6
+ rails
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actioncable (6.0.2.1)
12
+ actionpack (= 6.0.2.1)
13
+ nio4r (~> 2.0)
14
+ websocket-driver (>= 0.6.1)
15
+ actionmailbox (6.0.2.1)
16
+ actionpack (= 6.0.2.1)
17
+ activejob (= 6.0.2.1)
18
+ activerecord (= 6.0.2.1)
19
+ activestorage (= 6.0.2.1)
20
+ activesupport (= 6.0.2.1)
21
+ mail (>= 2.7.1)
22
+ actionmailer (6.0.2.1)
23
+ actionpack (= 6.0.2.1)
24
+ actionview (= 6.0.2.1)
25
+ activejob (= 6.0.2.1)
26
+ mail (~> 2.5, >= 2.5.4)
27
+ rails-dom-testing (~> 2.0)
28
+ actionpack (6.0.2.1)
29
+ actionview (= 6.0.2.1)
30
+ activesupport (= 6.0.2.1)
31
+ rack (~> 2.0, >= 2.0.8)
32
+ rack-test (>= 0.6.3)
33
+ rails-dom-testing (~> 2.0)
34
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
35
+ actiontext (6.0.2.1)
36
+ actionpack (= 6.0.2.1)
37
+ activerecord (= 6.0.2.1)
38
+ activestorage (= 6.0.2.1)
39
+ activesupport (= 6.0.2.1)
40
+ nokogiri (>= 1.8.5)
41
+ actionview (6.0.2.1)
42
+ activesupport (= 6.0.2.1)
43
+ builder (~> 3.1)
44
+ erubi (~> 1.4)
45
+ rails-dom-testing (~> 2.0)
46
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
47
+ activejob (6.0.2.1)
48
+ activesupport (= 6.0.2.1)
49
+ globalid (>= 0.3.6)
50
+ activemodel (6.0.2.1)
51
+ activesupport (= 6.0.2.1)
52
+ activerecord (6.0.2.1)
53
+ activemodel (= 6.0.2.1)
54
+ activesupport (= 6.0.2.1)
55
+ activestorage (6.0.2.1)
56
+ actionpack (= 6.0.2.1)
57
+ activejob (= 6.0.2.1)
58
+ activerecord (= 6.0.2.1)
59
+ marcel (~> 0.3.1)
60
+ activesupport (6.0.2.1)
61
+ concurrent-ruby (~> 1.0, >= 1.0.2)
62
+ i18n (>= 0.7, < 2)
63
+ minitest (~> 5.1)
64
+ tzinfo (~> 1.1)
65
+ zeitwerk (~> 2.2)
66
+ aws-eventstream (1.0.3)
67
+ aws-partitions (1.261.0)
68
+ aws-sdk-core (3.86.0)
69
+ aws-eventstream (~> 1.0, >= 1.0.2)
70
+ aws-partitions (~> 1, >= 1.239.0)
71
+ aws-sigv4 (~> 1.1)
72
+ jmespath (~> 1.0)
73
+ aws-sdk-ssm (1.69.0)
74
+ aws-sdk-core (~> 3, >= 3.71.0)
75
+ aws-sigv4 (~> 1.1)
76
+ aws-sigv4 (1.1.0)
77
+ aws-eventstream (~> 1.0, >= 1.0.2)
78
+ builder (3.2.4)
79
+ coderay (1.1.2)
80
+ concurrent-ruby (1.1.5)
81
+ crass (1.0.5)
82
+ erubi (1.9.0)
83
+ globalid (0.4.2)
84
+ activesupport (>= 4.2.0)
85
+ i18n (1.7.0)
86
+ concurrent-ruby (~> 1.0)
87
+ jmespath (1.4.0)
88
+ loofah (2.4.0)
89
+ crass (~> 1.0.2)
90
+ nokogiri (>= 1.5.9)
91
+ mail (2.7.1)
92
+ mini_mime (>= 0.1.1)
93
+ marcel (0.3.3)
94
+ mimemagic (~> 0.3.2)
95
+ method_source (0.9.2)
96
+ mimemagic (0.3.3)
97
+ mini_mime (1.0.2)
98
+ mini_portile2 (2.4.0)
99
+ minitest (5.13.0)
100
+ mocha (1.11.1)
101
+ nio4r (2.5.2)
102
+ nokogiri (1.10.7)
103
+ mini_portile2 (~> 2.4.0)
104
+ pry (0.12.2)
105
+ coderay (~> 1.1.0)
106
+ method_source (~> 0.9.0)
107
+ rack (2.0.8)
108
+ rack-test (1.1.0)
109
+ rack (>= 1.0, < 3)
110
+ rails (6.0.2.1)
111
+ actioncable (= 6.0.2.1)
112
+ actionmailbox (= 6.0.2.1)
113
+ actionmailer (= 6.0.2.1)
114
+ actionpack (= 6.0.2.1)
115
+ actiontext (= 6.0.2.1)
116
+ actionview (= 6.0.2.1)
117
+ activejob (= 6.0.2.1)
118
+ activemodel (= 6.0.2.1)
119
+ activerecord (= 6.0.2.1)
120
+ activestorage (= 6.0.2.1)
121
+ activesupport (= 6.0.2.1)
122
+ bundler (>= 1.3.0)
123
+ railties (= 6.0.2.1)
124
+ sprockets-rails (>= 2.0.0)
125
+ rails-dom-testing (2.0.3)
126
+ activesupport (>= 4.2.0)
127
+ nokogiri (>= 1.6)
128
+ rails-html-sanitizer (1.3.0)
129
+ loofah (~> 2.3)
130
+ railties (6.0.2.1)
131
+ actionpack (= 6.0.2.1)
132
+ activesupport (= 6.0.2.1)
133
+ method_source
134
+ rake (>= 0.8.7)
135
+ thor (>= 0.20.3, < 2.0)
136
+ rake (13.0.1)
137
+ sprockets (4.0.0)
138
+ concurrent-ruby (~> 1.0)
139
+ rack (> 1, < 3)
140
+ sprockets-rails (3.2.1)
141
+ actionpack (>= 4.0)
142
+ activesupport (>= 4.0)
143
+ sprockets (>= 3.0.0)
144
+ sqlite3 (1.4.2)
145
+ thor (1.0.1)
146
+ thread_safe (0.3.6)
147
+ tzinfo (1.2.6)
148
+ thread_safe (~> 0.1)
149
+ websocket-driver (0.7.1)
150
+ websocket-extensions (>= 0.1.0)
151
+ websocket-extensions (0.1.4)
152
+ zeitwerk (2.2.2)
153
+
154
+ PLATFORMS
155
+ ruby
156
+
157
+ DEPENDENCIES
158
+ aws-sdk-ssm
159
+ bundler
160
+ lamby!
161
+ minitest
162
+ mocha
163
+ pry
164
+ rake
165
+ sqlite3
166
+
167
+ BUNDLED WITH
168
+ 2.1.2
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Ken Collins
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.
data/Pipfile ADDED
@@ -0,0 +1,13 @@
1
+ [[source]]
2
+ name = "pypi"
3
+ url = "https://pypi.org/simple"
4
+ verify_ssl = true
5
+
6
+ [dev-packages]
7
+
8
+ [packages]
9
+ awscli = ">=1.16.166"
10
+ aws-sam-cli = ">=0.16.1"
11
+
12
+ [requires]
13
+ python_version = "3.6.7"