silk 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +32 -1
- data/VERSION +1 -1
- data/lib/silk.rb +1 -0
- data/lib/silk/application.rb +15 -0
- data/silk.gemspec +5 -4
- metadata +46 -16
data/README.rdoc
CHANGED
@@ -56,7 +56,38 @@ NOTE: The idea is you write your own rake task to do stuff, and then interface t
|
|
56
56
|
|
57
57
|
By default it runs on port 8888 and will probably need to be run as root to make sure you can do all the stuff you need to do.
|
58
58
|
|
59
|
-
Eventually it'll support SSL certificates etc, but until then, I suggest you either use SSH tunnels, and/or (at the very least) lock down via a firewall.
|
59
|
+
Eventually it'll support SSL certificates etc, but until then, I suggest you either use SSH tunnels, and/or (at the very least) lock down via a firewall.
|
60
|
+
|
61
|
+
== Racking it up
|
62
|
+
|
63
|
+
You can run Silk as a Rack app, which will allow you to run Silk in Passenger, or other Rack-compatible servers.
|
64
|
+
|
65
|
+
First, create a Gemfile
|
66
|
+
|
67
|
+
gem 'silk', :version => '>= 0.6'
|
68
|
+
|
69
|
+
then run
|
70
|
+
|
71
|
+
bundle install
|
72
|
+
|
73
|
+
At the moment, you have to create an empty Rakefile
|
74
|
+
|
75
|
+
touch Rakefile
|
76
|
+
|
77
|
+
Here is a sample config.ru file
|
78
|
+
|
79
|
+
require 'rubygems'
|
80
|
+
require 'bundler'
|
81
|
+
Bundler.require
|
82
|
+
|
83
|
+
Silk.options = { :recipe_paths => [ File.join(File.dirname(__FILE__), 'recipes') ] }
|
84
|
+
run Silk::Application
|
85
|
+
|
86
|
+
Then to test you can run rackup
|
87
|
+
|
88
|
+
rackup ./config.ru
|
89
|
+
|
90
|
+
Put your .rake files in the recipes directory, and you can hit the rackup test server on port 9292
|
60
91
|
|
61
92
|
== Testing your recipes
|
62
93
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.6
|
data/lib/silk.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
module Silk
|
2
|
+
class Application < Silk::Server
|
3
|
+
set :logging, Proc.new { ! test? }
|
4
|
+
set :method_override, true
|
5
|
+
set :run, Proc.new { ! test? }
|
6
|
+
set :session_secret, Proc.new { super() unless development? }
|
7
|
+
set :app_file, nil
|
8
|
+
|
9
|
+
def self.register(*extensions, &block) #:nodoc:
|
10
|
+
added_methods = extensions.map {|m| m.public_instance_methods }.flatten
|
11
|
+
Sinatra::Delegator.delegate(*added_methods)
|
12
|
+
super(*extensions, &block)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/silk.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{silk}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Myles Eftos"]
|
12
|
-
s.date = %q{2011-07-
|
12
|
+
s.date = %q{2011-07-31}
|
13
13
|
s.default_executable = %q{silk}
|
14
14
|
s.description = %q{It allows you to write rake tasks to do common tasks, such as creating email addresses, adding users etc. Silk provides a HTTP wrapper the the rake tasks, and allows communication via JSON objects, which makes it dead easy for them to be called from a web app.}
|
15
15
|
s.email = %q{myles@madpilot.com.au}
|
@@ -29,6 +29,7 @@ Gem::Specification.new do |s|
|
|
29
29
|
"bin/silk",
|
30
30
|
"install.rb",
|
31
31
|
"lib/silk.rb",
|
32
|
+
"lib/silk/application.rb",
|
32
33
|
"lib/silk/dsl.rake",
|
33
34
|
"lib/silk/exceptions/task_not_found.rb",
|
34
35
|
"lib/silk/options.rb",
|
@@ -50,14 +51,14 @@ Gem::Specification.new do |s|
|
|
50
51
|
]
|
51
52
|
s.homepage = %q{http://github.com/madpilot/silk}
|
52
53
|
s.require_paths = ["lib"]
|
53
|
-
s.rubygems_version = %q{1.3.
|
54
|
+
s.rubygems_version = %q{1.3.7}
|
54
55
|
s.summary = %q{A framework for creating a hosting console}
|
55
56
|
|
56
57
|
if s.respond_to? :specification_version then
|
57
58
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
58
59
|
s.specification_version = 3
|
59
60
|
|
60
|
-
if Gem::Version.new(Gem::
|
61
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
61
62
|
s.add_runtime_dependency(%q<daemons>, [">= 0"])
|
62
63
|
s.add_runtime_dependency(%q<json>, [">= 0"])
|
63
64
|
s.add_runtime_dependency(%q<sinatra>, [">= 0"])
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: silk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 19
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Myles Eftos
|
@@ -14,159 +15,183 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2011-07-
|
18
|
+
date: 2011-07-31 00:00:00 +08:00
|
18
19
|
default_executable: silk
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
23
|
+
none: false
|
22
24
|
requirements:
|
23
25
|
- - ">="
|
24
26
|
- !ruby/object:Gem::Version
|
27
|
+
hash: 3
|
25
28
|
segments:
|
26
29
|
- 0
|
27
30
|
version: "0"
|
28
31
|
requirement: *id001
|
29
|
-
name: daemons
|
30
32
|
prerelease: false
|
31
33
|
type: :runtime
|
34
|
+
name: daemons
|
32
35
|
- !ruby/object:Gem::Dependency
|
33
36
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
37
|
+
none: false
|
34
38
|
requirements:
|
35
39
|
- - ">="
|
36
40
|
- !ruby/object:Gem::Version
|
41
|
+
hash: 3
|
37
42
|
segments:
|
38
43
|
- 0
|
39
44
|
version: "0"
|
40
45
|
requirement: *id002
|
41
|
-
name: json
|
42
46
|
prerelease: false
|
43
47
|
type: :runtime
|
48
|
+
name: json
|
44
49
|
- !ruby/object:Gem::Dependency
|
45
50
|
version_requirements: &id003 !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
46
52
|
requirements:
|
47
53
|
- - ">="
|
48
54
|
- !ruby/object:Gem::Version
|
55
|
+
hash: 3
|
49
56
|
segments:
|
50
57
|
- 0
|
51
58
|
version: "0"
|
52
59
|
requirement: *id003
|
53
|
-
name: sinatra
|
54
60
|
prerelease: false
|
55
61
|
type: :runtime
|
62
|
+
name: sinatra
|
56
63
|
- !ruby/object:Gem::Dependency
|
57
64
|
version_requirements: &id004 !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
58
66
|
requirements:
|
59
67
|
- - ">="
|
60
68
|
- !ruby/object:Gem::Version
|
69
|
+
hash: 3
|
61
70
|
segments:
|
62
71
|
- 0
|
63
72
|
version: "0"
|
64
73
|
requirement: *id004
|
65
|
-
name: SyslogLogger
|
66
74
|
prerelease: false
|
67
75
|
type: :runtime
|
76
|
+
name: SyslogLogger
|
68
77
|
- !ruby/object:Gem::Dependency
|
69
78
|
version_requirements: &id005 !ruby/object:Gem::Requirement
|
79
|
+
none: false
|
70
80
|
requirements:
|
71
81
|
- - ">="
|
72
82
|
- !ruby/object:Gem::Version
|
83
|
+
hash: 3
|
73
84
|
segments:
|
74
85
|
- 0
|
75
86
|
version: "0"
|
76
87
|
requirement: *id005
|
77
|
-
name: rdoc
|
78
88
|
prerelease: false
|
79
89
|
type: :runtime
|
90
|
+
name: rdoc
|
80
91
|
- !ruby/object:Gem::Dependency
|
81
92
|
version_requirements: &id006 !ruby/object:Gem::Requirement
|
93
|
+
none: false
|
82
94
|
requirements:
|
83
95
|
- - ">="
|
84
96
|
- !ruby/object:Gem::Version
|
97
|
+
hash: 3
|
85
98
|
segments:
|
86
99
|
- 0
|
87
100
|
version: "0"
|
88
101
|
requirement: *id006
|
89
|
-
name: shoulda
|
90
102
|
prerelease: false
|
91
103
|
type: :development
|
104
|
+
name: shoulda
|
92
105
|
- !ruby/object:Gem::Dependency
|
93
106
|
version_requirements: &id007 !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
94
108
|
requirements:
|
95
109
|
- - ">="
|
96
110
|
- !ruby/object:Gem::Version
|
111
|
+
hash: 3
|
97
112
|
segments:
|
98
113
|
- 0
|
99
114
|
version: "0"
|
100
115
|
requirement: *id007
|
101
|
-
name: mocha
|
102
116
|
prerelease: false
|
103
117
|
type: :development
|
118
|
+
name: mocha
|
104
119
|
- !ruby/object:Gem::Dependency
|
105
120
|
version_requirements: &id008 !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
106
122
|
requirements:
|
107
123
|
- - ~>
|
108
124
|
- !ruby/object:Gem::Version
|
125
|
+
hash: 23
|
109
126
|
segments:
|
110
127
|
- 1
|
111
128
|
- 0
|
112
129
|
- 0
|
113
130
|
version: 1.0.0
|
114
131
|
requirement: *id008
|
115
|
-
name: bundler
|
116
132
|
prerelease: false
|
117
133
|
type: :development
|
134
|
+
name: bundler
|
118
135
|
- !ruby/object:Gem::Dependency
|
119
136
|
version_requirements: &id009 !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
120
138
|
requirements:
|
121
139
|
- - ~>
|
122
140
|
- !ruby/object:Gem::Version
|
141
|
+
hash: 7
|
123
142
|
segments:
|
124
143
|
- 1
|
125
144
|
- 6
|
126
145
|
- 4
|
127
146
|
version: 1.6.4
|
128
147
|
requirement: *id009
|
129
|
-
name: jeweler
|
130
148
|
prerelease: false
|
131
149
|
type: :development
|
150
|
+
name: jeweler
|
132
151
|
- !ruby/object:Gem::Dependency
|
133
152
|
version_requirements: &id010 !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
134
154
|
requirements:
|
135
155
|
- - ">="
|
136
156
|
- !ruby/object:Gem::Version
|
157
|
+
hash: 3
|
137
158
|
segments:
|
138
159
|
- 0
|
139
160
|
version: "0"
|
140
161
|
requirement: *id010
|
141
|
-
name: rcov
|
142
162
|
prerelease: false
|
143
163
|
type: :development
|
164
|
+
name: rcov
|
144
165
|
- !ruby/object:Gem::Dependency
|
145
166
|
version_requirements: &id011 !ruby/object:Gem::Requirement
|
167
|
+
none: false
|
146
168
|
requirements:
|
147
169
|
- - ">="
|
148
170
|
- !ruby/object:Gem::Version
|
171
|
+
hash: 3
|
149
172
|
segments:
|
150
173
|
- 0
|
151
174
|
version: "0"
|
152
175
|
requirement: *id011
|
153
|
-
name: rack-test
|
154
176
|
prerelease: false
|
155
177
|
type: :development
|
178
|
+
name: rack-test
|
156
179
|
- !ruby/object:Gem::Dependency
|
157
180
|
version_requirements: &id012 !ruby/object:Gem::Requirement
|
181
|
+
none: false
|
158
182
|
requirements:
|
159
183
|
- - "="
|
160
184
|
- !ruby/object:Gem::Version
|
185
|
+
hash: 27
|
161
186
|
segments:
|
162
187
|
- 1
|
163
188
|
- 2
|
164
189
|
- 2
|
165
190
|
version: 1.2.2
|
166
191
|
requirement: *id012
|
167
|
-
name: redgreen
|
168
192
|
prerelease: false
|
169
193
|
type: :development
|
194
|
+
name: redgreen
|
170
195
|
description: It allows you to write rake tasks to do common tasks, such as creating email addresses, adding users etc. Silk provides a HTTP wrapper the the rake tasks, and allows communication via JSON objects, which makes it dead easy for them to be called from a web app.
|
171
196
|
email: myles@madpilot.com.au
|
172
197
|
executables:
|
@@ -187,6 +212,7 @@ files:
|
|
187
212
|
- bin/silk
|
188
213
|
- install.rb
|
189
214
|
- lib/silk.rb
|
215
|
+
- lib/silk/application.rb
|
190
216
|
- lib/silk/dsl.rake
|
191
217
|
- lib/silk/exceptions/task_not_found.rb
|
192
218
|
- lib/silk/options.rb
|
@@ -215,23 +241,27 @@ rdoc_options: []
|
|
215
241
|
require_paths:
|
216
242
|
- lib
|
217
243
|
required_ruby_version: !ruby/object:Gem::Requirement
|
244
|
+
none: false
|
218
245
|
requirements:
|
219
246
|
- - ">="
|
220
247
|
- !ruby/object:Gem::Version
|
248
|
+
hash: 3
|
221
249
|
segments:
|
222
250
|
- 0
|
223
251
|
version: "0"
|
224
252
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
253
|
+
none: false
|
225
254
|
requirements:
|
226
255
|
- - ">="
|
227
256
|
- !ruby/object:Gem::Version
|
257
|
+
hash: 3
|
228
258
|
segments:
|
229
259
|
- 0
|
230
260
|
version: "0"
|
231
261
|
requirements: []
|
232
262
|
|
233
263
|
rubyforge_project:
|
234
|
-
rubygems_version: 1.3.
|
264
|
+
rubygems_version: 1.3.7
|
235
265
|
signing_key:
|
236
266
|
specification_version: 3
|
237
267
|
summary: A framework for creating a hosting console
|