dynarex-usersblog 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/dynarex-usersblog.rb +16 -12
  2. metadata +2 -2
@@ -9,18 +9,22 @@ class DynarexUsersBlog
9
9
 
10
10
  def initialize(file_path='.', user='')
11
11
 
12
- unless user.empty? then
13
- @current_user = user
14
- @file_path = file_path
15
- user_file_path = "%s/users/%s" % [@file_path, @current_user]
16
-
17
- FileUtils.mkdir_p user_file_path
18
- @user_blog = DynarexBlog.new user_file_path
19
- @current_blog = @user_blog
20
- end
21
-
22
- @master_blog = DynarexBlog.new file_path
23
-
12
+ threads = []
13
+ threads << Thread.new{
14
+ unless user.empty? then
15
+ @current_user = user
16
+ @file_path = file_path
17
+ user_file_path = "%s/users/%s" % [@file_path, @current_user]
18
+
19
+ FileUtils.mkdir_p user_file_path
20
+ @user_blog = DynarexBlog.new user_file_path
21
+ @current_blog = @user_blog
22
+ end
23
+ }
24
+
25
+ threads << Threads.new{@master_blog = DynarexBlog.new file_path}
26
+ threads.each{|thread| thread.join}
27
+
24
28
  super()
25
29
  end
26
30
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynarex-usersblog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors: []
7
7
 
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-07-13 00:00:00 +01:00
12
+ date: 2010-07-16 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency