perma_cache 0.0.9 → 0.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d57dc94561e4a76f37b4dab4a08e01f42dd17fdb
4
- data.tar.gz: f8c5e17b1be038e08ad3037e154f9ed0f974a18a
2
+ SHA256:
3
+ metadata.gz: 11f6cdac66b946cccb5f893f5da04d58975bdb66abb7671430c74fc1bff85bfe
4
+ data.tar.gz: 64cf89dbd468d3962de947433d3d1c23ece1cada7d2393ebbe7e4698ee61b946
5
5
  SHA512:
6
- metadata.gz: e233fb321114f6a66e5956c5625503dec21030910c3cce754713b8ae542208a441000af438d4dd3bc27d590607d400699ddc4104d59ff5f69b4b051113a905e7
7
- data.tar.gz: f30990120e9d68f1bffc15f23ee6476ccec4b027966edc79bd88ba23edfd19f460b411443d6d03f236f6a782e2ad6f84a56d6a69de6fdce6c69bfa607148be7e
6
+ metadata.gz: d8848468f5aaa6adfb7bdbd28cc65e5166b6bd369c774b4d8483a5e4c30cc9b16954bc3a0535d39a348234ed3f80721ab2516e40ed8c281f255fc941861857d0
7
+ data.tar.gz: d3109d11576be7ebac15fbf1ca973af12da0310b7520697c893159625aab985bc7af0e4b8e3cbaee58d30e2670e31cf4d696696d83ff5df19c54cb544f301024
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.3.4
1
+ 2.6.3
data/Gemfile CHANGED
@@ -6,7 +6,8 @@ gemspec
6
6
  gem "bundler"
7
7
  gem "rake"
8
8
  gem "minitest"
9
- gem "shoulda"
9
+ gem "shoulda-context"
10
+ gem "shoulda-matchers"
10
11
  gem "mocha"
11
12
  gem "byebug"
12
13
 
data/Gemfile.lock CHANGED
@@ -1,113 +1,126 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- perma_cache (0.0.9)
4
+ perma_cache (0.1.0)
5
5
  rails
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actionmailer (4.2.1)
11
- actionpack (= 4.2.1)
12
- actionview (= 4.2.1)
13
- activejob (= 4.2.1)
10
+ actioncable (5.2.3)
11
+ actionpack (= 5.2.3)
12
+ nio4r (~> 2.0)
13
+ websocket-driver (>= 0.6.1)
14
+ actionmailer (5.2.3)
15
+ actionpack (= 5.2.3)
16
+ actionview (= 5.2.3)
17
+ activejob (= 5.2.3)
14
18
  mail (~> 2.5, >= 2.5.4)
15
- rails-dom-testing (~> 1.0, >= 1.0.5)
16
- actionpack (4.2.1)
17
- actionview (= 4.2.1)
18
- activesupport (= 4.2.1)
19
- rack (~> 1.6)
20
- rack-test (~> 0.6.2)
21
- rails-dom-testing (~> 1.0, >= 1.0.5)
22
- rails-html-sanitizer (~> 1.0, >= 1.0.1)
23
- actionview (4.2.1)
24
- activesupport (= 4.2.1)
19
+ rails-dom-testing (~> 2.0)
20
+ actionpack (5.2.3)
21
+ actionview (= 5.2.3)
22
+ activesupport (= 5.2.3)
23
+ rack (~> 2.0)
24
+ rack-test (>= 0.6.3)
25
+ rails-dom-testing (~> 2.0)
26
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
27
+ actionview (5.2.3)
28
+ activesupport (= 5.2.3)
25
29
  builder (~> 3.1)
26
- erubis (~> 2.7.0)
27
- rails-dom-testing (~> 1.0, >= 1.0.5)
28
- rails-html-sanitizer (~> 1.0, >= 1.0.1)
29
- activejob (4.2.1)
30
- activesupport (= 4.2.1)
31
- globalid (>= 0.3.0)
32
- activemodel (4.2.1)
33
- activesupport (= 4.2.1)
34
- builder (~> 3.1)
35
- activerecord (4.2.1)
36
- activemodel (= 4.2.1)
37
- activesupport (= 4.2.1)
38
- arel (~> 6.0)
39
- activesupport (4.2.1)
40
- i18n (~> 0.7)
41
- json (~> 1.7, >= 1.7.7)
30
+ erubi (~> 1.4)
31
+ rails-dom-testing (~> 2.0)
32
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
33
+ activejob (5.2.3)
34
+ activesupport (= 5.2.3)
35
+ globalid (>= 0.3.6)
36
+ activemodel (5.2.3)
37
+ activesupport (= 5.2.3)
38
+ activerecord (5.2.3)
39
+ activemodel (= 5.2.3)
40
+ activesupport (= 5.2.3)
41
+ arel (>= 9.0)
42
+ activestorage (5.2.3)
43
+ actionpack (= 5.2.3)
44
+ activerecord (= 5.2.3)
45
+ marcel (~> 0.3.1)
46
+ activesupport (5.2.3)
47
+ concurrent-ruby (~> 1.0, >= 1.0.2)
48
+ i18n (>= 0.7, < 2)
42
49
  minitest (~> 5.1)
