ruby-appraiser-rubocop-1.0.1/0000755000175000017500000000000012641036056014526 5ustar aleealeeruby-appraiser-rubocop-1.0.1/ruby-appraiser-rubocop.gemspec0000644000175000017500000000171212641036056022510 0ustar aleealee# -*- encoding: utf-8 -*- lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'ruby-appraiser-rubocop/version' require 'fileutils' FileUtils::cd(File::dirname(__FILE__)) Gem::Specification.new do |gem| gem.name = 'ruby-appraiser-rubocop' gem.version = RubyAppraiserRubocop::VERSION gem.authors = ['Ryan Biesemeyer'] gem.email = ['ryan@simplymeasured.com'] gem.description = %q{Rubocop adapter for ruby-appraiser} gem.summary = %q{Run Rubocop inside RubyAppraiser} gem.homepage = 'https://github.com/simplymeasured' gem.files = `git ls-files`.split($/) 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'] gem.add_runtime_dependency 'rubocop', '~> 0.9' gem.add_runtime_dependency 'ruby-appraiser', '~> 1.0', '>= 1.0.3' end ruby-appraiser-rubocop-1.0.1/Rakefile0000644000175000017500000000005712641036056016175 0ustar aleealee# encoding: utf-8 require 'bundler/gem_tasks' ruby-appraiser-rubocop-1.0.1/lib/0000755000175000017500000000000012641036056015274 5ustar aleealeeruby-appraiser-rubocop-1.0.1/lib/ruby-appraiser-rubocop/0000755000175000017500000000000012641036056021710 5ustar aleealeeruby-appraiser-rubocop-1.0.1/lib/ruby-appraiser-rubocop/version.rb0000644000175000017500000000010712641036056023720 0ustar aleealee# encoding: utf-8 module RubyAppraiserRubocop VERSION = '1.0.1' end ruby-appraiser-rubocop-1.0.1/lib/ruby-appraiser-rubocop.rb0000644000175000017500000000175612641036056022246 0ustar aleealee# encoding: utf-8 require 'ruby-appraiser' require 'ruby-appraiser-rubocop/version' require 'rubocop' require 'shellwords' module RubyAppraiserRubocop class RubocopAdapter < RubyAppraiser::Adapter def appraise file_args = Shellwords::join(relevant_files) file_args = '**/*.rb' if file_args.length > 250_000 rubocop_command = ['rubocop --format emacs', file_args].flatten.join(' ') puts rubocop_command if @options[:verbose] rubocop_output = IO.popen(rubocop_command) { |io| io.read } file_line_desc_pattern = /^([^:]+):([0-9]+)(\:[0-9]+\:?)?(.*)/ rubocop_output.lines.each do |rubocop_output_line| next unless rubocop_output_line.match(file_line_desc_pattern) file = Regexp::last_match(1) line = Regexp::last_match(2).to_i # column = Regexp::last_match(3).to_i # currently throw-away :( desc = Regexp::last_match(4).strip add_defect(file, line, desc) end end end end ruby-appraiser-rubocop-1.0.1/.gitignore0000644000175000017500000000023212641036056016513 0ustar aleealee*.gem *.rbc .bundle .config .yardoc Gemfile.lock InstalledFiles _yardoc coverage doc/ lib/bundler/man pkg rdoc spec/reports test/tmp test/version_tmp tmp ruby-appraiser-rubocop-1.0.1/LICENSE.txt0000644000175000017500000000205712641036056016355 0ustar aleealeeCopyright (c) 2013 Ryan Biesemeyer MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.ruby-appraiser-rubocop-1.0.1/README.md0000644000175000017500000000104012641036056016000 0ustar aleealee# Ruby::Appraiser::Rubocop TODO: Write a gem description ## Installation Add this line to your application's Gemfile: gem 'ruby-appraiser-rubocop' And then execute: $ bundle Or install it yourself as: $ gem install ruby-appraiser-rubocop ## Usage TODO: Write usage instructions here ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request ruby-appraiser-rubocop-1.0.1/Gemfile0000644000175000017500000000025712641036056016025 0ustar aleealee# encoding: utf-8 source 'https://rubygems.org' # Specify your gem's dependencies in ruby-appraiser-rubocop.gemspec gemspec gem 'ruby-appraiser', path: '../' gem 'rubocop' ruby-appraiser-rubocop-1.0.1/metadata.yml0000644000175000017500000000404212641036056017031 0ustar aleealee--- !ruby/object:Gem::Specification name: ruby-appraiser-rubocop version: !ruby/object:Gem::Version version: 1.0.1 prerelease: platform: ruby authors: - Ryan Biesemeyer autorequire: bindir: bin cert_chain: [] date: 2013-07-23 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rubocop requirement: !ruby/object:Gem::Requirement none: false requirements: - - ~> - !ruby/object:Gem::Version version: '0.9' type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement none: false requirements: - - ~> - !ruby/object:Gem::Version version: '0.9' - !ruby/object:Gem::Dependency name: ruby-appraiser requirement: !ruby/object:Gem::Requirement none: false requirements: - - ~> - !ruby/object:Gem::Version version: '1.0' - - ! '>=' - !ruby/object:Gem::Version version: 1.0.3 type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement none: false requirements: - - ~> - !ruby/object:Gem::Version version: '1.0' - - ! '>=' - !ruby/object:Gem::Version version: 1.0.3 description: Rubocop adapter for ruby-appraiser email: - ryan@simplymeasured.com executables: [] extensions: [] extra_rdoc_files: [] files: - .gitignore - Gemfile - LICENSE.txt - README.md - Rakefile - lib/ruby-appraiser-rubocop.rb - lib/ruby-appraiser-rubocop/version.rb - ruby-appraiser-rubocop.gemspec homepage: https://github.com/simplymeasured licenses: [] post_install_message: rdoc_options: [] require_paths: - lib required_ruby_version: !ruby/object:Gem::Requirement none: false requirements: - - ! '>=' - !ruby/object:Gem::Version version: '0' required_rubygems_version: !ruby/object:Gem::Requirement none: false requirements: - - ! '>=' - !ruby/object:Gem::Version version: '0' requirements: [] rubyforge_project: rubygems_version: 1.8.24 signing_key: specification_version: 3 summary: Run Rubocop inside RubyAppraiser test_files: [] has_rdoc: