hyper-mesh 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/Gemfile +7 -2
  4. data/README.md +112 -87
  5. data/Rakefile +6 -1
  6. data/docs/action_cable_quickstart.md +20 -16
  7. data/docs/activerecord_api.md +23 -17
  8. data/docs/authorization-policies.md +45 -35
  9. data/docs/client_side_scoping.md +5 -5
  10. data/docs/configuration_details.md +6 -46
  11. data/docs/pusher_faker_quickstart.md +7 -68
  12. data/docs/pusher_quickstart.md +7 -68
  13. data/docs/simple_poller_quickstart.md +6 -67
  14. data/docs/todo-example.md +2 -2
  15. data/docs/word_game.md +3 -1
  16. data/docs/words-example.md +2 -3
  17. data/examples/action-cable/Gemfile +2 -1
  18. data/examples/action-cable/Gemfile.lock +73 -54
  19. data/examples/action-cable/config/initializers/{hyper_mesh.rb → hyperloop.rb} +1 -1
  20. data/examples/action-cable/config/routes.rb +1 -1
  21. data/hyper-mesh.gemspec +10 -4
  22. data/lib/active_record_base.rb +3 -3
  23. data/{examples/action-cable-production-mode/log/.keep → lib/acts_as_string.rb} +0 -0
  24. data/lib/hyper-mesh.rb +11 -19
  25. data/lib/hyper_mesh/version.rb +3 -0
  26. data/lib/hypermesh/version.rb +1 -1
  27. data/lib/reactive_record/active_record/class_methods.rb +10 -3
  28. data/lib/reactive_record/active_record/instance_methods.rb +8 -0
  29. data/lib/reactive_record/active_record/public_columns_hash.rb +8 -2
  30. data/lib/reactive_record/active_record/reactive_record/collection.rb +0 -1
  31. data/lib/reactive_record/active_record/reactive_record/dummy_value.rb +2 -1
  32. data/lib/reactive_record/active_record/reactive_record/isomorphic_base.rb +55 -63
  33. data/lib/reactive_record/active_record/reactive_record/operations.rb +51 -0
  34. data/lib/reactive_record/active_record/reactive_record/reactive_set_relationship_helpers.rb +3 -3
  35. data/lib/reactive_record/active_record/reactive_record/while_loading.rb +93 -84
  36. data/lib/reactive_record/broadcast.rb +183 -0
  37. data/lib/reactive_record/permissions.rb +2 -2
  38. data/reactive_record_test_app/Gemfile +6 -2
  39. data/reactive_record_test_app/Gemfile.lock +120 -60
  40. data/reactive_record_test_app/app/assets/javascripts/application.rb +3 -5
  41. data/reactive_record_test_app/app/assets/javascripts/bigdecimal.rb +1 -0
  42. data/reactive_record_test_app/app/assets/javascripts/reactive_record_config.js +2 -2
  43. data/reactive_record_test_app/app/controllers/application_controller.rb +3 -3
  44. data/reactive_record_test_app/app/controllers/home_controller.rb +1 -1
  45. data/reactive_record_test_app/app/models/models.rb.erb +6 -0
  46. data/reactive_record_test_app/config/application.rb +2 -0
  47. data/reactive_record_test_app/config/environments/development.rb +1 -1
  48. data/reactive_record_test_app/config/routes.rb +1 -2
  49. data/reactive_record_test_app/db/seeds.rb +6 -0
  50. data/reactive_record_test_app/script/rails +0 -0
  51. data/reactive_record_test_app/spec-opal/active-record/rendering_spec.rb +11 -2
  52. data/reactive_record_test_app/spec-opal/active-record/save_spec.rb +3 -4
  53. data/reactive_record_test_app/spec-opal/spec_helper.js.rb +1 -1
  54. data/reactive_record_test_app/spec-opal/test_spec.rb +7 -0
  55. data/reactive_record_test_app/spec_dont_run/README.md +7 -0
  56. data/reactive_record_test_app/{spec-opal/active-record → spec_dont_run/active_record_broken}/permissions_spec.rb +0 -0
  57. data/reactive_record_test_app/{spec-opal/active-record → spec_dont_run/active_record_broken}/prerendering_spec.rb +1 -0
  58. data/spec/{synchromesh/aaa-unit_tests/connection_spec.rb → batch1/aaa-unit_tests/connection_movedspec.rb} +0 -0
  59. data/spec/{synchromesh → batch1}/aaa-unit_tests/dummy_value_spec.rb +2 -2
  60. data/spec/{synchromesh → batch1}/column_types/column_type_spec.rb +2 -2
  61. data/spec/{synchromesh → batch1}/crud_access_regulation/broadcast_controls_access_spec.rb +1 -1
  62. data/spec/{synchromesh → batch1}/crud_access_regulation/model_policies_spec.rb +6 -6
  63. data/spec/batch1/misc/access_like_hash_spec.rb +43 -0
  64. data/spec/batch1/misc/while_loading_spec.rb +196 -0
  65. data/spec/{synchromesh → batch1}/policies/regulate_all_broadcasts_spec.rb +12 -12
  66. data/spec/{synchromesh → batch1}/policies/regulate_broadcast_spec.rb +25 -25
  67. data/spec/{synchromesh/integration → batch2}/authorization_spec.rb +8 -7
  68. data/spec/{synchromesh/integration → batch2}/default_scope_spec.rb +2 -2
  69. data/spec/{synchromesh/integration → batch2}/has_many_through_spec.rb +2 -2
  70. data/spec/{synchromesh/integration → batch2}/relationships_spec.rb +3 -3
  71. data/spec/{reactive_record → batch3}/auto_load_itself_spec.rb +1 -1
  72. data/spec/{reactive_record → batch3}/edge_cases_spec.rb +1 -1
  73. data/spec/{reactive_record → batch3}/finder_method_spec.rb +1 -1
  74. data/spec/{reactive_record → batch3}/many_to_many_spec.rb +2 -2
  75. data/spec/{reactive_record → batch3}/pry_rescue_xspec.rb +0 -0
  76. data/{examples/action-cable-production-mode/public/assets/application-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.css → spec/batch3/readme.txt} +0 -0
  77. data/spec/{reactive_record → batch3}/revert_spec.rb +2 -2
  78. data/spec/{reactive_record → batch3}/save_while_loading_spec.rb +1 -1
  79. data/spec/{reactive_record → batch3}/update_associations_spec.rb +2 -2
  80. data/spec/{reactive_record → batch3}/update_scopes_spec.rb +2 -2
  81. data/spec/{synchromesh/integration → batch4}/saving_during_commit_spec.rb +2 -2
  82. data/spec/{synchromesh/integration → batch4}/scope_spec.rb +30 -2
  83. data/spec/{synchromesh/examples → batch4}/scoped_todos_spec.rb +3 -3
  84. data/spec/{synchromesh/integration → batch4}/synchromesh_spec.rb +2 -2
  85. data/spec/{synchromesh/examples → examples}/dictionary.rb +2 -2
  86. data/spec/{synchromesh/examples → examples}/dictionary_with_client_scopes.rb +2 -2
  87. data/spec/{synchromesh/examples → examples}/random_examples.rb +1 -1
  88. data/spec/{reactive_record/play.rb → play_ground.rb} +0 -0
  89. data/spec/{reactive_record/factory.rb → reactive_record_factory.rb} +0 -0
  90. data/spec/spec_helper.rb +3 -2
  91. data/spec/test_app/Gemfile +8 -3
  92. data/spec/test_app/Gemfile.lock +114 -64
  93. data/spec/test_app/app/views/components.rb +1 -2
  94. data/spec/test_app/config/application.rb +2 -0
  95. data/spec/test_app/config/routes.rb +1 -1
  96. data/spec/{synchromesh/integration/test_components.rb → test_components.rb} +0 -0
  97. metadata +144 -137
  98. data/app/controllers/reactive_record/application_controller.rb +0 -4
  99. data/app/controllers/reactive_record/reactive_record_controller.rb +0 -49
  100. data/config/routes.rb +0 -7
  101. data/examples/action-cable-production-mode/public/assets/application-90043e04e9e784054fd08159fa7aafe5e23d3ffb31584b1bea1e47043c9cfb5a.js +0 -50
  102. data/examples/action-cable-production-mode/public/assets/application-90043e04e9e784054fd08159fa7aafe5e23d3ffb31584b1bea1e47043c9cfb5a.js.gz +0 -0
  103. data/examples/action-cable-production-mode/public/assets/application-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.css.gz +0 -0
  104. data/examples/action-cable-production-mode/tmp/.keep +0 -0
  105. data/examples/action-cable/log/.keep +0 -0
  106. data/examples/action-cable/tmp/.keep +0 -0
  107. data/examples/pusher-fake/log/.keep +0 -0
  108. data/examples/pusher-fake/tmp/.keep +0 -0
  109. data/examples/pusher/log/.keep +0 -0
  110. data/examples/pusher/tmp/.keep +0 -0
  111. data/examples/simple-poller/log/.keep +0 -0
  112. data/examples/simple-poller/tmp/.keep +0 -0
  113. data/examples/word-game/log/.keep +0 -0
  114. data/examples/word-game/tmp/.keep +0 -0
  115. data/examples/words/log/.keep +0 -0
  116. data/examples/words/tmp/.keep +0 -0
  117. data/lib/reactive_record/version.rb +0 -3
  118. data/lib/sources/hyper-mesh/pusher.js +0 -98
  119. data/lib/synchromesh/action_cable.rb +0 -39
  120. data/lib/synchromesh/client_drivers.rb +0 -357
  121. data/lib/synchromesh/configuration.rb +0 -40
  122. data/lib/synchromesh/connection.rb +0 -170
  123. data/lib/synchromesh/policy.rb +0 -504
  124. data/lib/synchromesh/synchromesh.rb +0 -159
  125. data/lib/synchromesh/synchromesh_controller.rb +0 -162
  126. data/reactive_record_test_app/README.rdoc +0 -261
  127. data/reactive_record_test_app/app/assets/javascripts/components/another_component.rb +0 -24
  128. data/reactive_record_test_app/app/assets/javascripts/components/empty_component.rb +0 -6
  129. data/reactive_record_test_app/app/assets/javascripts/components/todo_item_component.js.rb +0 -16
  130. data/reactive_record_test_app/app/assets/javascripts/components/todos_component.js.rb +0 -42
  131. data/reactive_record_test_app/app/assets/javascripts/components/todos_main_component.rb +0 -49
  132. data/reactive_record_test_app/app/assets/javascripts/react_js_test_only.js +0 -21618
  133. data/reactive_record_test_app/app/assets/javascripts/spec/reactive_record_xspec.js.rb +0 -42
  134. data/reactive_record_test_app/app/controllers/test_controller.rb +0 -7
  135. data/reactive_record_test_app/app/mailers/.gitkeep +0 -0
  136. data/reactive_record_test_app/app/models/models.rb +0 -1
  137. data/reactive_record_test_app/app/policies/application_policy.rb +0 -5
  138. data/reactive_record_test_app/app/views/components.rb +0 -4
  139. data/reactive_record_test_app/app/views/components/test.rb +0 -18
  140. data/reactive_record_test_app/app/views/home/index.html.erb +0 -1
  141. data/reactive_record_test_app/app/views/layouts/application.html.erb +0 -17
  142. data/reactive_record_test_app/config/environments/production.rb +0 -70
  143. data/reactive_record_test_app/config/environments/test.rb +0 -41
  144. data/spec/synchromesh/integration/transports_spec.rb +0 -308
  145. data/spec/synchromesh/policies/auto_connect_spec.rb +0 -60
  146. data/spec/synchromesh/policies/auto_loader_spec.rb +0 -34
  147. data/spec/synchromesh/policies/policy_methods_spec.rb +0 -85
  148. data/spec/synchromesh/policies/regulate_class_connection_spec.rb +0 -50
  149. data/spec/synchromesh/policies/regulate_instance_connection_spec.rb +0 -66
  150. data/spec/test_app/log/.keep +0 -0
@@ -6,7 +6,7 @@ module ReactiveRecord
6
6
  end
7
7
  end
8
8
 
9
- module HyperMesh
9
+ module Hyperloop
10
10
  class InternalPolicy
11
11
 
12
12
  def self.accessible_attributes_for(model, acting_user)
@@ -34,7 +34,7 @@ class ActiveRecord::Base
34
34
  attr_accessor :acting_user
35
35
 
36
36
  def view_permitted?(attribute)
37
- HyperMesh::InternalPolicy.accessible_attributes_for(self, acting_user).include? attribute.to_sym
37
+ Hyperloop::InternalPolicy.accessible_attributes_for(self, acting_user).include? attribute.to_sym
38
38
  end
39
39
 
40
40
  def create_permitted?
@@ -2,15 +2,19 @@ source "http://rubygems.org"
2
2
  gem "rails"
3
3
  gem 'sqlite3'
4
4
  gem 'react-rails'
5
- gem 'opal', '~> 0.9.0'
5
+ gem 'opal'#, '~> 0.9.0'
6
6
  gem 'opal-rails'
7
7
  gem 'therubyracer'
8
8
  gem 'jquery-cookie-rails'
9
9
  gem 'byebug'
10
10
  gem 'pry-rails'
11
11
  gem 'pry-rescue'
12
- gem 'opal-rspec-rails', github: 'opal/opal-rspec-rails'
12
+ # change gems and bundle update opal-rspec-rails to switch opal version...
13
+ #gem 'opal-rspec-rails', github: 'opal/opal-rspec-rails', ref: '0b8dc2745bee1aa59fe56323cc6d6493d2129cfc' # 9.0
14
+ gem 'opal-rspec-rails', github: 'opal/opal-rspec-rails', ref: '65de2771a539cda44a84c75082306869284b2ab4' # 10.0
15
+ gem 'hyper-react'
13
16
  gem 'hyper-mesh', path: "../"
17
+ gem 'hyper-operation'
14
18
  gem 'web-console'
15
19
  gem 'hyper-trace'
16
20
  gem 'pry'
@@ -1,90 +1,125 @@
1
1
  GIT
2
2
  remote: git://github.com/opal/opal-rspec-rails.git
3
- revision: 0b8dc2745bee1aa59fe56323cc6d6493d2129cfc
3
+ revision: 65de2771a539cda44a84c75082306869284b2ab4
4
+ ref: 65de2771a539cda44a84c75082306869284b2ab4
4
5
  specs:
5
6
  opal-rspec-rails (0.1.0)
6
- opal (~> 0.9.2)
7
- opal-rails (~> 0.9.0.dev)
8
- opal-rspec (~> 0.5.0)
7
+ opal (~> 0.10.0)
8
+ opal-rails (~> 0.9.0)
9
+ opal-rspec (~> 0.6.0)
9
10
 
10
11
  PATH
11
12
  remote: ../
12
13
  specs:
13
- hyper-mesh (0.5.2)
14
+ hyper-mesh (0.5.4)
14
15
  activerecord (>= 0.3.0)
15
- hyper-react (>= 0.10.0)
16
+ hyper-operation
16
17
 
17
18
  GEM
18
19
  remote: http://rubygems.org/
19
20
  specs:
20
- actionmailer (4.2.7.1)
21
- actionpack (= 4.2.7.1)
22
- actionview (= 4.2.7.1)
23
- activejob (= 4.2.7.1)
21
+ actionmailer (4.2.8)
22
+ actionpack (= 4.2.8)
23
+ actionview (= 4.2.8)
24
+ activejob (= 4.2.8)
24
25
  mail (~> 2.5, >= 2.5.4)
25
26
  rails-dom-testing (~> 1.0, >= 1.0.5)
26
- actionpack (4.2.7.1)
27
- actionview (= 4.2.7.1)
28
- activesupport (= 4.2.7.1)
27
+ actionpack (4.2.8)
28
+ actionview (= 4.2.8)
29
+ activesupport (= 4.2.8)
29
30
  rack (~> 1.6)
30
31
  rack-test (~> 0.6.2)
31
32
  rails-dom-testing (~> 1.0, >= 1.0.5)
32
33
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
33
- actionview (4.2.7.1)
34
- activesupport (= 4.2.7.1)
34
+ actionview (4.2.8)
35
+ activesupport (= 4.2.8)
35
36
  builder (~> 3.1)
36
37
  erubis (~> 2.7.0)
37
38
  rails-dom-testing (~> 1.0, >= 1.0.5)
38
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
39
- activejob (4.2.7.1)
40
- activesupport (= 4.2.7.1)
39
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
40
+ activejob (4.2.8)
41
+ activesupport (= 4.2.8)
41
42
  globalid (>= 0.3.0)
42
- activemodel (4.2.7.1)
43
- activesupport (= 4.2.7.1)
43
+ activemodel (4.2.8)
44
+ activesupport (= 4.2.8)
44
45
  builder (~> 3.1)
45
- activerecord (4.2.7.1)
46
- activemodel (= 4.2.7.1)
47
- activesupport (= 4.2.7.1)
46
+ activerecord (4.2.8)
47
+ activemodel (= 4.2.8)
48
+ activesupport (= 4.2.8)
48
49
  arel (~> 6.0)
49
- activesupport (4.2.7.1)
50
+ activesupport (4.2.8)
50
51
  i18n (~> 0.7)
51
- json (~> 1.7, >= 1.7.7)
52
52
  minitest (~> 5.1)
53
53
  thread_safe (~> 0.3, >= 0.3.4)
54
54
  tzinfo (~> 1.1)
55
- arel (6.0.3)
55
+ addressable (2.5.0)
56
+ public_suffix (~> 2.0, >= 2.0.2)
57
+ arel (6.0.4)
56
58
  babel-source (5.8.35)
57
59
  babel-transpiler (0.7.0)
58
60
  babel-source (>= 4.0, < 6)
59
61
  execjs (~> 2.0)
60
62
  binding_of_caller (0.7.2)
61
63
  debug_inspector (>= 0.0.1)
62
- builder (3.2.2)
64
+ builder (3.2.3)
63
65
  byebug (9.0.5)
64
66
  coderay (1.1.1)
65
- coffee-script-source (1.10.0)
66
- concurrent-ruby (1.0.2)
67
+ coffee-script-source (1.12.2)
68
+ concurrent-ruby (1.0.5)
67
69
  connection_pool (2.2.1)
70
+ cookiejar (0.3.3)
71
+ daemons (1.2.4)
68
72
  debug_inspector (0.0.2)
73
+ em-http-request (1.1.5)
74
+ addressable (>= 2.3.4)
75
+ cookiejar (!= 0.3.1)
76
+ em-socksify (>= 0.3)
77
+ eventmachine (>= 1.0.3)
78
+ http_parser.rb (>= 0.6.0)
79
+ em-socksify (0.3.1)
80
+ eventmachine (>= 1.0.0.beta.4)
81
+ em-websocket (0.5.1)
82
+ eventmachine (>= 0.12.9)
83
+ http_parser.rb (~> 0.6.0)
69
84
  erubis (2.7.0)
85
+ eventmachine (1.2.3)
70
86
  execjs (2.7.0)
71
87
  globalid (0.3.7)
72
88
  activesupport (>= 4.1.0)
73
89
  hike (1.2.3)
74
- hyper-react (0.10.0)
90
+ http_parser.rb (0.6.0)
91
+ httpclient (2.8.3)
92
+ hyper-component (0.12.2)
93
+ hyper-react (>= 0.12.0)
94
+ hyperloop-config (>= 0.9.2)
95
+ opal-rails (~> 0.9.0)
96
+ react-rails (< 1.10.0)
97
+ hyper-operation (0.5.0)
98
+ activerecord (>= 0.3.0)
99
+ hyper-component (>= 0.12.2)
100
+ hyperloop-config (>= 0.9.2)
101
+ mutations
102
+ opal-activesupport
103
+ pusher
104
+ pusher-fake
105
+ hyper-react (0.12.2)
106
+ hyper-store (>= 0.2.1)
107
+ hyperloop-config (>= 0.9.2)
75
108
  opal (>= 0.8.0)
76
109
  opal-activesupport (>= 0.2.0)
77
- react-rails
110
+ hyper-store (0.2.1)
111
+ hyperloop-config (>= 0.9.2)
78
112
  hyper-trace (0.3.1)
79
- i18n (0.7.0)
113
+ hyperloop-config (0.9.2)
114
+ opal
115
+ i18n (0.8.1)
80
116
  interception (0.5)
81
117
  jquery-cookie-rails (1.3.1.1)
82
118
  railties (>= 3.2.0, < 5.0)
83
- jquery-rails (4.2.1)
119
+ jquery-rails (4.2.2)
84
120
  rails-dom-testing (>= 1, < 3)
85
121
  railties (>= 4.2.0)
86
122
  thor (>= 0.14, < 2.0)
87
- json (1.8.3)
88
123
  libv8 (3.16.14.15)
89
124
  loofah (2.0.3)
90
125
  nokogiri (>= 1.5.9)
@@ -95,10 +130,13 @@ GEM
95
130
  mime-types-data (~> 3.2015)
96
131
  mime-types-data (3.2016.0521)
97
132
  mini_portile2 (2.1.0)
98
- minitest (5.9.1)
99
- nokogiri (1.6.8.1)
133
+ minitest (5.10.1)
134
+ multi_json (1.12.1)
135
+ mutations (0.8.1)
136
+ activesupport
137
+ nokogiri (1.7.0.1)
100
138
  mini_portile2 (~> 2.1.0)
101
- opal (0.9.4)
139
+ opal (0.10.3)
102
140
  hike (~> 1.2)
103
141
  sourcemap (~> 0.1.0)
104
142
  sprockets (~> 3.1)
@@ -107,15 +145,20 @@ GEM
107
145
  opal (>= 0.5.0, < 1.0.0)
108
146
  opal-jquery (0.4.2)
109
147
  opal (>= 0.7.0, < 0.11.0)
110
- opal-rails (0.9.0)
148
+ opal-rails (0.9.1)
111
149
  jquery-rails
112
150
  opal (>= 0.8.0, < 0.11)
113
151
  opal-activesupport (>= 0.0.5)
114
152
  opal-jquery (~> 0.4.0)
153
+ opal-sprockets (~> 0.4.0)
115
154
  rails (>= 4.0, < 6.0)
116
155
  sprockets-rails (< 3.0)
117
- opal-rspec (0.5.0)
118
- opal (>= 0.8.0, < 0.10)
156
+ opal-rspec (0.6.0)
157
+ opal (>= 0.10.0, < 0.11)
158
+ opal-sprockets (0.4.0.0.10.0.3.0.0)
159
+ opal (~> 0.10.0)
160
+ sprockets (~> 3.0)
161
+ tilt (>= 1.4)
119
162
  pry (0.10.4)
120
163
  coderay (~> 1.1.0)
121
164
  method_source (~> 0.8.1)
@@ -125,34 +168,45 @@ GEM
125
168
  pry-rescue (1.4.4)
126
169
  interception (>= 0.5)
127
170
  pry
171
+ public_suffix (2.0.5)
172
+ pusher (1.3.1)
173
+ httpclient (~> 2.7)
174
+ multi_json (~> 1.0)
175
+ pusher-signature (~> 0.1.8)
176
+ pusher-fake (1.8.0)
177
+ em-http-request (~> 1.1)
178
+ em-websocket (~> 0.5)
179
+ multi_json (~> 1.6)
180
+ thin (~> 1.5)
181
+ pusher-signature (0.1.8)
128
182
  rack (1.6.5)
129
183
  rack-test (0.6.3)
130
184
  rack (>= 1.0)
131
- rails (4.2.7.1)
132
- actionmailer (= 4.2.7.1)
133
- actionpack (= 4.2.7.1)
134
- actionview (= 4.2.7.1)
135
- activejob (= 4.2.7.1)
136
- activemodel (= 4.2.7.1)
137
- activerecord (= 4.2.7.1)
138
- activesupport (= 4.2.7.1)
185
+ rails (4.2.8)
186
+ actionmailer (= 4.2.8)
187
+ actionpack (= 4.2.8)
188
+ actionview (= 4.2.8)
189
+ activejob (= 4.2.8)
190
+ activemodel (= 4.2.8)
191
+ activerecord (= 4.2.8)
192
+ activesupport (= 4.2.8)
139
193
  bundler (>= 1.3.0, < 2.0)
140
- railties (= 4.2.7.1)
194
+ railties (= 4.2.8)
141
195
  sprockets-rails
142
196
  rails-deprecated_sanitizer (1.0.3)
143
197
  activesupport (>= 4.2.0.alpha)
144
- rails-dom-testing (1.0.7)
198
+ rails-dom-testing (1.0.8)
145
199
  activesupport (>= 4.2.0.beta, < 5.0)
146
- nokogiri (~> 1.6.0)
200
+ nokogiri (~> 1.6)
147
201
  rails-deprecated_sanitizer (>= 1.0.1)
148
202
  rails-html-sanitizer (1.0.3)
149
203
  loofah (~> 2.0)
150
- railties (4.2.7.1)
151
- actionpack (= 4.2.7.1)
152
- activesupport (= 4.2.7.1)
204
+ railties (4.2.8)
205
+ actionpack (= 4.2.8)
206
+ activesupport (= 4.2.8)
153
207
  rake (>= 0.8.7)
154
208
  thor (>= 0.18.1, < 2.0)
155
- rake (11.3.0)
209
+ rake (12.0.0)
156
210
  react-rails (1.9.0)
157
211
  babel-transpiler (>= 0.7.0)
158
212
  coffee-script-source (~> 1.8)
@@ -163,7 +217,7 @@ GEM
163
217
  ref (2.0.0)
164
218
  slop (3.6.0)
165
219
  sourcemap (0.1.1)
166
- sprockets (3.7.0)
220
+ sprockets (3.7.1)
167
221
  concurrent-ruby (~> 1.0)
168
222
  rack (> 1, < 3)
169
223
  sprockets-rails (2.3.3)
@@ -174,9 +228,13 @@ GEM
174
228
  therubyracer (0.12.2)
175
229
  libv8 (~> 3.16.14.0)
176
230
  ref
177
- thor (0.19.1)
178
- thread_safe (0.3.5)
179
- tilt (2.0.5)
231
+ thin (1.7.0)
232
+ daemons (~> 1.0, >= 1.0.9)
233
+ eventmachine (~> 1.0, >= 1.0.4)
234
+ rack (>= 1, < 3)
235
+ thor (0.19.4)
236
+ thread_safe (0.3.6)
237
+ tilt (2.0.6)
180
238
  tzinfo (1.2.2)
181
239
  thread_safe (~> 0.1)
182
240
  web-console (2.3.0)
@@ -191,9 +249,11 @@ PLATFORMS
191
249
  DEPENDENCIES
192
250
  byebug
193
251
  hyper-mesh!
252
+ hyper-operation
253
+ hyper-react
194
254
  hyper-trace
195
255
  jquery-cookie-rails
196
- opal (~> 0.9.0)
256
+ opal
197
257
  opal-rails
198
258
  opal-rspec-rails!
199
259
  pry
@@ -1,5 +1,3 @@
1
- require 'opal'
2
- require 'opal_ujs'
3
- #require 'react'
4
- require 'hyper-react'
5
- # not sure why we are not requiring components
1
+ require 'components'
2
+ require 'react_ujs'
3
+ Opal.load('components')
@@ -0,0 +1 @@
1
+ # for whatever reason 9.0 needs this file to pass
@@ -1,2 +1,2 @@
1
-
2
- window.ReactiveRecordEnginePath = "/rr"
1
+ // normally its set up by Operations Client Drivers but we are just doing it here
2
+ window.HyperloopEnginePath = "/rr"
@@ -1,8 +1,8 @@
1
1
  class ApplicationController < ActionController::Base
2
2
  #protect_from_forgery
3
-
3
+
4
4
  def acting_user
5
- cookies[:acting_user] and User.find_by_email(cookies[:acting_user])
5
+ # cookies[:acting_user] and User.find_by_email(cookies[:acting_user])
6
6
  end
7
-
7
+
8
8
  end
@@ -1,7 +1,7 @@
1
1
  class HomeController < ApplicationController
2
2
 
3
3
  def index
4
- redirect_to "/opal_spec"
4
+ redirect_to "/spec-opal"
5
5
  end
6
6
 
7
7
  end
@@ -0,0 +1,6 @@
1
+ # normally this line would be set up in isomorphic base as part of the rails prerendering footer
2
+ # we don't have rails so we do it manually.
3
+
4
+ `window.ReactiveRecordPublicColumnsHash = <%= ActiveRecord::Base.public_columns_hash.to_json %>`
5
+
6
+ require_tree './public' if RUBY_ENGINE == 'opal'
@@ -69,5 +69,7 @@ module Dummy
69
69
  config.opal.enable_specs = true
70
70
 
71
71
  config.opal.spec_location = 'spec-opal'
72
+ config.web_console.development_only = false
73
+ config.hyperloop.auto_config = false
72
74
  end
73
75
  end
@@ -34,7 +34,7 @@ Dummy::Application.configure do
34
34
 
35
35
  # Expands the lines which load the assets
36
36
  config.assets.debug = false #true
37
- Opal::Processor.source_map_enabled = false
37
+ #Opal::Processor.source_map_enabled = false
38
38
 
39
39
  config.eager_load = false
40
40
 
@@ -1,7 +1,6 @@
1
1
  Rails.application.routes.draw do
2
2
 
3
3
  root :to => "home#index"
4
- match 'test', :to => "test#index", via: :get
5
- mount HyperMesh::Engine => "/rr"
4
+ mount Hyperloop::Engine => "/rr"
6
5
 
7
6
  end
@@ -1,3 +1,9 @@
1
+ require './app/models/public/comment'
2
+ require './app/models/public/todo_item'
3
+ require './app/models/public/address'
4
+ require './app/models/public/user'
5
+
6
+
1
7
  users = [
2
8
  ["Mitch", "VanDuyn", "mitch@catprint.com"],
3
9
  ["Todd", "Russell", "todd@catprint.com"],
File without changes
@@ -195,7 +195,7 @@ describe "integration with react" do
195
195
  puts "html = #{html}"
196
196
  html == "R. VanDuyn - mitch@catprint.com (2 todos)"
197
197
  end
198
-
198
+
199
199
  rendering("a server side value dynamically changed after first fetch from server") do
200
200
  puts "rendering"
201
201
  @render_times ||= 0
@@ -213,9 +213,18 @@ describe "integration with react" do
213
213
  end.should_generate do
214
214
  puts "html = #{html}"
215
215
  if html == "R. VanDuyn - mitch@catprint.com (2 todos)"
216
- debugger
217
216
  true
218
217
  end
219
218
  end
220
219
 
220
+ rendering('cleanup') do
221
+ times_up = React::State.get_state(self, "times_up")
222
+ @timer ||= after(0.5) { React::State.set_state(self, "times_up", "DONE")}
223
+ @count ||= 0
224
+ @count += 1
225
+ "#{times_up}#{@count}"
226
+ end.should_generate do
227
+ html == "DONE2"
228
+ end
229
+
221
230
  end