-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (39 loc) · 1.18 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
.PHONY: test
help: # display Makefile commands
@awk 'BEGIN { FS = ":.*#"; print "Usage: make <target>\n\nTargets:" } \
/^[-_[:alpha:]]+:.?*#/ { printf " %-15s%s\n", $$1, $$2 }' $(MAKEFILE_LIST)
#######################
# Local development commands
#######################
run: # runs server on localhost
bin/rails server
console: # runs console
bin/rails console
test: # Run tests
bin/rails test
coverage: test # Run tests and open coverage report in default web browser
open coverage/index.html
#######################
# Documentation commands
#######################
annotate: # update Rails models documentation header
bundle exec annotate --models
docserver: # runs local documentation server
rm -rf .yardoc # Clears cache as it's sketchy af
yard server --reload
#######################
# Dependency commands
#######################
install: # Install dependencies
bundle install
outdated: # List outdated dependencies
bundle outdated
####################################
# Code quality and safety commands
####################################
lint:
bundle exec rubocop
lint-models:
bundle exec rubocop app/models
lint-controllers:
bundle exec rubocop app/controllers