1
0
mirror of https://github.com/projekteuler/projekteuler.git synced 2025-12-10 08:46:41 +01:00

Merge pull request #21 from PFischbeck/gem-updates

Update gems
This commit is contained in:
Philipp Fischbeck 2015-01-05 13:26:33 +01:00
commit abc06e2a87
15 changed files with 174 additions and 93 deletions

View File

@ -1,4 +1,9 @@
language: ruby
cache: bundler
rvm:
- 2.1.5
- 1.9.3
script:
- export RAILS_ENV=test
- bundle exec rake db:create db:migrate
- bundle exec rake test

10
Gemfile
View File

@ -2,15 +2,15 @@ source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.7'
gem 'rails', '4.2.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
gem 'sass-rails', '~> 5.0.1'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
@ -23,8 +23,10 @@ gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'web-console', '~> 2.0', group: :development
# Use Coveralls for coverage documentation
gem 'coveralls', require: false
gem 'coveralls', '~> 0.7.2', require: false
gem 'bootstrap-sass', '~> 3.3.1'
gem 'autoprefixer-rails'

View File

@ -1,106 +1,132 @@
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.1.7)
actionpack (= 4.1.7)
actionview (= 4.1.7)
actionmailer (4.2.0)
actionpack (= 4.2.0)
actionview (= 4.2.0)
activejob (= 4.2.0)
mail (~> 2.5, >= 2.5.4)
actionpack (4.1.7)
actionview (= 4.1.7)
activesupport (= 4.1.7)
rack (~> 1.5.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.0)
actionview (= 4.2.0)
activesupport (= 4.2.0)
rack (~> 1.6.0)
rack-test (~> 0.6.2)
actionview (4.1.7)
activesupport (= 4.1.7)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
actionview (4.2.0)
activesupport (= 4.2.0)
builder (~> 3.1)
erubis (~> 2.7.0)
activemodel (4.1.7)
activesupport (= 4.1.7)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
activejob (4.2.0)
activesupport (= 4.2.0)
globalid (>= 0.3.0)
activemodel (4.2.0)
activesupport (= 4.2.0)
builder (~> 3.1)
activerecord (4.1.7)
activemodel (= 4.1.7)
activesupport (= 4.1.7)
arel (~> 5.0.0)
activesupport (4.1.7)
i18n (~> 0.6, >= 0.6.9)
activerecord (4.2.0)
activemodel (= 4.2.0)
activesupport (= 4.2.0)
arel (~> 6.0)
activesupport (4.2.0)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
arel (5.0.1.20140414130214)
autoprefixer-rails (4.0.2.1)
arel (6.0.0)
autoprefixer-rails (4.0.2.2)
execjs
bh (1.2.0)
actionpack
activesupport
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bootstrap-sass (3.3.1.0)
sass (~> 3.2)
builder (3.2.2)
coffee-rails (4.0.1)
coffee-rails (4.1.0)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.3.0)
coffee-script-source
execjs
coffee-script-source (1.8.0)
coveralls (0.7.1)
coveralls (0.7.2)
multi_json (~> 1.3)
rest-client
rest-client (= 1.6.7)
simplecov (>= 0.7)
term-ansicolor
thor
term-ansicolor (= 1.2.2)
thor (= 0.18.1)
debug_inspector (0.0.2)
docile (1.1.5)
erubis (2.7.0)
execjs (2.2.2)
ffi (1.9.6)
globalid (0.3.0)
activesupport (>= 4.1.0)
hike (1.2.3)
i18n (0.6.11)
jbuilder (2.2.5)
i18n (0.7.0)
jbuilder (2.2.6)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
jquery-rails (3.1.2)
railties (>= 3.0, < 5.0)
jquery-rails (4.0.3)
rails-dom-testing (~> 1.0)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.1)
loofah (2.0.1)
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mathjax-rails (2.3.0)
railties (>= 3.0)
mime-types (2.4.3)
minitest (5.4.3)
mini_portile (0.6.2)
minitest (5.5.0)
multi_json (1.10.1)
netrc (0.10.2)
rack (1.5.2)
nokogiri (1.6.5)
mini_portile (~> 0.6.0)
rack (1.6.0)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.1.7)
actionmailer (= 4.1.7)
actionpack (= 4.1.7)
actionview (= 4.1.7)
activemodel (= 4.1.7)
activerecord (= 4.1.7)
activesupport (= 4.1.7)
rails (4.2.0)
actionmailer (= 4.2.0)
actionpack (= 4.2.0)
actionview (= 4.2.0)
activejob (= 4.2.0)
activemodel (= 4.2.0)
activerecord (= 4.2.0)
activesupport (= 4.2.0)
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.7)
sprockets-rails (~> 2.0)
railties (4.1.7)
actionpack (= 4.1.7)
activesupport (= 4.1.7)
railties (= 4.2.0)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.5)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.1)
loofah (~> 2.0)
railties (4.2.0)
actionpack (= 4.2.0)
activesupport (= 4.2.0)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.4.0)
rdoc (4.1.2)
rake (10.4.2)
rdoc (4.2.0)
json (~> 1.4)
rest-client (1.7.2)
ffi (~> 1.9)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
sass (3.2.19)
sass-rails (4.0.5)
rest-client (1.6.7)
mime-types (>= 1.16)
sass (3.4.9)
sass-rails (5.0.1)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2.2)
sprockets (~> 2.8, < 3.0)
sprockets-rails (~> 2.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (~> 1.1)
sdoc (0.4.1)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
@ -119,21 +145,26 @@ GEM
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
sqlite3 (1.3.10)
term-ansicolor (1.3.0)
tins (~> 1.0)
thor (0.19.1)
term-ansicolor (1.2.2)
tins (~> 0.8)
thor (0.18.1)
thread_safe (0.3.4)
tilt (1.4.1)
tins (1.3.3)
turbolinks (2.5.2)
tins (0.13.2)
turbolinks (2.5.3)
coffee-rails
tzinfo (1.2.2)
thread_safe (~> 0.1)
tzinfo-data (1.2014.10)
tzinfo (>= 1.0.0)
uglifier (2.5.3)
uglifier (2.6.1)
execjs (>= 0.3.0)
json (>= 1.8.0)
web-console (2.0.0)
activemodel (~> 4.0)
binding_of_caller (>= 0.7.2)
railties (~> 4.0)
sprockets-rails (>= 2.0, < 4.0)
will_paginate (3.0.7)
will_paginate-bootstrap (1.0.1)
will_paginate (>= 3.0.3)
@ -145,17 +176,18 @@ DEPENDENCIES
autoprefixer-rails
bh (~> 1.2)
bootstrap-sass (~> 3.3.1)
coffee-rails (~> 4.0.0)
coveralls
coffee-rails (~> 4.1.0)
coveralls (~> 0.7.2)
jbuilder (~> 2.0)
jquery-rails
mathjax-rails
rails (= 4.1.7)
sass-rails (~> 4.0.3)
rails (= 4.2.0)
sass-rails (~> 5.0.1)
sdoc (~> 0.4.0)
sqlite3
turbolinks
tzinfo-data
uglifier (>= 1.3.0)
web-console (~> 2.0)
will_paginate (~> 3.0.6)
will_paginate-bootstrap

29
bin/setup Normal file
View File

@ -0,0 +1,29 @@
#!/usr/bin/env ruby.exe
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

View File

@ -20,5 +20,8 @@ module Projekteuler
config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}').to_s]
config.i18n.available_locales = :de
config.i18n.default_locale = :de
# Do not swallow errors in after_commit/after_rollback callbacks.
config.active_record.raise_in_transactional_callbacks = true
end
end

