mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 05:05:45 +02:00
Merge pull request #856 from internetee/remove-spring-gem
Remove "spring" gem
This commit is contained in:
commit
549852048e
10 changed files with 34 additions and 44 deletions
3
Gemfile
3
Gemfile
|
@ -102,9 +102,6 @@ gem 'jquery-ui-rails', '5.0.5'
|
||||||
gem 'active_model-errors_details' # Backport from Rails 5, https://github.com/rails/rails/pull/18322
|
gem 'active_model-errors_details' # Backport from Rails 5, https://github.com/rails/rails/pull/18322
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
gem 'spring'
|
|
||||||
gem 'spring-commands-rspec'
|
|
||||||
|
|
||||||
# deploy
|
# deploy
|
||||||
gem 'mina', '0.3.1' # for fast deployment
|
gem 'mina', '0.3.1' # for fast deployment
|
||||||
gem 'puma'
|
gem 'puma'
|
||||||
|
|
|
@ -408,10 +408,6 @@ GEM
|
||||||
sixarm_ruby_unaccent (1.1.1)
|
sixarm_ruby_unaccent (1.1.1)
|
||||||
slop (3.6.0)
|
slop (3.6.0)
|
||||||
socksify (1.7.1)
|
socksify (1.7.1)
|
||||||
spring (2.0.2)
|
|
||||||
activesupport (>= 4.2)
|
|
||||||
spring-commands-rspec (1.0.4)
|
|
||||||
spring (>= 0.9.1)
|
|
||||||
sprockets (3.7.1)
|
sprockets (3.7.1)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
rack (> 1, < 3)
|
rack (> 1, < 3)
|
||||||
|
@ -519,8 +515,6 @@ DEPENDENCIES
|
||||||
selectize-rails (= 0.12.1)
|
selectize-rails (= 0.12.1)
|
||||||
simplecov
|
simplecov
|
||||||
simpleidn (= 0.0.7)
|
simpleidn (= 0.0.7)
|
||||||
spring
|
|
||||||
spring-commands-rspec
|
|
||||||
uglifier
|
uglifier
|
||||||
uuidtools (= 2.1.5)
|
uuidtools (= 2.1.5)
|
||||||
validates_email_format_of (= 1.6.3)
|
validates_email_format_of (= 1.6.3)
|
||||||
|
@ -528,4 +522,4 @@ DEPENDENCIES
|
||||||
whenever (= 0.9.4)
|
whenever (= 0.9.4)
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
1.16.1
|
1.16.2
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
begin
|
|
||||||
load File.expand_path('../spring', __FILE__)
|
|
||||||
rescue LoadError
|
|
||||||
'no spring'
|
|
||||||
end
|
|
||||||
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
||||||
require_relative '../config/boot'
|
require_relative '../config/boot'
|
||||||
require 'rails/commands'
|
require 'rails/commands'
|
||||||
|
|
5
bin/rake
5
bin/rake
|
@ -1,9 +1,4 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
begin
|
|
||||||
load File.expand_path('../spring', __FILE__)
|
|
||||||
rescue LoadError
|
|
||||||
'no spring'
|
|
||||||
end
|
|
||||||
require_relative '../config/boot'
|
require_relative '../config/boot'
|
||||||
require 'rake'
|
require 'rake'
|
||||||
Rake.application.run
|
Rake.application.run
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
begin
|
|
||||||
load File.expand_path("../spring", __FILE__)
|
|
||||||
rescue LoadError
|
|
||||||
end
|
|
||||||
#
|
#
|
||||||
# This file was generated by Bundler.
|
# This file was generated by Bundler.
|
||||||
#
|
#
|
||||||
|
|
29
bin/setup
Normal file
29
bin/setup
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
require 'pathname'
|
||||||
|
|
||||||
|
# path to your application root.
|
||||||
|
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
||||||
|
|
||||||
|
Dir.chdir APP_ROOT do
|
||||||
|
# This script is a starting point to setup your application.
|
||||||
|
# Add necessary setup steps to this file:
|
||||||
|
|
||||||
|
puts "== Installing dependencies =="
|
||||||
|
system "gem install bundler --conservative"
|
||||||
|
system "bundle check || bundle install"
|
||||||
|
|
||||||
|
# puts "\n== Copying sample files =="
|
||||||
|
# unless File.exist?("config/database.yml")
|
||||||
|
# system "cp config/database.yml.sample config/database.yml"
|
||||||
|
# end
|
||||||
|
|
||||||
|
puts "\n== Preparing database =="
|
||||||
|
system "bin/rake db:setup"
|
||||||
|
|
||||||
|
puts "\n== Removing old logs and tempfiles =="
|
||||||
|
system "rm -f log/*"
|
||||||
|
system "rm -rf tmp/cache"
|
||||||
|
|
||||||
|
puts "\n== Restarting application server =="
|
||||||
|
system "touch tmp/restart.txt"
|
||||||
|
end
|
15
bin/spring
15
bin/spring
|
@ -1,15 +0,0 @@
|
||||||
#!/usr/bin/env ruby
|
|
||||||
|
|
||||||
# This file loads spring without using Bundler, in order to be fast.
|
|
||||||
# It gets overwritten when you run the `spring binstub` command.
|
|
||||||
|
|
||||||
unless defined?(Spring)
|
|
||||||
require "rubygems"
|
|
||||||
require "bundler"
|
|
||||||
|
|
||||||
if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)
|
|
||||||
Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq }
|
|
||||||
gem "spring", match[1]
|
|
||||||
require "spring/binstub"
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -2,7 +2,7 @@ Rails.application.configure do
|
||||||
# Settings specified here will take precedence over those in config/application.rb.
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
|
|
||||||
config.cache_classes = true
|
config.cache_classes = true
|
||||||
config.eager_load = true
|
config.eager_load = false
|
||||||
|
|
||||||
config.serve_static_files = true
|
config.serve_static_files = true
|
||||||
config.static_cache_control = 'public, max-age=3600'
|
config.static_cache_control = 'public, max-age=3600'
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Spring.watch 'config/application.yml'
|
|
|
@ -6,7 +6,7 @@ PaperTrail::Version.module_eval do
|
||||||
end
|
end
|
||||||
|
|
||||||
# Store console and rake changes in versions
|
# Store console and rake changes in versions
|
||||||
if defined?(::Rails::Console) || File.basename($PROGRAM_NAME).split(' ').first == 'spring'
|
if defined?(::Rails::Console)
|
||||||
PaperTrail.whodunnit = "console-#{`whoami`.strip}"
|
PaperTrail.whodunnit = "console-#{`whoami`.strip}"
|
||||||
elsif File.basename($PROGRAM_NAME) == 'rake'
|
elsif File.basename($PROGRAM_NAME) == 'rake'
|
||||||
# rake username does not work when spring enabled
|
# rake username does not work when spring enabled
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue