mail-jdec 1.0.7 → 1.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 771926a9ac210b89bde65b6a6081baa75cfe1cc18ef51a7e549615c2760be0bb
4
- data.tar.gz: 21bf2742a6b42daeb24da45d7a60a2eb09e6f7ce278ebd4b38d7203f8d97b1e2
3
+ metadata.gz: fe56489a85031c3cbc6d898b9c35a132bc3a01683d7f2682b582727bf2318706
4
+ data.tar.gz: a7825201050257f08d640ad8a267bb66b31a87cef3068d6ea4936a741de27b17
5
5
  SHA512:
6
- metadata.gz: 9e6e9f45f57696da4535d8cff239de15b7a4e2b907043595165e2176392c4ae6b57d650e9759157601a414c17e0142fc3cb2628a7c08713515c9e37a0d15b937
7
- data.tar.gz: 7a150a01169bc9f17e784a22bb0978ebdb3c61d02f7c6155dd252ebe97b271fbe2f9a9817e31fd9a450f7b287a20b85445b3485a0e84baa208e6843e793df206
6
+ metadata.gz: 3029fcabe732faa31f6eabf0dce16fd3fbeda58ad8d9dba875bddf3263163ae91ac147c38d8c76fdbdc56850a86634e8446b8385463d3de80a298acc230724f6
7
+ data.tar.gz: f8d774c612e83d0adc375f4ff81bcc57a50b9c399c4b849a6e0383704110a99d9905023de07092861441c2115ea63b48dc7576c4883feedcaa7983f3ea4e392b
@@ -0,0 +1,27 @@
1
+ name: CI
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ubuntu-20.04
8
+ strategy:
9
+ fail-fast: false
10
+ matrix:
11
+ ruby: [2.3, 2.4, 2.5, 2.6, 2.7, '3.0', 3.1]
12
+ gemfile: ['mail27']
13
+
14
+ name: ruby ${{ matrix.ruby }}, ${{ matrix.gemfile }}
15
+
16
+ env:
17
+ BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
18
+
19
+ steps:
20
+ - uses: actions/checkout@v2
21
+ - uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: ${{ matrix.ruby }}
24
+ bundler-cache: true
25
+ - name: Run test
26
+ run: |
27
+ bundle exec rspec
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.0.10
4
+
5
+ * Fix mail version to < 2.8.0.
6
+
7
+ ## 1.0.9
8
+
9
+ * Strip only null bytes.
10
+
11
+ ## 1.0.8
12
+
13
+ * Prefer utf-8 to us-ascii for header's charset.
14
+
3
15
  ## 1.0.7
4
16
 
5
17
  * Force us-ascii when header's charset is not detected.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Mail::Jdec
2
2
 
3
- A mail patch for decoding some inproper mails.
3
+ A mail patch for decoding some improper mails.
4
4
 
5
5
  ## Dependencies
6
6
 
@@ -1,5 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem "mail", "~> 2.7.1"
4
+ gem "net-smtp"
4
5
 
5
6
  gemspec path: "../"
@@ -11,7 +11,7 @@ module Mail
11
11
  charset = detected[:encoding].to_s
12
12
  text = Mail::Encodings.transcode_charset(text.dup.force_encoding(charset), charset, 'utf-8')
13
13
  else
14
- text = Mail::Encodings.transcode_charset(text, text.encoding, 'us-ascii')
14
+ text = Mail::Encodings.transcode_charset(text, text.encoding, 'utf-8')
15
15
  end
16
16
 
17
17
  text
@@ -20,7 +20,10 @@ module Mail
20
20
  else
21
21
  str = super
22
22
  end
23
- str.strip! if to_encoding.to_s.downcase == 'utf-8'
23
+ if to_encoding.to_s.downcase == 'utf-8'
24
+ str.gsub!(/^\x00+/, '')
25
+ str.gsub!(/\x00+$/, '')
26
+ end
24
27
  str
25
28
  else
26
29
  super
@@ -1,5 +1,5 @@
1
1
  module Mail
2
2
  module Jdec
3
- VERSION = '1.0.7'
3
+ VERSION = '1.0.10'
4
4
  end
5
5
  end
data/mail-jdec.gemspec CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.version = Mail::Jdec::VERSION
9
9
  spec.authors = ["Yoshikazu Kaneta"]
10
10
  spec.email = ["kaneta@sitebridge.co.jp"]
11
- spec.summary = %q{A mail patch for decoding some inproper mails}
12
- spec.description = %q{A mail patch for decoding some inproper mails}
11
+ spec.summary = %q{A mail patch for decoding some improper mails}
12
+ spec.description = %q{A mail patch for decoding some improper mails}
13
13
  spec.homepage = "https://github.com/kanety/mail-jdec"
14
14
 
15
15
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
18
18
  spec.require_paths = ["lib"]
19
19
 
20
- spec.add_dependency "mail", ">= 2.7.1"
20
+ spec.add_dependency "mail", ">= 2.7.1", "< 2.8.0"
21
21
  spec.add_dependency "charlock_holmes", ">= 0.7.0"
22
22
 
23
23
  spec.add_development_dependency "rake"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mail-jdec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshikazu Kaneta
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-10 00:00:00.000000000 Z
11
+ date: 2022-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mail
@@ -17,6 +17,9 @@ dependencies:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 2.7.1
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 2.8.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -24,6 +27,9 @@ dependencies:
24
27
  - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: 2.7.1
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 2.8.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: charlock_holmes
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -80,16 +86,16 @@ dependencies:
80
86
  - - ">="
81
87
  - !ruby/object:Gem::Version
82
88
  version: '0'
83
- description: A mail patch for decoding some inproper mails
89
+ description: A mail patch for decoding some improper mails
84
90
  email:
85
91
  - kaneta@sitebridge.co.jp
86
92
  executables: []
87
93
  extensions: []
88
94
  extra_rdoc_files: []
89
95
  files:
96
+ - ".github/workflows/ci.yml"
90
97
  - ".gitignore"
91
98
  - ".rspec"
92
- - ".travis.yml"
93
99
  - CHANGELOG.md
94
100
  - Gemfile
95
101
  - LICENSE
@@ -133,8 +139,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
139
  - !ruby/object:Gem::Version
134
140
  version: '0'
135
141
  requirements: []
136
- rubygems_version: 3.0.3
142
+ rubygems_version: 3.1.2
137
143
  signing_key:
138
144
  specification_version: 4
139
- summary: A mail patch for decoding some inproper mails
145
+ summary: A mail patch for decoding some improper mails
140
146
  test_files: []
data/.travis.yml DELETED
@@ -1,10 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.3
4
- - 2.4
5
- - 2.5
6
- - 2.6
7
- gemfile:
8
- - gemfiles/mail27.gemfile
9
- script:
10
- - bundle exec rspec