Skip to content

Commit

Permalink
WIP: try to address warnings about constant redefinitions
Browse files Browse the repository at this point in the history
example:

  $ bundle exec rake test
  ... snip ...
  /Users/alexdean/.rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/net/protocol.rb:30: warning: method redefined; discarding old protocol_param
  /Users/alexdean/.rvm/gems/ruby-2.6.4/gems/net-protocol-0.2.1/lib/net/protocol.rb:32: warning: previous definition of protocol_param was here
  /Users/alexdean/.rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/net/protocol.rb:38: warning: method redefined; discarding old ssl_socket_connect
  /Users/alexdean/.rvm/gems/ruby-2.6.4/gems/net-protocol-0.2.1/lib/net/protocol.rb:40: warning: previous definition of ssl_socket_connect was here
  /Users/alexdean/.rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/net/protocol.rb:66: warning: already initialized constant Net::ProtocRetryError
  /Users/alexdean/.rvm/gems/ruby-2.6.4/gems/net-protocol-0.2.1/lib/net/protocol.rb:68: warning: previous definition of ProtocRetryError was here
  /Users/alexdean/.rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/net/protocol.rb:79: warning: method redefined; discarding old initialize
  /Users/alexdean/.rvm/gems/ruby-2.6.4/gems/net-protocol-0.2.1/lib/net/protocol.rb:81: warning: previous definition of initialize was here
  /Users/alexdean/.rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/net/protocol.rb:82: warning: method redefined; discarding old io
  /Users/alexdean/.rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/net/protocol.rb:84: warning: method redefined; discarding old message

changes made so far don't seem to resolve the error, so this might not be useful.

unsure, but it seems like these might be due to bug in mail and/or rubygems.
mikel/mail#1439
  • Loading branch information
Alex Dean committed Jan 4, 2023
1 parent 217df15 commit 3c369a9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 0 additions & 2 deletions lib/as2.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'openssl'
require 'mail'
require 'securerandom'
require 'as2/config'
require 'as2/server'
Expand Down
2 changes: 2 additions & 0 deletions lib/as2/client.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
require 'mail'
require 'net/http'
require 'openssl'

module As2
class Client
Expand Down
2 changes: 2 additions & 0 deletions lib/as2/config.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
require 'openssl'
require 'uri'

module As2
module Config
def self.build_certificate(input)
Expand Down
4 changes: 3 additions & 1 deletion lib/as2/server.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
require 'rack'
require 'logger'
require 'openssl'
require 'rack'
require 'stringio'

require 'as2/mime_generator'
require 'as2/message'

Expand Down

0 comments on commit 3c369a9

Please sign in to comment.