Skip to content

Commit

Permalink
Ceylon 1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bjansen committed Nov 22, 2016
1 parent 0f60e86 commit 9558490
Show file tree
Hide file tree
Showing 18 changed files with 55 additions and 50 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ jdk:
install:
- wget --quiet --output-document=/tmp/ceylon.zip $CEYLON
- unzip /tmp/ceylon.zip
- export PATH=$PATH:$PWD/ceylon-1.3.0/bin/
- export PATH=$PATH:$PWD/ceylon-1.3.1/bin/
before_script:
- ceylon compile
script:
- ceylon test $TEST_MODULE
env:
global:
- CEYLON="http://ceylon-lang.org/download/dist/1_3_0"
- CEYLON="http://ceylon-lang.org/download/dist/1_3_1"
- TEST_MODULE="test.com.github.bjansen.gyokuro.core"
2 changes: 1 addition & 1 deletion demos/gyokuro/demo/gson/module.ceylon
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ native("jvm")
module gyokuro.demo.gson "0.2-dev" {
import com.github.bjansen.gyokuro.core "0.2-dev";
import com.github.bjansen.gyokuro.transform.gson "0.2-dev";
import ceylon.logging "1.3.0";
import ceylon.logging "1.3.1";
}
2 changes: 1 addition & 1 deletion demos/gyokuro/demo/rest/module.ceylon
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
native("jvm")
module gyokuro.demo.rest "1.0.0" {
import com.github.bjansen.gyokuro.core "0.2-dev";
import ceylon.logging "1.3.0";
import ceylon.logging "1.3.1";
}
2 changes: 1 addition & 1 deletion demos/gyokuro/demo/thymeleaf/module.ceylon
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ native("jvm")
module gyokuro.demo.thymeleaf "0.2-dev" {
import com.github.bjansen.gyokuro.core "0.2-dev";
import com.github.bjansen.gyokuro.view.thymeleaf "0.2-dev";
import ceylon.logging "1.3.0";
import ceylon.logging "1.3.1";
}
36 changes: 18 additions & 18 deletions gyokuro.iml
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,28 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.buffer/1.3.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.collection/1.3.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.file/1.3.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.html/1.3.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.http.client/1.3.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.http.common/1.3.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.http.server/1.3.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.interop.java/1.3.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.io/1.3.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.json/1.3.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.language/1.3.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.logging/1.3.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.test/1.3.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.uri/1.3.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.buffer/1.3.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.collection/1.3.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.file/1.3.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.html/1.3.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.http.client/1.3.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.http.common/1.3.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.http.server/1.3.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.interop.java/1.3.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.io/1.3.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.json/1.3.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.language/1.3.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.logging/1.3.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.test/1.3.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: ceylon.uri/1.3.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: com.github.spullara.mustache.java:compiler/0.8.18" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: com.google.code.gson:gson/2.5" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: com.google.guava:guava/16.0.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: com.mitchellbosecke:pebble/2.2.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: com.redhat.ceylon.common/1.3.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: com.redhat.ceylon.langtools.classfile/1.3.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: com.redhat.ceylon.model/1.3.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: com.redhat.ceylon.module-resolver/1.3.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: com.redhat.ceylon.common/1.3.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: com.redhat.ceylon.langtools.classfile/1.3.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: com.redhat.ceylon.model/1.3.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: com.redhat.ceylon.module-resolver/1.3.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: org.rythmengine:rythm-engine/1.0.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Ceylon: org.thymeleaf:thymeleaf/3.0.0.BETA01" level="project" />
</component>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ object primitiveTypesConverter satisfies Converter<> {

shared actual Anything convert(OpenType type, String str) {
if (type == `class Integer`.openType) {
return parseInteger(str);
return Integer.parse(str);
} else if (type == `class String`.openType) {
return str;
} else if (type == `class Float`.openType) {
return parseFloat(str);
return Float.parse(str);
} else if (type == `class Boolean`.openType) {
if (str == "0") { return false; }
if (str == "1") { return true; }

return parseBoolean(str);
return Boolean.parse(str);
}

return null;
Expand Down
11 changes: 8 additions & 3 deletions source/com/github/bjansen/gyokuro/core/mimeparse.ceylon
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ shared object mimeParse {

if (fitness > bestFitness) {
bestFitness = fitness;
bestFitQ = parseFloat(range[2].get("q") else "0") else 0.0;
bestFitQ = if (is Float f = Float.parse(range[2].get("q") else "0"))
then f
else 0.0;
}
}
}
Expand All @@ -82,8 +84,11 @@ shared object mimeParse {
ParseResults parseMediaRange(String header) {
value results = parseMimeType(header);
value q = results[2].get("q") else "1.0";
value f = let(_f = parseFloat(q) else 1.0)
if (_f < 0.0 || _f > 1.0) then 1.0 else _f;
value f = if (is Float _f = Float.parse(q))
then if (_f < 0.0 || _f > 1.0)
then 1.0
else _f
else 1.0;

assert(is MutableMap<String, String> m = results[2]);
m.put("q", f.string);
Expand Down
10 changes: 5 additions & 5 deletions source/com/github/bjansen/gyokuro/core/module.ceylon
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ module com.github.bjansen.gyokuro.core "0.2-dev" {
shared import com.github.bjansen.gyokuro.view.api "0.2-dev";
shared import com.github.bjansen.gyokuro.transform.api "0.2-dev";

shared import ceylon.http.server "1.3.0";
shared import ceylon.json "1.3.0";
shared import ceylon.http.server "1.3.1";
shared import ceylon.json "1.3.1";

import ceylon.logging "1.3.0";
import ceylon.collection "1.3.0";
import ceylon.io "1.3.0";
import ceylon.logging "1.3.1";
import ceylon.collection "1.3.1";
import ceylon.io "1.3.1";

import java.base "7";
}
4 changes: 2 additions & 2 deletions source/com/github/bjansen/gyokuro/report/module.ceylon
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
native("jvm")
module com.github.bjansen.gyokuro.report "0.2-dev" {
shared import ceylon.file "1.3.0";
shared import ceylon.file "1.3.1";

import ceylon.html "1.3.0";
import ceylon.html "1.3.1";
import com.github.bjansen.gyokuro.core "0.2-dev";
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
native("jvm")
module com.github.bjansen.gyokuro.transform.api "0.2-dev" {
import ceylon.interop.java "1.3.0";
import ceylon.interop.java "1.3.1";
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ module com.github.bjansen.gyokuro.transform.gson "0.2-dev" {
shared import com.github.bjansen.gyokuro.transform.api "0.2-dev";
shared import maven:"com.google.code.gson:gson" "2.5";

import ceylon.interop.java "1.3.0";
import ceylon.interop.java "1.3.1";
}
4 changes: 2 additions & 2 deletions source/com/github/bjansen/gyokuro/view/api/module.ceylon
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
a template engine."
native("jvm")
module com.github.bjansen.gyokuro.view.api "0.2-dev" {
shared import ceylon.http.server "1.3.0";
shared import ceylon.interop.java "1.3.0";
shared import ceylon.http.server "1.3.1";
shared import ceylon.interop.java "1.3.1";
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ native("jvm")
module com.github.bjansen.gyokuro.view.ceylonhtml "0.2-dev" {
shared import com.github.bjansen.gyokuro.view.api "0.2-dev";
shared import com.github.bjansen.gyokuro.core "0.2-dev";
shared import ceylon.html "1.3.0";
shared import ceylon.html "1.3.1";
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ module com.github.bjansen.gyokuro.view.mustache "0.2-dev" {
shared import com.github.bjansen.gyokuro.view.api "0.2-dev";
shared import maven:"com.github.spullara.mustache.java:compiler" "0.8.18";

import ceylon.interop.java "1.3.0";
import ceylon.interop.java "1.3.1";
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ module com.github.bjansen.gyokuro.view.pebble "0.2-dev" {
shared import com.github.bjansen.gyokuro.core "0.2-dev";
shared import maven:"com.mitchellbosecke:pebble" "2.2.0";
import java.base "7";
import ceylon.interop.java "1.3.0";
import ceylon.interop.java "1.3.1";
}
2 changes: 1 addition & 1 deletion source/com/github/bjansen/gyokuro/view/rythm/module.ceylon
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ module com.github.bjansen.gyokuro.view.rythm "0.2-dev" {
shared import maven:"org.rythmengine:rythm-engine" "1.0.1";

import java.base "7";
import ceylon.interop.java "1.3.0";
import ceylon.interop.java "1.3.1";
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ module com.github.bjansen.gyokuro.view.thymeleaf "0.2-dev" {
shared import maven:"org.thymeleaf:thymeleaf" "3.0.0.BETA01";

import java.base "7";
import ceylon.interop.java "1.3.0";
import ceylon.interop.java "1.3.1";
}
10 changes: 5 additions & 5 deletions test-source/test/com/github/bjansen/gyokuro/core/module.ceylon
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
native("jvm")
module test.com.github.bjansen.gyokuro.core "0.2-dev" {
import com.github.bjansen.gyokuro.core "0.2-dev";
import ceylon.test "1.3.0";
import ceylon.logging "1.3.0";
import ceylon.html "1.3.0";
import ceylon.http.client "1.3.0";
import ceylon.uri "1.3.0";
import ceylon.test "1.3.1";
import ceylon.logging "1.3.1";
import ceylon.html "1.3.1";
import ceylon.http.client "1.3.1";
import ceylon.uri "1.3.1";
}

0 comments on commit 9558490

Please sign in to comment.