jpmobile 0.1.0.pre.4 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,5 +1,6 @@
1
1
  doc
2
2
  tmp
3
3
  pkg
4
- .bundle/
4
+ .bundle
5
+ Gemfile
5
6
  Gemfile.lock
data/README.rdoc CHANGED
@@ -1,7 +1,7 @@
1
1
  = jpmobile: A Rails plugin for Japanese mobile-phones
2
2
 
3
3
  == jpmobileとは
4
- 携帯電話特有の機能を Rails や Rack middleware で利用するためのプラグイン。
4
+ 携帯電話特有の機能を Rails 3.0 や Rack middleware で利用するためのプラグイン。
5
5
  以下の機能を備える。
6
6
 
7
7
  * 携帯電話のキャリア判別
@@ -12,14 +12,17 @@
12
12
  * ディスプレイ情報(画面サイズ、ブラウザ画面サイズ、カラー・白黒、色数)の取得
13
13
  * 文字コード変換機能/絵文字のキャリア間相互変換
14
14
 
15
- また Rails に以下の機能を追加する
15
+ また Rails 3.0 に以下の機能を追加する
16
16
  * ビューへの自動振分け
17
17
  * 位置情報取得などのリンクヘルパーの追加
18
18
  * セッションIDをフォーム/リンクに付与(Trans SID)
19
19
 
20
20
  == インストール
21
- 開発版:
22
- % ./script/plugin install git://github.com/jpmobile/jpmobile.git
21
+ === Rails pluginとしてインストールする場合
22
+ % rails plugin install git://github.com/jpmobile/jpmobile.git
23
+
24
+ === gemでインストールする場合
25
+ % gem install jpmobile
23
26
 
24
27
  == 使用例
25
28
 
data/VERSION.yml CHANGED
@@ -2,4 +2,3 @@
2
2
  :major: 0
3
3
  :minor: 1
4
4
  :patch: 0
5
- :build: pre.4
data/jpmobile.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{jpmobile}
8
- s.version = "0.1.0.pre.4"
8
+ s.version = "0.1.0"
9
9
 
10
- s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Yoji Shidara", "Shin-ichiro OGAWA"]
12
- s.date = %q{2010-08-24}
12
+ s.date = %q{2010-08-31}
13
13
  s.description = %q{A Rails plugin for Japanese mobile-phones}
14
14
  s.email = %q{dara@shidara.net}
