nanoc-tidy.rb 0.8.1 → 0.8.2

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
2
  SHA256:
3
- metadata.gz: '0898b9a7ec2f3c137c9fa5233313a88102ea13ad27f8b6093f258c1f0f096e66'
4
- data.tar.gz: 344d471e7428617674f06a759da09dcde5807ccdbc811ee76ab0a8e3d5d01083
3
+ metadata.gz: 8d6e154d29de034dfe0b684d5e95473021844c209b99fcd5660e7bf9a9f68fd6
4
+ data.tar.gz: e03bc5eaa2bc6ce7d3b24fd449bc72ad4dd0e31b0aec5af5f4419ae4c298fc1d
5
5
  SHA512:
6
- metadata.gz: dd18a0e8598f6cfd2fe27a2294deed691d8e671110ea1efa3521fbb7c0005a17e43178251c9a90a331a0a8bbfdea46fb728982b78debb49a8c8699d7eb0a1fd7
7
- data.tar.gz: 84471209421d20f88c6a6b36e05ed51f11c85cfebb623ad63c93ba35cf92a53335461cf518ea1ed56a32f4295e07d0924e91a5ad2be06ccf52dfbca9667c4d8a
6
+ metadata.gz: 8a92d50b08bdd9bbd65ab664c55a867404a9755ddf3c2f0dd4f40c8fecf48c00e84bfd824e5281cda17083b2963b4b7ccfb8614d3b40c308815570b7b53b8e00
7
+ data.tar.gz: 840a2eca0b0cbbeec99fa022d13f0674fb0eca061310b070e58d3d99c916cb14b43d249f6234b8c78217834f9ceadcac3dd1907a57692f4d3dfea2f73c505265
@@ -34,12 +34,13 @@ module Nanoc::Tidy
34
34
  # @return [String]
35
35
  # Returns HTML content (modified)
36
36
  def run(content, options = {})
37
+ options = Ryo(options)
37
38
  file = temporary_file(
38
39
  File.basename(item.identifier.to_s),
39
40
  content
40
41
  )
41
- spawn options[:exe] || "tidy5",
42
- [*default_argv, *(options[:argv] || []), "-modify", file.path]
42
+ spawn options.exe || "tidy5",
43
+ [*default_argv, *(options.argv || []), "-modify", file.path]
43
44
  File.read(file.path)
44
45
  ensure
45
46
  file ? file.tap(&:unlink).close : nil
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Nanoc
4
4
  module Tidy
5
- VERSION = "0.8.1"
5
+ VERSION = "0.8.2"
6
6
  end
7
7
  end
data/lib/nanoc/tidy.rb CHANGED
@@ -6,6 +6,7 @@ module Nanoc::Tidy
6
6
  # Generic error
7
7
  Error = Class.new(RuntimeError)
8
8
 
9
+ require "ryo"
9
10
  require_relative "tidy/version"
10
11
  require_relative "tidy/filter"
11
12
 
@@ -12,7 +12,8 @@ Gem::Specification.new do |gem|
12
12
  gem.require_paths = ["lib"]
13
13
  gem.summary = "nanoc-tidy.rb = nanoc + tidy-html5"
14
14
  gem.description = gem.summary
15
- gem.add_runtime_dependency "test-cmd.rb", "~> 0.12.2"
15
+ gem.add_runtime_dependency "ryo.rb", "~> 0.5"
16
+ gem.add_runtime_dependency "test-cmd.rb", "~> 0.12.3"
16
17
  gem.add_development_dependency "yard", "~> 0.9"
17
18
  gem.add_development_dependency "redcarpet", "~> 3.5"
18
19
  gem.add_development_dependency "test-unit", "~> 3.6"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanoc-tidy.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - '0x1eef'
@@ -10,20 +10,34 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2024-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: ryo.rb
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.5'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.5'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: test-cmd.rb
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
31
  - - "~>"
18
32
  - !ruby/object:Gem::Version
19
- version: 0.12.2
33
+ version: 0.12.3
20
34
  type: :runtime
21
35
  prerelease: false
22
36
  version_requirements: !ruby/object:Gem::Requirement
23
37
  requirements:
24
38
  - - "~>"
25
39
  - !ruby/object:Gem::Version
26
- version: 0.12.2
40
+ version: 0.12.3
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: yard
29
43
  requirement: !ruby/object:Gem::Requirement