Add test for Rails Redis cookie store integration
This commit is contained in:
parent
5bd2f5a339
commit
710a8c1115
|
@ -24,7 +24,7 @@ auth_fail_block: never
|
|||
# person: people
|
||||
# sheep: sheep
|
||||
|
||||
auth:
|
||||
auth:
|
||||
# Can be 'rails' or 'jwt'
|
||||
type: rails
|
||||
cookie: _app_session
|
||||
|
@ -40,12 +40,12 @@ auth:
|
|||
|
||||
# Found in 'Rails.application.config.secret_key_base'
|
||||
secret_key_base: 0a248500a64c01184edbf8097ac...
|
||||
|
||||
|
||||
# Remote cookie store. (memcache or redis)
|
||||
# url: redis://127.0.0.1:6379
|
||||
# password: test
|
||||
# max_idle: 80,
|
||||
# max_active: 12000,
|
||||
# url: redis://redis:6379
|
||||
# password: ""
|
||||
# max_idle: 80
|
||||
# max_active: 12000
|
||||
|
||||
# In most cases you don't need these
|
||||
# salt: "encrypted cookie"
|
||||
|
@ -66,20 +66,20 @@ database:
|
|||
dbname: app_development
|
||||
user: postgres
|
||||
password: ''
|
||||
|
||||
|
||||
#schema: "public"
|
||||
#pool_size: 10
|
||||
#max_retries: 0
|
||||
#log_level: "debug"
|
||||
#log_level: "debug"
|
||||
|
||||
# Define variables here that you want to use in filters
|
||||
# Define variables here that you want to use in filters
|
||||
variables:
|
||||
account_id: "select account_id from users where id = $user_id"
|
||||
|
||||
# Define defaults to for the field key and values below
|
||||
defaults:
|
||||
filter: ["{ user_id: { eq: $user_id } }"]
|
||||
|
||||
|
||||
# Fields and table names that you wish to block
|
||||
blacklist:
|
||||
- ar_internal_metadata
|
||||
|
@ -99,10 +99,10 @@ database:
|
|||
filter: [
|
||||
"{ price: { gt: 0 } }",
|
||||
"{ price: { lt: 8 } }"
|
||||
]
|
||||
]
|
||||
|
||||
- name: customers
|
||||
# No filter is used for this field not
|
||||
# No filter is used for this field not
|
||||
# even defaults.filter
|
||||
filter: none
|
||||
|
||||
|
@ -113,4 +113,4 @@ database:
|
|||
filter: ["{ id: { eq: $user_id } }"]
|
||||
|
||||
# - name: posts
|
||||
# filter: ["{ account_id: { _eq: $account_id } }"]
|
||||
# filter: ["{ account_id: { _eq: $account_id } }"]
|
||||
|
|
|
@ -3,6 +3,12 @@ services:
|
|||
db:
|
||||
image: postgres
|
||||
|
||||
# redis:
|
||||
# image: redis:alpine
|
||||
# command: ["redis-server", "--appendonly", "yes"]
|
||||
# ports:
|
||||
# - "6379:6379"
|
||||
|
||||
super_graph:
|
||||
build:
|
||||
context: .
|
||||
|
@ -17,7 +23,7 @@ services:
|
|||
- .:/app
|
||||
working_dir: /app
|
||||
command: fresh -c fresh.conf
|
||||
|
||||
|
||||
web:
|
||||
build: rails-app/.
|
||||
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
|
||||
|
@ -27,4 +33,5 @@ services:
|
|||
- "3000:3000"
|
||||
depends_on:
|
||||
- db
|
||||
- super_graph
|
||||
- super_graph
|
||||
- redis
|
||||
|
|
|
@ -6,8 +6,9 @@ module.exports = {
|
|||
logo: '/hero.png',
|
||||
nav: [
|
||||
{ text: 'Guide', link: '/guide' },
|
||||
{ text: 'Install', link: '/install' },
|
||||
{ text: 'Github', link: 'https://github.com/dosco/super-graph' },
|
||||
{ text: 'Docker', link: 'https://hub.docker.com/r/dosco/super-graph/builds' },
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,11 +4,11 @@ build_name: runner-build
|
|||
build_log: runner-build-errors.log
|
||||
valid_ext: .go, .tpl, .tmpl, .html, .yml
|
||||
no_rebuild_ext: .tpl, .tmpl, .html
|
||||
ignored: web, tmp, vendor, demo, docs
|
||||
ignored: web, tmp, vendor, rails-app, docs
|
||||
build_delay: 600
|
||||
colors: 1
|
||||
log_color_main: cyan
|
||||
log_color_build: yellow
|
||||
log_color_runner: green
|
||||
log_color_watcher: magenta
|
||||
log_color_app:
|
||||
log_color_app:
|
||||
|
|
|
@ -63,3 +63,5 @@ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
|||
|
||||
gem 'devise'
|
||||
gem 'faker', :git => 'https://github.com/stympy/faker.git', :branch => 'master'
|
||||
gem 'redis-rails'
|
||||
|
||||
|
|
|
@ -165,6 +165,23 @@ GEM
|
|||
rb-fsevent (0.10.3)
|
||||
rb-inotify (0.10.0)
|
||||
ffi (~> 1.0)
|
||||
redis (4.1.0)
|
||||
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.3.0)
|
||||
responders (2.4.1)
|
||||
actionpack (>= 4.2.0, < 6.0)
|
||||
|
@ -251,6 +268,7 @@ DEPENDENCIES
|
|||
pg (>= 0.18, < 2.0)
|
||||
puma (~> 3.11)
|
||||
rails (~> 5.2.2, >= 5.2.2.1)
|
||||
redis-rails
|
||||
sass-rails (~> 5.0)
|
||||
selenium-webdriver
|
||||
spring
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
# Rails.application.config.session_store :redis_store,
|
||||
# servers: ["redis://redis:6379/0/session"],
|
||||
# expire_after: 90.minutes,
|
||||
# key: "_app_session",
|
||||
# threadsafe: false
|
|
@ -34,7 +34,10 @@ class App extends Component {
|
|||
endpoint="/api/v1/graphql"
|
||||
settings={{
|
||||
'schema.polling.enable': false,
|
||||
'request.credentials': 'include'
|
||||
'request.credentials': 'include',
|
||||
'general.betaUpdates': true,
|
||||
'editor.reuseHeaders': true,
|
||||
'editor.theme': 'dark'
|
||||
}}
|
||||
/>
|
||||
</Provider>
|
||||
|
|
Loading…
Reference in New Issue