Skip to content

Commit 773b7da

Browse files
committed
switch to rake
1 parent b811bde commit 773b7da

File tree

7 files changed

+11
-28
lines changed

7 files changed

+11
-28
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
See stuff about a Rails app.
44

55
```bash
6-
$ bundle exec thor stats:calculate ~/path/to/app/
6+
$ bundle exec rake:stats[~/path/to/app/]
77

8-
Directory: ~/path/to/app/
8+
Directory: /users/me/path/to/app/
99

1010
+----------------------+-------+-------+---------+---------+-----+-------+
1111
| Name | Lines | LOC | Classes | Methods | M/C | LOC/M |
@@ -48,4 +48,3 @@ Directory: ~/path/to/app/
4848
* Output other metrics like number of tables and columns
4949
* Test unit support
5050
* Different output formatters
51-
* Switch to Rake?

Rakefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1-
require "bundler/gem_tasks"
1+
require "rails_stats"
22

3+
desc "Calculates the statistsics for a given Rails project"
4+
task :stats, [:path] do |t, args|
5+
root_directory = args[:path]
6+
puts "\nDirectory: #{File.absolute_path(root_directory)}\n\n"
7+
RailsStats::CodeStatistics.new(root_directory).to_s
8+
end

lib/rails_stats.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,3 @@ module RailsStats
1515
require 'rails_stats/root_statistics'
1616
require 'rails_stats/gem_statistics'
1717
require 'rails_stats/code_statistics'
18-
19-
require "rails_stats/rake"
20-
RailsStats.extend RailsStats::Rake

lib/rails_stats/rake.rb

Lines changed: 0 additions & 10 deletions
This file was deleted.

lib/rails_stats/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module RailsStats
2-
VERSION = "0.0.4"
2+
VERSION = "0.0.5"
33
end

rails_stats.gemspec

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ Gem::Specification.new do |spec|
1818
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
1919
spec.require_paths = ["lib"]
2020

21-
spec.add_dependency "thor"
21+
spec.add_dependency "rake"
2222
spec.add_development_dependency "bundler", "~> 1.6"
23-
spec.add_development_dependency "rake"
2423
end

stats.thor

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)