jpmobile 2.0.11 → 3.0.0

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.
Files changed (53) hide show
  1. data/Gemfile +3 -4
  2. data/README.rdoc +5 -12
  3. data/Rakefile +1 -1
  4. data/VERSION.yml +2 -2
  5. data/jpmobile.gemspec +3 -2
  6. data/lib/jpmobile.rb +1 -15
  7. data/lib/jpmobile/emoticon.rb +2 -65
  8. data/lib/jpmobile/emoticon/z_combine.rb +1 -17
  9. data/lib/jpmobile/lookup_context.rb +1 -1
  10. data/lib/jpmobile/mail.rb +29 -59
  11. data/lib/jpmobile/mailer.rb +1 -1
  12. data/lib/jpmobile/mobile/abstract_mobile.rb +36 -60
  13. data/lib/jpmobile/mobile/android.rb +0 -2
  14. data/lib/jpmobile/mobile/iphone.rb +25 -1
  15. data/lib/jpmobile/rack.rb +1 -6
  16. data/lib/jpmobile/rails.rb +2 -2
  17. data/lib/jpmobile/resolver.rb +18 -13
  18. data/lib/jpmobile/trans_sid.rb +9 -8
  19. data/lib/jpmobile/util.rb +1 -54
  20. data/lib/tasks/jpmobile_tasks.rake +4 -4
  21. data/spec/rack/jpmobile/emoticon_spec.rb +0 -167
  22. data/spec/rack/jpmobile/mobile_by_ua_spec.rb +1 -5
  23. data/spec/unit/emoticon_spec.rb +0 -60
  24. data/spec/unit/mail_spec.rb +0 -86
  25. data/spec/unit/receive_mail_spec.rb +0 -46
  26. data/spec/unit/util_spec.rb +0 -43
  27. data/test/rails/overrides/Gemfile +4 -19
  28. data/test/rails/overrides/app/controllers/template_path_controller.rb +0 -12
  29. data/test/rails/overrides/spec/mailers/mobile_mailer_spec.rb +0 -10
  30. data/test/rails/overrides/spec/requests/template_path_spec.rb +0 -72
  31. metadata +43 -166
  32. data/lib/jpmobile/emoticon/google.rb +0 -2421
  33. data/lib/jpmobile/emoticon/unicode.rb +0 -2253
  34. data/lib/jpmobile/mobile/android_tablet.rb +0 -12
  35. data/lib/jpmobile/mobile/black_berry.rb +0 -10
  36. data/lib/jpmobile/mobile/google_emoticon.rb +0 -29
  37. data/lib/jpmobile/mobile/ipad.rb +0 -12
  38. data/lib/jpmobile/mobile/tablet.rb +0 -16
  39. data/lib/jpmobile/mobile/unicode_emoticon.rb +0 -43
  40. data/spec/rack/jpmobile/black_berry_spec.rb +0 -20
  41. data/spec/unit/email-fixtures/bounce_with_utf8_part.eml +0 -42
  42. data/spec/unit/email-fixtures/iphone-mail3.eml +0 -56
  43. data/spec/unit/email-fixtures/iphone-message.eml +0 -27
  44. data/spec/unit/mobile/iphone_spec.rb +0 -34
  45. data/spec/unit/variants_spec.rb +0 -128
  46. data/test/rails/overrides/app/views/template_path/smart_phone_only.html.erb +0 -1
  47. data/test/rails/overrides/app/views/template_path/smart_phone_only_smart_phone.html.erb +0 -1
  48. data/test/rails/overrides/app/views/template_path/with_ipd.html.erb +0 -1
  49. data/test/rails/overrides/app/views/template_path/with_ipd_tablet_ipad.html.erb +0 -1
  50. data/test/rails/overrides/app/views/template_path/with_tblt.html.erb +0 -1
  51. data/test/rails/overrides/app/views/template_path/with_tblt_tablet.html.erb +0 -1
  52. data/test/rails/overrides/spec/fixtures/mobile_mailer/bounced-jp.eml +0 -72
  53. data/tools/e4u_conv.rb +0 -122
