fasterer 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5326a0412657a2db9c2b84efad1a746aaf21f476
4
- data.tar.gz: c04d001a94792fdcee7ea2fd31f5bf58f0d1048a
3
+ metadata.gz: b9a616ac05b430472ca9f256d14d39c8bca2b228
4
+ data.tar.gz: 5dc6f2bd8f06edc6403141d0cbd6b5ae7cfeaf86
5
5
  SHA512:
6
- metadata.gz: d37d2a91589c7c9d89eb2e7edfeda0f7c89824c37c2871e2f50b111b83cf40a5ee2fa22034df6837b969da5129aa769e11a61331ea1fa20d9f7c3715599a0942
7
- data.tar.gz: f2055f3eb1d3473ed18d14a9e461bae2600b1dca20e447460b8f2da63a46315e0f59496cf479f1f90678e9951381395d5913f624b8012a2572f7ed2a48c78f7e
6
+ metadata.gz: 0045bffa7b1096481147729775723e35a0a13a87b7d24911bc8f29cc37dafddb26cdb72c5c3c4573bc0e325be4d98c4a2089bfe8cd24b9636314db586a3396f2
7
+ data.tar.gz: 2e98083140461533bcf3fe7b8effe878e89450840735dcdbb61e1ca43400cde92b5d1314130d7d09b2d666300b3712b98e669cd47b9213b23f550b918b673f6d
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  [![Build Status](https://travis-ci.org/DamirSvrtan/fasterer.svg?branch=master)](https://travis-ci.org/DamirSvrtan/fasterer)
2
2
  [![Code Climate](https://codeclimate.com/github/DamirSvrtan/fasterer/badges/gpa.svg)](https://codeclimate.com/github/DamirSvrtan/fasterer)
3
+ [![Gem Version](https://badge.fury.io/rb/fasterer.svg)](http://badge.fury.io/rb/fasterer)
3
4
  # Fasterer
4
5
 
5
6
  Make your Rubies go faster with this command line tool highly inspired by [fast-ruby](https://github.com/JuanitoFatas/fast-ruby) and [Sferik's talk at Baruco Conf](https://speakerdeck.com/sferik/writing-fast-ruby).
@@ -3,7 +3,6 @@ require 'fasterer/method_call'
3
3
  require 'fasterer/rescue_call'
4
4
  require 'fasterer/offense_collector'
5
5
  require 'fasterer/parser'
6
- require 'fasterer/parse_error'
7
6
  require 'fasterer/scanners/method_call_scanner'
8
7
  require 'fasterer/scanners/rescue_call_scanner'
9
8
  require 'fasterer/scanners/method_definition_scanner'
@@ -20,7 +19,6 @@ module Fasterer
20
19
 
21
20
  def scan
22
21
  sexp_tree = Fasterer::Parser.parse(@file_content)
23
- fail ParseError.new(file_path) if sexp_tree.nil?
24
22
  traverse_sexp_tree(sexp_tree)
25
23
  end
26
24
 
@@ -43,7 +43,7 @@ module Fasterer
43
43
  def scan_file(path)
44
44
  analyzer = Analyzer.new(path)
45
45
  analyzer.scan
46
- rescue Fasterer::ParseError, RubyParser::SyntaxError, Racc::ParseError
46
+ rescue RubyParser::SyntaxError, Racc::ParseError
47
47
  parse_error_paths.push(path)
48
48
  else
49
49
  output(analyzer) if offenses_grouped_by_type(analyzer).any?
@@ -62,7 +62,7 @@ module Fasterer
62
62
  'Calling blocks with call is slower than yielding',
63
63
 
64
64
  gsub_vs_tr:
65
- 'Use tr instead of gsub when grepping plain strings'
65
+ 'Using tr when replacing one-character plain strings is faster than using gsub'
66
66
  }
67
67
 
68
68
  end
@@ -1,3 +1,3 @@
1
1
  module Fasterer
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fasterer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damir Svrtan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-24 00:00:00.000000000 Z
11
+ date: 2015-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -122,7 +122,6 @@ files:
122
122
  - lib/fasterer/method_definition.rb
123
123
  - lib/fasterer/offense.rb
124
124
  - lib/fasterer/offense_collector.rb
125
- - lib/fasterer/parse_error.rb
126
125
  - lib/fasterer/parser.rb
127
126
  - lib/fasterer/rescue_call.rb
128
127
  - lib/fasterer/scanners/method_call_scanner.rb
@@ -1,10 +0,0 @@
1
- module Fasterer
2
- class ParseError < StandardError
3
- attr_reader :file_path
4
-
5
- def initialize(file_path)
6
- @file_path = file_path
7
- super("Unable to read #{file_path}")
8
- end
9
- end
10
- end