15
15
  s.extra_rdoc_files = [
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
19
19
  ".gitignore",
20
20
  ".rspec",
21
21
  "CHANGELOG",
22
+ "Gemfile",
22
23
  "MIT-LICENSE",
23
24
  "README.rdoc",
24
25
  "Rakefile",
@@ -109,6 +110,7 @@ Gem::Specification.new do |s|
109
110
  "test/rails/overrides/app/controllers/trans_sid_base_controller.rb",
110
111
  "test/rails/overrides/app/controllers/trans_sid_mobile_controller.rb",
111
112
  "test/rails/overrides/app/controllers/trans_sid_none_controller.rb",
113
+ "test/rails/overrides/app/models/user.rb",
112
114
  "test/rails/overrides/app/views/filter/index.html.erb",
113
115
  "test/rails/overrides/app/views/hankaku_filter/index.html.erb",
114
116
  "test/rails/overrides/app/views/links/au_gps.html.erb",
@@ -137,6 +139,7 @@ Gem::Specification.new do |s|
137
139
  "test/rails/overrides/config/initializers/jpmobile_generator.rb",
138
140
  "test/rails/overrides/config/routes.rb",
139
141
  "test/rails/overrides/db/migrate/001_add_sessions_table.rb",
142
+ "test/rails/overrides/db/migrate/20100824062306_create_users.rb",
140
143
  "test/rails/overrides/spec/helpers/helpers_spec.rb",
141
144
  "test/rails/overrides/spec/rcov.opts",
142
145
  "test/rails/overrides/spec/requests/docomo_guid_spec.rb",
@@ -202,6 +205,7 @@ Gem::Specification.new do |s|
202
205
  "test/rails/overrides/spec/requests/emobile_spec.rb",
203
206
  "test/rails/overrides/spec/spec_helper.rb",
204
207
  "test/rails/overrides/autotest/discover.rb",
208
+ "test/rails/overrides/app/models/user.rb",
205
209
  "test/rails/overrides/app/controllers/trans_sid_always_controller.rb",
206
210
  "test/rails/overrides/app/controllers/hankaku_filter_controller.rb",
207
211
  "test/rails/overrides/app/controllers/filter_controller_base.rb",
@@ -217,6 +221,7 @@ Gem::Specification.new do |s|
217
221
  "test/rails/overrides/app/controllers/application_controller.rb",
218
222
  "test/rails/overrides/app/controllers/docomo_guid_always_controller.rb",
219
223
  "test/rails/overrides/app/controllers/docomo_guid_base_controller.rb",
224
+ "test/rails/overrides/db/migrate/20100824062306_create_users.rb",
220
225
  "test/rails/overrides/db/migrate/001_add_sessions_table.rb",
221
226
  "test/rails/overrides/config/routes.rb",
222
227
  "test/rails/overrides/config/initializers/jpmobile_generator.rb"
@@ -32,6 +32,8 @@ module ActionController
32
32
  def redirect_to_with_jpmobile(options = {}, response_status = {})
33
33
  if apply_trans_sid? and jpmobile_session_id
34
34
  case options
35
+ when %r{^\w[\w+.-]*:.*}
36
+ # nothing to do
35
37
  when String
36
38
  unless options.match(/#{session_key}/)
37
39
  url = URI.parse(options)
@@ -42,12 +44,14 @@ module ActionController
42
44
  end
43
45
  options = url.to_s
44
46
  end
45
- when %r{^\w[\w+.-]*:.*}
46
47
  when :back
47
- else
48
+ # nothing to do
49
+ when Hash
48
50
  unless options[session_key.to_sym]
49
51
  options[session_key.to_sym] = jpmobile_session_id
50
52
  end
53
+ else
54
+ # nothing to do
51
55
  end
52
56
  end
53
57
 
@@ -1,6 +1,6 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
- gem 'rails', '3.0.0.rc2'
3
+ gem 'rails', '3.0.0'
4
4
 
5
5
  # Bundle edge Rails instead:
6
6
  # gem 'rails', :git => 'git://github.com/rails/rails.git'
@@ -14,5 +14,27 @@ class TransSidBaseController < ApplicationController
14
14
  end
15
15
  def session_init
16
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]
17
39
  end
18
40
  end
@@ -0,0 +1,2 @@
1
+ class User < ActiveRecord::Base
2
+ end
@@ -1,58 +1,7 @@
1
1
  RailsRoot::Application.routes.draw do |map|
2
- # The priority is based upon order of creation:
3
- # first created -> highest priority.
4
-
5
- # Sample of regular route:
6
- # match 'products/:id' => 'catalog#view'
7
- # Keep in mind you can assign values other than :controller and :action
8
-
9
- # Sample of named route:
10
- # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
11
- # This route can be invoked with purchase_url(:id => product.id)
12
-
13
- # Sample resource route (maps HTTP verbs to controller actions automatically):
14
- # resources :products
15
-
16
- # Sample resource route with options:
17
- # resources :products do
18
- # member do
19
- # get :short
20
- # post :toggle
21
- # end
22
- #
23
- # collection do
24
- # get :sold
25
- # end
26
- # end
27
-
28
- # Sample resource route with sub-resources:
29
- # resources :products do
30
- # resources :comments, :sales
31
- # resource :seller
32
- # end
33
-
34
- # Sample resource route with more complex sub-resources
35
- # resources :products do
36
- # resources :comments
37
- # resources :sales do
38
- # get :recent, :on => :collection
39
- # end
40
- # end
41
-
42
- # Sample resource route within a namespace:
43
- # namespace :admin do
44
- # # Directs /admin/products/* to Admin::ProductsController
45
- # # (app/controllers/admin/products_controller.rb)
46
- # resources :products
47
- # end
48
-
49
- # You can have the root of your site routed with "root"
50
- # just remember to delete public/index.html.
51
- # root :to => "welcome#index"
52
-
53
- # See how all your routes lay out with "rake routes"
54
-
55
- # This is a legacy wild controller route that's not recommended for RESTful applications.
56
- # Note: This route will make all actions in every controller accessible via GET requests.
2
+ resources :users
3
+ namespace :admin do
4
+ resources :users
5
+ end
57
6
  match ':controller(/:action(/:id(.:format)))'
58
7
  end
@@ -0,0 +1,13 @@
1
+ class CreateUsers < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :users do |t|
4
+ t.string :name
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+
10
+ def self.down
11
+ drop_table :users
12
+ end
13
+ end
@@ -8,142 +8,182 @@ def get_with_session(controller, action, user_agent)
8
8
  end
9
9
  end
10
10
 
11
- shared_examples_for "trans_sid が起動しないとき" do
12
- it " link_to の自動書き換えが行われない" do
13
- res = get_with_session(@controller, "link", @user_agent)
11
+ def describe_mobile_with_ua(user_agent, charset, &block)
12
+ describe("trans_sid :mobile が指定されているコントローラに #{user_agent} からアクセスしたとき") do
13
+ before(:each) do
14
+ @controller = "trans_sid_mobile"
15
+ @user_agent = user_agent
16
+ @charset = charset
17
+ end
14
18
 
15
- res.response.body.should =~ /<a href=\"\/.+?\/link\">linkto<\/a>/
19
+ instance_eval(&block)
16
20
  end
17
- it "で form の自動書き換えが行われない" do
18
- res = get_with_session(@controller, "form", @user_agent)
21
+ end
19
22
 
20
- res.response.body.should =~ /<form accept-charset="#{@charset}" action=\"\/.+?\/form\"/
23
+ describe "trans_sid functional" do
24
+ before(:each) do
25
+ @user ||= User.create(:name => "hoge")
21
26
  end
22
- it "で redirect の自動書き換えが行われない" do
23
- res = get_with_session(@controller, "redirect", @user_agent)
24
27
 
25
- res.response.header['Location'] =~ /\/$/
26
- end
27
- end
28
+ shared_examples_for "trans_sid が起動しないとき" do
29
+ it "で link_to の自動書き換えが行われない" do
30
+ res = get_with_session(@controller, "link", @user_agent)
28
31
 
29
- shared_examples_for "trans_sid が起動するとき" do
30
- it "で link_to の自動書き換えが行われる" do
31
- res = get_with_session(@controller, "link", @user_agent)
32
+ res.response.body.should =~ /<a href=\"\/.+?\/link\">linkto<\/a>/
33
+ end
34
+ it "で form の自動書き換えが行われない" do
35
+ res = get_with_session(@controller, "form", @user_agent)
32
36
 
33
- res.response.body.should =~ /<a href=\"\/.+?\/link\?_session_id=[a-zA-Z0-9]{32}\">linkto<\/a>/
34
- end
35
- it "で form の自動書き換えが行われる" do
36
- res = get_with_session(@controller, "form", @user_agent)
37
+ res.response.body.should =~ /<form accept-charset="#{@charset}" action=\"\/.+?\/form\"/
38
+ end
39
+ it "で redirect の自動書き換えが行われない" do
40
+ res = get_with_session(@controller, "redirect", @user_agent)
37
41
 
38
- res.response.body.should =~ /<form accept-charset="#{@charset}" action=\"\/.+?\/form\?_session_id=[a-zA-Z0-9]{32}\"/
42
+ res.response.header['Location'] =~ /\/$/
43
+ end
39
44
  end
40
- it "で redirect の自動書き換えが行われる" do
41
- res = get_with_session(@controller, "redirect", @user_agent)
42
45
 
43
- res.response.header['Location'] =~ /\?_session_id=[a-zA-Z0-9]{32}$/
44
- end
45
- end
46
+ shared_examples_for "trans_sid が起動するとき" do
47
+ it "で link_to の自動書き換えが行われる" do
48
+ res = get_with_session(@controller, "link", @user_agent)
46
49
 
47
- describe TransSidBaseController, "という trans_sid が有効になっていないコントローラ" do
48
- before(:each) do
49
- @controller = "trans_sid_base"
50
- @user_agent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)"
51
- @charset = "UTF-8"
52
- end
50
+ res.response.body.should =~ /<a href=\"\/.+?\/link\?_session_id=[a-zA-Z0-9]{32}\">linkto<\/a>/
51
+ end
52
+ it "で form の自動書き換えが行われる" do
53
+ res = get_with_session(@controller, "form", @user_agent)
53
54
 
