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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89aa269f4a448ff3b9d3e20b8df238d3a34843d86ebb7a089f223baf9f4d6058
4
- data.tar.gz: 40a3ae9ea58ab49a155549fa33bfc6c6548c685ec222a2b3ccd20c4b51911cf6
3
+ metadata.gz: b398634bd2e2fb9ccd1066ef7d2dbaf8827208fe4df0e102be1edd58bab33c17
4
+ data.tar.gz: 1337f9ba38f6d957e37dbde93a9a40b9031f01f4ce88e94bc3c7ad07beb02917
5
5
  SHA512:
6
- metadata.gz: 7a9e21cbdafcfde0409e69ab95cc64ea7e29395dd4f894d65b6eb014425b307f9b29c5a7ec46e78422664dd68b04acb0244e22ed6b8c366cd4f3b72582c199b3
7
- data.tar.gz: 963b695ce1be9cd69039840a6d0bfa3ac01db641198a71bac7c7774e1971d1d53c88b3b43d1857da1ff5c108193fef5168e330b434e1ad5a6d656e98e2eb5283
6
+ metadata.gz: 5f181e6ed6c63ae34bbb1a38c741f765927a2a645d6b64d0b401192d0bb10a353b53dfc84ee9de63d99e91faf4d3ed3730be801975829794bb1cb9607265e3be
7
+ data.tar.gz: 555965ad1c4c43ab663e39bd7b77ae4bf65332a08fc3db40083afc95297ea7c0b0c7a50257f1f423ac75a8712e8125577a58d5987ebd526c4d2877b2b5fb208f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- erb_lint_daemon (0.1.1)
4
+ erb_lint_daemon (0.1.2)
5
5
  erb_lint
6
6
 
7
7
  GEM
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
- Run the linter using the client:
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
- # Lints the specified file
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
- ### Options
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 build` to recompile locally.
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 "Build the Go client"
5
- task :build do
6
- puts "Building Go client..."
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 built bin/erb_lint_client_bin"
10
+ puts "Successfully compiled bin/erb_lint_client_bin"
10
11
  else
11
- abort "Failed to build Go client. Make sure Go is installed."
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 => :build
23
+ task :default => :compile
data/ext/extconf.rb CHANGED
@@ -11,7 +11,7 @@ File.open('Makefile', 'a') do |f|
11
11
  f.write <<~MAKE
12
12
 
13
13
  all:
14
- \tgo build -o ../../bin/erb_lint_client_bin client.go
14
+ \tgo build -o ../bin/erb_lint_client_bin client.go
15
15
 
16
16
  install: all
17
17
  MAKE
@@ -1,3 +1,3 @@
1
1
  module ErbLintDaemon
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.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-21 00:00:00.000000000 Z
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.1/bin/erb_lint_client_bin
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