mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 11:37:58 +00:00
chore: Update dependencies (#1173)
This commit is contained in:
45
.rubocop.yml
45
.rubocop.yml
@@ -4,20 +4,8 @@ require:
|
|||||||
- rubocop-rspec
|
- rubocop-rspec
|
||||||
inherit_from: .rubocop_todo.yml
|
inherit_from: .rubocop_todo.yml
|
||||||
|
|
||||||
Lint/RaiseException:
|
|
||||||
Enabled: true
|
|
||||||
Lint/StructNewOverride:
|
|
||||||
Enabled: true
|
|
||||||
Lint/DeprecatedOpenSSLConstant:
|
|
||||||
Enabled: true
|
|
||||||
Lint/MixedRegexpCaptureTypes:
|
|
||||||
Enabled: true
|
|
||||||
Layout/LineLength:
|
Layout/LineLength:
|
||||||
Max: 150
|
Max: 150
|
||||||
Layout/EmptyLinesAroundAttributeAccessor:
|
|
||||||
Enabled: true
|
|
||||||
Layout/SpaceAroundMethodCallOperator:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Metrics/ClassLength:
|
Metrics/ClassLength:
|
||||||
Max: 125
|
Max: 125
|
||||||
@@ -33,25 +21,21 @@ Style/FrozenStringLiteralComment:
|
|||||||
Enabled: false
|
Enabled: false
|
||||||
Style/SymbolArray:
|
Style/SymbolArray:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Style/HashEachMethods:
|
Style/OptionalBooleanParameter:
|
||||||
Enabled: true
|
Exclude:
|
||||||
Style/HashTransformKeys:
|
- 'app/services/email_templates/db_resolver_service.rb'
|
||||||
Enabled: true
|
- 'app/dispatchers/dispatcher.rb'
|
||||||
Style/HashTransformValues:
|
|
||||||
Enabled: true
|
|
||||||
Style/RedundantFetchBlock:
|
|
||||||
Enabled: true
|
|
||||||
Style/RedundantRegexpCharacterClass:
|
|
||||||
Enabled: true
|
|
||||||
Style/RedundantRegexpEscape:
|
|
||||||
Enabled: true
|
|
||||||
Style/SlicingWithRange:
|
|
||||||
Enabled: true
|
|
||||||
Style/GlobalVars:
|
Style/GlobalVars:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'config/initializers/redis.rb'
|
- 'config/initializers/redis.rb'
|
||||||
- 'lib/redis/alfred.rb'
|
- 'lib/redis/alfred.rb'
|
||||||
- 'lib/global_config.rb'
|
- 'lib/global_config.rb'
|
||||||
|
Style/ClassVars:
|
||||||
|
Exclude:
|
||||||
|
- 'app/services/email_templates/db_resolver_service.rb'
|
||||||
|
Lint/MissingSuper:
|
||||||
|
Exclude:
|
||||||
|
- 'app/drops/base_drop.rb'
|
||||||
Metrics/BlockLength:
|
Metrics/BlockLength:
|
||||||
Exclude:
|
Exclude:
|
||||||
- spec/**/*
|
- spec/**/*
|
||||||
@@ -87,7 +71,9 @@ Style/GuardClause:
|
|||||||
- 'db/migrate/20190819005836_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb'
|
- 'db/migrate/20190819005836_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb'
|
||||||
Metrics/AbcSize:
|
Metrics/AbcSize:
|
||||||
Exclude:
|
Exclude:
|
||||||
|
- 'app/controllers/concerns/auth_helper.rb'
|
||||||
- 'db/migrate/20190819005836_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb'
|
- 'db/migrate/20190819005836_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb'
|
||||||
|
- 'db/migrate/20161123131628_devise_token_auth_create_users.rb'
|
||||||
Metrics/CyclomaticComplexity:
|
Metrics/CyclomaticComplexity:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'db/migrate/20190819005836_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb'
|
- 'db/migrate/20190819005836_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb'
|
||||||
@@ -115,9 +101,16 @@ Rails/UniqueValidationWithoutIndex:
|
|||||||
Exclude:
|
Exclude:
|
||||||
- 'app/models/channel/twitter_profile.rb'
|
- 'app/models/channel/twitter_profile.rb'
|
||||||
- 'app/models/webhook.rb'
|
- 'app/models/webhook.rb'
|
||||||
|
Rails/RenderInline:
|
||||||
|
Exclude:
|
||||||
|
- 'app/controllers/swagger_controller.rb'
|
||||||
RSpec/NamedSubject:
|
RSpec/NamedSubject:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
# we should bring this down
|
||||||
|
RSpec/MultipleMemoizedHelpers:
|
||||||
|
Max: 12
|
||||||
AllCops:
|
AllCops:
|
||||||
|
NewCops: enable
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'bin/**/*'
|
- 'bin/**/*'
|
||||||
- 'db/schema.rb'
|
- 'db/schema.rb'
|
||||||
|
|||||||
3
Gemfile
3
Gemfile
@@ -65,7 +65,8 @@ gem 'administrate'
|
|||||||
gem 'wisper', '2.0.0'
|
gem 'wisper', '2.0.0'
|
||||||
|
|
||||||
##--- gems for channels ---##
|
##--- gems for channels ---##
|
||||||
gem 'facebook-messenger'
|
# TODO: bump up gem to 2.0
|
||||||
|
gem 'facebook-messenger', '1.5.0'
|
||||||
gem 'telegram-bot-ruby'
|
gem 'telegram-bot-ruby'
|
||||||
gem 'twilio-ruby', '~> 5.32.0'
|
gem 'twilio-ruby', '~> 5.32.0'
|
||||||
# twitty will handle subscription of twitter account events
|
# twitty will handle subscription of twitter account events
|
||||||
|
|||||||
127
Gemfile.lock
127
Gemfile.lock
@@ -77,7 +77,7 @@ GEM
|
|||||||
activerecord (>= 5.0, < 6.1)
|
activerecord (>= 5.0, < 6.1)
|
||||||
addressable (2.7.0)
|
addressable (2.7.0)
|
||||||
public_suffix (>= 2.0.2, < 5.0)
|
public_suffix (>= 2.0.2, < 5.0)
|
||||||
administrate (0.13.0)
|
administrate (0.14.0)
|
||||||
actionpack (>= 4.2)
|
actionpack (>= 4.2)
|
||||||
actionview (>= 4.2)
|
actionview (>= 4.2)
|
||||||
activerecord (>= 4.2)
|
activerecord (>= 4.2)
|
||||||
@@ -93,23 +93,23 @@ GEM
|
|||||||
rake (>= 10.4, < 14.0)
|
rake (>= 10.4, < 14.0)
|
||||||
ast (2.4.1)
|
ast (2.4.1)
|
||||||
attr_extras (6.2.4)
|
attr_extras (6.2.4)
|
||||||
autoprefixer-rails (9.8.2)
|
autoprefixer-rails (9.8.6.3)
|
||||||
execjs
|
execjs
|
||||||
aws-eventstream (1.1.0)
|
aws-eventstream (1.1.0)
|
||||||
aws-partitions (1.332.0)
|
aws-partitions (1.360.0)
|
||||||
aws-sdk-core (3.100.0)
|
aws-sdk-core (3.105.0)
|
||||||
aws-eventstream (~> 1, >= 1.0.2)
|
aws-eventstream (~> 1, >= 1.0.2)
|
||||||
aws-partitions (~> 1, >= 1.239.0)
|
aws-partitions (~> 1, >= 1.239.0)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
jmespath (~> 1.0)
|
jmespath (~> 1.0)
|
||||||
aws-sdk-kms (1.34.1)
|
aws-sdk-kms (1.37.0)
|
||||||
aws-sdk-core (~> 3, >= 3.99.0)
|
aws-sdk-core (~> 3, >= 3.99.0)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
aws-sdk-s3 (1.69.1)
|
aws-sdk-s3 (1.79.1)
|
||||||
aws-sdk-core (~> 3, >= 3.99.0)
|
aws-sdk-core (~> 3, >= 3.104.3)
|
||||||
aws-sdk-kms (~> 1)
|
aws-sdk-kms (~> 1)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
aws-sigv4 (1.2.0)
|
aws-sigv4 (1.2.2)
|
||||||
aws-eventstream (~> 1, >= 1.0.2)
|
aws-eventstream (~> 1, >= 1.0.2)
|
||||||
axiom-types (0.1.1)
|
axiom-types (0.1.1)
|
||||||
descendants_tracker (~> 0.0.4)
|
descendants_tracker (~> 0.0.4)
|
||||||
@@ -125,11 +125,11 @@ GEM
|
|||||||
barnes (0.0.8)
|
barnes (0.0.8)
|
||||||
multi_json (~> 1)
|
multi_json (~> 1)
|
||||||
statsd-ruby (~> 1.1)
|
statsd-ruby (~> 1.1)
|
||||||
bcrypt (3.1.13)
|
bcrypt (3.1.15)
|
||||||
bindex (0.8.1)
|
bindex (0.8.1)
|
||||||
bootsnap (1.4.6)
|
bootsnap (1.4.8)
|
||||||
msgpack (~> 1.0)
|
msgpack (~> 1.0)
|
||||||
brakeman (4.8.2)
|
brakeman (4.9.0)
|
||||||
browser (4.2.0)
|
browser (4.2.0)
|
||||||
builder (3.2.4)
|
builder (3.2.4)
|
||||||
bullet (6.1.0)
|
bullet (6.1.0)
|
||||||
@@ -149,12 +149,12 @@ GEM
|
|||||||
crack (0.4.3)
|
crack (0.4.3)
|
||||||
safe_yaml (~> 1.0.0)
|
safe_yaml (~> 1.0.0)
|
||||||
crass (1.0.6)
|
crass (1.0.6)
|
||||||
cypress-on-rails (1.7.0)
|
cypress-on-rails (1.8.0)
|
||||||
rack
|
rack
|
||||||
database_cleaner (1.8.5)
|
database_cleaner (1.8.5)
|
||||||
datetime_picker_rails (0.0.7)
|
datetime_picker_rails (0.0.7)
|
||||||
momentjs-rails (>= 2.8.1)
|
momentjs-rails (>= 2.8.1)
|
||||||
declarative (0.0.10)
|
declarative (0.0.20)
|
||||||
declarative-option (0.1.0)
|
declarative-option (0.1.0)
|
||||||
descendants_tracker (0.0.4)
|
descendants_tracker (0.0.4)
|
||||||
thread_safe (~> 0.3, >= 0.3.1)
|
thread_safe (~> 0.3, >= 0.3.1)
|
||||||
@@ -169,41 +169,42 @@ GEM
|
|||||||
devise (> 3.5.2, < 5)
|
devise (> 3.5.2, < 5)
|
||||||
rails (>= 4.2.0, < 6.1)
|
rails (>= 4.2.0, < 6.1)
|
||||||
sprockets (= 3.7.2)
|
sprockets (= 3.7.2)
|
||||||
diff-lcs (1.4)
|
diff-lcs (1.4.4)
|
||||||
digest-crc (0.5.1)
|
digest-crc (0.6.1)
|
||||||
|
rake (~> 13.0)
|
||||||
docile (1.3.2)
|
docile (1.3.2)
|
||||||
domain_name (0.5.20190701)
|
domain_name (0.5.20190701)
|
||||||
unf (>= 0.0.5, < 1.0.0)
|
unf (>= 0.0.5, < 1.0.0)
|
||||||
dotenv (2.7.5)
|
dotenv (2.7.6)
|
||||||
dotenv-rails (2.7.5)
|
dotenv-rails (2.7.6)
|
||||||
dotenv (= 2.7.5)
|
dotenv (= 2.7.6)
|
||||||
railties (>= 3.2, < 6.1)
|
railties (>= 3.2)
|
||||||
equalizer (0.0.11)
|
equalizer (0.0.11)
|
||||||
erubi (1.9.0)
|
erubi (1.9.0)
|
||||||
execjs (2.7.0)
|
execjs (2.7.0)
|
||||||
facebook-messenger (1.5.0)
|
facebook-messenger (1.5.0)
|
||||||
httparty (~> 0.13, >= 0.13.7)
|
httparty (~> 0.13, >= 0.13.7)
|
||||||
rack (>= 1.4.5)
|
rack (>= 1.4.5)
|
||||||
factory_bot (6.0.2)
|
factory_bot (6.1.0)
|
||||||
activesupport (>= 5.0.0)
|
activesupport (>= 5.0.0)
|
||||||
factory_bot_rails (6.0.0)
|
factory_bot_rails (6.1.0)
|
||||||
factory_bot (~> 6.0.0)
|
factory_bot (~> 6.1.0)
|
||||||
railties (>= 5.0.0)
|
railties (>= 5.0.0)
|
||||||
faker (2.12.0)
|
faker (2.13.0)
|
||||||
i18n (>= 1.6, < 2)
|
i18n (>= 1.6, < 2)
|
||||||
faraday (1.0.1)
|
faraday (1.0.1)
|
||||||
multipart-post (>= 1.2, < 3)
|
multipart-post (>= 1.2, < 3)
|
||||||
faraday_middleware (1.0.0)
|
faraday_middleware (1.0.0)
|
||||||
faraday (~> 1.0)
|
faraday (~> 1.0)
|
||||||
fcm (1.0.1)
|
fcm (1.0.2)
|
||||||
faraday (~> 1.0.0)
|
faraday (~> 1.0.0)
|
||||||
ffi (1.13.1)
|
ffi (1.13.1)
|
||||||
flag_shih_tzu (0.3.23)
|
flag_shih_tzu (0.3.23)
|
||||||
foreman (0.87.1)
|
foreman (0.87.2)
|
||||||
gli (2.19.1)
|
gli (2.19.2)
|
||||||
globalid (0.4.2)
|
globalid (0.4.2)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
google-api-client (0.41.0)
|
google-api-client (0.43.0)
|
||||||
addressable (~> 2.5, >= 2.5.1)
|
addressable (~> 2.5, >= 2.5.1)
|
||||||
googleauth (~> 0.9)
|
googleauth (~> 0.9)
|
||||||
httpclient (>= 2.8.1, < 3.0)
|
httpclient (>= 2.8.1, < 3.0)
|
||||||
@@ -214,24 +215,24 @@ GEM
|
|||||||
google-cloud-core (1.5.0)
|
google-cloud-core (1.5.0)
|
||||||
google-cloud-env (~> 1.0)
|
google-cloud-env (~> 1.0)
|
||||||
google-cloud-errors (~> 1.0)
|
google-cloud-errors (~> 1.0)
|
||||||
google-cloud-env (1.3.2)
|
google-cloud-env (1.3.3)
|
||||||
faraday (>= 0.17.3, < 2.0)
|
faraday (>= 0.17.3, < 2.0)
|
||||||
google-cloud-errors (1.0.1)
|
google-cloud-errors (1.0.1)
|
||||||
google-cloud-storage (1.26.2)
|
google-cloud-storage (1.28.0)
|
||||||
addressable (~> 2.5)
|
addressable (~> 2.5)
|
||||||
digest-crc (~> 0.4)
|
digest-crc (~> 0.4)
|
||||||
google-api-client (~> 0.33)
|
google-api-client (~> 0.33)
|
||||||
google-cloud-core (~> 1.2)
|
google-cloud-core (~> 1.2)
|
||||||
googleauth (~> 0.9)
|
googleauth (~> 0.9)
|
||||||
mini_mime (~> 1.0)
|
mini_mime (~> 1.0)
|
||||||
googleauth (0.13.0)
|
googleauth (0.13.1)
|
||||||
faraday (>= 0.17.3, < 2.0)
|
faraday (>= 0.17.3, < 2.0)
|
||||||
jwt (>= 1.4, < 3.0)
|
jwt (>= 1.4, < 3.0)
|
||||||
memoist (~> 0.16)
|
memoist (~> 0.16)
|
||||||
multi_json (~> 1.11)
|
multi_json (~> 1.11)
|
||||||
os (>= 0.9, < 2.0)
|
os (>= 0.9, < 2.0)
|
||||||
signet (~> 0.14)
|
signet (~> 0.14)
|
||||||
groupdate (5.0.0)
|
groupdate (5.1.0)
|
||||||
activesupport (>= 5)
|
activesupport (>= 5)
|
||||||
haikunator (1.1.0)
|
haikunator (1.1.0)
|
||||||
hana (1.3.6)
|
hana (1.3.6)
|
||||||
@@ -256,8 +257,8 @@ GEM
|
|||||||
rails-dom-testing (>= 1, < 3)
|
rails-dom-testing (>= 1, < 3)
|
||||||
railties (>= 4.2.0)
|
railties (>= 4.2.0)
|
||||||
thor (>= 0.14, < 2.0)
|
thor (>= 0.14, < 2.0)
|
||||||
json (2.3.0)
|
json (2.3.1)
|
||||||
jwt (2.2.1)
|
jwt (2.2.2)
|
||||||
kaminari (1.2.1)
|
kaminari (1.2.1)
|
||||||
activesupport (>= 4.1.0)
|
activesupport (>= 4.1.0)
|
||||||
kaminari-actionview (= 1.2.1)
|
kaminari-actionview (= 1.2.1)
|
||||||
@@ -282,7 +283,7 @@ GEM
|
|||||||
listen (3.2.1)
|
listen (3.2.1)
|
||||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||||
rb-inotify (~> 0.9, >= 0.9.10)
|
rb-inotify (~> 0.9, >= 0.9.10)
|
||||||
loofah (2.6.0)
|
loofah (2.7.0)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.5.9)
|
nokogiri (>= 1.5.9)
|
||||||
mail (2.7.1)
|
mail (2.7.1)
|
||||||
@@ -302,7 +303,7 @@ GEM
|
|||||||
momentjs-rails (2.20.1)
|
momentjs-rails (2.20.1)
|
||||||
railties (>= 3.1)
|
railties (>= 3.1)
|
||||||
msgpack (1.3.3)
|
msgpack (1.3.3)
|
||||||
multi_json (1.14.1)
|
multi_json (1.15.0)
|
||||||
multi_xml (0.6.0)
|
multi_xml (0.6.0)
|
||||||
multipart-post (2.1.1)
|
multipart-post (2.1.1)
|
||||||
netrc (0.11.0)
|
netrc (0.11.0)
|
||||||
@@ -311,7 +312,7 @@ GEM
|
|||||||
mini_portile2 (~> 2.4.0)
|
mini_portile2 (~> 2.4.0)
|
||||||
oauth (0.5.4)
|
oauth (0.5.4)
|
||||||
orm_adapter (0.5.0)
|
orm_adapter (0.5.0)
|
||||||
os (1.1.0)
|
os (1.1.1)
|
||||||
parallel (1.19.2)
|
parallel (1.19.2)
|
||||||
parser (2.7.1.4)
|
parser (2.7.1.4)
|
||||||
ast (~> 2.4.1)
|
ast (~> 2.4.1)
|
||||||
@@ -331,8 +332,6 @@ GEM
|
|||||||
rack (>= 0.4)
|
rack (>= 0.4)
|
||||||
rack-cors (1.1.1)
|
rack-cors (1.1.1)
|
||||||
rack (>= 2.0.0)
|
rack (>= 2.0.0)
|
||||||
rack-protection (2.0.8.1)
|
|
||||||
rack
|
|
||||||
rack-proxy (0.6.5)
|
rack-proxy (0.6.5)
|
||||||
rack
|
rack
|
||||||
rack-test (1.1.0)
|
rack-test (1.1.0)
|
||||||
@@ -369,7 +368,7 @@ GEM
|
|||||||
rb-inotify (0.10.1)
|
rb-inotify (0.10.1)
|
||||||
ffi (~> 1.0)
|
ffi (~> 1.0)
|
||||||
redis (4.2.1)
|
redis (4.2.1)
|
||||||
redis-namespace (1.7.0)
|
redis-namespace (1.8.0)
|
||||||
redis (>= 3.0.4)
|
redis (>= 3.0.4)
|
||||||
redis-rack-cache (2.2.1)
|
redis-rack-cache (2.2.1)
|
||||||
rack-cache (>= 1.10, < 2)
|
rack-cache (>= 1.10, < 2)
|
||||||
@@ -408,25 +407,25 @@ GEM
|
|||||||
rspec-mocks (~> 3.9)
|
rspec-mocks (~> 3.9)
|
||||||
rspec-support (~> 3.9)
|
rspec-support (~> 3.9)
|
||||||
rspec-support (3.9.3)
|
rspec-support (3.9.3)
|
||||||
rubocop (0.86.0)
|
rubocop (0.89.1)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
parser (>= 2.7.0.1)
|
parser (>= 2.7.1.1)
|
||||||
rainbow (>= 2.2.2, < 4.0)
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
regexp_parser (>= 1.7)
|
regexp_parser (>= 1.7)
|
||||||
rexml
|
rexml
|
||||||
rubocop-ast (>= 0.0.3, < 1.0)
|
rubocop-ast (>= 0.3.0, < 1.0)
|
||||||
ruby-progressbar (~> 1.7)
|
ruby-progressbar (~> 1.7)
|
||||||
unicode-display_width (>= 1.4.0, < 2.0)
|
unicode-display_width (>= 1.4.0, < 2.0)
|
||||||
rubocop-ast (0.0.3)
|
rubocop-ast (0.3.0)
|
||||||
parser (>= 2.7.0.1)
|
parser (>= 2.7.1.4)
|
||||||
rubocop-performance (1.6.1)
|
rubocop-performance (1.7.1)
|
||||||
rubocop (>= 0.71.0)
|
rubocop (>= 0.82.0)
|
||||||
rubocop-rails (2.6.0)
|
rubocop-rails (2.7.1)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
rack (>= 1.1)
|
rack (>= 1.1)
|
||||||
rubocop (>= 0.82.0)
|
rubocop (>= 0.87.0)
|
||||||
rubocop-rspec (1.40.0)
|
rubocop-rspec (1.43.2)
|
||||||
rubocop (>= 0.68.1)
|
rubocop (~> 0.87)
|
||||||
ruby-progressbar (1.10.1)
|
ruby-progressbar (1.10.1)
|
||||||
safe_yaml (1.0.5)
|
safe_yaml (1.0.5)
|
||||||
sass (3.7.4)
|
sass (3.7.4)
|
||||||
@@ -442,7 +441,7 @@ GEM
|
|||||||
sprockets (> 3.0)
|
sprockets (> 3.0)
|
||||||
sprockets-rails
|
sprockets-rails
|
||||||
tilt
|
tilt
|
||||||
scout_apm (2.6.7)
|
scout_apm (2.6.9)
|
||||||
parser
|
parser
|
||||||
scss_lint (0.59.0)
|
scss_lint (0.59.0)
|
||||||
sass (~> 3.5, >= 3.5.5)
|
sass (~> 3.5, >= 3.5.5)
|
||||||
@@ -451,15 +450,14 @@ GEM
|
|||||||
activesupport (>= 4)
|
activesupport (>= 4)
|
||||||
selectize-rails (0.12.6)
|
selectize-rails (0.12.6)
|
||||||
semantic_range (2.3.0)
|
semantic_range (2.3.0)
|
||||||
sentry-raven (3.0.0)
|
sentry-raven (3.0.3)
|
||||||
faraday (>= 1.0)
|
faraday (>= 1.0)
|
||||||
shoulda-matchers (4.3.0)
|
shoulda-matchers (4.4.1)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
sidekiq (6.0.7)
|
sidekiq (6.1.1)
|
||||||
connection_pool (>= 2.2.2)
|
connection_pool (>= 2.2.2)
|
||||||
rack (~> 2.0)
|
rack (~> 2.0)
|
||||||
rack-protection (>= 2.0.0)
|
redis (>= 4.2.0)
|
||||||
redis (>= 4.1.0)
|
|
||||||
signet (0.14.0)
|
signet (0.14.0)
|
||||||
addressable (~> 2.3)
|
addressable (~> 2.3)
|
||||||
faraday (>= 0.17.3, < 2.0)
|
faraday (>= 0.17.3, < 2.0)
|
||||||
@@ -470,14 +468,13 @@ GEM
|
|||||||
json (>= 1.8, < 3)
|
json (>= 1.8, < 3)
|
||||||
simplecov-html (~> 0.10.0)
|
simplecov-html (~> 0.10.0)
|
||||||
simplecov-html (0.10.2)
|
simplecov-html (0.10.2)
|
||||||
slack-ruby-client (0.14.6)
|
slack-ruby-client (0.15.0)
|
||||||
activesupport
|
faraday (>= 1.0)
|
||||||
faraday (>= 0.9)
|
|
||||||
faraday_middleware
|
faraday_middleware
|
||||||
gli
|
gli
|
||||||
hashie
|
hashie
|
||||||
websocket-driver
|
websocket-driver
|
||||||
spring (2.1.0)
|
spring (2.1.1)
|
||||||
spring-watcher-listen (2.0.1)
|
spring-watcher-listen (2.0.1)
|
||||||
listen (>= 2.7, < 4.0)
|
listen (>= 2.7, < 4.0)
|
||||||
spring (>= 1.2, < 3.0)
|
spring (>= 1.2, < 3.0)
|
||||||
@@ -494,7 +491,7 @@ GEM
|
|||||||
faraday
|
faraday
|
||||||
inflecto
|
inflecto
|
||||||
virtus
|
virtus
|
||||||
telephone_number (1.4.7)
|
telephone_number (1.4.9)
|
||||||
thor (1.0.1)
|
thor (1.0.1)
|
||||||
thread_safe (0.3.6)
|
thread_safe (0.3.6)
|
||||||
tilt (2.0.10)
|
tilt (2.0.10)
|
||||||
@@ -519,7 +516,7 @@ GEM
|
|||||||
unf_ext (0.0.7.7)
|
unf_ext (0.0.7.7)
|
||||||
unicode-display_width (1.7.0)
|
unicode-display_width (1.7.0)
|
||||||
uniform_notifier (1.13.0)
|
uniform_notifier (1.13.0)
|
||||||
valid_email2 (3.2.2)
|
valid_email2 (3.3.1)
|
||||||
activemodel (>= 3.2)
|
activemodel (>= 3.2)
|
||||||
mail (~> 2.5)
|
mail (~> 2.5)
|
||||||
virtus (1.0.5)
|
virtus (1.0.5)
|
||||||
@@ -529,7 +526,7 @@ GEM
|
|||||||
equalizer (~> 0.0, >= 0.0.9)
|
equalizer (~> 0.0, >= 0.0.9)
|
||||||
warden (1.2.8)
|
warden (1.2.8)
|
||||||
rack (>= 2.0.6)
|
rack (>= 2.0.6)
|
||||||
web-console (4.0.3)
|
web-console (4.0.4)
|
||||||
actionview (>= 6.0.0)
|
actionview (>= 6.0.0)
|
||||||
activemodel (>= 6.0.0)
|
activemodel (>= 6.0.0)
|
||||||
bindex (>= 0.4.0)
|
bindex (>= 0.4.0)
|
||||||
@@ -546,7 +543,7 @@ GEM
|
|||||||
webpush (1.0.0)
|
webpush (1.0.0)
|
||||||
hkdf (~> 0.2)
|
hkdf (~> 0.2)
|
||||||
jwt (~> 2.0)
|
jwt (~> 2.0)
|
||||||
websocket-driver (0.7.2)
|
websocket-driver (0.7.3)
|
||||||
websocket-extensions (>= 0.1.0)
|
websocket-extensions (>= 0.1.0)
|
||||||
websocket-extensions (0.1.5)
|
websocket-extensions (0.1.5)
|
||||||
wisper (2.0.0)
|
wisper (2.0.0)
|
||||||
@@ -575,7 +572,7 @@ DEPENDENCIES
|
|||||||
devise
|
devise
|
||||||
devise_token_auth
|
devise_token_auth
|
||||||
dotenv-rails
|
dotenv-rails
|
||||||
facebook-messenger
|
facebook-messenger (= 1.5.0)
|
||||||
factory_bot_rails
|
factory_bot_rails
|
||||||
faker
|
faker
|
||||||
fcm
|
fcm
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
class Messages::Facebook::MessageBuilder
|
class Messages::Facebook::MessageBuilder
|
||||||
attr_reader :response
|
attr_reader :response
|
||||||
|
|
||||||
def initialize(response, inbox, outgoing_echo = false)
|
def initialize(response, inbox, outgoing_echo: false)
|
||||||
@response = response
|
@response = response
|
||||||
@inbox = inbox
|
@inbox = inbox
|
||||||
@outgoing_echo = outgoing_echo
|
@outgoing_echo = outgoing_echo
|
||||||
|
|||||||
@@ -41,9 +41,10 @@ class Api::V1::Accounts::ConversationsController < Api::V1::Accounts::BaseContro
|
|||||||
end
|
end
|
||||||
|
|
||||||
def toggle_typing_status
|
def toggle_typing_status
|
||||||
if params[:typing_status] == 'on'
|
case params[:typing_status]
|
||||||
|
when 'on'
|
||||||
trigger_typing_event(CONVERSATION_TYPING_ON)
|
trigger_typing_event(CONVERSATION_TYPING_ON)
|
||||||
elsif params[:typing_status] == 'off'
|
when 'off'
|
||||||
trigger_typing_event(CONVERSATION_TYPING_OFF)
|
trigger_typing_event(CONVERSATION_TYPING_OFF)
|
||||||
end
|
end
|
||||||
head :ok
|
head :ok
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class Api::V1::Accounts::InboxMembersController < Api::V1::Accounts::BaseControl
|
|||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@agents = Current.account.users.where(id: @inbox.members.pluck(:user_id))
|
@agents = Current.account.users.where(id: @inbox.members.select(:user_id))
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ class Api::V1::Accounts::InboxesController < Api::V1::Accounts::BaseController
|
|||||||
:welcome_tagline,
|
:welcome_tagline,
|
||||||
:webhook_url,
|
:webhook_url,
|
||||||
:email,
|
:email,
|
||||||
selected_feature_flags: []
|
{ selected_feature_flags: [] }
|
||||||
])
|
])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -26,9 +26,10 @@ class Api::V1::Widget::ConversationsController < Api::V1::Widget::BaseController
|
|||||||
def toggle_typing
|
def toggle_typing
|
||||||
head :ok && return if conversation.nil?
|
head :ok && return if conversation.nil?
|
||||||
|
|
||||||
if permitted_params[:typing_status] == 'on'
|
case permitted_params[:typing_status]
|
||||||
|
when 'on'
|
||||||
trigger_typing_event(CONVERSATION_TYPING_ON)
|
trigger_typing_event(CONVERSATION_TYPING_ON)
|
||||||
elsif permitted_params[:typing_status] == 'off'
|
when 'off'
|
||||||
trigger_typing_event(CONVERSATION_TYPING_OFF)
|
trigger_typing_event(CONVERSATION_TYPING_OFF)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ class Api::V1::Widget::MessagesController < Api::V1::Widget::BaseController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def message_update_params
|
def message_update_params
|
||||||
params.permit(message: [submitted_values: [:name, :title, :value]])
|
params.permit(message: [{ submitted_values: [:name, :title, :value] }])
|
||||||
end
|
end
|
||||||
|
|
||||||
def permitted_params
|
def permitted_params
|
||||||
|
|||||||
@@ -25,6 +25,6 @@ class DeviseOverrides::ConfirmationsController < Devise::ConfirmationsController
|
|||||||
user.reset_password_token = enc
|
user.reset_password_token = enc
|
||||||
user.reset_password_sent_at = Time.now.utc
|
user.reset_password_sent_at = Time.now.utc
|
||||||
user.save(validate: false)
|
user.save(validate: false)
|
||||||
'/app/auth/password/edit?config=default&redirect_url=&reset_password_token=' + raw
|
"/app/auth/password/edit?config=default&redirect_url=&reset_password_token=#{raw}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class Twitter::CallbacksController < Twitter::BaseController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def account
|
def account
|
||||||
@account ||= Account.find_by!(id: account_id)
|
@account ||= Account.find(account_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def twitter_app_redirect_url
|
def twitter_app_redirect_url
|
||||||
|
|||||||
@@ -9,11 +9,10 @@ class AsyncDispatcher < BaseDispatcher
|
|||||||
end
|
end
|
||||||
|
|
||||||
def listeners
|
def listeners
|
||||||
listeners = [
|
[
|
||||||
EventListener.instance,
|
EventListener.instance,
|
||||||
WebhookListener.instance,
|
WebhookListener.instance,
|
||||||
InstallationWebhookListener.instance, HookListener.instance
|
InstallationWebhookListener.instance, HookListener.instance
|
||||||
]
|
]
|
||||||
listeners
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -67,9 +67,10 @@ class ConversationFinder
|
|||||||
end
|
end
|
||||||
|
|
||||||
def filter_by_assignee_type
|
def filter_by_assignee_type
|
||||||
if @assignee_type == 'me'
|
case @assignee_type
|
||||||
|
when 'me'
|
||||||
@conversations = @conversations.assigned_to(current_user)
|
@conversations = @conversations.assigned_to(current_user)
|
||||||
elsif @assignee_type == 'unassigned'
|
when 'unassigned'
|
||||||
@conversations = @conversations.unassigned
|
@conversations = @conversations.unassigned
|
||||||
end
|
end
|
||||||
@conversations
|
@conversations
|
||||||
|
|||||||
@@ -4,11 +4,12 @@ class SendReplyJob < ApplicationJob
|
|||||||
def perform(message_id)
|
def perform(message_id)
|
||||||
message = Message.find(message_id)
|
message = Message.find(message_id)
|
||||||
channel_name = message.conversation.inbox.channel.class.to_s
|
channel_name = message.conversation.inbox.channel.class.to_s
|
||||||
if channel_name == 'Channel::FacebookPage'
|
case channel_name
|
||||||
|
when 'Channel::FacebookPage'
|
||||||
::Facebook::SendOnFacebookService.new(message: message).perform
|
::Facebook::SendOnFacebookService.new(message: message).perform
|
||||||
elsif channel_name == 'Channel::TwitterProfile'
|
when 'Channel::TwitterProfile'
|
||||||
::Twitter::SendOnTwitterService.new(message: message).perform
|
::Twitter::SendOnTwitterService.new(message: message).perform
|
||||||
elsif channel_name == 'Channel::TwilioSms'
|
when 'Channel::TwilioSms'
|
||||||
::Twilio::SendOnTwilioService.new(message: message).perform
|
::Twilio::SendOnTwilioService.new(message: message).perform
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -120,8 +120,7 @@ class ActionCableListener < BaseListener
|
|||||||
def user_tokens(account, agents)
|
def user_tokens(account, agents)
|
||||||
agent_tokens = agents.pluck(:pubsub_token)
|
agent_tokens = agents.pluck(:pubsub_token)
|
||||||
admin_tokens = account.administrators.pluck(:pubsub_token)
|
admin_tokens = account.administrators.pluck(:pubsub_token)
|
||||||
pubsub_tokens = (agent_tokens + admin_tokens).uniq
|
(agent_tokens + admin_tokens).uniq
|
||||||
pubsub_tokens
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def contact_token(contact, message)
|
def contact_token(contact, message)
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class Channel::TwitterProfile < ApplicationRecord
|
|||||||
def unsubscribe
|
def unsubscribe
|
||||||
### Fix unsubscription with new endpoint
|
### Fix unsubscription with new endpoint
|
||||||
unsubscribe_response = twitter_client.remove_subscription(user_id: profile_id)
|
unsubscribe_response = twitter_client.remove_subscription(user_id: profile_id)
|
||||||
Rails.logger.info 'TWITTER_UNSUBSCRIBE: ' + unsubscribe_response.body.to_s
|
Rails.logger.info "TWITTER_UNSUBSCRIBE: #{unsubscribe_response.body}"
|
||||||
rescue StandardError => e
|
rescue StandardError => e
|
||||||
Rails.logger.info e
|
Rails.logger.info e
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ module Featurable
|
|||||||
config = InstallationConfig.find_by(name: 'ACCOUNT_LEVEL_FEATURE_DEFAULTS')
|
config = InstallationConfig.find_by(name: 'ACCOUNT_LEVEL_FEATURE_DEFAULTS')
|
||||||
return true if config.blank?
|
return true if config.blank?
|
||||||
|
|
||||||
features_to_enabled = config.value.select { |f| f[:enabled] }.map { |f| f[:name] }
|
features_to_enabled = config.value.select { |f| f[:enabled] }.pluck(:name)
|
||||||
enable_features(*features_to_enabled)
|
enable_features(*features_to_enabled)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -48,13 +48,13 @@ class Conversation < ApplicationRecord
|
|||||||
|
|
||||||
has_many :messages, dependent: :destroy, autosave: true
|
has_many :messages, dependent: :destroy, autosave: true
|
||||||
|
|
||||||
before_create :set_display_id, unless: :display_id?
|
|
||||||
before_create :set_bot_conversation
|
before_create :set_bot_conversation
|
||||||
after_create_commit :notify_conversation_creation
|
before_create :set_display_id, unless: :display_id?
|
||||||
after_save :run_round_robin
|
|
||||||
# wanted to change this to after_update commit. But it ended up creating a loop
|
# wanted to change this to after_update commit. But it ended up creating a loop
|
||||||
# reinvestigate in future and identity the implications
|
# reinvestigate in future and identity the implications
|
||||||
after_update :notify_status_change, :create_activity
|
after_update :notify_status_change, :create_activity
|
||||||
|
after_create_commit :notify_conversation_creation
|
||||||
|
after_save :run_round_robin
|
||||||
|
|
||||||
acts_as_taggable_on :labels
|
acts_as_taggable_on :labels
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class Integrations::App
|
|||||||
def enabled?(account)
|
def enabled?(account)
|
||||||
case params[:id]
|
case params[:id]
|
||||||
when 'slack'
|
when 'slack'
|
||||||
account.hooks.where(app_id: id).exists?
|
account.hooks.exists?(app_id: id)
|
||||||
else
|
else
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -71,8 +71,9 @@ class Notification < ApplicationRecord
|
|||||||
|
|
||||||
def process_notification_delivery
|
def process_notification_delivery
|
||||||
Notification::PushNotificationJob.perform_later(self)
|
Notification::PushNotificationJob.perform_later(self)
|
||||||
|
# Should we do something about the case where user subscribed to both push and email ?
|
||||||
# Queuing after 2 minutes so that we won't send emails for read notifications
|
# In future, we could probably add condition here to enqueue the job for 30 seconds later
|
||||||
Notification::EmailNotificationJob.set(wait: 2.minutes).perform_later(self)
|
# when push enabled and then check in email job whether notification has been read already.
|
||||||
|
Notification::EmailNotificationJob.perform_later(self)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -127,8 +127,7 @@ class User < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def serializable_hash(options = nil)
|
def serializable_hash(options = nil)
|
||||||
serialized_user = super(options).merge(confirmed: confirmed?)
|
super(options).merge(confirmed: confirmed?)
|
||||||
serialized_user
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def push_event_data
|
def push_event_data
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ class ApplicationPolicy
|
|||||||
attr_reader :user_context, :user, :record, :account, :account_user
|
attr_reader :user_context, :user, :record, :account, :account_user
|
||||||
|
|
||||||
def initialize(user_context, record)
|
def initialize(user_context, record)
|
||||||
@user_context = user_context = user_context
|
@user_context = user_context
|
||||||
@user = user_context[:user]
|
@user = user_context[:user]
|
||||||
@account = user_context[:account]
|
@account = user_context[:account]
|
||||||
@account_user = user_context[:account_user]
|
@account_user = user_context[:account_user]
|
||||||
@@ -14,7 +14,7 @@ class ApplicationPolicy
|
|||||||
end
|
end
|
||||||
|
|
||||||
def show?
|
def show?
|
||||||
scope.where(id: record.id).exists?
|
scope.exists?(id: record.id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def create?
|
def create?
|
||||||
@@ -45,7 +45,7 @@ class ApplicationPolicy
|
|||||||
attr_reader :user_context, :user, :scope, :account, :account_user
|
attr_reader :user_context, :user, :scope, :account, :account_user
|
||||||
|
|
||||||
def initialize(user_context, scope)
|
def initialize(user_context, scope)
|
||||||
@user_context = user_context = user_context
|
@user_context = user_context
|
||||||
@user = user_context[:user]
|
@user = user_context[:user]
|
||||||
@account = user_context[:account]
|
@account = user_context[:account]
|
||||||
@account_user = user_context[:account_user]
|
@account_user = user_context[:account_user]
|
||||||
|
|||||||
@@ -88,10 +88,10 @@ class MailPresenter < SimpleDelegator
|
|||||||
return sender_agnostic_regexes if @account.nil? || account_support_email.blank?
|
return sender_agnostic_regexes if @account.nil? || account_support_email.blank?
|
||||||
|
|
||||||
[
|
[
|
||||||
Regexp.new("From:\s*" + Regexp.escape(account_support_email), Regexp::IGNORECASE),
|
Regexp.new("From:\s* #{Regexp.escape(account_support_email)}", Regexp::IGNORECASE),
|
||||||
Regexp.new('<' + Regexp.escape(account_support_email) + '>', Regexp::IGNORECASE),
|
Regexp.new("<#{Regexp.escape(account_support_email)}>", Regexp::IGNORECASE),
|
||||||
Regexp.new(Regexp.escape(account_support_email) + "\s+wrote:", Regexp::IGNORECASE),
|
Regexp.new("#{Regexp.escape(account_support_email)}\s+wrote:", Regexp::IGNORECASE),
|
||||||
Regexp.new('On(.*)' + Regexp.escape(account_support_email) + '(.*)wrote:', Regexp::IGNORECASE)
|
Regexp.new("On(.*)#{Regexp.escape(account_support_email)}(.*)wrote:", Regexp::IGNORECASE)
|
||||||
] + sender_agnostic_regexes
|
] + sender_agnostic_regexes
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ class Twitter::SendOnTwitterService < Base::SendOnChannelService
|
|||||||
tweet_data = response.body
|
tweet_data = response.body
|
||||||
message.update!(source_id: tweet_data['id_str'])
|
message.update!(source_id: tweet_data['id_str'])
|
||||||
else
|
else
|
||||||
Rails.logger.info 'TWITTER_TWEET_REPLY_ERROR' + response.body
|
Rails.logger.info "TWITTER_TWEET_REPLY_ERROR #{response.body}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class Twitter::WebhookSubscribeService
|
|||||||
delegate :twitter_client, to: :channel
|
delegate :twitter_client, to: :channel
|
||||||
|
|
||||||
def inbox
|
def inbox
|
||||||
Inbox.find_by!(id: inbox_id)
|
Inbox.find(inbox_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def twitter_url
|
def twitter_url
|
||||||
@@ -38,12 +38,12 @@ class Twitter::WebhookSubscribeService
|
|||||||
|
|
||||||
def unregister_webhook(webhook)
|
def unregister_webhook(webhook)
|
||||||
unregister_response = twitter_client.unregister_webhook(id: webhook.try(:[], 'id'))
|
unregister_response = twitter_client.unregister_webhook(id: webhook.try(:[], 'id'))
|
||||||
Rails.logger.info 'TWITTER_UNREGISTER_WEBHOOK: ' + unregister_response.body.to_s
|
Rails.logger.info "TWITTER_UNREGISTER_WEBHOOK: #{unregister_response.body}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def register_webhook
|
def register_webhook
|
||||||
register_response = twitter_client.register_webhook(url: twitter_url)
|
register_response = twitter_client.register_webhook(url: twitter_url)
|
||||||
Rails.logger.info 'TWITTER_UNREGISTER_WEBHOOK: ' + register_response.body.to_s
|
Rails.logger.info "TWITTER_UNREGISTER_WEBHOOK: #{register_response.body}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def subscription?
|
def subscription?
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ as defined by the routes in the `admin/` namespace
|
|||||||
<i class="<%= sidebar_icons[resource.resource.to_sym] %>"></i>
|
<i class="<%= sidebar_icons[resource.resource.to_sym] %>"></i>
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
display_resource_name(resource),
|
display_resource_name(resource),
|
||||||
[namespace, resource_index_route_key(resource)],
|
resource_index_route(resource)
|
||||||
) if valid_action? :index, resource %>
|
) if valid_action? :index, resource %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -78,12 +78,12 @@ Rails.application.configure do
|
|||||||
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
|
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
|
||||||
|
|
||||||
if ENV['RAILS_LOG_TO_STDOUT'].present?
|
if ENV['RAILS_LOG_TO_STDOUT'].present?
|
||||||
logger = ActiveSupport::Logger.new(STDOUT)
|
logger = ActiveSupport::Logger.new($stdout)
|
||||||
logger.formatter = config.log_formatter
|
logger.formatter = config.log_formatter
|
||||||
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
||||||
else
|
else
|
||||||
config.logger = ActiveSupport::Logger.new(
|
config.logger = ActiveSupport::Logger.new(
|
||||||
Rails.root.join('log', Rails.env + '.log'),
|
Rails.root.join("log/#{Rails.env}.log"),
|
||||||
1,
|
1,
|
||||||
ENV.fetch('LOG_SIZE', '1024').to_i.megabytes
|
ENV.fetch('LOG_SIZE', '1024').to_i.megabytes
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -92,10 +92,10 @@ Rails.application.configure do
|
|||||||
|
|
||||||
# Use a different logger for distributed setups.
|
# Use a different logger for distributed setups.
|
||||||
# require 'syslog/logger'
|
# require 'syslog/logger'
|
||||||
config.logger = ActiveSupport::Logger.new(Rails.root.join('log', Rails.env + '.log'), 1, ENV.fetch('LOG_SIZE', '1024').to_i.megabytes)
|
config.logger = ActiveSupport::Logger.new(Rails.root.join("log/#{Rails.env}.log"), 1, ENV.fetch('LOG_SIZE', '1024').to_i.megabytes)
|
||||||
|
|
||||||
if ENV['RAILS_LOG_TO_STDOUT'].present?
|
if ENV['RAILS_LOG_TO_STDOUT'].present?
|
||||||
logger = ActiveSupport::Logger.new(STDOUT)
|
logger = ActiveSupport::Logger.new($stdout)
|
||||||
logger.formatter = config.log_formatter
|
logger.formatter = config.log_formatter
|
||||||
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ module QueryTrace
|
|||||||
def log_info_with_trace(event)
|
def log_info_with_trace(event)
|
||||||
log_info_without_trace(event)
|
log_info_without_trace(event)
|
||||||
trace_log = Rails.backtrace_cleaner.clean(caller).first
|
trace_log = Rails.backtrace_cleaner.clean(caller).first
|
||||||
logger.debug(" \\_ \e[33mCalled from:\e[0m " + trace_log) if trace_log && event.payload[:name] != 'SCHEMA'
|
logger.debug(" \\_ \e[33mCalled from:\e[0m #{trace_log}") if trace_log && event.payload[:name] != 'SCHEMA'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -13,5 +13,6 @@ class CustomExceptions::Base < ::StandardError
|
|||||||
|
|
||||||
def initialize(data)
|
def initialize(data)
|
||||||
@data = data
|
@data = data
|
||||||
|
super()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class Integrations::Facebook::MessageCreator
|
|||||||
|
|
||||||
def create_agent_message
|
def create_agent_message
|
||||||
Channel::FacebookPage.where(page_id: response.sender_id).each do |page|
|
Channel::FacebookPage.where(page_id: response.sender_id).each do |page|
|
||||||
mb = Messages::Facebook::MessageBuilder.new(response, page.inbox, true)
|
mb = Messages::Facebook::MessageBuilder.new(response, page.inbox, outgoing_echo: true)
|
||||||
mb.perform
|
mb.perform
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
require 'rails_helper'
|
|
||||||
|
|
||||||
RSpec.describe DefaultMailbox, type: :mailbox do
|
|
||||||
pending "add some examples to (or delete) #{__FILE__}"
|
|
||||||
end
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
require 'rails_helper'
|
|
||||||
|
|
||||||
RSpec.describe SuperAdmin, type: :model do
|
|
||||||
pending "add some examples to (or delete) #{__FILE__}"
|
|
||||||
end
|
|
||||||
Reference in New Issue
Block a user