monk 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/monk.rb +2 -2
- data/monk.gemspec +1 -1
- data/test/monk_test.rb +27 -1
- metadata +1 -1
data/lib/monk.rb
CHANGED
@@ -6,9 +6,9 @@ class Monk < Thor
|
|
6
6
|
include Thor::Actions
|
7
7
|
|
8
8
|
desc "init", "Initialize a Monk application"
|
9
|
-
|
9
|
+
method_option :skeleton, :type => :string, :aliases => "-s"
|
10
10
|
def init(target = ".")
|
11
|
-
clone(source(options[:
|
11
|
+
clone(source(options[:skeleton] || "default"), target) ?
|
12
12
|
cleanup(target) :
|
13
13
|
say_status(:error, clone_error(target))
|
14
14
|
end
|
data/monk.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "monk"
|
3
|
-
s.version = "0.0.
|
3
|
+
s.version = "0.0.5"
|
4
4
|
s.summary = "Monk, the glue framework"
|
5
5
|
s.description = "Monk is a glue framework for web development. It means that instead of installing all the tools you need for your projects, you can rely on a git repository and a list of dependencies, and Monk will care of the rest. By default, it ships with a Sinatra application that includes Contest, Stories, Webrat, Ohm and some other niceties, along with a structure and helpful documentation to get your hands wet in no time."
|
6
6
|
s.authors = ["Damian Janowski", "Michel Martens"]
|
data/test/monk_test.rb
CHANGED
@@ -79,7 +79,7 @@ class TestMonk < Test::Unit::TestCase
|
|
79
79
|
monk("add foobar git://github.com/monkrb/skeleton.git")
|
80
80
|
|
81
81
|
Dir.chdir("monk-test") do
|
82
|
-
out, err = monk("init -s
|
82
|
+
out, err = monk("init -s foobar")
|
83
83
|
assert_match /initialized/, out
|
84
84
|
end
|
85
85
|
end
|
@@ -114,6 +114,32 @@ class TestMonk < Test::Unit::TestCase
|
|
114
114
|
assert out["git://github.com/monkrb/foo.git"]
|
115
115
|
monk("rm foobar")
|
116
116
|
end
|
117
|
+
|
118
|
+
should "allow to fetch from the added repository when using the skeleton parameter" do
|
119
|
+
monk("add glue git://github.com/monkrb/glue.git")
|
120
|
+
|
121
|
+
Dir.chdir(root("test", "tmp")) do
|
122
|
+
FileUtils.rm_rf("monk-test")
|
123
|
+
FileUtils.mkdir("monk-test")
|
124
|
+
|
125
|
+
out, err = monk("init monk-test --skeleton glue")
|
126
|
+
assert_match /initialized/, out
|
127
|
+
assert_match /glue.git/, out
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
should "allow to fetch from the added repository when using the s parameter" do
|
132
|
+
monk("add glue git://github.com/monkrb/glue.git")
|
133
|
+
|
134
|
+
Dir.chdir(root("test", "tmp")) do
|
135
|
+
FileUtils.rm_rf("monk-test")
|
136
|
+
FileUtils.mkdir("monk-test")
|
137
|
+
|
138
|
+
out, err = monk("init monk-test -s glue")
|
139
|
+
assert_match /initialized/, out
|
140
|
+
assert_match /glue.git/, out
|
141
|
+
end
|
142
|
+
end
|
117
143
|
end
|
118
144
|
|
119
145
|
context "monk rm NAME" do
|