fdlint 0.1.2 → 0.1.3
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.
- data/Rakefile +1 -1
- data/bin/fdlint +2 -5
- data/test/cli/output_format_test.rb +24 -22
- metadata +3 -3
data/Rakefile
CHANGED
@@ -29,7 +29,7 @@ spec = Gem::Specification.new do |s|
|
|
29
29
|
|
30
30
|
# Change these as appropriate
|
31
31
|
s.name = "fdlint"
|
32
|
-
s.version = "0.1.
|
32
|
+
s.version = "0.1.3"
|
33
33
|
s.summary = "Code reviewer for web developing. Check your HTML/JS/CSS codes against bad codes."
|
34
34
|
s.author = "qhwa,bencode"
|
35
35
|
s.email = "qhwa@163.com,bencode@163.com"
|
data/bin/fdlint
CHANGED
@@ -11,32 +11,34 @@ module XRayTest
|
|
11
11
|
@@bin = File.expand_path(File.join File.dirname(__FILE__), '../../bin/fdlint')
|
12
12
|
@@cmd = "ruby #{@@bin}"
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
if has_ruby?('1.9')
|
15
|
+
def test_with_console_format
|
16
|
+
res = `#{@@cmd} #{FIXTURE_ABS_PATH}/css/empty.css`
|
17
|
+
assert res.include? "[32m[OK][0m /home/qhwa/projects/fdlint/test/fixtures/css/empty.c"
|
18
|
+
end
|
18
19
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
def test_with_nocolor_format
|
21
|
+
res = `#{@@cmd} --format=nocolor #{FIXTURE_ABS_PATH}/css/empty.css`
|
22
|
+
assert res.include? "[OK] /home/qhwa/projects/fdlint/test/fixtures/css/empty.c"
|
23
|
+
end
|
23
24
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
def test_with_vim_format
|
26
|
+
res = `#{@@cmd} --format=vim #{FIXTURE_ABS_PATH}/css/empty.css`
|
27
|
+
assert res.empty?
|
28
|
+
end
|
28
29
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
30
|
+
def test_reulsts_with_vim_format
|
31
|
+
res = `#{@@cmd} --format=vim #{FIXTURE_ABS_PATH}/css/using_expr.css`
|
32
|
+
assert res.include? 'using_expr.css:[error]:5,7:禁止使用CSS表达式'
|
33
|
+
assert res.include? 'using_expr.css:[error]:6,6:禁止使用CSS表达式'
|
34
|
+
end
|
34
35
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
36
|
+
unless `which cat`.empty?
|
37
|
+
def test_results_with_vim_format_in_pipline
|
38
|
+
res = `cat #{FIXTURE_ABS_PATH}/css/using_expr.css | #{@@cmd} --format=vim `
|
39
|
+
assert res.include? '-:[error]:5,7:禁止使用CSS表达式'
|
40
|
+
assert res.include? '-:[error]:6,6:禁止使用CSS表达式'
|
41
|
+
end
|
40
42
|
end
|
41
43
|
end
|
42
44
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fdlint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-04-
|
12
|
+
date: 2013-04-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -284,7 +284,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
284
284
|
version: '0'
|
285
285
|
segments:
|
286
286
|
- 0
|
287
|
-
hash: -
|
287
|
+
hash: -1081230500175911799
|
288
288
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
289
289
|
none: false
|
290
290
|
requirements:
|