jason-rails 0.5.0 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +4 -1
  3. data/Gemfile.lock +1 -1
  4. data/README.md +141 -5
  5. data/app/controllers/jason/api/pusher_controller.rb +15 -0
  6. data/app/controllers/jason/api_controller.rb +46 -4
  7. data/client/lib/JasonContext.d.ts +1 -1
  8. data/client/lib/JasonContext.js +4 -1
  9. data/client/lib/JasonProvider.js +1 -1
  10. data/client/lib/createJasonReducers.js +7 -0
  11. data/client/lib/createPayloadHandler.d.ts +6 -3
  12. data/client/lib/createPayloadHandler.js +8 -4
  13. data/client/lib/createTransportAdapter.d.ts +5 -0
  14. data/client/lib/createTransportAdapter.js +20 -0
  15. data/client/lib/index.d.ts +2 -0
  16. data/client/lib/index.js +3 -1
  17. data/client/lib/makeEager.js +2 -2
  18. data/client/lib/pruneIdsMiddleware.js +9 -11
  19. data/client/lib/restClient.d.ts +1 -1
  20. data/client/lib/transportAdapters/actionCableAdapter.d.ts +5 -0
  21. data/client/lib/transportAdapters/actionCableAdapter.js +35 -0
  22. data/client/lib/transportAdapters/pusherAdapter.d.ts +5 -0
  23. data/client/lib/transportAdapters/pusherAdapter.js +68 -0
  24. data/client/lib/useEager.d.ts +1 -0
  25. data/client/lib/useEager.js +12 -0
  26. data/client/lib/useJason.js +30 -35
  27. data/client/lib/useJason.test.js +8 -2
  28. data/client/lib/useSub.d.ts +1 -1
  29. data/client/lib/useSub.js +5 -3
  30. data/client/package.json +2 -1
  31. data/client/src/JasonContext.ts +4 -1
  32. data/client/src/JasonProvider.tsx +1 -1
  33. data/client/src/createJasonReducers.ts +7 -0
  34. data/client/src/createPayloadHandler.ts +9 -4
  35. data/client/src/createTransportAdapter.ts +13 -0
  36. data/client/src/index.ts +3 -1
  37. data/client/src/makeEager.ts +2 -2
  38. data/client/src/pruneIdsMiddleware.ts +11 -11
  39. data/client/src/restClient.ts +2 -1
  40. data/client/src/transportAdapters/actionCableAdapter.ts +38 -0
  41. data/client/src/transportAdapters/pusherAdapter.ts +72 -0
  42. data/client/src/useEager.ts +9 -0
  43. data/client/src/useJason.test.ts +8 -2
  44. data/client/src/useJason.ts +31 -36
  45. data/client/src/useSub.ts +5 -3
  46. data/client/yarn.lock +12 -0
  47. data/config/routes.rb +5 -1
  48. data/lib/jason.rb +56 -8
  49. data/lib/jason/broadcaster.rb +19 -0
  50. data/lib/jason/channel.rb +10 -3
  51. data/lib/jason/graph_helper.rb +165 -0
  52. data/lib/jason/includes_helper.rb +108 -0
  53. data/lib/jason/lua_generator.rb +23 -1
  54. data/lib/jason/publisher.rb +21 -17
  55. data/lib/jason/subscription.rb +208 -179
  56. data/lib/jason/version.rb +1 -1
  57. metadata +18 -2
data/lib/jason/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Jason
2
- VERSION = "0.5.0"
2
+ VERSION = "0.6.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jason-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Rees
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-27 00:00:00.000000000 Z
11
+ date: 2021-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -125,6 +125,7 @@ files:
125
125
  - LICENSE.txt
126
126
  - README.md
127
127
  - Rakefile
128
+ - app/controllers/jason/api/pusher_controller.rb
128
129
  - app/controllers/jason/api_controller.rb
129
130
  - bin/console
130
131
  - bin/setup
@@ -147,6 +148,8 @@ files:
147
148
  - client/lib/createServerActionQueue.js
148
149
  - client/lib/createServerActionQueue.test.d.ts
149
150
  - client/lib/createServerActionQueue.test.js
151
+ - client/lib/createTransportAdapter.d.ts
152
+ - client/lib/createTransportAdapter.js
150
153
  - client/lib/deepCamelizeKeys.d.ts
151
154
  - client/lib/deepCamelizeKeys.js
152
155
  - client/lib/deepCamelizeKeys.test.d.ts
@@ -159,8 +162,14 @@ files:
159
162
  - client/lib/pruneIdsMiddleware.js
160
163
  - client/lib/restClient.d.ts
161
164
  - client/lib/restClient.js
165
+ - client/lib/transportAdapters/actionCableAdapter.d.ts
166
+ - client/lib/transportAdapters/actionCableAdapter.js
167
+ - client/lib/transportAdapters/pusherAdapter.d.ts
168
+ - client/lib/transportAdapters/pusherAdapter.js
162
169
  - client/lib/useAct.d.ts
163
170
  - client/lib/useAct.js
171
+ - client/lib/useEager.d.ts
172
+ - client/lib/useEager.js
164
173
  - client/lib/useJason.d.ts
165
174
  - client/lib/useJason.js
166
175
  - client/lib/useJason.test.d.ts
@@ -177,13 +186,17 @@ files:
177
186
  - client/src/createPayloadHandler.ts
178
187
  - client/src/createServerActionQueue.test.ts
179
188
  - client/src/createServerActionQueue.ts
189
+ - client/src/createTransportAdapter.ts
180
190
  - client/src/deepCamelizeKeys.test.ts
181
191
  - client/src/deepCamelizeKeys.ts
182
192
  - client/src/index.ts
183
193
  - client/src/makeEager.ts
184
194
  - client/src/pruneIdsMiddleware.ts
185
195
  - client/src/restClient.ts
196
+ - client/src/transportAdapters/actionCableAdapter.ts
197
+ - client/src/transportAdapters/pusherAdapter.ts
186
198
  - client/src/useAct.ts
199
+ - client/src/useEager.ts
187
200
  - client/src/useJason.test.ts
188
201
  - client/src/useJason.ts
189
202
  - client/src/useSub.ts
@@ -193,8 +206,11 @@ files:
193
206
  - jason-rails.gemspec
194
207
  - lib/jason.rb
195
208
  - lib/jason/api_model.rb
209
+ - lib/jason/broadcaster.rb
196
210
  - lib/jason/channel.rb
197
211
  - lib/jason/engine.rb
212
+ - lib/jason/graph_helper.rb
213
+ - lib/jason/includes_helper.rb
198
214
  - lib/jason/lua_generator.rb
199
215
  - lib/jason/publisher.rb
200
216
  - lib/jason/publisher_old.rb