54
- it "の trans_sid_mode nil" do
55
- get "/#{@controller}/link", {}, {"HTTP_USER_AGENT" => @user_agent}
55
+ res.response.body.should =~ /<form accept-charset="#{@charset}" action=\"\/.+?\/form\?_session_id=[a-zA-Z0-9]{32}\"/
56
+ end
57
+ it "で redirect の自動書き換えが行われる" do
58
+ res = get_with_session(@controller, "redirect", @user_agent)
56
59
 
57
- controller.trans_sid_mode.should be_nil
58
- end
59
- it_should_behave_like "trans_sid が起動しないとき"
60
- end
60
+ res.response.header['Location'] =~ /\?_session_id=[a-zA-Z0-9]{32}$/
61
+ end
61
62
 
62
- describe TransSidNoneController, "という trans_sid :none が指定されているコントローラ" do
63
- before(:each) do
64
- @controller = "trans_sid_none"
65
- @user_agent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)"
66
- @charset = "UTF-8"
67
- end
63
+ # resource paths
64
+ it "で @user の link_to の自動書き換えが行われる" do
65
+ res = get_with_session(@controller, "link_path", @user_agent)
68
66
 
69
- it "の trans_sid_mode は :none" do
70
- get "/#{@controller}/link", {}, {"HTTP_USER_AGENT" => @user_agent}
67
+ res.response.body.should =~ /<a href=\"\/users\/1\?_session_id=[a-zA-Z0-9]{32}\">linkto<\/a>/
68
+ end
69
+ it "で @user の form の自動書き換えが行われる" do
70
+ res = get_with_session(@controller, "form_path", @user_agent)
71
71
 
72
- controller.trans_sid_mode.should == :none
73
- end
74
- it_should_behave_like "trans_sid が起動しないとき"
75
- end
72
+ res.response.body.should =~ /<form accept-charset="#{@charset}" action=\"\/users\/1\?_session_id=[a-zA-Z0-9]{32}\"/
73
+ end
74
+ it " @path の redirect の自動書き換えが行われる" do
75
+ res = get_with_session(@controller, "redirect_path", @user_agent)
76
76
 
77
- describe TransSidAlwaysController, "という trans_sid :always が指定されているコントローラ" do
78
- before(:each) do
79
- @controller = "trans_sid_always"
80
- @user_agent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)"
81
- @charset = "UTF-8"
77
+ res.response.header['Location'] =~ /\?_session_id=[a-zA-Z0-9]{32}$/
78
+ end
79
+
80
+ # resource path with prefix
81
+ it "で [:admin, @user] の link_to の自動書き換えが行われる" do
82
+ res = get_with_session(@controller, "link_path_admin", @user_agent)
83
+
84
+ res.response.body.should =~ /<a href=\"\/admin\/users\/1\?_session_id=[a-zA-Z0-9]{32}\">linkto<\/a>/
85
+ end
86
+ it "で [:admin, @user] の form の自動書き換えが行われる" do
87
+ res = get_with_session(@controller, "form_path_admin", @user_agent)
88
+
89
+ res.response.body.should =~ /<form accept-charset="#{@charset}" action=\"\/admin\/users\/1\?_session_id=[a-zA-Z0-9]{32}\"/
90
+ end
91
+ it "で [:admin, @path] の redirect の自動書き換えが行われる" do
92
+ res = get_with_session(@controller, "redirect_path_admin", @user_agent)
93
+
94
+ res.response.header['Location'] =~ /\?_session_id=[a-zA-Z0-9]{32}$/
95
+ end
82
96
  end
