Skip to content

Commit 3a8a130

Browse files
committed
clean slate
Generate new webapp with webpacker Created with: rails new grape_doorkeeper --webpack -T -d postgresql more prep meh, added devise and things and add that back in too first passing spec broken documentation request spec wip wip update
1 parent 516df8f commit 3a8a130

File tree

155 files changed

+7778
-2358
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+7778
-2358
lines changed

.babelrc

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"presets": [
3+
["env", {
4+
"modules": false,
5+
"targets": {
6+
"browsers": "> 1%",
7+
"uglify": true
8+
},
9+
"useBuiltIns": true
10+
}]
11+
],
12+
13+
"plugins": [
14+
"syntax-dynamic-import",
15+
"transform-object-rest-spread",
16+
["transform-class-properties", { "spec": true }]
17+
]
18+
}

.gitignore

+21-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,29 @@
99

1010
# Ignore all logfiles and tempfiles.
1111
/log/*
12+
/tmp/*
1213
!/log/.keep
13-
/tmp
14+
!/tmp/.keep
1415

15-
# Ignore environmental variables
16+
# Ignore uploaded files in development
17+
/storage/*
18+
!/storage/.keep
19+
20+
/node_modules
21+
/yarn-error.log
22+
23+
/public/assets
24+
.byebug_history
25+
26+
# Ignore master key for decrypting credentials and more.
27+
/config/master.key
28+
/public/packs
29+
/public/packs-test
30+
/node_modules
31+
yarn-debug.log*
32+
.yarn-integrity
33+
34+
# Ignore legacy environmental variables
1635
.env
1736

1837
# Ignore rvm stuff and things

.postcssrc.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
plugins:
2+
postcss-import: {}
3+
postcss-cssnext: {}

.rspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--color
1+
--require spec_helper

.rubocop.yml

+23-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
AllCops:
2+
TargetRubyVersion:
3+
2.5
24
Exclude:
3-
- 'Guardfile'
4-
- 'bin/**/*'
5-
- 'node_modules/**/*'
6-
- 'db/schema.rb'
7-
- 'db/migrate/**/*'
5+
- "bin/**/*"
6+
- "db/schema.rb"
7+
- "db/migrate/**/*"
88

99
Style/Documentation:
1010
Enabled: false
1111

12+
FrozenStringLiteralComment:
13+
Enabled: false
14+
1215
Style/SymbolProc:
1316
Enabled: false
1417

@@ -20,3 +23,18 @@ Style/AndOr:
2023

2124
ParameterLists:
2225
CountKeywordArgs: false
26+
27+
# https://anti-pattern.com/always-use-double-quoted-strings-in-ruby
28+
Style/StringLiterals:
29+
EnforcedStyle: double_quotes # Always do it, lower cost cognitively
30+
31+
NumericLiterals:
32+
Enabled: false
33+
34+
Metrics/ModuleLength:
35+
Exclude:
36+
- "**/*_spec.rb"
37+
38+
Metrics/BlockLength:
39+
Exclude:
40+
- "**/*_spec.rb"

.ruby-gemset

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
grape-doorkeeper

.travis.yml

+18-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,29 @@
11
language: ruby
2+
services:
3+
- redis
4+
- postgres
25
addons:
3-
postgresql: '9.4'
6+
postgresql: "10"
7+
apt:
8+
packages:
9+
- postgresql-10
10+
- postgresql-client-10
11+
env:
12+
global:
13+
- PGPORT=5433
414
rvm:
5-
- 2.2.5
15+
- 2.5.1
616
before_install:
717
- gem install bundler -v 1.9.10
818
script:
919
- bundle exec rspec
20+
branches:
21+
only:
22+
- master # We want to build PRs, and merges to master
1023
before_script:
11-
- psql -c 'create database grape_doorkeeper_test' -U postgres
12-
- bundle exec rake db:schema:load
24+
- redis-cli info
25+
- psql -c 'create database grape_doorkeeper_test'
26+
- bundle exec rake db:structure:load
1327
cache: bundler
1428
notifications:
1529
email:

Gemfile

+62-58
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,81 @@
1-
ruby '2.2.5'
2-
source 'https://rubygems.org'
1+
source "https://rubygems.org"
2+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
33

4-
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
5-
gem 'rails', '4.2.7'
6-
# Use postgresql as the database for Active Record
7-
gem 'pg'
8-
gem 'sass'
9-
gem 'sass-rails', '~> 5.0'
10-
gem 'uglifier', '>= 2.7.2'
11-
gem 'coffee-rails', '~> 4.1.0'
4+
ruby "2.5.1"
125

13-
# Use jquery as the JavaScript library
14-
gem 'jquery-rails', '~> 4.0.4'
15-
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
16-
gem 'turbolinks'
6+
# Bundle edge Rails instead: gem "rails", github: "rails/rails"
7+
gem "rails", "~> 5.2.1"
8+
# Use postgresql as the database for Active Record
9+
gem "pg", ">= 0.18", "< 2.0"
10+
# Use Puma as the app server
11+
gem "puma", "~> 3.11"
1712

18-
# Use ActiveModel has_secure_password
19-
# gem 'bcrypt', '~> 3.1.7'
13+
# API stuff
14+
gem "active_model_serializers", "~> 0.8.3" # Use active model serializers to serialize JSON. Use version 0.8 because it supports caching
15+
gem "kaminari" # Pagination
16+
gem "grape", "~> 1.0.3" # DSL for APIs
17+
gem "grape_logging" # Ensuring we get logs from Grape
18+
gem "grape-swagger" # Swagger spec for Grape
19+
gem "api-pagination" # Paginate the APIs
20+
gem "rack-cors", require: "rack/cors" # Allow CORS access
2021

21-
# Basic running
22-
gem 'haml'
23-
gem 'puma'
24-
gem 'bootstrap-sass', '~> 3.3.1'
25-
gem 'devise'
26-
gem 'omniauth'
27-
gem 'omniauth-bike-index'
28-
gem 'devise-bootstrap-views'
29-
gem 'hashie-forbidden_attributes'
22+
# Redis, redis requirements
23+
gem "hiredis" # Redis driver for MRI
24+
gem "redis" # Redis itself
25+
gem "readthis" # caching (using redis)
26+
gem "sidekiq" # Background job processing (with redis)
27+
gem "sinatra" # Used for sidekiq web
28+
gem "sidekiq-failures" # Show sidekiq failures
3029

31-
# Store configuration options
32-
gem 'dotenv-rails'
30+
# Users
31+
gem "devise"
32+
gem "omniauth" # sign on with other services
33+
gem "omniauth-bike-index"
34+
gem "devise-bootstrap-views" # Make better user views
3335

36+
# Frontend things
37+
gem "sass-rails", "~> 5.0" # Use SCSS for stylesheets
38+
gem "uglifier", ">= 1.3.0" # Use Uglifier as compressor for JavaScript assets
39+
gem "webpacker" # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
40+
gem "turbolinks", "~> 5" # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
41+
gem "hamlit" # Faster haml templates
42+
gem "bootstrap" # Internet Style
43+
gem "jquery-rails" # We need jquery because bootstrap
3444

35-
# Authentication
36-
gem 'doorkeeper', '~> 2.2.2'
37-
gem 'wine_bouncer'
45+
gem "commonmarker" # Rendering markdown. Used to render readme on homepage
3846

39-
# Things tied in with Grade and swagger
40-
gem 'kramdown'
41-
gem 'kaminari'
42-
gem 'grape'
43-
gem 'grape_logging'
44-
gem 'active_model_serializers'
45-
gem 'grape-active_model_serializers'
46-
gem 'grape-swagger'
47-
gem 'api-pagination'
48-
gem 'rack-cors', require: 'rack/cors'
47+
# Reduces boot times through caching; required in config/boot.rb
48+
gem "bootsnap", ">= 1.1.0", require: false
4949

50-
# Temporarily remote branch because updates, for more info look at
51-
# https://github.com/d4be4st/swagger-ui_rails/pull/13
52-
gem 'swagger-ui_rails', github: 'audionerd/swagger-ui_rails'
50+
group :production do
51+
# Make logging - more useful and ingestible
52+
gem "lograge" # Structure log data, put it in single lines to improve the functionality
53+
gem "logstash-event" # Use logstash format for logging data
54+
end
5355

5456
group :development, :test do
55-
gem 'rspec-rails'
56-
gem 'shoulda-matchers', '~> 3.0', require: false
57-
gem 'foreman'
58-
gem 'rerun'
59-
gem 'vcr'
60-
gem 'rspec', '~>3.3.0'
61-
gem 'factory_girl_rails'
62-
gem 'pry'
63-
gem 'growl'
64-
gem 'guard'
65-
gem 'guard-rubocop'
66-
gem 'guard-rspec', '4.2.8'
67-
gem 'guard-livereload'
57+
gem "foreman" # Process runner for local work
58+
gem "rspec-rails" # Test framework
59+
gem "factory_bot_rails" # mocking/stubbing
6860
end
6961

7062
group :development do
63+
# Access an interactive console on exception pages or by calling "console" anywhere in the code.
64+
gem "web-console", ">= 3.3.0"
65+
gem "listen", ">= 3.0.5", "< 3.2"
7166
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
72-
gem 'spring'
67+
gem "spring"
68+
gem "spring-watcher-listen", "~> 2.0.0"
7369
end
7470

7571
group :test do
76-
gem 'database_cleaner'
72+
gem "guard", "~> 2.13.0", require: false
73+
gem "guard-rspec", "~> 4.6.4", require: false
74+
gem "guard-rubocop", require: false
75+
gem "rails-controller-testing" # Assert testing views
7776
end
77+
78+
# Performance Stuff
79+
gem "fast_blank" # high performance replacement String#blank? a method that is called quite frequently in ActiveRecord
80+
gem "flamegraph", require: false
81+
gem "rack-mini-profiler", require: false # If you can't see it you can't make it better

0 commit comments

Comments
 (0)