43
- thread_safe (~> 0.3, >= 0.3.4)
44
50
  tzinfo (~> 1.1)
45
- arel (6.0.0)
46
- builder (3.2.2)
47
- byebug (4.0.5)
48
- columnize (= 0.9.0)
49
- columnize (0.9.0)
50
- erubis (2.7.0)
51
- globalid (0.3.5)
52
- activesupport (>= 4.1.0)
53
- i18n (0.7.0)
54
- json (1.8.2)
55
- loofah (2.0.2)
51
+ arel (9.0.0)
52
+ builder (3.2.3)
53
+ byebug (11.0.1)
54
+ concurrent-ruby (1.1.5)
55
+ crass (1.0.5)
56
+ erubi (1.9.0)
57
+ globalid (0.4.2)
58
+ activesupport (>= 4.2.0)
59
+ i18n (1.7.0)
60
+ concurrent-ruby (~> 1.0)
61
+ loofah (2.3.1)
62
+ crass (~> 1.0.2)
56
63
  nokogiri (>= 1.5.9)
57
- mail (2.6.3)
58
- mime-types (>= 1.16, < 3)
64
+ mail (2.7.1)
65
+ mini_mime (>= 0.1.1)
66
+ marcel (0.3.3)
67
+ mimemagic (~> 0.3.2)
59
68
  metaclass (0.0.4)
60
- mime-types (2.5)
61
- mini_portile (0.6.2)
62
- minitest (5.6.1)
63
- mocha (1.1.0)
69
+ method_source (0.9.2)
70
+ mimemagic (0.3.3)
71
+ mini_mime (1.0.2)
72
+ mini_portile2 (2.4.0)
73
+ minitest (5.13.0)
74
+ mocha (1.9.0)
64
75
  metaclass (~> 0.0.1)
65
- nokogiri (1.6.6.2)
66
- mini_portile (~> 0.6.0)
67
- rack (1.6.1)
68
- rack-test (0.6.3)
69
- rack (>= 1.0)
70
- rails (4.2.1)
71
- actionmailer (= 4.2.1)
72
- actionpack (= 4.2.1)
73
- actionview (= 4.2.1)
74
- activejob (= 4.2.1)
75
- activemodel (= 4.2.1)
76
- activerecord (= 4.2.1)
77
- activesupport (= 4.2.1)
78
- bundler (>= 1.3.0, < 2.0)
79
- railties (= 4.2.1)
80
- sprockets-rails
81
- rails-deprecated_sanitizer (1.0.3)
82
- activesupport (>= 4.2.0.alpha)
83
- rails-dom-testing (1.0.6)
84
- activesupport (>= 4.2.0.beta, < 5.0)
85
- nokogiri (~> 1.6.0)
86
- rails-deprecated_sanitizer (>= 1.0.1)
87
- rails-html-sanitizer (1.0.2)
88
- loofah (~> 2.0)
89
- railties (4.2.1)
90
- actionpack (= 4.2.1)
91
- activesupport (= 4.2.1)
76
+ nio4r (2.5.2)
77
+ nokogiri (1.10.5)
78
+ mini_portile2 (~> 2.4.0)
79
+ rack (2.0.7)
80
+ rack-test (1.1.0)
81
+ rack (>= 1.0, < 3)
82
+ rails (5.2.3)
83
+ actioncable (= 5.2.3)
84
+ actionmailer (= 5.2.3)
85
+ actionpack (= 5.2.3)
86
+ actionview (= 5.2.3)
87
+ activejob (= 5.2.3)
88
+ activemodel (= 5.2.3)
89
+ activerecord (= 5.2.3)
90
+ activestorage (= 5.2.3)
91
+ activesupport (= 5.2.3)
92
+ bundler (>= 1.3.0)
93
+ railties (= 5.2.3)
94
+ sprockets-rails (>= 2.0.0)
95
+ rails-dom-testing (2.0.3)
96
+ activesupport (>= 4.2.0)
97
+ nokogiri (>= 1.6)
98
+ rails-html-sanitizer (1.3.0)
99
+ loofah (~> 2.3)
100
+ railties (5.2.3)
101
+ actionpack (= 5.2.3)
102
+ activesupport (= 5.2.3)
103
+ method_source
92
104
  rake (>= 0.8.7)
