diff --git a/Gemfile b/Gemfile index e738bbf54..d5edcf01e 100644 --- a/Gemfile +++ b/Gemfile @@ -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 diff --git a/Gemfile.lock b/Gemfile.lock index 57fa47fcb..54bf10c16 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) diff --git a/config/initializers/fastly.rb b/config/initializers/fastly.rb deleted file mode 100644 index 1b6dc5dd5..000000000 --- a/config/initializers/fastly.rb +++ /dev/null @@ -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 diff --git a/spec/requests/reactions_spec.rb b/spec/requests/reactions_spec.rb index 2e41d3838..771923d04 100644 --- a/spec/requests/reactions_spec.rb +++ b/spec/requests/reactions_spec.rb @@ -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