nanoc 4.12.20 → 4.13.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/NEWS.md +25 -0
- data/lib/nanoc/data_sources/filesystem/parser.rb +2 -2
- data/lib/nanoc/data_sources/filesystem.rb +2 -2
- data/lib/nanoc/extra/srcset_parser.rb +1 -1
- data/lib/nanoc/extra.rb +0 -1
- data/lib/nanoc/filters/colorize_syntax.rb +0 -2
- data/lib/nanoc/filters/erb.rb +1 -1
- data/lib/nanoc/filters/erubi.rb +1 -1
- data/lib/nanoc/filters/erubis.rb +1 -1
- data/lib/nanoc/filters/haml.rb +1 -1
- data/lib/nanoc/filters/less.rb +1 -1
- data/lib/nanoc/filters/relativize_paths.rb +0 -2
- data/lib/nanoc/filters/sass.rb +2 -2
- data/lib/nanoc/filters/xsl.rb +0 -2
- data/lib/nanoc/helpers/breadcrumbs.rb +2 -2
- data/lib/nanoc/helpers/capturing.rb +4 -4
- data/lib/nanoc/orig_cli/commands/show-rules.rb +2 -2
- data/lib/nanoc/rule_dsl/action_provider.rb +4 -4
- data/lib/nanoc/rule_dsl/action_sequence_calculator.rb +5 -5
- data/lib/nanoc/rule_dsl/compilation_rule.rb +4 -4
- data/lib/nanoc/rule_dsl/compilation_rule_context.rb +3 -3
- data/lib/nanoc/rule_dsl/compiler_dsl.rb +1 -1
- data/lib/nanoc/rule_dsl/routing_rule.rb +1 -1
- data/lib/nanoc/version.rb +1 -1
- metadata +9 -10
- data/lib/nanoc/extra/jruby_nokogiri_warner.rb +0 -43
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48a0bdf76aa79dd9d4f2ea05f2a8d4fd0b4d431e9889d91856878aaaf0ff39c9
|
4
|
+
data.tar.gz: 8d6ae45464a308e01d7d90cd1d5f81496df31d6512f84a80ee6d4f4c9133c1fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22448a320d47169e6709a0f74ad962a5b6369bda3ab4c371bf0b7f475c8a40a3bb7077a1f6bec6d9da4d06499310582bf9d3ec5e5627a90abcb8c16eb4ebb972
|
7
|
+
data.tar.gz: 711d80a0ceed374cb8ccdb24d84136d6ae49e3f49b130a5e9789b4bc9fe75d3bdc466a4e360e9e993b4bde971d262a2859e0eac2d8fd2742c04a38be9d3c1ff5
|
data/NEWS.md
CHANGED
@@ -1,5 +1,30 @@
|
|
1
1
|
# Nanoc news
|
2
2
|
|
3
|
+
## 4.13.0 (2024-06-19)
|
4
|
+
|
5
|
+
Features:
|
6
|
+
|
7
|
+
- Added `--focus` option to the `compile` and `live` commands (#1707)
|
8
|
+
|
9
|
+
Fixes:
|
10
|
+
|
11
|
+
- Made `delete` log lines use relative (not absolute) paths (#1706)
|
12
|
+
|
13
|
+
Changes:
|
14
|
+
|
15
|
+
- Dropped support for Ruby 3.0 (EOL) (#1704)
|
16
|
+
|
17
|
+
## 4.12.21 (2024-04-27)
|
18
|
+
|
19
|
+
Fixes:
|
20
|
+
|
21
|
+
- Fixed a rare “private method printf” error (#1694)
|
22
|
+
|
23
|
+
Enhancements:
|
24
|
+
|
25
|
+
- Sped up checksummer and made it more reliable and correct (#1693)
|
26
|
+
- Removed Nokogiri warning message on JRuby (#1700)
|
27
|
+
|
3
28
|
## 4.12.20 (2024-03-15)
|
4
29
|
|
5
30
|
Enhancements:
|
@@ -35,7 +35,7 @@ class Nanoc::DataSources::Filesystem
|
|
35
35
|
content = content_filename ? Tools.read_file(content_filename, config: @config) : ''
|
36
36
|
meta_raw = Tools.read_file(meta_filename, config: @config)
|
37
37
|
meta = parse_metadata(meta_raw, meta_filename)
|
38
|
-
ParseResult.new(content
|
38
|
+
ParseResult.new(content:, attributes: meta, attributes_data: meta_raw)
|
39
39
|
end
|
40
40
|
|
41
41
|
# @return [ParseResult]
|
@@ -54,7 +54,7 @@ class Nanoc::DataSources::Filesystem
|
|
54
54
|
meta = parse_metadata(pieces[2], content_filename)
|
55
55
|
content = pieces[4].sub(/\A\n/, '')
|
56
56
|
|
57
|
-
ParseResult.new(content
|
57
|
+
ParseResult.new(content:, attributes: meta, attributes_data: pieces[2])
|
58
58
|
end
|
59
59
|
|
60
60
|
# @return [Hash]
|
@@ -248,8 +248,8 @@ module Nanoc::DataSources
|
|
248
248
|
def extra_attributes_for(content_filename, meta_filename)
|
249
249
|
{
|
250
250
|
filename: content_filename,
|
251
|
-
content_filename
|
252
|
-
meta_filename
|
251
|
+
content_filename:,
|
252
|
+
meta_filename:,
|
253
253
|
extension: content_filename ? ext_of(content_filename)[1..] : nil,
|
254
254
|
mtime: mtime_of(content_filename, meta_filename),
|
255
255
|
}
|
data/lib/nanoc/extra.rb
CHANGED
@@ -12,8 +12,6 @@ module Nanoc::Filters
|
|
12
12
|
ExtractedLanguage = Struct.new(:language, :from_class)
|
13
13
|
|
14
14
|
def run(content, params = {})
|
15
|
-
Nanoc::Extra::JRubyNokogiriWarner.check_and_warn
|
16
|
-
|
17
15
|
@colorizers = colorizers_from_params(params)
|
18
16
|
|
19
17
|
syntax = params.fetch(:syntax, :html)
|
data/lib/nanoc/filters/erb.rb
CHANGED
data/lib/nanoc/filters/erubi.rb
CHANGED
@@ -23,7 +23,7 @@ module Nanoc::Filters
|
|
23
23
|
assigns_binding = context.get_binding(&proc)
|
24
24
|
|
25
25
|
# Get result
|
26
|
-
engine_opts = { bufvar: '_erbout', filename:
|
26
|
+
engine_opts = { bufvar: '_erbout', filename: }.merge(params)
|
27
27
|
engine = ::Erubi::Engine.new(content, engine_opts)
|
28
28
|
eval(engine.src, assigns_binding, filename)
|
29
29
|
end
|
data/lib/nanoc/filters/erubis.rb
CHANGED
data/lib/nanoc/filters/haml.rb
CHANGED
@@ -15,7 +15,7 @@ module Nanoc::Filters
|
|
15
15
|
# @return [String] The filtered content
|
16
16
|
def run(content, params = {})
|
17
17
|
# Get options
|
18
|
-
options = params.merge(filename:
|
18
|
+
options = params.merge(filename:)
|
19
19
|
|
20
20
|
# Create context
|
21
21
|
context = ::Nanoc::Core::Context.new(assigns)
|
data/lib/nanoc/filters/less.rb
CHANGED
@@ -22,7 +22,7 @@ module Nanoc::Filters
|
|
22
22
|
# Add filename to load path
|
23
23
|
paths = [File.dirname(@item[:content_filename])]
|
24
24
|
on_main_fiber do
|
25
|
-
parser = ::Less::Parser.new(paths:
|
25
|
+
parser = ::Less::Parser.new(paths:)
|
26
26
|
parser.parse(content).to_css(params)
|
27
27
|
end
|
28
28
|
end
|
@@ -45,8 +45,6 @@ module Nanoc::Filters
|
|
45
45
|
#
|
46
46
|
# @return [String] The filtered content
|
47
47
|
def run(content, params = {})
|
48
|
-
Nanoc::Extra::JRubyNokogiriWarner.check_and_warn
|
49
|
-
|
50
48
|
# Set assigns so helper function can be used
|
51
49
|
@item_rep = assigns[:item_rep] if @item_rep.nil?
|
52
50
|
|
data/lib/nanoc/filters/sass.rb
CHANGED
@@ -21,7 +21,7 @@ module Nanoc::Filters
|
|
21
21
|
|
22
22
|
options = params.merge(
|
23
23
|
load_paths: [importer, *params[:load_paths]&.reject { |p| p.is_a?(String) && %r{^content/} =~ p }],
|
24
|
-
importer
|
24
|
+
importer:,
|
25
25
|
filename: rep.item.identifier.to_s,
|
26
26
|
cache: false,
|
27
27
|
)
|
@@ -40,7 +40,7 @@ module Nanoc::Filters
|
|
40
40
|
encoded = "data:application/json;base64,#{Base64.urlsafe_encode64(sourcemap)}"
|
41
41
|
[css.gsub(%r{^/\*#\s+sourceMappingURL=\s*#{sourcemap_path}\s*\*/$}, "/*# sourceMappingURL=#{encoded} */")]
|
42
42
|
else
|
43
|
-
sourcemap = sourcemap&.to_json(css_path
|
43
|
+
sourcemap = sourcemap&.to_json(css_path:, sourcemap_path:, type: params[:sources_content] ? :inline : :auto)
|
44
44
|
sourcemap = sourcemap&.split("\n")&.reject { |l| l =~ /^\s*"file":\s*"#{filter.object_id}"\s*$/ }&.join("\n")
|
45
45
|
[css, sourcemap]
|
46
46
|
end
|
data/lib/nanoc/filters/xsl.rb
CHANGED
@@ -33,12 +33,12 @@ module Nanoc::Helpers
|
|
33
33
|
|
34
34
|
# e.g. unfold(10.class, &:superclass)
|
35
35
|
# => [Integer, Numeric, Object, BasicObject]
|
36
|
-
def self.unfold(obj, &
|
36
|
+
def self.unfold(obj, &)
|
37
37
|
acc = [obj]
|
38
38
|
|
39
39
|
res = yield(obj)
|
40
40
|
if res
|
41
|
-
acc + unfold(res, &
|
41
|
+
acc + unfold(res, &)
|
42
42
|
else
|
43
43
|
acc
|
44
44
|
end
|
@@ -13,11 +13,11 @@ module Nanoc::Helpers
|
|
13
13
|
@item = item
|
14
14
|
end
|
15
15
|
|
16
|
-
def run(&
|
16
|
+
def run(&)
|
17
17
|
existing_behavior = @params.fetch(:existing, :error)
|
18
18
|
|
19
19
|
# Capture
|
20
|
-
content_string = capture(&
|
20
|
+
content_string = capture(&)
|
21
21
|
|
22
22
|
# Get existing contents and prep for store
|
23
23
|
compiled_content_store = @item._context.compiled_content_store
|
@@ -102,7 +102,7 @@ module Nanoc::Helpers
|
|
102
102
|
# @overload content_for(item, name)
|
103
103
|
# @param [Symbol, String] name
|
104
104
|
# @return [String]
|
105
|
-
def content_for(*args, &
|
105
|
+
def content_for(*args, &)
|
106
106
|
if block_given? # Set content
|
107
107
|
name = args[0]
|
108
108
|
params =
|
@@ -116,7 +116,7 @@ module Nanoc::Helpers
|
|
116
116
|
"of the capture, and optionally params) but got #{args.size} instead"
|
117
117
|
end
|
118
118
|
|
119
|
-
SetContent.new(name, params, @item).run(&
|
119
|
+
SetContent.new(name, params, @item).run(&)
|
120
120
|
elsif args.size > 1 && (args.first.is_a?(Symbol) || args.first.is_a?(String)) # Set content
|
121
121
|
name = args[0]
|
122
122
|
content = args.last
|
@@ -22,8 +22,8 @@ module Nanoc::OrigCLI::Commands
|
|
22
22
|
items = site.items.sort_by(&:identifier)
|
23
23
|
layouts = site.layouts.sort_by(&:identifier)
|
24
24
|
|
25
|
-
items.each { |e| explain_item(e, rules
|
26
|
-
layouts.each { |e| explain_layout(e, rules:
|
25
|
+
items.each { |e| explain_item(e, rules:, reps:) }
|
26
|
+
layouts.each { |e| explain_layout(e, rules:) }
|
27
27
|
end
|
28
28
|
|
29
29
|
def explain_item(item, rules:, reps:)
|
@@ -12,7 +12,7 @@ module Nanoc::RuleDSL
|
|
12
12
|
|
13
13
|
action_sequence_calculator =
|
14
14
|
Nanoc::RuleDSL::ActionSequenceCalculator.new(
|
15
|
-
rules_collection
|
15
|
+
rules_collection:, site:,
|
16
16
|
)
|
17
17
|
|
18
18
|
action_provider = new(rules_collection, action_sequence_calculator)
|
@@ -61,10 +61,10 @@ module Nanoc::RuleDSL
|
|
61
61
|
|
62
62
|
view_context =
|
63
63
|
Nanoc::Core::ViewContextForCompilation.new(
|
64
|
-
reps
|
64
|
+
reps:,
|
65
65
|
items: site.items,
|
66
|
-
dependency_tracker
|
67
|
-
compilation_context: compiler.compilation_context(reps:
|
66
|
+
dependency_tracker:,
|
67
|
+
compilation_context: compiler.compilation_context(reps:),
|
68
68
|
compiled_content_store: Nanoc::Core::CompiledContentStore.new,
|
69
69
|
)
|
70
70
|
ctx = new_postprocessor_context(site, view_context)
|
@@ -62,7 +62,7 @@ module Nanoc::RuleDSL
|
|
62
62
|
end
|
63
63
|
|
64
64
|
recorder.snapshot(:raw)
|
65
|
-
rule.apply_to(rep, recorder
|
65
|
+
rule.apply_to(rep, recorder:, site: @site, view_context:)
|
66
66
|
recorder.snapshot(:post) if recorder.any_layouts?
|
67
67
|
recorder.snapshot(:last)
|
68
68
|
recorder.snapshot(:pre) unless recorder.pre_snapshot?
|
@@ -70,7 +70,7 @@ module Nanoc::RuleDSL
|
|
70
70
|
copy_paths_from_routing_rules(
|
71
71
|
compact_snapshots(recorder.action_sequence),
|
72
72
|
recorder.snapshots_for_which_to_skip_routing_rule,
|
73
|
-
rep
|
73
|
+
rep:,
|
74
74
|
)
|
75
75
|
end
|
76
76
|
|
@@ -98,7 +98,7 @@ module Nanoc::RuleDSL
|
|
98
98
|
actions << action
|
99
99
|
end
|
100
100
|
end
|
101
|
-
Nanoc::Core::ActionSequence.new(actions:
|
101
|
+
Nanoc::Core::ActionSequence.new(actions:)
|
102
102
|
end
|
103
103
|
|
104
104
|
def copy_paths_from_routing_rules(seq, snapshots_for_which_to_skip_routing_rule, rep:)
|
@@ -119,7 +119,7 @@ module Nanoc::RuleDSL
|
|
119
119
|
# For each snapshot name, find a path from a routing rule. The routing
|
120
120
|
# rule might return nil, so we need #compact.
|
121
121
|
paths = action.snapshot_names.map { |sn| basic_path_from_rules_for(rep, sn) }.compact
|
122
|
-
action.update(snapshot_names: [], paths:
|
122
|
+
action.update(snapshot_names: [], paths:)
|
123
123
|
end
|
124
124
|
end
|
125
125
|
|
@@ -136,7 +136,7 @@ module Nanoc::RuleDSL
|
|
136
136
|
routing_rule.apply_to(
|
137
137
|
rep,
|
138
138
|
site: @site,
|
139
|
-
view_context
|
139
|
+
view_context:,
|
140
140
|
)
|
141
141
|
|
142
142
|
if basic_path && !basic_path.start_with?('/')
|
@@ -11,10 +11,10 @@ module Nanoc::RuleDSL
|
|
11
11
|
] => C::Any
|
12
12
|
def apply_to(rep, site:, recorder:, view_context:)
|
13
13
|
context = Nanoc::RuleDSL::CompilationRuleContext.new(
|
14
|
-
rep
|
15
|
-
recorder
|
16
|
-
site
|
17
|
-
view_context
|
14
|
+
rep:,
|
15
|
+
recorder:,
|
16
|
+
site:,
|
17
|
+
view_context:,
|
18
18
|
)
|
19
19
|
|
20
20
|
context.instance_exec(matches(rep.item.identifier), &@block)
|
@@ -13,7 +13,7 @@ module Nanoc::RuleDSL
|
|
13
13
|
def initialize(rep:, site:, recorder:, view_context:)
|
14
14
|
@_recorder = recorder
|
15
15
|
|
16
|
-
super(rep
|
16
|
+
super(rep:, site:, view_context:)
|
17
17
|
end
|
18
18
|
|
19
19
|
# Filters the current representation (calls {Nanoc::Core::ItemRep#filter} with
|
@@ -56,7 +56,7 @@ module Nanoc::RuleDSL
|
|
56
56
|
#
|
57
57
|
# @return [void]
|
58
58
|
def snapshot(snapshot_name, path: Nanoc::Core::UNDEFINED)
|
59
|
-
@_recorder.snapshot(snapshot_name, path:
|
59
|
+
@_recorder.snapshot(snapshot_name, path:)
|
60
60
|
end
|
61
61
|
|
62
62
|
# Creates a snapshot named :last the current compiled item content, with
|
@@ -79,7 +79,7 @@ module Nanoc::RuleDSL
|
|
79
79
|
if arg.key?(:ext)
|
80
80
|
ext = arg[:ext].sub(/\A\./, '')
|
81
81
|
path = @item.identifier.without_exts + '.' + ext
|
82
|
-
snapshot(snapshot_name, path:
|
82
|
+
snapshot(snapshot_name, path:)
|
83
83
|
else
|
84
84
|
raise ArgumentError, 'Cannot call #write this way (need path or :ext)'
|
85
85
|
end
|
@@ -20,7 +20,7 @@ module Nanoc::RuleDSL
|
|
20
20
|
def initialize(rules_collection, config)
|
21
21
|
@rules_collection = rules_collection
|
22
22
|
@config = config
|
23
|
-
super({ config:
|
23
|
+
super({ config: })
|
24
24
|
end
|
25
25
|
|
26
26
|
# Creates a preprocessor block that will be executed after all data is
|
@@ -20,7 +20,7 @@ module Nanoc::RuleDSL
|
|
20
20
|
] => C::Any
|
21
21
|
def apply_to(rep, site:, view_context:)
|
22
22
|
context = Nanoc::RuleDSL::RoutingRuleContext.new(
|
23
|
-
rep
|
23
|
+
rep:, site:, view_context:,
|
24
24
|
)
|
25
25
|
|
26
26
|
context.instance_exec(matches(rep.item.identifier), &@block)
|
data/lib/nanoc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nanoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Defreyne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -64,28 +64,28 @@ dependencies:
|
|
64
64
|
requirements:
|
65
65
|
- - '='
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: 4.
|
67
|
+
version: 4.13.0
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - '='
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: 4.
|
74
|
+
version: 4.13.0
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: nanoc-core
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
79
|
- - '='
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: 4.
|
81
|
+
version: 4.13.0
|
82
82
|
type: :runtime
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - '='
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: 4.
|
88
|
+
version: 4.13.0
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: nanoc-deploying
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -165,7 +165,6 @@ files:
|
|
165
165
|
- lib/nanoc/extra.rb
|
166
166
|
- lib/nanoc/extra/core_ext.rb
|
167
167
|
- lib/nanoc/extra/core_ext/time.rb
|
168
|
-
- lib/nanoc/extra/jruby_nokogiri_warner.rb
|
169
168
|
- lib/nanoc/extra/srcset_parser.rb
|
170
169
|
- lib/nanoc/filters.rb
|
171
170
|
- lib/nanoc/filters/asciidoc.rb
|
@@ -234,7 +233,7 @@ licenses:
|
|
234
233
|
- MIT
|
235
234
|
metadata:
|
236
235
|
rubygems_mfa_required: 'true'
|
237
|
-
source_code_uri: https://github.com/nanoc/nanoc/tree/4.
|
236
|
+
source_code_uri: https://github.com/nanoc/nanoc/tree/4.13.0/nanoc
|
238
237
|
post_install_message:
|
239
238
|
rdoc_options: []
|
240
239
|
require_paths:
|
@@ -243,14 +242,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
243
242
|
requirements:
|
244
243
|
- - ">="
|
245
244
|
- !ruby/object:Gem::Version
|
246
|
-
version: '
|
245
|
+
version: '3.1'
|
247
246
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
248
247
|
requirements:
|
249
248
|
- - ">="
|
250
249
|
- !ruby/object:Gem::Version
|
251
250
|
version: '0'
|
252
251
|
requirements: []
|
253
|
-
rubygems_version: 3.5.
|
252
|
+
rubygems_version: 3.5.11
|
254
253
|
signing_key:
|
255
254
|
specification_version: 4
|
256
255
|
summary: A static-site generator with a focus on flexibility.
|
@@ -1,43 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Nanoc::Extra
|
4
|
-
# @api private
|
5
|
-
class JRubyNokogiriWarner
|
6
|
-
include Singleton
|
7
|
-
|
8
|
-
TEXT = <<~EOS
|
9
|
-
--------------------------------------------------------------------------------
|
10
|
-
Note:
|
11
|
-
|
12
|
-
The behavior of Pure Java Nokogiri differs from the Nokogiri used on the
|
13
|
-
standard Ruby interpreter (MRI) due to differences in underlying libraries.
|
14
|
-
|
15
|
-
These sometimes problematic behavioral differences can cause Nanoc filters not
|
16
|
-
to function properly, if at all. If you need reliable (X)HTML and XML handling
|
17
|
-
functionality, consider not using Nokogiri on JRuby for the time being.
|
18
|
-
|
19
|
-
These issues are being worked on both from the Nokogiri and the Nanoc side. Keep
|
20
|
-
your Nokogiri and Nanoc versions up to date!
|
21
|
-
|
22
|
-
For details, see https://github.com/nanoc/nanoc/pull/422.
|
23
|
-
--------------------------------------------------------------------------------
|
24
|
-
EOS
|
25
|
-
|
26
|
-
def self.check_and_warn
|
27
|
-
instance.check_and_warn
|
28
|
-
end
|
29
|
-
|
30
|
-
def initialize
|
31
|
-
@warned = false
|
32
|
-
end
|
33
|
-
|
34
|
-
def check_and_warn
|
35
|
-
return unless defined?(RUBY_ENGINE)
|
36
|
-
return if RUBY_ENGINE != 'jruby'
|
37
|
-
return if @warned
|
38
|
-
|
39
|
-
$stderr.puts TEXT
|
40
|
-
@warned = true
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|