Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
*

!/bin/
!/config/
!/db/
!/lib/
!/script/server
!/views/
!/.ruby-version
!/config.ru
Expand Down
5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ plugins:

AllCops:
Exclude:
- bin/**/*
- bin/puma
- bin/rake
- bin/rspec
- bin/rubocop
- config/**/*
- db/schema.rb
- vendor/**/*
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ RUN groupadd --system --gid 1000 fleetfocus-api && \
USER 1000:1000

EXPOSE 80
CMD ["script/server", "--port=80"]
CMD ["bin/puma", "config.ru", "--port=80"]
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ CHECKSUMS
bcrypt_pbkdf (1.1.2) sha256=c2414c23ce66869b3eb9f643d6a3374d8322dfb5078125c82792304c10b94cf6
bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd
builder (3.3.0) sha256=497918d2f9dca528fdca4b88d84e4ef4387256d984b8154e9d5d3fe5a9c8835f
bundler (4.0.12) sha256=7f8b757d28dfb636e7b24fba2344ac6dd13b5b24f4b46d62573d483f211825ac
bundler (4.0.13) sha256=19f08be7f27022cf0b89f27da0b044ae075e8270a9ef44ad248a932614e1ca3b
concurrent-ruby (1.3.6) sha256=6b56837e1e7e5292f9864f34b69c5a2cbc75c0cf5338f1ce9903d10fa762d5ab
connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
crass (1.0.6) sha256=dc516022a56e7b3b156099abc81b6d2b08ea1ed12676ac7a5657617f012bd45d
Expand Down Expand Up @@ -489,4 +489,4 @@ RUBY VERSION
ruby 3.4.8p72

BUNDLED WITH
4.0.6
4.0.13
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,20 @@ Setup
-----
1) Install ruby. (`rbenv install`)
2) Ensure you have [freetds](https://www.freetds.org/) installed. If you're on macOS, you can download this through homebrew: `brew install freetds`
3) Run the setup script. (`script/setup`)
3) Run the setup script. (`bin/setup`)
4) Place the credentials key file in `config/fleetfocus-api.key`. (Get from KeePass or another developer)

Scripts
-------
```bash
bin/bundle # install dependencies
bin/console # run irb
bin/dev # run development server - requires database tunnel
bin/rake # run tasks
bin/rspec # run specs
bin/rubocop # run linter
script/console # run irb
script/server # run server - requires database tunnel
script/setup # set up development environment
script/tunnel # open a database tunnel to the production server - requires ssh access, vpn connection, credentials key
bin/setup # set up development environment
bin/tunnel # open a database tunnel to the production server - requires ssh access, vpn connection, credentials key
```

License
Expand Down
109 changes: 0 additions & 109 deletions bin/bundle

This file was deleted.

File renamed without changes.
6 changes: 6 additions & 0 deletions bin/dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -e
cd "$(dirname "$0")/.."

bin/puma config.ru "$@"
16 changes: 16 additions & 0 deletions bin/puma
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
# The application 'puma' is installed as part of a gem, and
# this file is here to facilitate running it.
#

ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)

require "rubygems"
require "bundler/setup"

load Gem.bin_path("puma", "puma")
11 changes: 0 additions & 11 deletions bin/rake
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,6 @@

ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)

bundle_binstub = File.expand_path("bundle", __dir__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end

require "rubygems"
require "bundler/setup"

Expand Down
11 changes: 0 additions & 11 deletions bin/rspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,6 @@

ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)

bundle_binstub = File.expand_path("bundle", __dir__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end

require "rubygems"
require "bundler/setup"

Expand Down
11 changes: 0 additions & 11 deletions bin/rubocop
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,6 @@

ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)

bundle_binstub = File.expand_path("bundle", __dir__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end

require "rubygems"
require "bundler/setup"

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ production:
reconnect: true

# Because our application never writes to the database, you can tunnel
# through the production server to the prod database by running `script/tunnel`.
# through the production server to the prod database by running `bin/tunnel`.
#
# The MS-SQL username specified here only needs read-only access to the `FTK_MAIN` table.
development:
Expand Down
11 changes: 0 additions & 11 deletions script/server

This file was deleted.