null_cache_store 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5d0580c9b67a6ec4ba1fb777ccc441c8d94cca9f
4
+ data.tar.gz: 0e590ab140d4f0076c0918e74a1668bd7aeabf82
5
+ SHA512:
6
+ metadata.gz: d9f4c5c5231a679244fb6a433221f60b19d4cc23d9eb4866f12ab1666ae20ecb3812a857a07b26b4bba79defcc20bd42a02dffe1c2f48bea1e25a2c7c1a41480
7
+ data.tar.gz: 275b09ff3c798c86f9dcf2f3b76d7f80d8d27c0ceae2e87fb9762e70229d87ad270bfc81966541371c1b17653418dcdfd06e0765d37744cddc927cb3af7ce0c2
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.travis.yml ADDED
@@ -0,0 +1,14 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1
4
+ - 2.2.3
5
+ before_install:
6
+ - gem install bundler
7
+ - bundle --version
8
+ script:
9
+ - bundle exec rake spec
10
+ gemfile:
11
+ - gemfiles/rails_30.gemfile
12
+ - gemfiles/rails_31.gemfile
13
+ cache:
14
+ bundler: true
data/Appraisals ADDED
@@ -0,0 +1,7 @@
1
+ appraise "rails-30" do
2
+ gem "rails", "3.0.20"
3
+ end
4
+
5
+ appraise "rails-31" do
6
+ gem "rails", "3.1.12"
7
+ end
@@ -0,0 +1,49 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, and in the interest of
4
+ fostering an open and welcoming community, we pledge to respect all people who
5
+ contribute through reporting issues, posting feature requests, updating
6
+ documentation, submitting pull requests or patches, and other activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, ethnicity, age, religion, or nationality.
12
+
13
+ Examples of unacceptable behavior by participants include:
14
+
15
+ * The use of sexualized language or imagery
16
+ * Personal attacks
17
+ * Trolling or insulting/derogatory comments
18
+ * Public or private harassment
19
+ * Publishing other's private information, such as physical or electronic
20
+ addresses, without explicit permission
21
+ * Other unethical or unprofessional conduct
22
+
23
+ Project maintainers have the right and responsibility to remove, edit, or
24
+ reject comments, commits, code, wiki edits, issues, and other contributions
25
+ that are not aligned to this Code of Conduct, or to ban temporarily or
26
+ permanently any contributor for other behaviors that they deem inappropriate,
27
+ threatening, offensive, or harmful.
28
+
29
+ By adopting this Code of Conduct, project maintainers commit themselves to
30
+ fairly and consistently applying these principles to every aspect of managing
31
+ this project. Project maintainers who do not follow or enforce the Code of
32
+ Conduct may be permanently removed from the project team.
33
+
34
+ This code of conduct applies both within project spaces and in public spaces
35
+ when an individual is representing the project or its community.
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
+ reported by contacting a project maintainer at dan.drinkard@customink.com. All
39
+ complaints will be reviewed and investigated and will result in a response that
40
+ is deemed necessary and appropriate to the circumstances. Maintainers are
41
+ obligated to maintain confidentiality with regard to the reporter of an
42
+ incident.
43
+
44
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
+ version 1.3.0, available at
46
+ [http://contributor-covenant.org/version/1/3/0/][version]
47
+
48
+ [homepage]: http://contributor-covenant.org
49
+ [version]: http://contributor-covenant.org/version/1/3/0/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in null_cache_store.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Dan Drinkard
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,6 @@
1
+ # NullCacheStore
2
+ A backport of ActiveSupport::Cache::NullStore for Rails < 3.2
3
+
4
+ ## Installation
5
+ - Add to your `Gemfile`: `gem 'null_cache_store'`
6
+ - Set `config.cache_store = :null_store` in the appropriate environment
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default do
7
+ exec 'appraisal rake spec'
8
+ end
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "3.0.20"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,108 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ null_cache_store (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ abstract (1.0.0)
10
+ actionmailer (3.0.20)
11
+ actionpack (= 3.0.20)
12
+ mail (~> 2.2.19)
13
+ actionpack (3.0.20)
14
+ activemodel (= 3.0.20)
15
+ activesupport (= 3.0.20)
16
+ builder (~> 2.1.2)
17
+ erubis (~> 2.6.6)
18
+ i18n (~> 0.5.0)
19
+ rack (~> 1.2.5)
20
+ rack-mount (~> 0.6.14)
21
+ rack-test (~> 0.5.7)
22
+ tzinfo (~> 0.3.23)
23
+ activemodel (3.0.20)
24
+ activesupport (= 3.0.20)
25
+ builder (~> 2.1.2)
26
+ i18n (~> 0.5.0)
27
+ activerecord (3.0.20)
28
+ activemodel (= 3.0.20)
29
+ activesupport (= 3.0.20)
30
+ arel (~> 2.0.10)
31
+ tzinfo (~> 0.3.23)
32
+ activeresource (3.0.20)
33
+ activemodel (= 3.0.20)
34
+ activesupport (= 3.0.20)
35
+ activesupport (3.0.20)
36
+ appraisal (2.1.0)
37
+ bundler
38
+ rake
39
+ thor (>= 0.14.0)
40
+ arel (2.0.10)
41
+ builder (2.1.2)
42
+ diff-lcs (1.2.5)
43
+ erubis (2.6.6)
44
+ abstract (>= 1.0.0)
45
+ i18n (0.5.4)
46
+ json (1.8.3)
47
+ mail (2.2.20)
48
+ activesupport (>= 2.3.6)
49
+ i18n (>= 0.4.0)
50
+ mime-types (~> 1.16)
51
+ treetop (~> 1.4.8)
52
+ mime-types (1.25.1)
53
+ polyglot (0.3.5)
54
+ rack (1.2.8)
55
+ rack-mount (0.6.14)
56
+ rack (>= 1.0.0)
57
+ rack-test (0.5.7)
58
+ rack (>= 1.0)
59
+ rails (3.0.20)
60
+ actionmailer (= 3.0.20)
61
+ actionpack (= 3.0.20)
62
+ activerecord (= 3.0.20)
63
+ activeresource (= 3.0.20)
64
+ activesupport (= 3.0.20)
65
+ bundler (~> 1.0)
66
+ railties (= 3.0.20)
67
+ railties (3.0.20)
68
+ actionpack (= 3.0.20)
69
+ activesupport (= 3.0.20)
70
+ rake (>= 0.8.7)
71
+ rdoc (~> 3.4)
72
+ thor (~> 0.14.4)
73
+ rake (10.5.0)
74
+ rdoc (3.12.2)
75
+ json (~> 1.4)
76
+ rspec (3.4.0)
77
+ rspec-core (~> 3.4.0)
78
+ rspec-expectations (~> 3.4.0)
79
+ rspec-mocks (~> 3.4.0)
80
+ rspec-core (3.4.4)
81
+ rspec-support (~> 3.4.0)
82
+ rspec-expectations (3.4.0)
83
+ diff-lcs (>= 1.2.0, < 2.0)
84
+ rspec-support (~> 3.4.0)
85
+ rspec-mocks (3.4.1)
86
+ diff-lcs (>= 1.2.0, < 2.0)
87
+ rspec-support (~> 3.4.0)
88
+ rspec-support (3.4.1)
89
+ thor (0.14.6)
90
+ treetop (1.4.15)
91
+ polyglot
92
+ polyglot (>= 0.3.1)
93
+ tzinfo (0.3.50)
94
+
95
+ PLATFORMS
96
+ ruby
97
+
98
+ DEPENDENCIES
99
+ activesupport (< 3.2)
100
+ appraisal
101
+ bundler (~> 1.12)
102
+ null_cache_store!
103
+ rails (= 3.0.20)
104
+ rake (~> 10.0)
105
+ rspec (~> 3.0)
106
+
107
+ BUNDLED WITH
108
+ 1.12.0
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "3.1.12"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,119 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ null_cache_store (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ actionmailer (3.1.12)
10
+ actionpack (= 3.1.12)
11
+ mail (~> 2.4.4)
12
+ actionpack (3.1.12)
13
+ activemodel (= 3.1.12)
14
+ activesupport (= 3.1.12)
15
+ builder (~> 3.0.0)
16
+ erubis (~> 2.7.0)
17
+ i18n (~> 0.6)
18
+ rack (~> 1.3.6)
19
+ rack-cache (~> 1.2)
20
+ rack-mount (~> 0.8.2)
21
+ rack-test (~> 0.6.1)
22
+ sprockets (~> 2.0.4)
23
+ activemodel (3.1.12)
24
+ activesupport (= 3.1.12)
25
+ builder (~> 3.0.0)
26
+ i18n (~> 0.6)
27
+ activerecord (3.1.12)
28
+ activemodel (= 3.1.12)
29
+ activesupport (= 3.1.12)
30
+ arel (~> 2.2.3)
31
+ tzinfo (~> 0.3.29)
32
+ activeresource (3.1.12)
33
+ activemodel (= 3.1.12)
34
+ activesupport (= 3.1.12)
35
+ activesupport (3.1.12)
36
+ multi_json (~> 1.0)
37
+ appraisal (2.1.0)
38
+ bundler
39
+ rake
40
+ thor (>= 0.14.0)
41
+ arel (2.2.3)
42
+ builder (3.0.4)
43
+ diff-lcs (1.2.5)
44
+ erubis (2.7.0)
45
+ hike (1.2.3)
46
+ i18n (0.7.0)
47
+ json (1.8.3)
48
+ mail (2.4.4)
49
+ i18n (>= 0.4.0)
50
+ mime-types (~> 1.16)
51
+ treetop (~> 1.4.8)
52
+ mime-types (1.25.1)
53
+ multi_json (1.12.1)
54
+ polyglot (0.3.5)
55
+ rack (1.3.10)
56
+ rack-cache (1.6.1)
57
+ rack (>= 0.4)
58
+ rack-mount (0.8.3)
59
+ rack (>= 1.0.0)
60
+ rack-ssl (1.3.4)
61
+ rack
62
+ rack-test (0.6.3)
63
+ rack (>= 1.0)
64
+ rails (3.1.12)
65
+ actionmailer (= 3.1.12)
66
+ actionpack (= 3.1.12)
67
+ activerecord (= 3.1.12)
68
+ activeresource (= 3.1.12)
69
+ activesupport (= 3.1.12)
70
+ bundler (~> 1.0)
71
+ railties (= 3.1.12)
72
+ railties (3.1.12)
73
+ actionpack (= 3.1.12)
74
+ activesupport (= 3.1.12)
75
+ rack-ssl (~> 1.3.2)
76
+ rake (>= 0.8.7)
77
+ rdoc (~> 3.4)
78
+ thor (~> 0.14.6)
79
+ rake (10.5.0)
80
+ rdoc (3.12.2)
81
+ json (~> 1.4)
82
+ rspec (3.4.0)
83
+ rspec-core (~> 3.4.0)
84
+ rspec-expectations (~> 3.4.0)
85
+ rspec-mocks (~> 3.4.0)
86
+ rspec-core (3.4.4)
87
+ rspec-support (~> 3.4.0)
88
+ rspec-expectations (3.4.0)
89
+ diff-lcs (>= 1.2.0, < 2.0)
90
+ rspec-support (~> 3.4.0)
91
+ rspec-mocks (3.4.1)
92
+ diff-lcs (>= 1.2.0, < 2.0)
93
+ rspec-support (~> 3.4.0)
94
+ rspec-support (3.4.1)
95
+ sprockets (2.0.5)
96
+ hike (~> 1.2)
97
+ rack (~> 1.0)
98
+ tilt (~> 1.1, != 1.3.0)
99
+ thor (0.14.6)
100
+ tilt (1.4.1)
101
+ treetop (1.4.15)
102
+ polyglot
103
+ polyglot (>= 0.3.1)
104
+ tzinfo (0.3.50)
105
+
106
+ PLATFORMS
107
+ ruby
108
+
109
+ DEPENDENCIES
110
+ activesupport (< 3.2)
111
+ appraisal
112
+ bundler (~> 1.12)
113
+ null_cache_store!
114
+ rails (= 3.1.12)
115
+ rake (~> 10.0)
116
+ rspec (~> 3.0)
117
+
118
+ BUNDLED WITH
119
+ 1.12.0
@@ -0,0 +1,41 @@
1
+ module ActiveSupport
2
+ module Cache
3
+ # A cache store implementation which doesn't actually store anything. Useful in
4
+ # development and test environments where you don't want caching turned on but
5
+ # need to go through the caching interface.
6
+ #
7
+ # This cache does implement the local cache strategy, so values will actually
8
+ # be cached inside blocks that utilize this strategy. See
9
+ # ActiveSupport::Cache::Strategy::LocalCache for more details.
10
+ class NullStore < Store
11
+ prepend Strategy::LocalCache
12
+
13
+ def clear(options = nil)
14
+ end
15
+
16
+ def cleanup(options = nil)
17
+ end
18
+
19
+ def increment(name, amount = 1, options = nil)
20
+ end
21
+
22
+ def decrement(name, amount = 1, options = nil)
23
+ end
24
+
25
+ def delete_matched(matcher, options = nil)
26
+ end
27
+
28
+ protected
29
+ def read_entry(key, options) # :nodoc:
30
+ end
31
+
32
+ def write_entry(key, entry, options) # :nodoc:
33
+ true
34
+ end
35
+
36
+ def delete_entry(key, options) # :nodoc:
37
+ false
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,8 @@
1
+ require "null_cache_store/version"
2
+ require 'active_support/cache'
3
+ require 'active_support/cache/null_store'
4
+
5
+ if defined?(RAILS_VERSION) && RAILS_VERSION > '3.1'
6
+ ActiveSupport::Deprecation.warn(
7
+ 'ActiveSupport::NullStore is included in Rails 3.2 and above, please remove the null_cache_store gem.')
8
+ end
@@ -0,0 +1,3 @@
1
+ module NullCacheStore
2
+ VERSION = "0.1.1"
3
+ end
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'null_cache_store/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "null_cache_store"
8
+ spec.version = NullCacheStore::VERSION
9
+ spec.authors = ["Dan Drinkard"]
10
+ spec.email = ["dan.drinkard@customink.com"]
11
+
12
+ spec.summary = %q{A backport of ActiveSupport::Cache::NullStore for Rails < 3.2}
13
+ spec.homepage = "https://github.com/customink/null_cache_store"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.bindir = "exe"
18
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_runtime_dependency 'activesupport', '< 3.2'
22
+ spec.add_development_dependency 'appraisal'
23
+ spec.add_development_dependency "bundler", "~> 1.12"
24
+ spec.add_development_dependency "rake", "~> 10.0"
25
+ spec.add_development_dependency "rspec", "~> 3.0"
26
+ end
metadata ADDED
@@ -0,0 +1,132 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: null_cache_store
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Dan Drinkard
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-06-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "<"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "<"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: appraisal
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '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'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.12'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.12'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '10.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '10.0'
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.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.0'
83
+ description:
84
+ email:
85
+ - dan.drinkard@customink.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".gitignore"
91
+ - ".rspec"
92
+ - ".travis.yml"
93
+ - Appraisals
94
+ - CODE_OF_CONDUCT.md
95
+ - Gemfile
96
+ - LICENSE.txt
97
+ - README.md
98
+ - Rakefile
99
+ - gemfiles/rails_30.gemfile
100
+ - gemfiles/rails_30.gemfile.lock
101
+ - gemfiles/rails_31.gemfile
102
+ - gemfiles/rails_31.gemfile.lock
103
+ - lib/active_support/cache/null_store.rb
104
+ - lib/null_cache_store.rb
105
+ - lib/null_cache_store/version.rb
106
+ - null_cache_store.gemspec
107
+ homepage: https://github.com/customink/null_cache_store
108
+ licenses:
109
+ - MIT
110
+ metadata: {}
111
+ post_install_message:
112
+ rdoc_options: []
113
+ require_paths:
114
+ - lib
115
+ required_ruby_version: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ required_rubygems_version: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ requirements: []
126
+ rubyforge_project:
127
+ rubygems_version: 2.5.1
128
+ signing_key:
129
+ specification_version: 4
130
+ summary: A backport of ActiveSupport::Cache::NullStore for Rails < 3.2
131
+ test_files: []
132
+ has_rdoc: