jekyll-sanity 1.2.0 → 1.6.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: 6de159c1c4e1ef5eb7621545a0919fe076d33abb
4
- data.tar.gz: 29ff9b69e7a9fa180d419627a9f9e21f306d2684
2
+ SHA256:
3
+ metadata.gz: ffcd3229ae80520e232b4d4e18b067a8fe212ceab7d9501300fd867b4ebfc371
4
+ data.tar.gz: 7b40600690199f4e0783c255813d8590e3b24bbeab161b11734b902ca2d3578a
5
5
  SHA512:
6
- metadata.gz: 80642146cb8d535ec57d67c836a6af1b89f1b887721662261789189521acb1797e0cc0372cbaa733ce40c10af2c64efdcb072cb3f9920f78b8542630634731f8
7
- data.tar.gz: 3fc244edd4d1f9374b33152e2ee69bdac391696f8d83d15dff1105ca640e607cf79f31b3a5c1d7be314a74f4e180d5b260e5890ff484cf4fc1af070faec721ab
6
+ metadata.gz: 92b35b3f8bf0c438c84ed41e43aab6f6ac69a129650eb132ba6467d7e96f940ddfe37b4d2164028e27543458b08c0a48bdb1638b4aaaa3361eda04c3d66935e2
7
+ data.tar.gz: 0a3507b67eb39ebacb3f64c164221894477c3caff6c5dada135a11183057fd60ee46a777c8496479f41fe6282ddb0a11598652320b7e86669f5b2798413e6cf7
data/Gemfile CHANGED
@@ -1,10 +1,11 @@
1
- source "https://rubygems.org"
2
- gemspec
1
+ # Frozen-String-Literal: true
2
+ # Copyright: 2017 - 2020 - ISC License
3
+ # Author: Jordon Bedwell
4
+ # Encoding: utf-8
3
5
 
4
- gem "rake"
5
- gem "pry"
6
+ source 'https://rubygems.org'
7
+ gemspec
6
8
 
7
- if ENV["JEKYLL_VERSION"]
8
- # So we can test across all our supported.
9
- gem "jekyll", "~> #{ENV["JEKYLL_VERSION"]}"
9
+ if ENV['JEKYLL_VERSION']
10
+ gem 'jekyll', "~> #{ENV['JEKYLL_VERSION']}"
10
11
  end
@@ -1 +1,6 @@
1
- require "jekyll/sanity"
1
+ # Frozen-string-literal: true
2
+ # Copyright: 2017 - 2020 - ISC License
3
+ # Author: Jordon Bedwell
4
+ # Encoding: utf-8
5
+
6
+ require 'jekyll/sanity'
@@ -1,116 +1,128 @@
1
+ # Frozen-string-literal: true
2
+ # Copyright: 2017 - 2020 - ISC License
3
+ # Author: Jordon Bedwell
4
+ # Encoding: utf-8
5
+
6
+ require 'pathutil'
7
+
1
8
  module Jekyll
2
9
 
3
- # --
10
+ #
4
11
  # Reads the Jekyll configuration, this is necessary
5
12
  # because some of our stuff loads well before Jekyll
6
13
  # to setup, so we need to see the config before
7
14
  # Jekyll even sees it's own config.
8
15
  # @return [Hash] the config.
9
- # --
16
+ #
10
17
  def self.config
18
+ old_e = nil
19
+ old_o = nil
20
+
11
21
  @config ||= begin
12
- oldo, olde = $stdout, $stderr
22
+ old_o, old_e = $stdout, $stderr
13
23
  $stdout, $stderr = StringIO.new, StringIO.new
14
- file = Pathutil.pwd.join("_config.yml")
24
+ file = Pathutil.pwd.join('_config.yml')
15
25
  config = file.read_yaml(safe: true)
16
- source = config["source"]
26
+ source = config['source']
17
27
  defs = {
18
- "source" => Pathutil.pwd.to_s
28
+ 'source' => Pathutil.pwd.to_s
19
29
  }
20
30
 
21
31
  config = config.merge(defs)
