Skip to content
Open
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
18 changes: 18 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": "> 1%",
"uglify": true
},
"useBuiltIns": true
}]
],

"plugins": [
"syntax-dynamic-import",
"transform-object-rest-spread",
["transform-class-properties", { "spec": true }]
]
}
23 changes: 21 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,29 @@

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
/tmp
!/tmp/.keep

# Ignore environmental variables
# Ignore uploaded files in development
/storage/*
!/storage/.keep

/node_modules
/yarn-error.log

/public/assets
.byebug_history

# Ignore master key for decrypting credentials and more.
/config/master.key
/public/packs
/public/packs-test
/node_modules
yarn-debug.log*
.yarn-integrity

# Ignore legacy environmental variables
.env

# Ignore rvm stuff and things
Expand Down
3 changes: 3 additions & 0 deletions .postcssrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins:
postcss-import: {}
postcss-cssnext: {}
2 changes: 1 addition & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--color
--require spec_helper
28 changes: 23 additions & 5 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
AllCops:
TargetRubyVersion:
2.5
Exclude:
- 'Guardfile'
- 'bin/**/*'
- 'node_modules/**/*'
- 'db/schema.rb'
- 'db/migrate/**/*'
- "bin/**/*"
- "db/schema.rb"
- "db/migrate/**/*"

Style/Documentation:
Enabled: false

FrozenStringLiteralComment:
Enabled: false

Style/SymbolProc:
Enabled: false

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

ParameterLists:
CountKeywordArgs: false

# https://anti-pattern.com/always-use-double-quoted-strings-in-ruby
Style/StringLiterals:
EnforcedStyle: double_quotes # Always do it, lower cost cognitively

NumericLiterals:
Enabled: false

Metrics/ModuleLength:
Exclude:
- "**/*_spec.rb"

Metrics/BlockLength:
Exclude:
- "**/*_spec.rb"
1 change: 1 addition & 0 deletions .ruby-gemset
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
grape-doorkeeper
22 changes: 18 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
language: ruby
services:
- redis
- postgres
addons:
postgresql: '9.4'
postgresql: "10"
apt:
packages:
- postgresql-10
- postgresql-client-10
env:
global:
- PGPORT=5433
rvm:
- 2.2.5
- 2.5.1
before_install:
- gem install bundler -v 1.9.10
script:
- bundle exec rspec
branches:
only:
- master # We want to build PRs, and merges to master
before_script:
- psql -c 'create database grape_doorkeeper_test' -U postgres
- bundle exec rake db:schema:load
- redis-cli info
- psql -c 'create database grape_doorkeeper_test'
- bundle exec rake db:structure:load
cache: bundler
notifications:
email:
Expand Down
120 changes: 62 additions & 58 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,77 +1,81 @@
ruby '2.2.5'
source 'https://rubygems.org'
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.7'
# Use postgresql as the database for Active Record
gem 'pg'
gem 'sass'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 2.7.2'
gem 'coffee-rails', '~> 4.1.0'
ruby "2.5.1"

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

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

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

# Store configuration options
gem 'dotenv-rails'
# Users
gem "devise"
gem "omniauth" # sign on with other services
gem "omniauth-bike-index"
gem "devise-bootstrap-views" # Make better user views

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

# Authentication
gem 'doorkeeper', '~> 2.2.2'
gem 'wine_bouncer'
gem "commonmarker" # Rendering markdown. Used to render readme on homepage

# Things tied in with Grade and swagger
gem 'kramdown'
gem 'kaminari'
gem 'grape'
gem 'grape_logging'
gem 'active_model_serializers'
gem 'grape-active_model_serializers'
gem 'grape-swagger'
gem 'api-pagination'
gem 'rack-cors', require: 'rack/cors'
# Reduces boot times through caching; required in config/boot.rb
gem "bootsnap", ">= 1.1.0", require: false

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

group :development, :test do
gem 'rspec-rails'
gem 'shoulda-matchers', '~> 3.0', require: false
gem 'foreman'
gem 'rerun'
gem 'vcr'
gem 'rspec', '~>3.3.0'
gem 'factory_girl_rails'
gem 'pry'
gem 'growl'
gem 'guard'
gem 'guard-rubocop'
gem 'guard-rspec', '4.2.8'
gem 'guard-livereload'
gem "foreman" # Process runner for local work
gem "rspec-rails" # Test framework
gem "factory_bot_rails" # mocking/stubbing
end

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

group :test do
gem 'database_cleaner'
gem "guard", "~> 2.13.0", require: false
gem "guard-rspec", "~> 4.6.4", require: false
gem "guard-rubocop", require: false
gem "rails-controller-testing" # Assert testing views
end

# Performance Stuff
gem "fast_blank" # high performance replacement String#blank? a method that is called quite frequently in ActiveRecord
gem "flamegraph", require: false
gem "rack-mini-profiler", require: false # If you can't see it you can't make it better
Loading