ezmlm 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +5 -5
  2. data/lib/ezmlm.rb +2 -2
  3. data/lib/ezmlm/list.rb +6 -9
  4. metadata +3 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 1a7a83d944995b08cab01dfdaa2b9cbb003cd010
4
- data.tar.gz: 562a9857331d93f7288b0158c652b5887cd5b8e8
2
+ SHA256:
3
+ metadata.gz: f5964c9529223a09718c7e74926d60576d498d3eb37861871392848b4cfd7176
4
+ data.tar.gz: 4fa900f626d68bfb29e09b93228ac96961e64b09aeba0111394a766d7727a845
5
5
  SHA512:
6
- metadata.gz: a032a42a032c5f98960f4c66ee498b7680cefce301d2a9aa02387b76c7727e8a5b051a19e60e401b7e3202c849cc139612825d77728262a3be0e739debd1fe0a
7
- data.tar.gz: b29434e5b847df18bf35f733968c5d4ed91b5260f1313dffbacf722e590edb5de59ab4518e515cc0ba7d5c16b4c3489f12b0991cb6a2448224aba337ef4bdb9c
6
+ metadata.gz: 1492bf87cd168d0173b84eb4435c121b0c2b2e0fc40756b524a5c42f97b6a161a8b11e2e3ca16c37dfcbfddb4061697a620e4811df699751cbda3f8d054c8824
7
+ data.tar.gz: 000cc555b6dfed0922ffc12dc948f5e3eb29da82e925ffdec80d7412066b293fd07d26e12c0a2c93d5e3eed66e9f13906c9e3120b0f3d161c7636f94fdab6aae
@@ -11,10 +11,10 @@ require 'pathname'
11
11
  # end
12
12
  #
13
13
  module Ezmlm
14
- # $Id: ezmlm.rb,v 81cc7d47f68f 2017/05/30 18:08:48 mahlon $
14
+ # $Id$
15
15
 
16
16
  # Package version
17
- VERSION = '1.1.1'
17
+ VERSION = '1.1.2'
18
18
 
19
19
  # Suck in the components.
20
20
  #
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/ruby
2
2
  # vim: set nosta noet ts=4 sw=4:
3
3
 
4
-
5
4
  require 'pathname'
6
5
  require 'time'
7
6
  require 'etc'
@@ -14,7 +13,7 @@ require 'ezmlm' unless defined?( Ezmlm )
14
13
  #
15
14
  #---
16
15
  class Ezmlm::List
17
- # $Id: list.rb,v 81cc7d47f68f 2017/05/30 18:08:48 mahlon $
16
+ # $Id: list.rb,v a89d91d4b157 2017/06/23 17:54:26 mahlon $
18
17
 
19
18
  # Valid subdirectories/sections for subscriptions.
20
19
  SUBSCRIPTION_DIRS = %w[ deny mod digest allow ]
@@ -70,7 +69,7 @@ class Ezmlm::List
70
69
  ### Returns +true+ if +address+ is a subscriber to this list.
71
70
  ###
72
71
  def include?( addr, section: nil )
73
- addr.downcase!
72
+ addr = addr.downcase
74
73
  file = self.subscription_dir( section ) + Ezmlm::Hash.subscriber( addr )
75
74
  return false unless file.exist?
76
75
  return file.read.scan( /T([^\0]+)\0/ ).flatten.include?( addr )
@@ -91,7 +90,7 @@ class Ezmlm::List
91
90
  def subscribe( *addr, section: nil )
92
91
  addr.each do |address|
93
92
  next unless address.index( '@' )
94
- address.downcase!
93
+ address = address.downcase
95
94
 
96
95
  file = self.subscription_dir( section ) + Ezmlm::Hash.subscriber( address )
97
96
  self.with_safety do
@@ -117,7 +116,7 @@ class Ezmlm::List
117
116
  ###
118
117
  def unsubscribe( *addr, section: nil )
119
118
  addr.each do |address|
120
- address.downcase!
119
+ address = address.downcase
121
120
 
122
121
  file = self.subscription_dir( section ) + Ezmlm::Hash.subscriber( address )
123
122
  self.with_safety do
@@ -824,13 +823,11 @@ class Ezmlm::List
824
823
  ###
825
824
  def with_safety( &block )
826
825
  home = self.homedir
827
- mode = home.stat.mode
828
-
829
- home.chmod( mode | 01000 ) # enable sticky
826
+ home.chmod( home.stat.mode | 01000 ) # enable sticky
830
827
  yield
831
828
 
832
829
  ensure
833
- home.chmod( mode )
830
+ home.chmod( home.stat.mode & ~01000 ) # disable sticky
834
831
  end
835
832
 
836
833
  end # class Ezmlm::List
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ezmlm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mahlon E. Smith
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-05-30 00:00:00.000000000 Z
13
+ date: 2019-10-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: mail
@@ -78,8 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  - !ruby/object:Gem::Version
79
79
  version: '0'
80
80
  requirements: []
81
- rubyforge_project:
82
- rubygems_version: 2.6.12
81
+ rubygems_version: 3.0.4
83
82
  signing_key:
84
83
  specification_version: 4
85
84
  summary: Interact with Ezmlm-IDX mailing lists.