83
97
 
84
- it " trans_sid_mode は :always" do
85
- get "/#{@controller}/link", {}, {"HTTP_USER_AGENT" => @user_agent}
98
+ describe TransSidBaseController, "という trans_sid が有効になっていないコントローラ" do
99
+ before(:each) do
100
+ @controller = "trans_sid_base"
101
+ @user_agent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)"
102
+ @charset = "UTF-8"
103
+ end
86
104
 
87
- controller.trans_sid_mode.should == :always
105
+ it "の trans_sid_mode nil" do
106
+ get "/#{@controller}/link", {}, {"HTTP_USER_AGENT" => @user_agent}
107
+
108
+ controller.trans_sid_mode.should be_nil
109
+ end
110
+ it_should_behave_like "trans_sid が起動しないとき"
88
111
  end
89
- it_should_behave_like "trans_sid が起動するとき"
90
- end
91
112
 
92
- describe TransSidMobileController, "という trans_sid :mobile が指定されているコントローラ" do
93
- before(:each) do
94
- @controller = "trans_sid_mobile"
95
- @user_agent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)"
96
- @charset = "UTF-8"
113
+ describe TransSidNoneController, "という trans_sid :none が指定されているコントローラ" do
114
+ before(:each) do
115
+ @controller = "trans_sid_none"
116
+ @user_agent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)"
117
+ @charset = "UTF-8"
118
+ end
119
+
120
+ it "の trans_sid_mode は :none" do
121
+ get "/#{@controller}/link", {}, {"HTTP_USER_AGENT" => @user_agent}
122
+
123
+ controller.trans_sid_mode.should == :none
124
+ end
125
+ it_should_behave_like "trans_sid が起動しないとき"
97
126
  end
98
127
 
99
- it " trans_sid_mode :mobile" do
100
- get "/#{@controller}/link", {}, {"HTTP_USER_AGENT" => @user_agent}
128
+ describe TransSidAlwaysController, "という trans_sid :always が指定されているコントローラ" do
129
+ before(:each) do
130
+ @controller = "trans_sid_always"
131
+ @user_agent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)"
132
+ @charset = "UTF-8"
133
+ end
134
+
135
+ it "の trans_sid_mode は :always" do
136
+ get "/#{@controller}/link", {}, {"HTTP_USER_AGENT" => @user_agent}
101
137
 
102
- controller.trans_sid_mode.should == :mobile
138
+ controller.trans_sid_mode.should == :always
139
+ end
140
+ it_should_behave_like "trans_sid が起動するとき"
103
141
  end
104
- end
105
142
 
106
- def describe_mobile_with_ua(user_agent, charset, &block)
107
- describe("trans_sid :mobile が指定されているコントローラに #{user_agent} からアクセスしたとき") do
143
+ describe TransSidMobileController, "という trans_sid :mobile が指定されているコントローラ" do
108
144
  before(:each) do
109
145
  @controller = "trans_sid_mobile"
110
- @user_agent = user_agent
111
- @charset = charset
146
+ @user_agent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)"
147
+ @charset = "UTF-8"
112
148
  end
113
149
 
114
- instance_eval(&block)
115
- end
116
- end
150
+ it "の trans_sid_mode は :mobile" do
151
+ get "/#{@controller}/link", {}, {"HTTP_USER_AGENT" => @user_agent}
117
152
 
118
- describe TransSidAlwaysAndSessionOffController, "という trans_sid :always が指定されていて session がロードされていないとき" do
119
- before(:each) do
120
- @controller = "trans_sid_always_and_session_off"
121
- @user_agent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)"
122
- @charset = "UTF-8"
153
+ controller.trans_sid_mode.should == :mobile
154
+ end
123
155
  end
124
156
 
125
- it " trans_sid_mode :always" do
126
- res = get_with_session(@controller, "link", @user_agent)
157
+ describe TransSidAlwaysAndSessionOffController, "という trans_sid :always が指定されていて session がロードされていないとき" do
158
+ before(:each) do
159
+ @controller = "trans_sid_always_and_session_off"
160
+ @user_agent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)"
161
+ @charset = "UTF-8"
162
+ end
163
+
164
+ it "の trans_sid_mode は :always" do
165
+ res = get_with_session(@controller, "link", @user_agent)
127
166
 
