galakei 0.15.1 → 0.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile
CHANGED
data/README.rdoc
CHANGED
@@ -6,10 +6,6 @@
|
|
6
6
|
|
7
7
|
galakeiは簡単にガラケー対応Rails Gem。「Doorkeeper」という {イベント運営}[http://www.doorkeeper.jp] サービスがこのgemを使っている。
|
8
8
|
|
9
|
-
== Documentation
|
10
|
-
|
11
|
-
See {the galakei site}[http://galakei.mobalean.com/] for more details.
|
12
|
-
|
13
9
|
== Thanks
|
14
10
|
|
15
11
|
* To {jpmobile}[https://github.com/jpmobile/jpmobile] for offering the most mature Rails plugin for Rails
|
@@ -1,5 +1,6 @@
|
|
1
|
-
|
1
|
+
require 'action_dispatch/routing/url_for'
|
2
2
|
|
3
|
+
ActionDispatch::Routing::UrlFor.class_eval do
|
3
4
|
if Rails::VERSION::MINOR == 0
|
4
5
|
ENV_SESSION_OPTIONS_KEY = ActionDispatch::Session::AbstractStore::ENV_SESSION_OPTIONS_KEY
|
5
6
|
else
|
@@ -7,8 +8,8 @@ module Galakei::SessionIdParameter::InUrl # :nodoc:
|
|
7
8
|
ENV_SESSION_OPTIONS_KEY = Rack::Session::Abstract::ENV_SESSION_OPTIONS_KEY
|
8
9
|
end
|
9
10
|
|
10
|
-
def
|
11
|
-
return
|
11
|
+
def url_for_with_session_id(options = {})
|
12
|
+
return url_for_without_session_id(options) unless inject_session_id_parameter?(options)
|
12
13
|
session_opts = request.env[ENV_SESSION_OPTIONS_KEY]
|
13
14
|
# if we don't have a session ID yet, create one
|
14
15
|
if session_opts[:id].blank?
|
@@ -18,8 +19,9 @@ module Galakei::SessionIdParameter::InUrl # :nodoc:
|
|
18
19
|
# create a new session ID
|
19
20
|
session_opts[:id] = SecureRandom.hex(8)
|
20
21
|
end
|
21
|
-
|
22
|
+
url_for_without_session_id(options.merge(::Rails.application.config.session_options[:key] => session_opts[:id]))
|
22
23
|
end
|
24
|
+
alias_method_chain :url_for, :session_id
|
23
25
|
|
24
26
|
private
|
25
27
|
|
@@ -4,9 +4,7 @@ module Galakei
|
|
4
4
|
config.galakei.session_id_parameter = false
|
5
5
|
initializer "galakei.session_id_parameter" do |app|
|
6
6
|
if app.config.galakei.session_id_parameter
|
7
|
-
|
8
|
-
include Galakei::SessionIdParameter::InUrl
|
9
|
-
end
|
7
|
+
require "galakei/session_id_parameter/in_url"
|
10
8
|
ActiveSupport.on_load :action_view do
|
11
9
|
include Galakei::SessionIdParameter::InForm
|
12
10
|
end
|
data/lib/galakei/version.rb
CHANGED
@@ -21,12 +21,12 @@ feature 'emoji table' do
|
|
21
21
|
page.source.should match("\uEF60")
|
22
22
|
end
|
23
23
|
|
24
|
-
|
24
|
+
pending 'for au SSL', :driver => :au do
|
25
25
|
visit 'https://www.example.com/emoji'
|
26
26
|
page.source.should match([0xF660].pack("n").force_encoding("Shift_JIS"))
|
27
27
|
end
|
28
28
|
|
29
|
-
|
29
|
+
pending 'for au SSL with unicode source', :driver => :au do
|
30
30
|
visit 'https://www.example.com/emoji/with_unicode'
|
31
31
|
expected = "てすと".encode("Shift_JIS") + [0xF660].pack("n").force_encoding("Shift_JIS")
|
32
32
|
page.source.should match(expected)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: galakei
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2013-01-23 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: actionpack
|
@@ -174,7 +174,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
174
174
|
version: '0'
|
175
175
|
segments:
|
176
176
|
- 0
|
177
|
-
hash:
|
177
|
+
hash: 4401509877869676688
|
178
178
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
179
179
|
none: false
|
180
180
|
requirements:
|
@@ -183,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
183
|
version: '0'
|
184
184
|
segments:
|
185
185
|
- 0
|
186
|
-
hash:
|
186
|
+
hash: 4401509877869676688
|
187
187
|
requirements: []
|
188
188
|
rubyforge_project: galakei
|
189
189
|
rubygems_version: 1.8.24
|