rails_best_practices 0.10.0 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -168,22 +168,22 @@ module RailsBestPractices
168
168
  def file_sort files
169
169
  models = []
170
170
  mailers = []
171
- files.each do |a|
172
- if a =~ Core::Check::MODEL_FILES
173
- models << a
174
- end
171
+ files.each do |a|
172
+ if a =~ Core::Check::MODEL_FILES
173
+ models << a
174
+ end
175
175
  end
176
- files.each do |a|
177
- if a =~ Core::Check::MAILER_FILES
178
- mailers << a
179
- end
176
+ files.each do |a|
177
+ if a =~ Core::Check::MAILER_FILES
178
+ mailers << a
179
+ end
180
180
  end
181
- files.collect! do |a|
182
- if a =~ Core::Check::MAILER_FILES || a =~ Core::Check::MODEL_FILES
183
- #nil
184
- else
185
- a
186
- end
181
+ files.collect! do |a|
182
+ if a =~ Core::Check::MAILER_FILES || a =~ Core::Check::MODEL_FILES
183
+ #nil
184
+ else
185
+ a
186
+ end
187
187
  end
188
188
  files.compact!
189
189
  models.sort
@@ -174,8 +174,10 @@ module RailsBestPractices
174
174
  Dir[File.expand_path(File.join(plugins, "*.rb"))].each do |review|
175
175
  require review
176
176
  end
177
- RailsBestPractices::Plugins::Reviews.constants.each do |review|
178
- @reviews << RailsBestPractices::Plugins::Reviews.const_get(review).new
177
+ if RailsBestPractices.constants.include? :Plugins
178
+ RailsBestPractices::Plugins::Reviews.constants.each do |review|
179
+ @reviews << RailsBestPractices::Plugins::Reviews.const_get(review).new
180
+ end
179
181
  end
180
182
  end
181
183
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
  module RailsBestPractices
3
- VERSION = "0.10.0"
3
+ VERSION = "0.10.1"
4
4
  end
5
5
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rails_best_practices
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.10.0
5
+ version: 0.10.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Richard Huang
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-07-04 00:00:00 +08:00
13
+ date: 2011-07-16 00:00:00 +09:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -282,7 +282,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
282
282
  requirements:
283
283
  - - ">="
284
284
  - !ruby/object:Gem::Version
285
- hash: 25522351918325657
285
+ hash: -1121248838931870428
286
286
  segments:
287
287
  - 0
288
288
  version: "0"