tml 4.3.9 → 4.3.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a766ff87d61d364fb1f5296ee8db8a7bee43a07c
4
- data.tar.gz: 526bc06c8fc67615ea4367a2a8c271f4fe18d246
3
+ metadata.gz: dd726ec4d8e669b5260eeef038dc0329e6806bd9
4
+ data.tar.gz: fbf200f5e07562a46cf3430f0b88776beef69d19
5
5
  SHA512:
6
- metadata.gz: bf6b37af75c30ca3e074ff60184df0fb187cbaa4bf65c5833c7fa8115b8ecdb66782e404cb82c96feb1eec464ae59f317f4f97242df42dc8d6fde09d499d7fa2
7
- data.tar.gz: f66818fce6aea3bea1791ca49834202dedbc3520abfafbc98f581b89d6a3d3e58f7486907ffd96a718d53725a597c7800cde1ed7c88af5894150433defc3bba6
6
+ metadata.gz: 6af904753661a742074b7a0a0e8965029a259c4544d6c7dc7e92d1f916e99ca897672b3b311ec3216a4f6cfc38fabf9b94c27819540a019bf2068e6d270f5d38
7
+ data.tar.gz: c0cb5917de547073873dd50e78360c660face599c1ff19aeb6de362e44edd7c427d62f9580a0da5492795e9c47df32c24dc04eabbcb0dba4eb22e23612d437d0
@@ -46,7 +46,13 @@ class Tml::Application < Tml::Base
46
46
 
47
47
  def fetch
48
48
  data = api_client.get('applications/current', {:definition => true}, {:cache_key => self.class.cache_key})
49
- update_attributes(data) if data
49
+ if data
50
+ update_attributes(data)
51
+ else
52
+ Tml.logger.debug('Cache enabled but no data is provided.')
53
+ end
54
+
55
+ self
50
56
  rescue Tml::Exception => ex
51
57
  Tml.logger.error("Failed to load application: #{ex}")
52
58
  self
data/lib/tml/session.rb CHANGED
@@ -37,18 +37,9 @@ module Tml
37
37
  end
38
38
 
39
39
  class Session
40
- # Session Attributes - Move to Session
41
40
  attr_accessor :application, :current_user, :current_locale, :current_language, :current_translator,
42
41
  :current_source, :current_component, :block_options, :cookie_params, :access_token, :tools_enabled
43
42
 
44
- def self.access_token
45
- @access_token
46
- end
47
-
48
- def self.access_token=(token)
49
- @access_token = token
50
- end
51
-
52
43
  def cookie_name
53
44
  "trex_#{self.application.key}"
54
45
  end
@@ -58,18 +49,9 @@ module Tml
58
49
 
59
50
  host = opts[:host] || Tml.config.application[:host]
60
51
 
61
- Tml::Session.access_token ||= begin
62
- self.access_token = opts[:token] || Tml.config.application[:token]
63
- self.access_token ||= opts[:access_token] || Tml.config.application[:access_token]
64
- end
65
-
66
52
  Tml.cache.reset_version
67
53
 
68
- self.application = Tml::Application.new(:host => host, :access_token => Tml::Session.access_token).fetch
69
-
70
- if Tml.cache.read_only?
71
- self.class.access_token = self.application.access_token
72
- end
54
+ self.application = Tml::Application.new(:host => host).fetch
73
55
 
74
56
  # Tml.logger.info(self.cookie_params.inspect)
75
57
 
data/lib/tml/version.rb CHANGED
@@ -30,5 +30,5 @@
30
30
  #++
31
31
 
32
32
  module Tml
33
- VERSION = '4.3.9'
33
+ VERSION = '4.3.10'
34
34
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tml
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.9
4
+ version: 4.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Berkovich