Skip to content

Commit

Permalink
Update coffeelint version to 1.0.6
Browse files Browse the repository at this point in the history
Bump up gem version to 0.2.0
  • Loading branch information
zmbush committed Jan 29, 2014
1 parent 17b4ef4 commit 4dfcc54
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 8 deletions.
13 changes: 13 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,16 @@ task :console do
sh "irb -rubygems -I lib -r coffeelint.rb"
end

task :compile => [:prepare, :build]

task :prepare do
sh "git submodule init"
sh "git submodule update"

Dir.chdir('coffeelint') do
sh "npm install"
sh "npm run compile"
end

sh "rake spec"
end
2 changes: 1 addition & 1 deletion coffeelint
Submodule coffeelint updated 61 files
+0 −1 .travis.yml
+63 −0 3rd_party_rules.md
+19 −1 bin/coffeelint
+3 −0 coffeelint.json
+114 −0 generated_coffeelint.json
+0 −50 npm-shrinkwrap.json
+34 −23 package.json
+62 −0 src/ast_linter.coffee
+55 −0 src/base_linter.coffee
+117 −1,010 src/coffeelint.coffee
+91 −14 src/commandline.coffee
+54 −0 src/configfinder.coffee
+73 −0 src/lexical_linter.coffee
+134 −0 src/line_linter.coffee
+12 −0 src/rules.coffee
+61 −0 src/rules/arrow_spacing.coffee
+52 −0 src/rules/camel_case_classes.coffee
+65 −0 src/rules/colon_assignment_spacing.coffee
+52 −0 src/rules/cyclomatic_complexity.coffee
+60 −0 src/rules/duplicate_key.coffee
+35 −0 src/rules/empty_constructor_needs_parens.coffee
+129 −0 src/rules/indentation.coffee
+30 −0 src/rules/line_endings.coffee
+37 −0 src/rules/max_line_length.coffee
+63 −0 src/rules/missing_fat_arrows.coffee
+26 −0 src/rules/newlines_after_classes.coffee
+20 −0 src/rules/no_backticks.coffee
+27 −0 src/rules/no_empty_param_list.coffee
+52 −0 src/rules/no_implicit_braces.coffee
+27 −0 src/rules/no_implicit_parens.coffee
+19 −0 src/rules/no_plusplus.coffee
+38 −0 src/rules/no_stand_alone_at.coffee
+22 −0 src/rules/no_tabs.coffee
+36 −0 src/rules/no_throwing_strings.coffee
+42 −0 src/rules/no_trailing_semicolons.coffee
+44 −0 src/rules/no_trailing_whitespace.coffee
+36 −0 src/rules/no_unnecessary_fat_arrows.coffee
+15 −0 src/rules/non_empty_constructor_needs_parens.coffee
+93 −0 src/rules/space_operators.coffee
+4 −0 test/coffeelint.json
+5 −0 test/fixtures/custom_rules/rule_module.json
+14 −0 test/fixtures/custom_rules/voldemort.coffee
+6 −0 test/fixtures/findconfigtest/coffeelint.json
+9 −0 test/fixtures/findconfigtest/package/package.json
+2 −0 test/fixtures/findconfigtest/package/sixspaces.coffee
+2 −0 test/fixtures/findconfigtest/sevenspaces.coffee
+0 −0 test/fixtures/generated_coffeelint.json
+17 −0 test/fixtures/mock_node_modules/he_who_must_not_be_named/he_who_must_not_be_named.coffee
+2 −0 test/fixtures/mock_node_modules/he_who_must_not_be_named/index.js
+57 −1 test/test_arrows.coffee
+25 −0 test/test_braces.coffee
+121 −0 test/test_colon_assignment_spacing.coffee
+81 −9 test/test_commandline.coffee
+11 −1 test/test_line_length.coffee
+126 −0 test/test_missing_fat_arrows.coffee
+21 −24 test/test_newlines_after_classes.coffee
+11 −0 test/test_no_implicit_parens.coffee
+61 −0 test/test_no_unnecessary_fat_arrows.coffee
+8 −0 test/test_semicolons.coffee
+4 −0 test/test_spacing.coffee
+18 −0 test/test_trailing.coffee
2 changes: 1 addition & 1 deletion coffeelint.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
gem.licenses = ["MIT"]

gem.files = `git ls-files`.split($/)
gem.files << 'coffeelint/src/coffeelint.coffee'
gem.files << 'coffeelint/lib/coffeelint.js'
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.require_paths = ["lib"]
Expand Down
19 changes: 14 additions & 5 deletions lib/coffeelint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Coffeelint
require 'coffeelint/railtie' if defined?(Rails)

def self.path()
@path ||= File.expand_path('../../coffeelint/src/coffeelint.coffee', __FILE__)
@path ||= File.expand_path('../../coffeelint/lib/coffeelint.js', __FILE__)
end

def self.colorize(str, color_code)
Expand All @@ -22,15 +22,24 @@ def self.green(str, pretty_output = true)
pretty_output ? Coffeelint.colorize(str, 32) : str
end

def self.context
coffeescriptSource = File.read(CoffeeScript::Source.path)
bootstrap = <<-EOF
window = {
CoffeeScript: CoffeeScript,
coffeelint: {}
};
EOF
coffeelintSource = File.read(Coffeelint.path)
ExecJS.compile(coffeescriptSource + bootstrap + coffeelintSource)
end

def self.lint(script, config = {})
if !config[:config_file].nil?
fname = config.delete(:config_file)
config.merge!(JSON.parse(File.read(fname)))
end
coffeescriptSource = File.read(CoffeeScript::Source.path)
coffeelintSource = CoffeeScript.compile(File.read(Coffeelint.path))
context = ExecJS.compile(coffeescriptSource + coffeelintSource)
context.call('coffeelint.lint', script, config)
Coffeelint.context.call('window.coffeelint.lint', script, config)
end

def self.lint_file(filename, config = {})
Expand Down
2 changes: 1 addition & 1 deletion lib/coffeelint/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Coffeelint
VERSION = "0.1.3"
VERSION = "0.2.0"
end

0 comments on commit 4dfcc54

Please sign in to comment.