aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrhenium <rhenium@rhe.jp>2014-09-15 08:20:50 +0900
committerrhenium <rhenium@rhe.jp>2014-09-15 08:20:50 +0900
commite34c7758ef1d98b7747fc2b0c543b65201c3cdd1 (patch)
tree67ae6c8bfd0ee335513277302876fc0a1a2b63dc
parentf6eb29604f6d3728834fe427e14c37c9c4526004 (diff)
downloadaclog-e34c7758ef1d98b7747fc2b0c543b65201c3cdd1.tar.gz
Ruby on Rails 4.2.0.beta1
-rw-r--r--Gemfile14
-rw-r--r--Gemfile.lock184
-rw-r--r--app/assets/javascripts/application.js.erb2
-rw-r--r--app/assets/stylesheets/application.css.scss7
-rw-r--r--app/controllers/apidocs_controller.rb2
-rw-r--r--app/views/apidocs/endpoint.html.haml2
-rw-r--r--config/application.rb9
-rw-r--r--config/boot.rb3
-rw-r--r--config/environments/development.rb4
-rw-r--r--config/environments/production.rb6
-rw-r--r--config/initializers/assets.rb12
-rw-r--r--config/initializers/haml.rb2
12 files changed, 147 insertions, 100 deletions
diff --git a/Gemfile b/Gemfile
index 58bc6f8..c042e46 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,6 +1,6 @@
source "https://rubygems.org"
-gem "rails", "~> 4.1.5"
+gem "rails", "~> 4.2.0.beta1"
gem "activerecord-import"
gem "tzinfo-data"
gem "mysql2"
@@ -9,7 +9,7 @@ gem "yajl-ruby", require: "yajl"
gem "grape"
gem "grape-rabl"
gem "haml-rails"
-gem "sass-rails", "~> 4.0.3"
+gem "sass-rails", "~> 5.0.0.beta1"
gem "uglifier"
gem "jquery-rails"
gem "bootstrap-sass"
@@ -28,16 +28,18 @@ gem "em-work_queue"
gem "pry-rails"
group :development, :test do
- gem "quiet_assets"
+ gem "byebug"
+ gem "web-console", "~> 2.0.0.beta2"
gem "spring"
+ gem "quiet_assets"
end
group :test do
gem "webmock"
- gem "rspec", "~> 3.0.0"
- gem "rspec-rails", "~> 3.0.0"
+ gem "rspec"
+ gem "rspec-rails"
gem "spring-commands-rspec"
- gem "guard-rspec", "~> 4.2.9"
+ gem "guard-rspec"
gem "factory_girl_rails"
gem "coveralls", require: false
gem "simplecov", require: false
diff --git a/Gemfile.lock b/Gemfile.lock
index fdd11cf..c91e419 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,46 +1,59 @@
GEM
remote: https://rubygems.org/
specs:
- actionmailer (4.1.5)
- actionpack (= 4.1.5)
- actionview (= 4.1.5)
- mail (~> 2.5.4)
- actionpack (4.1.5)
- actionview (= 4.1.5)
- activesupport (= 4.1.5)
- rack (~> 1.5.2)
+ actionmailer (4.2.0.beta1)
+ actionpack (= 4.2.0.beta1)
+ actionview (= 4.2.0.beta1)
+ mail (~> 2.5, >= 2.5.4)
+ rails-dom-testing (~> 1.0, >= 1.0.2)
+ actionpack (4.2.0.beta1)
+ actionview (= 4.2.0.beta1)
+ activesupport (= 4.2.0.beta1)
+ rack (~> 1.6.0.beta)
rack-test (~> 0.6.2)
- actionview (4.1.5)
- activesupport (= 4.1.5)
+ rails-deprecated_sanitizer (~> 1.0, >= 1.0.2)
+ rails-dom-testing (~> 1.0, >= 1.0.2)
+ actionview (4.2.0.beta1)
+ activesupport (= 4.2.0.beta1)
builder (~> 3.1)
erubis (~> 2.7.0)
- activemodel (4.1.5)
- activesupport (= 4.1.5)
+ rails-deprecated_sanitizer (~> 1.0, >= 1.0.2)
+ rails-dom-testing (~> 1.0, >= 1.0.2)
+ activejob (4.2.0.beta1)
+ globalid (>= 0.2.3)
+ activemodel (4.2.0.beta1)
+ activesupport (= 4.2.0.beta1)
builder (~> 3.1)
- activerecord (4.1.5)
- activemodel (= 4.1.5)
- activesupport (= 4.1.5)
- arel (~> 5.0.0)
+ activerecord (4.2.0.beta1)
+ activemodel (= 4.2.0.beta1)
+ activesupport (= 4.2.0.beta1)
+ arel (>= 6.0.0.beta1, < 6.1)
activerecord-import (0.5.0)
activerecord (>= 3.0)
- activesupport (4.1.5)
- i18n (~> 0.6, >= 0.6.9)
+ activesupport (4.2.0.beta1)
+ i18n (>= 0.7.0.beta1, < 0.8)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
addressable (2.3.6)
- arel (5.0.1.20140414130214)
+ arel (6.0.0.beta1)
axiom-types (0.1.1)
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
- bootstrap-sass (3.2.0.1)
+ binding_of_caller (0.7.3.pre1)
+ debug_inspector (>= 0.0.1)
+ bootstrap-sass (3.2.0.2)
sass (~> 3.2)
buftok (0.2.0)
builder (3.2.2)
- celluloid (0.15.2)
- timers (~> 1.1.0)
+ byebug (3.4.0)
+ columnize (~> 0.8)
+ debugger-linecache (~> 1.2)
+ slop (~> 3.6)
+ celluloid (0.16.0)
+ timers (~> 4.0.0)
coderay (1.1.0)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
@@ -51,6 +64,7 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.8.0)
+ columnize (0.8.9)
cool.io (1.1.1)
iobuffer (>= 1.0.0)
coveralls (0.7.1)
@@ -62,6 +76,8 @@ GEM
crack (0.4.2)
safe_yaml (~> 1.0.0)
dalli (2.7.2)
+ debug_inspector (0.0.2)
+ debugger-linecache (1.2.0)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
diff-lcs (1.2.5)
@@ -81,6 +97,8 @@ GEM
multipart-post (>= 1.2, < 3)
ffi (1.9.3)
formatador (0.2.5)
+ globalid (0.3.0)
+ activesupport (>= 4.1.0)
grape (0.9.0)
activesupport
builder
@@ -102,7 +120,7 @@ GEM
lumberjack (~> 1.0)
pry (>= 0.9.12)
thor (>= 0.18.1)
- guard-rspec (4.2.10)
+ guard-rspec (4.3.1)
guard (~> 2.1)
rspec (>= 2.14, < 4.0)
haml (4.0.5)
@@ -114,10 +132,11 @@ GEM
railties (>= 4.0.1)
hashie (3.3.1)
hike (1.2.3)
+ hitimes (1.2.2)
http (0.6.2)
http_parser.rb (~> 0.6.0)
http_parser.rb (0.6.0)
- i18n (0.6.11)
+ i18n (0.7.0.beta1)
ice_nine (0.11.0)
iobuffer (1.1.2)
jquery-rails (3.1.2)
@@ -130,13 +149,13 @@ GEM
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
lumberjack (1.0.9)
- mail (2.5.4)
- mime-types (~> 1.16)
- treetop (~> 1.4.8)
+ mail (2.6.1)
+ mime-types (>= 1.16, < 3)
memoizable (0.4.2)
thread_safe (~> 0.3, >= 0.3.1)
method_source (0.8.2)
- mime-types (1.25.1)
+ mime-types (2.3)
+ mini_portile (0.6.0)
minitest (5.4.1)
msgpack (0.5.8)
msgpack-rpc (0.5.2)
@@ -148,6 +167,8 @@ GEM
mysql2 (0.3.16)
naught (1.0.0)
netrc (0.7.7)
+ nokogiri (1.6.3.1)
+ mini_portile (= 0.6.0)
oauth (0.4.7)
omniauth (1.2.2)
hashie (>= 1.2, < 4)
@@ -158,7 +179,6 @@ GEM
omniauth-twitter (1.0.1)
multi_json (~> 1.3)
omniauth-oauth (~> 1.0)
- polyglot (0.3.5)
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
@@ -169,26 +189,33 @@ GEM
railties (>= 3.1, < 5.0)
rabl (0.11.0)
activesupport (>= 2.3.14)
- rack (1.5.2)
+ rack (1.6.0.beta)
rack-accept (0.4.5)
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-test (0.6.2)
rack (>= 1.0)
- rails (4.1.5)
- actionmailer (= 4.1.5)
- actionpack (= 4.1.5)
- actionview (= 4.1.5)
- activemodel (= 4.1.5)
- activerecord (= 4.1.5)
- activesupport (= 4.1.5)
+ rails (4.2.0.beta1)
+ actionmailer (= 4.2.0.beta1)
+ actionpack (= 4.2.0.beta1)
+ actionview (= 4.2.0.beta1)
+ activejob (= 4.2.0.beta1)
+ activemodel (= 4.2.0.beta1)
+ activerecord (= 4.2.0.beta1)
+ activesupport (= 4.2.0.beta1)
bundler (>= 1.3.0, < 2.0)
- railties (= 4.1.5)
- sprockets-rails (~> 2.0)
- railties (4.1.5)
- actionpack (= 4.1.5)
- activesupport (= 4.1.5)
+ railties (= 4.2.0.beta1)
+ sprockets-rails (~> 3.0.0.beta1)
+ rails-deprecated_sanitizer (1.0.2)
+ activesupport (>= 4.2.0.alpha)
+ rails-dom-testing (1.0.2)
+ activesupport
+ nokogiri (~> 1.6.0)
+ rails-deprecated_sanitizer (>= 1.0.1)
+ railties (4.2.0.beta1)
+ actionpack (= 4.2.0.beta1)
+ activesupport (= 4.2.0.beta1)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.13.0)
@@ -199,33 +226,33 @@ GEM
rest-client (1.7.2)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
- rspec (3.0.0)
- rspec-core (~> 3.0.0)
- rspec-expectations (~> 3.0.0)
- rspec-mocks (~> 3.0.0)
- rspec-core (3.0.4)
- rspec-support (~> 3.0.0)
- rspec-expectations (3.0.4)
+ rspec (3.1.0)
+ rspec-core (~> 3.1.0)
+ rspec-expectations (~> 3.1.0)
+ rspec-mocks (~> 3.1.0)
+ rspec-core (3.1.2)
+ rspec-support (~> 3.1.0)
+ rspec-expectations (3.1.0)
diff-lcs (>= 1.2.0, < 2.0)
- rspec-support (~> 3.0.0)
- rspec-mocks (3.0.4)
- rspec-support (~> 3.0.0)
- rspec-rails (3.0.2)
+ rspec-support (~> 3.1.0)
+ rspec-mocks (3.1.0)
+ rspec-support (~> 3.1.0)
+ rspec-rails (3.1.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
- rspec-core (~> 3.0.0)
- rspec-expectations (~> 3.0.0)
- rspec-mocks (~> 3.0.0)
- rspec-support (~> 3.0.0)
- rspec-support (3.0.4)
+ rspec-core (~> 3.1.0)
+ rspec-expectations (~> 3.1.0)
+ rspec-mocks (~> 3.1.0)
+ rspec-support (~> 3.1.0)
+ rspec-support (3.1.0)
safe_yaml (1.0.3)
- sass (3.2.19)
- sass-rails (4.0.3)
+ sass (3.4.4)
+ sass-rails (5.0.0.beta1)
railties (>= 4.0.0, < 5.0)
- sass (~> 3.2.0)
- sprockets (~> 2.8, <= 2.11.0)
- sprockets-rails (~> 2.0)
+ sass (~> 3.2)
+ sprockets (~> 2.12)
+ sprockets-rails (>= 2.0, < 4.0)
settingslogic (2.0.9)
simple_oauth (0.2.0)
simplecov (0.9.0)
@@ -237,25 +264,23 @@ GEM
spring (1.1.3)
spring-commands-rspec (1.0.2)
spring (>= 0.9.1)
- sprockets (2.11.0)
+ sprockets (2.12.2)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- sprockets-rails (2.1.4)
- actionpack (>= 3.0)
- activesupport (>= 3.0)
+ sprockets-rails (3.0.0.beta1)
+ actionpack (>= 4.0)
+ activesupport (>= 4.0)
sprockets (~> 2.8)
term-ansicolor (1.3.0)
tins (~> 1.0)
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
- timers (1.1.0)
+ timers (4.0.1)
+ hitimes
tins (1.3.2)
- treetop (1.4.15)
- polyglot
- polyglot (>= 0.3.1)
turbolinks (2.3.0)
coffee-rails
twitter (5.11.0)
@@ -292,6 +317,11 @@ GEM
coercible (~> 1.0)
descendants_tracker (~> 0.0, >= 0.0.3)
equalizer (~> 0.0, >= 0.0.9)
+ web-console (2.0.0.beta3)
+ activemodel (~> 4.0)
+ binding_of_caller (= 0.7.3.pre1)
+ railties (~> 4.0)
+ sprockets-rails (>= 2.0, < 4.0)
webmock (1.18.0)
addressable (>= 2.3.6)
crack (>= 0.3.2)
@@ -304,13 +334,14 @@ PLATFORMS
DEPENDENCIES
activerecord-import
bootstrap-sass
+ byebug
coveralls
dalli
em-work_queue
factory_girl_rails
grape
grape-rabl
- guard-rspec (~> 4.2.9)
+ guard-rspec
haml-rails
jquery-rails
msgpack
@@ -319,10 +350,10 @@ DEPENDENCIES
omniauth-twitter
pry-rails
quiet_assets
- rails (~> 4.1.5)
- rspec (~> 3.0.0)
- rspec-rails (~> 3.0.0)
- sass-rails (~> 4.0.3)
+ rails (~> 4.2.0.beta1)
+ rspec
+ rspec-rails
+ sass-rails (~> 5.0.0.beta1)
settingslogic
simplecov
spring
@@ -334,6 +365,7 @@ DEPENDENCIES
uglifier
unicorn
unicorn-worker-killer
+ web-console (~> 2.0.0.beta2)
webmock
yajl-ruby
yard
diff --git a/app/assets/javascripts/application.js.erb b/app/assets/javascripts/application.js.erb
index 9481858..cd3b38a 100644
--- a/app/assets/javascripts/application.js.erb
+++ b/app/assets/javascripts/application.js.erb
@@ -1,7 +1,7 @@
//= require jquery
//= require jquery_ujs
//= require turbolinks
-//= require bootstrap
+//= require bootstrap-sprockets
//= require _widgets
//= require _define_application
//= require_tree .
diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss
index 946b576..948f4c7 100644
--- a/app/assets/stylesheets/application.css.scss
+++ b/app/assets/stylesheets/application.css.scss
@@ -1,5 +1,6 @@
-//= require bootstrap
-//= require base
-//= require_tree .
+@import "bootstrap-sprockets";
+@import "bootstrap";
+@import "base";
+@import "*";
@import url(http://fonts.googleapis.com/css?family=Raleway:400,800);
diff --git a/app/controllers/apidocs_controller.rb b/app/controllers/apidocs_controller.rb
index 5c18026..ea07126 100644
--- a/app/controllers/apidocs_controller.rb
+++ b/app/controllers/apidocs_controller.rb
@@ -24,7 +24,7 @@ class ApidocsController < ApplicationController
end
if @endpoint.route_example_params
- @example_request_uri = api_url + @endpoint.route_path.sub(/\(\.:format\)$/, ".json")
+ @example_request_uri = root_url + "api" + @endpoint.route_path.sub(/\(\.:format\)$/, ".json")
@example_request_uri += "?" + @endpoint.route_example_params.to_param
end
end
diff --git a/app/views/apidocs/endpoint.html.haml b/app/views/apidocs/endpoint.html.haml
index 63af8b6..e3f956a 100644
--- a/app/views/apidocs/endpoint.html.haml
+++ b/app/views/apidocs/endpoint.html.haml
@@ -2,7 +2,7 @@
%h1= format_endpoint_name(@endpoint)
%p= @endpoint.route_description
%h2 Resource URL
-%p= api_url + @endpoint.route_path
+%p= root_url + "api" + @endpoint.route_path # TODO
%h2 Parameters
%table.table.api-params
%tbody
diff --git a/config/application.rb b/config/application.rb
index 0139ebe..441de70 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -1,13 +1,13 @@
require File.expand_path('../boot', __FILE__)
# Pick the frameworks you want:
-require "active_model/railtie"
require "active_record/railtie"
require "action_controller/railtie"
-require "action_mailer/railtie"
require "action_view/railtie"
-require "sprockets/railtie"
+require "action_mailer/railtie"
+# require "active_job/railtie"
# require "rails/test_unit/railtie"
+require "sprockets/railtie"
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
@@ -35,9 +35,6 @@ module Aclog
config.i18n.default_locale = :ja
config.i18n.fallbacks = true
- config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif *.eot *.woff *.ttf *.svg)
- config.assets.precompile += [Proc.new { |path, fn| fn =~ /app\/assets/ && %w(.js).include?(File.extname(path)) }]
-
config.generators do |g|
g.test_framework :rspec
g.fixture_replacement :factory_girl
diff --git a/config/boot.rb b/config/boot.rb
index 5e5f0c1..6b750f0 100644
--- a/config/boot.rb
+++ b/config/boot.rb
@@ -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.
diff --git a/config/environments/development.rb b/config/environments/development.rb
index ddf0e90..ddef61b 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -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.
diff --git a/config/environments/production.rb b/config/environments/production.rb
index 6f67762..25afae0 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -29,11 +29,11 @@ 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
- # Version of your assets, change this if you want to expire all your assets.
- config.assets.version = '1.0'
+ # `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
diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb
new file mode 100644
index 0000000..5b9129f
--- /dev/null
+++ b/config/initializers/assets.rb
@@ -0,0 +1,12 @@
+# Be sure to restart your server when you modify this file.
+
+# 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, and all non-JS/CSS in app/assets folder are already added.
+# Rails.application.config.assets.precompile += %w( search.js )
+Rails.application.config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif *.eot *.woff *.ttf *.svg)
diff --git a/config/initializers/haml.rb b/config/initializers/haml.rb
index 7ebe0b8..c247f66 100644
--- a/config/initializers/haml.rb
+++ b/config/initializers/haml.rb
@@ -1,4 +1,4 @@
-Haml::Template.options[:attr_wrapper] = "\""
+Haml::Template.options[:attr_wrapper] = '"'
Haml::Template.options[:format] = :xhtml
Haml::Template.options[:mime_type] = "application/xhtml+xml"
Haml::Template.options[:ugly] = false