classicCMS 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/classiccms/cli.rb +1 -1
- data/lib/classiccms/version.rb +1 -1
- data/spec/cli_spec.rb +17 -1
- metadata +1 -1
data/lib/classiccms/cli.rb
CHANGED
@@ -11,7 +11,7 @@ module ClassicCMS
|
|
11
11
|
puts 'hmm I think that app already exists!'
|
12
12
|
else
|
13
13
|
app_name = arguments[1]
|
14
|
-
FileUtils.cp_r File.dirname(__FILE__), Dir.pwd + "/#{app_name}"
|
14
|
+
FileUtils.cp_r File.dirname(__FILE__) + '/scaffold', Dir.pwd + "/#{app_name}"
|
15
15
|
|
16
16
|
puts "#{app_name} created!"
|
17
17
|
end
|
data/lib/classiccms/version.rb
CHANGED
data/spec/cli_spec.rb
CHANGED
@@ -34,7 +34,7 @@ describe 'Base' do
|
|
34
34
|
$stdout.string.should == "#{app_name} created!\n"
|
35
35
|
end
|
36
36
|
end
|
37
|
-
it "should
|
37
|
+
it "should create a directory with app name" do
|
38
38
|
capture_log do
|
39
39
|
app_name = 'app'
|
40
40
|
ClassicCMS::Cli.command ['new', app_name]
|
@@ -42,6 +42,22 @@ describe 'Base' do
|
|
42
42
|
File.directory?(app_name).should == true
|
43
43
|
end
|
44
44
|
end
|
45
|
+
it "should create public directory" do
|
46
|
+
capture_log do
|
47
|
+
app_name = 'app'
|
48
|
+
ClassicCMS::Cli.command ['new', app_name]
|
49
|
+
|
50
|
+
File.directory?(app_name + '/public').should == true
|
51
|
+
end
|
52
|
+
end
|
53
|
+
it "should create views directory" do
|
54
|
+
capture_log do
|
55
|
+
app_name = 'app'
|
56
|
+
ClassicCMS::Cli.command ['new', app_name]
|
57
|
+
|
58
|
+
File.directory?(app_name + '/views').should == true
|
59
|
+
end
|
60
|
+
end
|
45
61
|
|
46
62
|
it "should display message that server is starting" do
|
47
63
|
capture_log do
|