lambdakiq 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 94edc48f3f08f3e16711bb2ece50cc7cc5fcbda5bdbff4ca83de387b1c991fed
4
+ data.tar.gz: 3ad808f67b8b497b4fde72f0377bb24efc8cf2d812cd4e7786a379b418af4f93
5
+ SHA512:
6
+ metadata.gz: 126c569c9e85bf812dda786e2f14a1eba6206de6072f80d235d60077fec67a9a1bc2195055e1dbf84f58cdf1a632f6559fe81908d2906801d87bae430191d9e6
7
+ data.tar.gz: 93d33b2b486c0b92a905fd1c3b1c5c4872652e2e42d52c804df42e2ec0209e5fb3cc8744bec480796119c49479d0b43524e33326f01bafd91d8dc9c36992e94d
@@ -0,0 +1,17 @@
1
+ name: Test
2
+ on: [push]
3
+ jobs:
4
+ test:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - name: Checkout
8
+ uses: actions/checkout@v1
9
+ - name: Bootstrap
10
+ run: |
11
+ ./bin/bootstrap
12
+ - name: Setup
13
+ run: |
14
+ ./bin/setup
15
+ - name: Test
16
+ run: |
17
+ ./bin/test
@@ -0,0 +1,15 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /pkg/
6
+ /spec/reports/
7
+ /tmp/
8
+ /vendor/bundle
9
+ test/dummy_app/.gitignore
10
+ test/dummy_app/app.rb
11
+ test/dummy_app/template.yaml
12
+ test/dummy_app/bin/build
13
+ test/dummy_app/bin/deploy
14
+ test/dummy_app/tmp
15
+ test/dummy_app/log/**/*
@@ -0,0 +1,10 @@
1
+
2
+ # Keep A Changelog!
3
+
4
+ See this http://keepachangelog.com link for information on how we want this documented formatted.
5
+
6
+ ## v1.0.0
7
+
8
+ #### Added
9
+
10
+ * Initial release.
@@ -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/
@@ -0,0 +1,2 @@
1
+ FROM lambci/lambda:build-ruby2.7
2
+ WORKDIR /var/task
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source "https://rubygems.org"
2
+ gemspec
@@ -0,0 +1,66 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ lambdakiq (1.0.0)
5
+ activejob
6
+ aws-sdk-sqs
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activejob (6.0.3.4)
12
+ activesupport (= 6.0.3.4)
13
+ globalid (>= 0.3.6)
14
+ activesupport (6.0.3.4)
15
+ concurrent-ruby (~> 1.0, >= 1.0.2)
16
+ i18n (>= 0.7, < 2)
17
+ minitest (~> 5.1)
18
+ tzinfo (~> 1.1)
19
+ zeitwerk (~> 2.2, >= 2.2.2)
20
+ aws-eventstream (1.1.0)
21
+ aws-partitions (1.399.0)
22
+ aws-sdk-core (3.109.3)
23
+ aws-eventstream (~> 1, >= 1.0.2)
24
+ aws-partitions (~> 1, >= 1.239.0)
25
+ aws-sigv4 (~> 1.1)
26
+ jmespath (~> 1.0)
27
+ aws-sdk-sqs (1.34.0)
28
+ aws-sdk-core (~> 3, >= 3.109.0)
29
+ aws-sigv4 (~> 1.1)
30
+ aws-sigv4 (1.2.2)
31
+ aws-eventstream (~> 1, >= 1.0.2)
32
+ coderay (1.1.3)
33
+ concurrent-ruby (1.1.7)
34
+ globalid (0.4.2)
35
+ activesupport (>= 4.2.0)
36
+ i18n (1.8.5)
37
+ concurrent-ruby (~> 1.0)
38
+ jmespath (1.4.0)
39
+ method_source (1.0.0)
40
+ minitest (5.14.2)
41
+ minitest-focus (1.2.1)
42
+ minitest (>= 4, < 6)
43
+ mocha (1.11.2)
44
+ pry (0.13.1)
45
+ coderay (~> 1.1)
46
+ method_source (~> 1.0)
47
+ rake (13.0.1)
48
+ thread_safe (0.3.6)
49
+ tzinfo (1.2.8)
50
+ thread_safe (~> 0.1)
51
+ zeitwerk (2.4.2)
52
+
53
+ PLATFORMS
54
+ ruby
55
+
56
+ DEPENDENCIES
57
+ bundler
58
+ lambdakiq!
59
+ minitest
60
+ minitest-focus
61
+ mocha
62
+ pry
63
+ rake
64
+
65
+ BUNDLED WITH
66
+ 2.1.4
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 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.
@@ -0,0 +1,24 @@
1
+
2
+ # Lambdakiq
3
+
4
+ TODO ...
5
+
6
+ ```ruby
7
+ # TODO ...
8
+ ```
9
+
10
+ ## Contributing
11
+
12
+ After checking out the repo, run:
13
+
14
+ ```shell
15
+ $ ./bin/bootstrap
16
+ $ ./bin/setup
17
+ $ ./bin/test
18
+ ```
19
+
20
+ Bug reports and pull requests are welcome on GitHub at https://github.com/customink/lambdakiq. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
21
+
22
+ ## Code of Conduct
23
+
24
+ Everyone interacting in the Lambdakiq project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/customink/lambdakiq/blob/master/CODE_OF_CONDUCT.md).
@@ -0,0 +1,13 @@
1
+ ENV['RUBYOPT'] = '-W:no-deprecated -W:no-experimental'
2
+ require "bundler/gem_tasks"
3
+ require "rake/testtask"
4
+
5
+ Rake::TestTask.new(:test) do |t|
6
+ t.libs << "test"
7
+ t.libs << "lib"
8
+ t.test_files = FileList["test/**/*_test.rb"]
9
+ t.verbose = false
10
+ t.warning = false
11
+ end
12
+
13
+ task :default => :test
@@ -0,0 +1,6 @@
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ echo '== Installing dependencies =='
5
+ bundle config set --local path 'vendor/bundle'
6
+ bundle install
@@ -0,0 +1,6 @@
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ export RAILS_ENV="test"
5
+
6
+ bundle exec rake test
@@ -0,0 +1,6 @@
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ echo '== Building containers =='
5
+ docker pull lambci/lambda:build-ruby2.7
6
+ docker-compose build
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "lambdakiq"
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__)
@@ -0,0 +1,6 @@
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ docker-compose run \
5
+ lambdakiqgem \
6
+ ./bin/_setup
@@ -0,0 +1,8 @@
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ export RAILS_ENV="test"
5
+
6
+ docker-compose run \
7
+ lambdakiqgem \
8
+ ./bin/_test
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env bash
2
+
3
+ set -e
4
+
5
+ rm -rf ./vendor/bundle
6
+
7
+ ./bin/setup
@@ -0,0 +1,10 @@
1
+ version: '3.7'
2
+ services:
3
+ lambdakiqgem:
4
+ build: .
5
+ environment:
6
+ - AWS_PROFILE=${AWS_PROFILE-default}
7
+ - RAILS_ENV=${RAILS_ENV-test}
8
+ volumes:
9
+ - ${PWD}:/var/task:delegated
10
+ - ${HOME}/.aws:/root/.aws:delegated
@@ -0,0 +1,28 @@
1
+ lib = File.expand_path('../lib', __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'lambdakiq/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "lambdakiq"
7
+ spec.version = Lambdakiq::VERSION
8
+ spec.authors = ["Ken Collins"]
9
+ spec.email = ["kcollins@customink.com"]
10
+ spec.summary = %q{Scalable Rails Background Processing with AWS Lambda & SQS.}
11
+ spec.description = %q{Scalable Rails Background Processing with AWS Lambda & SQS.}
12
+ spec.homepage = "https://github.com/customink/lambdakiq"
13
+ spec.license = "MIT"
14
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
15
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
16
+ end
17
+ spec.bindir = "exe"
18
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
+ spec.require_paths = ["lib"]
20
+ spec.add_dependency 'activejob'
21
+ spec.add_dependency 'aws-sdk-sqs'
22
+ spec.add_development_dependency 'bundler'
23
+ spec.add_development_dependency 'rake'
24
+ spec.add_development_dependency 'minitest'
25
+ spec.add_development_dependency 'minitest-focus'
26
+ spec.add_development_dependency 'mocha'
27
+ spec.add_development_dependency 'pry'
28
+ end
@@ -0,0 +1,16 @@
1
+ require 'active_job'
2
+ require 'aws-sdk-sqs'
3
+ require 'lambdakiq/version'
4
+
5
+ # if defined?(Rails)
6
+ # require 'rails/railtie'
7
+ # require 'lambdakiq/railtie'
8
+ # end
9
+
10
+ module Lambdakiq
11
+
12
+ extend self
13
+
14
+ # autoload :Xyz, 'lambdakiq/xyz'
15
+
16
+ end
@@ -0,0 +1,5 @@
1
+ module Lambdakiq
2
+ class Railtie < ::Rails::Railtie
3
+ config.lambdakiq = ActiveSupport::OrderedOptions.new
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ module Lambdakiq
2
+ VERSION = '0.0.1'
3
+ end
File without changes
metadata ADDED
@@ -0,0 +1,178 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: lambdakiq
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Ken Collins
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2020-11-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activejob
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: aws-sdk-sqs
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: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
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: minitest
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: minitest-focus
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
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: mocha
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: pry
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ description: Scalable Rails Background Processing with AWS Lambda & SQS.
126
+ email:
127
+ - kcollins@customink.com
128
+ executables: []
129
+ extensions: []
130
+ extra_rdoc_files: []
131
+ files:
132
+ - ".github/workflows/cicd.yml"
133
+ - ".gitignore"
134
+ - CHANGELOG.md
135
+ - CODE_OF_CONDUCT.md
136
+ - Dockerfile
137
+ - Gemfile
138
+ - Gemfile.lock
139
+ - LICENSE.txt
140
+ - README.md
141
+ - Rakefile
142
+ - bin/_setup
143
+ - bin/_test
144
+ - bin/bootstrap
145
+ - bin/console
146
+ - bin/setup
147
+ - bin/test
148
+ - bin/update
149
+ - docker-compose.yml
150
+ - lamby.gemspec
151
+ - lib/lambdakiq.rb
152
+ - lib/lambdakiq/railtie.rb
153
+ - lib/lambdakiq/version.rb
154
+ - vendor/.keep
155
+ homepage: https://github.com/customink/lambdakiq
156
+ licenses:
157
+ - MIT
158
+ metadata: {}
159
+ post_install_message:
160
+ rdoc_options: []
161
+ require_paths:
162
+ - lib
163
+ required_ruby_version: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
168
+ required_rubygems_version: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: '0'
173
+ requirements: []
174
+ rubygems_version: 3.1.2
175
+ signing_key:
176
+ specification_version: 4
177
+ summary: Scalable Rails Background Processing with AWS Lambda & SQS.
178
+ test_files: []