roger_jshint 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/Rakefile +1 -0
- data/lib/roger_jshint.rb +1 -0
- data/lib/roger_jshint/generator.rb +3 -7
- data/lib/roger_jshint/lint.rb +3 -2
- data/roger_jshint.gemspec +1 -1
- data/test/lint_test.rb +4 -5
- metadata +22 -23
- data/.ruby-version +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83ba026e1e511b00e3e131301ac4eabcdbee9d5d
|
4
|
+
data.tar.gz: e49a5331b6365a9c70dd3805668f22eb42f775c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0754599dc1193291fd00171f758df12a610f7e859cf1d01cdca35ee6239c8bf10cb1b97c669a7be730685bb716606e48ca4e8edd149194b0071e61789083e3e8
|
7
|
+
data.tar.gz: a775a2f2c265c205f3c2701914e2c3e80f28202bdce580c3941e0efeabfce7686068e23a680ba9b70e61471f1226cbb5571772581df0ad35762c81798e14eace
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## Version 1.1.1
|
4
|
+
* Make sure the `.jshintrc` generator gets loaded
|
5
|
+
* A few internal changes on the testing side of things
|
6
|
+
|
3
7
|
## Version 1.1.0
|
4
8
|
* Add a `.jshintrc` generator
|
5
9
|
* Correctly return success value so reger test will output the correct error code
|
6
10
|
|
7
11
|
## Version 1.0.0
|
8
|
-
* What was before...
|
12
|
+
* What was before...
|
data/Rakefile
CHANGED
data/lib/roger_jshint.rb
CHANGED
@@ -8,9 +8,9 @@ module RogerJsHint
|
|
8
8
|
# Lint configuration retriever
|
9
9
|
class Generator < Roger::Generators::Base
|
10
10
|
include Thor::Actions
|
11
|
-
CONFIG_PATH = ".jshintrc"
|
11
|
+
CONFIG_PATH = ".jshintrc".freeze
|
12
12
|
DEFAULT_CONFIG_URL = "https://raw.githubusercontent.com/"\
|
13
|
-
"DigitPaint/javascript/master/linters/jshintrc"
|
13
|
+
"DigitPaint/javascript/master/linters/jshintrc".freeze
|
14
14
|
|
15
15
|
desc "JsHint generator creates an .jshintrc config file"
|
16
16
|
class_option(
|
@@ -30,11 +30,7 @@ module RogerJsHint
|
|
30
30
|
|
31
31
|
# Write config file
|
32
32
|
def write_config_file
|
33
|
-
|
34
|
-
config = open(options[:config]).read
|
35
|
-
else
|
36
|
-
config = open(DEFAULT_CONFIG_URL).read
|
37
|
-
end
|
33
|
+
config = options[:config] ? open(options[:config]).read : open(DEFAULT_CONFIG_URL).read
|
38
34
|
|
39
35
|
# Create file check if we don't have a conflict or something
|
40
36
|
create_file "#{@project.path}/#{CONFIG_PATH}", config, force: options[:force]
|
data/lib/roger_jshint/lint.rb
CHANGED
@@ -15,7 +15,6 @@ module RogerJsHint
|
|
15
15
|
skip: [],
|
16
16
|
jshint: "jshint"
|
17
17
|
}
|
18
|
-
detect_jshint
|
19
18
|
|
20
19
|
@options.update(options) if options
|
21
20
|
end
|
@@ -46,6 +45,8 @@ module RogerJsHint
|
|
46
45
|
# @option options [Array] :match Files to match
|
47
46
|
# @option options [Array[Regexp]] :skip Array of regular expressions to skip files
|
48
47
|
def call(test, options)
|
48
|
+
detect_jshint
|
49
|
+
|
49
50
|
options = {}.update(@options).update(options)
|
50
51
|
|
51
52
|
test.log(self, "JS-linting files")
|
@@ -61,7 +62,7 @@ module RogerJsHint
|
|
61
62
|
def detect_jshint
|
62
63
|
command = [@options[:jshint], "-v", "2>/dev/null"]
|
63
64
|
detect = system(Shellwords.join(command))
|
64
|
-
|
65
|
+
raise "Could not find jshint. Install jshint using npm." unless detect
|
65
66
|
end
|
66
67
|
|
67
68
|
def reporter
|
data/roger_jshint.gemspec
CHANGED
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
|
|
4
4
|
s.authors = ["Hans Krutzer", "Flurin Egger"]
|
5
5
|
s.email = ["info@digitpaint.nl", "hans@digitpaint.nl", "flurin@digitpaint.nl"]
|
6
6
|
s.name = "roger_jshint"
|
7
|
-
s.version = "1.1.
|
7
|
+
s.version = "1.1.1"
|
8
8
|
s.homepage = "https://github.com/digitpaint/roger_jshint"
|
9
9
|
|
10
10
|
s.summary = "Lint JavaScript files within Roger"
|
data/test/lint_test.rb
CHANGED
@@ -37,11 +37,10 @@ class LintTest < Test::Unit::TestCase
|
|
37
37
|
|
38
38
|
assert_equal(false, success)
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
"test/data/test.js:2 7: 'x' is not defined."])
|
40
|
+
assert_includes(messages, "test/data/test.js:0 0: Bad option: 'subsub'.")
|
41
|
+
assert_includes(messages, "test/data/test.js:1 1: 'x' is not defined.")
|
42
|
+
assert_includes(messages, "test/data/test.js:2 1: 'alert' is not defined.")
|
43
|
+
assert_includes(messages, "test/data/test.js:2 7: 'x' is not defined.")
|
45
44
|
end
|
46
45
|
|
47
46
|
def teardown
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roger_jshint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hans Krutzer
|
@@ -9,96 +9,96 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-04-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: roger
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - ~>
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '1.1'
|
21
|
-
- -
|
21
|
+
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: 0.13.0
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
|
-
- - ~>
|
28
|
+
- - "~>"
|
29
29
|
- !ruby/object:Gem::Version
|
30
30
|
version: '1.1'
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.13.0
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: rubocop
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
type: :development
|
42
42
|
prerelease: false
|
43
43
|
version_requirements: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: rake
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
57
|
version_requirements: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: test-unit
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
type: :development
|
70
70
|
prerelease: false
|
71
71
|
version_requirements: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
- !ruby/object:Gem::Dependency
|
77
77
|
name: thor
|
78
78
|
requirement: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - ~>
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
type: :development
|
84
84
|
prerelease: false
|
85
85
|
version_requirements: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - ~>
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
- !ruby/object:Gem::Dependency
|
91
91
|
name: mocha
|
92
92
|
requirement: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - ~>
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 1.1.0
|
97
97
|
type: :development
|
98
98
|
prerelease: false
|
99
99
|
version_requirements: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - ~>
|
101
|
+
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: 1.1.0
|
104
104
|
description: |2
|
@@ -112,10 +112,9 @@ executables: []
|
|
112
112
|
extensions: []
|
113
113
|
extra_rdoc_files: []
|
114
114
|
files:
|
115
|
-
- .gitignore
|
116
|
-
- .rubocop.yml
|
117
|
-
- .
|
118
|
-
- .travis.yml
|
115
|
+
- ".gitignore"
|
116
|
+
- ".rubocop.yml"
|
117
|
+
- ".travis.yml"
|
119
118
|
- CHANGELOG.md
|
120
119
|
- Gemfile
|
121
120
|
- LICENSE
|
@@ -140,17 +139,17 @@ require_paths:
|
|
140
139
|
- lib
|
141
140
|
required_ruby_version: !ruby/object:Gem::Requirement
|
142
141
|
requirements:
|
143
|
-
- -
|
142
|
+
- - ">="
|
144
143
|
- !ruby/object:Gem::Version
|
145
144
|
version: '0'
|
146
145
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
146
|
requirements:
|
148
|
-
- -
|
147
|
+
- - ">="
|
149
148
|
- !ruby/object:Gem::Version
|
150
149
|
version: '0'
|
151
150
|
requirements: []
|
152
151
|
rubyforge_project:
|
153
|
-
rubygems_version: 2.
|
152
|
+
rubygems_version: 2.4.5
|
154
153
|
signing_key:
|
155
154
|
specification_version: 4
|
156
155
|
summary: Lint JavaScript files within Roger
|
data/.ruby-version
DELETED
File without changes
|