Skip to content
Permalink
Browse files

Revert "Merge pull request #2018 from sonalkr132/rails-6"

This reverts commit db88e23, reversing
changes made to e01d3df.
  • Loading branch information...
sonalkr132 committed Nov 6, 2019
1 parent db88e23 commit 3327386276ddcc3ef854b47b51cd530d9358e44d
@@ -1,6 +1,6 @@
source "https://rubygems.org"

gem "rails", "~> 6.0.0"
gem "rails", "~> 5.2.1"
gem "rails-i18n"

gem "autoprefixer-rails"
@@ -1,63 +1,50 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (6.0.0)
actionpack (= 6.0.0)
actioncable (5.2.3)
actionpack (= 5.2.3)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.0.0)
actionpack (= 6.0.0)
activejob (= 6.0.0)
activerecord (= 6.0.0)
activestorage (= 6.0.0)
activesupport (= 6.0.0)
mail (>= 2.7.1)
actionmailer (6.0.0)
actionpack (= 6.0.0)
actionview (= 6.0.0)
activejob (= 6.0.0)
actionmailer (5.2.3)
actionpack (= 5.2.3)
actionview (= 5.2.3)
activejob (= 5.2.3)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.0.0)
actionview (= 6.0.0)
activesupport (= 6.0.0)
actionpack (5.2.3)
actionview (= 5.2.3)
activesupport (= 5.2.3)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.0.0)
actionpack (= 6.0.0)
activerecord (= 6.0.0)
activestorage (= 6.0.0)
activesupport (= 6.0.0)
nokogiri (>= 1.8.5)
actionview (6.0.0)
activesupport (= 6.0.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.3)
activesupport (= 5.2.3)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.0.0)
activesupport (= 6.0.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.3)
activesupport (= 5.2.3)
globalid (>= 0.3.6)
activemodel (6.0.0)
activesupport (= 6.0.0)
activerecord (6.0.0)
activemodel (= 6.0.0)
activesupport (= 6.0.0)
activestorage (6.0.0)
actionpack (= 6.0.0)
activejob (= 6.0.0)
activerecord (= 6.0.0)
activemodel (5.2.3)
activesupport (= 5.2.3)
activerecord (5.2.3)
activemodel (= 5.2.3)
activesupport (= 5.2.3)
arel (>= 9.0)
activestorage (5.2.3)
actionpack (= 5.2.3)
activerecord (= 5.2.3)
marcel (~> 0.3.1)
activesupport (6.0.0)
activesupport (5.2.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.1, >= 2.1.8)
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
arel (9.0.0)
ast (2.4.0)
autoprefixer-rails (9.6.1)
execjs
@@ -145,7 +132,7 @@ GEM
multi_json
email_validator (1.6.0)
activemodel
erubi (1.9.0)
erubi (1.8.0)
execjs (2.7.0)
factory_bot (5.0.2)
activesupport (>= 4.2.0)
@@ -250,7 +237,7 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2019.0331)
mimemagic (0.3.3)
mini_mime (1.0.2)
mini_mime (1.0.0)
mini_portile2 (2.4.0)
minitest (5.12.2)
mocha (1.2.1)
@@ -260,7 +247,7 @@ GEM
multipart-post (2.0.0)
netrc (0.11.0)
newrelic_rpm (6.3.0.355)
nio4r (2.5.2)
nio4r (2.3.1)
nokogiri (1.10.4)
mini_portile2 (~> 2.4.0)
oj (3.7.12)
@@ -287,20 +274,18 @@ GEM
rack (>= 1.0, < 3)
rack-utf8_sanitizer (1.6.0)
rack (>= 1.0, < 3.0)
rails (6.0.0)
actioncable (= 6.0.0)
actionmailbox (= 6.0.0)
actionmailer (= 6.0.0)
actionpack (= 6.0.0)
actiontext (= 6.0.0)
actionview (= 6.0.0)
activejob (= 6.0.0)
activemodel (= 6.0.0)
activerecord (= 6.0.0)
activestorage (= 6.0.0)
activesupport (= 6.0.0)
rails (5.2.3)
actioncable (= 5.2.3)
actionmailer (= 5.2.3)
actionpack (= 5.2.3)
actionview (= 5.2.3)
activejob (= 5.2.3)
activemodel (= 5.2.3)
activerecord (= 5.2.3)
activestorage (= 5.2.3)
activesupport (= 5.2.3)
bundler (>= 1.3.0)
railties (= 6.0.0)
railties (= 5.2.3)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
@@ -312,18 +297,18 @@ GEM
ruby-graphviz (~> 1.2)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
rails-i18n (6.0.0)
rails-i18n (5.1.3)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 7)
railties (6.0.0)
actionpack (= 6.0.0)
activesupport (= 6.0.0)
railties (>= 5.0, < 6)
railties (5.2.3)
actionpack (= 5.2.3)
activesupport (= 5.2.3)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
thor (>= 0.19.0, < 2.0)
rainbow (3.0.0)
raindrops (0.19.0)
rake (13.0.0)
rake (12.3.3)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
@@ -408,13 +393,12 @@ GEM
raindrops (~> 0.7)
validates_formatting_of (0.9.0)
activemodel
websocket-driver (0.7.1)
websocket-driver (0.7.0)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.4)
websocket-extensions (0.1.3)
xml-simple (1.1.5)
xpath (3.1.0)
nokogiri (~> 1.8)
zeitwerk (2.1.10)

PLATFORMS
ruby
@@ -459,7 +443,7 @@ DEPENDENCIES
rack-attack
rack-test
rack-utf8_sanitizer
rails (~> 6.0.0)
rails (~> 5.2.1)
rails-erd
rails-i18n
rbtrace (~> 0.4.8)
@@ -1,43 +1,30 @@
require_relative "boot"
require_relative 'boot'

require "rails"
# Pick the frameworks you want:
# require "active_model/railtie"
require "active_job/railtie"
require "active_record/railtie"
# require "active_storage/engine"
require "action_controller/railtie"
require "action_mailer/railtie"
# require "action_mailbox/engine"
# require "action_text/engine"
require "action_view/railtie"
# require "action_cable/engine"
require "sprockets/railtie"
require "rails/test_unit/railtie"
require "elasticsearch/rails/instrumentation"
require 'active_record/railtie'
require 'action_controller/railtie'
require 'action_view/railtie'
require 'action_mailer/railtie'
require 'active_job/railtie'
require 'rails/test_unit/railtie'
require 'sprockets/railtie'
require 'elasticsearch/rails/instrumentation'

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)

module Gemcutter
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 5.2

# Settings in config/environments/* take precedence over those specified here.
# Application configuration can go into files in config/initializers
# -- all .rb files in that directory are automatically loaded after loading
# the framework and any gems in your application.

# Using true enables origin-checking CSRF mitigation. Our API can"t use this check.
# Using true enables origin-checking CSRF mitigation. Our API can't use this check.
config.action_controller.forgery_protection_origin_check = false

config.rubygems = Application.config_for :rubygems

config.time_zone = "UTC"
config.encoding = "utf-8"
config.i18n.available_locales = [:en, :nl, "zh-CN", "zh-TW", "pt-BR", :fr, :es, :de, :ja]
config.i18n.available_locales = [:en, :nl, 'zh-CN', 'zh-TW', 'pt-BR', :fr, :es, :de, :ja]
config.i18n.fallbacks = [:en]

config.middleware.insert 0, Rack::UTF8Sanitizer
@@ -47,12 +34,12 @@ class Application < Rails::Application
config.active_record.include_root_in_json = false

config.after_initialize do
RubygemFs.s3! ENV["S3_PROXY"] if ENV["S3_PROXY"]
RubygemFs.s3! ENV['S3_PROXY'] if ENV['S3_PROXY']
end

config.plugins = [:dynamic_form]

config.eager_load_paths << Rails.root.join("lib")
config.eager_load_paths << Rails.root.join('lib')
end

def self.config
@@ -62,14 +49,14 @@ def self.config
DEFAULT_PAGE = 1
DEFAULT_PAGINATION = 20
EMAIL_TOKEN_EXPRIES_AFTER = 3.hours
HOST = config["host"]
HOST = config['host']
NEWS_DAYS_LIMIT = 7.days
NEWS_MAX_PAGES = 10
NEWS_PER_PAGE = 10
MAX_PAGES = 1000
MFA_KEY_EXPIRY = 30.minutes
POPULAR_DAYS_LIMIT = 70.days
PROTOCOL = config["protocol"]
PROTOCOL = config['protocol']
REMEMBER_FOR = 2.weeks
SEARCH_MAX_PAGES = 100 # Limit max page as ES result window is upper bounded by 10_000 records
STATS_MAX_PAGES = 10
@@ -18,9 +18,9 @@
# Run rails dev:cache to toggle caching.
if Rails.root.join('tmp', 'caching-dev.txt').exist?
config.action_controller.perform_caching = true
config.action_controller.enable_fragment_cache_logging = true

config.cache_store = :mem_cache_store,
'localhost:11211',
{ compress: true, compression_min_size: 524_288 }
config.public_file_server.headers = {
'Cache-Control' => "public, max-age=#{2.days.to_i}"
@@ -56,7 +56,7 @@
# Suppress logger output for asset requests.
config.assets.quiet = true

# Raises error for missing translations.
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true

config.middleware.use Hostess

0 comments on commit 3327386

Please sign in to comment.
You can’t perform that action at this time.