hobo_rapid 2.0.0.pre3 → 2.0.0.pre4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0.pre3
1
+ 2.0.0.pre4
data/lib/hobo_rapid.rb CHANGED
@@ -7,7 +7,7 @@ module HoboRapid
7
7
  @@root = Pathname.new File.expand_path('../..', __FILE__)
8
8
  def self.root; @@root; end
9
9
 
10
- EDIT_LINK_BASE = "https://github.com/tablatom/hobo/edit/master/hobo_rapid"
10
+ EDIT_LINK_BASE = "https://github.com/Hobo/hobodoc/edit/master/hobo_rapid"
11
11
 
12
12
  require 'hobo_rapid/railtie' if defined?(Rails)
13
13
 
@@ -140,16 +140,24 @@ this reason, you may configure two separate caches:
140
140
  config.cache_store = :memory_store, {:size => 512.megabytes}
141
141
  config.hobo.stable_cache_store = :file_store
142
142
 
143
+ (If config.hobo.stable_cache_store is not specified,
144
+ config.cache_store is also used for the stable cache store.)
145
+
143
146
  Note that the dependency cache store does not have to be persistent,
144
- it's OK to clear the dependency cache at the same time as the fragment
145
- cache.
147
+ it may be cleared at any time as long as the cache store is also
148
+ cleared at the same time.
149
+
150
+ If your chosen cache supports FIFO eviction it can be safely used, as
151
+ long as you leave config.hobo.stable_cache_store undefined so that the
152
+ fragment and dependency caches share the FIFO cache.
146
153
 
147
154
  #### atomic updates
148
155
 
149
156
  In production, swept-cache needs to be able to update a list
150
- atomically. This is not an operation supported by the Rails cache API,
157
+ atomically. This is not an operation supported by the Rails cache API,
151
158
  but it is supported by most non-trivial caches via one of several
152
- mechanisms.
159
+ mechanisms, either through list support (Redis), and some
160
+ caches support transactions (Infinispan).
153
161
 
154
162
  #### supported caches
155
163
 
@@ -164,11 +172,17 @@ redis: a great choice. You can use the same instance for both fragment cachin
164
172
  config.cache_store = :redis_store, "redis://192.168.1.2:6379/1", :expires_in => 60.minutes
165
173
  config.hobo.stable_cache_store = :redis_store, "redis://192.168.1.2:6379/1"
166
174
 
175
+ (Note: Redis not yet tested. Email the hobousers list for a status update)
176
+
167
177
  [torquebox infinispan](http://torquebox.org/): another great choice
168
178
 
169
179
  config.cache_store = :torque_box_store
170
180
  config.hobo.stable_cache_store = :torque_box_store, :name => 'dependencies', :mode => :replicated, :sync => true
171
181
 
182
+ ehcache: can either use two differently configured caches in a manner similar to infinispan, or can use a single FIFO cache. Not yet tested. Email the hobousers list for a status update.
183
+
184
+ mongo: can be used in FIFO mode (aka capped collections). Not yet tested. Email the hobousers list for a status update.
185
+
172
186
  others: ask on the hobo-users list.
173
187
 
174
188
  -->
@@ -257,6 +271,7 @@ others: ask on the hobo-users list.
257
271
  end
258
272
 
259
273
  # Also store cache_ids in case we ever have a parent who needs to regenerate their keys. We can give then them ours without regenerating.
274
+ # note that this write occurs after the writes to Hobo.stable_cache so that FIFO caches are supported
260
275
  Rails.logger.debug "CACHE: #{key_key_s} -> content + ids #{cache_ids.to_a}"
261
276
  Rails.cache.write(key_key_s, [cache_content, cache_ids.to_a])
262
277
  end
@@ -14,7 +14,8 @@ of the field.
14
14
  - skip: Comma separated list of fields to exclude
15
15
 
16
16
  - tag: The name of a tag to use inside the `<td>` to display the
17
- value. Defaults to `view`
17
+ value. Defaults to `view`, unless we're inside a form, in which case
18
+ the default is `input`.
18
19
 
19
20
  - no-edit: Controls the behavior of `<input>` tags when the user doesn't have edit permission for a field.
20
21
  - view: render the current value using the `<view>` tag
@@ -1,2 +1,2 @@
1
1
  <!-- Renders a comma separated list of links (`<view>`), or "(none)" if the list is empty -->
2
- <def tag="links-for-collection"><%= this.empty? ? "(none)" : context_map { view }.safe_join(", ") %></def>
2
+ <def tag="links-for-collection"><span merge-attrs><%= this.empty? ? "(none)" : context_map { view }.safe_join(", ") %></span></def>
@@ -133,7 +133,7 @@ Notes
133
133
  # prepare symbolized attributes for merging
134
134
  attrs = {}
135
135
  attributes.each_pair{|k,v| attrs[k.to_sym] = v}
136
- d = "#{name}'#{'s' unless name.ends_with?('s')} #{all_parameters.default}"
136
+ d = "#{h name}'#{'s' unless name.ends_with?('s')} #{all_parameters.default}"
137
137
  options = {:default=>[d], :count=>(attrs[:count]||1), :name=>name}
138
138
  your_key = key.split('.').last
139
139
  unless key.eql?(your_key) || attrs.has_key?(your_key.to_sym)
@@ -146,5 +146,5 @@ Notes
146
146
  options[:default].unshift :"tags.your.default.other_user"
147
147
  t("tags.your.#{your_key}.other_user", options.merge(attrs))
148
148
  end
149
- capitalize ? s.sub(/^./){|c| c.upcase} : s
149
+ (capitalize ? s.sub(/^./){|c| c.upcase} : s).html_safe
150
150
  %></def>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hobo_rapid
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre3
4
+ version: 2.0.0.pre4
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-26 00:00:00.000000000 Z
12
+ date: 2012-10-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: hobo
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 2.0.0.pre3
21
+ version: 2.0.0.pre4
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 2.0.0.pre3
29
+ version: 2.0.0.pre4
30
30
  description: The RAPID tag library for Hobo
31
31
  email: tom@tomlocke.com
32
32
  executables: []