monk 0.0.6 → 0.0.7
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 +8 -4
- data/monk.gemspec +1 -1
- data/test/monk_test.rb +8 -0
- data/test/test_helper.rb +1 -0
- metadata +5 -7
data/lib/monk.rb
CHANGED
@@ -6,10 +6,14 @@ require "yaml"
|
|
6
6
|
class Monk < Thor
|
7
7
|
include Thor::Actions
|
8
8
|
|
9
|
+
[:skip, :pretend, :force, :quiet].each do |task|
|
10
|
+
class_options.delete task
|
11
|
+
end
|
12
|
+
|
9
13
|
desc "init", "Initialize a Monk application"
|
10
14
|
method_option :skeleton, :type => :string, :aliases => "-s"
|
11
15
|
def init(target = ".")
|
12
|
-
clone(source(options[:skeleton] || "default"), target) ?
|
16
|
+
clone(source(options[:skeleton] || "default") || options[:skeleton], target) ?
|
13
17
|
cleanup(target) :
|
14
18
|
say_status(:error, clone_error(target))
|
15
19
|
end
|
@@ -64,13 +68,13 @@ private
|
|
64
68
|
def monk_config
|
65
69
|
@monk_config ||= begin
|
66
70
|
write_monk_config_file unless File.exists?(monk_config_file)
|
67
|
-
|
71
|
+
YAML.load_file(monk_config_file)
|
68
72
|
end
|
69
73
|
end
|
70
74
|
|
71
75
|
def write_monk_config_file
|
72
|
-
remove_file
|
73
|
-
create_file
|
76
|
+
remove_file(monk_config_file, :verbose => false)
|
77
|
+
create_file(monk_config_file, nil, :verbose => false) do
|
74
78
|
config = @monk_config || { "default" => "git://github.com/monkrb/skeleton.git" }
|
75
79
|
config.to_yaml
|
76
80
|
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.7"
|
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
@@ -24,6 +24,14 @@ class TestMonk < Test::Unit::TestCase
|
|
24
24
|
assert_match /initialized.* monk-test/, out
|
25
25
|
end
|
26
26
|
end
|
27
|
+
|
28
|
+
should "be able to pull from a url instead of a known skeleton" do
|
29
|
+
Dir.chdir(root("test", "tmp")) do
|
30
|
+
FileUtils.rm_rf "monk-test"
|
31
|
+
out, err = monk("init monk-test --skeleton git://github.com/monkrb/skeleton.git")
|
32
|
+
assert_match /initialized.* monk-test/, out
|
33
|
+
end
|
34
|
+
end
|
27
35
|
end
|
28
36
|
|
29
37
|
context "monk init" do
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: monk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Damian Janowski
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-09-
|
13
|
+
date: 2009-09-17 00:00:00 -03:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -54,10 +54,8 @@ files:
|
|
54
54
|
- test/integration_test.rb
|
55
55
|
- test/monk_test.rb
|
56
56
|
- test/test_helper.rb
|
57
|
-
has_rdoc:
|
57
|
+
has_rdoc: false
|
58
58
|
homepage: http://monkrb.com
|
59
|
-
licenses: []
|
60
|
-
|
61
59
|
post_install_message:
|
62
60
|
rdoc_options: []
|
63
61
|
|
@@ -78,9 +76,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
76
|
requirements:
|
79
77
|
- git
|
80
78
|
rubyforge_project: monk
|
81
|
-
rubygems_version: 1.3.
|
79
|
+
rubygems_version: 1.3.1
|
82
80
|
signing_key:
|
83
|
-
specification_version:
|
81
|
+
specification_version: 2
|
84
82
|
summary: Monk, the glue framework
|
85
83
|
test_files: []
|
86
84
|
|