@@ -1,12 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # =Android
3
-
4
- module Jpmobile::Mobile
5
- # ==AndroidTablet
6
- class AndroidTablet < Tablet
7
- # 対応するUser-Agentの正規表現
8
- USER_AGENT_REGEXP = Regexp.union(/(?!Android.+Mobile)Android/, /Android.+SC-01C/)
9
-
10
- include Jpmobile::Mobile::GoogleEmoticon
11
- end
12
- end
@@ -1,10 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # =BlackBerry
3
-
4
- module Jpmobile::Mobile
5
- # ==BlackBerry
6
- class BlackBerry < SmartPhone
7
- # 対応するUser-Agentの正規表現
8
- USER_AGENT_REGEXP = /BlackBerry/
9
- end
10
- end
@@ -1,29 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- module Jpmobile::Mobile
3
- module GoogleEmoticon
4
- # Jpmobile::Rack::Filter を適用する
5
- def apply_filter?
6
- Jpmobile.config.smart_phone_emoticon_compatibility
7
- end
8
-
9
- # Jpmobile::Rack::ParamsFilter を適用する
10
- def apply_params_filter?
11
- Jpmobile.config.smart_phone_emoticon_compatibility
12
- end
13
-
14
- # 文字コード変換
15
- def to_internal(str)
16
- # Google絵文字を数値参照に変換
17
- str = Jpmobile::Emoticon.external_to_unicodecr_google(Jpmobile::Util.utf8(str))
18
- # 数値参照を UTF-8 に変換
19
- Jpmobile::Emoticon.unicodecr_to_utf8(str)
20
- end
21
- def to_external(str, content_type, charset)
22
- # UTF-8を数値参照に
23
- str = Jpmobile::Emoticon.utf8_to_unicodecr(str)
24
- str = Jpmobile::Emoticon.unicodecr_to_external(str, Jpmobile::Emoticon::CONVERSION_TABLE_TO_GOOGLE_EMOTICON, false)
25
-
26
- [str, charset]
27
- end
28
- end
29
- end
@@ -1,12 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # =Android
3
-
4
- module Jpmobile::Mobile
5
- # ==iPad
6
- class Ipad < Tablet
7
- # 対応するUser-Agentの正規表現
8
- USER_AGENT_REGEXP = /iPad/
9
-
10
- include Jpmobile::Mobile::UnicodeEmoticon
11
- end
12
- end
@@ -1,16 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # =タブレットの親クラス
3
-
4
- module Jpmobile::Mobile
5
- class Tablet < SmartPhone
6
- # smartphone なので true
7
- def smart_phone?
8
- true
9
- end
10
-
11
- # tablet なので true
12
- def tablet?
13
- true
14
- end
15
- end
16
- end
@@ -1,43 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- module Jpmobile::Mobile
3
- module UnicodeEmoticon
4
- # Jpmobile::Rack::Filter を適用する
5
- def apply_filter?
6
- Jpmobile.config.smart_phone_emoticon_compatibility
7
- end
8
-
9
- # Jpmobile::Rack::ParamsFilter を適用する
10
- def apply_params_filter?
11
- Jpmobile.config.smart_phone_emoticon_compatibility
12
- end
13
-
14
- # 文字コード変換
15
- def to_internal(str)
16
- if unicode_emoticon?
17
- # Unicode絵文字を数値参照に変換
18
- str = Jpmobile::Emoticon.external_to_unicodecr_unicode60(Jpmobile::Util.utf8(str))
19
- else
20
- # SoftBank絵文字を数値参照に変換
21
- str = Jpmobile::Emoticon.external_to_unicodecr_softbank(Jpmobile::Util.utf8(str))
22
- end
23
- # 数値参照を UTF-8 に変換
24
- Jpmobile::Emoticon.unicodecr_to_utf8(str)
25
- end
26
- def to_external(str, content_type, charset)
27
- # UTF-8を数値参照に
28
- str = Jpmobile::Emoticon.utf8_to_unicodecr(str)
29
- if unicode_emoticon?
30
- str = Jpmobile::Emoticon.unicodecr_to_external(str, Jpmobile::Emoticon::CONVERSION_TABLE_TO_UNICODE_EMOTICON, false)
31
- else
32
- # 数値参照を絵文字コードに変換
33
- str = Jpmobile::Emoticon.unicodecr_to_external(str, Jpmobile::Emoticon::CONVERSION_TABLE_TO_SOFTBANK, false)
34
- end
35
-
36
- [str, charset]
37
- end
38
-
39
- def unicode_emoticon?
40
- @request.user_agent.match(/ OS (\d)_/) and $1.to_i >= 5
41
- end
42
- end
43
- end
@@ -1,20 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- require File.join(File.expand_path(File.dirname(__FILE__)), '../../rack_helper.rb')
3
-
4
- describe Jpmobile::Rack::MobileCarrier, "Windows Phone" do
5
- include Rack::Test::Methods
6
-
7
- context "端末種別で" do
8
- it "BlackBerryを判別できること" do
9
- res = Rack::MockRequest.env_for(
10
- 'http://jpmobile-rails.org/',
11
- 'HTTP_USER_AGENT' => 'BlackBerry9000/4.6.0.224 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/220')
12
- env = Jpmobile::Rack::MobileCarrier.new(UnitApplication.new).call(res)[1]
13
-
14
- env['rack.jpmobile'].class.should == Jpmobile::Mobile::BlackBerry
15
- env['rack.jpmobile'].position.should be_nil
16
- env['rack.jpmobile'].smart_phone?.should be_true
17
- env['rack.jpmobile'].supports_cookie?.should be_true
18
- end
19
- end
20
- end
@@ -1,42 +0,0 @@
1
- Return-Path: <au@ezweb.ne.jp>
2
- Delivered-To: ogawa@jpmobile-info.co.jp
3
- Subject: =?iso-2022-jp?B?RndkOiAbJEIhWhsoQk51cnNlcnlNYWlsGyRCIVtGfEZ8GyhC?=
4
- From: au@ezweb.ne.jp
5
- Content-Type: multipart/alternative;
6
- boundary=Apple-Mail-453BF7C8-E087-4CEB-A163-18A4B0CBB56C
7
- Message-Id: <5C2DBDE0-7AE2-4BD2-B932-97B59EAFED85@ezweb.ne.jp>
8
- Date: Tue, 31 Jul 2012 10:44:23 +0900 (JST)
9
- To: test@jpmobile-info.org
10
- Content-Transfer-Encoding: 7bit
11
- MIME-Version: 1.0
12
-
13
- --Apple-Mail-453BF7C8-E087-4CEB-A163-18A4B0CBB56C
14
- Content-Transfer-Encoding: quoted-printable
15
- Content-Type: text/plain;
16
- charset=iso-2022-jp
17
-
18
-
19
-
20
- iPhone=1B$B$+$iAw?.=1B(B
21
-
22
- Begin forwarded message:
23
-
24
- > =1B$B$H$j$"$($:#H#T#M#L$NK\J8$G=1B(B
25
- > =1B$B$"$l$P$$$$2DG=3D@-$r9MN8$7$F$O=1B(B
26
- > =1B$B8+$?$,$d$O$j$Y!<$9$m$/$h$s!J>P!K$G=1B(B
27
- > =1B$B$"$l$P$$$$$h$&$J5$$,=1B(B
28
- > =1B$B$7$?$N$G%@%_!<$NJ8;zNs$r=1B(B
29
- > =1B$B9M$($F8+$kD+!#=1B(B=
30
-
31
- --Apple-Mail-453BF7C8-E087-4CEB-A163-18A4B0CBB56C
32
- Content-Transfer-Encoding: base64
33
- Content-Type: text/html;
34
- charset=utf-8
35
-
36
- 44Go44KK44GC44GI44Ga77yo77y077yt77ys44Gu5pys5paH44Gn44GC44KM
37
- 44Gw44GE44GE5Y+v6IO95oCn44KS6ICD5oWu44GX44Gm44Gv6KaL44Gf44GM
38
- 44KE44Gv44KK44G544O844GZ44KN44GP44KI44KT77yI56yR77yJ44Gn44GC
39
- 44KM44Gw44GE44GE44KI44GG44Gq5rCX44GM44GX44Gf44Gu44Gn44OA44Of
40
- 44O844Gu5paH5a2X5YiX44KS6ICD44GI44Gm6KaL44KL5pyd44CC
41
- --Apple-Mail-453BF7C8-E087-4CEB-A163-18A4B0CBB56C--
42
-
@@ -1,56 +0,0 @@
1
- X-Mozilla-Status: 0011
2
- X-Mozilla-Status2: 00000000
3
- X-Mozilla-Keys:
4
- Return-Path: <au@ezweb.ne.jp>
5
- Delivered-To: au@ezweb.ne.jp
6
- References: <503ef27994050_75cf4344bfe77fe@jpmobile.jp.mail>
7
- In-Reply-To: <503ef27994050_75cf4344bfe77fe@jpmobile.jp.mail>
8
- Mime-Version: 1.0 (1.0)
9
- Content-Transfer-Encoding: base64
10
- Content-Type: text/plain;
11
- charset=utf-8
12
- Message-Id: <6D015993-FD10-4EE9-8B60-A4588D554649@ezweb.ne.jp>
13
- X-Mailer: iPhone Mail (9B206)
14
- From: "au@ezweb.ne.jp" <au@ezweb.ne.jp>
15
- Subject: =?iso-2022-jp?B?UmU6IBskQiFaGyhCTktTQxskQiFbGyhCdGVzdA==?=
16
- Date: Thu, 30 Aug 2012 14:49:20 +0900
17
- To: "info@jpmobile.jp" <info@jpmobile.jp>
18
-
19
- DQoNCmlQaG9uZeOBi+OCiemAgeS/oeKXi+KXjg0KDQpPbiAyMDEyLzA4LzMw
20
- LCBhdCAxMzo1NiwgaW5mb0BqcG1vYmlsZS5qcCB3cm90ZToNCg0KPiDmnKzm
21
- lofmlLnooYzjgarjgZfvvL/vvJXvvJHvvJLmloflrZfvvL/jgYLjgYLjgYLj
22
- gYLjgYLjgYLjgYLjgYLjgYLjgYLjgYLjgYLjgYLjgYLjgYLjgYLjgYLjgYLj
23
- gYLjgYLjgYLjgYLjgYLjgYLjgYLjgYLjgYLjgYLjgYLjgYLjgYLjgYLjgYLj
24
- gYLjgY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DF_0.jpjp.jp,S=1186.000031434a023554
3
- X-Mozilla-Status: 0001
4
- X-Mozilla-Status2: 00000000
5
- X-Mozilla-Keys:
6
- Return-Path: <au@ezweb.ne.jp>
7
- Delivered-To: ogawa@jpmobile.jp
8
- Received: (qmail 8893 invoked by SAV 20120821.022 by uid 0); 22 Aug 2012 10:27:26 +0900
9
- Received: from unknown (HELO mmsmta08.ezweb.ne.jp) (59.135.39.241)
10
- by dc6.etius.jp (124.146.201.109) with ESMTPS (DHE-RSA-AES256-SHA encrypted); 22 Aug 2012 10:27:26 +0900
11
- Received-SPF: pass (dc6.etius.jp: SPF record at spf-nm.ezweb.ne.jp designates 59.135.39.241 as permitted sender)
12
- Received: from cm (pl0_4-mms [172.22.116.39])
13
- by mmsmta08.ezweb.ne.jp (Sentrion-MTA-4.1.0/Switch-3.3.4) with SMTP id q7M1RQgt001822
14
- for <info@jpmobile.jp>; Wed, 22 Aug 2012 10:27:26 +0900
15
- From:au@ezweb.ne.jp
16
- To:ogawa@jpmobile.jp
17
- Subject:=?UTF-8?B?aVBob25lIGF1IOODoeODg+OCu+ODvOOCuA==?=
18
- Message-ID: <212212358846052174@-212212358846052175>
19
- Date: Tue, 22 Aug 2012 01:27:26 +0000
20
- MIME-Version:1.0
21
- Content-Type: text/plain; charset=utf-8
22
- Content-Transfer-Encoding: base64
23
-
24
- JVvlnJLlhZDlkI1dJeOBriVb5L+d6K236ICF5ZCNXSUg5qeYCgrmlr3oqK3jgavpgIHkv6HjgIIK
25
- 6YG45oqeMeOBryVb44Ki44OJ44Os44K5MV0l44G4CumBuOaKnjLjga8lW+OCouODieODrOOCuTJd
26
- JeOBuArov5Tkv6HjgZfjgabkuIvjgZXjgYTjgIIKCmlQaG9uZSBhdSDjg6Hjg4Pjgrvjg7zjgrg=
27
-
@@ -1,34 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- require File.expand_path(File.join(File.dirname(__FILE__), '../spec_helper'))
3
-
4
- describe Jpmobile::Mobile::Iphone do
5
- describe 'iOS 4.0' do
6
- it "unicode_emoticon? should be false" do
7
- request = double('request')
8
- request.stub(:user_agent) {'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_4 like Mac OS X; ja-jp) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8K2 Safari/6533.18.5'}
9
-
10
- mobile = Jpmobile::Mobile::Iphone.new({}, request)
11
- mobile.unicode_emoticon?.should be_false
12
- end
13
- end
14
-
15
- describe 'iOS 5.0' do
16
- it "unicode_emoticon? should be true" do
17
- request = double('request')
18
- request.stub(:user_agent) {'Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3'}
19
-
20
- mobile = Jpmobile::Mobile::Iphone.new({}, request)
21
- mobile.unicode_emoticon?.should be_true
22
- end
23
- end
24
-
25
- describe 'iOS 6.0' do
26
- it "unicode_emoticon? should be true" do
27
- request = double('request')
28
- request.stub(:user_agent) {'Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A403 Safari/8536.25'}
29
-
30
- mobile = Jpmobile::Mobile::Iphone.new({}, request)
31
- mobile.unicode_emoticon?.should be_true
32
- end
33
- end
34
- end
@@ -1,128 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))
3
- require 'mail'
4
- require 'jpmobile/mail'
5
-
6
- describe Jpmobile::Mobile::AbstractMobile do
7
- subject{ Jpmobile::Mobile::AbstractMobile.new(nil, nil) }
8
-
9
- describe '#variants' do
10
- its(:variants){ should === ['mobile'] }
11
- end
12
-
13
- describe '#mail_variants' do
14
- its(:mail_variants){ should == [] }
15
- end
16
- end
17
-
18
- describe Jpmobile::Mobile::Docomo do
19
- subject{ Jpmobile::Mobile::Docomo.new(nil, nil) }
20
-
21
- describe '#variants' do
22
- its(:variants){ should == ['mobile_docomo', 'mobile'] }
23
- end
24
-
25
- describe '#mail_variants' do
26
- it 'have same value as #variants' do
27
- subject.mail_variants == subject.variants
28
- end
29
- end
30
- end
31
-
32
- describe Jpmobile::Mobile::Au do
33
- subject{ Jpmobile::Mobile::Au.new(nil, nil) }
34
-
35
- describe '#variants' do
36
- its(:variants){ should == ['mobile_au', 'mobile'] }
37
- end
38
-
39
- describe '#mail_variants' do
40
- it 'have same value as #variants' do
41
- subject.mail_variants == subject.variants
42
- end
43
- end
44
- end
45
-
46
- describe Jpmobile::Mobile::Softbank do
47
- subject{ Jpmobile::Mobile::Softbank.new(nil, nil) }
48
-
49
- describe '#variants' do
50
- its(:variants){ should == ['mobile_softbank', 'mobile'] }
51
- end
52
-
53
- describe '#mail_variants' do
54
- it 'have same value as #variants' do
55
- subject.mail_variants == subject.variants
56
- end
57
- end
58
- end
59
-
60
- describe Jpmobile::Mobile::Android do
61
- subject{ Jpmobile::Mobile::Android.new(nil, nil) }
62
-
63
- describe '#variants' do
64
- its(:variants){ should == ['smart_phone_android', 'smart_phone'] }
65
- end
66
-
67
- describe '#mail_variants' do
68
- it 'have same value as #variants' do
69
- subject.mail_variants == subject.variants
70
- end
71
- end
72
- end
73
-
74
- describe Jpmobile::Mobile::AndroidTablet do
75
- subject{ Jpmobile::Mobile::AndroidTablet.new(nil, nil) }
76
-
77
- describe '#variants' do
78
- its(:variants){ should == ['tablet_android_tablet', 'tablet', 'smart_phone'] }
79
- end
80
-
81
- describe '#mail_variants' do
82
- it 'have same value as #variants' do
83
- subject.mail_variants == subject.variants
84
- end
85
- end
86
- end
87
-
88
- describe Jpmobile::Mobile::Iphone do
89
- subject{ Jpmobile::Mobile::Iphone.new(nil, nil) }
90
-
91
- describe '#variants' do
92
- its(:variants) { should == ['smart_phone_iphone', 'smart_phone'] }
93
- end
94
-
95
- describe '#mail_variants' do
96
- it 'have same value as #variants' do
97
- subject.mail_variants == subject.variants
98
- end
99
- end
100
- end
101
-
102
- describe Jpmobile::Mobile::Ipad do
103
- subject{ Jpmobile::Mobile::Ipad.new(nil, nil) }
104
-
105
- describe '#variants' do
106
- its(:variants){ should == ['tablet_ipad', 'tablet', 'smart_phone'] }
107
- end
108
-
109
- describe '#mail_variants' do
110
- it 'have same value as #variants' do
111
- subject.mail_variants == subject.variants
112
- end
113
- end
114
- end
115
-
116
- describe Jpmobile::Mobile::WindowsPhone do
117
- subject{ Jpmobile::Mobile::WindowsPhone.new(nil, nil) }
118
-
119
- describe '#variants' do
120
- its(:variants){ should == ['smart_phone_windows_phone', 'smart_phone'] }
121
- end
122
-
123
- describe '#mail_variants' do
124
- it 'have same value as #variants' do
125
- subject.mail_variants == subject.variants
126
- end
127
- end
128
- end