jslintrb_v8 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/jslintrb-v8.rb +13 -8
  2. metadata +4 -4
data/lib/jslintrb-v8.rb CHANGED
@@ -20,15 +20,23 @@ require 'v8'
20
20
  # Here is an example rake task:
21
21
  # require 'jslintrb-v8'
22
22
  # task :jslint do
23
- # jsl = JSLint.new(:undef => false, :strict => false, :nomen => false, :onevar => false, :newcap => false)
23
+ # jsl = JSLint.new(
24
+ # :undef => false,
25
+ # :strict => false,
26
+ # :nomen => false,
27
+ # :onevar => false,
28
+ # :newcap => false
29
+ # )
24
30
  # errors = []
25
- # Dir['javascript', '**', '*.js'].each do |f|
31
+ # path = File.join('javascripts', '**', '*.js')
32
+ # Dir[path].each do |f|
26
33
  # e = jsl.check(File.read(f))
27
34
  # errors << "\nIn [#{f}]:\n#{e}\n" if e
28
35
  # end
29
36
  # if errors.empty?
30
37
  # puts "JSLinty-fresh!"
31
38
  # else
39
+ # $stderr.write(errors.join("\n")+"\n");
32
40
  # raise "JSLint Errors Found"
33
41
  # end
34
42
  # end
@@ -154,12 +162,9 @@ class JSLint
154
162
  context['JSLintRBwidget'] = @widget
155
163
  context['JSLintRBreportErrors'] = lambda{|js_errors|
156
164
  js_errors.each do |e|
157
- if V8::Object === e
158
- e = V8::To.rb(e)
159
- errors << "Error at line #{e['line'].to_i + 1} " +
160
- "character #{e['character'].to_i + 1}: #{e['reason']}"
161
- errors << " #{e['evidence']}"
162
- end
165
+ errors << "Error at line #{e['line'].to_i + 1} " +
166
+ "character #{e['character'].to_i + 1}: #{e['reason']}"
167
+ errors << " #{e['evidence']}"
163
168
  end
164
169
  }
165
170
  context.eval %{
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jslintrb_v8
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nick Gauthier
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-23 00:00:00 -05:00
18
+ date: 2011-02-28 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency