net-pop 0.1.0 → 0.1.2

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: 3ef035bbd20a58700e4815d4bf06f46a9691fc357a720bb74d7fc56f23347f85
4
- data.tar.gz: 9acb213cdb2f86913441a16f214528748f7c84724772ad3ff35be8808ea32ce2
3
+ metadata.gz: d6fe6f536c778c7a453b3f80815e2db78ced095970ab7b8c981b0308730409fb
4
+ data.tar.gz: 4e4b40acd408c676d8e396c3d5a9dbcb93ed584a35d9a131624373323442720c
5
5
  SHA512:
6
- metadata.gz: fd1a187335df8a35903493beb209d872fb49ec59f65088d095209786a51493ee3f80619bd53e2d831329fa85afd70e9e3fb23847603dd3b755fa120001288def
7
- data.tar.gz: db328d1b8b66fa497f2ed18b5831b4d08537c7f70ea4672ef62d701ab843bd05fb6e55056bd15e1c71aa74648d0d04f17a9b6f06a3af873d76a356d440c0d46e
6
+ metadata.gz: 7d9373f69c262b994a708e973929a15e48f7f2d2d39e817778b0f96f5a4475c3e1e00e7893150ec5ecca45e92d6940362622486d1780ee86e600e01d2efa1e75
7
+ data.tar.gz: 8b8eedbca036612e40d344ddebea8d32926edf4429925bee269146026b6d5f64f82ee2c56aec51e174676e5598a9f52f3963551e04b03aba79baf5dc92dd2915
@@ -0,0 +1,6 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: 'github-actions'
4
+ directory: '/'
5
+ schedule:
6
+ interval: 'weekly'
@@ -0,0 +1,32 @@
1
+ name: test
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ ruby-versions:
7
+ runs-on: ubuntu-latest
8
+ outputs:
9
+ versions: ${{ steps.versions.outputs.value }}
10
+ steps:
11
+ - id: versions
12
+ run: |
13
+ versions=$(curl -s 'https://cache.ruby-lang.org/pub/misc/ci_versions/all.json' | jq -c '. + ["2.4"]')
14
+ echo "::set-output name=value::${versions}"
15
+ test:
16
+ needs: ruby-versions
17
+ name: build (${{ matrix.ruby }} / ${{ matrix.os }})
18
+ strategy:
19
+ matrix:
20
+ ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
21
+ os: [ ubuntu-latest, macos-latest ]
22
+ runs-on: ${{ matrix.os }}
23
+ steps:
24
+ - uses: actions/checkout@v3
25
+ - name: Set up Ruby
26
+ uses: ruby/setup-ruby@v1
27
+ with:
28
+ ruby-version: ${{ matrix.ruby }}
29
+ - name: Install dependencies
30
+ run: bundle install
31
+ - name: Run test
32
+ run: rake test
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  This library provides functionality for retrieving
4
4
  email via POP3, the Post Office Protocol version 3. For details
