rails_best_practices 0.5.5 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,8 +5,8 @@ require 'rails_best_practices/core'
5
5
  module RailsBestPractices
6
6
 
7
7
  class <<self
8
- def prepare_files
9
- expand_dirs_to_files 'app/models'
8
+ def prepare_files(dir = '.')
9
+ expand_dirs_to_files File.join(dir, 'app/models')
10
10
  end
11
11
 
12
12
  def analyze_files(dir = '.', options = {})
@@ -42,7 +42,7 @@ end
42
42
  runner = RailsBestPractices::Core::Runner.new
43
43
  runner.set_debug if options['debug']
44
44
 
45
- prepare_files = RailsBestPractices::prepare_files
45
+ prepare_files = RailsBestPractices::prepare_files(ARGV)
46
46
  files = RailsBestPractices::analyze_files(ARGV, options)
47
47
 
48
48
  if runner.checks.find { |check| check.is_a? RailsBestPractices::Checks::AlwaysAddDbIndexCheck } &&
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
  module RailsBestPractices
3
- VERSION = "0.5.5"
3
+ VERSION = "0.5.6"
4
4
  end
5
5
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_best_practices
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 7
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 5
10
- version: 0.5.5
9
+ - 6
10
+ version: 0.5.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Richard Huang
@@ -15,11 +15,11 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-13 00:00:00 +08:00
18
+ date: 2010-12-15 00:00:00 +08:00
19
19
  default_executable: rails_best_practices
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- version_requirements: &id001 !ruby/object:Gem::Requirement
22
+ requirement: &id001 !ruby/object:Gem::Requirement
23
23
  none: false
24
24
  requirements:
25
25
  - - ~>
@@ -30,28 +30,28 @@ dependencies:
30
30
  - 0
31
31
  - 4
32
32
  version: 2.0.4
33
- requirement: *id001
34
33
  name: ruby_parser
35
34
  prerelease: false
36
35
  type: :runtime
36
+ version_requirements: *id001
37
37
  - !ruby/object:Gem::Dependency
38
- version_requirements: &id002 !ruby/object:Gem::Requirement
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
42
42
  - !ruby/object:Gem::Version
43
- hash: 59
43
+ hash: 13
44
44
  segments:
45
45
  - 0
46
- - 9
47
46
  - 0
48
- version: 0.9.0
49
- requirement: *id002
50
- name: progressbar
47
+ - 9
48
+ version: 0.0.9
49
+ name: ruby-progressbar
51
50
  prerelease: false
52
51
  type: :runtime
52
+ version_requirements: *id002
53
53
  - !ruby/object:Gem::Dependency
54
- version_requirements: &id003 !ruby/object:Gem::Requirement
54
+ requirement: &id003 !ruby/object:Gem::Requirement
55
55
  none: false
56
56
  requirements:
57
57
  - - ~>
@@ -61,12 +61,12 @@ dependencies:
61
61
  - 1
62
62
  - 2
63
63
  version: "1.2"
64
- requirement: *id003
65
64
  name: colored
66
65
  prerelease: false
67
66
  type: :runtime
67
+ version_requirements: *id003
68
68
  - !ruby/object:Gem::Dependency
69
- version_requirements: &id004 !ruby/object:Gem::Requirement
69
+ requirement: &id004 !ruby/object:Gem::Requirement
70
70
  none: false
71
71
  requirements:
72
72
  - - ~>
@@ -77,12 +77,12 @@ dependencies:
77
77
  - 6
78
78
  - 6
79
79
  version: 2.6.6
80
- requirement: *id004
81
80
  name: erubis
82
81
  prerelease: false
83
82
  type: :runtime
83
+ version_requirements: *id004
84
84
  - !ruby/object:Gem::Dependency
85
- version_requirements: &id005 !ruby/object:Gem::Requirement
85
+ requirement: &id005 !ruby/object:Gem::Requirement
86
86
  none: false
87
87
  requirements:
88
88
  - - ">="
@@ -91,12 +91,12 @@ dependencies:
91
91
  segments:
92
92
  - 0
93
93
  version: "0"
94
- requirement: *id005
95
94
  name: i18n
96
95
  prerelease: false
97
96
  type: :runtime
97
+ version_requirements: *id005
98
98
  - !ruby/object:Gem::Dependency
99
- version_requirements: &id006 !ruby/object:Gem::Requirement
99
+ requirement: &id006 !ruby/object:Gem::Requirement
100
100
  none: false
101
101
  requirements:
102
102
  - - ">="
@@ -105,12 +105,12 @@ dependencies:
105
105
  segments:
106
106
  - 0
107
107
  version: "0"
108
- requirement: *id006
109
108
  name: activesupport
110
109
  prerelease: false
111
110
  type: :runtime
111
+ version_requirements: *id006
112
112
  - !ruby/object:Gem::Dependency
113
- version_requirements: &id007 !ruby/object:Gem::Requirement
113
+ requirement: &id007 !ruby/object:Gem::Requirement
114
114
  none: false
115
115
  requirements:
116
116
  - - ~>
@@ -121,12 +121,12 @@ dependencies:
121
121
  - 0
122
122
  - 1
123
123
  version: 2.0.1
124
- requirement: *id007
125
124
  name: rspec
126
125
  prerelease: false
127
126
  type: :development
127
+ version_requirements: *id007
128
128
  - !ruby/object:Gem::Dependency
129
- version_requirements: &id008 !ruby/object:Gem::Requirement
129
+ requirement: &id008 !ruby/object:Gem::Requirement
130
130
  none: false
131
131
  requirements:
132
132
  - - ~>
@@ -137,12 +137,12 @@ dependencies:
137
137
  - 0
138
138
  - 18
139
139
  version: 3.0.18
140
- requirement: *id008
141
140
  name: haml
142
141
  prerelease: false
143
142
  type: :development
143
+ version_requirements: *id008
144
144
  - !ruby/object:Gem::Dependency
145
- version_requirements: &id009 !ruby/object:Gem::Requirement
145
+ requirement: &id009 !ruby/object:Gem::Requirement
146
146
  none: false
147
147
  requirements:
148
148
  - - ~>
@@ -152,10 +152,10 @@ dependencies:
152
152
  - 0
153
153
  - 6
154
154
  version: "0.6"
155
- requirement: *id009
156
155
  name: watchr
157
156
  prerelease: false
158
157
  type: :development
158
+ version_requirements: *id009
159
159
  description: a code metric tool for rails codes, written in Ruby.
160
160
  email:
161
161
  - flyerhzm@gmail.com