22
32
  configuration(config).update({
23
- "source" => source || Configuration::DEFAULTS["source"]
33
+ 'source' => source || Configuration::DEFAULTS[
34
+ 'source'
35
+ ]
24
36
  })
25
37
  end
26
38
  ensure
27
- $stdout = oldo if oldo
28
- $stderr = olde if olde
39
+ $stdout = old_o if old_o
40
+ $stderr = old_e if old_e
29
41
  end
30
42
 
31
-
32
- # --
43
+ #
33
44
  # Reloads the configuration file for you, this only
34
45
  # affects `self.config` and doesn't really affect the
35
46
  # site instance at all, Jekyll is weird.
36
- # --
47
+ #
37
48
  def self.reload_config
38
- instance_variable_set(:@config, nil); config
49
+ instance_variable_set(:@config, nil)
50
+ config
39
51
  end
40
52
 
41
- # --
53
+ #
42
54
  # Whether or not we are inside of development
43
55
  # environment, this is where most people work
44
56
  # but you should set it yourself.
45
57
  # @return [true,false] truth.
46
- # --
58
+ #
47
59
  def self.dev?
48
60
  @dev ||= begin
49
- Jekyll.env == "dev" || Jekyll.env == "development"
61
+ Jekyll.env == 'dev' || Jekyll.env == 'development'
50
62
  end
51
63
  end
52
64
 
53
- # --
65
+ #
54
66
  # Whether or not we are inside of production
55
67
  # this is what you should set yourself to if
56
68
  # you are building a deployment.
57
69
  # @return [true,false] truth.
58
- # --
70
+ #
59
71
  def self.production?
60
72
  @production ||= begin
61
- Jekyll.env == "production" || Jekyll.env == "prod"
73
+ Jekyll.env == 'production' || Jekyll.env == 'prod'
62
74
  end
63
75
  end
64
76
 
65
- # --
77
+ #
66
78
  # A quick Pathutil (joinable) into the source dir, this
67
79
  # hopefully follows the spec of Jekyll by allowing you to
68
80
  # set the source dir (with `source`) and then if it's
69
81
  # not set, defaulting to the current path.
70
82
  # @return [Pathutil] the path.
71
- # --
83
+ #
72
84
  def self.source_dir
73
85
  @source_dir ||= begin
74
- Pathutil.new(config.fetch("source")). \
75
- expand_path
86
+ dir = Pathutil.new(config.fetch('source'))
87
+ dir.expand_path
76
88
  end
77
89
  end
78
90
 
79
- # --
91
+ #
80
92
  # @note this simply uses the default set by Jekyll
81
93
  # A quick `Pathutil` (joinable) into the plugins dir.
82
94
  # @return [Pathutil] the path.
83
- # --
95
+ #
84
96
  def self.plugins_dir
85
97
  @plugins_dir ||= begin
86
- Pathutil.new(config.fetch("plugins_dir")). \
87
- expand_path
98
+ dir = Pathutil.new(config.fetch('plugins_dir'))
99
+ dir.expand_path
88
100
  end
89
101
  end
90
102
 
91
- # --
103
+ #
92
104
  # A quick Pathutil (joinable) into the cache dir, and as
93
105
  # agreed to in https://goo.gl/TdzJWV we will default to
94
106
  # `.jekyll-cache` unless you define `cache_dir` key.
95
107
  # @return [Pathutil] the path.
96
- # --
108
+ #
97
109
  def self.cache_dir
98
110
  @cache_dir ||= begin
99
- backup = source_dir.join(".jekyll-cache")
100
- Pathutil.new(config.fetch("cache_dir", backup)). \
101
- expand_path
111
+ backup = source_dir.join('.jekyll-cache')
112
+ dir = Pathutil.new(config.fetch('cache_dir', backup))
113
+ dir.expand_path
102
114
  end
103
115
  end
104
116
 
105
- # --
117
+ #
106
118
  # @note this simply uses the default set by Jekyll
107
119
  # A quick `Pathutil` (joinable) into the site dir.
108
120
  # @return [Pathutil] the path.
109
- # --
121
+ #
110
122
  def self.site_dir
111
123
  @site_dir ||= begin
