diff --git a/.circleci/config.yml b/.circleci/config.yml
index 7b72fb0c0..9579c23a8 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -7,7 +7,7 @@ defaults: &defaults
working_directory: ~/build
docker:
# specify the version you desire here
- - image: circleci/ruby:2.7.0-node-browsers
+ - image: circleci/ruby:2.7.1-node-browsers
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
diff --git a/.env.example b/.env.example
index b80e3577d..d4fb1ea12 100644
--- a/.env.example
+++ b/.env.example
@@ -73,10 +73,6 @@ RAILS_LOG_TO_STDOUT=true
LOG_LEVEL=info
LOG_SIZE=500
-# Credentials to access sidekiq dashboard in production
-SIDEKIQ_AUTH_USERNAME=
-SIDEKIQ_AUTH_PASSWORD=
-
### This environment variables are only required if you are setting up social media channels
#facebook
FB_VERIFY_TOKEN=
@@ -106,3 +102,10 @@ CHARGEBEE_WEBHOOK_PASSWORD=
## generate a new key value here : https://d3v.one/vapid-key-generator/
# VAPID_PUBLIC_KEY=
# VAPID_PRIVATE_KEY=
+
+## Bot Customizations
+USE_INBOX_AVATAR_FOR_BOT=true
+
+## Development Only Config
+# if you want to use letter_opener for local emails
+# LETTER_OPENER=true
diff --git a/.rubocop.yml b/.rubocop.yml
index 8d2405e3f..fac44c67a 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -12,6 +12,8 @@ Layout/LineLength:
Max: 150
Metrics/ClassLength:
Max: 125
+ Exclude:
+ - 'app/models/conversation.rb'
RSpec/ExampleLength:
Max: 25
Style/Documentation:
@@ -30,6 +32,7 @@ Style/GlobalVars:
Exclude:
- 'config/initializers/redis.rb'
- 'lib/redis/alfred.rb'
+ - 'lib/global_config.rb'
Metrics/BlockLength:
Exclude:
- spec/**/*
@@ -94,6 +97,8 @@ Rails/UniqueValidationWithoutIndex:
Exclude:
- 'app/models/channel/twitter_profile.rb'
- 'app/models/webhook.rb'
+RSpec/NamedSubject:
+ Enabled: false
AllCops:
Exclude:
- 'bin/**/*'
diff --git a/.ruby-version b/.ruby-version
index 24ba9a38d..860487ca1 100644
--- a/.ruby-version
+++ b/.ruby-version
@@ -1 +1 @@
-2.7.0
+2.7.1
diff --git a/.scss-lint.yml b/.scss-lint.yml
index 9f5f4fe10..481d94c70 100644
--- a/.scss-lint.yml
+++ b/.scss-lint.yml
@@ -177,6 +177,8 @@ linters:
allow_element_with_attribute: false
allow_element_with_class: false
allow_element_with_id: false
+ exclude:
+ - 'app/assets/stylesheets/administrate/components/_buttons.scss'
SelectorDepth:
enabled: true
@@ -279,3 +281,4 @@ linters:
exclude:
- 'app/javascript/widget/assets/scss/_reset.scss'
- 'app/javascript/widget/assets/scss/sdk.css'
+ - 'app/assets/stylesheets/administrate/reset/_normalize.scss'
diff --git a/Gemfile b/Gemfile
index e8e2fa85b..50e3e2ce8 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,6 +1,6 @@
source 'https://rubygems.org'
-ruby '2.7.0'
+ruby '2.7.1'
##-- base gems for rails --##
gem 'rack-cors', require: 'rack/cors'
@@ -49,6 +49,8 @@ gem 'devise_token_auth'
# authorization
gem 'jwt'
gem 'pundit'
+# super admin
+gem 'administrate'
##--- gems for pubsub service ---##
# https://karolgalanciak.com/blog/2019/11/30/from-activerecord-callbacks-to-publish-slash-subscribe-pattern-and-event-driven-design/
@@ -62,7 +64,8 @@ gem 'facebook-messenger'
gem 'telegram-bot-ruby'
gem 'twilio-ruby', '~> 5.32.0'
# twitty will handle subscription of twitter account events
-gem 'twitty', git: 'https://github.com/chatwoot/twitty'
+# gem 'twitty', git: 'https://github.com/chatwoot/twitty'
+gem 'twitty'
# facebook client
gem 'koala'
# Random name generator
diff --git a/Gemfile.lock b/Gemfile.lock
index f26503fa4..48e4e12a8 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,10 +1,3 @@
-GIT
- remote: https://github.com/chatwoot/twitty
- revision: af4f3e45dca55e42c64f7741a1fedfaa94d36419
- specs:
- twitty (0.1.0)
- oauth
-
GIT
remote: https://github.com/sds/mock_redis
revision: 16d00789f0341a3aac35126c0ffe97a596753ff9
@@ -25,85 +18,98 @@ GEM
specs:
action-cable-testing (0.6.1)
actioncable (>= 5.0)
- actioncable (6.0.2.2)
- actionpack (= 6.0.2.2)
+ actioncable (6.0.3.1)
+ actionpack (= 6.0.3.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
- actionmailbox (6.0.2.2)
- actionpack (= 6.0.2.2)
- activejob (= 6.0.2.2)
- activerecord (= 6.0.2.2)
- activestorage (= 6.0.2.2)
- activesupport (= 6.0.2.2)
+ actionmailbox (6.0.3.1)
+ actionpack (= 6.0.3.1)
+ activejob (= 6.0.3.1)
+ activerecord (= 6.0.3.1)
+ activestorage (= 6.0.3.1)
+ activesupport (= 6.0.3.1)
mail (>= 2.7.1)
- actionmailer (6.0.2.2)
- actionpack (= 6.0.2.2)
- actionview (= 6.0.2.2)
- activejob (= 6.0.2.2)
+ actionmailer (6.0.3.1)
+ actionpack (= 6.0.3.1)
+ actionview (= 6.0.3.1)
+ activejob (= 6.0.3.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
- actionpack (6.0.2.2)
- actionview (= 6.0.2.2)
- activesupport (= 6.0.2.2)
+ actionpack (6.0.3.1)
+ actionview (= 6.0.3.1)
+ activesupport (= 6.0.3.1)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
- actiontext (6.0.2.2)
- actionpack (= 6.0.2.2)
- activerecord (= 6.0.2.2)
- activestorage (= 6.0.2.2)
- activesupport (= 6.0.2.2)
+ actiontext (6.0.3.1)
+ actionpack (= 6.0.3.1)
+ activerecord (= 6.0.3.1)
+ activestorage (= 6.0.3.1)
+ activesupport (= 6.0.3.1)
nokogiri (>= 1.8.5)
- actionview (6.0.2.2)
- activesupport (= 6.0.2.2)
+ actionview (6.0.3.1)
+ activesupport (= 6.0.3.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
- activejob (6.0.2.2)
- activesupport (= 6.0.2.2)
+ activejob (6.0.3.1)
+ activesupport (= 6.0.3.1)
globalid (>= 0.3.6)
- activemodel (6.0.2.2)
- activesupport (= 6.0.2.2)
- activerecord (6.0.2.2)
- activemodel (= 6.0.2.2)
- activesupport (= 6.0.2.2)
- activestorage (6.0.2.2)
- actionpack (= 6.0.2.2)
- activejob (= 6.0.2.2)
- activerecord (= 6.0.2.2)
+ activemodel (6.0.3.1)
+ activesupport (= 6.0.3.1)
+ activerecord (6.0.3.1)
+ activemodel (= 6.0.3.1)
+ activesupport (= 6.0.3.1)
+ activestorage (6.0.3.1)
+ actionpack (= 6.0.3.1)
+ activejob (= 6.0.3.1)
+ activerecord (= 6.0.3.1)
marcel (~> 0.3.1)
- activesupport (6.0.2.2)
+ activesupport (6.0.3.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
- zeitwerk (~> 2.2)
+ zeitwerk (~> 2.2, >= 2.2.2)
acts-as-taggable-on (6.5.0)
activerecord (>= 5.0, < 6.1)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
+ administrate (0.13.0)
+ actionpack (>= 4.2)
+ actionview (>= 4.2)
+ activerecord (>= 4.2)
+ autoprefixer-rails (>= 6.0)
+ datetime_picker_rails (~> 0.0.7)
+ jquery-rails (>= 4.0)
+ kaminari (>= 1.0)
+ momentjs-rails (~> 2.8)
+ sassc-rails (~> 2.1)
+ selectize-rails (~> 0.6)
annotate (3.1.1)
activerecord (>= 3.2, < 7.0)
rake (>= 10.4, < 14.0)
ast (2.4.0)
attr_extras (6.2.3)
+ autoprefixer-rails (9.7.6)
+ execjs
aws-eventstream (1.1.0)
- aws-partitions (1.296.0)
- aws-sdk-core (3.94.0)
+ aws-partitions (1.317.0)
+ aws-sdk-core (3.96.1)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
- aws-sdk-kms (1.30.0)
+ aws-sdk-kms (1.31.0)
aws-sdk-core (~> 3, >= 3.71.0)
aws-sigv4 (~> 1.1)
- aws-sdk-s3 (1.61.2)
- aws-sdk-core (~> 3, >= 3.83.0)
+ aws-sdk-s3 (1.65.0)
+ aws-sdk-core (~> 3, >= 3.96.1)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
- aws-sigv4 (1.1.1)
+ aws-sigv4 (1.1.3)
aws-eventstream (~> 1.0, >= 1.0.2)
axiom-types (0.1.1)
descendants_tracker (~> 0.0.4)
@@ -120,8 +126,8 @@ GEM
bindex (0.8.1)
bootsnap (1.4.6)
msgpack (~> 1.0)
- brakeman (4.8.1)
- browser (4.0.0)
+ brakeman (4.8.2)
+ browser (4.1.0)
builder (3.2.4)
bullet (6.1.0)
activesupport (>= 3.0.0)
@@ -131,7 +137,7 @@ GEM
bundler-audit (0.6.1)
bundler (>= 1.2.0, < 3)
thor (~> 0.18)
- byebug (11.1.1)
+ byebug (11.1.3)
chargebee (2.7.5)
json_pure (~> 2.1)
rest-client (>= 1.8, < 3.0)
@@ -141,6 +147,8 @@ GEM
concurrent-ruby (1.1.6)
connection_pool (2.2.2)
crass (1.0.6)
+ datetime_picker_rails (0.0.7)
+ momentjs-rails (>= 2.8.1)
declarative (0.0.10)
declarative-option (0.1.0)
descendants_tracker (0.0.4)
@@ -167,13 +175,13 @@ GEM
equalizer (0.0.11)
erubi (1.9.0)
execjs (2.7.0)
- facebook-messenger (1.4.1)
+ facebook-messenger (1.5.0)
httparty (~> 0.13, >= 0.13.7)
rack (>= 1.4.5)
- factory_bot (5.1.2)
+ factory_bot (5.2.0)
activesupport (>= 4.2.0)
- factory_bot_rails (5.1.1)
- factory_bot (~> 5.1.0)
+ factory_bot_rails (5.2.0)
+ factory_bot (~> 5.2.0)
railties (>= 4.2.0)
faker (2.11.0)
i18n (>= 1.6, < 2)
@@ -186,7 +194,7 @@ GEM
foreman (0.87.1)
globalid (0.4.2)
activesupport (>= 4.2.0)
- google-api-client (0.38.0)
+ google-api-client (0.39.4)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 0.9)
httpclient (>= 2.8.1, < 3.0)
@@ -200,7 +208,7 @@ GEM
google-cloud-env (1.3.1)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.0.0)
- google-cloud-storage (1.26.0)
+ google-cloud-storage (1.26.1)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-api-client (~> 0.33)
@@ -217,7 +225,7 @@ GEM
groupdate (5.0.0)
activesupport (>= 5)
haikunator (1.1.0)
- hana (1.3.5)
+ hana (1.3.6)
hashie (4.1.0)
hkdf (0.3.0)
http-accept (1.7.0)
@@ -231,25 +239,28 @@ GEM
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
inflecto (0.0.2)
- jaro_winkler (1.5.4)
jbuilder (2.10.0)
activesupport (>= 5.0.0)
jmespath (1.4.0)
+ jquery-rails (4.4.0)
+ rails-dom-testing (>= 1, < 3)
+ railties (>= 4.2.0)
+ thor (>= 0.14, < 2.0)
json (2.3.0)
json_pure (2.3.0)
jwt (2.2.1)
- kaminari (1.2.0)
+ kaminari (1.2.1)
activesupport (>= 4.1.0)
- kaminari-actionview (= 1.2.0)
- kaminari-activerecord (= 1.2.0)
- kaminari-core (= 1.2.0)
- kaminari-actionview (1.2.0)
+ kaminari-actionview (= 1.2.1)
+ kaminari-activerecord (= 1.2.1)
+ kaminari-core (= 1.2.1)
+ kaminari-actionview (1.2.1)
actionview
- kaminari-core (= 1.2.0)
- kaminari-activerecord (1.2.0)
+ kaminari-core (= 1.2.1)
+ kaminari-activerecord (1.2.1)
activerecord
- kaminari-core (= 1.2.0)
- kaminari-core (1.2.0)
+ kaminari-core (= 1.2.1)
+ kaminari-core (1.2.1)
koala (3.0.0)
addressable
faraday
@@ -272,12 +283,14 @@ GEM
method_source (1.0.0)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
- mime-types-data (3.2019.1009)
- mimemagic (0.3.4)
+ mime-types-data (3.2020.0512)
+ mimemagic (0.3.5)
mini_magick (4.10.1)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
- minitest (5.14.0)
+ minitest (5.14.1)
+ momentjs-rails (2.20.1)
+ railties (>= 3.1)
msgpack (1.3.3)
multi_json (1.14.1)
multi_xml (0.6.0)
@@ -290,7 +303,7 @@ GEM
orm_adapter (0.5.0)
os (1.1.0)
parallel (1.19.1)
- parser (2.7.1.1)
+ parser (2.7.1.2)
ast (~> 2.4.0)
pg (1.2.3)
pry (0.13.1)
@@ -298,8 +311,8 @@ GEM
method_source (~> 1.0)
pry-rails (0.3.9)
pry (>= 0.10.4)
- public_suffix (4.0.4)
- puma (4.3.3)
+ public_suffix (4.0.5)
+ puma (4.3.5)
nio4r (~> 2.0)
pundit (2.1.0)
activesupport (>= 3.0.0)
@@ -314,38 +327,38 @@ GEM
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
- rails (6.0.2.2)
- actioncable (= 6.0.2.2)
- actionmailbox (= 6.0.2.2)
- actionmailer (= 6.0.2.2)
- actionpack (= 6.0.2.2)
- actiontext (= 6.0.2.2)
- actionview (= 6.0.2.2)
- activejob (= 6.0.2.2)
- activemodel (= 6.0.2.2)
- activerecord (= 6.0.2.2)
- activestorage (= 6.0.2.2)
- activesupport (= 6.0.2.2)
+ rails (6.0.3.1)
+ actioncable (= 6.0.3.1)
+ actionmailbox (= 6.0.3.1)
+ actionmailer (= 6.0.3.1)
+ actionpack (= 6.0.3.1)
+ actiontext (= 6.0.3.1)
+ actionview (= 6.0.3.1)
+ activejob (= 6.0.3.1)
+ activemodel (= 6.0.3.1)
+ activerecord (= 6.0.3.1)
+ activestorage (= 6.0.3.1)
+ activesupport (= 6.0.3.1)
bundler (>= 1.3.0)
- railties (= 6.0.2.2)
+ railties (= 6.0.3.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
- railties (6.0.2.2)
- actionpack (= 6.0.2.2)
- activesupport (= 6.0.2.2)
+ railties (6.0.3.1)
+ actionpack (= 6.0.3.1)
+ activesupport (= 6.0.3.1)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
rainbow (3.0.0)
rake (13.0.1)
- rb-fsevent (0.10.3)
+ rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
- redis (4.1.3)
+ redis (4.1.4)
redis-namespace (1.7.0)
redis (>= 3.0.4)
redis-rack-cache (2.2.1)
@@ -367,15 +380,15 @@ GEM
netrc (~> 0.8)
retriable (3.1.2)
rexml (3.2.4)
- rspec-core (3.9.1)
- rspec-support (~> 3.9.1)
- rspec-expectations (3.9.1)
+ rspec-core (3.9.2)
+ rspec-support (~> 3.9.3)
+ rspec-expectations (3.9.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
- rspec-rails (4.0.0)
+ rspec-rails (4.0.1)
actionpack (>= 4.2)
activesupport (>= 4.2)
railties (>= 4.2)
@@ -383,9 +396,8 @@ GEM
rspec-expectations (~> 3.9)
rspec-mocks (~> 3.9)
rspec-support (~> 3.9)
- rspec-support (3.9.2)
- rubocop (0.81.0)
- jaro_winkler (~> 1.5.1)
+ rspec-support (3.9.3)
+ rubocop (0.83.0)
parallel (~> 1.10)
parser (>= 2.7.0.1)
rainbow (>= 2.2.2, < 4.0)
@@ -398,7 +410,7 @@ GEM
activesupport
rack (>= 1.1)
rubocop (>= 0.72.0)
- rubocop-rspec (1.38.1)
+ rubocop-rspec (1.39.0)
rubocop (>= 0.68.1)
ruby-progressbar (1.10.1)
sass (3.7.4)
@@ -406,6 +418,14 @@ GEM
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
+ sassc (2.3.0)
+ ffi (~> 1.9)
+ sassc-rails (2.1.2)
+ railties (>= 4.0.0)
+ sassc (>= 2.0)
+ sprockets (> 3.0)
+ sprockets-rails
+ tilt
scout_apm (2.6.7)
parser
scss_lint (0.59.0)
@@ -413,12 +433,13 @@ GEM
seed_dump (3.3.1)
activerecord (>= 4)
activesupport (>= 4)
+ selectize-rails (0.12.6)
semantic_range (2.3.0)
sentry-raven (3.0.0)
faraday (>= 1.0)
shoulda-matchers (4.3.0)
activesupport (>= 4.2.0)
- sidekiq (6.0.6)
+ sidekiq (6.0.7)
connection_pool (>= 2.2.2)
rack (~> 2.0)
rack-protection (>= 2.0.0)
@@ -448,9 +469,10 @@ GEM
faraday
inflecto
virtus
- telephone_number (1.4.6)
+ telephone_number (1.4.7)
thor (0.20.3)
thread_safe (0.3.6)
+ tilt (2.0.10)
time_diff (0.3.0)
activesupport
i18n
@@ -458,9 +480,11 @@ GEM
faraday (~> 1.0.0)
jwt (>= 1.5, <= 2.5)
nokogiri (>= 1.6, < 2.0)
+ twitty (0.1.1)
+ oauth
tzinfo (1.2.7)
thread_safe (~> 0.1)
- tzinfo-data (1.2019.3)
+ tzinfo-data (1.2020.1)
tzinfo (>= 1.0.0)
uber (0.1.0)
uglifier (4.2.0)
@@ -480,12 +504,12 @@ GEM
equalizer (~> 0.0, >= 0.0.9)
warden (1.2.8)
rack (>= 2.0.6)
- web-console (4.0.1)
+ web-console (4.0.2)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
- webpacker (5.0.1)
+ webpacker (5.1.1)
activesupport (>= 5.2)
rack-proxy (>= 0.6.1)
railties (>= 5.2)
@@ -505,6 +529,7 @@ PLATFORMS
DEPENDENCIES
action-cable-testing
acts-as-taggable-on
+ administrate
annotate
attr_extras
aws-sdk-s3
@@ -566,7 +591,7 @@ DEPENDENCIES
telephone_number
time_diff
twilio-ruby (~> 5.32.0)
- twitty!
+ twitty
tzinfo-data
uglifier
valid_email2
@@ -576,7 +601,7 @@ DEPENDENCIES
wisper (= 2.0.0)
RUBY VERSION
- ruby 2.7.0p0
+ ruby 2.7.1p83
BUNDLED WITH
- 2.1.2
+ 2.1.4
diff --git a/Procfile b/Procfile
index 16a5cc0c1..34f447dda 100644
--- a/Procfile
+++ b/Procfile
@@ -1,2 +1,3 @@
+release: bundle exec rake db:migrate
web: bin/rails server -p $PORT -e $RAILS_ENV
-worker: bundle exec sidekiq -C config/sidekiq.yml
\ No newline at end of file
+worker: bundle exec sidekiq -C config/sidekiq.yml
diff --git a/README.md b/README.md
index e71b8c6d1..75a254058 100644
--- a/README.md
+++ b/README.md
@@ -19,8 +19,8 @@ ___
-
-
+
+
{{ title }}
@@ -8,7 +8,7 @@ {{ subTitle }}