jpmobile 5.0.0.beta2 → 5.0.0.beta3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/jpmobile.gemspec +1 -1
- data/lib/jpmobile/mail.rb +4 -4
- data/lib/jpmobile/util.rb +1 -1
- data/lib/jpmobile/version.rb +1 -1
- data/lib/tasks/jpmobile_tasks.rake +1 -1
- data/spec/unit/receive_mail_spec.rb +2 -2
- data/test/rails/overrides/Gemfile.jpmobile +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d16f43b79310f9b5517146eefb69eb42305013f8
|
4
|
+
data.tar.gz: 033e12681c8c71b102d01ba430f355a0b2e688bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21c798c9f5d1aac125ad3776304e228f26b52864c1d5f8451914c119abc2e957f4e967d5f5ae63ec24ef9274cb63a4e7284926bfaaa3569603f6ce765f613608
|
7
|
+
data.tar.gz: a95f420130b509c52e11dfbc920c0215d57bd1a9e3be0d85beb699fb973e2c591809c263c28847b6aef4e96130bb07f6ed508b20a843d8389796f4407a7f4df5
|
data/jpmobile.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
17
17
|
gem.require_paths = ["lib"]
|
18
18
|
|
19
|
-
gem.add_development_dependency 'rails', '5.0.0.
|
19
|
+
gem.add_development_dependency 'rails', '5.0.0.beta4'
|
20
20
|
gem.add_development_dependency 'rspec'
|
21
21
|
gem.add_development_dependency 'rspec-rails'
|
22
22
|
gem.add_development_dependency 'rspec-its'
|
data/lib/jpmobile/mail.rb
CHANGED
@@ -110,7 +110,7 @@ module Mail
|
|
110
110
|
|
111
111
|
# In jpmobile, value is already transfered correctly encodings.
|
112
112
|
def raw_source=(value)
|
113
|
-
@raw_source =
|
113
|
+
@raw_source = ::Mail::Utilities.to_crlf(value)
|
114
114
|
end
|
115
115
|
|
116
116
|
def separate_parts_with_jpmobile
|
@@ -237,7 +237,7 @@ module Mail
|
|
237
237
|
# override charset
|
238
238
|
if self.header[:content_type]
|
239
239
|
@charset = header[:content_type].parameters[:charset] || ''
|
240
|
-
unless @charset.
|
240
|
+
unless @charset.empty?
|
241
241
|
@mobile_main_type = self.header[:content_type].main_type
|
242
242
|
end
|
243
243
|
end
|
@@ -248,7 +248,7 @@ module Mail
|
|
248
248
|
header[:subject].value = header[:subject].decoded
|
249
249
|
end
|
250
250
|
|
251
|
-
if @body_part_jpmobile and @mobile and !@charset.
|
251
|
+
if @body_part_jpmobile and @mobile and !@charset.empty?
|
252
252
|
if ["base64", "quoted-printable"].include?(self.content_transfer_encoding) and
|
253
253
|
self.content_type.match(/text/)
|
254
254
|
@body_part_jpmobile = Jpmobile::Util.decode(@body_part_jpmobile, self.content_transfer_encoding, @charset)
|
@@ -299,7 +299,7 @@ module Mail
|
|
299
299
|
attr_accessor :mobile, :content_type_with_jpmobile
|
300
300
|
|
301
301
|
def raw_source_with_jpmobile
|
302
|
-
|
302
|
+
::Mail::Utilities.to_crlf(raw_source_without_jpmobile)
|
303
303
|
end
|
304
304
|
|
305
305
|
# convert encoding
|
data/lib/jpmobile/util.rb
CHANGED
@@ -336,7 +336,7 @@ module Jpmobile
|
|
336
336
|
end
|
337
337
|
|
338
338
|
_extract_charset = Jpmobile::Util.extract_charset(_str)
|
339
|
-
charset = _extract_charset unless _extract_charset.
|
339
|
+
charset = _extract_charset unless _extract_charset.empty? or _extract_charset == charset
|
340
340
|
Jpmobile::Util.set_encoding(_str, charset)
|
341
341
|
end
|
342
342
|
end
|
data/lib/jpmobile/version.rb
CHANGED
@@ -36,7 +36,7 @@ namespace :test do
|
|
36
36
|
FileUtils.rm_rf("Gemfile.lock")
|
37
37
|
FileUtils.rm_rf(rails_root)
|
38
38
|
FileUtils.mkdir_p(rails_root)
|
39
|
-
`rails _5.0.0.
|
39
|
+
`rails _5.0.0.beta4_ new #{rails_root} --skip-bundle`
|
40
40
|
end
|
41
41
|
|
42
42
|
# setup jpmobile
|
@@ -384,11 +384,11 @@ describe "Jpmobile::Mail#receive" do
|
|
384
384
|
end
|
385
385
|
|
386
386
|
it "subject should be parsed correctly" do
|
387
|
-
expect(@mail.subject).to
|
387
|
+
expect(@mail.subject).to be_nil
|
388
388
|
end
|
389
389
|
|
390
390
|
it "body should be parsed correctly" do
|
391
|
-
expect(@mail.body.to_s).to
|
391
|
+
expect(@mail.body.to_s).to be_empty
|
392
392
|
end
|
393
393
|
end
|
394
394
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jpmobile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.0.
|
4
|
+
version: 5.0.0.beta3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shin-ichiro OGAWA
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-04-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - '='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 5.0.0.
|
20
|
+
version: 5.0.0.beta4
|
21
21
|
type: :development
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - '='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 5.0.0.
|
27
|
+
version: 5.0.0.beta4
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rspec
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|