Refactoring Gem Groups
This commit is contained in:
parent
3988777718
commit
701722983b
5 changed files with 97 additions and 34 deletions
93
Gemfile
93
Gemfile
|
@ -2,52 +2,81 @@ source 'https://rubygems.org'
|
|||
|
||||
ruby '2.6.3'
|
||||
|
||||
gem 'acts-as-taggable-on', git: 'https://github.com/mbleigh/acts-as-taggable-on'
|
||||
gem 'bootsnap'
|
||||
gem 'carrierwave-aws'
|
||||
gem 'chargebee', '~>2'
|
||||
gem 'coffee-rails'
|
||||
gem 'devise', git: 'https://github.com/plataformatec/devise'
|
||||
gem 'devise_token_auth', git: 'https://github.com/lynndylanhurley/devise_token_auth'
|
||||
gem 'facebook-messenger', '~> 0.11.1'
|
||||
gem 'figaro'
|
||||
##-- base gems for rails --##
|
||||
gem 'rails', '~> 6', github: 'rails/rails'
|
||||
gem 'rack-cors', require: 'rack/cors'
|
||||
# Reduces boot times through caching; required in config/boot.rb
|
||||
gem 'bootsnap', require: false
|
||||
gem 'therubyracer', platforms: :ruby
|
||||
|
||||
|
||||
##-- rails helper gems --##
|
||||
gem 'responders'
|
||||
gem 'valid_email2'
|
||||
gem 'attr_extras'
|
||||
gem 'hashie'
|
||||
gem 'jbuilder', '~> 2.5'
|
||||
gem 'kaminari'
|
||||
gem 'koala'
|
||||
gem 'mini_magick'
|
||||
gem 'nightfury', '~> 1.0', '>= 1.0.1'
|
||||
gem 'time_diff'
|
||||
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
||||
gem 'acts-as-taggable-on', git: 'https://github.com/mbleigh/acts-as-taggable-on'
|
||||
|
||||
|
||||
##-- gems for database --#
|
||||
gem 'pg'
|
||||
gem 'puma', '~> 3.0'
|
||||
gem 'pundit'
|
||||
gem 'pusher'
|
||||
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
||||
gem 'rack-cors', require: 'rack/cors'
|
||||
gem 'rails', '~> 6', github: 'rails/rails'
|
||||
gem 'redis'
|
||||
gem 'redis-namespace'
|
||||
gem 'redis-rack-cache'
|
||||
gem 'responders'
|
||||
gem 'sentry-raven'
|
||||
gem 'sidekiq'
|
||||
gem 'telegram-bot-ruby'
|
||||
gem 'therubyracer', platforms: :ruby
|
||||
gem 'time_diff'
|
||||
gem 'uglifier', '>= 1.3.0'
|
||||
gem 'valid_email2'
|
||||
gem 'wisper', '2.0.0'
|
||||
gem 'attr_extras'
|
||||
|
||||
|
||||
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
||||
##--- gems for server & infra configuration ---##
|
||||
gem 'puma', '~> 3.0'
|
||||
gem 'webpacker'
|
||||
|
||||
# for starting different server processes
|
||||
gem 'foreman'
|
||||
gem 'figaro'
|
||||
|
||||
|
||||
##--- gems for authentication & authorization ---##
|
||||
gem 'devise', git: 'https://github.com/plataformatec/devise'
|
||||
gem 'devise_token_auth', git: 'https://github.com/lynndylanhurley/devise_token_auth'
|
||||
# authorization
|
||||
gem 'pundit'
|
||||
|
||||
|
||||
##--- gems for pubsub service ---##
|
||||
gem 'pusher'
|
||||
gem 'wisper', '2.0.0'
|
||||
|
||||
|
||||
##--- gems for reporting ---##
|
||||
gem 'nightfury', '~> 1.0', '>= 1.0.1'
|
||||
|
||||
|
||||
##--- gems for billing ---##
|
||||
gem 'chargebee', '~>2'
|
||||
|
||||
|
||||
##--- gems for channels ---##
|
||||
gem 'facebook-messenger', '~> 0.11.1'
|
||||
gem 'twitter'
|
||||
gem 'telegram-bot-ruby'
|
||||
# facebook client
|
||||
gem 'koala'
|
||||
|
||||
|
||||
##--- gems for debugging and error reporting ---##
|
||||
# static analysis
|
||||
gem 'brakeman'
|
||||
gem 'sentry-raven'
|
||||
|
||||
|
||||
##-- TODO: move these gems to appropriate groups --##
|
||||
gem 'carrierwave-aws'
|
||||
gem 'coffee-rails'
|
||||
gem 'mini_magick'
|
||||
gem 'sidekiq'
|
||||
gem 'uglifier', '>= 1.3.0'
|
||||
|
||||
|
||||
group :development do
|
||||
gem 'letter_opener'
|
||||
|
|
24
Gemfile.lock
24
Gemfile.lock
|
@ -141,6 +141,7 @@ GEM
|
|||
bootsnap (1.4.5)
|
||||
msgpack (~> 1.0)
|
||||
brakeman (4.6.1)
|
||||
buftok (0.2.0)
|
||||
builder (3.2.3)
|
||||
byebug (11.0.1)
|
||||
carrierwave (2.0.2)
|
||||
|
@ -199,9 +200,16 @@ GEM
|
|||
globalid (0.4.2)
|
||||
activesupport (>= 4.2.0)
|
||||
hashie (3.6.0)
|
||||
http (3.3.0)
|
||||
addressable (~> 2.3)
|
||||
http-cookie (~> 1.0)
|
||||
http-form_data (~> 2.0)
|
||||
http_parser.rb (~> 0.6.0)
|
||||
http-accept (1.7.0)
|
||||
http-cookie (1.0.3)
|
||||
domain_name (~> 0.5)
|
||||
http-form_data (2.1.1)
|
||||
http_parser.rb (0.6.0)
|
||||
httparty (0.17.1)
|
||||
mime-types (~> 3.0)
|
||||
multi_xml (>= 0.5.2)
|
||||
|
@ -250,6 +258,8 @@ GEM
|
|||
mini_mime (>= 0.1.1)
|
||||
marcel (0.3.3)
|
||||
mimemagic (~> 0.3.2)
|
||||
memoizable (0.4.2)
|
||||
thread_safe (~> 0.3, >= 0.3.1)
|
||||
method_source (0.9.2)
|
||||
mime-types (3.3)
|
||||
mime-types-data (~> 3.2015)
|
||||
|
@ -264,6 +274,7 @@ GEM
|
|||
multi_json (1.13.1)
|
||||
multi_xml (0.6.0)
|
||||
multipart-post (2.1.1)
|
||||
naught (1.1.0)
|
||||
netrc (0.11.0)
|
||||
nightfury (1.0.1)
|
||||
nio4r (2.5.2)
|
||||
|
@ -364,6 +375,7 @@ GEM
|
|||
rack (>= 2.0.0)
|
||||
rack-protection (>= 2.0.0)
|
||||
redis (>= 4.1.0)
|
||||
simple_oauth (0.3.1)
|
||||
spring (2.1.0)
|
||||
spring-watcher-listen (2.0.1)
|
||||
listen (>= 2.7, < 4.0)
|
||||
|
@ -387,6 +399,17 @@ GEM
|
|||
time_diff (0.3.0)
|
||||
activesupport
|
||||
i18n
|
||||
twitter (6.2.0)
|
||||
addressable (~> 2.3)
|
||||
buftok (~> 0.2.0)
|
||||
equalizer (~> 0.0.11)
|
||||
http (~> 3.0)
|
||||
http-form_data (~> 2.0)
|
||||
http_parser.rb (~> 0.6.0)
|
||||
memoizable (~> 0.4.0)
|
||||
multipart-post (~> 2.0)
|
||||
naught (~> 1.0)
|
||||
simple_oauth (~> 0.3.0)
|
||||
tzinfo (1.2.5)
|
||||
thread_safe (~> 0.1)
|
||||
uglifier (4.2.0)
|
||||
|
@ -470,6 +493,7 @@ DEPENDENCIES
|
|||
telegram-bot-ruby
|
||||
therubyracer
|
||||
time_diff
|
||||
twitter
|
||||
tzinfo-data
|
||||
uglifier (>= 1.3.0)
|
||||
valid_email2
|
||||
|
|
10
app/models/concerns/pubsubable.rb
Normal file
10
app/models/concerns/pubsubable.rb
Normal file
|
@ -0,0 +1,10 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Pubsubable
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
#Used by the pusher/PubSub Service we use for real time communications
|
||||
has_secure_token :pubsub_token
|
||||
end
|
||||
end
|
|
@ -1,7 +1,6 @@
|
|||
class Contact < ApplicationRecord
|
||||
include Pubsubable
|
||||
|
||||
#Used by the pusher/PubSub Service we use for real time communications
|
||||
has_secure_token :pubsub_token
|
||||
validates :account_id, presence: true
|
||||
validates :inbox_id, presence: true
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ class User < ApplicationRecord
|
|||
# Include default devise modules.
|
||||
include DeviseTokenAuth::Concerns::User
|
||||
include Events::Types
|
||||
include Pubsubable
|
||||
|
||||
devise :database_authenticatable,
|
||||
:registerable,
|
||||
|
|
Loading…
Reference in a new issue