This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"references":[ | |
], | |
"interests":[ | |
{ | |
"keywords":[ | |
"Ruby", | |
"Web development", | |
"Backend development" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################ | |
# Global configuration | |
################################################################ | |
# Enable debug mode | |
# | |
# Optional | |
# Default: false | |
# | |
# debug = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"max-concurrent-indexers" : 2, | |
"dbpath" : "data", | |
"health-check-uri" : "/healthz", | |
"repos" : { | |
"repo1" : { | |
"url" : "file:///code/repo1" | |
}, | |
"repo2" : { | |
"url" : "file:///code/repo2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def formatted_env | |
case Rails.env | |
when 'production' | |
bold_upcased_env = Pry::Helpers::Text.bold(Rails.env.upcase) | |
Pry::Helpers::Text.red(bold_upcased_env) | |
when 'staging' | |
Pry::Helpers::Text.yellow(Rails.env) | |
when 'development' | |
Pry::Helpers::Text.green(Rails.env) | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ServiceGenerator < Rails::Generators::NamedBase | |
source_root File.expand_path('../templates', __FILE__) | |
def copy_service_file | |
template "service.rb", "app/services/#{file_name}.rb" | |
end | |
def copy_service_spec_file | |
template "service_spec.rb", "spec/services/#{file_name}_spec.rb" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc 'rolls back migrations in current branch not present in other' | |
task :rollback_branch_migrations, [:other_branch] do |t, args| | |
load "#{Dir.pwd}/Rakefile" | |
branch_migrations = BranchMigrations.new(args.other_branch) | |
puts ['Rollback the following migrations', branch_migrations, 'y,n? '] | |
next if %w[no n NO N].include?(STDIN.gets.chomp) | |
Rake::Task['environment'].invoke |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "mail" | |
require "optparse" | |
imap_opts = { | |
:address => "imap.gmail.com", | |
:port => 993, | |
:enable_ssl => true | |
} |