fdlint 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
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.2"
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
@@ -10,8 +10,5 @@ end
10
10
 
11
11
  require_relative '../lib/cmd_runner'
12
12
 
13
- if __FILE__ == $0
14
- trap("SIGINT") { puts "\nGoodbye!"; exit! }
15
- XRay::CMDRunner.run
16
- end
17
-
13
+ trap("SIGINT") { puts "\nGoodbye!"; exit! }
14
+ XRay::CMDRunner.run
@@ -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
- def test_with_console_format
15
- res = `#{@@cmd} #{FIXTURE_ABS_PATH}/css/empty.css`
16
- assert res.include? "[OK] /home/qhwa/projects/fdlint/test/fixtures/css/empty.c"
17
- end
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? "[OK] /home/qhwa/projects/fdlint/test/fixtures/css/empty.c"
18
+ end
18
19
 
19
- def test_with_nocolor_format
20
- res = `#{@@cmd} --format=nocolor #{FIXTURE_ABS_PATH}/css/empty.css`
21
- assert res.include? "[OK] /home/qhwa/projects/fdlint/test/fixtures/css/empty.c"
22
- end
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
- def test_with_vim_format
25
- res = `#{@@cmd} --format=vim #{FIXTURE_ABS_PATH}/css/empty.css`
26
- assert res.empty?
27
- end
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
- def test_reulsts_with_vim_format
30
- res = `#{@@cmd} --format=vim #{FIXTURE_ABS_PATH}/css/using_expr.css`
31
- assert res.include? 'using_expr.css:[error]:5,7:禁止使用CSS表达式'
32
- assert res.include? 'using_expr.css:[error]:6,6:禁止使用CSS表达式'
33
- end
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
- unless `which cat`.empty?
36
- def test_results_with_vim_format_in_pipline
37
- res = `cat #{FIXTURE_ABS_PATH}/css/using_expr.css | #{@@cmd} --format=vim `
38
- assert res.include? '-:[error]:5,7:禁止使用CSS表达式'
39
- assert res.include? '-:[error]:6,6:禁止使用CSS表达式'
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.2
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-27 00:00:00.000000000 Z
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: -4277170667187802320
287
+ hash: -1081230500175911799
288
288
  required_rubygems_version: !ruby/object:Gem::Requirement
289
289
  none: false
290
290
  requirements: