hyper-mesh 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +21 -13
- data/docs/action_cable_quickstart.md +9 -7
- data/docs/activerecord_api.md +73 -0
- data/docs/client_side_scoping.md +5 -5
- data/docs/configuration_details.md +11 -0
- data/docs/pusher_faker_quickstart.md +95 -6
- data/docs/pusher_quickstart.md +96 -8
- data/docs/simple_poller_quickstart.md +21 -55
- data/docs/todo-example.md +2 -0
- data/docs/words-example.md +3 -0
- data/examples/action-cable/Gemfile +7 -8
- data/examples/action-cable/Gemfile.lock +28 -46
- data/examples/{simple-poller/app/assets/javascripts/channels → action-cable/app/assets/images}/.keep +0 -0
- data/examples/action-cable/app/assets/javascripts/application.js +5 -3
- data/examples/action-cable/app/assets/javascripts/cable.js +13 -0
- data/examples/{simple-poller/app/controllers/concerns → action-cable/app/assets/javascripts/channels}/.keep +0 -0
- data/examples/{simple-poller → action-cable}/app/channels/application_cable/channel.rb +0 -0
- data/examples/{simple-poller → action-cable}/app/channels/application_cable/connection.rb +0 -0
- data/examples/action-cable/app/controllers/test_controller.rb +0 -1
- data/examples/{simple-poller/app/models/concerns → action-cable/app/models/public}/.keep +0 -0
- data/examples/action-cable/app/policies/application_policy.rb +9 -1
- data/examples/action-cable/app/views/components.rb +2 -3
- data/examples/action-cable/bin/spring +4 -3
- data/examples/action-cable/config/application.rb +1 -11
- data/examples/action-cable/config/environments/development.rb +12 -1
- data/examples/action-cable/config/initializers/hyper_mesh.rb +4 -0
- data/examples/action-cable/config/routes.rb +1 -1
- data/examples/action-cable/config/secrets.yml +2 -2
- data/examples/action-cable/db/migrate/{20160921223808_create_words.rb → 20161114213840_create_words.rb} +0 -0
- data/examples/action-cable/db/schema.rb +14 -1
- data/examples/action-cable/db/seeds.rb +7 -0
- data/examples/{simple-poller/app/views/components → action-cable/lib/assets}/.keep +0 -0
- data/examples/action-cable/lib/tasks/.keep +0 -0
- data/examples/action-cable/test/controllers/.keep +0 -0
- data/examples/action-cable/test/fixtures/.keep +0 -0
- data/examples/action-cable/test/fixtures/files/.keep +0 -0
- data/examples/action-cable/test/fixtures/words.yml +7 -0
- data/examples/action-cable/test/helpers/.keep +0 -0
- data/examples/action-cable/test/integration/.keep +0 -0
- data/examples/action-cable/test/mailers/.keep +0 -0
- data/examples/action-cable/test/models/.keep +0 -0
- data/examples/action-cable/test/models/word_test.rb +7 -0
- data/examples/action-cable/test/test_helper.rb +10 -0
- data/examples/pusher-fake/.gitignore +21 -0
- data/examples/pusher-fake/Gemfile +59 -0
- data/examples/pusher-fake/Gemfile.lock +262 -0
- data/examples/pusher-fake/README.md +24 -0
- data/examples/pusher-fake/Rakefile +6 -0
- data/examples/pusher-fake/app/assets/config/manifest.js +3 -0
- data/examples/pusher-fake/app/assets/images/.keep +0 -0
- data/examples/pusher-fake/app/assets/javascripts/application.js +21 -0
- data/examples/pusher-fake/app/assets/stylesheets/application.css +15 -0
- data/examples/pusher-fake/app/controllers/application_controller.rb +3 -0
- data/examples/pusher-fake/app/controllers/test_controller.rb +5 -0
- data/examples/pusher-fake/app/models/models.rb +2 -0
- data/examples/pusher-fake/app/models/public/.keep +0 -0
- data/examples/pusher-fake/app/models/public/application_record.rb +3 -0
- data/examples/pusher-fake/app/models/public/word.rb +2 -0
- data/examples/pusher-fake/app/policies/application_policy.rb +14 -0
- data/examples/pusher-fake/app/views/components.rb +16 -0
- data/examples/pusher-fake/app/views/components/app.rb +18 -0
- data/examples/pusher-fake/app/views/layouts/application.html.erb +14 -0
- data/examples/pusher-fake/app/views/layouts/mailer.html.erb +13 -0
- data/examples/pusher-fake/app/views/layouts/mailer.text.erb +1 -0
- data/examples/pusher-fake/bin/bundle +3 -0
- data/examples/pusher-fake/bin/rails +9 -0
- data/examples/pusher-fake/bin/rake +9 -0
- data/examples/pusher-fake/bin/setup +34 -0
- data/examples/pusher-fake/bin/spring +16 -0
- data/examples/pusher-fake/bin/update +29 -0
- data/examples/pusher-fake/config.ru +5 -0
- data/examples/pusher-fake/config/application.rb +20 -0
- data/examples/pusher-fake/config/boot.rb +3 -0
- data/examples/pusher-fake/config/database.yml +25 -0
- data/examples/pusher-fake/config/environment.rb +5 -0
- data/examples/pusher-fake/config/environments/development.rb +56 -0
- data/examples/pusher-fake/config/environments/production.rb +86 -0
- data/examples/pusher-fake/config/environments/test.rb +42 -0
- data/examples/pusher-fake/config/initializers/application_controller_renderer.rb +6 -0
- data/examples/pusher-fake/config/initializers/assets.rb +11 -0
- data/examples/pusher-fake/config/initializers/backtrace_silencers.rb +7 -0
- data/examples/pusher-fake/config/initializers/cookies_serializer.rb +5 -0
- data/examples/pusher-fake/config/initializers/filter_parameter_logging.rb +4 -0
- data/examples/pusher-fake/config/initializers/hyper_mesh.rb +21 -0
- data/examples/pusher-fake/config/initializers/inflections.rb +16 -0
- data/examples/pusher-fake/config/initializers/mime_types.rb +4 -0
- data/examples/pusher-fake/config/initializers/new_framework_defaults.rb +24 -0
- data/examples/pusher-fake/config/initializers/session_store.rb +3 -0
- data/examples/pusher-fake/config/initializers/wrap_parameters.rb +14 -0
- data/examples/pusher-fake/config/locales/en.yml +23 -0
- data/examples/pusher-fake/config/puma.rb +47 -0
- data/examples/pusher-fake/config/routes.rb +5 -0
- data/examples/pusher-fake/config/secrets.yml +22 -0
- data/examples/pusher-fake/config/spring.rb +6 -0
- data/examples/{simple-poller/db/migrate/20161013220135_create_words.rb → pusher-fake/db/migrate/20161114213840_create_words.rb} +0 -0
- data/examples/pusher-fake/db/schema.rb +34 -0
- data/examples/pusher-fake/db/seeds.rb +7 -0
- data/examples/pusher-fake/lib/assets/.keep +0 -0
- data/examples/pusher-fake/lib/tasks/.keep +0 -0
- data/examples/pusher-fake/log/.keep +0 -0
- data/examples/pusher-fake/public/404.html +67 -0
- data/examples/pusher-fake/public/422.html +67 -0
- data/examples/pusher-fake/public/500.html +66 -0
- data/examples/pusher-fake/public/apple-touch-icon-precomposed.png +0 -0
- data/examples/pusher-fake/public/apple-touch-icon.png +0 -0
- data/examples/pusher-fake/public/favicon.ico +0 -0
- data/examples/pusher-fake/public/robots.txt +5 -0
- data/examples/pusher-fake/test/controllers/.keep +0 -0
- data/examples/pusher-fake/test/fixtures/.keep +0 -0
- data/examples/pusher-fake/test/fixtures/files/.keep +0 -0
- data/examples/pusher-fake/test/fixtures/words.yml +7 -0
- data/examples/pusher-fake/test/helpers/.keep +0 -0
- data/examples/pusher-fake/test/integration/.keep +0 -0
- data/examples/pusher-fake/test/mailers/.keep +0 -0
- data/examples/pusher-fake/test/models/.keep +0 -0
- data/examples/pusher-fake/test/models/word_test.rb +7 -0
- data/examples/pusher-fake/test/test_helper.rb +10 -0
- data/examples/pusher-fake/tmp/.keep +0 -0
- data/examples/pusher-fake/vendor/assets/javascripts/.keep +0 -0
- data/examples/pusher-fake/vendor/assets/stylesheets/.keep +0 -0
- data/examples/pusher/.gitignore +21 -0
- data/examples/pusher/Gemfile +58 -0
- data/examples/pusher/Gemfile.lock +236 -0
- data/examples/pusher/README.md +24 -0
- data/examples/pusher/Rakefile +6 -0
- data/examples/pusher/app/assets/config/manifest.js +3 -0
- data/examples/pusher/app/assets/images/.keep +0 -0
- data/examples/pusher/app/assets/javascripts/application.js +21 -0
- data/examples/pusher/app/assets/stylesheets/application.css +15 -0
- data/examples/pusher/app/controllers/application_controller.rb +3 -0
- data/examples/pusher/app/controllers/test_controller.rb +5 -0
- data/examples/pusher/app/models/models.rb +2 -0
- data/examples/pusher/app/models/public/.keep +0 -0
- data/examples/pusher/app/models/public/application_record.rb +3 -0
- data/examples/pusher/app/models/public/word.rb +2 -0
- data/examples/pusher/app/policies/application_policy.rb +14 -0
- data/examples/pusher/app/views/components.rb +16 -0
- data/examples/pusher/app/views/components/app.rb +18 -0
- data/examples/pusher/app/views/layouts/application.html.erb +14 -0
- data/examples/pusher/app/views/layouts/mailer.html.erb +13 -0
- data/examples/pusher/app/views/layouts/mailer.text.erb +1 -0
- data/examples/pusher/bin/bundle +3 -0
- data/examples/pusher/bin/rails +9 -0
- data/examples/pusher/bin/rake +9 -0
- data/examples/pusher/bin/setup +34 -0
- data/examples/pusher/bin/spring +16 -0
- data/examples/pusher/bin/update +29 -0
- data/examples/pusher/config.ru +5 -0
- data/examples/pusher/config/application.rb +20 -0
- data/examples/pusher/config/boot.rb +3 -0
- data/examples/pusher/config/database.yml +25 -0
- data/examples/pusher/config/environment.rb +5 -0
- data/examples/pusher/config/environments/development.rb +56 -0
- data/examples/pusher/config/environments/production.rb +86 -0
- data/examples/pusher/config/environments/test.rb +42 -0
- data/examples/pusher/config/initializers/application_controller_renderer.rb +6 -0
- data/examples/pusher/config/initializers/assets.rb +11 -0
- data/examples/pusher/config/initializers/backtrace_silencers.rb +7 -0
- data/examples/pusher/config/initializers/cookies_serializer.rb +5 -0
- data/examples/pusher/config/initializers/filter_parameter_logging.rb +4 -0
- data/examples/pusher/config/initializers/hyper_mesh.rb +10 -0
- data/examples/pusher/config/initializers/inflections.rb +16 -0
- data/examples/pusher/config/initializers/mime_types.rb +4 -0
- data/examples/pusher/config/initializers/new_framework_defaults.rb +24 -0
- data/examples/pusher/config/initializers/session_store.rb +3 -0
- data/examples/pusher/config/initializers/wrap_parameters.rb +14 -0
- data/examples/pusher/config/locales/en.yml +23 -0
- data/examples/pusher/config/puma.rb +47 -0
- data/examples/pusher/config/routes.rb +5 -0
- data/examples/pusher/config/secrets.yml +22 -0
- data/examples/pusher/config/spring.rb +6 -0
- data/examples/pusher/db/migrate/20161114213840_create_words.rb +9 -0
- data/examples/pusher/db/schema.rb +34 -0
- data/examples/pusher/db/seeds.rb +7 -0
- data/examples/pusher/lib/assets/.keep +0 -0
- data/examples/pusher/lib/tasks/.keep +0 -0
- data/examples/pusher/log/.keep +0 -0
- data/examples/pusher/public/404.html +67 -0
- data/examples/pusher/public/422.html +67 -0
- data/examples/pusher/public/500.html +66 -0
- data/examples/pusher/public/apple-touch-icon-precomposed.png +0 -0
- data/examples/pusher/public/apple-touch-icon.png +0 -0
- data/examples/pusher/public/favicon.ico +0 -0
- data/examples/pusher/public/robots.txt +5 -0
- data/examples/pusher/test/controllers/.keep +0 -0
- data/examples/pusher/test/fixtures/.keep +0 -0
- data/examples/pusher/test/fixtures/files/.keep +0 -0
- data/examples/pusher/test/fixtures/words.yml +7 -0
- data/examples/pusher/test/helpers/.keep +0 -0
- data/examples/pusher/test/integration/.keep +0 -0
- data/examples/pusher/test/mailers/.keep +0 -0
- data/examples/pusher/test/models/.keep +0 -0
- data/examples/pusher/test/models/word_test.rb +7 -0
- data/examples/pusher/test/test_helper.rb +10 -0
- data/examples/pusher/tmp/.keep +0 -0
- data/examples/pusher/vendor/assets/javascripts/.keep +0 -0
- data/examples/pusher/vendor/assets/stylesheets/.keep +0 -0
- data/examples/simple-poller/Gemfile +7 -14
- data/examples/simple-poller/Gemfile.lock +23 -66
- data/examples/simple-poller/app/assets/javascripts/application.js +5 -4
- data/examples/simple-poller/app/controllers/test_controller.rb +0 -1
- data/examples/simple-poller/app/policies/application_policy.rb +10 -1
- data/examples/simple-poller/app/views/components.rb +4 -6
- data/examples/simple-poller/app/views/components/app.rb +2 -24
- data/examples/simple-poller/app/views/layouts/application.html.erb +1 -1
- data/examples/simple-poller/bin/bundle +0 -0
- data/examples/simple-poller/bin/rails +0 -0
- data/examples/simple-poller/bin/rake +0 -0
- data/examples/simple-poller/bin/setup +0 -0
- data/examples/simple-poller/bin/spring +0 -0
- data/examples/simple-poller/bin/update +0 -0
- data/examples/simple-poller/config/application.rb +1 -1
- data/examples/simple-poller/config/environments/development.rb +13 -1
- data/examples/simple-poller/config/environments/production.rb +1 -1
- data/examples/simple-poller/config/initializers/hyper_mesh.rb +9 -0
- data/examples/simple-poller/config/initializers/session_store.rb +1 -1
- data/examples/simple-poller/config/routes.rb +1 -1
- data/examples/simple-poller/config/secrets.yml +2 -2
- data/examples/simple-poller/db/migrate/20161114213840_create_words.rb +9 -0
- data/examples/simple-poller/db/schema.rb +14 -1
- data/lib/hypermesh/version.rb +1 -1
- data/lib/reactive_record/active_record/reactive_record/dummy_value.rb +2 -0
- data/spec/synchromesh/{connection_spec.rb → unit_tests/connection_spec.rb} +0 -0
- data/spec/synchromesh/unit_tests/dummy_value_spec.rb +26 -0
- metadata +184 -20
- data/examples/action-cable/config/initializers/synchromesh.rb +0 -5
- data/examples/action-cable/rails_cache_dir2/C91/480/synchromesh_active_connections +0 -0
- data/examples/simple-poller/app/helpers/application_helper.rb +0 -2
- data/examples/simple-poller/app/jobs/application_job.rb +0 -2
- data/examples/simple-poller/app/mailers/application_mailer.rb +0 -4
- data/examples/simple-poller/config/cable.yml +0 -9
- data/examples/simple-poller/config/initializers/synchromesh.rb +0 -15
- data/hyper-mesh-0.4.0.gem +0 -0
@@ -0,0 +1,66 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
<!-- This file lives in public/500.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>We're sorry, but something went wrong.</h1>
|
62
|
+
</div>
|
63
|
+
<p>If you are the application owner check the logs for more information.</p>
|
64
|
+
</div>
|
65
|
+
</body>
|
66
|
+
</html>
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
ENV['RAILS_ENV'] ||= 'test'
|
2
|
+
require File.expand_path('../../config/environment', __FILE__)
|
3
|
+
require 'rails/test_help'
|
4
|
+
|
5
|
+
class ActiveSupport::TestCase
|
6
|
+
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
|
7
|
+
fixtures :all
|
8
|
+
|
9
|
+
# Add more helper methods to be used by all tests here...
|
10
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
@@ -29,9 +29,6 @@ gem 'jbuilder', '~> 2.5'
|
|
29
29
|
|
30
30
|
# Use Capistrano for deployment
|
31
31
|
# gem 'capistrano-rails', group: :development
|
32
|
-
gem 'synchromesh', path: '../..' #git: 'https://github.com/hyper-react/synchromesh', branch: 'authorization-policies'
|
33
|
-
#gem 'pusher'
|
34
|
-
#gem 'pusher-fake'
|
35
32
|
|
36
33
|
group :development, :test do
|
37
34
|
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
@@ -43,22 +40,18 @@ group :development do
|
|
43
40
|
gem 'web-console'
|
44
41
|
gem 'listen', '~> 3.0.5'
|
45
42
|
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
46
|
-
gem 'spring'
|
47
|
-
gem 'spring-watcher-listen', '~> 2.0.0'
|
48
|
-
gem '
|
49
|
-
gem 'pry-rescue'
|
50
|
-
gem 'hyper-trace', path: '../../../hyper-trace'
|
43
|
+
#gem 'spring'
|
44
|
+
#gem 'spring-watcher-listen', '~> 2.0.0'
|
45
|
+
gem 'hyper-rails'
|
51
46
|
end
|
52
47
|
|
53
48
|
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
54
49
|
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
55
50
|
|
51
|
+
gem 'opal-rails'
|
52
|
+
gem 'opal-browser'
|
56
53
|
gem 'hyper-react'
|
57
|
-
gem 'react-rails', '>= 1.3.0'
|
58
|
-
gem 'opal-rails', '>= 0.8.1'
|
59
54
|
gem 'therubyracer', platforms: :ruby
|
60
55
|
gem 'react-router-rails', '~> 0.13.3'
|
61
|
-
gem '
|
62
|
-
gem '
|
63
|
-
gem 'pusher'
|
64
|
-
gem 'moneta'
|
56
|
+
gem 'hyper-router'
|
57
|
+
gem 'hyper-mesh'
|
@@ -1,15 +1,3 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ../../../hyper-trace
|
3
|
-
specs:
|
4
|
-
hyper-trace (0.3.0)
|
5
|
-
|
6
|
-
PATH
|
7
|
-
remote: ../..
|
8
|
-
specs:
|
9
|
-
synchromesh (0.4.0)
|
10
|
-
activerecord (>= 0.3.0)
|
11
|
-
reactive-record (>= 0.7.43)
|
12
|
-
|
13
1
|
GEM
|
14
2
|
remote: https://rubygems.org/
|
15
3
|
specs:
|
@@ -57,7 +45,6 @@ GEM
|
|
57
45
|
execjs (~> 2.0)
|
58
46
|
builder (3.2.2)
|
59
47
|
byebug (9.0.6)
|
60
|
-
coderay (1.1.1)
|
61
48
|
coffee-rails (4.2.1)
|
62
49
|
coffee-script (>= 2.2.0)
|
63
50
|
railties (>= 4.0.0, < 5.2.x)
|
@@ -66,7 +53,7 @@ GEM
|
|
66
53
|
execjs
|
67
54
|
coffee-script-source (1.10.0)
|
68
55
|
concurrent-ruby (1.0.2)
|
69
|
-
connection_pool (2.2.
|
56
|
+
connection_pool (2.2.1)
|
70
57
|
debug_inspector (0.0.2)
|
71
58
|
erubis (2.7.0)
|
72
59
|
execjs (2.7.0)
|
@@ -74,9 +61,19 @@ GEM
|
|
74
61
|
globalid (0.3.7)
|
75
62
|
activesupport (>= 4.1.0)
|
76
63
|
hike (1.2.3)
|
77
|
-
|
64
|
+
hyper-mesh (0.5.0)
|
65
|
+
activerecord (>= 0.3.0)
|
66
|
+
hyper-react (>= 0.10.0)
|
67
|
+
hyper-rails (0.4.0)
|
68
|
+
rails (>= 4.0.0)
|
69
|
+
hyper-react (0.10.0)
|
70
|
+
opal (>= 0.8.0)
|
71
|
+
opal-activesupport (>= 0.2.0)
|
72
|
+
react-rails
|
73
|
+
hyper-router (2.4.0)
|
74
|
+
hyper-react
|
75
|
+
opal-browser
|
78
76
|
i18n (0.7.0)
|
79
|
-
interception (0.5)
|
80
77
|
jbuilder (2.6.0)
|
81
78
|
activesupport (>= 3.0.0, < 5.1)
|
82
79
|
multi_json (~> 1.2)
|
@@ -98,12 +95,11 @@ GEM
|
|
98
95
|
mime-types-data (3.2016.0521)
|
99
96
|
mini_portile2 (2.1.0)
|
100
97
|
minitest (5.9.1)
|
101
|
-
moneta (0.8.0)
|
102
98
|
multi_json (1.12.1)
|
103
99
|
nio4r (1.2.1)
|
104
100
|
nokogiri (1.6.8.1)
|
105
101
|
mini_portile2 (~> 2.1.0)
|
106
|
-
opal (0.10.
|
102
|
+
opal (0.10.3)
|
107
103
|
hike (~> 1.2)
|
108
104
|
sourcemap (~> 0.1.0)
|
109
105
|
sprockets (~> 3.1)
|
@@ -123,19 +119,7 @@ GEM
|
|
123
119
|
rails (>= 4.0, < 6.0)
|
124
120
|
sprockets-rails (< 3.0)
|
125
121
|
paggio (0.2.6)
|
126
|
-
pry (0.10.4)
|
127
|
-
coderay (~> 1.1.0)
|
128
|
-
method_source (~> 0.8.1)
|
129
|
-
slop (~> 3.4)
|
130
|
-
pry-rescue (1.4.4)
|
131
|
-
interception (>= 0.5)
|
132
|
-
pry
|
133
122
|
puma (3.6.0)
|
134
|
-
pusher (1.1.0)
|
135
|
-
httpclient (~> 2.7)
|
136
|
-
multi_json (~> 1.0)
|
137
|
-
pusher-signature (~> 0.1.8)
|
138
|
-
pusher-signature (0.1.8)
|
139
123
|
rack (2.0.1)
|
140
124
|
rack-test (0.6.3)
|
141
125
|
rack (>= 1.0)
|
@@ -163,7 +147,7 @@ GEM
|
|
163
147
|
rake (>= 0.8.7)
|
164
148
|
thor (>= 0.18.1, < 2.0)
|
165
149
|
rake (11.3.0)
|
166
|
-
rb-fsevent (0.9.
|
150
|
+
rb-fsevent (0.9.8)
|
167
151
|
rb-inotify (0.9.7)
|
168
152
|
ffi (>= 0.5.0)
|
169
153
|
react-rails (1.4.2)
|
@@ -176,20 +160,6 @@ GEM
|
|
176
160
|
react-router-rails (0.13.3.2)
|
177
161
|
rails (>= 3.1)
|
178
162
|
react-rails (~> 1.4.0)
|
179
|
-
reactive-record (0.8.3)
|
180
|
-
opal-browser
|
181
|
-
opal-rails
|
182
|
-
rails (>= 3.2.13)
|
183
|
-
react-rails
|
184
|
-
hyper-react
|
185
|
-
hyper-react (0.8.8)
|
186
|
-
opal (>= 0.8.0)
|
187
|
-
opal-activesupport (>= 0.2.0)
|
188
|
-
opal-browser (= 0.2.0)
|
189
|
-
reactrb-rails-generator (0.2.0)
|
190
|
-
rails (>= 4.0.0)
|
191
|
-
reactrb-router (0.8.2)
|
192
|
-
hyper-react
|
193
163
|
ref (2.0.0)
|
194
164
|
sass (3.4.22)
|
195
165
|
sass-rails (5.0.6)
|
@@ -198,13 +168,7 @@ GEM
|
|
198
168
|
sprockets (>= 2.8, < 4.0)
|
199
169
|
sprockets-rails (>= 2.0, < 4.0)
|
200
170
|
tilt (>= 1.1, < 3)
|
201
|
-
slop (3.6.0)
|
202
171
|
sourcemap (0.1.1)
|
203
|
-
spring (2.0.0)
|
204
|
-
activesupport (>= 4.2)
|
205
|
-
spring-watcher-listen (2.0.1)
|
206
|
-
listen (>= 2.7, < 4.0)
|
207
|
-
spring (>= 1.2, < 3.0)
|
208
172
|
sprockets (3.7.0)
|
209
173
|
concurrent-ruby (~> 1.0)
|
210
174
|
rack (> 1, < 3)
|
@@ -224,9 +188,9 @@ GEM
|
|
224
188
|
turbolinks-source (5.0.0)
|
225
189
|
tzinfo (1.2.2)
|
226
190
|
thread_safe (~> 0.1)
|
227
|
-
uglifier (3.0.
|
191
|
+
uglifier (3.0.3)
|
228
192
|
execjs (>= 0.3.0, < 3)
|
229
|
-
web-console (3.
|
193
|
+
web-console (3.4.0)
|
230
194
|
actionview (>= 5.0)
|
231
195
|
activemodel (>= 5.0)
|
232
196
|
debug_inspector
|
@@ -241,27 +205,20 @@ PLATFORMS
|
|
241
205
|
DEPENDENCIES
|
242
206
|
byebug
|
243
207
|
coffee-rails (~> 4.2)
|
244
|
-
hyper-
|
208
|
+
hyper-mesh
|
209
|
+
hyper-rails
|
210
|
+
hyper-react
|
211
|
+
hyper-router
|
245
212
|
jbuilder (~> 2.5)
|
246
213
|
jquery-rails
|
247
214
|
listen (~> 3.0.5)
|
248
|
-
|
249
|
-
opal-rails
|
250
|
-
pry-rescue
|
215
|
+
opal-browser
|
216
|
+
opal-rails
|
251
217
|
puma (~> 3.0)
|
252
|
-
pusher
|
253
218
|
rails (~> 5.0.0, >= 5.0.0.1)
|
254
|
-
react-rails (>= 1.3.0)
|
255
219
|
react-router-rails (~> 0.13.3)
|
256
|
-
reactive-record (>= 0.8.0)
|
257
|
-
hyper-react
|
258
|
-
reactrb-rails-generator
|
259
|
-
reactrb-router
|
260
220
|
sass-rails (~> 5.0)
|
261
|
-
spring
|
262
|
-
spring-watcher-listen (~> 2.0.0)
|
263
221
|
sqlite3
|
264
|
-
synchromesh!
|
265
222
|
therubyracer
|
266
223
|
turbolinks (~> 5)
|
267
224
|
tzinfo-data
|
@@ -1,3 +1,6 @@
|
|
1
|
+
// added by hyper-rails: These lines must preceed other requires especially turbo_links
|
2
|
+
//= require 'components'
|
3
|
+
//= require 'react_ujs'
|
1
4
|
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
5
|
// listed below.
|
3
6
|
//
|
@@ -9,12 +12,10 @@
|
|
9
12
|
//
|
10
13
|
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
14
|
// about supported directives.
|
12
|
-
//= require 'components'
|
13
|
-
//= require 'react_ujs'
|
14
15
|
//
|
15
16
|
//= require jquery
|
16
17
|
//= require jquery_ujs
|
17
|
-
//= require hyper-mesh/pusher
|
18
|
-
Opal.load('components');
|
19
18
|
//= require turbolinks
|
19
|
+
//= require 'hyper-mesh/pusher'
|
20
20
|
//= require_tree .
|
21
|
+
Opal.load('components');
|
@@ -1,5 +1,14 @@
|
|
1
|
+
# app/policies/application_policy
|
2
|
+
|
3
|
+
# Policies regulate access to your public models
|
4
|
+
# The following policy will open up full access (but only in development)
|
5
|
+
# The policy system is very flexible and powerful. See the documentation
|
6
|
+
# for complete details.
|
1
7
|
class ApplicationPolicy
|
8
|
+
# Allow any session to connect:
|
2
9
|
always_allow_connection
|
10
|
+
# Send all attributes from all public models
|
3
11
|
regulate_all_broadcasts { |policy| policy.send_all }
|
12
|
+
# Allow all changes to public models
|
4
13
|
allow_change(to: :all, on: [:create, :update, :destroy]) { true }
|
5
|
-
end
|
14
|
+
end if Rails.env.development?
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# app/views/components.rb
|
2
2
|
require 'opal'
|
3
|
-
require 'react'
|
4
|
-
require 'hyper-
|
3
|
+
require 'react/react-source'
|
4
|
+
require 'hyper-react'
|
5
5
|
if React::IsomorphicHelpers.on_opal_client?
|
6
6
|
require 'opal-jquery'
|
7
7
|
require 'browser'
|
@@ -9,10 +9,8 @@ if React::IsomorphicHelpers.on_opal_client?
|
|
9
9
|
require 'browser/delay'
|
10
10
|
# add any additional requires that can ONLY run on client here
|
11
11
|
end
|
12
|
-
require '
|
12
|
+
require 'hyper-router'
|
13
13
|
require 'react_router'
|
14
|
-
require 'hyper-
|
15
|
-
#require 'reactive-record'
|
16
|
-
|
14
|
+
require 'hyper-mesh'
|
17
15
|
require 'models'
|
18
16
|
require_tree './components'
|
@@ -1,40 +1,18 @@
|
|
1
1
|
# app/views/components/app.rb
|
2
|
-
class Words < React::Component::Base
|
3
|
-
|
4
|
-
param :words
|
5
|
-
|
6
|
-
render(UL) do
|
7
|
-
params.words.each { |word| LI { word.text } }
|
8
|
-
end
|
9
|
-
|
10
|
-
hypertrace instrument: :all
|
11
|
-
|
12
|
-
end
|
13
|
-
|
14
|
-
|
15
2
|
class App < React::Component::Base
|
16
3
|
|
17
|
-
define_state :waiting_for_word
|
18
|
-
|
19
4
|
def add_new_word
|
20
5
|
# for fun we will use setgetgo.com to get random words!
|
21
|
-
state.waiting_for_word! true
|
22
6
|
HTTP.get("http://randomword.setgetgo.com/get.php", dataType: :jsonp) do |response|
|
23
|
-
Word.new(text: response.json[:Word]).save
|
7
|
+
Word.new(text: response.json[:Word]).save
|
24
8
|
end
|
25
9
|
end
|
26
10
|
|
27
11
|
render(DIV) do
|
28
12
|
SPAN { "Count of Words: #{Word.count}" }
|
29
|
-
BUTTON { "add another" }.on(:click) { add_new_word }
|
30
|
-
#Words(words: Word.all)
|
13
|
+
BUTTON { "add another" }.on(:click) { add_new_word }
|
31
14
|
UL do
|
32
15
|
Word.each { |word| LI { word.text } }
|
33
16
|
end
|
34
17
|
end
|
35
|
-
|
36
|
-
hypertrace instrument: :render
|
37
18
|
end
|
38
|
-
|
39
|
-
#ReactiveRecord::Collection.hypertrace instrument: :instance_variable_set
|
40
|
-
#React::State.hypertrace :class, instrument: :all
|