Module: Evercookie

Defined in:
lib/evercookie.rb,
lib/evercookie/view.rb,
lib/evercookie/engine.rb,
lib/evercookie/version.rb,
lib/evercookie/controller.rb

Overview

main module for evercookie gem

Defined Under Namespace

Modules: ControllerHelpers, Rails, ViewHelper Classes: EvercookieController

Constant Summary collapse

VERSION =

Current gem version

"0.1.2"
@@namespace =
:evercookie
@@js_class =
:evercookie
:evercookie_cache
:evercookie_etag
:evercookie_png
@@hash_name =
:evercookie
@@basic_auth =
true

Class Method Summary collapse

Class Method Details

.get_auth_pathObject

getter for path of etag action



88
89
90
# File 'lib/evercookie.rb', line 88

def self.get_auth_path
  "/#{get_namespace}/ec_auth"
end

.get_cache_pathObject

getter for path of cache action



73
74
75
# File 'lib/evercookie.rb', line 73

def self.get_cache_path
  "/#{get_namespace}/ec_cache"
end

getter for cookie path in javascript because rails controller actions get cookies only from it’s controller path



63
64
65
# File 'lib/evercookie.rb', line 63

def self.get_cookie_path
  "/#{get_namespace}/"
end

.get_etag_pathObject

getter for path of etag action



78
79
80
# File 'lib/evercookie.rb', line 78

def self.get_etag_path
  "/#{get_namespace}/ec_etag"
end

.get_namespaceObject

getter for namespace



42
43
44
# File 'lib/evercookie.rb', line 42

def self.get_namespace
  @@namespace.to_sym
end

.get_png_pathObject

getter for path of png action



83
84
85
# File 'lib/evercookie.rb', line 83

def self.get_png_path
  "/#{get_namespace}/ec_png"
end

.get_save_pathObject

getter for path of save action



68
69
70
# File 'lib/evercookie.rb', line 68

def self.get_save_path
  "/#{get_namespace}/save"
end

.hash_name_for_getObject

getter for session key variable for get action



52
53
54
# File 'lib/evercookie.rb', line 52

def self.hash_name_for_get
  "#{@@hash_name}_get".to_sym
end

.hash_name_for_savedObject

getter for session key variable all stored evercookies



57
58
59
# File 'lib/evercookie.rb', line 57

def self.hash_name_for_saved
  "#{@@hash_name}_saved".to_sym
end

.hash_name_for_setObject

getter for session key variable for set action



47
48
49
# File 'lib/evercookie.rb', line 47

def self.hash_name_for_set
  "#{@@hash_name}_set".to_sym
end

.setup {|_self| ... } ⇒ Object

default method for setup evercookie

Yields:

  • (_self)

Yield Parameters:

  • _self (Evercookie)

    the object that the method was called on



37
38
39
# File 'lib/evercookie.rb', line 37

def self.setup
  yield self
end