Skip to content
Permalink
Browse files

Autocorrect root and script folder for double quote string

Excluding config folder as we don't really change it as often.
  • Loading branch information...
sonalkr132 committed Jun 24, 2019
1 parent b61d39c commit d24c743fd78517997972fcd29c4a82c357b894ef
Showing with 87 additions and 85 deletions.
  1. +2 −0 .rubocop.yml
  2. +60 −60 Gemfile
  3. +1 −1 Rakefile
  4. +1 −1 config.ru
  5. +2 −2 script/add_owner
  6. +2 −2 script/change_email
  7. +2 −2 script/delayed_job
  8. +7 −7 script/merge_users
  9. +2 −2 script/permadelete
  10. +3 −3 script/rails
  11. +2 −2 script/release_reserved_namespace
  12. +2 −2 script/restore_version
  13. +1 −1 script/s3_utils.rb
@@ -98,6 +98,8 @@ Style/Documentation:

Style/StringLiterals:
EnforcedStyle: double_quotes
Exclude:
- config/**/*

Style/FrozenStringLiteralComment:
Enabled: false
120 Gemfile
@@ -1,76 +1,76 @@
source 'https://rubygems.org'
source "https://rubygems.org"

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

gem 'autoprefixer-rails'
gem 'aws-sdk', '~> 2.2'
gem 'clearance'
gem 'clearance-deprecated_password_strategies'
gem 'daemons'
gem 'dalli'
gem 'delayed_job'
gem 'delayed_job_active_record'
gem 'gravtastic'
gem 'high_voltage'
gem 'honeybadger'
gem 'http_accept_language'
gem 'jquery-rails'
gem 'kaminari'
gem 'mail'
gem 'newrelic_rpm'
gem 'paul_revere', '~> 3.0.0'
gem 'pg'
gem 'rack'
gem 'rack-utf8_sanitizer'
gem 'rbtrace', '~> 0.4.8'
gem 'rdoc'
gem 'rest-client', require: 'rest_client'
gem 'roadie-rails'
gem 'sass', require: false
gem 'shoryuken', '~> 2.1.0', require: false
gem 'statsd-instrument', '~> 2.3.0'
gem 'uglifier', '>= 1.0.3'
gem 'unicorn', '~> 5.5.0.1.g6836'
gem 'validates_formatting_of'
gem 'elasticsearch-model', '~> 5.0.0'
gem 'elasticsearch-rails', '~> 5.0.0'
gem 'elasticsearch-dsl', '~> 0.1.2'
gem 'faraday_middleware-aws-sigv4', '~> 0.2.4'
gem 'xml-simple'
gem 'compact_index', '~> 0.11.0'
gem 'sprockets-rails'
gem 'rack-attack'
gem 'rqrcode'
gem 'rotp'
gem "autoprefixer-rails"
gem "aws-sdk", "~> 2.2"
gem "clearance"
gem "clearance-deprecated_password_strategies"
gem "daemons"
gem "dalli"
gem "delayed_job"
gem "delayed_job_active_record"
gem "gravtastic"
gem "high_voltage"
gem "honeybadger"
gem "http_accept_language"
gem "jquery-rails"
gem "kaminari"
gem "mail"
gem "newrelic_rpm"
gem "paul_revere", "~> 3.0.0"
gem "pg"
gem "rack"
gem "rack-utf8_sanitizer"
gem "rbtrace", "~> 0.4.8"
gem "rdoc"
gem "rest-client", require: "rest_client"
gem "roadie-rails"
gem "sass", require: false
gem "shoryuken", "~> 2.1.0", require: false
gem "statsd-instrument", "~> 2.3.0"
gem "uglifier", ">= 1.0.3"
gem "unicorn", "~> 5.5.0.1.g6836"
gem "validates_formatting_of"
gem "elasticsearch-model", "~> 5.0.0"
gem "elasticsearch-rails", "~> 5.0.0"
gem "elasticsearch-dsl", "~> 0.1.2"
gem "faraday_middleware-aws-sigv4", "~> 0.2.4"
gem "xml-simple"
gem "compact_index", "~> 0.11.0"
gem "sprockets-rails"
gem "rack-attack"
gem "rqrcode"
gem "rotp"

# Logging
gem 'lograge'
gem 'logstash-event'
gem "lograge"
gem "logstash-event"

group :development, :test do
gem 'rubocop', require: false
gem 'rubocop-performance', require: false
gem 'toxiproxy', '~> 1.0.0'
gem 'pry-byebug'
gem "rubocop", require: false
gem "rubocop-performance", require: false
gem "toxiproxy", "~> 1.0.0"
gem "pry-byebug"
end

group :development do
gem 'bootsnap', require: false
gem 'rails-erd'
gem 'listen'
gem "bootsnap", require: false
gem "rails-erd"
gem "listen"
end

