coffeelint 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +9 -1
- data/Rakefile +5 -0
- data/coffeelint/src/coffeelint.coffee +1 -1
- data/coffeelint.gemspec +3 -0
- data/lib/coffeelint/version.rb +1 -1
- data/lib/coffeelint.rb +1 -1
- data/spec/coffeelint_spec.rb +10 -0
- data/spec/spec_helper.rb +7 -0
- metadata +35 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YjgyMzIyZWJlMmU1MjEwZjBhZWRlZDA5M2MyYmEwZWQ4MzU5ZTc0ZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDFiMmUzMzAwOGIzMzZjMDkyNjkzNTRkMzZkYTc1MzZjZDg4NzJkOA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDQxODdhZmMzYTYxNGQyMDUwMzNmYmNhMDc2Y2Y2YmY2NzY0NTA4MWI2Mjg2
|
10
|
+
ZjZhY2UxMTQxYmJlYjEyMGQyY2Q5NTBlYTE4NGM5MzA4NjMyMWM0OTFkNWVi
|
11
|
+
NTJlOGYwM2Y3MmJjYTBhMWZiY2FmMWVkYmRhNTRkMGZlYTNlMjE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YThmMTNhMjUzZThhNDZkODk2YzA3NzRlZTg0YmI2OGUzODkzY2JiYWQ2NjA0
|
14
|
+
ZGRkNjYzOWUyZmU1YThjYmEyNDE2OGY1ODMzZmY0NzJiODNhOTBmN2I4MDE2
|
15
|
+
Y2I2ZjY2ZTRmM2NlYjZlNzFhYTg1ZDI2YmVkNmMxMWMzYjA0ZDU=
|
data/README.md
CHANGED
@@ -31,14 +31,22 @@ lint_reports = Coffeelint.lint_dir(directory)
|
|
31
31
|
Coffeelint.lint_dir(directory) do |filename, lint_report|
|
32
32
|
puts filename
|
33
33
|
puts lint_report
|
34
|
+
Coffeelint.display_test_results(filename, lint_report)
|
34
35
|
end
|
36
|
+
Coffeelint.run_test(filename of coffeescript source) # Run tests and print pretty results (return true/false)
|
37
|
+
Coffeelint.run_test_suite(directory) # Runs a pretty report recursively for a directory (return true/false)
|
35
38
|
```
|
36
39
|
|
37
40
|
Additionally, if you are using rails you also get the rake task:
|
38
41
|
|
39
42
|
rake coffeelint
|
40
43
|
|
41
|
-
Which will run the test on any *.coffee file in your
|
44
|
+
Which will run the test on any *.coffee file in your `app` or `spec` directories
|
45
|
+
|
46
|
+
Finally, there is a command line utility that allows you to run standalone tests:
|
47
|
+
|
48
|
+
coffeelint <filename>
|
49
|
+
coffeelint -r <directory>
|
42
50
|
|
43
51
|
## Contributing
|
44
52
|
|
data/Rakefile
CHANGED
@@ -402,7 +402,7 @@ class LexicalLinter
|
|
402
402
|
lintToken : (token) ->
|
403
403
|
[type, value, lineNumber] = token
|
404
404
|
|
405
|
-
lineNumber = lineNumber
|
405
|
+
lineNumber = lineNumber.first_line if lineNumber?.first_line?
|
406
406
|
@tokensByLine[lineNumber] ?= []
|
407
407
|
@tokensByLine[lineNumber].push(token)
|
408
408
|
# CoffeeScript loses line numbers of interpolations and multi-line
|
data/coffeelint.gemspec
CHANGED
data/lib/coffeelint/version.rb
CHANGED
data/lib/coffeelint.rb
CHANGED
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coffeelint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zachary Bush
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coffee-script
|
@@ -24,6 +24,34 @@ dependencies:
|
|
24
24
|
- - ! '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
27
55
|
description: Ruby bindings for coffeelint
|
28
56
|
email:
|
29
57
|
- zach@zmbush.com
|
@@ -44,6 +72,8 @@ files:
|
|
44
72
|
- lib/coffeelint/railtie.rb
|
45
73
|
- lib/coffeelint/version.rb
|
46
74
|
- lib/tasks/coffeelint.rake
|
75
|
+
- spec/coffeelint_spec.rb
|
76
|
+
- spec/spec_helper.rb
|
47
77
|
- coffeelint/src/coffeelint.coffee
|
48
78
|
homepage: https://github.com/zipcodeman/coffeelint-ruby
|
49
79
|
licenses:
|
@@ -69,4 +99,6 @@ rubygems_version: 2.0.3
|
|
69
99
|
signing_key:
|
70
100
|
specification_version: 4
|
71
101
|
summary: Ruby bindings for coffeelint along with railtie to add rake task to rails
|
72
|
-
test_files:
|
102
|
+
test_files:
|
103
|
+
- spec/coffeelint_spec.rb
|
104
|
+
- spec/spec_helper.rb
|