jason-rails 0.6.5 → 0.6.6

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: 3dcf3cd2febb358e030ebe12ca382b463a8ca97dcdbb228d9a4354f2687b2cd1
4
- data.tar.gz: fb385f90db387e2e4dfc1ce8016b1d800ac3ba6b78e3a54f59a1ec17d670aaef
3
+ metadata.gz: 627690fe30b3378cde9c9f148cc8d8d6941bcd540cbbe4777898fa8917f86dc8
4
+ data.tar.gz: bd3af795626563a049c02045b8dc82018882067f9b2d582e4152e1bd6b34af4c
5
5
  SHA512:
6
- metadata.gz: 17ff6a77e7076e887bc2730ae32607d5c7afcd272dbe535f66259a758867296a759580be3f4385bd878fd908d22e883b0047fbd0bee0134f443457422edf1975
7
- data.tar.gz: 398111401a126b189398baff186284e11f580e653af6391be7a0576c9d1c4832ec6915400071fd66e4819b676deeeae52d35b75fe9499b480c73c5c88c135cfb
6
+ metadata.gz: 4ed1a231161d3eafc616549eebd38c531c29203842f1ab8d0697e953f0d9af8a4766285b8733fa0d92ae1cd7893560f3d660c920385c0b7335f41cfa5f8c9387
7
+ data.tar.gz: 7289710ebc49e0c53c7bdd52106d0e8153bc4505d98b26251966ccff63895e4c6c5a6ac2009b904bbf3d7d3b552c71ffebe0f17786998aaf9eaedafbf12710fb
data/CHANGELOG.md ADDED
@@ -0,0 +1,4 @@
1
+ ## v0.6.5
2
+ - Added `reset!` and `reset!(hard: true)` methods to `Subscription`. Reset will load the IDs that should be part of the subscription from the database, and ensure that the graph matches those. It then re-broadcasts the payloads to all connected clients. Hard reset will do the same, but also clear all cached IDs and subscription hooks on instances - this is equivalent from starting from scratch.
3
+ - Added `enforce: boolean` option to GraphHelper
4
+ - When subscriptions are re-activated they now set the IDs with `enforce: true`, as there could be conditions where updates that were made while a subscription was not active would not be properly registered.
data/README.md CHANGED
@@ -167,6 +167,7 @@ Development is primarily driven by the needs of projects we're using Jason in. I
167
167
  - Authorization - more thorough authorization integration, with utility functions for common authorizations. Allowing authorization of access to particular fields such as restricting the fields of a user that are publicly broadcast.
168
168
  - Utilities for "Draft editing" - both storing client-side copies of model trees which can be committed or discarded, as well as persisting a shadow copy to the database (to allow resumable editing, or possibly collaborative editing features)
169
169
  - Benchmark and migrate if necessary ConnectionPool::Wrapper vs ConnectionPool
170
+ - Assess using RedisGraph for the graph diffing functionality, to see if this would provide a performance boost
170
171
 
171
172
  ## Development
172
173
 
data/lib/jason.rb CHANGED
@@ -31,6 +31,9 @@ module Jason
31
31
  self.pusher_channel_prefix = 'jason'
32
32
 
33
33
  def self.init
34
+ # Don't run in AR migration / generator etc.
35
+ return if $PROGRAM_NAME == '-e' || ActiveRecord::Base.connection.migration_context.needs_migration?
36
+
34
37
  # Check if the schema has changed since last time app was started. If so, do some work to ensure cache contains the correct data
35
38
  got_lock = $redis_jason.set('jason:schema:lock', nx: true, ex: 3600) # Basic lock mechanism for multi-process environments
36
39
  return if !got_lock
@@ -51,8 +54,6 @@ module Jason
51
54
  $redis_jason.set('jason:last_schema', current_schema.to_json)
52
55
  ensure
53
56
  $redis_jason.del('jason:schema:lock')
54
-
55
- previous_config = 'test'
56
57
  end
57
58
 
58
59
 
data/lib/jason/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Jason
2
- VERSION = "0.6.5"
2
+ VERSION = "0.6.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jason-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Rees
@@ -119,6 +119,7 @@ files:
119
119
  - ".rspec"
120
120
  - ".ruby-version"
121
121
  - ".travis.yml"
122
+ - CHANGELOG.md
122
123
  - CODE_OF_CONDUCT.md
123
124
  - Gemfile
124
125
  - Gemfile.lock