Просмотр исходного кода

fix Travis-CI build for old Erlang

Maxim Sokhatsky 10 лет назад
Родитель
Сommit
1c15cf1c9c

+ 1 - 5
Makefile

@@ -1,11 +1,7 @@
 RELEASE := kakaranet
 COOKIE  := node_runner
 VER     := 1.0.0
-APP     := apps/web/priv/static/nitrogen
 
-default: get-deps compile static-link
-static-link:
-	rm -rf $(APP)
-	ln -s ../../../../deps/n2o/priv $(APP)
+default: get-deps compile
 
 include otp.mk

+ 33 - 12
apps/server/src/auth/anonymous.erl

@@ -41,22 +41,43 @@ imagionary_users() ->
     end || SX<-names(), Y<-surnames()],
     lists:keysort(1,List).
 
-tru($ü) -> $Ü;
-tru($ş) -> $Ş;
-tru($ö) -> $Ö;
-tru($ı) -> $İ;
-tru($ğ) -> $Ğ;
-tru($ç) -> $Ç;
+% Erlang R16
+
+tru(252) -> 220; % $ü -> $Ü
+tru(351) -> 350; % $ş -> $Ş
+tru(246) -> 214; % $ö -> $Ö
+tru(305) -> 304; % $ı -> $İ
+tru(287) -> 286; % $ğ -> $Ğ
+tru(231) -> 199; % $ç -> $Ç
 tru(Ch) -> string:to_upper(Ch).
 
-tr2en($ü) -> $u;
-tr2en($ö) -> $o;
-tr2en($ç) -> $c;
-tr2en($ı) -> $i;
-tr2en($ş) -> $u;
-tr2en($ğ) -> $g;
+tr2en(252) -> $u;
+tr2en(246) -> $o;
+tr2en(231) -> $c;
+tr2en(305) -> $i;
+tr2en(351) -> $s;
+tr2en(252) -> $u;
+tr2en(287) -> $g;
 tr2en(Sym) -> Sym.
 
+% Erlang R17
+
+%tru($ü) -> $Ü;
+%tru($ş) -> $Ş;
+%tru($ö) -> $Ö;
+%tru($ı) -> $İ;
+%tru($ğ) -> $Ğ;
+%tru($ç) -> $Ç;
+%tru(Ch) -> string:to_upper(Ch).
+
+%tr2en($ü) -> $u;
+%tr2en($ö) -> $o;
+%tr2en($ç) -> $c;
+%tr2en($ı) -> $i;
+%tr2en($ş) -> $u;
+%tr2en($ğ) -> $g;
+%tr2en(Sym) -> Sym.
+
 fake_id() ->
     FakeUsers = imagionary_users(),
     Pos = crypto:rand_uniform(1, length(FakeUsers)),

+ 0 - 25
apps/web/priv/static/google_sdk.js

@@ -1,25 +0,0 @@
-function plusoneCallback(auth){
-  if (!auth['g-oauth-window']) { console.log('skip autologin'); }
-  else if(auth['access_token']) {
-    gapi.client.load('oauth2', 'v2', function(){
-      gapi.client.oauth2.userinfo.get().execute(function(oauthResp){
-            if(plusLogin) {console.log(JSON.stringify(oauthResp)); plusLogin(oauthResp); }
-     }); });
-  } else if(auth['error']) { console.log('error'); }
-}
-
-function render(){
-  gapi.signin.render('pluslogin', {
-    'callback':'plusoneCallback',
-    'clientid':'146782506820.apps.googleusercontent.com',
-    'cookiepolicy': 'http://synrc.com',
-    'requestvisibleactions':'http://schemas.google.com/AddActivity',
-    'scope':'https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email '
-  });
-}
-
-(function() {
-  var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
-  po.src = 'https://apis.google.com/js/client:plusone.js?parsetags=explicit&onload=render';
-  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
-})();

+ 0 - 4
apps/web/priv/static/kakaranet.css

@@ -1,4 +0,0 @@
-
-  body   { font-size: 18pt; font-family:  Calibri, Lucida Sans, "Lucida Grande"; }
-  button { font-size: 18pt; }
-  select { font-size: 18pt; border: 1px solid #ccc; height: 34px; }

+ 0 - 56
apps/web/priv/static/react.htm

@@ -1,56 +0,0 @@
-<html>
-  <head>
-    <title>Hello React</title>
-    <script src="http://fb.me/react-0.5.0.js"></script>
-    <script src="http://fb.me/JSXTransformer-0.5.0.js"></script>
-  </head>
-  <body>
-    <div id="content"></div>
-    <script type="text/jsx">
-
-/** @jsx React.DOM */
-
-var User = React.createClass({
-    render: function() {
-        console.log(this.props);
-        props = JSON.stringify(this.props.tokens);
-        nested = JSON.stringify(this.props.nested);
-        return (
-            <div><h2>{this.props.id}</h2>
-            Email: {this.props.email},<br/> Tokens: {props},<br/> Nested: {nested}</div> ); } });
-
-var CommentList = React.createClass({
-    render: function() {
-        var users = this.props.data.map(function (item) {
-            return <User id={item.id} email={item.email} tokens={item.proplist} nested={item.nested_proplists}/>; });
-        return (<div class="commentList">{users}</div>); }
-});
-
-var CommentBox = React.createClass({
-    getInitialState: function() { return {data: []}; },
-    loadData: function() {
-        var p = this;
-        var request = new XMLHttpRequest;
-        request.open('GET', this.props.url, true);
-        request.onload = function() {
-            if (request.status >= 200 && request.status < 400) {
-                data = JSON.parse(request.responseText);
-                request = new XMLHttpRequest;
-                p.setState({data: data.users});
-            } else {
-                console.log("Request: " + request);
-            }
-        };
-        request.send();
-    },
-    componentWillMount: function() { this.loadData(); },
-    render: function() {
-        return (<div><h1>Users</h1><CommentList data={this.state.data}/></div> ); }});
-
-React.renderComponent(
-    <CommentBox url="http://localhost:8000/rest/users" pollInterval={5000}/>,
-    document.getElementById('content'));
-
-    </script>
-  </body>
-</html>

+ 0 - 19
apps/web/priv/static/spa/index.htm

@@ -1,19 +0,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<title>N2O</title>
-</head>
-<body>
-<span>'/index?x=' is undefined</span>
-<div id="history"></div>
-<input id="message" type="text">
-<button id="send" type="button">Chat</button>
-<script>var transition = {pid: '', port:'8000'}</script>
-<script src='/static/nitrogen/jquery.js' type='text/javascript' charset='utf-8'></script>
-<script src='/static/nitrogen/bullet.js' type='text/javascript' charset='utf-8'></script>
-<script src='/static/nitrogen/n2o.js' type='text/javascript' charset='utf-8'></script>
-<script src='/static/nitrogen/bert.js' type='text/javascript' charset='utf-8'></script>
-</script><div id="n2ostatus"></div>
-</body>
-</html>
-

+ 0 - 20
apps/web/priv/static/spa/spa.htm

@@ -1,20 +0,0 @@
-<html>
-<head>
-<title>Login</title>
-</head>
-<body>
-<span id="display"></span><br>
-<span>Login: </span>
-<input id="user" type="text"><br>
-<span>Password: </span>
-<input id="pass" type="password" placeholder="password">
-<button id="login" type="button">Login</button>
-
-<script>var transition = {pid: '', port:'8000'}</script>
-<script src='/static/nitrogen/jquery.js' type='text/javascript' charset='utf-8'></script>
-<script src='/static/nitrogen/bullet.js' type='text/javascript' charset='utf-8'></script>
-<script src='/static/nitrogen/n2o.js' type='text/javascript' charset='utf-8'></script>
-<script src='/static/nitrogen/bert.js' type='text/javascript' charset='utf-8'></script>
-</script><div id="n2ostatus"></div>
-</body>
-</html>

+ 1 - 1
otp.mk

@@ -16,7 +16,7 @@ relx     := "{release,{$(RELEASE),\"$(VER)\"},[$(RELEASE)]}.\\n{include_erts,tru
 \\n{vm_args,\"$(VM)\"}.\\n{overlay,[{mkdir,\"log/sasl\"}]}."
 
 test: eunit ct
-compile: get-deps static-link
+compile: get-deps
 delete-deps get-deps compile update-deps:
 	rebar $@
 clean: