rails_best_practices 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. data/{LICENSE → MIT_LICENSE} +1 -1
  2. data/README.textile +27 -18
  3. data/lib/rails_best_practices/command.rb +8 -5
  4. data/lib/rails_best_practices/version.rb +4 -0
  5. metadata +115 -82
  6. data/.gitignore +0 -2
  7. data/Rakefile +0 -33
  8. data/VERSION +0 -1
  9. data/identifier +0 -0
  10. data/rails_best_practices.gemspec +0 -126
  11. data/spec/rails_best_practices/checks/add_model_virtual_attribute_check_spec.rb +0 -113
  12. data/spec/rails_best_practices/checks/always_add_db_index_check_spec.rb +0 -73
  13. data/spec/rails_best_practices/checks/isolate_seed_data_check_spec.rb +0 -76
  14. data/spec/rails_best_practices/checks/keep_finders_on_their_own_model_check_spec.rb +0 -103
  15. data/spec/rails_best_practices/checks/law_of_demeter_check_spec.rb +0 -76
  16. data/spec/rails_best_practices/checks/move_code_into_controller_check_spec.rb +0 -33
  17. data/spec/rails_best_practices/checks/move_code_into_helper_check_spec.rb +0 -29
  18. data/spec/rails_best_practices/checks/move_code_into_model_check_spec.rb +0 -55
  19. data/spec/rails_best_practices/checks/move_finder_to_named_scope_check_spec.rb +0 -82
  20. data/spec/rails_best_practices/checks/move_model_logic_into_model_check_spec.rb +0 -49
  21. data/spec/rails_best_practices/checks/needless_deep_nesting_check_spec.rb +0 -70
  22. data/spec/rails_best_practices/checks/not_use_default_route_check_spec.rb +0 -63
  23. data/spec/rails_best_practices/checks/overuse_route_customizations_check_spec.rb +0 -145
  24. data/spec/rails_best_practices/checks/replace_complex_creation_with_factory_method_check_spec.rb +0 -76
  25. data/spec/rails_best_practices/checks/replace_instance_variable_with_local_variable_check_spec.rb +0 -36
  26. data/spec/rails_best_practices/checks/use_before_filter_check_spec.rb +0 -85
  27. data/spec/rails_best_practices/checks/use_model_association_check_spec.rb +0 -71
  28. data/spec/rails_best_practices/checks/use_observer_check_spec.rb +0 -67
  29. data/spec/rails_best_practices/checks/use_scope_access_check_spec.rb +0 -193
  30. data/spec/spec.opts +0 -8
  31. data/spec/spec_helper.rb +0 -5
@@ -1,4 +1,4 @@
1
- Copyright (c) 2009 Richard Huang (flyerhzm@gmail.com)
1
+ Copyright (c) 2009 - 2010 Richard Huang (flyerhzm@gmail.com)
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.textile CHANGED
@@ -4,21 +4,6 @@ rails_best_practices is a code metric tool to check the quality of rails codes.
4
4
 
5
5
  *************************************************
6
6
 
7
- h2. Resources
8
-
9
- Homepage: "http://rails-bestpractices.com":http://rails-bestpractices.com
10
- Wiki: "http://github.com/flyerhzm/rails_best_practices/wiki":http://github.com/flyerhzm/rails_best_practices/wiki
11
-
12
- *************************************************
13
-
14
- h2. Install
15
-
16
- <pre><code>
17
- sudo gem install rails_best_practices
18
- </code></pre>
19
-
20
- *************************************************
21
-
22
7
  h2. Usage
23
8
 
24
9
  At the root directory of rails app
@@ -44,6 +29,22 @@ Usage: rails_best_practices [options]
44
29
 
45
30
  *************************************************
46
31
 
32
+ h2. Helpful links
33
+
34
+ Homepage: "http://rails-bestpractices.com":http://rails-bestpractices.com
35
+ Repository: "http://github.com/flyerhzm/rails_best_practices":http://github.com/flyerhzm/rails_best_practices
36
+ Wiki: "http://github.com/flyerhzm/rails_best_practices/wiki":http://github.com/flyerhzm/rails_best_practices/wiki
37
+
38
+ *************************************************
39
+
40
+ h2. Install
41
+
42
+ <pre><code>
43
+ sudo gem install rails_best_practices
44
+ </code></pre>
45
+
46
+ *************************************************
47
+
47
48
  h2. Issue