128
- res.controller.trans_sid_mode.should == :always
167
+ res.controller.trans_sid_mode.should == :always
168
+ end
169
+ it_should_behave_like "trans_sid が起動しないとき"
129
170
  end
130
- it_should_behave_like "trans_sid が起動しないとき"
131
- end
132
171
 
133
- # NOTE: 3.0.0RC では accept-charset は UTF-8 で埋め込まれるので保留
134
- describe_mobile_with_ua "DoCoMo/2.0 SH902i(c100;TB;W24H12)", "Shift_JIS" do
135
- it_should_behave_like "trans_sid が起動するとき"
136
- end
172
+ # NOTE: 3.0.0RC では accept-charset は UTF-8 で埋め込まれるので保留
173
+ describe_mobile_with_ua "DoCoMo/2.0 SH902i(c100;TB;W24H12)", "Shift_JIS" do
174
+ it_should_behave_like "trans_sid が起動するとき"
175
+ end
137
176
 
138
- # NOTE: 3.0.0RC では accept-charset は UTF-8 で埋め込まれるので保留
139
- describe_mobile_with_ua "KDDI-CA32 UP.Browser/6.2.0.7.3.129 (GUI) MMP/2.0", "Shift_JIS" do
140
- it_should_behave_like "trans_sid が起動しないとき"
141
- end
177
+ # NOTE: 3.0.0RC では accept-charset は UTF-8 で埋め込まれるので保留
178
+ describe_mobile_with_ua "KDDI-CA32 UP.Browser/6.2.0.7.3.129 (GUI) MMP/2.0", "Shift_JIS" do
179
+ it_should_behave_like "trans_sid が起動しないとき"
180
+ end
142
181
 
143
- describe_mobile_with_ua "SoftBank/1.0/910T/TJ001/SN000000000000000 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1", "UTF-8" do
144
- it_should_behave_like "trans_sid が起動しないとき"
145
- end
182
+ describe_mobile_with_ua "SoftBank/1.0/910T/TJ001/SN000000000000000 Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1", "UTF-8" do
183
+ it_should_behave_like "trans_sid が起動しないとき"
184
+ end
146
185
 
147
- describe_mobile_with_ua "Vodafone/1.0/V903T/TJ001 Browser/VF-Browser/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 Ext-J-Profile/JSCL-1.2.2 Ext-V-Profile/VSCL-2.0.0", "UTF-8" do
148
- it_should_behave_like "trans_sid が起動しないとき"
186
+ describe_mobile_with_ua "Vodafone/1.0/V903T/TJ001 Browser/VF-Browser/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 Ext-J-Profile/JSCL-1.2.2 Ext-V-Profile/VSCL-2.0.0", "UTF-8" do
187
+ it_should_behave_like "trans_sid が起動しないとき"
188
+ end
149
189
  end
metadata CHANGED
@@ -1,15 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jpmobile
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1923831985
5
- prerelease: true
4
+ prerelease: false
6
5
  segments:
7
6
  - 0
8
7
  - 1
9
8
  - 0
10
- - pre
11
- - 4
12
- version: 0.1.0.pre.4
9
+ version: 0.1.0
13
10
  platform: ruby
14
11
  authors:
15
12
  - Yoji Shidara
@@ -18,7 +15,7 @@ autorequire:
18
15
  bindir: bin
19
16
  cert_chain: []
20
17
 
21
- date: 2010-08-24 00:00:00 +09:00
18
+ date: 2010-08-31 00:00:00 +09:00
22
19
  default_executable:
23
20
  dependencies:
24
21
  - !ruby/object:Gem::Dependency
@@ -29,7 +26,6 @@ dependencies:
29
26
  requirements:
30
27
  - - ">="
31
28
  - !ruby/object:Gem::Version
32
- hash: 27
33
29
  segments:
34
30
  - 1
35
31
  - 3
@@ -45,7 +41,6 @@ dependencies:
45
41
  requirements:
46
42
  - - ">="
47
43
  - !ruby/object:Gem::Version
48
- hash: 31
49
44
  segments:
50
45
  - 1
51
46
  - 3
@@ -61,7 +56,6 @@ dependencies:
61
56
  requirements:
62
57
  - - ">="
63
58
  - !ruby/object:Gem::Version
64
- hash: 27
65
59
  segments:
66
60
  - 0
67
61
  - 0
@@ -77,7 +71,6 @@ dependencies:
77
71
  requirements:
78
72
  - - ">="
79
73
  - !ruby/object:Gem::Version
80
- hash: 7
81
74
  segments:
82
75
  - 1
83
76
  - 4
@@ -97,6 +90,7 @@ files:
97
90
  - .gitignore
98
91
  - .rspec
99
92
  - CHANGELOG
93
+ - Gemfile
100
94
  - MIT-LICENSE
101
95
  - README.rdoc
102
96
  - Rakefile
@@ -187,6 +181,7 @@ files:
187
181
  - test/rails/overrides/app/controllers/trans_sid_base_controller.rb
188
182
  - test/rails/overrides/app/controllers/trans_sid_mobile_controller.rb
189
183
  - test/rails/overrides/app/controllers/trans_sid_none_controller.rb
184
+ - test/rails/overrides/app/models/user.rb
190
185
  - test/rails/overrides/app/views/filter/index.html.erb
191
186
  - test/rails/overrides/app/views/hankaku_filter/index.html.erb
192
187
  - test/rails/overrides/app/views/links/au_gps.html.erb
@@ -215,6 +210,7 @@ files:
215
210
  - test/rails/overrides/config/initializers/jpmobile_generator.rb
216
211
  - test/rails/overrides/config/routes.rb
217
212
  - test/rails/overrides/db/migrate/001_add_sessions_table.rb
213
+ - test/rails/overrides/db/migrate/20100824062306_create_users.rb
218
214
  - test/rails/overrides/spec/helpers/helpers_spec.rb
219
215
  - test/rails/overrides/spec/rcov.opts
220
216
  - test/rails/overrides/spec/requests/docomo_guid_spec.rb
@@ -252,21 +248,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
252
248
  requirements:
253
249
  - - ">="
254
250
  - !ruby/object:Gem::Version
255
- hash: 3
256
251
  segments:
257
252
  - 0
258
253
  version: "0"
259
254
  required_rubygems_version: !ruby/object:Gem::Requirement
260
255
  none: false
261
256
  requirements:
262
- - - ">"
257
+ - - ">="
263
258
  - !ruby/object:Gem::Version
264
- hash: 25
265
259
  segments:
266
- - 1
267
- - 3
268
- - 1
269
- version: 1.3.1
260
+ - 0
261
+ version: "0"
270
262
  requirements: []
271
263
 
272
264
  rubyforge_project:
@@ -310,6 +302,7 @@ test_files:
310
302
  - test/rails/overrides/spec/requests/emobile_spec.rb
311
303
  - test/rails/overrides/spec/spec_helper.rb
312
304
  - test/rails/overrides/autotest/discover.rb
305
+ - test/rails/overrides/app/models/user.rb
313
306
  - test/rails/overrides/app/controllers/trans_sid_always_controller.rb
314
307
  - test/rails/overrides/app/controllers/hankaku_filter_controller.rb
315
308
  - test/rails/overrides/app/controllers/filter_controller_base.rb
@@ -325,6 +318,7 @@ test_files:
325
318
  - test/rails/overrides/app/controllers/application_controller.rb
326
319
  - test/rails/overrides/app/controllers/docomo_guid_always_controller.rb
327
320
  - test/rails/overrides/app/controllers/docomo_guid_base_controller.rb
321
+ - test/rails/overrides/db/migrate/20100824062306_create_users.rb
328
322
  - test/rails/overrides/db/migrate/001_add_sessions_table.rb
329
323
  - test/rails/overrides/config/routes.rb
330
324
  - test/rails/overrides/config/initializers/jpmobile_generator.rb