This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule AddPortWeb.Adapter do | |
@moduledoc """ | |
The Cowboy2 adapter for Phoenix. | |
## Endpoint configuration | |
This adapter uses the following endpoint configuration: | |
* `:http` - the configuration for the HTTP server. It accepts all options | |
as defined by [`Plug.Cowboy`](https://hexdocs.pm/plug_cowboy/). Defaults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
# | |
# rc.local | |
# | |
# This script is executed at the end of each multiuser runlevel. | |
# Make sure that the script will "exit 0" on success or any other | |
# value on error. | |
# | |
# In order to enable or disable this script just change the execution | |
# bits. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rails_helper' | |
describe DocumentsController do | |
it 'uploads a file' do | |
post :create, document: { | |
name: 'test', | |
doc: Rack::Test::UploadedFileData.new( | |
"some content", | |
"test.txt", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :deploy do | |
Rake::Task["deploy:compile_assets"].clear_actions | |
task :compile_assets => [:set_rails_env] do | |
run_locally do | |
if capture("git --no-pager diff #{fetch(:previous_revision)} #{fetch(:current_revision)} app/assets vendor/assets").empty? | |
info "Skipping assets compilation" | |
else | |
invoke 'deploy:assets:precompile' | |
invoke 'deploy:assets:backup_manifest' | |
end |