48
49
 
49
50
  If you got NoMethodError or any syntax error, you should use debug mode to detect which file rails_best_practices is parsing and getting the error.
@@ -54,6 +55,8 @@ rails_best_practices -d .
54
55
 
55
56
  Then give me the error stack and the source code of the file that rails_best_practices is parsing error.
56
57
 
58
+ "http://github.com/flyerhzm/rails_best_practices/issues":http://github.com/flyerhzm/rails_best_practices/issues
59
+
57
60
  *************************************************
58
61
 
59
62
  h2. Customize Configuration
@@ -120,10 +123,16 @@ h2. Implementation
120
123
 
121
124
  *************************************************
122
125
 
123
- h2. Links
126
+ h2. Contribute
127
+
128
+ If you want to add your rails best practices into the gem, please post your best practices on "http://rails-bestpractices.com":http://rails-bestpractices.com
129
+
130
+ *************************************************
131
+
132
+ h2. Contact
124
133
 
125
- "http://railsenvy.com/2009/12/07/rails-envy-podcast-episode-102":http://railsenvy.com/2009/12/07/rails-envy-podcast-episode-102
126
- "http://ruby5.envylabs.com/episodes/29-episode-28-november-17-2009":http://ruby5.envylabs.com/episodes/29-episode-28-november-17-2009
134
+ Follow us on twitter: "http://twitter.com/railsbp":http://twitter.com/railsbp
135
+ Send us email: "team@rails-bestpractices.com":mailto:team@rails-bestpractices.com
127
136
 
128
137
  *************************************************
129
138
 
@@ -1,5 +1,6 @@
1
1
  require 'optparse'
2
-
2
+ require 'progressbar'
3
+ require 'colored'
3
4
 
4
5
  options = {}
5
6
  OptionParser.new do |opts|
@@ -32,12 +33,14 @@ runner = RailsBestPractices::Core::Runner.new
32
33
  runner.set_debug if options['debug']
33
34
 
34
35
  files = RailsBestPractices::analyze_files(ARGV, options)
35
- files.each { |file| runner.check_file(file) }
36
+ bar = ProgressBar.new('Analyzing', files.size)
37
+ files.each { |file| runner.check_file(file); bar.inc }
38
+ bar.finish
36
39
 
37
- runner.errors.each {|error| puts error}
38
- puts "\nPlease go to http://rails-bestpractices.com to see more useful Rails Best Practices."
40
+ runner.errors.each {|error| puts error.to_s.red}
41
+ puts "\nPlease go to http://rails-bestpractices.com to see more useful Rails Best Practices.".green
39
42
  if runner.errors.size > 0
40
- puts "\nFound #{runner.errors.size} errors."
43
+ puts "\nFound #{runner.errors.size} errors.".red
41
44
  end
42
45
 
43
46
  exit runner.errors.size
@@ -0,0 +1,4 @@
1
+ module RailsBestPractices
2
+ VERSION = "0.4.1"
3
+ end
4
+
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_best_practices
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 13
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 4
8
- - 0
9
- version: 0.4.0
9
+ - 1
10
+ version: 0.4.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Richard Huang
@@ -14,154 +15,186 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-08-15 00:00:00 +08:00
18
+ date: 2010-09-24 00:00:00 +08:00
18
19
  default_executable: rails_best_practices
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
- name: ruby_parser
22
- prerelease: false
23
22
  requirement: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
24
  requirements:
25
- - - ">="
25
+ - - ~>
26
26
  - !ruby/object:Gem::Version
27
+ hash: 7
27
28
  segments:
28
29
  - 2
29
30
  - 0
30
31
  - 4
31
32
  version: 2.0.4
33
+ name: ruby_parser
34
+ prerelease: false
32
35
  type: :runtime
33
36
  version_requirements: *id001
34
37
  - !ruby/object:Gem::Dependency
35
- name: ruby2ruby
36
- prerelease: false
37
38
  requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
38
40
  requirements:
