polint 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d287c6785e99e624589ae4ac2b01308c7469c9d1
4
+ data.tar.gz: 152df4d5a346490c23aac535ca0b6c0e18817608
5
+ SHA512:
6
+ metadata.gz: 13caed3a5b182a0c401d40a3ac09d423e232a7226db0dac6c45b54c29a485f06e8b7b9d4d8fb74dc09e220986fe831841b720ede161ef42cda687a2efa4862a5
7
+ data.tar.gz: 31f8801ab58bfd387fbba735b0985fb27d4640752ac79f9a5f87c2e7dd0787b99350b265e07874a1899b0aa82cf526461a4d273d2364d80c7450204b3ef112ad
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- polint (0.0.1)
4
+ polint (0.0.3)
5
5
  term-ansicolor
6
6
 
7
7
  GEM
@@ -17,7 +17,7 @@ GEM
17
17
  slop (3.6.0)
18
18
  term-ansicolor (1.3.0)
19
19
  tins (~> 1.0)
20
- tins (1.3.3)
20
+ tins (1.3.5)
21
21
 
22
22
  PLATFORMS
23
23
  ruby
data/bin/polint CHANGED
@@ -6,6 +6,6 @@ require 'rubygems'
6
6
  require 'term/ansicolor'
7
7
  require 'polint'
8
8
 
9
- ARGV.each do |arg|
10
- Polint::Checker.new(arg).run
11
- end
9
+ errors = ARGV.map { |arg| Polint::Checker.new(arg).run }.reduce(&:+)
10
+ exit (errors > 0) ? 1 : 0
11
+
@@ -1,3 +1,3 @@
1
1
  module Polint
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/polint.rb CHANGED
@@ -12,7 +12,11 @@ module Polint
12
12
  end
13
13
 
14
14
  class Checker
15
- AttributeRe = /%\{[^\}]+\}/
15
+ AttributeRe = /
16
+ %\{ [^\}]+ \} | # Ruby Gettext
17
+ %\( [^\)]+ \)[sd] | # Javascript sprintf
18
+ \{\{ [^\}] \}\} # Liquid
19
+ /x
16
20
  TA = Term::ANSIColor
17
21
 
18
22
  def initialize(pofile)
metadata CHANGED
@@ -1,78 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
5
- prerelease:
4
+ version: 0.0.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Julien Letessier
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2015-03-09 00:00:00.000000000 Z
11
+ date: 2015-05-06 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
19
  version: '1.7'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
26
  version: '1.7'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
33
  version: '10.0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
40
  version: '10.0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: pry
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: term-ansicolor
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - ">="
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - ">="
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  description:
@@ -83,7 +74,7 @@ executables:
83
74
  extensions: []
84
75
  extra_rdoc_files: []
85
76
  files:
86
- - .gitignore
77
+ - ".gitignore"
87
78
  - Gemfile
88
79
  - Gemfile.lock
89
80
  - LICENSE.txt
@@ -96,26 +87,26 @@ files:
96
87
  homepage: ''
97
88
  licenses:
98
89
  - MIT
90
+ metadata: {}
99
91
  post_install_message:
100
92
  rdoc_options: []
101
93
  require_paths:
102
94
  - lib
103
95
  required_ruby_version: !ruby/object:Gem::Requirement
104
- none: false
105
96
  requirements:
106
- - - ! '>='
97
+ - - ">="
107
98
  - !ruby/object:Gem::Version
108
99
  version: '0'
109
100
  required_rubygems_version: !ruby/object:Gem::Requirement
110
- none: false
111
101
  requirements:
112
- - - ! '>='
102
+ - - ">="
113
103
  - !ruby/object:Gem::Version
114
104
  version: '0'
115
105
  requirements: []
116
106
  rubyforge_project:
117
- rubygems_version: 1.8.23.2
107
+ rubygems_version: 2.4.5
118
108
  signing_key:
119
- specification_version: 3
109
+ specification_version: 4
120
110
  summary: A linter for Uniforum PO files.
121
111
  test_files: []
112
+ has_rdoc: