jshint4r 0.1.2.1 → 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.
@@ -1,29 +1,10 @@
1
- ![https://travis-ci.org/wtnabe/jshint4r](https://travis-ci.org/wtnabe/jshint4r.png)
1
+ {<img src="https://travis-ci.org/wtnabe/jshint4r.png" />}[https://travis-ci.org/wtnabe/jshint4r]
2
2
 
3
- # Jshint4r
3
+ = jshint4r
4
4
 
5
- jshint runner for ruby ( with execjs )
5
+ Description goes here.
6
6
 
7
- ## Install
8
-
9
- gem install jshint4r
10
-
11
- ## How to use
12
-
13
- just type
14
-
15
- jshint4r
16
-
17
- ## Requirements
18
-
19
- * CRuby 1.8 or 1.9 ( maybe works for other implements )
20
- * JavaScript Runtime ( supported by execjs gem )
21
-
22
- ## Bonus feature :-)
23
-
24
- * 'unsafechar' for shutting up 'Unsafe character' mode
25
-
26
- ## Contributing to jshint4r
7
+ == Contributing to jshint4r
27
8
 
28
9
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
29
10
  * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
@@ -33,7 +14,7 @@ just type
33
14
  * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
34
15
  * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
35
16
 
36
- ## Copyright
17
+ == Copyright
37
18
 
38
19
  Copyright (c) 2011 wtnabe. See LICENSE.txt for
39
20
  further details.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2.1
1
+ 0.1.3
data/jshint4r.gemspec CHANGED
@@ -5,17 +5,17 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "jshint4r"
8
- s.version = "0.1.2.1"
8
+ s.version = "0.1.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["wtnabe"]
12
- s.date = "2013-07-29"
12
+ s.date = "2013-01-24"
13
13
  s.description = "jshint runner for ruby"
14
14
  s.email = "wtnabe@gmail.com"
15
15
  s.executables = ["jshint4r"]
16
16
  s.extra_rdoc_files = [
17
17
  "LICENSE.txt",
18
- "README.md"
18
+ "README.rdoc"
19
19
  ]
20
20
  s.files = [
21
21
  ".document",
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24
24
  ".travis.yml",
25
25
  "Gemfile",
26
26
  "LICENSE.txt",
27
- "README.md",
27
+ "README.rdoc",
28
28
  "Rakefile",
29
29
  "VERSION",
30
30
  "bin/jshint4r",
@@ -56,13 +56,14 @@ Gem::Specification.new do |s|
56
56
  "spec/spec_helper.rb",
57
57
  "spec/support/sample_error.rb",
58
58
  "vendor/jshint/CHANGELOG",
59
- "vendor/jshint/README.markdown",
59
+ "vendor/jshint/Makefile",
60
+ "vendor/jshint/README.md",
60
61
  "vendor/jshint/jshint.js"
61
62
  ]
62
63
  s.homepage = "http://github.com/wtnabe/jshint4r"
63
64
  s.licenses = ["MIT"]
64
65
  s.require_paths = ["lib"]
65
- s.rubygems_version = "1.8.24"
66
+ s.rubygems_version = "1.8.23"
66
67
  s.summary = "jshint4r"
67
68
 
68
69
  if s.respond_to? :specification_version then
@@ -15,7 +15,7 @@ module JSHint4r
15
15
  # [return] Array or nil
16
16
  #
17
17
  def lint( target )
18
- errors = context.call('JSHINT.run', File.read(target).toutf8, opts )
18
+ errors = context.call('JSHINT.run', File.read(target), opts )
19
19
  if errors
20
20
  errors = errors.compact
21
21
  errors = allow_unsafe_character(errors) if opts['unsafechar']
data/lib/jshint4r.rb CHANGED
@@ -1,6 +1,4 @@
1
1
  require 'execjs'
2
- require 'yaml'
3
- require 'kconv'
4
2
 
5
3
  module JSHint4r
6
4
  end
@@ -0,0 +1,23 @@
1
+ build_dir:
2
+ @mkdir -p "build"
3
+
4
+ rhino: build_dir
5
+ @echo "Building JSHint for Rhino"
6
+ @echo "#!/usr/bin/env rhino" > "build/jshint-rhino.js"
7
+ @cat "jshint.js" "env/rhino.js" >> "build/jshint-rhino.js"
8
+ -@chmod +x "build/jshint-rhino.js"
9
+ @echo "Done"
10
+
11
+ test:
12
+ @echo "Running unit tests"
13
+ @expresso tests/unit/*.js
14
+ @echo "Running regression tests"
15
+ @expresso tests/regression/*.js
16
+
17
+ cover:
18
+ @echo "Start coverage"
19
+ @tests/helpers/coveraje.js
20
+
21
+ clean:
22
+ @echo "Cleaning"
23
+ @rm -f build/*.js && echo "Done"
@@ -0,0 +1,104 @@
1
+ JSHint, A Static Code Analysis Tool for JavaScript
2
+ ==================================================
3
+
4
+ JSHint is a community-driven tool to detect errors and potential problems in
5
+ JavaScript code and to enforce your team's coding conventions.
6
+
7
+ **IMPORTANT**:
8
+
9
+ * This README is for people who are thinking about contributing to JSHint. For general usage
10
+ please refer to [our website](http://jshint.com/).
11
+ * If you want to report a bug about the website, please go to the
12
+ [jshint/site](https://github.com/jshint/site/) repository.
13
+ * If you want to report a bug or contribute to our NPM package, please go to the
14
+ [jshint/node-jshint](https://github.com/jshint/node-jshint/) repository.
15
+
16
+ Reporting a bug
17
+ ---------------
18
+
19
+ To report a bug simply create a [new GitHub Issue](https://github.com/jshint/jshint/issues/new) and
20
+ describe your problem or suggestion. We welcome all kind of feedback regarding JSHint including but
21
+ not limited to:
22
+
23
+ * When JSHint doesn't work as expected
24
+ * When JSHint complains about valid JavaScript code that works in all browsers
25
+ * When you simply want a new option or feature
26
+
27
+ Please, before reporting a bug look around to see if there are any open or closed tickets that
28
+ cover your issue. And remember the wisdom: pull request > bug report > tweet.
29
+
30
+ Submitting patches
31
+ ------------------
32
+
33
+ The best way to make sure your issue is addressed is to submit a patch. GitHub provides a very
34
+ nice interface--pull requests--for that but we accept patches through all mediums: email, issue
35
+ comment, tweet with a link to a snippet, etc.
36
+
37
+ Before submitting a patch make sure that you comply to our style. We don't have specific style
38
+ guide so just look around the code you are changing.
39
+
40
+ Also, make sure that you write tests for new features and make sure that all tests pass before
41
+ submitting a patch. Patches that break the build will be rejected.
42
+
43
+ **FEATURE FREEZE**: Please note that we currently have a feature freeze on new environments and
44
+ styling options. The only patches we accept at this time are for bug fixes.
45
+
46
+ Tests
47
+ -----
48
+
49
+ To run tests you will need to install [node.js](http://nodejs.org/) and
50
+ expresso. You can install the latter with npm:
51
+
52
+ npm install expresso
53
+
54
+ After that, running the unit tests is as easy as:
55
+
56
+ expresso tests/unit/*.js
57
+
58
+ Attribution
59
+ -----------
60
+
61
+ Core Team members:
62
+
63
+ * [Anton Kovalyov](http://anton.kovalyov.net/) ([@valueof](http://twitter.com/valueof))
64
+ * [Wolfgang Kluge](http://klugesoftware.de/) ([blog](http://gehirnwindung.de/))
65
+ * [Josh Perez](http://www.goatslacker.com/) ([@goatslacker](http://twitter.com/goatslacker))
66
+
67
+ Maintainer: Anton Kovalyov
68
+
69
+ License
70
+ -------
71
+
72
+ JSHint is licensed under the same slightly modified MIT license that JSLint is.
73
+ It stops evil-doers everywhere.
74
+
75
+ JSHint is a derivative work of JSLint:
76
+
77
+ Copyright (c) 2002 Douglas Crockford (www.JSLint.com)
78
+
79
+ Permission is hereby granted, free of charge, to any person obtaining
80
+ a copy of this software and associated documentation files (the "Software"),
81
+ to deal in the Software without restriction, including without limitation
82
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
83
+ and/or sell copies of the Software, and to permit persons to whom
84
+ the Software is furnished to do so, subject to the following conditions:
85
+
86
+ The above copyright notice and this permission notice shall be included
87
+ in all copies or substantial portions of the Software.
88
+
89
+ The Software shall be used for Good, not Evil.
90
+
91
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
92
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
93
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
94
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
95
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
96
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
97
+ DEALINGS IN THE SOFTWARE.
98
+
99
+ JSHint was forked from the 2010-12-16 edition of JSLint.
100
+
101
+ Thank you!
102
+ ----------
103
+
104
+ We really appreciate all kind of feedback and contributions. Thanks for using and supporting JSHint!