kmayer-highrise 0.11.1 → 0.12.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.
data/CHANGELOG CHANGED
@@ -1,9 +1,44 @@
1
- 2009-05-04 Ken Mayer <kmayer@bitwrangler.com
1
+ 2009-05-27 Ken Mayer <kmayer@bitwrangler.com>
2
2
 
3
- * Version 0.9.0
3
+ * Version 0.12.0
4
+
5
+ * Added store_options attribute, so fetches will work work with
6
+ :mem_cache_store and :expires_in
7
+
8
+ 2009-05-20 Ken Mayer <kmayer@bitwrangler.com>
9
+
10
+ * Version 0.11.0
11
+
12
+ * Added untag_id! to Taggable, in case you already know the id and don't
13
+ need to search for it again.
14
+
15
+ 2009-05-16 Ken Mayer <kmayer@bitwrangler.com>
16
+
17
+ * Version 0.10.0
18
+
19
+ * Simplified caching store interface, left configuration up to end-user with
20
+ less magic
21
+
22
+ * Removed version.rb module & tests. No one will ever use it, why clutter up
23
+ the code.
24
+
25
+ 2009-05-05 Ken Mayer <kmayer@bitwrangler.com>
26
+
27
+ * Version 0.9.2
4
28
 
5
- * Changed cache_store= interface to accept :none (to disable caching), :rails (to use the default Rails cache, whatever that happens to be), and, consequently, restores the lookup_store default behavior (given nil or empty options returns a new, default cache_store).
29
+ * Refactored cachable to be more idiomatic ruby
6
30
 
31
+ * Dropped the SHA1 hashing from cache_key
32
+
33
+ 2009-05-04 Ken Mayer <kmayer@bitwrangler.com>
34
+
35
+ * Version 0.9.0
36
+
37
+ * Changed cache_store= interface to accept :none (to disable caching),
38
+ :rails (to use the default Rails cache, whatever that happens to be), and,
39
+ consequently, restores the lookup_store default behavior (given nil or
40
+ empty options returns a new, default cache_store).
41
+
7
42
  * Documentation update. Created and back-filled CHANGELOG
8
43
 
9
44
  2009-05-01 Ken Mayer <kmayer@bitwrangler.com>
@@ -21,15 +56,21 @@
21
56
  2009-04-26 Ken Mayer <kmayer@bitwrangler.com>
22
57
 
23
58
  * Version 0.7.0
24
-
25
- * Refactored Tag & Taggable so ::Tag is a subclass of Base. This adds ::Tag.find(:all) to your quiver of tools. All existing functionality passes tests, but the interface to ::Tag.new has changed. You have to treat it like all of other ARes, that is, use a Hash (instead of positional parameters) to initialize the model.
26
-
59
+
60
+ * Refactored Tag & Taggable so ::Tag is a subclass of Base. This adds
61
+ ::Tag.find(:all) to your quiver of tools. All existing functionality
62
+ passes tests, but the interface to ::Tag.new has changed. You have to
63
+ treat it like all of other ARes, that is, use a Hash (instead of
64
+ positional parameters) to initialize the model.
65
+
27
66
  2009-04-22 Luis Bepop
28
67
 
29
68
  * Version 0.6.3
30
-
31
- * Support to tags refactored. Include curl helper to improve support for objects without ActiveResource base like 'tag' which needs a parse in a html document from a httprequest.
32
-
69
+
70
+ * Support to tags refactored. Include curl helper to improve support for
71
+ objects without ActiveResource base like 'tag' which needs a parse in a
72
+ html document from a httprequest.
73
+
33
74
  2009-04-06 slainer68
34
75
 
35
76
  * Version 0.6.2
@@ -39,9 +80,10 @@
39
80
  2009-03-31 ThiagoLelis
40
81
 
41
82
  * Version 0.6.1
