jpmobile 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +10 -8
- data/README.rdoc +1 -1
- data/Rakefile +13 -5
- data/VERSION.yml +1 -1
- data/lib/jpmobile/helpers.rb +1 -1
- data/lib/jpmobile/rack/filter.rb +2 -7
- data/lib/tasks/jpmobile_tasks.rake +1 -1
- data/spec/rack/jpmobile/emoticon_spec.rb +17 -9
- data/spec/rack/jpmobile/filter_spec.rb +92 -18
- data/spec/rack_helper.rb +2 -0
- data/spec/spec_helper.rb +0 -26
- data/test/rails/overrides/spec/helpers/helpers_spec.rb +1 -1
- data/test/rails/rails_root/app/controllers/application_controller.rb +5 -0
- data/test/rails/rails_root/app/controllers/docomo_guid_always_controller.rb +3 -0
- data/test/rails/rails_root/app/controllers/docomo_guid_base_controller.rb +5 -0
- data/test/rails/rails_root/app/controllers/docomo_guid_docomo_controller.rb +3 -0
- data/test/rails/rails_root/app/controllers/filter_controller.rb +3 -0
- data/test/rails/rails_root/app/controllers/filter_controller_base.rb +25 -0
- data/test/rails/rails_root/app/controllers/hankaku_filter_controller.rb +3 -0
- data/test/rails/rails_root/app/controllers/hankaku_input_filter_controller.rb +7 -0
- data/test/rails/rails_root/app/controllers/links_controller.rb +28 -0
- data/test/rails/rails_root/app/controllers/mobile_spec_controller.rb +5 -0
- data/test/rails/rails_root/app/controllers/template_path_controller.rb +9 -0
- data/test/rails/rails_root/app/controllers/trans_sid_always_and_session_off_controller.rb +4 -0
- data/test/rails/rails_root/app/controllers/trans_sid_always_controller.rb +3 -0
- data/test/rails/rails_root/app/controllers/trans_sid_base_controller.rb +40 -0
- data/test/rails/rails_root/app/controllers/trans_sid_metal_controller.rb +15 -0
- data/test/rails/rails_root/app/controllers/trans_sid_mobile_controller.rb +3 -0
- data/test/rails/rails_root/app/controllers/trans_sid_none_controller.rb +3 -0
- data/test/rails/rails_root/app/helpers/application_helper.rb +2 -0
- data/test/rails/rails_root/app/models/user.rb +2 -0
- data/test/rails/rails_root/autotest/discover.rb +2 -0
- data/test/rails/rails_root/config/application.rb +42 -0
- data/test/rails/rails_root/config/boot.rb +13 -0
- data/test/rails/rails_root/config/environment.rb +5 -0
- data/test/rails/rails_root/config/environments/development.rb +26 -0
- data/test/rails/rails_root/config/environments/production.rb +49 -0
- data/test/rails/rails_root/config/environments/test.rb +35 -0
- data/test/rails/rails_root/config/initializers/backtrace_silencers.rb +7 -0
- data/test/rails/rails_root/config/initializers/inflections.rb +10 -0
- data/test/rails/rails_root/config/initializers/jpmobile_generator.rb +2 -0
- data/test/rails/rails_root/config/initializers/mime_types.rb +5 -0
- data/test/rails/rails_root/config/initializers/secret_token.rb +7 -0
- data/test/rails/rails_root/config/initializers/session_store.rb +2 -0
- data/test/rails/rails_root/config/routes.rb +7 -0
- data/test/rails/rails_root/db/migrate/001_add_sessions_table.rb +16 -0
- data/test/rails/rails_root/db/migrate/20100824062306_create_users.rb +13 -0
- data/test/rails/rails_root/db/schema.rb +31 -0
- data/test/rails/rails_root/db/seeds.rb +7 -0
- data/test/rails/rails_root/spec/helpers/helpers_spec.rb +15 -0
- data/test/rails/rails_root/spec/requests/docomo_guid_spec.rb +102 -0
- data/test/rails/rails_root/spec/requests/docomo_spec.rb +33 -0
- data/test/rails/rails_root/spec/requests/emobile_spec.rb +53 -0
- data/test/rails/rails_root/spec/requests/filter_spec.rb +221 -0
- data/test/rails/rails_root/spec/requests/helpers_spec.rb +187 -0
- data/test/rails/rails_root/spec/requests/pc_spec.rb +22 -0
- data/test/rails/rails_root/spec/requests/softbank_emulator_spec.rb +21 -0
- data/test/rails/rails_root/spec/requests/template_path_spec.rb +234 -0
- data/test/rails/rails_root/spec/requests/trans_sid_spec.rb +207 -0
- data/test/rails/rails_root/spec/spec_helper.rb +32 -0
- data/test/rails/rails_root/test/performance/browsing_test.rb +9 -0
- data/test/rails/rails_root/test/test_helper.rb +13 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile-ipaddresses/lib/jpmobile-ipaddresses.rb +18 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/abstract_ip_addresses.rb +23 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/au.rb +40 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/docomo.rb +22 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/emobile.rb +15 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/softbank.rb +20 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/willcom.rb +158 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile-terminfo/lib/jpmobile-terminfo.rb +9 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile-terminfo/lib/jpmobile/mobile/terminfo.rb +62 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile-terminfo/lib/jpmobile/mobile/terminfo/docomo.rb +739 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile-terminfo/spec/spec_helper.rb +2 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile-terminfo/spec/terminfo_spec.rb +54 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/init.rb +3 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/install.rb +1 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile.rb +56 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/datum_conv.rb +72 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/docomo_guid.rb +43 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/email.rb +18 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/emoticon.rb +141 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/emoticon/au.rb +1287 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/emoticon/conversion_table.rb +3909 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/emoticon/docomo.rb +255 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/emoticon/softbank.rb +477 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/emoticon/z_combine.rb +33 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/encoding.rb +29 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/filter.rb +113 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/helpers.rb +174 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/hook_action_controller.rb +31 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/hook_action_view.rb +87 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/abstract_mobile.rb +99 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/android.rb +10 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/au.rb +108 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/ddipocket.rb +12 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/docomo.rb +128 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/emobile.rb +16 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/iphone.rb +26 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/smart_phone.rb +21 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/softbank.rb +62 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/vodafone.rb +17 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/willcom.rb +28 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/windows_phone.rb +10 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/position.rb +68 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/rack.rb +49 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/rack/filter.rb +50 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/rack/mobile_carrier.rb +33 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/rack/params_filter.rb +47 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/rails.rb +23 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/request_with_mobile.rb +45 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/trans_sid.rb +133 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/util.rb +97 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/tmp/conversion-table.rb +2588 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/tmp/utf8_to_image.rb +1407 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/tools/emoji/genregexp.rb +47 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/tools/generate_au_emoticon_table.rb +34 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/tools/generate_docomo_emoticon_table.rb +33 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/tools/generate_emoticon_conversion_table.rb +107 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/tools/generate_softbank_emoticon_table.rb +31 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/tools/list_gps_unsupported_au.rb +23 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/vendor/jpmobile-ipaddresses/lib/jpmobile-ipaddresses.rb +18 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/vendor/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/abstract_ip_addresses.rb +23 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/vendor/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/au.rb +40 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/vendor/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/docomo.rb +22 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/vendor/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/emobile.rb +15 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/vendor/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/softbank.rb +20 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/vendor/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/willcom.rb +158 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/vendor/jpmobile-terminfo/lib/jpmobile-terminfo.rb +9 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/vendor/jpmobile-terminfo/lib/jpmobile/mobile/terminfo.rb +62 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/vendor/jpmobile-terminfo/lib/jpmobile/mobile/terminfo/docomo.rb +739 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/vendor/jpmobile-terminfo/spec/spec_helper.rb +2 -0
- data/test/rails/rails_root/vendor/plugins/jpmobile/vendor/jpmobile-terminfo/spec/terminfo_spec.rb +54 -0
- metadata +368 -75
- data/.rspec +0 -5
- data/jpmobile.gemspec +0 -237
- data/test/rails/.gitignore +0 -1
- data/test/rails/overrides/.rspec +0 -5
- data/test/rails/overrides/Gemfile +0 -33
- data/test/rails/overrides/app/views/filter/index.html.erb +0 -0
- data/test/rails/overrides/app/views/hankaku_filter/index.html.erb +0 -0
- data/test/rails/overrides/app/views/hankaku_input_filter/index.html.erb +0 -0
- data/test/rails/overrides/app/views/hankaku_input_filter/index_xhtml.html.erb +0 -1
- data/test/rails/overrides/app/views/layouts/xhtml.html.erb +0 -12
- data/test/rails/overrides/app/views/links/au_gps.html.erb +0 -1
- data/test/rails/overrides/app/views/links/au_location.html.erb +0 -1
- data/test/rails/overrides/app/views/links/docomo_foma_gps.html.erb +0 -1
- data/test/rails/overrides/app/views/links/docomo_openiarea.html.erb +0 -1
- data/test/rails/overrides/app/views/links/docomo_utn.html.erb +0 -1
- data/test/rails/overrides/app/views/links/link.html.erb +0 -1
- data/test/rails/overrides/app/views/links/show_all.html.erb +0 -1
- data/test/rails/overrides/app/views/links/softbank_location.html.erb +0 -1
- data/test/rails/overrides/app/views/links/willcom_location.html.erb +0 -1
- data/test/rails/overrides/app/views/template_path/_partial.html.erb +0 -1
- data/test/rails/overrides/app/views/template_path/_partial_mobile.html.erb +0 -1
- data/test/rails/overrides/app/views/template_path/_partial_mobile_docomo.html.erb +0 -1
- data/test/rails/overrides/app/views/template_path/_partial_smart_phone.html.erb +0 -1
- data/test/rails/overrides/app/views/template_path/_partial_smart_phone_iphone.html.erb +0 -1
- data/test/rails/overrides/app/views/template_path/index.html.erb +0 -1
- data/test/rails/overrides/app/views/template_path/index_mobile.html.erb +0 -1
- data/test/rails/overrides/app/views/template_path/index_mobile_docomo.html.erb +0 -1
- data/test/rails/overrides/app/views/template_path/index_smart_phone.html.erb +0 -1
- data/test/rails/overrides/app/views/template_path/index_smart_phone_iphone.html.erb +0 -1
- data/test/rails/overrides/app/views/template_path/partial.html.erb +0 -2
- data/test/rails/overrides/app/views/template_path/show_mobile.html.erb +0 -1
- data/test/rails/overrides/app/views/template_path/show_mobile_docomo.html.erb +0 -1
- data/test/rails/overrides/spec/rcov.opts +0 -2
@@ -10,6 +10,6 @@ describe Jpmobile::Helpers do
|
|
10
10
|
|
11
11
|
it "softbank_location_link_to がリンク先にパラメータを含んでいても正常に動作すること" do
|
12
12
|
# http://d.hatena.ne.jp/mizincogrammer/20090123/1232702067
|
13
|
-
softbank_location_link_to("STRING", :controller => "filter", :action => "rawdata", :p => "param").should == %{<a href="location:auto?url=http://test.host/filter/rawdata&p=param">STRING</a>}
|
13
|
+
softbank_location_link_to("STRING", :controller => "filter", :action => "rawdata", :p => "param").should == %{<a href="location:auto?url=http://test.host/filter/rawdata&p=param">STRING</a>}
|
14
14
|
end
|
15
15
|
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
class FilterControllerBase < ApplicationController
|
3
|
+
def abracadabra_utf8
|
4
|
+
render :text => "アブラカダブラ"
|
5
|
+
end
|
6
|
+
def abracadabra_xhtml_utf8
|
7
|
+
response.content_type = "application/xhtml+xml"
|
8
|
+
render :text => "アブラカダブラ"
|
9
|
+
end
|
10
|
+
def index
|
11
|
+
@q = params[:q]
|
12
|
+
end
|
13
|
+
def empty
|
14
|
+
render :text => ""
|
15
|
+
end
|
16
|
+
def rawdata
|
17
|
+
send_data "アブラカダブラ", :type => 'application/octet-stream'
|
18
|
+
end
|
19
|
+
def textarea
|
20
|
+
render :text => '<textarea hoge="fuu">アブラカダブラ</textarea>'
|
21
|
+
end
|
22
|
+
def input_tag
|
23
|
+
render :text => '<input hoge="fuu" value="アブラカダブラ" />'
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
class LinksController < ApplicationController
|
2
|
+
def show_all
|
3
|
+
end
|
4
|
+
|
5
|
+
def link
|
6
|
+
end
|
7
|
+
|
8
|
+
def docomo_utn
|
9
|
+
end
|
10
|
+
|
11
|
+
def docomo_openiarea
|
12
|
+
end
|
13
|
+
|
14
|
+
def docomo_foma_gps
|
15
|
+
end
|
16
|
+
|
17
|
+
def au_location
|
18
|
+
end
|
19
|
+
|
20
|
+
def au_gps
|
21
|
+
end
|
22
|
+
|
23
|
+
def softbank_location
|
24
|
+
end
|
25
|
+
|
26
|
+
def willcom_location
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
class TransSidBaseController < ApplicationController
|
3
|
+
# 事前にセッションを作成しないと trans_sid が有効にならない
|
4
|
+
before_filter :session_init
|
5
|
+
|
6
|
+
def form
|
7
|
+
render :inline=>%{<%= form_tag do %>Hello<% end %>}
|
8
|
+
end
|
9
|
+
def link
|
10
|
+
render :inline=>%{<%= link_to "linkto" %>}
|
11
|
+
end
|
12
|
+
def redirect
|
13
|
+
redirect_to('/')
|
14
|
+
end
|
15
|
+
def session_init
|
16
|
+
session[:jpmobile] = "everyleaf"
|
17
|
+
@user = User.find(1) rescue User.create(:id => 1, :name => "everyleaf")
|
18
|
+
end
|
19
|
+
|
20
|
+
def form_path
|
21
|
+
render :inline=>%{<%= form_for @user do %>Hello<% end %>}
|
22
|
+
end
|
23
|
+
def form_path_admin
|
24
|
+
render :inline=>%{<%= form_for [:admin, @user] do %>Hello<% end %>}
|
25
|
+
end
|
26
|
+
|
27
|
+
def link_path
|
28
|
+
render :inline => %{<%= link_to "linkto", @user -%>}
|
29
|
+
end
|
30
|
+
def link_path_admin
|
31
|
+
render :inline => %{<%= link_to "linkto", [:admin, @user] -%>}
|
32
|
+
end
|
33
|
+
|
34
|
+
def redirect_path
|
35
|
+
redirect_to @user
|
36
|
+
end
|
37
|
+
def redirect_path_admin
|
38
|
+
redirect_to [:admin, @user]
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
class TransSidMetalController < ActionController::Metal
|
3
|
+
include ActionController::RackDelegation
|
4
|
+
include ActionController::UrlFor
|
5
|
+
include ActionController::Redirecting
|
6
|
+
include Rails.application.routes.url_helpers
|
7
|
+
|
8
|
+
# 事前にセッションを作成しないと trans_sid が有効にならない
|
9
|
+
# before_filter :session_init
|
10
|
+
# trans_sid :always
|
11
|
+
|
12
|
+
def redirect
|
13
|
+
redirect_to('/')
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
# If you have a Gemfile, require the gems listed there, including any gems
|
6
|
+
# you've limited to :test, :development, or :production.
|
7
|
+
Bundler.require(:default, Rails.env) if defined?(Bundler)
|
8
|
+
|
9
|
+
module RailsRoot
|
10
|
+
class Application < Rails::Application
|
11
|
+
# Settings in config/environments/* take precedence over those specified here.
|
12
|
+
# Application configuration should go into files in config/initializers
|
13
|
+
# -- all .rb files in that directory are automatically loaded.
|
14
|
+
|
15
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
16
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
17
|
+
|
18
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
19
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
20
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
21
|
+
|
22
|
+
# Activate observers that should always be running.
|
23
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
24
|
+
|
25
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
26
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
27
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
28
|
+
|
29
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
30
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
31
|
+
# config.i18n.default_locale = :de
|
32
|
+
|
33
|
+
# JavaScript files you want as :defaults (application.js is always included).
|
34
|
+
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
|
35
|
+
|
36
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
37
|
+
config.encoding = "utf-8"
|
38
|
+
|
39
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
40
|
+
config.filter_parameters += [:password]
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
# Set up gems listed in the Gemfile.
|
4
|
+
gemfile = File.expand_path('../../Gemfile', __FILE__)
|
5
|
+
begin
|
6
|
+
ENV['BUNDLE_GEMFILE'] = gemfile
|
7
|
+
require 'bundler'
|
8
|
+
Bundler.setup
|
9
|
+
rescue Bundler::GemNotFound => e
|
10
|
+
STDERR.puts e.message
|
11
|
+
STDERR.puts "Try running `bundle install`."
|
12
|
+
exit!
|
13
|
+
end if File.exist?(gemfile)
|
@@ -0,0 +1,26 @@
|
|
1
|
+
RailsRoot::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the webserver when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
11
|
+
|
12
|
+
# Show full error reports and disable caching
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_view.debug_rjs = true
|
15
|
+
config.action_controller.perform_caching = false
|
16
|
+
|
17
|
+
# Don't care if the mailer can't send
|
18
|
+
config.action_mailer.raise_delivery_errors = false
|
19
|
+
|
20
|
+
# Print deprecation notices to the Rails logger
|
21
|
+
config.active_support.deprecation = :log
|
22
|
+
|
23
|
+
# Only use best-standards-support built into browsers
|
24
|
+
config.action_dispatch.best_standards_support = :builtin
|
25
|
+
end
|
26
|
+
|
@@ -0,0 +1,49 @@
|
|
1
|
+
RailsRoot::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# The production environment is meant for finished, "live" apps.
|
5
|
+
# Code is not reloaded between requests
|
6
|
+
config.cache_classes = true
|
7
|
+
|
8
|
+
# Full error reports are disabled and caching is turned on
|
9
|
+
config.consider_all_requests_local = false
|
10
|
+
config.action_controller.perform_caching = true
|
11
|
+
|
12
|
+
# Specifies the header that your server uses for sending files
|
13
|
+
config.action_dispatch.x_sendfile_header = "X-Sendfile"
|
14
|
+
|
15
|
+
# For nginx:
|
16
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
|
17
|
+
|
18
|
+
# If you have no front-end server that supports something like X-Sendfile,
|
19
|
+
# just comment this out and Rails will serve the files
|
20
|
+
|
21
|
+
# See everything in the log (default is :info)
|
22
|
+
# config.log_level = :debug
|
23
|
+
|
24
|
+
# Use a different logger for distributed setups
|
25
|
+
# config.logger = SyslogLogger.new
|
26
|
+
|
27
|
+
# Use a different cache store in production
|
28
|
+
# config.cache_store = :mem_cache_store
|
29
|
+
|
30
|
+
# Disable Rails's static asset server
|
31
|
+
# In production, Apache or nginx will already do this
|
32
|
+
config.serve_static_assets = false
|
33
|
+
|
34
|
+
# Enable serving of images, stylesheets, and javascripts from an asset server
|
35
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
36
|
+
|
37
|
+
# Disable delivery errors, bad email addresses will be ignored
|
38
|
+
# config.action_mailer.raise_delivery_errors = false
|
39
|
+
|
40
|
+
# Enable threaded mode
|
41
|
+
# config.threadsafe!
|
42
|
+
|
43
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
44
|
+
# the I18n.default_locale when a translation can not be found)
|
45
|
+
config.i18n.fallbacks = true
|
46
|
+
|
47
|
+
# Send deprecation notices to registered listeners
|
48
|
+
config.active_support.deprecation = :notify
|
49
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
RailsRoot::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Log error messages when you accidentally call methods on nil.
|
11
|
+
config.whiny_nils = true
|
12
|
+
|
13
|
+
# Show full error reports and disable caching
|
14
|
+
config.consider_all_requests_local = true
|
15
|
+
config.action_controller.perform_caching = false
|
16
|
+
|
17
|
+
# Raise exceptions instead of rendering exception templates
|
18
|
+
config.action_dispatch.show_exceptions = false
|
19
|
+
|
20
|
+
# Disable request forgery protection in test environment
|
21
|
+
config.action_controller.allow_forgery_protection = false
|
22
|
+
|
23
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
24
|
+
# The :test delivery method accumulates sent emails in the
|
25
|
+
# ActionMailer::Base.deliveries array.
|
26
|
+
config.action_mailer.delivery_method = :test
|
27
|
+
|
28
|
+
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
29
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
30
|
+
# like if you have constraints or database-specific column types
|
31
|
+
# config.active_record.schema_format = :sql
|
32
|
+
|
33
|
+
# Print deprecation notices to the stderr
|
34
|
+
config.active_support.deprecation = :stderr
|
35
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
RailsRoot::Application.config.secret_token = 'ddd89a5d8777a00430608bc36c9108b2b8c2bc7fa2c15270971d1535d01ac7f267227f4003bd3d2e251bec7f1c32b2bec39d7919e25fb7225962e499b9c38793'
|