93
- thor (>= 0.18.1, < 2.0)
94
- rake (10.4.2)
95
- shoulda (3.5.0)
96
- shoulda-context (~> 1.0, >= 1.0.1)
97
- shoulda-matchers (>= 1.4.1, < 3.0)
98
- shoulda-context (1.2.1)
99
- shoulda-matchers (2.8.0)
100
- activesupport (>= 3.0.0)
101
- sprockets (3.0.3)
102
- rack (~> 1.0)
103
- sprockets-rails (2.2.4)
104
- actionpack (>= 3.0)
105
- activesupport (>= 3.0)
106
- sprockets (>= 2.8, < 4.0)
107
- thor (0.19.1)
108
- thread_safe (0.3.5)
109
- tzinfo (1.2.2)
105
+ thor (>= 0.19.0, < 2.0)
106
+ rake (13.0.0)
107
+ shoulda-context (1.2.2)
108
+ shoulda-matchers (4.1.2)
109
+ activesupport (>= 4.2.0)
110
+ sprockets (4.0.0)
111
+ concurrent-ruby (~> 1.0)
112
+ rack (> 1, < 3)
113
+ sprockets-rails (3.2.1)
114
+ actionpack (>= 4.0)
115
+ activesupport (>= 4.0)
116
+ sprockets (>= 3.0.0)
117
+ thor (0.20.3)
118
+ thread_safe (0.3.6)
119
+ tzinfo (1.2.5)
110
120
  thread_safe (~> 0.1)
121
+ websocket-driver (0.7.1)
122
+ websocket-extensions (>= 0.1.0)
123
+ websocket-extensions (0.1.4)
111
124
 
112
125
  PLATFORMS
113
126
  ruby
@@ -119,7 +132,8 @@ DEPENDENCIES
119
132
  mocha
120
133
  perma_cache!
121
134
  rake
122
- shoulda
135
+ shoulda-context
136
+ shoulda-matchers
123
137
 
124
138
  BUNDLED WITH
125
- 1.15.1
139
+ 1.17.3
data/lib/perma_cache.rb CHANGED
@@ -5,22 +5,22 @@ require "perma_cache/version"
5
5
  module PermaCache
6
6
  class UndefinedCache < StandardError ; end
7
7
 
8
- def self.version= v
8
+ def self.version=(v)
9
9
  @version = v
10
10
  end
11
11
 
12
12
  def self.version
13
- @version || 1
14
- end
15
-
16
- def self.cache
17
- @cache || raise(UndefinedCache, "Please define a cache object: (PermaCache.cache = Rails.cache)")
13
+ @version ||= 1
18
14
  end
19
15
 
20
16
  def self.cache=(c)
21
17
  @cache = c
22
18
  end
23
19
 
20
+ def self.cache
21
+ @cache ||= raise(UndefinedCache, "Please define a cache object: (PermaCache.cache = Rails.cache)")
22
+ end
23
+
24
24
  def self.build_key_from_object(obj)
25
25
  # Don't want to add this to Object
26
26
  Array.new.tap do |arr|
@@ -1,3 +1,3 @@
1
1
  module PermaCache
2
- VERSION = "0.0.9"
2
+ VERSION = "0.1.0"
3
3
  end
data/test/test_helper.rb CHANGED
@@ -3,8 +3,9 @@ require 'bundler/setup'
3
3
 
4
4
  require 'byebug'
5
5
  require 'minitest/autorun'
6
- require 'mocha/mini_test'
7
- require 'shoulda'
6
+ require 'mocha/minitest'
7
+ require 'shoulda-context'
8
+ require 'shoulda-matchers'
8
9
 
9
10
  require 'perma_cache'
10
11
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: perma_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Sharpe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-25 00:00:00.000000000 Z
11
+ date: 2019-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -63,8 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
63
63
  - !ruby/object:Gem::Version
64
64
  version: '0'
65
65
  requirements: []
66
- rubyforge_project:
67
- rubygems_version: 2.4.8
66
+ rubygems_version: 3.0.6
68
67
  signing_key:
69
68
  specification_version: 4
70
69
  summary: It's a perma cache, duh