Skip to content

Commit

Permalink
cy spec and boot
Browse files Browse the repository at this point in the history
task bot selector with segment comprator

Update task_bot_spec.js

Update .travis.yml

use pg 11

Update .travis.yml

Update package.json

parallel build

Update package.json

Cleaner

update db cleaner

update travis chrome

batch loader disable on message

batch loader again and middleware
  • Loading branch information
michelson committed Jul 12, 2020
1 parent 1652e9e commit e9a8d57
Show file tree
Hide file tree
Showing 18 changed files with 485 additions and 187 deletions.
15 changes: 11 additions & 4 deletions .travis.yml
@@ -1,27 +1,34 @@
language: ruby
#addons:
# chrome: stable
addons:
postgresql: 11
chrome: stable
apt:
packages:
# Ubuntu 16+ does not install this dependency by default, so we need to install it ourselves
- libgconf-2-4
- postgresql-11
- postgresql-client-11

services:
- postgresql
- redis-server
env:
global:
- NODE_ENV=test
- PGPORT=5433
cache:
bundler: true
directories:
- node_modules
npm: true
yarn: true
directories:
- node_modules
- ~/.cache
before_install:
- gem update --system
- gem install bundler -v 1.17.3
- nvm install 10.13.0
#- google-chrome-beta --headless --disable-gpu --remote-debugging-port=9222 http://localhost &

before_script:
- cp config/database.yml.travis config/database.yml
- cp ./config/webpacker.ci.yml ./config/webpacker.yml
Expand Down
3 changes: 2 additions & 1 deletion Gemfile
Expand Up @@ -147,7 +147,8 @@ group :test do
gem lib # , :git => "https://github.com/rspec/#{lib}.git", :branch => 'master'
end
gem 'brakeman'
gem 'database_cleaner'
gem 'database_cleaner-active_record'
gem 'database_cleaner-redis'
gem 'factory_bot_rails'
gem 'rubocop', '~> 0.76.0', require: false
gem 'rubocop-performance', require: false
Expand Down
15 changes: 11 additions & 4 deletions Gemfile.lock
Expand Up @@ -123,7 +123,7 @@ GEM
xml-simple
aws-sigv4 (1.2.1)
aws-eventstream (~> 1, >= 1.0.2)
batch-loader (1.4.1)
batch-loader (1.5.0)
bcrypt (3.1.13)
bindex (0.8.1)
biz (1.8.2)
Expand Down Expand Up @@ -169,9 +169,15 @@ GEM
crass (1.0.6)
css_parser (1.7.0)
addressable
cypress-on-rails (1.6.0)
cypress-on-rails (1.7.0)
rack
database_cleaner (1.7.0)
database_cleaner (1.8.5)
database_cleaner-active_record (1.8.0)
activerecord
database_cleaner (~> 1.8.0)
database_cleaner-redis (1.8.0)
database_cleaner (~> 1.8.0)
redis
deep_cloneable (3.0.0)
activerecord (>= 3.1.0, < 7)
devise (4.7.1)
Expand Down Expand Up @@ -555,7 +561,8 @@ DEPENDENCIES
capistrano3-puma
chronic (~> 0.10.2)
cypress-on-rails (~> 1.0)
database_cleaner
database_cleaner-active_record
database_cleaner-redis
deep_cloneable
devise (= 4.7.1)
devise_invitable (~> 2.0)
Expand Down
5 changes: 4 additions & 1 deletion app/graphql/types/conversation_part_type.rb
Expand Up @@ -39,12 +39,15 @@ def app_user
end

def message
# object.messageable
id = object.messageable_id
key = object.messageable_type

BatchLoader::GraphQL.for(id).batch(key: key) do |ids, loader, args|
model = Object.const_get(args[:key])
model.where(id: ids).each { |record| loader.call(record.id, record) }
model.where(id: ids).each { |record|
loader.call(record.id, record)
}
end
end
end
Expand Down

0 comments on commit e9a8d57

Please sign in to comment.