[deploy] Remove fastly-rails gem (#7257)

* Remove fastly-rails gem

* Remove FastlyRails.configuration references

* Remove FastlyRails initializer
This commit is contained in:
Alex 2020-04-14 10:11:27 -04:00 committed by GitHub
parent 4e72579d6f
commit b51852e866
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 2 additions and 14 deletions

View file

@ -41,7 +41,6 @@ gem "emoji_regex", "~> 2.0" # A pair of Ruby regular expressions for matching Un
gem "envied", "~> 0.9" # Ensure presence and type of your app's ENV-variables
gem "fast_jsonapi", "~> 1.5" # Serializer for Ruby objects
gem "fastly", "~> 1.15" # Client library for the Fastly acceleration system
gem "fastly-rails", "~> 0.8" # Fastly dynamic caching integration for Rails
gem "feedjira", "~> 3.1" # A feed fetching and parsing library
gem "field_test", "~> 0.3" # A/B testing
gem "figaro", "~> 1.1" # Simple, Heroku-friendly Rails app configuration using ENV and a single YAML file

View file

@ -313,9 +313,6 @@ GEM
activesupport (>= 4.2)
fastimage (2.1.1)
fastly (1.15.0)
fastly-rails (0.8.0)
fastly (~> 1.6)
railties (> 2, < 6)
feedjira (3.1.1)
loofah (>= 2.3.1)
sax-machine (>= 1.0)
@ -919,7 +916,6 @@ DEPENDENCIES
faker (~> 2.11)
fast_jsonapi (~> 1.5)
fastly (~> 1.15)
fastly-rails (~> 0.8)
feedjira (~> 3.1)
field_test (~> 0.3)
figaro (~> 1.1)

View file

@ -1,7 +0,0 @@
FastlyRails.configure do |c|
c.api_key = ApplicationConfig["FASTLY_API_KEY"] # Fastly api key, required
c.max_age = 1.day.to_i # time in seconds, optional, defaults to 2592000 (30 days)
c.service_id = ApplicationConfig["FASTLY_SERVICE_ID"] # Fastly service you will be using, required
c.stale_if_error = 26_400
c.purging_enabled = Rails.env.production? # No need to configure a client locally (since 0.4.0)
end

View file

@ -5,8 +5,8 @@ RSpec.describe "Reactions", type: :request do
let(:article) { create(:article, user: user) }
let(:comment) { create(:comment, commentable: article) }
let_it_be(:max_age) { FastlyRails.configuration.max_age }
let_it_be(:stale_if_error) { FastlyRails.configuration.stale_if_error }
let_it_be(:max_age) { 1.day.to_i }
let_it_be(:stale_if_error) { 26_400 }
describe "GET /reactions?article_id=:article_id" do
before do