group :test do
gem 'minitest', require: false
gem 'capybara', '~> 2.18'
gem 'factory_bot_rails'
gem 'launchy'
gem 'rack-test', require: 'rack/test'
gem 'mocha', require: false
gem 'shoulda'
gem "minitest", require: false
gem "capybara", "~> 2.18"
gem "factory_bot_rails"
gem "launchy"
gem "rack-test", require: "rack/test"
gem "mocha", require: false
gem "shoulda"
end

group :development, :deploy do
gem 'kubernetes-deploy', '>= 0.20.6', require: false
gem "kubernetes-deploy", ">= 0.20.6", require: false
end
@@ -1,2 +1,2 @@
require File.expand_path('config/application', __dir__)
require File.expand_path("config/application", __dir__)
Gemcutter::Application.load_tasks
@@ -1,4 +1,4 @@
# This file is used by Rack-based servers to start the application.

require ::File.expand_path('../config/environment', __FILE__)
require ::File.expand_path("../config/environment", __FILE__)
run Gemcutter::Application
@@ -4,8 +4,8 @@ name, email = *ARGV

abort "Usage: script/add_owner [GEM_NAME] [USER_EMAIL]" if name.nil? || email.nil?

ENV['RAILS_ENV'] ||= 'production'
require_relative '../config/environment'
ENV["RAILS_ENV"] ||= "production"
require_relative "../config/environment"

user = User.find_by_email!(email)
rubygem = Rubygem.find_by_name!(name)
@@ -4,8 +4,8 @@ from_email, to_email = *ARGV

abort "Usage: script/change_email [FROM_EMAIL] [TO_EMAIL]" if from_email.nil? || to_email.nil?

ENV['RAILS_ENV'] ||= 'production'
require_relative '../config/environment'
ENV["RAILS_ENV"] ||= "production"
require_relative "../config/environment"

from_user = User.find_by_email!(from_email)
from_user.email = to_email
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby

require File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'environment'))
require 'delayed/command'
require File.expand_path(File.join(File.dirname(__FILE__), "..", "config", "environment"))
require "delayed/command"
Delayed::Command.new(ARGV).daemonize
@@ -4,8 +4,8 @@ first, second = *ARGV

abort "Usage: script/merge_users [FIRST_EMAIL] [SECOND_EMAIL]" if first.nil? || second.nil?

ENV['RAILS_ENV'] ||= 'production'
require_relative '../config/environment'
ENV["RAILS_ENV"] ||= "production"
require_relative "../config/environment"

first_user = User.find_by_email!(first)
second_user = User.find_by_email!(second)
@@ -19,16 +19,16 @@ end

def choose_one(first, second)
case $stdin.gets.chomp
when '1' then first
when '2' then second
when "1" then first
when "2" then second
else
puts 'You must choose 1 or 2'
puts "You must choose 1 or 2"
choose_one(first, second)
end
end

email = choose_from_two(first_user.email, second_user.email, term: 'email')
handle = choose_from_two(first_user.handle, second_user.handle, term: 'handle')
email = choose_from_two(first_user.email, second_user.email, term: "email")
handle = choose_from_two(first_user.handle, second_user.handle, term: "handle")

if email == first_user.email
chosen_user = first_user
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby

ENV['RAILS_ENV'] ||= 'production'
require_relative '../config/environment'
ENV["RAILS_ENV"] ||= "production"
require_relative "../config/environment"

name, number, email = ARGV

@@ -1,5 +1,5 @@
#!/usr/bin/env ruby

APP_PATH = File.expand_path('../config/application', __dir__)
require File.expand_path('../config/boot', __dir__)
require 'rails/commands'
APP_PATH = File.expand_path("../config/application", __dir__)
require File.expand_path("../config/boot", __dir__)
require "rails/commands"
@@ -4,8 +4,8 @@ rubygem_name = *ARGV

abort "Usage: script/release_reserved_namespace [GEM_NAME]" if rubygem_name.nil?

ENV['RAILS_ENV'] ||= 'production'
require_relative '../config/environment'
ENV["RAILS_ENV"] ||= "production"
require_relative "../config/environment"

rubygem = Rubygem.find_by_name!(rubygem_name)
rubygem.update_attribute(:updated_at, 101.days.ago)
@@ -4,8 +4,8 @@ gem_name, version_number, platform = *ARGV

abort "Usage: script/restore_version GEM_NAME VESRION_NUMBER [PLATFORM]" if gem_name.nil? || version_number.nil?

ENV['RAILS_ENV'] ||= 'production'
require_relative '../config/environment'
ENV["RAILS_ENV"] ||= "production"
require_relative "../config/environment"

rubygem = Rubygem.find_by_name!(gem_name)
slug = version_number
@@ -29,7 +29,7 @@ def write_s3_versions(version_full_name)
body = @s3.get_object(key: vs3.key, bucket: @bucket, version_id: vs3.version_id).body.read
md5 = Digest::MD5.hexdigest(body)
filename = "#{version_full_name}-#{md5[0..5]}.gem"
File.open(filename, 'w') { |file| file.write(body) }
File.open(filename, "w") { |file| file.write(body) }
filename
end
end

0 comments on commit d24c743

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