code_analyzer 0.4.0 → 0.4.1

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: 3723a944cc80445e3d5dc42360bf001e1bf66221
4
- data.tar.gz: 37a887ceee61cdb1fb1e8227112e102e06b0e047
3
+ metadata.gz: 181ca088af7fc724c6d7a7085e3dd50b90d31a49
4
+ data.tar.gz: 70b0d7541e77386f21d5fc0e99ae0176beaa8aaa
5
5
  SHA512:
6
- metadata.gz: f308e1967ea4b8dffb44d338bb691445587fcfaffc46c33bdad729e8cec169cd8f93aacd36d5cabc72d1f1c451a75b91647f336508aca4acf43359a11e9aaa92
7
- data.tar.gz: be8452dc9cc7f9a39519af9df1c80a678485a10ce22ebc6e3997283befadf1a9c298725ac6fc5ab6a9592d6d40319b6b2f6cc0828342983345a19308fcf8b0cb
6
+ metadata.gz: 5eea1a16c0f746a013ebf8b2a7a8cd46178aa5e2e3151ecd43d2a7977af4472bd1f5d18eaa7c842c70ed3bc598d5af1465cc9ec2efa03ea4b5a6e6dfaa3a6b85
7
+ data.tar.gz: 3b61e0c6959affae821256498031bd124f05ba6140e970f47a6a196155f43f4ca121a3c93c28ae88373fd6a62067b444bbf122cdaadb2482fdd37ca9c5a82a4d
@@ -7,6 +7,7 @@ Gem::Specification.new do |gem|
7
7
  gem.description = %q{a code analyzer tool which extracted from rails_best_practices, it helps you easily build your own code analyzer tool.}
8
8
  gem.summary = %q{a code analyzer helps you build your own code analyzer tool.}
9
9
  gem.homepage = "https://github.com/flyerhzm/code_analyzer"
10
+ gem.license = 'MIT'
10
11
 
11
12
  gem.files = `git ls-files`.split($\)
12
13
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
@@ -465,7 +465,7 @@ class Sexp
465
465
  # )
466
466
  #
467
467
  # @return [Sexp] body node
468
- def block
468
+ def block_node
469
469
  case sexp_type
470
470
  when :method_add_block
471
471
  self[2]
@@ -872,7 +872,7 @@ class Sexp
872
872
 
873
873
  # if the return value of these methods is nil, then return CodeAnalyzer::Nil.new instead
874
874
  [:sexp_type, :receiver, :message, :arguments, :argument, :class_name, :base_class, :method_name,
875
- :body, :block, :conditional_statement, :left_value, :right_value].each do |method|
875
+ :body, :block_node, :conditional_statement, :left_value, :right_value].each do |method|
876
876
  class_eval <<-EOS
877
877
  alias_method :origin_#{method}, :#{method}
878
878
 
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module CodeAnalyzer
3
- VERSION = "0.4.0"
3
+ VERSION = "0.4.1"
4
4
  end
@@ -439,7 +439,7 @@ describe Sexp do
439
439
  describe "block" do
440
440
  it "sould get block of method_add_block node" do
441
441
  node = parse_content("resources :posts do; resources :comments; end").grep_node(sexp_type: :method_add_block)
442
- node.block.sexp_type.should == :do_block
442
+ node.block_node.sexp_type.should == :do_block
443
443
  end
444
444
  end
445
445
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: code_analyzer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-13 00:00:00.000000000 Z
11
+ date: 2013-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sexp_processor
@@ -90,7 +90,8 @@ files:
90
90
  - spec/code_analyzer/warning_spec.rb
91
91
  - spec/spec_helper.rb
92
92
  homepage: https://github.com/flyerhzm/code_analyzer
93
- licenses: []
93
+ licenses:
94
+ - MIT
94
95
  metadata: {}
95
96
  post_install_message:
96
97
  rdoc_options: []