1
0
mirror of https://github.com/danbee/chess synced 2025-03-04 08:39:06 +00:00

Fix more renaming stuff

This commit is contained in:
Daniel Barber 2016-12-09 11:04:09 +00:00
parent 418eaa6f47
commit 27444fc154
11 changed files with 23 additions and 22 deletions

View File

@ -6,11 +6,11 @@
use Mix.Config use Mix.Config
# General application configuration # General application configuration
config :chess_phoenix, config :chess,
ecto_repos: [Chess.Repo] ecto_repos: [Chess.Repo]
# Configures the endpoint # Configures the endpoint
config :chess_phoenix, Chess.Endpoint, config :chess, Chess.Endpoint,
url: [host: "localhost"], url: [host: "localhost"],
secret_key_base: "iiTDTKorCWTFoeBgAkr35XZp22cNIM2RsmnHiHdzKAuSHXUGXx42z7lawAwiu1B1", secret_key_base: "iiTDTKorCWTFoeBgAkr35XZp22cNIM2RsmnHiHdzKAuSHXUGXx42z7lawAwiu1B1",
render_errors: [view: Chess.ErrorView, accepts: ~w(html json)], render_errors: [view: Chess.ErrorView, accepts: ~w(html json)],

View File

@ -6,7 +6,7 @@ use Mix.Config
# The watchers configuration can be used to run external # The watchers configuration can be used to run external
# watchers to your application. For example, we use it # watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources. # with brunch.io to recompile .js and .css sources.
config :chess_phoenix, Chess.Endpoint, config :chess, Chess.Endpoint,
http: [port: 4000], http: [port: 4000],
debug_errors: true, debug_errors: true,
code_reloader: true, code_reloader: true,
@ -16,7 +16,7 @@ config :chess_phoenix, Chess.Endpoint,
# Watch static and templates for browser reloading. # Watch static and templates for browser reloading.
config :chess_phoenix, Chess.Endpoint, config :chess, Chess.Endpoint,
live_reload: [ live_reload: [
patterns: [ patterns: [
~r{priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$}, ~r{priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$},
@ -34,8 +34,8 @@ config :logger, :console, format: "[$level] $message\n"
config :phoenix, :stacktrace_depth, 20 config :phoenix, :stacktrace_depth, 20
# Configure your database # Configure your database
config :chess_phoenix, Chess.Repo, config :chess, Chess.Repo,
adapter: Ecto.Adapters.Postgres, adapter: Ecto.Adapters.Postgres,
database: "chess_phoenix_dev", database: "chess_dev",
hostname: "localhost", hostname: "localhost",
pool_size: 10 pool_size: 10

View File

@ -11,7 +11,7 @@ use Mix.Config
# containing the digested version of static files. This # containing the digested version of static files. This
# manifest is generated by the mix phoenix.digest task # manifest is generated by the mix phoenix.digest task
# which you typically run after static files are built. # which you typically run after static files are built.
config :chess_phoenix, Chess.Endpoint, config :chess, Chess.Endpoint,
http: [port: {:system, "PORT"}], http: [port: {:system, "PORT"}],
url: [host: "example.com", port: 80], url: [host: "example.com", port: 80],
cache_static_manifest: "priv/static/manifest.json" cache_static_manifest: "priv/static/manifest.json"
@ -24,7 +24,7 @@ config :logger, level: :info
# To get SSL working, you will need to add the `https` key # To get SSL working, you will need to add the `https` key
# to the previous section and set your `:url` port to 443: # to the previous section and set your `:url` port to 443:
# #
# config :chess_phoenix, Chess.Endpoint, # config :chess, Chess.Endpoint,
# ... # ...
# url: [host: "example.com", port: 443], # url: [host: "example.com", port: 443],
# https: [port: 443, # https: [port: 443,
@ -38,7 +38,7 @@ config :logger, level: :info
# We also recommend setting `force_ssl`, ensuring no data is # We also recommend setting `force_ssl`, ensuring no data is
# ever sent via http, always redirecting to https: # ever sent via http, always redirecting to https:
# #
# config :chess_phoenix, Chess.Endpoint, # config :chess, Chess.Endpoint,
# force_ssl: [hsts: true] # force_ssl: [hsts: true]
# #
# Check `Plug.SSL` for all available options in `force_ssl`. # Check `Plug.SSL` for all available options in `force_ssl`.
@ -53,12 +53,12 @@ config :logger, level: :info
# Alternatively, you can configure exactly which server to # Alternatively, you can configure exactly which server to
# start per endpoint: # start per endpoint:
# #
# config :chess_phoenix, Chess.Endpoint, server: true # config :chess, Chess.Endpoint, server: true
# #
# You will also need to set the application root to `.` in order # You will also need to set the application root to `.` in order
# for the new static assets to be served after a hot upgrade: # for the new static assets to be served after a hot upgrade:
# #
# config :chess_phoenix, Chess.Endpoint, root: "." # config :chess, Chess.Endpoint, root: "."
# Finally import the config/prod.secret.exs # Finally import the config/prod.secret.exs
# which should be versioned separately. # which should be versioned separately.

View File

@ -2,7 +2,7 @@ use Mix.Config
# We don't run a server during test. If one is required, # We don't run a server during test. If one is required,
# you can enable the server option below. # you can enable the server option below.
config :chess_phoenix, Chess.Endpoint, config :chess, Chess.Endpoint,
http: [port: 4001], http: [port: 4001],
server: false server: false
@ -10,10 +10,10 @@ config :chess_phoenix, Chess.Endpoint,
config :logger, level: :warn config :logger, level: :warn
# Configure your database # Configure your database
config :chess_phoenix, Chess.Repo, config :chess, Chess.Repo,
adapter: Ecto.Adapters.Postgres, adapter: Ecto.Adapters.Postgres,
username: "postgres", username: "postgres",
password: "postgres", password: "postgres",
database: "chess_phoenix_test", database: "chess_test",
hostname: "localhost", hostname: "localhost",
pool: Ecto.Adapters.SQL.Sandbox pool: Ecto.Adapters.SQL.Sandbox

View File

@ -1,5 +1,5 @@
defmodule Chess.Endpoint do defmodule Chess.Endpoint do
use Phoenix.Endpoint, otp_app: :chess_phoenix use Phoenix.Endpoint, otp_app: :chess
socket "/socket", Chess.UserSocket socket "/socket", Chess.UserSocket
@ -8,7 +8,7 @@ defmodule Chess.Endpoint do
# You should set gzip to true if you are running phoenix.digest # You should set gzip to true if you are running phoenix.digest
# when deploying your static files in production. # when deploying your static files in production.
plug Plug.Static, plug Plug.Static,
at: "/", from: :chess_phoenix, gzip: false, at: "/", from: :chess, gzip: false,
only: ~w(css fonts images js favicon.ico robots.txt) only: ~w(css fonts images js favicon.ico robots.txt)
# Code reloading can be explicitly enabled under the # Code reloading can be explicitly enabled under the
@ -35,7 +35,7 @@ defmodule Chess.Endpoint do
# Set :encryption_salt if you would also like to encrypt it. # Set :encryption_salt if you would also like to encrypt it.
plug Plug.Session, plug Plug.Session,
store: :cookie, store: :cookie,
key: "_chess_phoenix_key", key: "_chess_key",
signing_salt: "9LqUhZTU" signing_salt: "9LqUhZTU"
plug Chess.Router plug Chess.Router

3
lib/chess/repo.ex Normal file
View File

@ -0,0 +1,3 @@
defmodule Chess.Repo do
use Ecto.Repo, otp_app: :chess
end

View File

@ -1,3 +0,0 @@
defmodule Chess.Repo do
use Ecto.Repo, otp_app: :chess_phoenix
end

View File

@ -2,7 +2,7 @@ defmodule Chess.Mixfile do
use Mix.Project use Mix.Project
def project do def project do
[app: :chess_phoenix, [app: :chess,
version: "0.0.1", version: "0.0.1",
elixir: "~> 1.2", elixir: "~> 1.2",
elixirc_paths: elixirc_paths(Mix.env), elixirc_paths: elixirc_paths(Mix.env),

View File

@ -20,5 +20,5 @@ defmodule Chess.Gettext do
See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage. See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage.
""" """
use Gettext, otp_app: :chess_phoenix use Gettext, otp_app: :chess
end end

View File

@ -17,6 +17,7 @@ defmodule Chess.Router do
pipe_through :browser # Use the default browser stack pipe_through :browser # Use the default browser stack
get "/", PageController, :index get "/", PageController, :index
resources "/games", GameController
end end
# Other scopes may use custom stacks. # Other scopes may use custom stacks.