Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

right place for the rails' rake task

  • Loading branch information...
commit ad2617a869ac2be8ed07485f407044c9eccd8ab6 1 parent 3fae618
@nicooga authored
View
2  Rakefile
@@ -140,7 +140,7 @@ desc "Validate #{gemspec_file}"
task :validate do
libfiles = Dir['lib/*'] - ["lib/#{name}.rb", "lib/#{name}"]
unless libfiles.empty?
- puts "Directory `lib` should only contain a `#{name}.rb` file and `#{name}` dir."
+ puts "Directory `lib` should only contain a `#{name}.rb` file and a `#{name}` dir."
exit!
end
unless Dir['VERSION*'].empty?
View
4 color_routes.gemspec
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
s.require_paths = %w[lib]
s.rdoc_options = ["--charset=UTF-8"]
- s.extra_rdoc_files = %w[README.md LICENSE tasks]
+ s.extra_rdoc_files = %w[README.md LICENSE]
# = MANIFEST =
s.files = %w[
@@ -27,6 +27,8 @@ Gem::Specification.new do |s|
Rakefile
color_routes.gemspec
lib/color_routes.rb
+ lib/color_routes/rails/tasks/color_routes.rake
+ lib/color_routes/string_ansi.rb
]
# = MANIFEST =
end
View
10 lib/color_routes.rb
@@ -1,3 +1,11 @@
module ColorRoutes
VERSION="0.0.1"
-end
+
+ module Rails
+ class Railtie < ::Rails::Railtie
+ rake_tasks do
+ load "color_routes/rails/tasks/color_routes.rake"
+ end
+ end
+ end
+end
View
0  tasks/color_routes.rake → ...olor_routes/rails/tasks/color_routes.rake
File renamed without changes
View
2  lib/color_routes/string_ansi.rb
@@ -1,7 +1,7 @@
module ColorRoutes
# Some extensions to String to deal with ANSI colors.
- class StringANSI
+ module StringANSI
COLORS = {
:black => 30,
Please sign in to comment.
Something went wrong with that request. Please try again.