112
- Pathutil.new(config.fetch("destination")). \
113
- expand_path
124
+ dir = Pathutil.new(config.fetch('destination'))
125
+ dir.expand_path
114
126
  end
115
127
  end
116
128
  end
@@ -1,5 +1,10 @@
1
+ # Frozen-string-literal: true
2
+ # Copyright: 2017 - 2020 - ISC License
3
+ # Author: Jordon Bedwell
4
+ # Encoding: utf-8
5
+
1
6
  module Jekyll
2
7
  module Sanity
3
- VERSION = "1.2.0"
8
+ VERSION = '1.6.0'
4
9
  end
5
10
  end
metadata CHANGED
@@ -1,15 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-sanity
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.6.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-08-11 00:00:00.000000000 Z
11
+ date: 2020-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '1'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '99'
23
+ type: :development
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '1'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '99'
13
33
  - !ruby/object:Gem::Dependency
14
34
  name: rspec
15
35
  requirement: !ruby/object:Gem::Requirement
@@ -30,34 +50,88 @@ dependencies:
30
50
  - - "<"
31
51
  - !ruby/object:Gem::Version
32
52
  version: '4'
53
+ - !ruby/object:Gem::Dependency
54
+ name: envygeeks-rubocop
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - '='
58
+ - !ruby/object:Gem::Version
59
+ version: 1.0.0
60
+ type: :development
61
+ prerelease: false
62
+ version_requirements: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - '='
65
+ - !ruby/object:Gem::Version
66
+ version: 1.0.0
33
67
  - !ruby/object:Gem::Dependency
34
68
  name: luna-rspec-formatters
35
69
  requirement: !ruby/object:Gem::Requirement
36
70
  requirements:
37
71
  - - "~>"
38
72
  - !ruby/object:Gem::Version
39
- version: '3.7'
73
+ version: '3.16'
40
74
  type: :development
41
75
  prerelease: false
42
76
  version_requirements: !ruby/object:Gem::Requirement
43
77
  requirements:
44
78
  - - "~>"
45
79
  - !ruby/object:Gem::Version
46
- version: '3.7'
80
+ version: '3.16'
81
+ - !ruby/object:Gem::Dependency
82
+ name: pry
83
+ requirement: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ version: '0.1'
88
+ - - "<"
89
+ - !ruby/object:Gem::Version
90
+ version: '0.99'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0.1'
98
+ - - "<"
99
+ - !ruby/object:Gem::Version
100
+ version: '0.99'
47
101
  - !ruby/object:Gem::Dependency
48
102
  name: jekyll
49
103
  requirement: !ruby/object:Gem::Requirement
50
104
  requirements:
51
- - - "~>"
105
+ - - ">="
52
106
  - !ruby/object:Gem::Version
53
107
  version: '3.1'
108
+ - - "<"
109
+ - !ruby/object:Gem::Version
110
+ version: '5.0'
54
111
  type: :runtime
55
112
  prerelease: false
56
113
  version_requirements: !ruby/object:Gem::Requirement
57
114
  requirements:
58
- - - "~>"
115
+ - - ">="
59
116
  - !ruby/object:Gem::Version
60
117
  version: '3.1'
118
+ - - "<"
119
+ - !ruby/object:Gem::Version
120
+ version: '5.0'
121
+ - !ruby/object:Gem::Dependency
122
+ name: pathutil
123
+ requirement: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - "~>"
126
+ - !ruby/object:Gem::Version
127
+ version: '0.16'
128
+ type: :runtime
129
+ prerelease: false
130
+ version_requirements: !ruby/object:Gem::Requirement
131
+ requirements:
132
+ - - "~>"
133
+ - !ruby/object:Gem::Version
134
+ version: '0.16'
61
135
  description: Patches to make Jekyll less insane and easier
62
136
  email:
63
137
  - jordon@envygeeks.io
@@ -88,8 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
162
  - !ruby/object:Gem::Version
89
163
  version: '0'
90
164
  requirements: []
91
- rubyforge_project:
92
- rubygems_version: 2.6.11
165
+ rubygems_version: 3.1.2
93
166
  signing_key:
94
167
  specification_version: 4
95
168
  summary: Configuration, Paths and other stuff