This conversion was actually done with phoenix master, the week before phoenix 4 released.
- Erlang 17.0
- Elixir 0.15.0
- Phoenix master, "55577a267a1635af3d19fb5c37381077bd25e484"
defmodule Exp do | |
def cat_consonants(list), do: cat_consonants(list, []) | |
def cat_consonants([one, two | tail], acc) do | |
combo = one <> two | |
case has_vowel?(combo) do | |
true -> | |
new_head = [two | tail] |
defmodule Thor.Mixfile do | |
use Mix.Project | |
def project do | |
[ app: :thor, | |
version: "0.0.1", | |
elixir: "0.15.1", | |
elixirc_paths: ["lib", "web"], | |
deps: deps ] | |
end |
defmodule Connection.Yahoo.ConsumerAgent do | |
require Logger | |
@name {:global, YahooConsumerAgent } | |
def name do | |
@name | |
end | |
@doc """ |
defmodule EctoTest.Repo.Migrations.CreateDweet do | |
use Ecto.Migration | |
def up do | |
"CREATE TABLE dweets(id serial primary key, content varchar(140), author varchar(50))" | |
end | |
def down do | |
"DROP TABLE dweets" | |
end |
import M | |
File.read("match.exs") |> match({:ok, bin}, bin) |> String.length | |
#=> 156 | |
s = """ | |
id;name;value | |
1;foo;hi | |
2;bar;bye | |
""" |
(Phoenix.Template.UndefinedError) No such template "start.html" | |
Stacktrace | |
(thor) lib/thor/views/pages.ex:1: Thor.Views.Pages.render/2 | |
(phoenix) lib/phoenix/controller.ex:132: Phoenix.Controller.render_view/5 | |
(thor) lib/thor/router.ex:1: anonymous fn/1 in Thor.Router.call/2 | |
(phoenix) lib/phoenix/plugs/error_handler.ex:9: Phoenix.Plugs.ErrorHandler.wrap/3 | |
(plug) lib/plug/adapters/cowboy/handler.ex:7: Plug.Adapters.Cowboy.Handler.init/3 | |
(cowboy) src/cowboy_handler.erl:64: :cowboy_handler.handler_init/4 |
# copied from local phoenix cloned repo to new app 'myapp' | |
2.1.2 apollo:~/code/libraries/phoenix/lib/phoenix (master) | |
$ cp controller.ex ~/code/work/elixir/myapp/deps/phoenix/lib/phoenix/controller/controller.ex | |
2.1.2 apollo:~/code/libraries/phoenix/lib/phoenix (master) | |
$ cp view.ex ~/code/work/elixir/myapp/deps/phoenix/lib/phoenix/view.ex | |
2.1.2 apollo:~/code/libraries/phoenix/lib/phoenix (master) | |
$ cp -R html/ ~/code/work/elixir/myapp/deps/phoenix/lib/phoenix/ | |
2.1.2 apollo:~/code/libraries/phoenix/lib/phoenix (master) |
2.0.0@galactica apollo:~/code/2013/apps/boatbound/galactica (develop)!!! | |
$ bin/rspec spec/controllers/users/registrations_controller_spec.rb:104 | |
You are using WebMock 1.16.1. VCR 2.8.0 has been tested against WebMock >= 1.8.0, < 1.16, and you are using a newer version. If you experience VCR issues, consider downgrading WebMock as it may fix it. | |
Run options: include {:locations=>{"./spec/controllers/users/registrations_controller_spec.rb"=>[104]}} | |
Users::RegistrationsController | |
POST create | |
init: #<User id: nil, deleted_at: nil, public_id: nil, referral_code: nil, invited_by: nil, acquisition_source: nil, role: "user", user_state: "email_only", read_lifesavers: nil, notification_preferences: nil, blocked: false, first_name: nil, last_name: nil, cell_number: nil, cell_verification: "false", profile_text: nil, profile_image_file_name: nil, profile_image_content_type: nil, profile_image_file_size: nil, profile_image_updated_at: nil, first_message_response_rate: #<BigDecimal:7fe02e23d2f8,'0.1E1',9(18)>, first_me |
guard 'minitest' do | |
# with Minitest::Unit | |
watch(%r|^test/(.*)\/?test_(.*)\.rb|) | |
watch(%r|^lib/(.*)([^/]+)\.rb|) { |m| "test/#{m[1]}test_#{m[2]}.rb" } | |
watch(%r|^test/test_helper\.rb|) { "test" } | |
# Rails 4 - App Files | |
watch(%r|^app/controllers/(.*)\.rb|) { |m| "test/controllers/#{m[1]}_test.rb" } | |
watch(%r|^app/helpers/(.*)\.rb|) { |m| "test/helpers/#{m[1]}_test.rb" } |