Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit a869643

Browse files
author
Barrie Hadfield
committed
auto-import added and hyper-operations 0.5.4
1 parent bd34d06 commit a869643

File tree

6 files changed

+70
-15
lines changed

6 files changed

+70
-15
lines changed

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ GEM
3838
i18n (~> 0.7)
3939
minitest (~> 5.1)
4040
tzinfo (~> 1.1)
41-
addressable (2.5.0)
41+
addressable (2.5.1)
4242
public_suffix (~> 2.0, >= 2.0.2)
4343
arel (7.1.4)
4444
babel-source (5.8.35)
@@ -75,7 +75,7 @@ GEM
7575
hyperloop-config (>= 0.9.2)
7676
opal-rails (~> 0.9.0)
7777
react-rails (< 1.10.0)
78-
hyper-operation (0.5.3)
78+
hyper-operation (0.5.4)
7979
activerecord (>= 0.3.0)
8080
hyper-component (>= 0.12.2)
8181
hyperloop-config (>= 0.9.7)

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ Here is a simple index.html:
109109
</html>
110110
```
111111

112+
Copy the code above into an `index.html` file and launch a simple web server with `ruby -run -e httpd . -p 8000` then navigate to http://localhost:8000/
113+
112114
### Want a larger example?
113115

114116
The [Hyperloop website](http://ruby-hyperloop.io/) and [ChatRoom application and tutorial](http://ruby-hyperloop.io/tutorials/chat_app/) uses hyperloop-js.

VERSIONS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ These libraries are built with the following Gem versions:
44
| Gem | Version |
55
|--------------------|----------|
66
| hyper-component | 0.12.3 |
7-
| hyper-operation | 0.5.3 |
7+
| hyper-operation | 0.5.4 |
88
| hyper-store | 0.2.2 |
99
| hyper-react | 0.12.5 |
1010
| hyperloop-config | 0.9.7 |

hyperloop.js

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3062,6 +3062,57 @@ Opal.modules["opal-jquery"] = function(Opal) {
30623062
return self.$require("opal/jquery")
30633063
};
30643064

3065+
/* Generated by Opal 0.10.3 */
3066+
Opal.modules["reactrb/auto-import"] = function(Opal) {
3067+
var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass;
3068+
3069+
Opal.add_stubs(['$==', '$_reactrb_original_const_missing', '$import_const_from_native', '$raise', '$_reactrb_original_method_missing', '$to_proc', '$render']);
3070+
if ($scope.get('RUBY_ENGINE')['$==']("opal")) {
3071+
return (function($base, $super) {
3072+
function $Object(){};
3073+
var self = $Object = $klass($base, $super, 'Object', $Object);
3074+
3075+
var def = self.$$proto, $scope = self.$$scope;
3076+
3077+
return (function(self) {
3078+
var $scope = self.$$scope, def = self.$$proto, TMP_1, TMP_2;
3079+
3080+
Opal.alias(self, '_reactrb_original_const_missing', 'const_missing');
3081+
Opal.alias(self, '_reactrb_original_method_missing', 'method_missing');
3082+
Opal.defn(self, '$const_missing', TMP_1 = function $$const_missing(const_name) {
3083+
var $a, self = this, e = nil;
3084+
3085+
try {
3086+
return self.$_reactrb_original_const_missing(const_name)
3087+
} catch ($err) {
3088+
if (Opal.rescue($err, [$scope.get('StandardError')])) {e = $err;
3089+
try {
3090+
return ((($a = (($scope.get('React')).$$scope.get('NativeLibrary')).$import_const_from_native($scope.get('Object'), const_name, true)) !== false && $a !== nil && $a != null) ? $a : self.$raise(e))
3091+
} finally { Opal.pop_exception() }
3092+
} else { throw $err; }
3093+
};
3094+
}, TMP_1.$$arity = 1);
3095+
return (Opal.defn(self, '$method_missing', TMP_2 = function $$method_missing(method, $a_rest) {
3096+
var $b, $c, $d, self = this, args, $iter = TMP_2.$$p, block = $iter || nil, component_class = nil;
3097+
3098+
var $args_len = arguments.length, $rest_len = $args_len - 1;
3099+
if ($rest_len < 0) { $rest_len = 0; }
3100+
args = new Array($rest_len);
3101+
for (var $arg_idx = 1; $arg_idx < $args_len; $arg_idx++) {
3102+
args[$arg_idx - 1] = arguments[$arg_idx];
3103+
}
3104+
TMP_2.$$p = null;
3105+
component_class = (($scope.get('React')).$$scope.get('NativeLibrary')).$import_const_from_native(self, method, false);
3106+
if (component_class !== false && component_class !== nil && component_class != null) {
3107+
} else {
3108+
($b = ($c = self).$_reactrb_original_method_missing, $b.$$p = block.$to_proc(), $b).apply($c, [method].concat(Opal.to_a(args)))
3109+
};
3110+
return ($b = ($d = (($scope.get('React')).$$scope.get('RenderingContext'))).$render, $b.$$p = block.$to_proc(), $b).apply($d, [component_class].concat(Opal.to_a(args)));
3111+
}, TMP_2.$$arity = -2), nil) && 'method_missing';
3112+
})(Opal.get_singleton_class(self))
3113+
})($scope.base, null)}
3114+
};
3115+
30653116
/* Generated by Opal 0.10.3 */
30663117
Opal.modules["hyperloop/component/version"] = function(Opal) {
30673118
var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass;
@@ -8731,7 +8782,7 @@ Opal.modules["hyper-operation/version"] = function(Opal) {
87318782

87328783
var def = self.$$proto, $scope = self.$$scope;
87338784

8734-
return Opal.cdecl($scope, 'VERSION', "0.5.3")
8785+
return Opal.cdecl($scope, 'VERSION', "0.5.4")
87358786
})($scope.base, null)
87368787
})($scope.base)
87378788
};
@@ -14234,6 +14285,7 @@ Opal.modules["react/top_level_render"] = function(Opal) {
1423414285
self.$require("browser/interval");
1423514286
self.$require("browser/delay");
1423614287
self.$require("opal-jquery");
14288+
self.$require("reactrb/auto-import");
1423714289
(function($base) {
1423814290
var $Hyperloop, self = $Hyperloop = $module($base, 'Hyperloop');
1423914291

hyperloop.min.js

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hyperloop/application.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
require 'browser/interval'
66
require 'browser/delay'
77
require 'opal-jquery'
8+
require 'reactrb/auto-import'
89
module Hyperloop
910
class Component
1011
VERSION = "0.12.4"

0 commit comments

Comments
 (0)