This commit is contained in:
chenjing 2019-07-08 15:04:00 +08:00
parent 5947763ba5
commit 7deadfebdd
11 changed files with 54 additions and 10 deletions

View File

@ -6,9 +6,9 @@ ruby '2.6.2'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.3'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.11'
gem 'redis', '~> 4.0'
gem 'redis-rails', '~> 5'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets

View File

@ -143,6 +143,23 @@ GEM
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
ffi (~> 1.0)
redis (4.1.1)
redis-actionpack (5.0.2)
actionpack (>= 4.0, < 6)
redis-rack (>= 1, < 3)
redis-store (>= 1.1.0, < 2)
redis-activesupport (5.0.7)
activesupport (>= 3, < 6)
redis-store (>= 1.3, < 2)
redis-rack (2.0.5)
rack (>= 1.5, < 3)
redis-store (>= 1.2, < 2)
redis-rails (5.0.2)
redis-actionpack (>= 5.0, < 6)
redis-activesupport (>= 5.0, < 6)
redis-store (>= 1.2, < 2)
redis-store (1.6.0)
redis (>= 2.2, < 5)
regexp_parser (1.5.1)
ruby_dep (1.5.0)
rubyzip (1.2.3)
@ -171,7 +188,6 @@ GEM
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.4.1)
thor (0.20.3)
thread_safe (0.3.6)
tilt (2.0.9)
@ -207,11 +223,12 @@ DEPENDENCIES
pry-rails
puma (~> 3.11)
rails (~> 5.2.3)
redis (~> 4.0)
redis-rails (~> 5)
sass-rails (~> 5.0)
selenium-webdriver
spring
spring-watcher-listen (~> 2.0.0)
sqlite3
turbolinks (~> 5)
tzinfo-data
uglifier (>= 1.3.0)

View File

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

View File

@ -0,0 +1,3 @@
// Place all the styles related to the invote controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@ -0,0 +1,10 @@
class InvoteController < ApplicationController
def show
end
def create
end
end

View File

@ -0,0 +1,2 @@
module InvoteHelper
end

View File

@ -0,0 +1 @@
asd

View File

@ -17,7 +17,7 @@ Rails.application.configure do
# Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
# config.require_master_key = true
config.cache_store = :redis_store, ENV["REDIS_URL"]
# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?

View File

@ -1,3 +1,6 @@
Rails.application.routes.draw do
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
resource :invote
root "invote#show"
end

View File

@ -7,11 +7,9 @@ services:
context: .
dockerfile: ./docker/app/DockerFile
depends_on:
- db
db:
image: sqlite3
volumes:
- sqlite_data:/var/lib/sqlite/data
- redis
redis:
image: redis:alpine
web:
build:
context: .

View File

@ -0,0 +1,7 @@
require 'test_helper'
class InvoteControllerTest < ActionDispatch::IntegrationTest
# test "the truth" do
# assert true
# end
end