dynarex-usersblog 0.1.10 → 0.2.0

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.
Files changed (2) hide show
  1. data/lib/dynarex-usersblog.rb +4 -2
  2. metadata +2 -2
@@ -4,6 +4,7 @@
4
4
 
5
5
  require 'dynarex-blog'
6
6
  require 'fileutils'
7
+ require 'hashcache'
7
8
 
8
9
  class DynarexUsersBlog
9
10
 
@@ -17,7 +18,8 @@ class DynarexUsersBlog
17
18
  user_file_path = "%s/users/%s" % [@file_path, @current_user]
18
19
 
19
20
  FileUtils.mkdir_p user_file_path
20
- @user_blog = DynarexBlog.new user_file_path
21
+ @hc_blog = HashCache.new
22
+ @user_blog = @hc_blog.read(user) { DynarexBlog.new user_file_path }
21
23
  @current_blog = @user_blog
22
24
  end
23
25
  }
@@ -50,7 +52,7 @@ class DynarexUsersBlog
50
52
 
51
53
  def user(user_name)
52
54
  user_file_path = "%s/users/%s" % [@file_path, @current_user]
53
- DynarexBlog.new(user_file_path)
55
+ @hc_blog.read(@current_user) { DynarexBlog.new user_file_path }
54
56
  end
55
57
 
56
58
  def entry(id)
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.10
4
+ version: 0.2.0
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-21 00:00:00 +01:00
12
+ date: 2010-07-22 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency