Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Call the default namespace Default.

  • Loading branch information...
commit 6976fd3303480c6440327af4f50faf26a211835e 1 parent e08494f
@nex3 nex3 authored
Showing with 8 additions and 8 deletions.
  1. +2 −2 Thorfile
  2. +2 −2 bin/thor
  3. +4 −4 spec/thor_runner_spec.rb
View
4 Thorfile
@@ -29,7 +29,7 @@ SPEC = Gem::Specification.new do |s|
s.files = %w(LICENSE README.markdown Rakefile) + Dir.glob("{bin,lib,specs}/**/*")
end
-class Meta < Thor
+class Default < Thor
# Set up standard Thortasks
spec_task(Dir["spec/**/*_spec.rb"])
spec_task(Dir["spec/**/*_spec.rb"], :name => "rcov", :rcov =>
@@ -42,4 +42,4 @@ class Meta < Thor
file.puts SPEC.to_ruby
end
end
-end
+end
View
4 bin/thor
@@ -26,7 +26,7 @@ class Thor::Util
# @public
def self.constant_to_thor_path(str)
- snake_case(str).squeeze(":").gsub(/^meta/, '')
+ snake_case(str).squeeze(":").gsub(/^default/, '')
end
# @public
@@ -35,7 +35,7 @@ class Thor::Util
end
def self.to_constant(str)
- str = 'meta' if str.empty?
+ str = 'default' if str.empty?
str.gsub(/:(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase }
end
View
8 spec/thor_runner_spec.rb
@@ -37,7 +37,7 @@ def foo
end
end
-class Meta < Thor
+class Default < Thor
desc "test", "prints 'test'"
def test
puts "test"
@@ -66,7 +66,7 @@ class ThorTask2 < Thor
describe Thor do
it "tracks its subclasses, grouped by the files they come from" do
- Thor.subclass_files[File.expand_path(__FILE__)].must == [MyTasks::ThorTask, Meta, Amazing, ThorTask2]
+ Thor.subclass_files[File.expand_path(__FILE__)].must == [MyTasks::ThorTask, Default, Amazing, ThorTask2]
end
it "tracks a single subclass across multiple files" do
@@ -102,12 +102,12 @@ class ThorTask2 < Thor
stdout_from { Thor::Runner.start }.must =~ /There was no available namespace `hello'/
end
-# it "presents tasks in the meta namespace with an empty namespace" do
+# it "presents tasks in the default namespace with an empty namespace" do
# ARGV.replace ["list"]
# stdout_from { Thor::Runner.start }.must =~ /^:test +prints 'test'/
# end
-# it "runs tasks with an empty namespace from the meta namespace" do
+# it "runs tasks with an empty namespace from the default namespace" do
# ARGV.replace [":test"]
# stdout_from { Thor::Runner.start }.must == "test\n"
# end
Please sign in to comment.
Something went wrong with that request. Please try again.