View File

@ -1,4 +1,3 @@
# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
require 'bundler/setup' # Set up gems listed in the Gemfile.

View File

@ -27,6 +27,10 @@ Rails.application.configure do
# number of complex assets.
config.assets.debug = true
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
# yet still be able to expire them through the digest params.
config.assets.digest = true
# Adds additional error checking when serving assets at runtime.
# Checks for improperly declared sprockets dependencies.
# Raises helpful error messages.

View File

@ -16,11 +16,13 @@ Rails.application.configure do
# Enable Rack::Cache to put a simple HTTP cache in front of your application
# Add `rack-cache` to your Gemfile before enabling this.
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
# For large-scale production use, consider using a caching reverse proxy like
# NGINX, varnish or squid.
# config.action_dispatch.rack_cache = true
# Disable Rails's static asset server (Apache or nginx will already do this).
config.serve_static_assets = false
# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
@ -29,20 +31,22 @@ Rails.application.configure do
# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false
# Generate digests for assets URLs.
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
# yet still be able to expire them through the digest params.
config.assets.digest = true
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true
# Set to :debug to see everything in the log.
config.log_level = :info
# Use the lowest log level to ensure availability of diagnostic information
# when problems arise.
config.log_level = :debug
# Prepend all log lines with the following tags.
# config.log_tags = [ :subdomain, :uuid ]
@ -54,7 +58,7 @@ Rails.application.configure do
# config.cache_store = :mem_cache_store
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = "http://assets.example.com"
# config.action_controller.asset_host = 'http://assets.example.com'
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
@ -67,9 +71,6 @@ Rails.application.configure do
# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify
# Disable automatic flushing of the log to improve performance.
# config.autoflush_log = false
# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new

