erb_lint_daemon 0.1.4 → 0.1.5
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 +7 -7
- data/bin/erb_lint_daemon +21 -1
- data/erb_lint_daemon.gemspec +2 -5
- data/lib/erb_lint_daemon/version.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8fb7f0e992a2e5c72c8dea3ea44af38886f1bafce347a6bfeaf7da07b9f55c60
|
|
4
|
+
data.tar.gz: 2f64baf0dccb1e991763da5f99d7dc8a120c8452f0e007ba10dbab7fd40f9c4b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f3849ad7e1129f50145c1d79c363fab93f34735f69ea2c14df0f2706c5f4f95d41b3e45dec9b313b85062bffa73ee4e2046a60178edb523dd8835f5e916a599d
|
|
7
|
+
data.tar.gz: 5a9b13aa17e412b32a4c99a7857f41a4084b559581a57c39bb537859be958aa77dfb40eddd1ee4e13979888c191d7f064e7059442a344e109aa734fb7aa406a1
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -36,13 +36,13 @@ ruby -r erb_lint_daemon/server -e 'ErbLintDaemon::Server.new.start'
|
|
|
36
36
|
|
|
37
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
38
|
|
|
39
|
-
You can create a symlink to the fast binary:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
Now you can use `erb_lint_fast` for instant results!
|
|
39
|
+
You can automatically create a symlink to the fast binary:
|
|
40
|
+
+
|
|
41
|
+
+```bash
|
|
42
|
+
+erb_lint_daemon --setup
|
|
43
|
+
+```
|
|
44
|
+
+
|
|
45
|
+
+Now you can use `erb_lint_fast` for instant results!
|
|
46
46
|
|
|
47
47
|
## Development
|
|
48
48
|
|
data/bin/erb_lint_daemon
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
# Wrapper to execute the compiled Go client
|
|
3
|
-
# We expect the binary to be in the same directory as this script
|
|
4
3
|
binary = File.join(File.dirname(__FILE__), 'erb_lint_client_bin')
|
|
4
|
+
|
|
5
|
+
if ARGV.include?('--setup')
|
|
6
|
+
target = '/usr/local/bin/erb_lint_fast'
|
|
7
|
+
puts "Attempting to symlink #{binary} to #{target}..."
|
|
8
|
+
|
|
9
|
+
if File.exist?(target)
|
|
10
|
+
print "#{target} already exists. Overwrite? [y/N] "
|
|
11
|
+
exit(0) unless gets.chomp.downcase == 'y'
|
|
12
|
+
system("sudo rm #{target}")
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
if system("sudo ln -s #{binary} #{target}")
|
|
16
|
+
puts "Successfully created symlink!"
|
|
17
|
+
puts "You can now use 'erb_lint_fast' for instant linting."
|
|
18
|
+
else
|
|
19
|
+
puts "Failed to create symlink. You might need to do it manually:"
|
|
20
|
+
puts " sudo ln -s #{binary} #{target}"
|
|
21
|
+
end
|
|
22
|
+
exit(0)
|
|
23
|
+
end
|
|
24
|
+
|
|
5
25
|
exec(binary, *ARGV)
|
data/erb_lint_daemon.gemspec
CHANGED
|
@@ -35,11 +35,8 @@ Gem::Specification.new do |spec|
|
|
|
35
35
|
NOTE: To achieve the maximum performance (~20ms startup), you should run the
|
|
36
36
|
compiled binary directly to bypass the RubyGems wrapper overhead (~100ms).
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
You can symlink it to your path, e.g.:
|
|
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_client
|
|
38
|
+
You can automatically create a symlink by running:
|
|
39
|
+
erb_lint_daemon --setup
|
|
43
40
|
--------------------------------------------------------------------------------
|
|
44
41
|
MESSAGE
|
|
45
42
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Owais Khan
|
|
@@ -77,11 +77,8 @@ post_install_message: |
|
|
|
77
77
|
NOTE: To achieve the maximum performance (~20ms startup), you should run the
|
|
78
78
|
compiled binary directly to bypass the RubyGems wrapper overhead (~100ms).
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
You can symlink it to your path, e.g.:
|
|
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
|
|
80
|
+
You can automatically create a symlink by running:
|
|
81
|
+
erb_lint_daemon --setup
|
|
85
82
|
--------------------------------------------------------------------------------
|
|
86
83
|
rdoc_options: []
|
|
87
84
|
require_paths:
|