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.
- checksums.yaml +5 -5
- data/lib/ezmlm.rb +2 -2
- data/lib/ezmlm/list.rb +6 -9
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f5964c9529223a09718c7e74926d60576d498d3eb37861871392848b4cfd7176
|
4
|
+
data.tar.gz: 4fa900f626d68bfb29e09b93228ac96961e64b09aeba0111394a766d7727a845
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1492bf87cd168d0173b84eb4435c121b0c2b2e0fc40756b524a5c42f97b6a161a8b11e2e3ca16c37dfcbfddb4061697a620e4811df699751cbda3f8d054c8824
|
7
|
+
data.tar.gz: 000cc555b6dfed0922ffc12dc948f5e3eb29da82e925ffdec80d7412066b293fd07d26e12c0a2c93d5e3eed66e9f13906c9e3120b0f3d161c7636f94fdab6aae
|
data/lib/ezmlm.rb
CHANGED
data/lib/ezmlm/list.rb
CHANGED
@@ -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
|
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
|
-
|
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.
|
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:
|
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
|
-
|
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.
|