jpmobile 3.0.9 → 4.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.
- checksums.yaml +4 -4
- data/.gitignore +19 -0
- data/Gemfile +3 -11
- data/MIT-LICENSE +1 -1
- data/README.rdoc +7 -8
- data/Rakefile +1 -43
- data/VERSION.yml +1 -1
- data/jpmobile.gemspec +22 -38
- data/lib/jpmobile.rb +3 -1
- data/lib/jpmobile/configuration.rb +19 -0
- data/lib/jpmobile/emoticon/z_combine.rb +0 -4
- data/lib/jpmobile/hook_action_controller.rb +27 -0
- data/lib/jpmobile/mail.rb +56 -77
- data/lib/jpmobile/mailer.rb +1 -0
- data/lib/jpmobile/rack.rb +0 -16
- data/lib/jpmobile/resolver.rb +1 -1
- data/lib/jpmobile/util.rb +35 -128
- data/lib/jpmobile/version.rb +3 -0
- data/lib/tasks/jpmobile_tasks.rake +2 -2
- data/spec/unit/receive_mail_spec.rb +3 -28
- data/spec/unit/util_spec.rb +12 -23
- data/test/rails/overrides/Gemfile +46 -5
- data/test/rails/overrides/app/controllers/mobile_spec_controller.rb +3 -0
- data/test/rails/overrides/app/models/user.rb +0 -1
- data/test/rails/overrides/app/views/layouts/application.html.erb +12 -0
- data/test/rails/overrides/app/views/layouts/application_mobile.html.erb +1 -1
- data/test/rails/overrides/app/views/mobile_mailer/default_to_mail.text.erb +1 -0
- data/test/rails/overrides/app/views/mobile_spec/_partial_view_sample.html.erb +1 -0
- data/test/rails/overrides/app/views/mobile_spec/no_mobile.html.erb +3 -0
- data/test/rails/overrides/config/routes.rb +2 -2
- data/test/rails/overrides/spec/controllers/mobile_spec_controller_spec.rb +36 -2
- data/test/rails/overrides/spec/mailers/mobile_mailer_spec.rb +4 -5
- metadata +194 -142
- data/spec/unit/email-fixtures/iphone-jis.eml +0 -15
- data/spec/unit/email-fixtures/pc-mail-attached-without-subject.eml +0 -45
| @@ -1,15 +0,0 @@ | |
| 1 | 
            -
            Delivered-To: info@jpmobile.jp
         | 
| 2 | 
            -
            From: "jis@i.softbank.jp" <jis@i.softbank.jp>
         | 
| 3 | 
            -
            Content-Type: text/plain;
         | 
| 4 | 
            -
            	charset=iso-2022-jp
         | 
| 5 | 
            -
            X-Mailer: iPhone Mail (12B435)
         | 
| 6 | 
            -
            Message-Id: <F574F824-7263-44E6-8423-000000000000@i.softbank.jp>
         | 
| 7 | 
            -
            Date: Fri, 5 Dec 2014 13:14:37 +0900
         | 
| 8 | 
            -
            To: "info@jpmobile.jp" <info@jpmobile.jp>
         | 
| 9 | 
            -
            Content-Transfer-Encoding: 7bit
         | 
| 10 | 
            -
            Mime-Version: 1.0 (1.0)
         | 
| 11 | 
            -
            X-SB-Service: Virus-Checked
         | 
| 12 | 
            -
             | 
| 13 | 
            -
            (=(I_$B&X(I_(B)(II(B
         | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| @@ -1,45 +0,0 @@ | |
| 1 | 
            -
            X-Account-Key: account2
         | 
| 2 | 
            -
            X-UIDL: UID44724-1271041990
         | 
| 3 | 
            -
            X-Mozilla-Status: 0001
         | 
| 4 | 
            -
            X-Mozilla-Status2: 10000000
         | 
| 5 | 
            -
            X-Mozilla-Keys:                                                                                 
         | 
| 6 | 
            -
            Return-Path: <info@jp.mobile>
         | 
| 7 | 
            -
            X-Original-To: info+to@jp.mobile
         | 
| 8 | 
            -
            Delivered-To: info+to@jp.mobile
         | 
| 9 | 
            -
            Received: from localhost (localhost [127.0.0.1])
         | 
| 10 | 
            -
            	by mx1.jp.mobile (Postfix) with ESMTP id 916D982D3C
         | 
| 11 | 
            -
            	for <info+to@jp.mobile>; Mon, 17 Jan 2011 16:43:00 +0900 (JST)
         | 
| 12 | 
            -
            Received: from mx1.jp.mobile ([127.0.0.1])
         | 
| 13 | 
            -
            	by localhost (mx1.jp.mobile [127.0.0.1]) (amavisd-new, port 10024)
         | 
| 14 | 
            -
            	with ESMTP id 4c+D+lqN6aOJ for <info+to@jp.mobile>;
         | 
| 15 | 
            -
            	Mon, 17 Jan 2011 16:43:00 +0900 (JST)
         | 
| 16 | 
            -
            Received: by mx1.jp.mobile (Postfix, from userid 58)
         | 
| 17 | 
            -
            	id 68BFD82D33; Mon, 17 Jan 2011 16:43:00 +0900 (JST)
         | 
| 18 | 
            -
            Message-ID: <4D33F300.8050702@jpmobile.jp>
         | 
| 19 | 
            -
            Date: Mon, 17 Jan 2011 16:42:56 +0900
         | 
| 20 | 
            -
            From: Shin-ichiro OGAWA <info@jpmobile.jp>
         | 
| 21 | 
            -
            User-Agent: Mozilla-Thunderbird 2.0.0.24 (X11/20100329)
         | 
| 22 | 
            -
            MIME-Version: 1.0
         | 
| 23 | 
            -
            To: info+to@jp.mobile
         | 
| 24 | 
            -
            Subject:
         | 
| 25 | 
            -
            Content-Type: multipart/mixed;
         | 
| 26 | 
            -
             boundary="------------010605060509040104050402"
         | 
| 27 | 
            -
             | 
| 28 | 
            -
            This is a multi-part message in MIME format.
         | 
| 29 | 
            -
            --------------010605060509040104050402
         | 
| 30 | 
            -
            Content-Type: text/plain; charset=ISO-2022-JP
         | 
| 31 | 
            -
            Content-Transfer-Encoding: 7bit
         | 
| 32 | 
            -
             | 
| 33 | 
            -
            $BK\J8$G$9(B
         | 
| 34 | 
            -
             | 
| 35 | 
            -
             | 
| 36 | 
            -
            --------------010605060509040104050402
         | 
| 37 | 
            -
            Content-Transfer-Encoding: base64
         | 
| 38 | 
            -
            Content-Type: image/gif;
         | 
| 39 | 
            -
             name="Transparent.gif"
         | 
| 40 | 
            -
            Content-Disposition: attachment;
         | 
| 41 | 
            -
             filename="Transparent.gif"
         | 
| 42 | 
            -
             | 
| 43 | 
            -
            R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
         | 
| 44 | 
            -
            --------------010605060509040104050402--
         | 
| 45 | 
            -
             |