htmlsnob_ruby 0.1.2 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 809fbdfc19e4b23e55042bd9f164204f7d49c16b30ce59583e9157c90cafab1f
4
- data.tar.gz: 27d84dcb1e734312e398f76702679d2b3e67cb8fdda075b83fe3d4a7f01256ca
3
+ metadata.gz: 54f4b19057d72a27f6c4224e0483e9b7dafdb7b58fea5726e5deb6af1bf5fc07
4
+ data.tar.gz: 9d349ce2a2a6bb4a96189326f7cc1a3b002a9c6986e666e15d7cc37f110431b3
5
5
  SHA512:
6
- metadata.gz: a47696746895a52a485fe846072355ca3b6c4c432f47a252e8cfa774b5363c50312fea4b7332b90558f88f086b21d50f81d7f094663e2d7cad91a5e434853454
7
- data.tar.gz: 5144118267a1b11a833f2cd4ecc5e78dc80002069c796723bc48e8dda70e14e2de9dcf49c85dda999664b1e0e7578e1bd691d47414f6edbde6ba8d8e0dbf2148
6
+ metadata.gz: 37f6ad3d001c8e6d6ba8dc09f42151e15115262a1d74423cadffda4e3c2cb08364d4456f186fd4fb386e297c5b80838620d808af4cc361309ac8f1746a236f92
7
+ data.tar.gz: fd7d6da2ab045a8c445e79dbf813635f2521b1366ffbc6c6424f6b637a679f81d3539b8e3e6dd9335421082d15dded5b955739f82e4843a004b0aba43bc6a2d1
data/Cargo.lock CHANGED
@@ -191,41 +191,46 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
191
191
 
192
192
  [[package]]
193
193
  name = "htmlsnob"
194
- version = "0.1.0"
194
+ version = "0.1.2"
195
+ source = "registry+https://github.com/rust-lang/crates.io-index"
196
+ checksum = "8dbb56d78d67e81f3d6428f622c7293d663a42637e14650de7bf52b71fcf63ab"
195
197
  dependencies = [
196
198
  "regex",
197
199
  "serde",
198
200
  "toml",
199
201
  ]
200
202
 
201
- [[package]]
202
- name = "htmlsnob_runner"
203
- version = "0.1.0"
204
- dependencies = [
205
- "clap",
206
- "glob",
207
- "htmlsnob",
208
- "htmlsnob_rules",
209
- ]
210
-
211
203
  [[package]]
212
204
  name = "htmlsnob_ruby"
213
205
  version = "0.1.0"
214
206
  dependencies = [
215
207
  "htmlsnob_runner",
216
- "htmlsnob_rules",
217
208
  "magnus",
218
209
  ]
219
210
 
220
211
  [[package]]
221
212
  name = "htmlsnob_rules"
222
- version = "0.1.0"
213
+ version = "0.1.2"
214
+ source = "registry+https://github.com/rust-lang/crates.io-index"
215
+ checksum = "b3dccc4dde552bfca16a57c505604b7fcfa060ca9a27fbc70e277fa428840302"
223
216
  dependencies = [
224
217
  "htmlsnob",
225
218
  "regex",
226
219
  "serde",
227
220
  ]
228
221
 
222
+ [[package]]
223
+ name = "htmlsnob_runner"
224
+ version = "0.1.2"
225
+ source = "registry+https://github.com/rust-lang/crates.io-index"
226
+ checksum = "2b1151bf0522ff30580d1aad429e5c9473ba0b80595570ed695a9cdd8560f41e"
227
+ dependencies = [
228
+ "clap",
229
+ "glob",
230
+ "htmlsnob",
231
+ "htmlsnob_rules",
232
+ ]
233
+
229
234
  [[package]]
230
235
  name = "indexmap"
231
236
  version = "2.12.1"
@@ -10,6 +10,5 @@ publish = false
10
10
  crate-type = ["cdylib"]
11
11
 
12
12
  [dependencies]
13
- htmlsnob_runner = { path = "../../../htmlsnob_runner" }
14
- htmlsnob_rules = { path = "../../../htmlsnob_rules" }
13
+ htmlsnob_runner = { version = "0.1.3" }
15
14
  magnus = { version = "0.6.2" }
@@ -1,12 +1,13 @@
1
1
  use magnus::{function, prelude::*, Error, RHash, Ruby, Symbol};
2
2
 
3
- fn run_simple(file_paths: Vec<String>, config: Option<String>) -> (i32, String) {
3
+ fn run_simple(file_paths: Vec<String>, config_file: Option<String>) -> (i32, String) {
4
4
  htmlsnob_runner::run(htmlsnob_runner::SimpleArgs {
5
5
  paths: file_paths,
6
6
  autofix: false,
7
- config,
7
+ config_file,
8
+ config_string: "".to_string(),
8
9
  ignore: Vec::new(),
9
- registry: htmlsnob_rules::registry(),
10
+ registry: None,
10
11
  })
11
12
  }
12
13
 
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HtmlsnobRuby
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
data/lib/htmlsnob_ruby.rb CHANGED
@@ -10,18 +10,18 @@ module HtmlsnobRuby
10
10
  class Error < StandardError; end
11
11
 
12
12
  def self.run(paths, options = {})
13
- config = options[:config]
13
+ config_file = options[:config_file]
14
14
 
15
- if config && (config.end_with?(".yml") || config.end_with?(".yaml"))
15
+ if config_file && (config_file.end_with?(".yml") || config_file.end_with?(".yaml"))
16
16
  # YAML
17
17
  Tempfile.create(['converted_config', '.toml']) do |temp|
18
- temp.write(TomlRB.dump(YAML.load_file(config)))
18
+ temp.write(TomlRB.dump(YAML.load_file(config_file)))
19
19
  temp.rewind
20
20
  HtmlsnobRuby.run_simple(paths, temp.path)
21
21
  end
22
22
  else
23
23
  # TOML
24
- HtmlsnobRuby.run_simple(paths, config)
24
+ HtmlsnobRuby.run_simple(paths, config_file)
25
25
  end
26
26
  end
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: htmlsnob_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Dahl Møllerhøj
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-01-13 00:00:00.000000000 Z
11
+ date: 2026-01-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A Ruby binding for the HTMLSnob library, which provides HTML validation.
14
14
  email: