jekyll_plugin_support 1.1.0 → 3.0.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 +4 -4
- data/.rubocop.yml +17 -1
- data/CHANGELOG.md +17 -6
- data/README.md +430 -2
- data/jekyll_plugin_support.gemspec +2 -1
- data/lib/block/jekyll_plugin_support_block.rb +2 -4
- data/lib/block/jekyll_plugin_support_block_noarg.rb +0 -2
- data/lib/generator/jekyll_plugin_support_generator.rb +1 -7
- data/lib/helper/jekyll_plugin_helper.rb +5 -5
- data/lib/helper/jekyll_plugin_helper_class.rb +2 -2
- data/lib/hooks/a_page.rb +69 -0
- data/lib/hooks/all_collections_hooks.rb +61 -0
- data/lib/hooks/all_files.rb +48 -0
- data/lib/hooks/class_methods.rb +50 -0
- data/lib/jekyll_all_collections/all_collections_tag.rb +157 -0
- data/lib/jekyll_plugin_support/jekyll_plugin_support_class.rb +3 -5
- data/lib/jekyll_plugin_support/jekyll_plugin_support_spec_support.rb +1 -3
- data/lib/jekyll_plugin_support/version.rb +1 -1
- data/lib/jekyll_plugin_support.rb +17 -12
- data/lib/tag/jekyll_plugin_support_tag.rb +1 -4
- data/lib/tag/jekyll_plugin_support_tag_noarg.rb +0 -2
- data/lib/util/mslinn_binary_search.rb +152 -0
- data/lib/util/send_chain.rb +56 -0
- data/spec/all_collections_tag/all_collections_tag_sort_spec.rb +112 -0
- data/spec/bsearch_spec.rb +50 -0
- data/spec/custom_error_spec.rb +9 -9
- data/spec/date_sort_spec.rb +84 -0
- data/spec/jekyll_plugin_helper_options_spec.rb +7 -3
- data/spec/liquid_variable_parsing_spec.rb +6 -6
- data/spec/mslinn_binary_search_spec.rb +47 -0
- data/spec/send_chain_spec.rb +72 -0
- data/spec/send_spec.rb +28 -0
- data/spec/sorted_lru_files_spec.rb +82 -0
- data/spec/spec_helper.rb +2 -0
- data/spec/status_persistence.txt +3 -9
- data/spec/testable_spec.rb +38 -0
- metadata +45 -5
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
# Exploring how to invoke methods from classes and modules
|
4
|
+
# See https://mslinn.com/jekyll/10700-designing-for-testability.html
|
5
|
+
|
6
|
+
module TestModule
|
7
|
+
def a_method
|
8
|
+
'a_method says Hi!'
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class TestClass
|
13
|
+
extend TestModule # Defines class methods
|
14
|
+
|
15
|
+
def initialize(param1, param2)
|
16
|
+
super()
|
17
|
+
@param1 = param1
|
18
|
+
@param2 = param2
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
RSpec.describe(TestModule) do
|
23
|
+
extend described_class
|
24
|
+
|
25
|
+
it 'Invokes a_method from module' do
|
26
|
+
result = self.class.a_method
|
27
|
+
expect(result).to eq('a_method says Hi!')
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
RSpec.describe(TestClass) do
|
32
|
+
let(:o1) { described_class.new('value1', 'value2') }
|
33
|
+
|
34
|
+
it 'Invokes a_method from class' do
|
35
|
+
result = o1.class.a_method
|
36
|
+
expect(result).to eq('a_method says Hi!')
|
37
|
+
end
|
38
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll_plugin_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Slinn
|
8
|
+
autorequire:
|
8
9
|
bindir: exe
|
9
10
|
cert_chain: []
|
10
|
-
date: 2025-
|
11
|
+
date: 2025-03-06 00:00:00.000000000 Z
|
11
12
|
dependencies:
|
12
13
|
- !ruby/object:Gem::Dependency
|
13
14
|
name: facets
|
@@ -29,14 +30,14 @@ dependencies:
|
|
29
30
|
requirements:
|
30
31
|
- - ">="
|
31
32
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
33
|
+
version: 4.4.1
|
33
34
|
type: :runtime
|
34
35
|
prerelease: false
|
35
36
|
version_requirements: !ruby/object:Gem::Requirement
|
36
37
|
requirements:
|
37
38
|
- - ">="
|
38
39
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
40
|
+
version: 4.4.1
|
40
41
|
- !ruby/object:Gem::Dependency
|
41
42
|
name: jekyll_plugin_logger
|
42
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -79,6 +80,21 @@ dependencies:
|
|
79
80
|
- - ">="
|
80
81
|
- !ruby/object:Gem::Version
|
81
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: sorted_set
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description:
|
82
98
|
email:
|
83
99
|
- mslinn@mslinn.com
|
84
100
|
executables: []
|
@@ -100,17 +116,32 @@ files:
|
|
100
116
|
- lib/helper/jekyll_plugin_helper.rb
|
101
117
|
- lib/helper/jekyll_plugin_helper_attribution.rb
|
102
118
|
- lib/helper/jekyll_plugin_helper_class.rb
|
119
|
+
- lib/hooks/a_page.rb
|
120
|
+
- lib/hooks/all_collections_hooks.rb
|
121
|
+
- lib/hooks/all_files.rb
|
122
|
+
- lib/hooks/class_methods.rb
|
123
|
+
- lib/jekyll_all_collections/all_collections_tag.rb
|
103
124
|
- lib/jekyll_plugin_support.rb
|
104
125
|
- lib/jekyll_plugin_support/jekyll_plugin_support_class.rb
|
105
126
|
- lib/jekyll_plugin_support/jekyll_plugin_support_spec_support.rb
|
106
127
|
- lib/jekyll_plugin_support/version.rb
|
107
128
|
- lib/tag/jekyll_plugin_support_tag.rb
|
108
129
|
- lib/tag/jekyll_plugin_support_tag_noarg.rb
|
130
|
+
- lib/util/mslinn_binary_search.rb
|
131
|
+
- lib/util/send_chain.rb
|
132
|
+
- spec/all_collections_tag/all_collections_tag_sort_spec.rb
|
133
|
+
- spec/bsearch_spec.rb
|
109
134
|
- spec/custom_error_spec.rb
|
135
|
+
- spec/date_sort_spec.rb
|
110
136
|
- spec/jekyll_plugin_helper_options_spec.rb
|
111
137
|
- spec/liquid_variable_parsing_spec.rb
|
138
|
+
- spec/mslinn_binary_search_spec.rb
|
139
|
+
- spec/send_chain_spec.rb
|
140
|
+
- spec/send_spec.rb
|
141
|
+
- spec/sorted_lru_files_spec.rb
|
112
142
|
- spec/spec_helper.rb
|
113
143
|
- spec/status_persistence.txt
|
144
|
+
- spec/testable_spec.rb
|
114
145
|
homepage: https://www.mslinn.com/jekyll_plugins/jekyll_plugin_support.html
|
115
146
|
licenses:
|
116
147
|
- MIT
|
@@ -138,13 +169,22 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
169
|
- !ruby/object:Gem::Version
|
139
170
|
version: '0'
|
140
171
|
requirements: []
|
141
|
-
rubygems_version: 3.
|
172
|
+
rubygems_version: 3.5.22
|
173
|
+
signing_key:
|
142
174
|
specification_version: 4
|
143
175
|
summary: Provides a framework for writing and testing Jekyll plugins
|
144
176
|
test_files:
|
177
|
+
- spec/all_collections_tag/all_collections_tag_sort_spec.rb
|
178
|
+
- spec/bsearch_spec.rb
|
145
179
|
- spec/custom_error_spec.rb
|
180
|
+
- spec/date_sort_spec.rb
|
146
181
|
- spec/jekyll_plugin_helper_options_spec.rb
|
147
182
|
- spec/liquid_variable_parsing_spec.rb
|
183
|
+
- spec/mslinn_binary_search_spec.rb
|
184
|
+
- spec/send_chain_spec.rb
|
185
|
+
- spec/send_spec.rb
|
186
|
+
- spec/sorted_lru_files_spec.rb
|
148
187
|
- spec/spec_helper.rb
|
149
188
|
- spec/status_persistence.txt
|
189
|
+
- spec/testable_spec.rb
|
150
190
|
...
|