Skip to content

Instantly share code, notes, and snippets.

View marcoow's full-sized avatar
🙈
🙉🙊

Marco Otte-Witte marcoow

🙈
🙉🙊
View GitHub Profile
+----------------------+-------+-------+---------+---------+-----+-------+
| Name | Lines | LOC | Classes | Methods | M/C | LOC/M |
+----------------------+-------+-------+---------+---------+-----+-------+
| Controllers | 143 | 117 | 6 | 13 | 2 | 7 |
| Helpers | 33 | 20 | 0 | 2 | 0 | 8 |
| Models | 691 | 421 | 16 | 38 | 2 | 9 |
| Libraries | 764 | 463 | 10 | 63 | 6 | 5 |
| Model specs | 1237 | 864 | 0 | 5 | 0 | 170 |
| View specs | 0 | 0 | 0 | 0 | 0 | 0 |
| Controller specs | 974 | 661 | 0 | 13 | 0 | 48 |
+----------------------+-------+-------+---------+---------+-----+-------+
| Name | Lines | LOC | Classes | Methods | M/C | LOC/M |
+----------------------+-------+-------+---------+---------+-----+-------+
| Controllers | 179 | 147 | 6 | 17 | 2 | 6 |
| Helpers | 34 | 20 | 0 | 2 | 0 | 8 |
| Models | 697 | 424 | 16 | 39 | 2 | 8 |
| Libraries | 764 | 463 | 10 | 63 | 6 | 5 |
| Model specs | 1237 | 864 | 0 | 5 | 0 | 170 |
| Controller specs | 1117 | 760 | 0 | 14 | 0 | 52 |
| Library specs | 459 | 314 | 2 | 1 | 0 | 312 |
Code LOC: 1394 Test LOC: 3340 Code to Test Ratio: 1:2.4
...
700 examples, 0 failures, 1 pending
...
Total coverage: 95.3%
require 'simplabs/excellent/rake'
desc 'Analyse the source with excellent.'
Simplabs::Excellent::Rake::ExcellentTask.new(:excellent) do |t|
t.paths = %w(app lib)
end
require 'rubygems'
require 'spork'
ENV['RAILS_ENV'] = 'test'
Spork.prefork do
require File.dirname(__FILE__) + "/../config/environment"
require 'spec/autorun'
require 'spec/rails'
app/views/service_mails/_common_form_elements.html.erb
* Line 2: Instance variable possible_senders used in partial.
def require_all(dir, &block)
Dir[File.join(dir, '**', '*.rb')].each do |path|
begin
require path
rescue => e
yield path
end
end
end
# Good:
class Post
belongs_to :author, :class_name => User.to_s # ActiveRecord
belongs_to :author, User.to_s # DataMapper
has_many :replies, :class_name => Comment.to_s # ActiveRecord
has n, :replies, Comment.to_s # DataMapper
+----------------------+-------+-------+---------+---------+-----+-------+
| Name | Lines | LOC | Classes | Methods | M/C | LOC/M |
+----------------------+-------+-------+---------+---------+-----+-------+
| Controllers | 731 | 635 | 16 | 59 | 3 | 8 |
| Helpers | 82 | 46 | 0 | 6 | 0 | 5 |
| Models | 1902 | 975 | 32 | 103 | 3 | 7 |
| Libraries | 1487 | 872 | 19 | 110 | 5 | 5 |
| Model specs | 3681 | 2554 | 0 | 37 | 0 | 67 |
| Controller specs | 4777 | 3271 | 0 | 56 | 0 | 56 |
| Helper specs | 141 | 89 | 1 | 0 | 0 | 0 |
@marcoow
marcoow / gist:260100
Created December 19, 2009 14:39
Gemfile
bundle_path 'vendor/gems'
disable_system_gems
gem 'rails', '>= 2.3.5'
gem 'do_mysql', '= 0.10.0', :require_as => false
gem 'dm-core', '= 0.10.1'
gem 'dm-migrations', '= 0.10.1'
gem 'dm-validations', '= 0.10.1'
gem 'dm-types', '= 0.10.1'