jpmobile 0.0.8 → 0.1.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +0 -3
- data/{spec/spec.opts → .rspec} +1 -2
- data/README.rdoc +122 -128
- data/Rakefile +23 -101
- data/VERSION.yml +4 -3
- data/jpmobile.gemspec +130 -182
- data/lib/jpmobile.rb +37 -24
- data/lib/jpmobile/docomo_guid.rb +2 -1
- data/lib/jpmobile/email.rb +3 -4
- data/lib/jpmobile/emoticon.rb +2 -6
- data/lib/jpmobile/encoding.rb +29 -0
- data/lib/jpmobile/filter.rb +42 -134
- data/lib/jpmobile/helpers.rb +5 -18
- data/lib/jpmobile/hook_action_controller.rb +24 -16
- data/lib/jpmobile/hook_action_view.rb +28 -89
- data/lib/jpmobile/mobile/abstract_mobile.rb +21 -4
- data/lib/jpmobile/mobile/android.rb +10 -0
- data/lib/jpmobile/mobile/au.rb +28 -3
- data/lib/jpmobile/mobile/ddipocket.rb +12 -0
- data/lib/jpmobile/mobile/display.rb +29 -26
- data/lib/jpmobile/mobile/docomo.rb +38 -12
- data/lib/jpmobile/mobile/iphone.rb +26 -0
- data/lib/jpmobile/mobile/smart_phone.rb +21 -0
- data/lib/jpmobile/mobile/softbank.rb +16 -41
- data/lib/jpmobile/mobile/vodafone.rb +17 -0
- data/lib/jpmobile/mobile/willcom.rb +1 -10
- data/lib/jpmobile/mobile/windows_phone.rb +10 -0
- data/lib/jpmobile/position.rb +4 -3
- data/lib/jpmobile/rack.rb +43 -0
- data/lib/jpmobile/rack/filter.rb +51 -0
- data/lib/jpmobile/rack/mobile_carrier.rb +33 -0
- data/lib/jpmobile/rack/params_filter.rb +47 -0
- data/lib/jpmobile/rails.rb +22 -0
- data/lib/jpmobile/request_with_mobile.rb +8 -12
- data/lib/jpmobile/trans_sid.rb +44 -26
- data/lib/jpmobile/util.rb +68 -0
- data/{tasks → lib/tasks}/jpmobile_tasks.rake +32 -13
- data/spec/rack/jpmobile/android_spec.rb +20 -0
- data/spec/rack/jpmobile/au_spec.rb +206 -0
- data/spec/rack/jpmobile/docomo_spec.rb +237 -0
- data/spec/rack/jpmobile/emoticon_spec.rb +215 -0
- data/spec/rack/jpmobile/filter_spec.rb +181 -0
- data/spec/rack/jpmobile/iphone_spec.rb +32 -0
- data/spec/rack/jpmobile/mobile_by_ua_spec.rb +39 -0
- data/spec/rack/jpmobile/params_filter_spec.rb +193 -0
- data/spec/rack/jpmobile/softbank_spec.rb +123 -0
- data/spec/rack/jpmobile/willcom_spec.rb +67 -0
- data/spec/rack/jpmobile/windows_phone.rb +20 -0
- data/spec/rack_helper.rb +86 -0
- data/spec/spec_helper.rb +3 -2
- data/spec/unit/detect_by_email_spec.rb +21 -27
- data/spec/unit/is_carrier_spec.rb +56 -84
- data/spec/unit/spec_helper.rb +1 -2
- data/spec/unit/util_spec.rb +2 -2
- data/spec/unit/valid_ip_spec.rb +43 -52
- data/test/legacy/autoload_test.rb +1 -3
- data/test/legacy/emoticon_test.rb +5 -6
- data/test/legacy/helper.rb +0 -71
- data/test/rails/overrides/.rspec +5 -0
- data/test/rails/overrides/Gemfile +32 -0
- data/test/rails/overrides/app/controllers/docomo_guid_always_controller.rb +3 -0
- data/test/rails/overrides/app/controllers/docomo_guid_base_controller.rb +5 -0
- data/test/rails/overrides/app/controllers/docomo_guid_docomo_controller.rb +3 -0
- data/test/rails/overrides/app/controllers/filter_controller.rb +0 -34
- data/test/rails/overrides/app/controllers/filter_controller_base.rb +19 -0
- data/test/rails/overrides/app/controllers/hankaku_filter_controller.rb +3 -0
- data/test/rails/overrides/app/controllers/links_controller.rb +28 -0
- data/test/rails/overrides/app/controllers/mobile_spec_controller.rb +1 -1
- data/test/rails/overrides/app/controllers/template_path_controller.rb +3 -0
- data/test/rails/overrides/app/controllers/trans_sid_always_and_session_off_controller.rb +4 -0
- data/test/rails/overrides/app/controllers/trans_sid_always_controller.rb +3 -0
- data/test/rails/overrides/app/controllers/trans_sid_base_controller.rb +18 -0
- data/test/rails/overrides/app/controllers/trans_sid_mobile_controller.rb +3 -0
- data/test/rails/overrides/app/controllers/trans_sid_none_controller.rb +3 -0
- data/test/rails/overrides/app/views/links/au_gps.html.erb +1 -0
- data/test/rails/overrides/app/views/links/au_location.html.erb +1 -0
- data/test/rails/overrides/app/views/links/docomo_foma_gps.html.erb +1 -0
- data/test/rails/overrides/app/views/links/docomo_openiarea.html.erb +1 -0
- data/test/rails/overrides/app/views/links/docomo_utn.html.erb +1 -0
- data/test/rails/overrides/app/views/links/link.html.erb +1 -0
- data/test/rails/overrides/app/views/links/show_all.html.erb +1 -0
- data/test/rails/overrides/app/views/links/softbank_location.html.erb +1 -0
- data/test/rails/overrides/app/views/links/willcom_location.html.erb +1 -0
- data/test/rails/overrides/app/views/template_path/_partial_smart_phone.html.erb +1 -0
- data/test/rails/overrides/app/views/template_path/_partial_smart_phone_iphone.html.erb +1 -0
- data/test/rails/overrides/app/views/template_path/index_smart_phone.html.erb +1 -0
- data/test/rails/overrides/app/views/template_path/index_smart_phone_iphone.html.erb +1 -0
- data/test/rails/overrides/app/views/template_path/show_mobile.html.erb +1 -0
- data/test/rails/overrides/app/views/template_path/show_mobile_docomo.html.erb +1 -0
- data/test/rails/overrides/autotest/discover.rb +2 -0
- data/test/rails/overrides/config/initializers/jpmobile_generator.rb +1 -0
- data/test/rails/overrides/config/routes.rb +58 -0
- data/test/rails/overrides/db/migrate/001_add_sessions_table.rb +16 -0
- data/test/rails/overrides/spec/helpers/helpers_spec.rb +2 -2
- data/test/rails/overrides/spec/{controllers → requests}/docomo_guid_spec.rb +37 -14
- data/test/rails/overrides/spec/{controllers → requests}/docomo_spec.rb +11 -8
- data/test/rails/overrides/spec/{controllers → requests}/emobile_spec.rb +24 -8
- data/test/rails/overrides/spec/requests/filter_spec.rb +171 -0
- data/test/rails/overrides/spec/requests/helpers_spec.rb +187 -0
- data/test/rails/overrides/spec/requests/pc_spec.rb +22 -0
- data/test/rails/overrides/spec/requests/softbank_emulator_spec.rb +21 -0
- data/test/rails/overrides/spec/requests/template_path_spec.rb +234 -0
- data/test/rails/overrides/spec/requests/trans_sid_spec.rb +142 -0
- data/test/rails/overrides/spec/spec_helper.rb +17 -48
- data/test/sinatra/guestbook.rb +40 -0
- data/test/sinatra/test/filter_test.rb +39 -0
- metadata +185 -312
- data/lib/jpmobile/hook_request.rb +0 -5
- data/lib/jpmobile/rack/auth.rb +0 -55
- data/lib/jpmobile/rack/combined_logger.rb +0 -54
- data/lib/jpmobile/rack/request.rb +0 -7
- data/lib/jpmobile/rack/trans_sid.rb +0 -14
- data/lib/jpmobile/version.rb +0 -9
- data/spec/unit/detect_by_ua_spec.rb +0 -40
- data/test/legacy/au_test.rb +0 -173
- data/test/legacy/docomo_test.rb +0 -187
- data/test/legacy/emoticon_functional_test.rb +0 -195
- data/test/legacy/filter_test.rb +0 -34
- data/test/legacy/helpers_test.rb +0 -217
- data/test/legacy/softbank_test.rb +0 -183
- data/test/legacy/willcom_test.rb +0 -56
- data/test/rails/2.3.2/spec/controllers/trans_sid_spec.rb +0 -99
- data/test/rails/overrides/app/controllers/docomo_guid_controller.rb +0 -13
- data/test/rails/overrides/app/controllers/trans_sid_controller.rb +0 -28
- data/test/rails/overrides/lib/tasks/rspec.rake +0 -165
- data/test/rails/overrides/spec/controllers/filter_spec.rb +0 -159
- data/test/rails/overrides/spec/controllers/pc_spec.rb +0 -13
- data/test/rails/overrides/spec/controllers/softbank_emulator_spec.rb +0 -42
- data/test/rails/overrides/spec/controllers/template_path_spec.rb +0 -117
- data/test/rails/overrides/spec/controllers/trans_sid_spec.rb +0 -117
- data/test/rails/overrides/spec/rspec.rake +0 -165
- data/test/rails/overrides/spec/spec.opts +0 -4
data/VERSION.yml
CHANGED
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.0.
|
8
|
+
s.version = "0.1.0.pre"
|
9
9
|
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new("
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Yoji Shidara", "Shin-ichiro OGAWA"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-07-28}
|
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 = [
|
@@ -17,6 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
]
|
18
18
|
s.files = [
|
19
19
|
".gitignore",
|
20
|
+
".rspec",
|
20
21
|
"CHANGELOG",
|
21
22
|
"MIT-LICENSE",
|
22
23
|
"README.rdoc",
|
@@ -35,18 +36,24 @@ Gem::Specification.new do |s|
|
|
35
36
|
"lib/jpmobile/emoticon/docomo.rb",
|
36
37
|
"lib/jpmobile/emoticon/softbank.rb",
|
37
38
|
"lib/jpmobile/emoticon/z_combine.rb",
|
39
|
+
"lib/jpmobile/encoding.rb",
|
38
40
|
"lib/jpmobile/filter.rb",
|
39
41
|
"lib/jpmobile/helpers.rb",
|
40
42
|
"lib/jpmobile/hook_action_controller.rb",
|
41
43
|
"lib/jpmobile/hook_action_view.rb",
|
42
|
-
"lib/jpmobile/hook_request.rb",
|
43
44
|
"lib/jpmobile/mobile/abstract_mobile.rb",
|
45
|
+
"lib/jpmobile/mobile/android.rb",
|
44
46
|
"lib/jpmobile/mobile/au.rb",
|
47
|
+
"lib/jpmobile/mobile/ddipocket.rb",
|
45
48
|
"lib/jpmobile/mobile/display.rb",
|
46
49
|
"lib/jpmobile/mobile/docomo.rb",
|
47
50
|
"lib/jpmobile/mobile/emobile.rb",
|
51
|
+
"lib/jpmobile/mobile/iphone.rb",
|
52
|
+
"lib/jpmobile/mobile/smart_phone.rb",
|
48
53
|
"lib/jpmobile/mobile/softbank.rb",
|
54
|
+
"lib/jpmobile/mobile/vodafone.rb",
|
49
55
|
"lib/jpmobile/mobile/willcom.rb",
|
56
|
+
"lib/jpmobile/mobile/windows_phone.rb",
|
50
57
|
"lib/jpmobile/mobile/z_display_info_docomo.rb",
|
51
58
|
"lib/jpmobile/mobile/z_ip_addresses_au.rb",
|
52
59
|
"lib/jpmobile/mobile/z_ip_addresses_docomo.rb",
|
@@ -54,64 +61,96 @@ Gem::Specification.new do |s|
|
|
54
61
|
"lib/jpmobile/mobile/z_ip_addresses_softbank.rb",
|
55
62
|
"lib/jpmobile/mobile/z_ip_addresses_willcom.rb",
|
56
63
|
"lib/jpmobile/position.rb",
|
57
|
-
"lib/jpmobile/rack
|
58
|
-
"lib/jpmobile/rack/
|
59
|
-
"lib/jpmobile/rack/
|
60
|
-
"lib/jpmobile/rack/
|
64
|
+
"lib/jpmobile/rack.rb",
|
65
|
+
"lib/jpmobile/rack/filter.rb",
|
66
|
+
"lib/jpmobile/rack/mobile_carrier.rb",
|
67
|
+
"lib/jpmobile/rack/params_filter.rb",
|
68
|
+
"lib/jpmobile/rails.rb",
|
61
69
|
"lib/jpmobile/request_with_mobile.rb",
|
62
70
|
"lib/jpmobile/trans_sid.rb",
|
63
71
|
"lib/jpmobile/util.rb",
|
64
|
-
"lib/
|
65
|
-
"spec/
|
72
|
+
"lib/tasks/jpmobile_tasks.rake",
|
73
|
+
"spec/rack/jpmobile/android_spec.rb",
|
74
|
+
"spec/rack/jpmobile/au_spec.rb",
|
75
|
+
"spec/rack/jpmobile/docomo_spec.rb",
|
76
|
+
"spec/rack/jpmobile/emoticon_spec.rb",
|
77
|
+
"spec/rack/jpmobile/filter_spec.rb",
|
78
|
+
"spec/rack/jpmobile/iphone_spec.rb",
|
79
|
+
"spec/rack/jpmobile/mobile_by_ua_spec.rb",
|
80
|
+
"spec/rack/jpmobile/params_filter_spec.rb",
|
81
|
+
"spec/rack/jpmobile/softbank_spec.rb",
|
82
|
+
"spec/rack/jpmobile/willcom_spec.rb",
|
83
|
+
"spec/rack/jpmobile/windows_phone.rb",
|
84
|
+
"spec/rack_helper.rb",
|
66
85
|
"spec/spec_helper.rb",
|
67
86
|
"spec/unit/detect_by_email_spec.rb",
|
68
|
-
"spec/unit/detect_by_ua_spec.rb",
|
69
87
|
"spec/unit/is_carrier_spec.rb",
|
70
88
|
"spec/unit/spec_helper.rb",
|
71
89
|
"spec/unit/util_spec.rb",
|
72
90
|
"spec/unit/valid_ip_spec.rb",
|
73
|
-
"tasks/jpmobile_tasks.rake",
|
74
|
-
"test/legacy/au_test.rb",
|
75
91
|
"test/legacy/autoload_test.rb",
|
76
|
-
"test/legacy/docomo_test.rb",
|
77
|
-
"test/legacy/emoticon_functional_test.rb",
|
78
92
|
"test/legacy/emoticon_test.rb",
|
79
|
-
"test/legacy/filter_test.rb",
|
80
93
|
"test/legacy/helper.rb",
|
81
|
-
"test/legacy/helpers_test.rb",
|
82
|
-
"test/legacy/softbank_test.rb",
|
83
|
-
"test/legacy/willcom_test.rb",
|
84
94
|
"test/rails/.gitignore",
|
85
|
-
"test/rails/
|
95
|
+
"test/rails/overrides/.rspec",
|
96
|
+
"test/rails/overrides/Gemfile",
|
86
97
|
"test/rails/overrides/app/controllers/application_controller.rb",
|
87
|
-
"test/rails/overrides/app/controllers/
|
98
|
+
"test/rails/overrides/app/controllers/docomo_guid_always_controller.rb",
|
99
|
+
"test/rails/overrides/app/controllers/docomo_guid_base_controller.rb",
|
100
|
+
"test/rails/overrides/app/controllers/docomo_guid_docomo_controller.rb",
|
88
101
|
"test/rails/overrides/app/controllers/filter_controller.rb",
|
102
|
+
"test/rails/overrides/app/controllers/filter_controller_base.rb",
|
103
|
+
"test/rails/overrides/app/controllers/hankaku_filter_controller.rb",
|
104
|
+
"test/rails/overrides/app/controllers/links_controller.rb",
|
89
105
|
"test/rails/overrides/app/controllers/mobile_spec_controller.rb",
|
90
106
|
"test/rails/overrides/app/controllers/template_path_controller.rb",
|
91
|
-
"test/rails/overrides/app/controllers/
|
107
|
+
"test/rails/overrides/app/controllers/trans_sid_always_and_session_off_controller.rb",
|
108
|
+
"test/rails/overrides/app/controllers/trans_sid_always_controller.rb",
|
109
|
+
"test/rails/overrides/app/controllers/trans_sid_base_controller.rb",
|
110
|
+
"test/rails/overrides/app/controllers/trans_sid_mobile_controller.rb",
|
111
|
+
"test/rails/overrides/app/controllers/trans_sid_none_controller.rb",
|
92
112
|
"test/rails/overrides/app/views/filter/index.html.erb",
|
93
113
|
"test/rails/overrides/app/views/hankaku_filter/index.html.erb",
|
114
|
+
"test/rails/overrides/app/views/links/au_gps.html.erb",
|
115
|
+
"test/rails/overrides/app/views/links/au_location.html.erb",
|
116
|
+
"test/rails/overrides/app/views/links/docomo_foma_gps.html.erb",
|
117
|
+
"test/rails/overrides/app/views/links/docomo_openiarea.html.erb",
|
118
|
+
"test/rails/overrides/app/views/links/docomo_utn.html.erb",
|
119
|
+
"test/rails/overrides/app/views/links/link.html.erb",
|
120
|
+
"test/rails/overrides/app/views/links/show_all.html.erb",
|
121
|
+
"test/rails/overrides/app/views/links/softbank_location.html.erb",
|
122
|
+
"test/rails/overrides/app/views/links/willcom_location.html.erb",
|
94
123
|
"test/rails/overrides/app/views/template_path/_partial.html.erb",
|
95
124
|
"test/rails/overrides/app/views/template_path/_partial_mobile.html.erb",
|
96
125
|
"test/rails/overrides/app/views/template_path/_partial_mobile_docomo.html.erb",
|
126
|
+
"test/rails/overrides/app/views/template_path/_partial_smart_phone.html.erb",
|
127
|
+
"test/rails/overrides/app/views/template_path/_partial_smart_phone_iphone.html.erb",
|
97
128
|
"test/rails/overrides/app/views/template_path/index.html.erb",
|
98
129
|
"test/rails/overrides/app/views/template_path/index_mobile.html.erb",
|
99
130
|
"test/rails/overrides/app/views/template_path/index_mobile_docomo.html.erb",
|
131
|
+
"test/rails/overrides/app/views/template_path/index_smart_phone.html.erb",
|
132
|
+
"test/rails/overrides/app/views/template_path/index_smart_phone_iphone.html.erb",
|
100
133
|
"test/rails/overrides/app/views/template_path/partial.html.erb",
|
101
|
-
"test/rails/overrides/
|
102
|
-
"test/rails/overrides/
|
103
|
-
"test/rails/overrides/
|
104
|
-
"test/rails/overrides/
|
105
|
-
"test/rails/overrides/
|
106
|
-
"test/rails/overrides/
|
107
|
-
"test/rails/overrides/spec/controllers/softbank_emulator_spec.rb",
|
108
|
-
"test/rails/overrides/spec/controllers/template_path_spec.rb",
|
109
|
-
"test/rails/overrides/spec/controllers/trans_sid_spec.rb",
|
134
|
+
"test/rails/overrides/app/views/template_path/show_mobile.html.erb",
|
135
|
+
"test/rails/overrides/app/views/template_path/show_mobile_docomo.html.erb",
|
136
|
+
"test/rails/overrides/autotest/discover.rb",
|
137
|
+
"test/rails/overrides/config/initializers/jpmobile_generator.rb",
|
138
|
+
"test/rails/overrides/config/routes.rb",
|
139
|
+
"test/rails/overrides/db/migrate/001_add_sessions_table.rb",
|
110
140
|
"test/rails/overrides/spec/helpers/helpers_spec.rb",
|
111
141
|
"test/rails/overrides/spec/rcov.opts",
|
112
|
-
"test/rails/overrides/spec/
|
113
|
-
"test/rails/overrides/spec/
|
142
|
+
"test/rails/overrides/spec/requests/docomo_guid_spec.rb",
|
143
|
+
"test/rails/overrides/spec/requests/docomo_spec.rb",
|
144
|
+
"test/rails/overrides/spec/requests/emobile_spec.rb",
|
145
|
+
"test/rails/overrides/spec/requests/filter_spec.rb",
|
146
|
+
"test/rails/overrides/spec/requests/helpers_spec.rb",
|
147
|
+
"test/rails/overrides/spec/requests/pc_spec.rb",
|
148
|
+
"test/rails/overrides/spec/requests/softbank_emulator_spec.rb",
|
149
|
+
"test/rails/overrides/spec/requests/template_path_spec.rb",
|
150
|
+
"test/rails/overrides/spec/requests/trans_sid_spec.rb",
|
114
151
|
"test/rails/overrides/spec/spec_helper.rb",
|
152
|
+
"test/sinatra/guestbook.rb",
|
153
|
+
"test/sinatra/test/filter_test.rb",
|
115
154
|
"tools/disabled_update_display_info_docomo.rb",
|
116
155
|
"tools/emoji/genregexp.rb",
|
117
156
|
"tools/generate_au_emoticon_table.rb",
|
@@ -128,162 +167,59 @@ Gem::Specification.new do |s|
|
|
128
167
|
s.rubygems_version = %q{1.3.7}
|
129
168
|
s.summary = %q{A Rails plugin for Japanese mobile-phones}
|
130
169
|
s.test_files = [
|
131
|
-
"spec/
|
132
|
-
"spec/
|
170
|
+
"spec/rack/jpmobile/android_spec.rb",
|
171
|
+
"spec/rack/jpmobile/au_spec.rb",
|
172
|
+
"spec/rack/jpmobile/docomo_spec.rb",
|
173
|
+
"spec/rack/jpmobile/emoticon_spec.rb",
|
174
|
+
"spec/rack/jpmobile/filter_spec.rb",
|
175
|
+
"spec/rack/jpmobile/iphone_spec.rb",
|
176
|
+
"spec/rack/jpmobile/mobile_by_ua_spec.rb",
|
177
|
+
"spec/rack/jpmobile/params_filter_spec.rb",
|
178
|
+
"spec/rack/jpmobile/softbank_spec.rb",
|
179
|
+
"spec/rack/jpmobile/willcom_spec.rb",
|
180
|
+
"spec/rack/jpmobile/windows_phone.rb",
|
181
|
+
"spec/rack_helper.rb",
|
182
|
+
"spec/spec_helper.rb",
|
183
|
+
"spec/unit/detect_by_email_spec.rb",
|
184
|
+
"spec/unit/is_carrier_spec.rb",
|
133
185
|
"spec/unit/spec_helper.rb",
|
134
|
-
"spec/unit/valid_ip_spec.rb",
|
135
186
|
"spec/unit/util_spec.rb",
|
136
|
-
"spec/unit/
|
137
|
-
"spec/spec_helper.rb",
|
138
|
-
"test/legacy/filter_test.rb",
|
187
|
+
"spec/unit/valid_ip_spec.rb",
|
139
188
|
"test/legacy/autoload_test.rb",
|
140
|
-
"test/legacy/softbank_test.rb",
|
141
|
-
"test/legacy/au_test.rb",
|
142
|
-
"test/legacy/willcom_test.rb",
|
143
|
-
"test/legacy/emoticon_functional_test.rb",
|
144
189
|
"test/legacy/emoticon_test.rb",
|
145
|
-
"test/legacy/helpers_test.rb",
|
146
|
-
"test/legacy/docomo_test.rb",
|
147
190
|
"test/legacy/helper.rb",
|
148
|
-
"test/rails/
|
149
|
-
"test/rails/
|
150
|
-
"test/rails/
|
151
|
-
"test/rails/
|
152
|
-
"test/rails/rails_root/spec/requests/docomo_guid_spec.rb",
|
153
|
-
"test/rails/rails_root/spec/requests/trans_sid_spec.rb",
|
154
|
-
"test/rails/rails_root/spec/requests/template_path_spec.rb",
|
155
|
-
"test/rails/rails_root/spec/requests/filter_spec.rb",
|
156
|
-
"test/rails/rails_root/spec/requests/pc_spec.rb",
|
157
|
-
"test/rails/rails_root/spec/requests/emobile_spec.rb",
|
158
|
-
"test/rails/rails_root/spec/spec_helper.rb",
|
159
|
-
"test/rails/rails_root/autotest/discover.rb",
|
160
|
-
"test/rails/rails_root/app/helpers/application_helper.rb",
|
161
|
-
"test/rails/rails_root/app/models/user.rb",
|
162
|
-
"test/rails/rails_root/app/controllers/trans_sid_always_controller.rb",
|
163
|
-
"test/rails/rails_root/app/controllers/hankaku_filter_controller.rb",
|
164
|
-
"test/rails/rails_root/app/controllers/filter_controller_base.rb",
|
165
|
-
"test/rails/rails_root/app/controllers/links_controller.rb",
|
166
|
-
"test/rails/rails_root/app/controllers/trans_sid_base_controller.rb",
|
167
|
-
"test/rails/rails_root/app/controllers/trans_sid_none_controller.rb",
|
168
|
-
"test/rails/rails_root/app/controllers/trans_sid_always_and_session_off_controller.rb",
|
169
|
-
"test/rails/rails_root/app/controllers/template_path_controller.rb",
|
170
|
-
"test/rails/rails_root/app/controllers/docomo_guid_docomo_controller.rb",
|
171
|
-
"test/rails/rails_root/app/controllers/filter_controller.rb",
|
172
|
-
"test/rails/rails_root/app/controllers/mobile_spec_controller.rb",
|
173
|
-
"test/rails/rails_root/app/controllers/trans_sid_mobile_controller.rb",
|
174
|
-
"test/rails/rails_root/app/controllers/application_controller.rb",
|
175
|
-
"test/rails/rails_root/app/controllers/docomo_guid_always_controller.rb",
|
176
|
-
"test/rails/rails_root/app/controllers/docomo_guid_base_controller.rb",
|
177
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/install.rb",
|
178
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/spec/rack/jpmobile/emoticon_spec.rb",
|
179
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/spec/rack/jpmobile/au_spec.rb",
|
180
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/spec/rack/jpmobile/willcom_spec.rb",
|
181
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/spec/rack/jpmobile/params_filter_spec.rb",
|
182
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/spec/rack/jpmobile/docomo_spec.rb",
|
183
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/spec/rack/jpmobile/filter_spec.rb",
|
184
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/spec/rack/jpmobile/windows_phone.rb",
|
185
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/spec/rack/jpmobile/mobile_by_ua_spec.rb",
|
186
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/spec/rack/jpmobile/iphone_spec.rb",
|
187
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/spec/rack/jpmobile/softbank_spec.rb",
|
188
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/spec/rack/jpmobile/android_spec.rb",
|
189
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/spec/unit/detect_by_email_spec.rb",
|
190
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/spec/unit/spec_helper.rb",
|
191
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/spec/unit/valid_ip_spec.rb",
|
192
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/spec/unit/util_spec.rb",
|
193
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/spec/unit/is_carrier_spec.rb",
|
194
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/spec/spec_helper.rb",
|
195
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/spec/rack_helper.rb",
|
196
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/tools/generate_softbank_emoticon_table.rb",
|
197
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/tools/update_ip_addresses_au.rb",
|
198
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/tools/disabled_update_display_info_docomo.rb",
|
199
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/tools/update_ip_addresses_willcom.rb",
|
200
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/tools/emoji/genregexp.rb",
|
201
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/tools/generate_emoticon_conversion_table.rb",
|
202
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/tools/list_gps_unsupported_au.rb",
|
203
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/tools/generate_au_emoticon_table.rb",
|
204
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/tools/generate_docomo_emoticon_table.rb",
|
205
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/init.rb",
|
206
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile.rb",
|
207
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/position.rb",
|
208
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/filter.rb",
|
209
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/request_with_mobile.rb",
|
210
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/docomo_guid.rb",
|
211
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/rack/params_filter.rb",
|
212
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/rack/filter.rb",
|
213
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/rack/mobile_carrier.rb",
|
214
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/datum_conv.rb",
|
215
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/encoding.rb",
|
216
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/rack.rb",
|
217
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/util.rb",
|
218
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/trans_sid.rb",
|
219
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/z_ip_addresses_willcom.rb",
|
220
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/abstract_mobile.rb",
|
221
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/iphone.rb",
|
222
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/z_ip_addresses_emobile.rb",
|
223
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/emobile.rb",
|
224
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/z_ip_addresses_au.rb",
|
225
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/docomo.rb",
|
226
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/display.rb",
|
227
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/smart_phone.rb",
|
228
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/z_ip_addresses_docomo.rb",
|
229
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/z_ip_addresses_softbank.rb",
|
230
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/softbank.rb",
|
231
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/willcom.rb",
|
232
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/z_display_info_docomo.rb",
|
233
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/windows_phone.rb",
|
234
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/au.rb",
|
235
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/vodafone.rb",
|
236
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/android.rb",
|
237
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/mobile/ddipocket.rb",
|
238
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/helpers.rb",
|
239
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/emoticon/z_combine.rb",
|
240
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/emoticon/docomo.rb",
|
241
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/emoticon/conversion_table.rb",
|
242
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/emoticon/softbank.rb",
|
243
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/emoticon/au.rb",
|
244
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/hook_action_view.rb",
|
245
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/emoticon.rb",
|
246
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/email.rb",
|
247
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/rails.rb",
|
248
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/lib/jpmobile/hook_action_controller.rb",
|
249
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/tmp/conversion-table.rb",
|
250
|
-
"test/rails/rails_root/vendor/plugins/jpmobile/tmp/utf8_to_image.rb",
|
251
|
-
"test/rails/rails_root/db/migrate/20100824062306_create_users.rb",
|
252
|
-
"test/rails/rails_root/db/migrate/001_add_sessions_table.rb",
|
253
|
-
"test/rails/rails_root/db/schema.rb",
|
254
|
-
"test/rails/rails_root/db/seeds.rb",
|
255
|
-
"test/rails/rails_root/config/environments/development.rb",
|
256
|
-
"test/rails/rails_root/config/environments/test.rb",
|
257
|
-
"test/rails/rails_root/config/environments/production.rb",
|
258
|
-
"test/rails/rails_root/config/environment.rb",
|
259
|
-
"test/rails/rails_root/config/routes.rb",
|
260
|
-
"test/rails/rails_root/config/application.rb",
|
261
|
-
"test/rails/rails_root/config/initializers/inflections.rb",
|
262
|
-
"test/rails/rails_root/config/initializers/mime_types.rb",
|
263
|
-
"test/rails/rails_root/config/initializers/backtrace_silencers.rb",
|
264
|
-
"test/rails/rails_root/config/initializers/session_store.rb",
|
265
|
-
"test/rails/rails_root/config/initializers/secret_token.rb",
|
266
|
-
"test/rails/rails_root/config/initializers/jpmobile_generator.rb",
|
267
|
-
"test/rails/rails_root/config/boot.rb",
|
268
|
-
"test/rails/rails_root/test/performance/browsing_test.rb",
|
269
|
-
"test/rails/rails_root/test/test_helper.rb",
|
270
|
-
"test/rails/overrides/spec/helpers/helpers_spec.rb",
|
271
|
-
"test/rails/overrides/spec/spec_helper.rb",
|
272
|
-
"test/rails/overrides/spec/controllers/softbank_emulator_spec.rb",
|
273
|
-
"test/rails/overrides/spec/controllers/docomo_spec.rb",
|
274
|
-
"test/rails/overrides/spec/controllers/docomo_guid_spec.rb",
|
275
|
-
"test/rails/overrides/spec/controllers/trans_sid_spec.rb",
|
276
|
-
"test/rails/overrides/spec/controllers/template_path_spec.rb",
|
277
|
-
"test/rails/overrides/spec/controllers/filter_spec.rb",
|
278
|
-
"test/rails/overrides/spec/controllers/pc_spec.rb",
|
279
|
-
"test/rails/overrides/spec/controllers/emobile_spec.rb",
|
280
|
-
"test/rails/overrides/app/controllers/trans_sid_controller.rb",
|
281
|
-
"test/rails/overrides/app/controllers/template_path_controller.rb",
|
191
|
+
"test/rails/overrides/app/controllers/application_controller.rb",
|
192
|
+
"test/rails/overrides/app/controllers/docomo_guid_always_controller.rb",
|
193
|
+
"test/rails/overrides/app/controllers/docomo_guid_base_controller.rb",
|
194
|
+
"test/rails/overrides/app/controllers/docomo_guid_docomo_controller.rb",
|
282
195
|
"test/rails/overrides/app/controllers/filter_controller.rb",
|
196
|
+
"test/rails/overrides/app/controllers/filter_controller_base.rb",
|
197
|
+
"test/rails/overrides/app/controllers/hankaku_filter_controller.rb",
|
198
|
+
"test/rails/overrides/app/controllers/links_controller.rb",
|
283
199
|
"test/rails/overrides/app/controllers/mobile_spec_controller.rb",
|
284
|
-
"test/rails/overrides/app/controllers/
|
285
|
-
"test/rails/overrides/app/controllers/
|
286
|
-
"test/rails/
|
200
|
+
"test/rails/overrides/app/controllers/template_path_controller.rb",
|
201
|
+
"test/rails/overrides/app/controllers/trans_sid_always_and_session_off_controller.rb",
|
202
|
+
"test/rails/overrides/app/controllers/trans_sid_always_controller.rb",
|
203
|
+
"test/rails/overrides/app/controllers/trans_sid_base_controller.rb",
|
204
|
+
"test/rails/overrides/app/controllers/trans_sid_mobile_controller.rb",
|
205
|
+
"test/rails/overrides/app/controllers/trans_sid_none_controller.rb",
|
206
|
+
"test/rails/overrides/autotest/discover.rb",
|
207
|
+
"test/rails/overrides/config/initializers/jpmobile_generator.rb",
|
208
|
+
"test/rails/overrides/config/routes.rb",
|
209
|
+
"test/rails/overrides/db/migrate/001_add_sessions_table.rb",
|
210
|
+
"test/rails/overrides/spec/helpers/helpers_spec.rb",
|
211
|
+
"test/rails/overrides/spec/requests/docomo_guid_spec.rb",
|
212
|
+
"test/rails/overrides/spec/requests/docomo_spec.rb",
|
213
|
+
"test/rails/overrides/spec/requests/emobile_spec.rb",
|
214
|
+
"test/rails/overrides/spec/requests/filter_spec.rb",
|
215
|
+
"test/rails/overrides/spec/requests/helpers_spec.rb",
|
216
|
+
"test/rails/overrides/spec/requests/pc_spec.rb",
|
217
|
+
"test/rails/overrides/spec/requests/softbank_emulator_spec.rb",
|
218
|
+
"test/rails/overrides/spec/requests/template_path_spec.rb",
|
219
|
+
"test/rails/overrides/spec/requests/trans_sid_spec.rb",
|
220
|
+
"test/rails/overrides/spec/spec_helper.rb",
|
221
|
+
"test/sinatra/guestbook.rb",
|
222
|
+
"test/sinatra/test/filter_test.rb"
|
287
223
|
]
|
288
224
|
|
289
225
|
if s.respond_to? :specification_version then
|
@@ -291,9 +227,21 @@ Gem::Specification.new do |s|
|
|
291
227
|
s.specification_version = 3
|
292
228
|
|
293
229
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
230
|
+
s.add_development_dependency(%q<rspec>, [">= 1.3.0"])
|
231
|
+
s.add_development_dependency(%q<rspec-rails>, [">= 1.3.2"])
|
232
|
+
s.add_development_dependency(%q<rspec-fixture>, [">= 0.0.2"])
|
233
|
+
s.add_development_dependency(%q<jeweler>, [">= 1.4.0"])
|
294
234
|
else
|
235
|
+
s.add_dependency(%q<rspec>, [">= 1.3.0"])
|
236
|
+
s.add_dependency(%q<rspec-rails>, [">= 1.3.2"])
|
237
|
+
s.add_dependency(%q<rspec-fixture>, [">= 0.0.2"])
|
238
|
+
s.add_dependency(%q<jeweler>, [">= 1.4.0"])
|
295
239
|
end
|
296
240
|
else
|
241
|
+
s.add_dependency(%q<rspec>, [">= 1.3.0"])
|
242
|
+
s.add_dependency(%q<rspec-rails>, [">= 1.3.2"])
|
243
|
+
s.add_dependency(%q<rspec-fixture>, [">= 0.0.2"])
|
244
|
+
s.add_dependency(%q<jeweler>, [">= 1.4.0"])
|
297
245
|
end
|
298
246
|
end
|
299
247
|
|
data/lib/jpmobile.rb
CHANGED
@@ -1,40 +1,53 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
1
2
|
module Jpmobile
|
2
|
-
autoload :Email
|
3
|
-
autoload :Emoticon,
|
4
|
-
autoload :Position,
|
3
|
+
autoload :Email, 'jpmobile/email'
|
4
|
+
autoload :Emoticon, 'jpmobile/emoticon'
|
5
|
+
autoload :Position, 'jpmobile/position'
|
5
6
|
autoload :RequestWithMobile, 'jpmobile/request_with_mobile'
|
6
|
-
autoload :Util,
|
7
|
+
autoload :Util, 'jpmobile/util'
|
8
|
+
autoload :Encoding, 'jpmobile/encoding'
|
9
|
+
autoload :Version, 'jpmobile/version'
|
10
|
+
autoload :DatumConv, 'jpmobile/datum_conv'
|
7
11
|
|
12
|
+
# autoload mobile classes
|
8
13
|
module Mobile
|
9
|
-
autoload :Docomo,
|
10
|
-
autoload :Au,
|
11
|
-
autoload :Softbank,
|
12
|
-
autoload :Vodafone,
|
13
|
-
autoload :
|
14
|
-
autoload :
|
15
|
-
autoload :
|
16
|
-
autoload :
|
14
|
+
autoload :Docomo, 'jpmobile/mobile/docomo'
|
15
|
+
autoload :Au, 'jpmobile/mobile/au'
|
16
|
+
autoload :Softbank, 'jpmobile/mobile/softbank'
|
17
|
+
autoload :Vodafone, 'jpmobile/mobile/vodafone'
|
18
|
+
autoload :Emobile, 'jpmobile/mobile/emobile'
|
19
|
+
autoload :Willcom, 'jpmobile/mobile/willcom'
|
20
|
+
autoload :Ddipocket, 'jpmobile/mobile/ddipocket'
|
21
|
+
autoload :SmartPhone, 'jpmobile/mobile/smart_phone'
|
22
|
+
autoload :Iphone, 'jpmobile/mobile/iphone'
|
23
|
+
autoload :Android, 'jpmobile/mobile/android'
|
24
|
+
autoload :WindowsPhone, 'jpmobile/mobile/windows_phone'
|
25
|
+
|
26
|
+
autoload :Display, 'jpmobile/mobile/display'
|
27
|
+
|
28
|
+
DEFAULT_CARRIERS = %w(Docomo Au Softbank Vodafone Emobile Willcom Ddipocket Iphone Android WindowsPhone)
|
17
29
|
|
18
30
|
def self.carriers
|
19
|
-
@carriers ||=
|
31
|
+
@carriers ||= DEFAULT_CARRIERS.dup
|
20
32
|
end
|
21
33
|
|
22
34
|
def self.carriers=(ary)
|
23
35
|
@carriers = ary
|
24
36
|
end
|
37
|
+
|
38
|
+
require 'jpmobile/mobile/abstract_mobile'
|
25
39
|
end
|
26
|
-
end
|
27
40
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
jpmobile/
|
32
|
-
|
33
|
-
|
41
|
+
# autoload Rack middlewares
|
42
|
+
module Rack
|
43
|
+
autoload :MobileCarrier, 'jpmobile/rack/mobile_carrier'
|
44
|
+
autoload :ParamsFilter, 'jpmobile/rack/params_filter'
|
45
|
+
autoload :Filter, 'jpmobile/rack/filter'
|
46
|
+
autoload :Config, 'jpmobile/rack/config'
|
47
|
+
end
|
48
|
+
autoload :Configuration, 'jpmobile/rack'
|
34
49
|
end
|
35
50
|
|
36
|
-
if defined?
|
37
|
-
|
38
|
-
require lib
|
39
|
-
}
|
51
|
+
if defined?(Rails)
|
52
|
+
require 'jpmobile/rails'
|
40
53
|
end
|