5
- of POP3, see [RFC1939] (http://www.ietf.org/rfc/rfc1939.txt).
5
+ of POP3, see [RFC1939](http://www.ietf.org/rfc/rfc1939.txt).
6
6
 
7
7
  ## Installation
8
8
 
data/Rakefile CHANGED
@@ -7,4 +7,11 @@ Rake::TestTask.new(:test) do |t|
7
7
  t.test_files = FileList['test/**/test_*.rb']
8
8
  end
9
9
 
10
+ task :sync_tool do
11
+ require 'fileutils'
12
+ FileUtils.cp "../ruby/tool/lib/core_assertions.rb", "./test/lib"
13
+ FileUtils.cp "../ruby/tool/lib/envutil.rb", "./test/lib"
14
+ FileUtils.cp "../ruby/tool/lib/find_executable.rb", "./test/lib"
15
+ end
16
+
10
17
  task :default => :test
data/lib/net/pop.rb CHANGED
@@ -194,9 +194,8 @@ module Net
194
194
  # String. Normally the unique-id is a hash of the message.
195
195
  #
196
196
  class POP3 < Protocol
197
-
198
- # svn revision of this library
199
- Revision = %q$Revision$.split[1]
197
+ # version of this library
198
+ VERSION = "0.1.2"
200
199
 
201
200
  #
202
201
  # Class Parameters
@@ -541,8 +540,11 @@ module Net
541
540
 
542
541
  # internal method for Net::POP3.start
543
542
  def do_start(account, password) # :nodoc:
544
- s = Timeout.timeout(@open_timeout, Net::OpenTimeout) do
545
- TCPSocket.open(@address, port)
543
+ begin
544
+ s = Socket.tcp @address, port, nil, nil, connect_timeout: @open_timeout
545
+ rescue Errno::ETIMEDOUT #raise Net:OpenTimeout instead for compatibility with previous versions
546
+ raise Net::OpenTimeout, "Timeout to open TCP connection to "\
547
+ "#{@address}:#{port} (exceeds #{@open_timeout} seconds)"
546
548
  end
547
549
  if use_ssl?
548
550
  raise 'openssl library not installed' unless defined?(OpenSSL)
@@ -970,7 +972,7 @@ module Net
970
972
  getok('UIDL')
971
973
  table = {}
972
974
  @socket.each_list_item do |line|
973
- num, uid = line.split
975
+ num, uid = line.split(' ')
974
976
  table[num.to_i] = uid
975
977
  end
976
978
  return table
data/net-pop.gemspec CHANGED
@@ -1,25 +1,32 @@
1
- lib = File.expand_path("lib", __dir__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require "net/pop/version"
1
+ # frozen_string_literal: true
2
+
3
+ name = File.basename(__FILE__, ".gemspec")
4
+ version = ["lib", Array.new(name.count("-"), "..").join("/")].find do |dir|
5
+ break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
6
+ /^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
7
+ end rescue nil
8
+ end
4
9
 
5
10
  Gem::Specification.new do |spec|
6
- spec.name = "net-pop"
7
- spec.version = Net::POP3::VERSION
8
- spec.authors = ["Hiroshi SHIBATA"]
9
- spec.email = ["hsbt@ruby-lang.org"]
11
+ spec.name = name
12
+ spec.version = version
13
+ spec.authors = ["Yukihiro Matsumoto"]
14
+ spec.email = ["matz@ruby-lang.org"]
10
15
 
11
16
  spec.summary = %q{Ruby client library for POP3.}
12
17
  spec.description = %q{Ruby client library for POP3.}
13
18
  spec.homepage = "https://github.com/ruby/net-pop"
14
- spec.license = "BSD-2-Clause"
19
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
15
20
 
16
21
  spec.metadata["homepage_uri"] = spec.homepage
17
22
  spec.metadata["source_code_uri"] = spec.homepage
18
23
 
19
24
  spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
20
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
+ `git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{^(bin|test|spec|features)/}) }
21
26
  end
22
27
  spec.bindir = "exe"
23
28
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
29
  spec.require_paths = ["lib"]
30
+
31
+ spec.add_dependency "net-protocol"
25
32
  end
metadata CHANGED
@@ -1,40 +1,53 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-pop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
- - Hiroshi SHIBATA
8
- autorequire:
7
+ - Yukihiro Matsumoto
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-06 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2022-09-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: net-protocol
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  description: Ruby client library for POP3.
14
28
  email:
15
- - hsbt@ruby-lang.org
29
+ - matz@ruby-lang.org
16
30
  executables: []
17
31
  extensions: []
18
32
  extra_rdoc_files: []
19
33
  files:
34
+ - ".github/dependabot.yml"
35
+ - ".github/workflows/test.yml"
20
36
  - ".gitignore"
21
- - ".travis.yml"
22
37
  - Gemfile
23
38
  - LICENSE.txt
24
39
  - README.md
25
40
  - Rakefile
26
- - bin/console
27
- - bin/setup
28
41
  - lib/net/pop.rb
29
- - lib/net/pop/version.rb
30
42
  - net-pop.gemspec
31
43
  homepage: https://github.com/ruby/net-pop
32
44
  licenses:
45
+ - Ruby
33
46
  - BSD-2-Clause
34
47
  metadata:
35
48
  homepage_uri: https://github.com/ruby/net-pop
36
49
  source_code_uri: https://github.com/ruby/net-pop
37
- post_install_message:
50
+ post_install_message:
38
51
  rdoc_options: []
39
52
  require_paths:
40
53
  - lib
@@ -49,8 +62,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
49
62
  - !ruby/object:Gem::Version
50
63
  version: '0'
51
64
  requirements: []
52
- rubygems_version: 3.0.3
53
- signing_key:
65
+ rubygems_version: 3.4.0.dev
66
+ signing_key:
54
67
  specification_version: 4
55
68
  summary: Ruby client library for POP3.
56
69
  test_files: []
data/.travis.yml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- rvm:
6
- - 2.6.3
7
- before_install: gem install bundler -v 2.0.2
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "net/pop"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
@@ -1,5 +0,0 @@
1
- module Net
2
- class POP3
3
- VERSION = "0.1.0"
4
- end
5
- end