preflex 0.3.0 → 1.0.0

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
  SHA256:
3
- metadata.gz: bf7c9c62b41893aef4bc30cfa8ac326da81d6145cefe087c5a78257d5d30626d
4
- data.tar.gz: 35fd69c178b4d77519713c6be5512fe9d222ab79e6f4e0730d7053ae344b8fac
3
+ metadata.gz: e71862b1384da913297dc1a47fe91505cfdacc5623a1144ce1073c7f00e2d960
4
+ data.tar.gz: 403b45918e618161d15584d5d26e106a588728d80e1614953eedc7b55728d2b0
5
5
  SHA512:
6
- metadata.gz: fd4a0feda0d7bde91e950994ee183db91a055d727974b8173da52469e69a1aaeae456cbb926730744f9a0a4e7ac6d989b79e697fa628dd33e8a5fbc16ed32df9
7
- data.tar.gz: 0b9dd44abdc4e679034d8931a6f6a033d2665e3239d1e1a0289b9d508cde89ce36e66cb959d6e1a76a42fc4a4333a5cb50af189a5f865697343e8601af2cc520
6
+ metadata.gz: 8414c6f22471c66cdaaf76138e0f88fcdc0376ef942e32de98a69f60da88d1980ed932a91f8f31e84a7468ef6335773876f84567b66052fd18e3e6812ce4685b
7
+ data.tar.gz: 905fa3b347ea9601515394e7b6b7685f172336c563113347e0ec8fc9dddeed442147795bb20ea0afa0da6b69a86c2f41a7401193828a4760a9d9a247d83eef03
@@ -43,7 +43,7 @@ module Preflex
43
43
 
44
44
  localStorage.setItem(this.localStorageKey, JSON.stringify(this.dataLocal))
45
45
  this.updateOnServer(name, value)
46
- document.dispatchEvent(new CustomEvent('preflex:preference-updated', { detail: { name, value } }))
46
+ document.dispatchEvent(new CustomEvent('preflex:preference-updated', { detail: { klass: this.klass, name, value } }))
47
47
  }
48
48
 
49
49
  updateOnServer(name, value) {
@@ -31,7 +31,7 @@ module Preflex
31
31
  @preferences.add(name)
32
32
 
33
33
  store_attribute(:data, name, type, default: default)
34
- store_attribute(:data, "#{name}_updated_at_epoch".to_sym, :integer, default: 0)
34
+ store_attribute(:data, "#{name}_updated_at_epoch".to_sym, :big_integer, default: 0)
35
35
  end
36
36
 
37
37
  def self.current_owner(controller_instance)
@@ -67,7 +67,7 @@ module Preflex
67
67
  end
68
68
 
69
69
  def self.ensure_preference_exists(name)
70
- raise "Preference #{name} was not defined. Make sure you define it (e.g. `preference :#{name}, :integer, default: 10`)" unless @preferences&.include?(name)
70
+ raise "Preference #{name} was not defined. Make sure you define it (e.g. `preference :#{name}, :big_integer, default: 10`)" unless @preferences&.include?(name)
71
71
  end
72
72
  end
73
73
  end
@@ -1,3 +1,3 @@
1
1
  module Preflex
2
- VERSION = "0.3.0"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: preflex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Owais