htmlsnob_ruby 0.1.0 → 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 +4 -4
- data/Cargo.lock +19 -14
- data/README.md +3 -3
- data/ext/htmlsnob_ruby/Cargo.toml +1 -2
- data/ext/htmlsnob_ruby/src/lib.rs +5 -4
- data/htmlsnob_ruby-0.1.0.gem +0 -0
- data/lib/htmlsnob/htmlsnob_ruby.bundle +0 -0
- data/lib/htmlsnob_ruby/htmlsnob_ruby.bundle +0 -0
- data/lib/htmlsnob_ruby/version.rb +1 -1
- data/lib/htmlsnob_ruby.rb +4 -4
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 54f4b19057d72a27f6c4224e0483e9b7dafdb7b58fea5726e5deb6af1bf5fc07
|
|
4
|
+
data.tar.gz: 9d349ce2a2a6bb4a96189326f7cc1a3b002a9c6986e666e15d7cc37f110431b3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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_cli"
|
|
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
|
-
"
|
|
216
|
-
"htmlsnob_rules",
|
|
207
|
+
"htmlsnob_runner",
|
|
217
208
|
"magnus",
|
|
218
209
|
]
|
|
219
210
|
|
|
220
211
|
[[package]]
|
|
221
212
|
name = "htmlsnob_rules"
|
|
222
|
-
version = "0.1.
|
|
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"
|
data/README.md
CHANGED
|
@@ -10,15 +10,15 @@ Validates and formats HTML and ERB files according to your coding standards.
|
|
|
10
10
|
|
|
11
11
|
Install the gem and add to the application's Gemfile by executing:
|
|
12
12
|
```
|
|
13
|
-
bundle add
|
|
13
|
+
bundle add htmlsnob_ruby
|
|
14
14
|
```
|
|
15
15
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
|
16
16
|
```
|
|
17
|
-
gem install
|
|
17
|
+
gem install htmlsnob_ruby
|
|
18
18
|
```
|
|
19
19
|
Or manually add it to your application's Gemfile:
|
|
20
20
|
```ruby
|
|
21
|
-
gem '
|
|
21
|
+
gem 'htmlsnob_ruby'
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Usage
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
use magnus::{function, prelude::*, Error, RHash, Ruby, Symbol};
|
|
2
2
|
|
|
3
|
-
fn run_simple(file_paths: Vec<String>,
|
|
4
|
-
|
|
3
|
+
fn run_simple(file_paths: Vec<String>, config_file: Option<String>) -> (i32, String) {
|
|
4
|
+
htmlsnob_runner::run(htmlsnob_runner::SimpleArgs {
|
|
5
5
|
paths: file_paths,
|
|
6
6
|
autofix: false,
|
|
7
|
-
|
|
7
|
+
config_file,
|
|
8
|
+
config_string: "".to_string(),
|
|
8
9
|
ignore: Vec::new(),
|
|
9
|
-
registry:
|
|
10
|
+
registry: None,
|
|
10
11
|
})
|
|
11
12
|
}
|
|
12
13
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
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
|
-
|
|
13
|
+
config_file = options[:config_file]
|
|
14
14
|
|
|
15
|
-
if
|
|
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(
|
|
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,
|
|
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.
|
|
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-
|
|
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:
|
|
@@ -28,7 +28,10 @@ files:
|
|
|
28
28
|
- ext/htmlsnob_ruby/Cargo.toml
|
|
29
29
|
- ext/htmlsnob_ruby/extconf.rb
|
|
30
30
|
- ext/htmlsnob_ruby/src/lib.rs
|
|
31
|
+
- htmlsnob_ruby-0.1.0.gem
|
|
32
|
+
- lib/htmlsnob/htmlsnob_ruby.bundle
|
|
31
33
|
- lib/htmlsnob_ruby.rb
|
|
34
|
+
- lib/htmlsnob_ruby/htmlsnob_ruby.bundle
|
|
32
35
|
- lib/htmlsnob_ruby/version.rb
|
|
33
36
|
- sig/htmlsnob_ruby.rbs
|
|
34
37
|
homepage: https://github.com/mollerhoj/htmlsnob
|