39
- - - ">="
41
+ - - ~>
40
42
  - !ruby/object:Gem::Version
43
+ hash: 23
41
44
  segments:
42
45
  - 1
43
46
  - 2
44
47
  - 4
45
48
  version: 1.2.4
49
+ name: ruby2ruby
50
+ prerelease: false
46
51
  type: :runtime
47
52
  version_requirements: *id002
48
- description: a code metric tool for rails codes.
49
- email: flyerhzm@gmail.com
53
+ - !ruby/object:Gem::Dependency
54
+ requirement: &id003 !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ~>
58
+ - !ruby/object:Gem::Version
59
+ hash: 59
60
+ segments:
61
+ - 0
62
+ - 9
63
+ - 0
64
+ version: 0.9.0
65
+ name: progressbar
66
+ prerelease: false
67
+ type: :runtime
68
+ version_requirements: *id003
69
+ - !ruby/object:Gem::Dependency
70
+ requirement: &id004 !ruby/object:Gem::Requirement
71
+ none: false
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ hash: 11
76
+ segments:
77
+ - 1
78
+ - 2
79
+ version: "1.2"
80
+ name: colored
81
+ prerelease: false
82
+ type: :runtime
83
+ version_requirements: *id004
84
+ - !ruby/object:Gem::Dependency
85
+ requirement: &id005 !ruby/object:Gem::Requirement
86
+ none: false
87
+ requirements:
88
+ - - "="
89
+ - !ruby/object:Gem::Version
90
+ hash: 62196431
91
+ segments:
92
+ - 2
93
+ - 0
94
+ - 0
95
+ - beta
96
+ - 22
97
+ version: 2.0.0.beta.22
98
+ name: rspec
99
+ prerelease: false
100
+ type: :development
101
+ version_requirements: *id005
102
+ - !ruby/object:Gem::Dependency
103
+ requirement: &id006 !ruby/object:Gem::Requirement
104
+ none: false
105
+ requirements:
106
+ - - "="
107
+ - !ruby/object:Gem::Version
108
+ hash: 35
109
+ segments:
110
+ - 3
111
+ - 0
112
+ - 18
113
+ version: 3.0.18
114
+ name: haml
115
+ prerelease: false
116
+ type: :development
117
+ version_requirements: *id006
118
+ description: a code metric tool for rails codes, written in Ruby.
119
+ email:
120
+ - flyerhzm@gmail.com
50
121
  executables:
51
122
  - rails_best_practices
52
123
  extensions: []
53
124
 
54
125
  extra_rdoc_files:
55
- - LICENSE
126
+ - MIT_LICENSE
56
127
  - README.textile
57
128
  files:
58
- - .gitignore
59
- - LICENSE
60
- - README.textile
61
- - Rakefile
62
- - VERSION
63
- - bin/rails_best_practices
64
- - identifier
65
129
  - lib/rails_best_practices.rb
66
- - lib/rails_best_practices/checks.rb
67
- - lib/rails_best_practices/checks/add_model_virtual_attribute_check.rb
68
- - lib/rails_best_practices/checks/always_add_db_index_check.rb
69
- - lib/rails_best_practices/checks/check.rb
70
- - lib/rails_best_practices/checks/isolate_seed_data_check.rb
130
+ - lib/rails_best_practices/version.rb
131
+ - lib/rails_best_practices/checks/move_finder_to_named_scope_check.rb
132
+ - lib/rails_best_practices/checks/use_model_association_check.rb
71
133
  - lib/rails_best_practices/checks/keep_finders_on_their_own_model_check.rb
134
+ - lib/rails_best_practices/checks/add_model_virtual_attribute_check.rb
72
135
  - lib/rails_best_practices/checks/law_of_demeter_check.rb
136
+ - lib/rails_best_practices/checks/use_scope_access_check.rb
73
137
  - lib/rails_best_practices/checks/move_code_into_controller_check.rb
74
- - lib/rails_best_practices/checks/move_code_into_helper_check.rb
75
- - lib/rails_best_practices/checks/move_code_into_model_check.rb
76
- - lib/rails_best_practices/checks/move_finder_to_named_scope_check.rb
77
138
  - lib/rails_best_practices/checks/move_model_logic_into_model_check.rb
