Compare commits
11 Commits
341be8704a
...
75504fc340
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
75504fc340 | ||
|
|
d06e1135c1 | ||
|
|
8b5b14930c | ||
|
|
d0d5c10850 | ||
|
|
ff7802058c | ||
|
|
a7f7095b81 | ||
|
|
9329b9409f | ||
|
|
0e00a678fe | ||
|
|
6e68f6676d | ||
|
|
322c741205 | ||
|
|
06286950d4 |
BIN
2.6.4.tar.gz
BIN
2.6.4.tar.gz
Binary file not shown.
@ -1,59 +0,0 @@
|
|||||||
From e8fde9cf1d77ee7e465c12e809501df8d27e8451 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Koichi ITO <koic.ito@gmail.com>
|
|
||||||
Date: Sun, 4 Dec 2016 12:33:06 +0800
|
|
||||||
Subject: [PATCH] Fix deprecated warnings in Ruby 2.4.0+
|
|
||||||
|
|
||||||
---
|
|
||||||
lib/mail/attachments_list.rb | 2 +-
|
|
||||||
lib/mail/multibyte/chars.rb | 4 ++--
|
|
||||||
lib/mail/network/retriever_methods/test_retriever.rb | 2 +-
|
|
||||||
3 files changed, 4 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/mail/attachments_list.rb b/lib/mail/attachments_list.rb
|
|
||||||
index bb34a85..14fe31c 100644
|
|
||||||
--- a/lib/mail/attachments_list.rb
|
|
||||||
+++ b/lib/mail/attachments_list.rb
|
|
||||||
@@ -30,7 +30,7 @@ module Mail
|
|
||||||
# mail.attachments['test.png'].filename #=> 'test.png'
|
|
||||||
# mail.attachments[1].filename #=> 'test.jpg'
|
|
||||||
def [](index_value)
|
|
||||||
- if index_value.is_a?(Fixnum)
|
|
||||||
+ if index_value.is_a?(Integer)
|
|
||||||
self.fetch(index_value)
|
|
||||||
else
|
|
||||||
self.select { |a| a.filename == index_value }.first
|
|
||||||
diff --git a/lib/mail/multibyte/chars.rb b/lib/mail/multibyte/chars.rb
|
|
||||||
index bb39897..2e431ca 100644
|
|
||||||
--- a/lib/mail/multibyte/chars.rb
|
|
||||||
+++ b/lib/mail/multibyte/chars.rb
|
|
||||||
@@ -269,12 +269,12 @@ module Mail #:nodoc:
|
|
||||||
@wrapped_string[*args] = replace_by
|
|
||||||
else
|
|
||||||
result = Unicode.u_unpack(@wrapped_string)
|
|
||||||
- if args[0].is_a?(Fixnum)
|
|
||||||
+ if args[0].is_a?(Integer)
|
|
||||||
raise IndexError, "index #{args[0]} out of string" if args[0] >= result.length
|
|
||||||
min = args[0]
|
|
||||||
max = args[1].nil? ? min : (min + args[1] - 1)
|
|
||||||
range = Range.new(min, max)
|
|
||||||
- replace_by = [replace_by].pack('U') if replace_by.is_a?(Fixnum)
|
|
||||||
+ replace_by = [replace_by].pack('U') if replace_by.is_a?(Integer)
|
|
||||||
elsif args.first.is_a?(Range)
|
|
||||||
raise RangeError, "#{args[0]} out of range" if args[0].min >= result.length
|
|
||||||
range = args[0]
|
|
||||||
diff --git a/lib/mail/network/retriever_methods/test_retriever.rb b/lib/mail/network/retriever_methods/test_retriever.rb
|
|
||||||
index 9bb3e1a..dfbc909 100644
|
|
||||||
--- a/lib/mail/network/retriever_methods/test_retriever.rb
|
|
||||||
+++ b/lib/mail/network/retriever_methods/test_retriever.rb
|
|
||||||
@@ -25,7 +25,7 @@ module Mail
|
|
||||||
emails_index.reverse! if options[:what] == :last
|
|
||||||
emails_index = case count = options[:count]
|
|
||||||
when :all then emails_index
|
|
||||||
- when Fixnum then emails_index[0, count]
|
|
||||||
+ when Integer then emails_index[0, count]
|
|
||||||
else
|
|
||||||
raise 'Invalid count option value: ' + count.inspect
|
|
||||||
end
|
|
||||||
--
|
|
||||||
2.11.0
|
|
||||||
|
|
||||||
@ -1,38 +0,0 @@
|
|||||||
From 48cb6db25b31eebe7bdd330d812c52d3c93aa328 Mon Sep 17 00:00:00 2001
|
|
||||||
From: "yuuji.yaginuma" <yuuji.yaginuma@gmail.com>
|
|
||||||
Date: Tue, 13 Dec 2016 07:50:42 +0900
|
|
||||||
Subject: [PATCH] fix new warning in ruby 2.4
|
|
||||||
|
|
||||||
This fixes the following warning.
|
|
||||||
|
|
||||||
```
|
|
||||||
/home/travis/build/mikel/mail/lib/mail/fields/common/address_container.rb:11: warning: parentheses after method name is interpreted as
|
|
||||||
/home/travis/build/mikel/mail/lib/mail/fields/common/address_container.rb:11: warning: an argument list, not a decomposed argument
|
|
||||||
```
|
|
||||||
|
|
||||||
Ref: https://github.com/ruby/ruby/commit/65e27c8b138d6959608658ffce2fa761842b8d24
|
|
||||||
---
|
|
||||||
lib/mail/fields/common/address_container.rb | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/mail/fields/common/address_container.rb b/lib/mail/fields/common/address_container.rb
|
|
||||||
index f4a5aec..48c1286 100644
|
|
||||||
--- a/lib/mail/fields/common/address_container.rb
|
|
||||||
+++ b/lib/mail/fields/common/address_container.rb
|
|
||||||
@@ -8,10 +8,10 @@ module Mail
|
|
||||||
super(list)
|
|
||||||
end
|
|
||||||
|
|
||||||
- def << (address)
|
|
||||||
+ def <<(address)
|
|
||||||
@field << address
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
-end
|
|
||||||
\ No newline at end of file
|
|
||||||
+end
|
|
||||||
--
|
|
||||||
2.11.0
|
|
||||||
|
|
||||||
BIN
mail-2.6.4.gem
BIN
mail-2.6.4.gem
Binary file not shown.
BIN
mail-2.8.1.gem
Normal file
BIN
mail-2.8.1.gem
Normal file
Binary file not shown.
BIN
mail-2.8.1.tar.gz
Normal file
BIN
mail-2.8.1.tar.gz
Normal file
Binary file not shown.
@ -1,51 +1,64 @@
|
|||||||
|
%global pkg_name %{name}
|
||||||
|
|
||||||
%global gem_name mail
|
%global gem_name mail
|
||||||
|
|
||||||
Name: rubygem-%{gem_name}
|
Name: rubygem-%{gem_name}
|
||||||
Version: 2.6.4
|
Version: 2.8.1
|
||||||
Release: 1
|
Release: 1
|
||||||
Summary: Mail provides a nice Ruby DSL for making, sending and reading emails
|
Summary: Mail provides a nice Ruby DSL for making, sending and reading emails
|
||||||
|
Group: Development/Languages
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/mikel/mail
|
URL: https://github.com/mikel/mail
|
||||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||||
Source1: https://github.com/mikel/mail/archive/%{version}.tar.gz
|
Source1: https://github.com/mikel/%{gem_name}/archive/refs/tags/%{gem_name}-%{version}.tar.gz
|
||||||
# Fix Ruby 2.4 compatibility.
|
|
||||||
# https://github.com/mikel/mail/commit/e8fde9cf1d77ee7e465c12e809501df8d27e8451
|
# start specfile generated dependencies
|
||||||
Patch0: mail-2.6.4-Fix-deprecated-warnings-in-Ruby-2.4.0.patch
|
Requires: ruby(release)
|
||||||
# https://github.com/mikel/mail/commit/48cb6db25b31eebe7bdd330d812c52d3c93aa328
|
Requires: ruby
|
||||||
Patch1: mail-2.6.4-fix-new-warning-in-ruby-2.4.patch
|
Requires: ruby(rubygems)
|
||||||
BuildRequires: ruby(release) rubygems-devel ruby rubygem(mime-types) >= 1.16 rubygem(rspec)
|
Requires: rubygem(mini_mime) >= 0.1.1
|
||||||
|
BuildRequires: ruby(release)
|
||||||
|
BuildRequires: ruby
|
||||||
|
BuildRequires: rubygems-devel
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
Provides: rubygem(%{gem_name}) = %{version}
|
||||||
|
# end specfile generated dependencies
|
||||||
|
|
||||||
|
Obsoletes: tfm-ror52-rubygem-%{gem_name} <= 2.7.0
|
||||||
|
|
||||||
%description
|
%description
|
||||||
A really Ruby Mail handler.
|
A really Ruby Mail handler.
|
||||||
|
|
||||||
|
|
||||||
%package doc
|
%package doc
|
||||||
Summary: Documentation for %{name}
|
Summary: Documentation for %{pkg_name}
|
||||||
Requires: %{name} = %{version}-%{release}
|
Group: Documentation
|
||||||
|
Requires: %{pkg_name} = %{version}-%{release}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description doc
|
%description doc
|
||||||
Documentation for %{name}.
|
Documentation for %{pkg_name}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -c -T
|
gem unpack %{SOURCE0}
|
||||||
ln -s %{gem_name}-%{version}/spec spec
|
|
||||||
%gem_install -n %{SOURCE0}
|
%setup -q -D -T -n %{gem_name}-%{version}
|
||||||
pushd .%{gem_instdir}
|
|
||||||
%patch0 -p1
|
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
||||||
%patch1 -p1
|
|
||||||
popd
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
# Create the gem as gem install only works on a gem file
|
||||||
|
gem build %{gem_name}.gemspec
|
||||||
|
|
||||||
|
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
|
||||||
|
# by default, so that we can move it into the buildroot in %%install
|
||||||
|
%gem_install
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p %{buildroot}%{gem_dir}
|
mkdir -p %{buildroot}%{gem_dir}
|
||||||
cp -a .%{gem_dir}/* \
|
cp -a .%{gem_dir}/* \
|
||||||
%{buildroot}%{gem_dir}/
|
%{buildroot}%{gem_dir}/
|
||||||
|
|
||||||
%check
|
|
||||||
pushd .%{gem_instdir}
|
|
||||||
tar xzvf %{SOURCE1}
|
|
||||||
rspec spec
|
|
||||||
popd
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%dir %{gem_instdir}
|
%dir %{gem_instdir}
|
||||||
%license %{gem_instdir}/MIT-LICENSE
|
%license %{gem_instdir}/MIT-LICENSE
|
||||||
@ -55,14 +68,20 @@ popd
|
|||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%doc %{gem_docdir}
|
%doc %{gem_docdir}
|
||||||
%doc %{gem_instdir}/CHANGELOG.rdoc
|
|
||||||
%doc %{gem_instdir}/CONTRIBUTING.md
|
|
||||||
%doc %{gem_instdir}/Dependencies.txt
|
|
||||||
%{gem_instdir}/Gemfile*
|
|
||||||
%doc %{gem_instdir}/README.md
|
%doc %{gem_instdir}/README.md
|
||||||
%{gem_instdir}/Rakefile
|
|
||||||
%doc %{gem_instdir}/TODO.rdoc
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 15 2023 xu_ping <707078654@qq.com> - 2.8.1-1
|
||||||
|
- Upgrade version to 2.8.1
|
||||||
|
|
||||||
|
* Mon Aug 16 2021 miaokaibo <miaokaibo@outlook.com> - 2.7.1-2
|
||||||
|
- Bug fix I443UD
|
||||||
|
|
||||||
|
* Thu Jun 24 2021 liqiuyu <liqiuyu@kylinos.cn> - 2.7.1-1
|
||||||
|
- Update version to 2.7.1
|
||||||
|
|
||||||
|
* Tue Sep 8 2020 geyanan <geyanan2@huawei.com> - 2.6.4-2
|
||||||
|
- fix build fail
|
||||||
|
|
||||||
* Wed Aug 19 2020 geyanan <geyanan2@huawei.com> - 2.6.4-1
|
* Wed Aug 19 2020 geyanan <geyanan2@huawei.com> - 2.6.4-1
|
||||||
- package init
|
- package init
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
version_control: github
|
version_control: github
|
||||||
src_repo:/mikel/mail
|
src_repo: mikel/mail
|
||||||
tag_prefix:"v"
|
tag_prefix: ""
|
||||||
seperator: "."
|
seperator: "."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user