mushin 0.0.0.pre60 → 0.0.0.pre61
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.
- checksums.yaml +4 -4
- data/bin/mushin +67 -44
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 947c72bf020042e9ab6cc92ffd34c653c3a97f6f
|
4
|
+
data.tar.gz: 811e54b52173e0b8334e503a1096d1066624a957
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b10f5073163023e599ef401fd932c91c6b0e2bdb57ad3cf591ee6c2eadb997bf65b2ea129759d131c6d612f7b9b271cb7881022b839b21dabda8a57b016699d
|
7
|
+
data.tar.gz: 211e0c3758039808e5e6c8fcfc5b9c56a6df0215abfd281a377d2a8fa94fe475587dc0c6a7100ac213e45a20e95849913d5ca20fc1178be58bd594e649294849
|
data/bin/mushin
CHANGED
@@ -1,20 +1,22 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
require 'find'
|
2
3
|
require 'fileutils'
|
3
4
|
require 'optparse'
|
4
5
|
|
5
6
|
subtext = <<HELP
|
7
|
+
_ _
|
8
|
+
_ __ ___ _ _ ___| |__ (_)_ __
|
9
|
+
| '_ ` _ \\| | | / __| '_ \\| | '_ \\
|
10
|
+
| | | | | | |_| \\__ \\ | | | | | | |
|
11
|
+
|_| |_| |_|\\__,_|___/_| |_|_|_| |_|
|
6
12
|
|
7
|
-
_ _
|
8
|
-
_ __ ___ _ _ ___| |__ (_)_ __
|
9
|
-
| '_ ` _ \| | | / __| '_ \| | '_ \
|
10
|
-
| | | | | | |_| \__ | | | | | | | |
|
11
|
-
|_| |_| |_|\__,_|___|_| |_|_|_| |_|
|
12
13
|
|
13
14
|
|
14
|
-
Usage: mushin [command] [options]
|
15
15
|
|
16
|
+
Usage: mushin [command] [options]
|
16
17
|
|
17
|
-
|
18
|
+
|
19
|
+
Commonly used command are:
|
18
20
|
config : generats mushin config.rb i.e. rubygems & github authentications
|
19
21
|
roll : roll your own framework
|
20
22
|
|
@@ -29,6 +31,15 @@ global.order!
|
|
29
31
|
command = ARGV.shift
|
30
32
|
|
31
33
|
case command
|
34
|
+
|
35
|
+
when "config"
|
36
|
+
p "generating mushin's config.rb "
|
37
|
+
@framework = ARGV[0]
|
38
|
+
df = File.new("config.rb", "w")
|
39
|
+
df.puts("Mushin[:framework] = '#{@framework}'")
|
40
|
+
df.puts("Mushin[:author] = ''")
|
41
|
+
df.close
|
42
|
+
|
32
43
|
when "roll"
|
33
44
|
module Mushin
|
34
45
|
class << self
|
@@ -199,18 +210,18 @@ module #{@framework}
|
|
199
210
|
|
200
211
|
#{@framework}::Engine.setup [Object.const_get('#{@framework}::Persistence::DS')]
|
201
212
|
@activities.each do |activity|
|
202
|
-
|
213
|
+
#{@framework}::Engine.run @domain_context, activity
|
203
214
|
end
|
204
215
|
return #{@framework}::Persistence::DS.load @id
|
205
|
-
|
216
|
+
end
|
206
217
|
end
|
207
218
|
end
|
208
219
|
end
|
209
|
-
|
210
|
-
|
220
|
+
eos
|
221
|
+
df.close
|
211
222
|
|
212
|
-
|
213
|
-
|
223
|
+
df = File.new("#{@framework.downcase}/#{@framework.downcase}.gemspec", "w")
|
224
|
+
df.puts <<-eos
|
214
225
|
# coding: utf-8
|
215
226
|
lib = File.expand_path('../lib', __FILE__)
|
216
227
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
@@ -228,32 +239,32 @@ Gem::Specification.new do |spec|
|
|
228
239
|
spec.files = Dir.glob("{lib}/**/*")
|
229
240
|
spec.require_paths = ["lib"]
|
230
241
|
end
|
231
|
-
|
232
|
-
|
242
|
+
eos
|
243
|
+
df.close
|
233
244
|
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
245
|
+
# Framework Peristance Gem
|
246
|
+
@ds = @framework.downcase + '-redis'
|
247
|
+
if File.directory?("#{@ds.downcase}")
|
248
|
+
FileUtils.remove_dir (Dir::pwd + "/#{@ds.downcase}")
|
249
|
+
end
|
250
|
+
Dir.mkdir(Dir::pwd + "/#{@ds.downcase}")
|
251
|
+
Dir.mkdir(Dir::pwd + "/#{@ds.downcase}/lib")
|
252
|
+
Dir.mkdir(Dir::pwd + "/#{@ds.downcase}/lib/#{@ds.downcase}")
|
253
|
+
Dir.mkdir(Dir::pwd + "/#{@ds.downcase}/spec")
|
243
254
|
|
244
|
-
|
245
|
-
|
246
|
-
|
255
|
+
df = File.new("#{@ds.downcase}/lib/#{@ds.downcase}.rb", "w")
|
256
|
+
df.puts("require '#{@ds}/base'")
|
257
|
+
df.close
|
247
258
|
|
248
|
-
|
249
|
-
|
259
|
+
df = File.new("#{@ds.downcase}/lib/#{@ds.downcase}/base.rb", "w")
|
260
|
+
df.puts <<-eos
|
250
261
|
require "redis"
|
251
262
|
|
252
263
|
module #{@framework}
|
253
264
|
module Persistence
|
254
265
|
class DS
|
255
266
|
|
256
|
-
|
267
|
+
#{@framework}::Env.register do
|
257
268
|
attr_accessor :id
|
258
269
|
end
|
259
270
|
|
@@ -304,11 +315,11 @@ module #{@framework}
|
|
304
315
|
end
|
305
316
|
end
|
306
317
|
end
|
307
|
-
|
308
|
-
|
318
|
+
eos
|
319
|
+
df.close
|
309
320
|
|
310
|
-
|
311
|
-
|
321
|
+
df = File.new("#{@ds.downcase}/#{@ds.downcase}.gemspec", "w")
|
322
|
+
df.puts <<-eos
|
312
323
|
# coding: utf-8
|
313
324
|
lib = File.expand_path('../lib', __FILE__)
|
314
325
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
@@ -326,19 +337,31 @@ Gem::Specification.new do |spec|
|
|
326
337
|
spec.files = Dir.glob("{lib}/**/*")
|
327
338
|
spec.require_paths = ["lib"]
|
328
339
|
end
|
329
|
-
|
330
|
-
|
340
|
+
eos
|
341
|
+
df.close
|
331
342
|
|
332
|
-
when "config"
|
333
|
-
p "generating mushin's config.rb "
|
334
343
|
when "share"
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
344
|
+
@gem = ARGV[0]
|
345
|
+
|
346
|
+
Find.find(Dir.pwd) do |path|
|
347
|
+
if (File.extname(path) == ".gemspec") && (File.basename(path).include? @gem.downcase)
|
348
|
+
@path = path
|
349
|
+
`gem build #{@path.downcase}`
|
350
|
+
end
|
351
|
+
if (File.extname(path) == ".gem") && (File.basename(path).include? @gem.downcase)
|
352
|
+
@path = path
|
353
|
+
`gem push #{@path.downcase}`
|
354
|
+
end
|
355
|
+
end
|
339
356
|
when "clean"
|
340
|
-
|
341
|
-
|
357
|
+
@gem = ARGV[0]
|
358
|
+
|
359
|
+
Find.find(Dir.pwd) do |path|
|
360
|
+
if (File.extname(path) == ".gem") && (File.basename(path).include? @gem.downcase)
|
361
|
+
@path = path
|
362
|
+
`rm #{@path.downcase}`
|
363
|
+
end
|
364
|
+
end
|
342
365
|
else
|
343
366
|
puts "You just making it up! try mushin --help"
|
344
367
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mushin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.0.
|
4
|
+
version: 0.0.0.pre61
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- theotherstupidguy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: In the beginner’s mind there are many possibilities, in the expert’s
|
14
14
|
mind there are few!
|