Skip to content

Commit

Permalink
Merge pull request #3 from saschatimme/0.18
Browse files Browse the repository at this point in the history
Update to 0.18
  • Loading branch information
saschatimme authored Nov 14, 2016
2 parents 9eec40d + 16252be commit 184e280
Show file tree
Hide file tree
Showing 13 changed files with 1,940 additions and 1,508 deletions.
4 changes: 2 additions & 2 deletions elm-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
],
"dependencies": {
"elm-lang/websocket": "1.0.1 <= v < 2.0.0",
"elm-lang/core": "4.0.5 <= v < 5.0.0"
"elm-lang/core": "5.0.0 <= v < 6.0.0"
},
"elm-version": "0.17.1 <= v < 0.18.0"
"elm-version": "0.18.0 <= v < 0.19.0"
}
2 changes: 2 additions & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ erl_crash.dump
# secrets file as long as you replace its contents by environment
# variables.
/config/prod.secret.exs

mix.lock
2 changes: 1 addition & 1 deletion example/mix.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%{"connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [:mix], []},
"cowboy": {:hex, :cowboy, "1.0.4", "a324a8df9f2316c833a470d918aaf73ae894278b8aa6226ce7a9bf699388f878", [:rebar, :make], [{:cowlib, "~> 1.0.0", [hex: :cowlib, optional: false]}, {:ranch, "~> 1.0", [hex: :ranch, optional: false]}]},
"cowboy": {:hex, :cowboy, "1.0.4", "a324a8df9f2316c833a470d918aaf73ae894278b8aa6226ce7a9bf699388f878", [:make, :rebar], [{:cowlib, "~> 1.0.0", [hex: :cowlib, optional: false]}, {:ranch, "~> 1.0", [hex: :ranch, optional: false]}]},
"cowlib": {:hex, :cowlib, "1.0.2", "9d769a1d062c9c3ac753096f868ca121e2730b9a377de23dec0f7e08b1df84ee", [:make], []},
"db_connection": {:hex, :db_connection, "1.0.0-rc.5", "1d9ab6e01387bdf2de7a16c56866971f7c2f75aea7c69cae2a0346e4b537ae0d", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, optional: false]}, {:poolboy, "~> 1.5", [hex: :poolboy, optional: true]}, {:sbroker, "~> 1.0.0-beta.3", [hex: :sbroker, optional: true]}]},
"decimal": {:hex, :decimal, "1.1.2", "79a769d4657b2d537b51ef3c02d29ab7141d2b486b516c109642d453ee08e00c", [:mix], []},
Expand Down
6 changes: 3 additions & 3 deletions example/web/elm/elm-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
],
"exposed-modules": [],
"dependencies": {
"elm-lang/core": "4.0.5 <= v < 5.0.0",
"elm-lang/html": "1.1.0 <= v < 2.0.0",
"elm-lang/core": "5.0.0 <= v < 6.0.0",
"elm-lang/html": "2.0.0 <= v < 3.0.0",
"elm-lang/websocket": "1.0.1 <= v < 2.0.0"
},
"elm-version": "0.17.1 <= v < 0.18.0"
"elm-version": "0.18.0 <= v < 0.19.0"
}
17 changes: 8 additions & 9 deletions example/web/elm/src/Chat.elm
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
module Chat exposing (..)

import Json.Encode as JE
import Json.Decode as JD exposing (Decoder, (:=))
import Json.Decode as JD exposing (Decoder)
import Html exposing (Html)
import Html.App
import Html.Attributes as Attr
import Html.Events as Events
import Phoenix
Expand All @@ -12,9 +11,9 @@ import Phoenix.Socket as Socket exposing (Socket)
import Phoenix.Push as Push


main : Program Never
main : Program Never Model Msg
main =
Html.App.program
Html.program
{ init = init
, update = update
, subscriptions = subscriptions
Expand Down Expand Up @@ -122,15 +121,15 @@ update message model =

decodeNewMsg : Decoder Message
decodeNewMsg =
JD.object2 (\userName msg -> Message { userName = userName, message = msg })
("user_name" := JD.string)
("msg" := JD.string)
JD.map2 (\userName msg -> Message { userName = userName, message = msg })
(JD.field "user_name" JD.string)
(JD.field "msg" JD.string)


decodeUserJoinedMsg : Decoder Message
decodeUserJoinedMsg =
JD.object1 UserJoined
("user_name" := JD.string)
JD.map UserJoined
(JD.field "user_name" JD.string)



Expand Down
Loading

0 comments on commit 184e280

Please sign in to comment.