78
- - lib/rails_best_practices/checks/needless_deep_nesting_check.rb
79
139
  - lib/rails_best_practices/checks/not_use_default_route_check.rb
80
- - lib/rails_best_practices/checks/overuse_route_customizations_check.rb
81
140
  - lib/rails_best_practices/checks/replace_complex_creation_with_factory_method_check.rb
141
+ - lib/rails_best_practices/checks/isolate_seed_data_check.rb
142
+ - lib/rails_best_practices/checks/always_add_db_index_check.rb
82
143
  - lib/rails_best_practices/checks/replace_instance_variable_with_local_variable_check.rb
83
- - lib/rails_best_practices/checks/use_before_filter_check.rb
84
- - lib/rails_best_practices/checks/use_model_association_check.rb
144
+ - lib/rails_best_practices/checks/needless_deep_nesting_check.rb
145
+ - lib/rails_best_practices/checks/move_code_into_helper_check.rb
85
146
  - lib/rails_best_practices/checks/use_observer_check.rb
86
- - lib/rails_best_practices/checks/use_scope_access_check.rb
87
- - lib/rails_best_practices/command.rb
147
+ - lib/rails_best_practices/checks/check.rb
148
+ - lib/rails_best_practices/checks/overuse_route_customizations_check.rb
149
+ - lib/rails_best_practices/checks/use_before_filter_check.rb
150
+ - lib/rails_best_practices/checks/move_code_into_model_check.rb
88
151
  - lib/rails_best_practices/core.rb
152
+ - lib/rails_best_practices/checks.rb
89
153
  - lib/rails_best_practices/core/checking_visitor.rb
90
154
  - lib/rails_best_practices/core/core_ext.rb
91
155
  - lib/rails_best_practices/core/error.rb
92
- - lib/rails_best_practices/core/runner.rb
93
156
  - lib/rails_best_practices/core/visitable_sexp.rb
94
- - rails_best_practices.gemspec
157
+ - lib/rails_best_practices/core/runner.rb
158
+ - lib/rails_best_practices/command.rb
95
159
  - rails_best_practices.yml
96
- - spec/rails_best_practices/checks/add_model_virtual_attribute_check_spec.rb
97
- - spec/rails_best_practices/checks/always_add_db_index_check_spec.rb
98
- - spec/rails_best_practices/checks/isolate_seed_data_check_spec.rb
99
- - spec/rails_best_practices/checks/keep_finders_on_their_own_model_check_spec.rb
100
- - spec/rails_best_practices/checks/law_of_demeter_check_spec.rb
101
- - spec/rails_best_practices/checks/move_code_into_controller_check_spec.rb
102
- - spec/rails_best_practices/checks/move_code_into_helper_check_spec.rb
103
- - spec/rails_best_practices/checks/move_code_into_model_check_spec.rb
104
- - spec/rails_best_practices/checks/move_finder_to_named_scope_check_spec.rb
105
- - spec/rails_best_practices/checks/move_model_logic_into_model_check_spec.rb
106
- - spec/rails_best_practices/checks/needless_deep_nesting_check_spec.rb
107
- - spec/rails_best_practices/checks/not_use_default_route_check_spec.rb
108
- - spec/rails_best_practices/checks/overuse_route_customizations_check_spec.rb
109
- - spec/rails_best_practices/checks/replace_complex_creation_with_factory_method_check_spec.rb
110
- - spec/rails_best_practices/checks/replace_instance_variable_with_local_variable_check_spec.rb
111
- - spec/rails_best_practices/checks/use_before_filter_check_spec.rb
112
- - spec/rails_best_practices/checks/use_model_association_check_spec.rb
113
- - spec/rails_best_practices/checks/use_observer_check_spec.rb
114
- - spec/rails_best_practices/checks/use_scope_access_check_spec.rb
115
- - spec/spec.opts
116
- - spec/spec_helper.rb
160
+ - MIT_LICENSE
161
+ - README.textile
162
+ - bin/rails_best_practices
117
163
  has_rdoc: true
118
164
  homepage: http://rails-bestpractices.com
119
165
  licenses: []
120
166
 
121
167
  post_install_message:
122
- rdoc_options:
123
- - --charset=UTF-8
168
+ rdoc_options: []
169
+
124
170
  require_paths:
125
171
  - lib
126
172
  required_ruby_version: !ruby/object:Gem::Requirement
173
+ none: false
127
174
  requirements:
128
175
  - - ">="
129
176
  - !ruby/object:Gem::Version
177
+ hash: 3
130
178
  segments:
131
179
  - 0
132
180
  version: "0"
133
181
  required_rubygems_version: !ruby/object:Gem::Requirement
182
+ none: false
134
183
  requirements:
135
184
  - - ">="
136
185
  - !ruby/object:Gem::Version
186
+ hash: 23
137
187
  segments:
138
- - 0
139
- version: "0"
188
+ - 1
189
+ - 3
190
+ - 6
191
+ version: 1.3.6
140
192
  requirements: []
141
193
 
142
194
  rubyforge_project:
143
- rubygems_version: 1.3.6
195
+ rubygems_version: 1.3.7
144
196
  signing_key:
145
197
  specification_version: 3
146
198
  summary: a code metric tool for rails codes.
147
- test_files:
148
- - spec/rails_best_practices/checks/isolate_seed_data_check_spec.rb
149
- - spec/rails_best_practices/checks/move_model_logic_into_model_check_spec.rb
150
- - spec/rails_best_practices/checks/move_code_into_helper_check_spec.rb
151
- - spec/rails_best_practices/checks/move_code_into_controller_check_spec.rb
152
- - spec/rails_best_practices/checks/use_observer_check_spec.rb
153
- - spec/rails_best_practices/checks/overuse_route_customizations_check_spec.rb
154
- - spec/rails_best_practices/checks/always_add_db_index_check_spec.rb
155
- - spec/rails_best_practices/checks/use_before_filter_check_spec.rb
156
- - spec/rails_best_practices/checks/law_of_demeter_check_spec.rb
157
- - spec/rails_best_practices/checks/use_scope_access_check_spec.rb
158
- - spec/rails_best_practices/checks/replace_complex_creation_with_factory_method_check_spec.rb
159
- - spec/rails_best_practices/checks/not_use_default_route_check_spec.rb
160
- - spec/rails_best_practices/checks/move_finder_to_named_scope_check_spec.rb
161
- - spec/rails_best_practices/checks/add_model_virtual_attribute_check_spec.rb
162
- - spec/rails_best_practices/checks/replace_instance_variable_with_local_variable_check_spec.rb
163
- - spec/rails_best_practices/checks/use_model_association_check_spec.rb
164
- - spec/rails_best_practices/checks/move_code_into_model_check_spec.rb
165
- - spec/rails_best_practices/checks/needless_deep_nesting_check_spec.rb
166
- - spec/rails_best_practices/checks/keep_finders_on_their_own_model_check_spec.rb
167
- - spec/spec_helper.rb
199
+ test_files: []
200
+
data/.gitignore DELETED
@@ -1,2 +0,0 @@
1
- .*.swp
2
- pkg/**
data/Rakefile DELETED
@@ -1,33 +0,0 @@
1
- require 'rake'
2
- require 'spec/rake/spectask'
3
- require 'rake/rdoctask'
4
- require 'jeweler'
5
-
6
- desc 'Default: run unit tests.'
7
- task :default => :spec
8
-
9
- desc 'Generate documentation for the rails_best_practices plugin.'
10
- Rake::RDocTask.new(:rdoc) do |rdoc|
11
- rdoc.rdoc_dir = 'rdoc'
12
- rdoc.title = 'rails_best_practices'
13
- rdoc.options << '--line-numbers' << '--inline-source'
14
- rdoc.rdoc_files.include('README')
15
- rdoc.rdoc_files.include('lib/**/*.rb')
16
- end
17
-
18
- desc "Run all specs in spec directory"
19
- Spec::Rake::SpecTask.new(:spec) do |t|
20
- t.spec_files = FileList['spec/**/*_spec.rb']
21
- end
22
-
23
- Jeweler::Tasks.new do |gemspec|
24
- gemspec.name = "rails_best_practices"
25
- gemspec.summary = "a code metric tool for rails codes."
26
- gemspec.description = "a code metric tool for rails codes."
27
- gemspec.email = "flyerhzm@gmail.com"
28
- gemspec.homepage = "http://rails-bestpractices.com"
29
- gemspec.authors = ["Richard Huang"]
30
- gemspec.add_dependency 'ruby_parser', '>= 2.0.4'
31
- gemspec.add_dependency 'ruby2ruby', '>= 1.2.4'
32
- end
33
- Jeweler::GemcutterTasks.new
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.4.0
data/identifier DELETED
File without changes
@@ -1,126 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{rails_best_practices}
8
- s.version = "0.4.0"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Richard Huang"]
12
- s.date = %q{2010-08-15}
13
- s.default_executable = %q{rails_best_practices}
14
- s.description = %q{a code metric tool for rails codes.}
15
- s.email = %q{flyerhzm@gmail.com}
16
- s.executables = ["rails_best_practices"]
17
- s.extra_rdoc_files = [
18
- "LICENSE",
19
- "README.textile"
20
- ]
21
- s.files = [
22
- ".gitignore",
23
- "LICENSE",
24
- "README.textile",
25
- "Rakefile",
26
- "VERSION",
27
- "bin/rails_best_practices",
28
- "identifier",
29
- "lib/rails_best_practices.rb",
30
- "lib/rails_best_practices/checks.rb",
31
- "lib/rails_best_practices/checks/add_model_virtual_attribute_check.rb",
32
- "lib/rails_best_practices/checks/always_add_db_index_check.rb",
33
- "lib/rails_best_practices/checks/check.rb",
34
- "lib/rails_best_practices/checks/isolate_seed_data_check.rb",
35
- "lib/rails_best_practices/checks/keep_finders_on_their_own_model_check.rb",
36
- "lib/rails_best_practices/checks/law_of_demeter_check.rb",
37
- "lib/rails_best_practices/checks/move_code_into_controller_check.rb",
38
- "lib/rails_best_practices/checks/move_code_into_helper_check.rb",
39
- "lib/rails_best_practices/checks/move_code_into_model_check.rb",
40
- "lib/rails_best_practices/checks/move_finder_to_named_scope_check.rb",
41
- "lib/rails_best_practices/checks/move_model_logic_into_model_check.rb",
42
- "lib/rails_best_practices/checks/needless_deep_nesting_check.rb",
43
- "lib/rails_best_practices/checks/not_use_default_route_check.rb",
44
- "lib/rails_best_practices/checks/overuse_route_customizations_check.rb",
45
- "lib/rails_best_practices/checks/replace_complex_creation_with_factory_method_check.rb",
46
- "lib/rails_best_practices/checks/replace_instance_variable_with_local_variable_check.rb",
47
- "lib/rails_best_practices/checks/use_before_filter_check.rb",
48
- "lib/rails_best_practices/checks/use_model_association_check.rb",
49
- "lib/rails_best_practices/checks/use_observer_check.rb",
50
- "lib/rails_best_practices/checks/use_scope_access_check.rb",
51
- "lib/rails_best_practices/command.rb",
52
- "lib/rails_best_practices/core.rb",
53
- "lib/rails_best_practices/core/checking_visitor.rb",
54
- "lib/rails_best_practices/core/core_ext.rb",
55
- "lib/rails_best_practices/core/error.rb",
56
- "lib/rails_best_practices/core/runner.rb",
57
- "lib/rails_best_practices/core/visitable_sexp.rb",
58
- "rails_best_practices.gemspec",
59
- "rails_best_practices.yml",
60
- "spec/rails_best_practices/checks/add_model_virtual_attribute_check_spec.rb",
61
- "spec/rails_best_practices/checks/always_add_db_index_check_spec.rb",
62
- "spec/rails_best_practices/checks/isolate_seed_data_check_spec.rb",
63
- "spec/rails_best_practices/checks/keep_finders_on_their_own_model_check_spec.rb",
64
- "spec/rails_best_practices/checks/law_of_demeter_check_spec.rb",
65
- "spec/rails_best_practices/checks/move_code_into_controller_check_spec.rb",
66
- "spec/rails_best_practices/checks/move_code_into_helper_check_spec.rb",
67
- "spec/rails_best_practices/checks/move_code_into_model_check_spec.rb",
68
- "spec/rails_best_practices/checks/move_finder_to_named_scope_check_spec.rb",
69
- "spec/rails_best_practices/checks/move_model_logic_into_model_check_spec.rb",
70
- "spec/rails_best_practices/checks/needless_deep_nesting_check_spec.rb",
71
- "spec/rails_best_practices/checks/not_use_default_route_check_spec.rb",
72
- "spec/rails_best_practices/checks/overuse_route_customizations_check_spec.rb",
73
- "spec/rails_best_practices/checks/replace_complex_creation_with_factory_method_check_spec.rb",
74
- "spec/rails_best_practices/checks/replace_instance_variable_with_local_variable_check_spec.rb",
75
- "spec/rails_best_practices/checks/use_before_filter_check_spec.rb",
76
- "spec/rails_best_practices/checks/use_model_association_check_spec.rb",
77
- "spec/rails_best_practices/checks/use_observer_check_spec.rb",
78
- "spec/rails_best_practices/checks/use_scope_access_check_spec.rb",
79
- "spec/spec.opts",
80
- "spec/spec_helper.rb"
81
- ]
82
- s.homepage = %q{http://rails-bestpractices.com}
83
- s.rdoc_options = ["--charset=UTF-8"]
84
- s.require_paths = ["lib"]
85
- s.rubygems_version = %q{1.3.6}
86
- s.summary = %q{a code metric tool for rails codes.}
87
- s.test_files = [
88
- "spec/rails_best_practices/checks/isolate_seed_data_check_spec.rb",
89
- "spec/rails_best_practices/checks/move_model_logic_into_model_check_spec.rb",
90
- "spec/rails_best_practices/checks/move_code_into_helper_check_spec.rb",
91
- "spec/rails_best_practices/checks/move_code_into_controller_check_spec.rb",
92
- "spec/rails_best_practices/checks/use_observer_check_spec.rb",
93
- "spec/rails_best_practices/checks/overuse_route_customizations_check_spec.rb",
94
- "spec/rails_best_practices/checks/always_add_db_index_check_spec.rb",
95
- "spec/rails_best_practices/checks/use_before_filter_check_spec.rb",
96
- "spec/rails_best_practices/checks/law_of_demeter_check_spec.rb",
97
- "spec/rails_best_practices/checks/use_scope_access_check_spec.rb",
98
- "spec/rails_best_practices/checks/replace_complex_creation_with_factory_method_check_spec.rb",
99
- "spec/rails_best_practices/checks/not_use_default_route_check_spec.rb",
100
- "spec/rails_best_practices/checks/move_finder_to_named_scope_check_spec.rb",
101
- "spec/rails_best_practices/checks/add_model_virtual_attribute_check_spec.rb",
102
- "spec/rails_best_practices/checks/replace_instance_variable_with_local_variable_check_spec.rb",
103
- "spec/rails_best_practices/checks/use_model_association_check_spec.rb",
104
- "spec/rails_best_practices/checks/move_code_into_model_check_spec.rb",
105
- "spec/rails_best_practices/checks/needless_deep_nesting_check_spec.rb",
106
- "spec/rails_best_practices/checks/keep_finders_on_their_own_model_check_spec.rb",
107
- "spec/spec_helper.rb"
108
- ]
109
-
110
- if s.respond_to? :specification_version then
111
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
112
- s.specification_version = 3
113
-
114
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
115
- s.add_runtime_dependency(%q<ruby_parser>, [">= 2.0.4"])
116
- s.add_runtime_dependency(%q<ruby2ruby>, [">= 1.2.4"])
117
- else
118
- s.add_dependency(%q<ruby_parser>, [">= 2.0.4"])
119
- s.add_dependency(%q<ruby2ruby>, [">= 1.2.4"])
120
- end
121
- else
122
- s.add_dependency(%q<ruby_parser>, [">= 2.0.4"])
123
- s.add_dependency(%q<ruby2ruby>, [">= 1.2.4"])
124
- end
125
- end
126
-