atomic_cache 0.1.0.rc1 → 0.2.1.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +12 -4
- data/docs/PROJECT_SETUP.md +10 -7
- data/docs/USAGE.md +3 -3
- data/lib/atomic_cache/atomic_cache_client.rb +1 -2
- data/lib/atomic_cache/concerns/global_lmt_cache_concern.rb +4 -4
- data/lib/atomic_cache/key/keyspace.rb +4 -4
- data/lib/atomic_cache/key/last_mod_time_key_manager.rb +2 -1
- data/lib/atomic_cache/storage/dalli.rb +4 -6
- data/lib/atomic_cache/storage/instance_memory.rb +1 -2
- data/lib/atomic_cache/storage/memory.rb +12 -12
- data/lib/atomic_cache/storage/shared_memory.rb +1 -3
- data/lib/atomic_cache/storage/store.rb +12 -0
- data/lib/atomic_cache/version.rb +1 -1
- data/spec/atomic_cache/atomic_cache_client_spec.rb +213 -0
- data/spec/atomic_cache/concerns/global_lmt_cache_concern_spec.rb +137 -0
- data/spec/atomic_cache/default_config_spec.rb +22 -0
- data/spec/atomic_cache/key/keyspace_spec.rb +64 -0
- data/spec/atomic_cache/key/last_mod_time_key_manager_spec.rb +64 -0
- data/spec/atomic_cache/storage/dalli_spec.rb +61 -0
- data/spec/atomic_cache/storage/instance_memory_spec.rb +9 -0
- data/spec/atomic_cache/storage/memory_spec.rb +88 -0
- data/spec/atomic_cache/storage/shared_memory_spec.rb +9 -0
- data/spec/spec_helper.rb +20 -0
- metadata +64 -16
- data/.gitignore +0 -51
- data/.ruby_version +0 -1
- data/.travis.yml +0 -26
- data/CODE_OF_CONDUCT.md +0 -46
- data/Gemfile +0 -6
- data/Rakefile +0 -6
- data/atomic_cache.gemspec +0 -36
- data/bin/console +0 -14
- data/bin/setup +0 -8
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
SimpleCov.start
|
3
|
+
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'atomic_cache'
|
6
|
+
require 'timecop'
|
7
|
+
|
8
|
+
DefaultConfig = AtomicCache::DefaultConfig
|
9
|
+
AtomicCacheClient = AtomicCache::AtomicCacheClient
|
10
|
+
Keyspace = AtomicCache::Keyspace
|
11
|
+
|
12
|
+
RSpec.configure do |config|
|
13
|
+
# Enable flags like --only-failures and --next-failure
|
14
|
+
config.example_status_persistence_file_path = ".rspec_status"
|
15
|
+
|
16
|
+
config.expect_with :rspec do |expectations|
|
17
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
18
|
+
expectations.syntax = :expect
|
19
|
+
end
|
20
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atomic_cache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.2.1.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ibotta Developers
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-06-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -27,18 +27,60 @@ dependencies:
|
|
27
27
|
version: '1.14'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: gems
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '1.0'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '1.0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: git
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '1.3'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '1.3'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: github_changelog_generator
|
30
58
|
requirement: !ruby/object:Gem::Requirement
|
31
59
|
requirements:
|
32
60
|
- - ">="
|
33
61
|
- !ruby/object:Gem::Version
|
34
|
-
version: 1.0.
|
62
|
+
version: 1.15.0.pre.rc
|
35
63
|
type: :development
|
36
64
|
prerelease: false
|
37
65
|
version_requirements: !ruby/object:Gem::Requirement
|
38
66
|
requirements:
|
39
67
|
- - ">="
|
40
68
|
- !ruby/object:Gem::Version
|
41
|
-
version: 1.0.
|
69
|
+
version: 1.15.0.pre.rc
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: octokit
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '4.0'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '4.0'
|
42
84
|
- !ruby/object:Gem::Dependency
|
43
85
|
name: rake
|
44
86
|
requirement: !ruby/object:Gem::Requirement
|
@@ -102,6 +144,9 @@ dependencies:
|
|
102
144
|
- - ">="
|
103
145
|
- !ruby/object:Gem::Version
|
104
146
|
version: '4.2'
|
147
|
+
- - "<"
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '6'
|
105
150
|
type: :runtime
|
106
151
|
prerelease: false
|
107
152
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -109,6 +154,9 @@ dependencies:
|
|
109
154
|
- - ">="
|
110
155
|
- !ruby/object:Gem::Version
|
111
156
|
version: '4.2'
|
157
|
+
- - "<"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '6'
|
112
160
|
- !ruby/object:Gem::Dependency
|
113
161
|
name: murmurhash3
|
114
162
|
requirement: !ruby/object:Gem::Requirement
|
@@ -129,17 +177,8 @@ executables: []
|
|
129
177
|
extensions: []
|
130
178
|
extra_rdoc_files: []
|
131
179
|
files:
|
132
|
-
- ".gitignore"
|
133
|
-
- ".ruby_version"
|
134
|
-
- ".travis.yml"
|
135
|
-
- CODE_OF_CONDUCT.md
|
136
|
-
- Gemfile
|
137
180
|
- LICENSE
|
138
181
|
- README.md
|
139
|
-
- Rakefile
|
140
|
-
- atomic_cache.gemspec
|
141
|
-
- bin/console
|
142
|
-
- bin/setup
|
143
182
|
- docs/ARCH.md
|
144
183
|
- docs/INTERFACES.md
|
145
184
|
- docs/MODEL_SETUP.md
|
@@ -158,9 +197,19 @@ files:
|
|
158
197
|
- lib/atomic_cache/storage/shared_memory.rb
|
159
198
|
- lib/atomic_cache/storage/store.rb
|
160
199
|
- lib/atomic_cache/version.rb
|
200
|
+
- spec/atomic_cache/atomic_cache_client_spec.rb
|
201
|
+
- spec/atomic_cache/concerns/global_lmt_cache_concern_spec.rb
|
202
|
+
- spec/atomic_cache/default_config_spec.rb
|
203
|
+
- spec/atomic_cache/key/keyspace_spec.rb
|
204
|
+
- spec/atomic_cache/key/last_mod_time_key_manager_spec.rb
|
205
|
+
- spec/atomic_cache/storage/dalli_spec.rb
|
206
|
+
- spec/atomic_cache/storage/instance_memory_spec.rb
|
207
|
+
- spec/atomic_cache/storage/memory_spec.rb
|
208
|
+
- spec/atomic_cache/storage/shared_memory_spec.rb
|
209
|
+
- spec/spec_helper.rb
|
161
210
|
homepage: https://github.com/ibotta/atomic_cache
|
162
211
|
licenses:
|
163
|
-
-
|
212
|
+
- Apache-2.0
|
164
213
|
metadata: {}
|
165
214
|
post_install_message:
|
166
215
|
rdoc_options: []
|
@@ -177,8 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
226
|
- !ruby/object:Gem::Version
|
178
227
|
version: 1.3.1
|
179
228
|
requirements: []
|
180
|
-
|
181
|
-
rubygems_version: 2.6.11
|
229
|
+
rubygems_version: 3.0.8
|
182
230
|
signing_key:
|
183
231
|
specification_version: 4
|
184
232
|
summary: summary
|
data/.gitignore
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
*.gem
|
2
|
-
*.rbc
|
3
|
-
.rspec_status
|
4
|
-
/.config
|
5
|
-
/coverage/
|
6
|
-
/InstalledFiles
|
7
|
-
/pkg/
|
8
|
-
/spec/reports/
|
9
|
-
/spec/examples.txt
|
10
|
-
/test/tmp/
|
11
|
-
/test/version_tmp/
|
12
|
-
/tmp/
|
13
|
-
|
14
|
-
# Used by dotenv library to load environment variables.
|
15
|
-
# .env
|
16
|
-
|
17
|
-
## Specific to RubyMotion:
|
18
|
-
.dat*
|
19
|
-
.repl_history
|
20
|
-
build/
|
21
|
-
*.bridgesupport
|
22
|
-
build-iPhoneOS/
|
23
|
-
build-iPhoneSimulator/
|
24
|
-
|
25
|
-
## Specific to RubyMotion (use of CocoaPods):
|
26
|
-
#
|
27
|
-
# We recommend against adding the Pods directory to your .gitignore. However
|
28
|
-
# you should judge for yourself, the pros and cons are mentioned at:
|
29
|
-
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
30
|
-
#
|
31
|
-
# vendor/Pods/
|
32
|
-
|
33
|
-
## Documentation cache and generated files:
|
34
|
-
/.yardoc/
|
35
|
-
/_yardoc/
|
36
|
-
/doc/
|
37
|
-
/rdoc/
|
38
|
-
|
39
|
-
## Environment normalization:
|
40
|
-
/.bundle/
|
41
|
-
/vendor/bundle
|
42
|
-
/lib/bundler/man/
|
43
|
-
|
44
|
-
# for a library or gem, you might want to ignore these files since the code is
|
45
|
-
# intended to run in multiple environments; otherwise, check them in:
|
46
|
-
Gemfile.lock
|
47
|
-
# .ruby-version
|
48
|
-
# .ruby-gemset
|
49
|
-
|
50
|
-
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
51
|
-
.rvmrc
|
data/.ruby_version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.4.3
|
data/.travis.yml
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
|
3
|
-
stages:
|
4
|
-
- test-2.4
|
5
|
-
- test-2.5
|
6
|
-
- publish-gem
|
7
|
-
|
8
|
-
jobs:
|
9
|
-
include:
|
10
|
-
- stage: test-2.4
|
11
|
-
rvm: 2.4.3
|
12
|
-
script:
|
13
|
-
- bundle exec rake spec
|
14
|
-
|
15
|
-
- stage: test-2.5
|
16
|
-
rvm: 2.5.0
|
17
|
-
before_script:
|
18
|
-
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
19
|
-
- chmod +x ./cc-test-reporter
|
20
|
-
- ./cc-test-reporter before-build
|
21
|
-
script:
|
22
|
-
- bundle exec rake spec
|
23
|
-
after_script:
|
24
|
-
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
25
|
-
|
26
|
-
- stage: publish-gem
|
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
6
|
-
|
7
|
-
## Our Standards
|
8
|
-
|
9
|
-
Examples of behavior that contributes to creating a positive environment include:
|
10
|
-
|
11
|
-
* Using welcoming and inclusive language
|
12
|
-
* Being respectful of differing viewpoints and experiences
|
13
|
-
* Gracefully accepting constructive criticism
|
14
|
-
* Focusing on what is best for the community
|
15
|
-
* Showing empathy towards other community members
|
16
|
-
|
17
|
-
Examples of unacceptable behavior by participants include:
|
18
|
-
|
19
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
20
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
21
|
-
* Public or private harassment
|
22
|
-
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
23
|
-
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
24
|
-
|
25
|
-
## Our Responsibilities
|
26
|
-
|
27
|
-
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
28
|
-
|
29
|
-
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
30
|
-
|
31
|
-
## Scope
|
32
|
-
|
33
|
-
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
34
|
-
|
35
|
-
## Enforcement
|
36
|
-
|
37
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at osscompliance@ibotta.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
38
|
-
|
39
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
40
|
-
|
41
|
-
## Attribution
|
42
|
-
|
43
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
44
|
-
|
45
|
-
[homepage]: http://contributor-covenant.org
|
46
|
-
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
DELETED
data/Rakefile
DELETED
data/atomic_cache.gemspec
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# coding: utf-8
|
3
|
-
lib = File.expand_path('../lib', __FILE__)
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require 'atomic_cache/version'
|
6
|
-
|
7
|
-
Gem::Specification.new do |spec|
|
8
|
-
spec.name = 'atomic_cache'
|
9
|
-
spec.version = AtomicCache::VERSION
|
10
|
-
spec.authors = ['Ibotta Developers', 'Titus Stone']
|
11
|
-
spec.email = 'osscompliance@ibotta.com'
|
12
|
-
|
13
|
-
spec.summary = 'summary'
|
14
|
-
spec.description = 'desc'
|
15
|
-
|
16
|
-
spec.licenses = ['apache 2.0']
|
17
|
-
spec.homepage = 'https://github.com/ibotta/atomic_cache'
|
18
|
-
|
19
|
-
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
20
|
-
f.match(%r{^(test|spec|features)/})
|
21
|
-
end
|
22
|
-
|
23
|
-
spec.require_paths = ['lib']
|
24
|
-
|
25
|
-
# Dev dependencies
|
26
|
-
spec.add_development_dependency 'bundler', '~> 1.14'
|
27
|
-
spec.add_development_dependency 'gems', '>= 1.0.0'
|
28
|
-
spec.add_development_dependency 'rake', '~> 10.0'
|
29
|
-
spec.add_development_dependency 'rspec', '~> 3.0'
|
30
|
-
spec.add_development_dependency 'simplecov', '~> 0.15'
|
31
|
-
spec.add_development_dependency 'timecop', '~> 0.8.1'
|
32
|
-
|
33
|
-
# Dependencies
|
34
|
-
spec.add_dependency 'activesupport', '>= 4.2'
|
35
|
-
spec.add_dependency 'murmurhash3', '~> 0.1'
|
36
|
-
end
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "atomic_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__)
|