-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtemplate.rb
More file actions
31 lines (23 loc) · 967 Bytes
/
template.rb
File metadata and controls
31 lines (23 loc) · 967 Bytes
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
$:.unshift File.dirname(__FILE__)
require 'helpers'
welcome = <<-STR
\n
Welcome to the JSONAPI Suite generator!
=======================================
This will take care of some boilerplate for you, like adding gem dependencies and rspec helpers.
If you're worried there might be too much magic here, feel free to run 'git diff' at the end to see what happened. You can also learn more at our documentation website, https://jsonapi-suite.github.io/jsonapi_suite
STR
say(set_color(welcome.rstrip, :cyan, :bold))
api_namespace
eval_template('gems')
eval_template('routes')
after_bundle do
run "bin/spring stop"
eval_template('rspec_install')
git :init
git add: '.'
eval_template('rspec')
rails_command("generate jsonapi_suite:install")
eval_template('swagger')
say(set_color("\nYou're all set! If you need help developing JSONAPI, please head to our documentation website: https://jsonapi-suite.github.io/jsonapi_suite\n", :green, :bold))
end