View File

@ -12,8 +12,8 @@ Rails.application.configure do
# preloads Rails for running tests, you may have to set it to true.
config.eager_load = false
# Configure static asset server for tests with Cache-Control for performance.
config.serve_static_assets = true
# Configure static file server for tests with Cache-Control for performance.
config.serve_static_files = true
config.static_cache_control = 'public, max-age=3600'
# Show full error reports and disable caching.
@ -31,6 +31,9 @@ Rails.application.configure do
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
# Randomize the order test cases are executed.
config.active_support.test_order = :random
# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr

View File

@ -3,6 +3,9 @@
# Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = '1.0'
# Add additional assets to the asset load path
# Rails.application.config.assets.paths << Emoji.images_path
# Precompile additional assets.
# application.js, application.css.scss, and all non-JS/CSS in app/assets folder are already added.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
# Rails.application.config.assets.precompile += %w( search.js )

View File

@ -11,10 +11,10 @@
# if you're sharing your code publicly.
development:
secret_key_base: a606d611cb230fcdc6ac0303f10c554435bc887b57795abbad145aadfa445b3389aab91de996998246d9e1f7959211df3805a58c27a047a0a80fcfc761593520
secret_key_base: 6c2640a4cd5352d96caea5bfb073ec7b827ad609f5a5a99680dbd56f2506dc0aecfe568404a0a63fc19529f7c7a38ac403635f83497580b3dec2afc16b7972b4
test:
secret_key_base: 2cd2c891cb21f0f3c32ae91f2bb6108760491b68fa7f07e89772daf5835f1c19e0aed4eaf48d16c9befc0f86fb9cb14e0adc68ac665926ad4ff6f1fcdd94281d
secret_key_base: 1b2d1b8c35dc3bcc8327819d95a1e635c64ae5038d25c4630463514a945c710da4923f2b8489f81021511fb59ee258e19735e50fb0df3c7efc3f06dc294c748f
# Do not keep production secrets in the repository,
# instead read values from the environment.

View File

@ -4,7 +4,7 @@ class CreateProblems < ActiveRecord::Migration
t.string :title
t.text :content
t.timestamps
t.timestamps null: true
end
end
end

View File

@ -1,7 +1,7 @@
class CreateProblemsAgain < ActiveRecord::Migration
def change
create_table :problems do |t|
t.timestamps
t.timestamps null: true
end
end
end