jekyll-cache 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: abe0af720be7912199c2acec7f736f32b68e28ea
4
- data.tar.gz: e9a414a3d8481aecfd56f87bac0a2688f21e3e9e
2
+ SHA256:
3
+ metadata.gz: 1a323de2566f4fe5147f08865c6111416ee32152bf5ff054b2dcf8c0f9f6d3a4
4
+ data.tar.gz: d26a28a7da16372854c850ad6c03c3cb45d14c6e2cc9477d428e6465f1eb0232
5
5
  SHA512:
6
- metadata.gz: 0d825529cccf4548c37190e166d8b9a07b5fc0ff68fb95a762c7847b8789f4ca79ec33a706fb81e69fee770c8ed8af5cbc7c4b021c720f8c63a0a779de8fb415
7
- data.tar.gz: d969938276f94c84ef431196933b8b8f15de1e392c239c8a864c06b84c19507f174d96f88b8c1559c79ab408619da9ab0dada8ed1f243c1eb52716585f25e1e3
6
+ metadata.gz: 36f0d824fe4d0f0bc95a15d481e64d6f0c553ed97b10e8dfb25e4d70d0ffe2ed0d95eb11794a60b1e190acb70ddbde08d0ce7555624e50dca36294aa256c884c
7
+ data.tar.gz: '0629766a40b7e3460e110932eb5d0216bb491adb06b65bd878e826c80a0bab41b32c601fbca0978979280868bf75981041e4b07457024add4a6d58d47b2bcd74'
@@ -1,6 +1,54 @@
1
- # rubocop:disable Naming/FileName
2
1
  # Frozen-string-literal: true
3
- # Copyright: 2017 - MIT License
2
+ # Copyright: 2017 - Jordon Bedwell - MIT License
4
3
  # Encoding: utf-8
5
4
 
6
- require "jekyll/cache"
5
+
6
+ require "jekyll/sanity"
7
+ require "jekyll/log_wrapper"
8
+ require "jekyll"
9
+
10
+ module Jekyll
11
+ module Cache
12
+ autoload :FileStore, "jekyll/cache/file_store"
13
+ autoload :MemoryStore, "jekyll/cache/memory_store"
14
+ autoload :NullStore, "jekyll/cache/null_store"
15
+
16
+ # --
17
+ # Clear the entire cache.
18
+ # @note Doesn't matter if it exists.
19
+ # @return [true,false]
20
+ # --
21
+ def self.clear
22
+ if Jekyll.cache_dir&.directory?
23
+ then Jekyll.cache_dir.rm_r
24
+ end
25
+ end
26
+
27
+ # --
28
+ # @return [Jekyll::LogWrapper]
29
+ # Creates a log wrapper for ActiveSupport
30
+ # @see Jekyll::LogWrapper
31
+ # --
32
+ def self.logger
33
+ logger = Jekyll.logger
34
+ @logger ||= LogWrapper.new(logger)
35
+ end
36
+ end
37
+
38
+ # --
39
+ # @note this should always use FileStore.
40
+ # A global cache that uses the FileStore. This is meant
41
+ # for quick caching (or) one off caching.
42
+ # @return [FileStore] the new cache.
43
+ # --
44
+ def self.cache
45
+ key = "global"
46
+ @cache ||= Cache::FileStore.new(key)
47
+ end
48
+ end
49
+
50
+ # --
51
+ Jekyll::Hooks.register :site, :after_init do |s|
52
+ s.config["exclude"] << ".jekyll-cache/"
53
+ s.config["exclude"].uniq!
54
+ end
@@ -2,42 +2,4 @@
2
2
  # Copyright: 2017 Jordon Bedwell - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
- require "jekyll/sanity"
6
- require "jekyll/log_wrapper"
7
- require "jekyll"
8
-
9
- module Jekyll
10
- module Cache
11
- autoload :FileStore, "jekyll/cache/file_store"
12
- autoload :MemoryStore, "jekyll/cache/memory_store"
13
- autoload :NullStore, "jekyll/cache/null_store"
14
-
15
- # --
16
- # Clear the entire cache.
17
- # @note Doesn't matter if it exists.
18
- # @return [true,false]
19
- # --
20
- def self.clear
21
- Jekyll.cache_dir.rm_r if Jekyll.cache_dir&.directory?
22
- end
23
-
24
- # --
25
- # @return [Jekyll::LogWrapper]
26
- # Creates a log wrapper for ActiveSupport
27
- # @see Jekyll::LogWrapper
28
- # --
29
- def self.logger
30
- @logger ||= LogWrapper.new(Jekyll.logger)
31
- end
32
- end
33
-
34
- # --
35
- # @note this should always use FileStore.
36
- # A global cache that uses the FileStore. This is meant
37
- # for quick caching (or) one off caching.
38
- # @return [FileStore] the new cache.
39
- # --
40
- def self.cache
41
- @cache ||= Cache::FileStore.new("global")
42
- end
43
- end
5
+ require_relative "../jekyll-cache"
@@ -4,6 +4,6 @@
4
4
 
5
5
  module Jekyll
6
6
  module Cache
7
- VERSION = "1.1.0"
7
+ VERSION = "1.2.0"
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordon Bedwell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-24 00:00:00.000000000 Z
11
+ date: 2017-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  version: '0'
141
141
  requirements: []
142
142
  rubyforge_project:
143
- rubygems_version: 2.6.13
143
+ rubygems_version: 2.7.3
144
144
  signing_key:
145
145
  specification_version: 4
146
146
  summary: A cache library that wraps around ActiveSupport