dynamo-store 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/.circleci/config.yml +76 -0
- data/.gitignore +12 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/Appraisals +21 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +809 -0
- data/LICENSE.txt +21 -0
- data/README.md +23 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/dynamo-store.gemspec +52 -0
- data/gemfiles/.bundle/config +2 -0
- data/gemfiles/active_support_5.0.gemfile +7 -0
- data/gemfiles/active_support_5.0.gemfile.lock +809 -0
- data/gemfiles/active_support_5.1.gemfile +7 -0
- data/gemfiles/active_support_5.1.gemfile.lock +809 -0
- data/gemfiles/active_support_5.2.gemfile +7 -0
- data/gemfiles/active_support_5.2.gemfile.lock +809 -0
- data/gemfiles/aws_sdk_2.gemfile +7 -0
- data/gemfiles/aws_sdk_2.gemfile.lock +113 -0
- data/gemfiles/aws_sdk_3.gemfile +7 -0
- data/gemfiles/aws_sdk_3.gemfile.lock +809 -0
- data/lib/active_support/cache/dynamo_store.rb +81 -0
- data/lib/dynamo-store/version.rb +5 -0
- data/lib/dynamo-store.rb +1 -0
- metadata +215 -0
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 David Harkness
|
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/README.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# Dynamo Store Cache for Rails
|
2
|
+
|
3
|
+
|
4
|
+
## Usage
|
5
|
+
https://api.rubyonrails.org/classes/ActiveSupport/Cache/Store.html
|
6
|
+
|
7
|
+
## Install in Rails
|
8
|
+
|
9
|
+
#### Add Gem
|
10
|
+
```ruby
|
11
|
+
gem 'dynamo-store'
|
12
|
+
```
|
13
|
+
|
14
|
+
#### config/initializers/dynamo_store.rb
|
15
|
+
```ruby
|
16
|
+
require 'dynamo'
|
17
|
+
DynamoCache = ActiveSupport::Cache::Dynamo.new
|
18
|
+
```
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "dynamo/cache"
|
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,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'dynamo-store/version'
|
6
|
+
# require "active_support/cache/dynamo_store"
|
7
|
+
|
8
|
+
Gem::Specification.new do |spec|
|
9
|
+
spec.name = 'dynamo-store'
|
10
|
+
spec.version = DynamoStore::VERSION
|
11
|
+
spec.authors = ['David Harkness', 'Brian Malinconico']
|
12
|
+
spec.email = ['david.harkness@terminus.com', 'brian.malinconico@terminus.com']
|
13
|
+
|
14
|
+
spec.summary = 'ActiveSupport Cache Store for DynamoDb'
|
15
|
+
spec.description = 'ActiveSupport Cache Store for DynamoDb'
|
16
|
+
spec.homepage = 'https://github.com/GetTerminus/dynamo-store'
|
17
|
+
spec.license = 'MIT'
|
18
|
+
|
19
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
20
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
21
|
+
if spec.respond_to?(:metadata)
|
22
|
+
# spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
|
23
|
+
|
24
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
25
|
+
spec.metadata['source_code_uri'] = 'https://github.com/GetTerminus/dynamo-cache-store.git'
|
26
|
+
# spec.metadata["changelog_uri"] = ": Put your gem's CHANGELOG.md URL here."
|
27
|
+
else
|
28
|
+
raise 'RubyGems 2.0 or newer is required to protect against ' \
|
29
|
+
'public gem pushes.'
|
30
|
+
end
|
31
|
+
|
32
|
+
# Specify which files should be added to the gem when it is released.
|
33
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
34
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
35
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
36
|
+
end
|
37
|
+
spec.bindir = 'exe'
|
38
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
39
|
+
spec.require_paths = ['lib']
|
40
|
+
|
41
|
+
spec.add_dependency 'activesupport', '> 5.0'
|
42
|
+
spec.add_dependency 'aws-sdk', '> 2.0'
|
43
|
+
|
44
|
+
spec.add_development_dependency 'appraisal'
|
45
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
46
|
+
spec.add_development_dependency 'deep-cover'
|
47
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
48
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
49
|
+
spec.add_development_dependency 'simplecov'
|
50
|
+
spec.add_development_dependency 'timecop'
|
51
|
+
spec.add_development_dependency 'rspec_junit_formatter'
|
52
|
+
end
|