rails_best_practices 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.6
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rails_best_practices}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Richard Huang"]
|
12
|
-
s.date = %q{2009-11-
|
12
|
+
s.date = %q{2009-11-23}
|
13
13
|
s.default_executable = %q{rails_best_practices}
|
14
14
|
s.description = %q{check rails files according to ihower's presentation 'rails best practices'}
|
15
15
|
s.email = %q{flyerhzm@gmail.com}
|
@@ -177,4 +177,20 @@ describe RailsBestPractices::Checks::AlwaysAddDbIndexCheck do
|
|
177
177
|
@runner.check('db/migrate/20091111113612_add_indexes.rb', content)
|
178
178
|
errors = @runner.errors
|
179
179
|
end
|
180
|
+
|
181
|
+
it "should always add db index without error 2" do
|
182
|
+
content = <<-EOF
|
183
|
+
class MoveCategoriesToProfileArea < ActiveRecord::Migration
|
184
|
+
def self.up
|
185
|
+
CategoryArea.update_all({:name => "Profile"}, ["name IN (?)", %w(UserSite UserProfile Site)])
|
186
|
+
end
|
187
|
+
|
188
|
+
def self.down
|
189
|
+
end
|
190
|
+
end
|
191
|
+
EOF
|
192
|
+
@runner.check('db/migrate/20090706091635_move_categories_to_profile_area.rb', content)
|
193
|
+
@runner.check('db/migrate/20090706091635_move_categories_to_profile_area.rb', content)
|
194
|
+
errors = @runner.errors
|
195
|
+
end
|
180
196
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_best_practices
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Huang
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-11-
|
12
|
+
date: 2009-11-23 00:00:00 +08:00
|
13
13
|
default_executable: rails_best_practices
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|