Skip to content
Browse files

Upgraded to cachetastic 2.1.2

  • Loading branch information...
1 parent a9e748a commit 402dab53036e7b22f55a858e9a9dc528e474351f @markbates committed Jan 17, 2009
Showing with 30 additions and 89 deletions.
  1. 0 mack-caching/lib/gems/{cachetastic-2.1.0 → cachetastic-2.1.2}/bin/cachetastic_drb_server
  2. +3 −0 mack-caching/lib/gems/{cachetastic-2.1.0 → cachetastic-2.1.2}/lib/cachetastic.rb
  3. +1 −3 mack-caching/lib/gems/{cachetastic-2.1.0 → cachetastic-2.1.2}/lib/cachetastic/adapters/base.rb
  4. 0 mack-caching/lib/gems/{cachetastic-2.1.0 → cachetastic-2.1.2}/lib/cachetastic/adapters/drb.rb
  5. 0 mack-caching/lib/gems/{cachetastic-2.1.0 → cachetastic-2.1.2}/lib/cachetastic/adapters/file.rb
  6. 0 mack-caching/lib/gems/{cachetastic-2.1.0 → cachetastic-2.1.2}/lib/cachetastic/adapters/file_base.rb
  7. 0 mack-caching/lib/gems/{cachetastic-2.1.0 → cachetastic-2.1.2}/lib/cachetastic/adapters/html_file.rb
  8. 0 ...caching/lib/gems/{cachetastic-2.1.0 → cachetastic-2.1.2}/lib/cachetastic/adapters/local_memory.rb
  9. 0 mack-caching/lib/gems/{cachetastic-2.1.0 → cachetastic-2.1.2}/lib/cachetastic/adapters/memcache.rb
  10. 0 ...caching/lib/gems/{cachetastic-2.1.0 → cachetastic-2.1.2}/lib/cachetastic/adapters/store_object.rb
  11. 0 mack-caching/lib/gems/{cachetastic-2.1.0 → cachetastic-2.1.2}/lib/cachetastic/cacheable.rb
  12. 0 mack-caching/lib/gems/{cachetastic-2.1.0 → cachetastic-2.1.2}/lib/cachetastic/caches/base.rb
  13. 0 ...ing/lib/gems/{cachetastic-2.1.0 → cachetastic-2.1.2}/lib/cachetastic/caches/mack_session_cache.rb
  14. 0 mack-caching/lib/gems/{cachetastic-2.1.0 → cachetastic-2.1.2}/lib/cachetastic/caches/page_cache.rb
  15. 0 ...ng/lib/gems/{cachetastic-2.1.0 → cachetastic-2.1.2}/lib/cachetastic/caches/rails_session_cache.rb
  16. 0 mack-caching/lib/gems/{cachetastic-2.1.0 → cachetastic-2.1.2}/lib/cachetastic/connection.rb
  17. 0 ...ng/lib/gems/{cachetastic-2.1.0 → cachetastic-2.1.2}/lib/cachetastic/errors/unsupported_adapter.rb
  18. 0 mack-caching/lib/gems/{cachetastic-2.1.0 → cachetastic-2.1.2}/lib/cachetastic/logger.rb
  19. 0 ...ms/{cachetastic-2.1.0 → cachetastic-2.1.2}/lib/cachetastic/rails_extensions/active_record_base.rb
  20. 0 ...ems/{cachetastic-2.1.0 → cachetastic-2.1.2}/lib/cachetastic/rails_extensions/cgi_session_store.rb
  21. +25 −0 mack-caching/lib/gems/cachetastic-2.1.2/lib/cachetastic/ruby_extensions/kernel.rb
  22. 0 ...aching/lib/gems/{cachetastic-2.1.0 → cachetastic-2.1.2}/lib/cachetastic/ruby_extensions/object.rb
  23. 0 mack-caching/lib/gems/{cachetastic-2.1.0 → cachetastic-2.1.2}/lib/tasks/cachetastic_tasks.rake
  24. 0 mack-caching/lib/gems/{cachetastic-2.1.0 → cachetastic-2.1.2}/lib/tasks/rubyforge_config.yml
  25. +1 −86 mack-facets/lib/mack-facets/extensions/string.rb
View
0 ...hetastic-2.1.0/bin/cachetastic_drb_server → ...hetastic-2.1.2/bin/cachetastic_drb_server
File renamed without changes.
View
3 ...gems/cachetastic-2.1.0/lib/cachetastic.rb → ...gems/cachetastic-2.1.2/lib/cachetastic.rb
@@ -7,6 +7,7 @@
require 'pp'
require 'drb'
require 'configatron'
+# require 'mack-facets'
begin
require 'memcache'
rescue Exception => e
@@ -60,6 +61,8 @@ module ActiveRecord #:nodoc:#
require File.join(home, 'cacheable')
require File.join(home, 'rails_extensions/active_record_base')
require File.join(home, 'rails_extensions/cgi_session_store')
+require File.join(home, 'ruby_extensions/object')
+require File.join(home, 'ruby_extensions/kernel')
configatron.cachetastic_default_options.set_default(:debug, false)
configatron.cachetastic_default_options.set_default(:adapter, :local_memory)
View
4 ...ic-2.1.0/lib/cachetastic/adapters/base.rb → ...ic-2.1.2/lib/cachetastic/adapters/base.rb
@@ -41,9 +41,7 @@ def initialize(name)
# Returns true/or falsed based on whether or not the debug setting is set to true in the
# configuration file. If the config setting is set, then false is returned.
def debug?
- ivar_cache(:debug) do
- configuration.retrieve(:debug, false)
- end
+ configuration.retrieve(:debug, false)
end
def stats
View
0 ...tic-2.1.0/lib/cachetastic/adapters/drb.rb → ...tic-2.1.2/lib/cachetastic/adapters/drb.rb
File renamed without changes.
View
0 ...ic-2.1.0/lib/cachetastic/adapters/file.rb → ...ic-2.1.2/lib/cachetastic/adapters/file.rb
File renamed without changes.
View
0 ...1.0/lib/cachetastic/adapters/file_base.rb → ...1.2/lib/cachetastic/adapters/file_base.rb
File renamed without changes.
View
0 ...1.0/lib/cachetastic/adapters/html_file.rb → ...1.2/lib/cachetastic/adapters/html_file.rb
File renamed without changes.
View
0 .../lib/cachetastic/adapters/local_memory.rb → .../lib/cachetastic/adapters/local_memory.rb
File renamed without changes.
View
0 ....1.0/lib/cachetastic/adapters/memcache.rb → ....1.2/lib/cachetastic/adapters/memcache.rb
File renamed without changes.
View
0 .../lib/cachetastic/adapters/store_object.rb → .../lib/cachetastic/adapters/store_object.rb
File renamed without changes.
View
0 ...tastic-2.1.0/lib/cachetastic/cacheable.rb → ...tastic-2.1.2/lib/cachetastic/cacheable.rb
File renamed without changes.
View
0 ...stic-2.1.0/lib/cachetastic/caches/base.rb → ...stic-2.1.2/lib/cachetastic/caches/base.rb
File renamed without changes.
View
0 .../cachetastic/caches/mack_session_cache.rb → .../cachetastic/caches/mack_session_cache.rb
File renamed without changes.
View
0 ....1.0/lib/cachetastic/caches/page_cache.rb → ....1.2/lib/cachetastic/caches/page_cache.rb
File renamed without changes.
View
0 ...cachetastic/caches/rails_session_cache.rb → ...cachetastic/caches/rails_session_cache.rb
File renamed without changes.
View
0 ...astic-2.1.0/lib/cachetastic/connection.rb → ...astic-2.1.2/lib/cachetastic/connection.rb
File renamed without changes.
View
0 ...cachetastic/errors/unsupported_adapter.rb → ...cachetastic/errors/unsupported_adapter.rb
File renamed without changes.
View
0 ...chetastic-2.1.0/lib/cachetastic/logger.rb → ...chetastic-2.1.2/lib/cachetastic/logger.rb
File renamed without changes.
View
0 ...ic/rails_extensions/active_record_base.rb → ...ic/rails_extensions/active_record_base.rb
File renamed without changes.
View
0 ...tic/rails_extensions/cgi_session_store.rb → ...tic/rails_extensions/cgi_session_store.rb
File renamed without changes.
View
25 mack-caching/lib/gems/cachetastic-2.1.2/lib/cachetastic/ruby_extensions/kernel.rb
@@ -0,0 +1,25 @@
+module Kernel # :nodoc:
+
+ def retryable(options = {}, &block) # :nodoc:
+ opts = { :tries => 1, :on => Exception }.merge(options)
+
+ retries = opts[:tries]
+ retry_exceptions = [opts[:on]].flatten
+
+ x = %{
+ begin
+ return yield
+ rescue #{retry_exceptions.join(", ")} => e
+ retries -= 1
+ if retries > 0
+ retry
+ else
+ raise e
+ end
+ end
+ }
+
+ eval(x, &block)
+ end
+
+end
View
0 ...lib/cachetastic/ruby_extensions/object.rb → ...lib/cachetastic/ruby_extensions/object.rb
File renamed without changes.
View
0 ...ic-2.1.0/lib/tasks/cachetastic_tasks.rake → ...ic-2.1.2/lib/tasks/cachetastic_tasks.rake
File renamed without changes.
View
0 ...stic-2.1.0/lib/tasks/rubyforge_config.yml → ...stic-2.1.2/lib/tasks/rubyforge_config.yml
File renamed without changes.
View
87 mack-facets/lib/mack-facets/extensions/string.rb
@@ -151,89 +151,4 @@ def truncate!(length = 30, truncate_string = "...")
self.replace(self.truncate(length, truncate_string))
end
-end
-# require 'digest'
-# class String
-#
-# # Maps to Mack::Utils::Inflector.instance.pluralize
-# def plural
-# Mack::Utils::Inflector.instance.pluralize(self)
-# end
-#
-# # Maps to Mack::Utils::Inflector.instance.singularize
-# def singular
-# Mack::Utils::Inflector.instance.singularize(self)
-# end
-#
-
-#
-#
-# def underscore
-# camel_cased_word = self.dup
-# camel_cased_word.to_s.gsub(/::/, '/').
-# gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
-# gsub(/([a-z\d])([A-Z])/,'\1_\2').
-# tr("-", "_").
-# downcase
-# end
-#
-# def starts_with?(x)
-# self.match(/^#{x}/) ? true : false
-# end
-#
-# def ends_with?(x)
-# self.match(/#{x}$/) ? true : false
-# end
-#
-# # Returns "is" or "are" based on the number, i.e. "i=6; There #{isare(i)} #{i} topics here."
-# def self.pluralize_word(num, vals = ["is", "are"])
-# return vals[0] if num.to_i==1
-# return vals[1]
-# end
-#
-# def remove(val)
-# gsub(val, '')
-# end
-#
-# def remove!(val)
-# gsub!(val, '')
-# end
-#
-
-#
-# def truncate(length = 30, truncate_string = "...")
-# if self.nil? then return end
-# l = length - truncate_string.length
-# if $KCODE == "NONE"
-# self.length > length ? self[0...l] + truncate_string : self
-# else
-# chars = self.split(//)
-# chars.length > length ? chars[0...l].join + truncate_string : self
-# end
-# end
-#
-# def truncate!(length = 30, truncate_string = "...")
-# self.replace(self.truncate(length, truncate_string))
-# end
-#
-# def capitalize_all_words
-# self.gsub(/\b\w/) {|s| s.upcase}
-# end
-#
-# def capitalize_all_words!
-# self.replace(self.capitalize_all_words)
-# end
-#
-# # keep adding on to this whenever it becomes apparent that unsafe strings
-# # could get passed through into the database
-# def sql_safe_str
-# if !self.nil?
-# self.gsub(/[\']/, "\'\'")
-# end
-# end
-#
-# def sql_safe_str!
-# self.replace(self.sql_safe_str)
-# end
-#
-# end
+end

0 comments on commit 402dab5

Please sign in to comment.
Something went wrong with that request. Please try again.