Skip to content

Commit 232f688

Browse files
author
Bobby Shannon
committed
Add missing files
1 parent b24a149 commit 232f688

File tree

14 files changed

+161
-0
lines changed

14 files changed

+161
-0
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# API
2+
Commits pushed to the <b>master</b> branch are automatically deployed to [https://api.stratusprint.com](https://api.stratusprint.com).
3+
4+
Commits pushed to the <b>dev</b> branch are automatically deployed to [https://dev.api.stratusprint.com](https://dev.api.stratusprint.com).
5+
6+
Running locally
7+
---------------
8+
0. If you have not done so already, install both [Vagrant](http://www.vagrantup.com) and [VirtualBox](http://www.virtualbox.org).
9+
10+
1. Clone this repo:
11+
```sh
12+
git clone git@github.com:StratusPrint/API.git
13+
```
14+
15+
2. Start the virtual machine:
16+
```sh
17+
vagrant up
18+
```
19+
20+
3. SSH in to the virtual machine:
21+
```sh
22+
vagrant ssh
23+
```
24+
25+
4. Access the the API locally at [http://localhost:8081/](http://localhost:8081/)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Be sure to restart your server when you modify this file. Action Cable runs in a loop that does not support auto reloading.
2+
module ApplicationCable
3+
class Channel < ActionCable::Channel::Base
4+
end
5+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Be sure to restart your server when you modify this file. Action Cable runs in a loop that does not support auto reloading.
2+
module ApplicationCable
3+
class Connection < ActionCable::Connection::Base
4+
end
5+
end

app/jobs/application_job.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
class ApplicationJob < ActiveJob::Base
2+
end

app/mailers/application_mailer.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
class ApplicationMailer < ActionMailer::Base
2+
default from: 'from@example.com'
3+
layout 'mailer'
4+
end

app/models/application_record.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class ApplicationRecord < ActiveRecord::Base
2+
self.abstract_class = true
3+
end

bin/update

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env ruby
2+
require 'pathname'
3+
require 'fileutils'
4+
include FileUtils
5+
6+
# path to your application root.
7+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
8+
9+
def system!(*args)
10+
system(*args) || abort("\n== Command #{args} failed ==")
11+
end
12+
13+
chdir APP_ROOT do
14+
# This script is a way to update your development environment automatically.
15+
# Add necessary update steps to this file.
16+
17+
puts '== Installing dependencies =='
18+
system! 'gem install bundler --conservative'
19+
system 'bundle check' or system! 'bundle install'
20+
21+
puts "\n== Updating database =="
22+
system! 'bin/rails db:migrate'
23+
24+
puts "\n== Removing old logs and tempfiles =="
25+
system! 'bin/rails log:clear tmp:clear'
26+
27+
puts "\n== Restarting application server =="
28+
system! 'bin/rails restart'
29+
end

config/cable.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Action Cable uses Redis by default to administer connections, channels, and sending/receiving messages over the WebSocket.
2+
production:
3+
adapter: redis
4+
url: redis://localhost:6379/1
5+
6+
development:
7+
adapter: async
8+
9+
test:
10+
adapter: async
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Be sure to restart your server when you modify this file.
2+
3+
# Require `belongs_to` associations by default. This is a new Rails 5.0
4+
# default, so it is introduced as a configuration option to ensure that apps
5+
# made on earlier versions of Rails are not affected when upgrading.
6+
Rails.application.config.active_record.belongs_to_required_by_default = true
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Be sure to restart your server when you modify this file.
2+
3+
# ApplicationController.renderer.defaults.merge!(
4+
# http_host: 'example.org',
5+
# https: false
6+
# )

0 commit comments

Comments
 (0)