42
-
43
- * Add Person.tag that show a array of tags, and Perton.tag(name), add a new tag to a person.
44
-
83
+
84
+ * Add Person.tag that show a array of tags, and Perton.tag(name), add a new
85
+ tag to a person.
86
+
45
87
  2009-01-14 tapajos
46
88
 
47
89
  * Version 0.5.0
data/README.mkdn CHANGED
@@ -1,4 +1,4 @@
1
- # Highrise (0.9.0)
1
+ # Highrise (0.12.0)
2
2
 
3
3
  ## What is it?
4
4
 
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :minor: 11
3
- :patch: 1
2
+ :minor: 12
3
+ :patch: 0
4
4
  :major: 0
@@ -7,5 +7,6 @@ if Rails.env != 'test' then
7
7
  Highrise::Base.site = 'https://my_fancy_auth_token@example.com.i'
8
8
  end
9
9
  # The cache store can be anything that ActiveSupport can handle
10
- Highrise::Base.connection.cache_store = ActiveSupport::Cache.lookup_store
10
+ Highrise::Base.connection.cache_store = ActiveSupport::Cache.lookup_store :mem_cache_store
11
+ Highrise::Base.connection.store_options = { :expires_in => 60.seconds }
11
12
  end
data/highrise.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{highrise}
5
- s.version = "0.11.1"
5
+ s.version = "0.12.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Marcos Tapaj\303\263s", "Ken Mayer"]
9
- s.date = %q{2009-05-22}
9
+ s.date = %q{2009-05-27}
10
10
  s.description = %q{
11
11
  Based on the original API module from DHH, http://developer.37signals.com/highrise/, this
12
12
  gem is a cleaned up, tested version of the same. Contributors have added support for tags
data/lib/cachable.rb CHANGED
@@ -22,14 +22,16 @@
22
22
  # as backends for caching. See the Rails rdoc for more information on
23
23
  # these stores
24
24
  #
25
- # Configuration examples ('off' is the default):
26
- #
25
+ # === Configuration examples ('off' is the default):
27
26
  # CachedResource.connection.cache_store = ActiveSupport::Cache.lookup_store :memory_store
28
27
  # CachedResource.connection.cache_store = ActiveSupport::Cache.lookup_store :file_store, "/path/to/cache/directory"
29
28
  # CachedResource.connection.cache_store = ActiveSupport::Cache.lookup_store :drb_store, "druby://localhost:9192"
30
29
  # CachedResource.connection.cache_store = ActiveSupport::Cache.lookup_store :mem_cache_store, "localhost"
31
30
  # CachedResource.connection.cache_store = MyOwnStore.new("parameter")
32
31
  #
32
+ # === If you are using a store that has write options, you can set them
33
+ # CachedResource.connection.store_options = { :expires_in => 60.seconds }
34
+ #
33
35
  # Note: To ensure that caching is turned off, set CachedResource.connection.cache_store = nil
34
36
  #
35
37
  # FYI: You can use this with *any* active resource interface, not just Highrise.
@@ -43,14 +45,16 @@ module Cachable
43
45
  end
44
46
 
45
47
  module InstanceMethods
48
+ attr_writer :cache_store, :store_options
49
+
46
50
  def cache_store
47
51
  @cache_store ||= nil
48
52
  end
49
-
50
- def cache_store=(store_option)
51
- @cache_store = store_option
53
+
54
+ def store_options
55
+ @store_options ||= {}
52
56
  end
53
-
57
+
54
58
  def is_caching?
55
59
  !@cache_store.nil?
56
60
  end
@@ -67,7 +71,7 @@ module Cachable
67
71
  end
68
72
 
69
73
  def fetch(args, &block)
70
- cache_store.fetch(cache_key(args), &block).dup
74
+ cache_store.fetch(cache_key(args), store_options, &block).dup
71
75
  end
72
76
  end
73
77
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kmayer-highrise
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Marcos Tapaj\xC3\xB3s"
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-05-22 00:00:00 -07:00
13
+ date: 2009-05-27 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency