redrum 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/redrum +2 -0
- data/features/create_folder_skeleton.feature +10 -0
- data/lib/redrum.rb +5 -0
- data/lib/redrum/redrum.rb +11 -0
- data/lib/redrum/skeleton.rb +10 -0
- data/spec/redrum/redrum_spec.rb +19 -0
- data/spec/redrum/skeleton_spec.rb +19 -0
- data/spec/spec_helper.rb +1 -0
- metadata +30 -10
data/bin/redrum
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
Feature: Create a skeleton redrum project
|
2
|
+
In order to quickly set up a barebones redrum project
|
3
|
+
As a web designer
|
4
|
+
I want to quickly create a skeleton redrum project with a simple command
|
5
|
+
|
6
|
+
Scenario: Create skeleton directory structure
|
7
|
+
Given there is no existing directory at the target directory
|
8
|
+
When I create a new redrum project at the target directory
|
9
|
+
Then it should create the skeleton directory structure under the target directory
|
10
|
+
|
data/lib/redrum.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require File.expand_path("../../spec_helper", __FILE__)
|
2
|
+
|
3
|
+
describe Redrum do
|
4
|
+
before { @target = "temp" }
|
5
|
+
|
6
|
+
describe "#self.make" do
|
7
|
+
it "wraps the Redrum::Skeleton.new call" do
|
8
|
+
Redrum::Skeleton.should_receive(:new).with(@target)
|
9
|
+
Redrum.make(@target)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "#self.folder_structure" do
|
14
|
+
it "returns an array with the folder structure" do
|
15
|
+
Redrum.folder_structure.should be_a_kind_of(Array)
|
16
|
+
Redrum.folder_structure.should include("public", "haml", "public/css")
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require File.expand_path("../../spec_helper", __FILE__)
|
2
|
+
|
3
|
+
describe Redrum::Skeleton do
|
4
|
+
before { @target = "temp" }
|
5
|
+
|
6
|
+
context "#new" do
|
7
|
+
it "creates a new project folder at the target" do
|
8
|
+
Dir.as_null_object.should_receive(:mkdir).with(@target)
|
9
|
+
Redrum::Skeleton.new(@target)
|
10
|
+
end
|
11
|
+
|
12
|
+
it "creates haml, public, public/css, public/img and public/js folders inside the project folder" do
|
13
|
+
Redrum.folder_structure.each do |dir|
|
14
|
+
Dir.as_null_object.should_receive(:mkdir).with(@target + "/" + dir)
|
15
|
+
end
|
16
|
+
Redrum::Skeleton.new(@target)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require File.expand_path( "../../lib/redrum", __FILE__ )
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redrum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
- 0
|
9
8
|
- 1
|
10
|
-
|
9
|
+
- 0
|
10
|
+
version: 0.1.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- !binary |
|
@@ -17,20 +17,40 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2010-
|
20
|
+
date: 2010-10-26 00:00:00 +02:00
|
21
21
|
default_executable:
|
22
|
-
dependencies:
|
23
|
-
|
22
|
+
dependencies:
|
23
|
+
- !ruby/object:Gem::Dependency
|
24
|
+
name: haml
|
25
|
+
prerelease: false
|
26
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
28
|
+
requirements:
|
29
|
+
- - ">="
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
hash: 3
|
32
|
+
segments:
|
33
|
+
- 0
|
34
|
+
version: "0"
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
24
37
|
description: Create static websites with a little help from redrum!
|
25
38
|
email: darkoem@gmail.com
|
26
|
-
executables:
|
27
|
-
|
39
|
+
executables:
|
40
|
+
- redrum
|
28
41
|
extensions: []
|
29
42
|
|
30
43
|
extra_rdoc_files: []
|
31
44
|
|
32
|
-
files:
|
33
|
-
|
45
|
+
files:
|
46
|
+
- lib/redrum/redrum.rb
|
47
|
+
- lib/redrum/skeleton.rb
|
48
|
+
- lib/redrum.rb
|
49
|
+
- spec/redrum/redrum_spec.rb
|
50
|
+
- spec/redrum/skeleton_spec.rb
|
51
|
+
- spec/spec_helper.rb
|
52
|
+
- bin/redrum
|
53
|
+
- features/create_folder_skeleton.feature
|
34
54
|
has_rdoc: true
|
35
55
|
homepage: http://darkno.de
|
36
56
|
licenses: []
|