Refactor: Remove Unused Figaro Gem and Temp Rake Task (#10255)

This commit is contained in:
Molly Struve 2020-09-09 02:24:32 -05:00 committed by GitHub
parent 327fe14ccb
commit 2bc1496bc4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 0 additions and 187 deletions

View file

@ -38,7 +38,6 @@ gem "faraday-http-cache", "~> 2.2" # Middleware to handle HTTP caching
gem "fastly", "~> 2.5" # Client library for the Fastly acceleration system
gem "feedjira", "~> 3.1" # A feed fetching and parsing library
gem "field_test", "~> 0.4" # A/B testing
gem "figaro", "~> 1.2" # Simple, Heroku-friendly Rails app configuration using ENV and a single YAML file
gem "flipper", "~> 0.18.0" # Feature flipping / flags for Ruby
gem "flipper-active_record", "~> 0.18.0" # Store Flipper flags in ActiveRecord
gem "flipper-ui", "~> 0.18.0"

View file

@ -307,8 +307,6 @@ GEM
browser (>= 2.0)
distribution
railties (>= 5)
figaro (1.2.0)
thor (>= 0.14.0, < 2)
fix-db-schema-conflicts (3.0.3)
rubocop (>= 0.38.0)
flipper (0.18.0)
@ -895,7 +893,6 @@ DEPENDENCIES
fastly (~> 2.5)
feedjira (~> 3.1)
field_test (~> 0.4)
figaro (~> 1.2)
fix-db-schema-conflicts (~> 3.0)
flipper (~> 0.18.0)
flipper-active_record (~> 0.18.0)

View file

@ -25,13 +25,6 @@ chdir APP_ROOT do
# Install JavaScript dependencies if using Yarn
system("bin/yarn")
# TEMPORARY @sre will remove before Sept 1, 2020
puts "\n== Create .env File from application.yml =="
system!("bin/rails create_dot_env_file")
if File.exist?("config/application.yml")
system!("mv config/application.yml config/application_unused.yml")
end
puts "\n== Copying sample files =="
unless File.exist?("config/database.yml")
cp "config/database.yml.sample", "config/database.yml"

View file

@ -1,148 +0,0 @@
# App domain + Protocol setting for development
APP_DOMAIN: "localhost:3000"
APP_PROTOCOL: "http://"
# Community Related Variables
COMMUNITY_NAME: "DEV(local)"
# Email related variables
DEFAULT_EMAIL: "yo@dev.to"
# Service timeout length
RACK_TIMEOUT_WAIT_TIMEOUT: 100_000
RACK_TIMEOUT_SERVICE_TIMEOUT: 100_000
# Redis caching storage
REDIS_URL: "redis://localhost:6379"
# Redis sessions storage
REDIS_SESSIONS_URL: "redis://localhost:6379"
SESSION_KEY: "_Dev_Community_Session"
SESSION_EXPIRY_SECONDS: 1209600 # two weeks in seconds
# Redis Sidekiq storage
REDIS_SIDEKIQ_URL: "redis://localhost:6379"
# Elasticsearch
ELASTICSEARCH_URL: "http://localhost:9200"
# SSL config
FORCE_SSL_IN_RAILS: "not applicable in dev"
################################################
############## 3rd Party Services ##############
################################################
# It's best if you have the following configured
# for more development experience
# GitHub
# (https://developer.github.com/v3/guides/basics-of-authentication/)
GITHUB_KEY: ""
GITHUB_SECRET: ""
# Twitter
# (https://developer.twitter.com/en/docs/basics/authentication/oauth-2-0/application-only)
TWITTER_KEY: ""
TWITTER_SECRET: ""
################################################
######### Optional 3rd Party Services ##########
################################################
# Honeybadger for error tracking
# (https://docs.honeybadger.io/lib/ruby/getting-started/introduction.html)
HONEYBADGER_API_KEY: "Optional"
HONEYBADGER_JS_API_KEY: "Optional"
# AWS for images storages
AWS_ID: "Optional"
AWS_SECRET: "Optional"
AWS_BUCKET_NAME: "Optional"
AWS_UPLOAD_REGION: ""
# AWS SDK
# (https://docs.aws.amazon.com/sdk-for-ruby/v3/developer-guide/setup-config.html)
AWS_DEFAULT_REGION: "us-east-1"
AWS_SDK_KEY: "Optional"
AWS_SDK_SECRET: "Optional"
# AWS for video storage
AWS_S3_INPUT_BUCKET: "Optional"
AWS_S3_VIDEO_ID: "Optional"
AWS_S3_VIDEO_KEY: "Optional"
# Buffer for sending to buffer
# (https://buffer.com/developers/api)
BUFFER_ACCESS_TOKEN: "Optional"
BUFFER_FACEBOOK_ID: "Optional"
BUFFER_LINKEDIN_ID: "Optional"
BUFFER_PROFILE_ID: 0
BUFFER_TWITTER_ID: "Optional"
BUFFER_LISTINGS_PROFILE: "Optional"
# Cloudinary for image resizing and cache??
# (https://cloudinary.com/documentation/rails_integration)
CLOUDINARY_API_KEY: "Optional"
CLOUDINARY_API_SECRET: "Optional"
CLOUDINARY_CLOUD_NAME: "Optional"
CLOUDINARY_SECURE: "Optional"
# HTML/CSS to Image for generating social preview images
# (https://docs.htmlcsstoimage.com/example-code/ruby)
HCTI_API_USER_ID: "Optional"
HCTI_API_KEY: "Optional"
# Fastly for edge caching
# (https://docs.fastly.com/api/)
FASTLY_API_KEY: ""
FASTLY_SERVICE_ID: ""
# Honeycomb for monitoring and observability
# (https://www.honeycomb.io/)
HONEYCOMB_API_KEY: ""
# Mailchimp for mails
# (https://mailchimp.com/developer/)
MAILCHIMP_API_KEY: "Optional-valid"
# Pusher for DEV Connect/notfications
# (https://pusher.com/docs)
PUSHER_APP_ID: "Optional"
PUSHER_CLUSTER: "Optional"
PUSHER_KEY: "Optional"
PUSHER_SECRET: "Optional"
PUSHER_BEAMS_ID: "Optional"
PUSHER_BEAMS_KEY: "Optional"
# Google recaptcha
# (https://developers.google.com/recaptcha/intro)
RECAPTCHA_SECRET: "Optional"
RECAPTCHA_SITE: "Optional"
# Slack for customer alerts
# (https://api.slack.com/)
SLACK_CHANNEL: ""
SLACK_DEPLOY_CHANNEL: ""
SLACK_WEBHOOK_URL: ""
# Stripe for payment system
# (https://stripe.com/docs/api)
STRIPE_PUBLISHABLE_KEY: "Optional"
STRIPE_SECRET_KEY: "Optional"
# For video calling in DEV Connect
# (https://www.twilio.com/docs/video)
TWILIO_ACCOUNT_SID: "Optional"
TWILIO_VIDEO_API_KEY: "Optional"
TWILIO_VIDEO_API_SECRET: "Optional"
# For Twitch live stream integration
# (https://dev.twitch.tv/docs)
TWITCH_CLIENT_ID: "Optional"
TWITCH_CLIENT_SECRET: "Optional"
TWITCH_WEBHOOK_SECRET: "Optional"
# For calling the Stack Exchange API
# (https://api.stackexchange.com/docs)
STACK_EXCHANGE_APP_KEY: ""

View file

@ -1,28 +0,0 @@
# Create a .env file from your application.yml file
task create_dot_env_file: :environment do
exit if File.file?(".env")
# Used to set all defaults we have if not set already in application.yml
sample_app_yml = YAML.load_file("config/sample_application.yml")
# read existing lines
application_yml = File.open("config/application.yml", "r").read
File.open(".env", "w") do |env_file|
# add default values only if they are not already present in the
# application.yml file which would result in a duplicate key
sample_app_yml.each_pair do |variable, value|
env_file.write("export #{variable}=#{value}\n") unless application_yml.include?(variable.to_s)
end
File.open("config/application.yml", "r") do |file|
file.each_line do |line|
new_line = line.gsub(": ", "=")
unless new_line.blank? || new_line.starts_with?("#")
new_line.prepend("export ")
end
env_file.write(new_line)
end
end
end
end

Binary file not shown.