erb_lint_daemon 0.1.1 → 0.1.2
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/Gemfile.lock +1 -1
- data/README.md +8 -7
- data/Rakefile +8 -6
- data/ext/extconf.rb +1 -1
- data/lib/erb_lint_daemon/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b398634bd2e2fb9ccd1066ef7d2dbaf8827208fe4df0e102be1edd58bab33c17
|
|
4
|
+
data.tar.gz: 1337f9ba38f6d957e37dbde93a9a40b9031f01f4ce88e94bc3c7ad07beb02917
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5f181e6ed6c63ae34bbb1a38c741f765927a2a645d6b64d0b401192d0bb10a353b53dfc84ee9de63d99e91faf4d3ed3730be801975829794bb1cb9607265e3be
|
|
7
|
+
data.tar.gz: 555965ad1c4c43ab663e39bd7b77ae4bf65332a08fc3db40083afc95297ea7c0b0c7a50257f1f423ac75a8712e8125577a58d5987ebd526c4d2877b2b5fb208f
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -32,22 +32,23 @@ Start the daemon (in a separate terminal or background):
|
|
|
32
32
|
ruby -r erb_lint_daemon/server -e 'ErbLintDaemon::Server.new.start'
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
### Instant Startup (~20ms)
|
|
36
|
+
|
|
37
|
+
By default, RubyGems creates a Ruby wrapper for the `erb_lint_daemon` command, which adds ~100ms of overhead. To get the full performance benefit, you should call the compiled Go binary directly.
|
|
38
|
+
|
|
39
|
+
You can create a symlink to the fast binary:
|
|
36
40
|
|
|
37
41
|
```bash
|
|
38
|
-
|
|
39
|
-
erb_lint_daemon app/views/users/index.html.erb
|
|
42
|
+
ln -s $(gem which erb_lint_daemon | sed 's|lib/erb_lint_daemon.rb|bin/erb_lint_client_bin|') /usr/local/bin/erb_lint_fast
|
|
40
43
|
```
|
|
41
44
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
The client accepts the same arguments as `erb_lint`.
|
|
45
|
+
Now you can use `erb_lint_fast` for instant results!
|
|
45
46
|
|
|
46
47
|
## Development
|
|
47
48
|
|
|
48
49
|
To modify the Go client:
|
|
49
50
|
1. Edit `ext/client.go`.
|
|
50
|
-
2. Run `rake
|
|
51
|
+
2. Run `rake compile` to recompile locally.
|
|
51
52
|
|
|
52
53
|
## Publishing
|
|
53
54
|
|
data/Rakefile
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
require 'rake'
|
|
2
2
|
require 'bundler/gem_tasks'
|
|
3
3
|
|
|
4
|
-
desc "
|
|
5
|
-
task :
|
|
6
|
-
puts "
|
|
4
|
+
desc "Compile the Go client"
|
|
5
|
+
task :compile do
|
|
6
|
+
puts "Compiling Go client..."
|
|
7
|
+
mkdir_p "bin"
|
|
7
8
|
system("go build -o bin/erb_lint_client_bin ext/client.go")
|
|
8
9
|
if $?.success?
|
|
9
|
-
puts "Successfully
|
|
10
|
+
puts "Successfully compiled bin/erb_lint_client_bin"
|
|
10
11
|
else
|
|
11
|
-
abort "Failed to
|
|
12
|
+
abort "Failed to compile Go client. Make sure Go is installed."
|
|
12
13
|
end
|
|
13
14
|
end
|
|
14
15
|
|
|
@@ -16,6 +17,7 @@ desc "Clean build artifacts"
|
|
|
16
17
|
task :clean do
|
|
17
18
|
rm_f "bin/erb_lint_client_bin"
|
|
18
19
|
rm_f "erb_lint_client"
|
|
20
|
+
rm_rf "pkg"
|
|
19
21
|
end
|
|
20
22
|
|
|
21
|
-
task :default => :
|
|
23
|
+
task :default => :compile
|
data/ext/extconf.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: erb_lint_daemon
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Owais Khan
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-12-
|
|
11
|
+
date: 2025-12-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: erb_lint
|
|
@@ -78,7 +78,7 @@ post_install_message: |
|
|
|
78
78
|
compiled binary directly to bypass the RubyGems wrapper overhead (~100ms).
|
|
79
79
|
|
|
80
80
|
The binary is located at:
|
|
81
|
-
<GEM_HOME>/gems/erb_lint_daemon-0.1.
|
|
81
|
+
<GEM_HOME>/gems/erb_lint_daemon-0.1.2/bin/erb_lint_client_bin
|
|
82
82
|
|
|
83
83
|
You can symlink it to your path, e.g.:
|
|
84
84
|
ln -s $(gem which erb_lint_daemon | sed 's|lib/erb_lint_daemon.rb|bin/erb_lint_client_bin|') /usr/local/bin/erb_lint_client
|