dmarc 0.5.0 → 0.6.0

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
- SHA1:
3
- metadata.gz: 0722fed71bbda69dbc298ae1219aefb479d398d5
4
- data.tar.gz: c8478c89eb381f682c7ec0a96036222dc31b7623
2
+ SHA256:
3
+ metadata.gz: 2e3b30301fd8b3d2ab7d423ed7afbda2cc5222047256e947f18870290c48c69d
4
+ data.tar.gz: 31b591fb978c4ff538b5d36bea8c896dff0e7bc30a196c64e501215abd0610d2
5
5
  SHA512:
6
- metadata.gz: 27faec135d37a31823e5c0df6e5e1bc42e42f8064434a110e36faac3b97863696948a7f69ae3c3f87d2c6f2753cc41ec940a1962bd11231a1093113392283929
7
- data.tar.gz: eaeb4b38ef303231a5c52722c4f093d0f24d856d6f604c66f8639d81975311c68d4aa88fc5da3d00a54462d5ab37d2044e6d01f7f7c3cb16aeb06f8c1c737f36
6
+ metadata.gz: 3c1c83f438dfdbe45f58a3382e9404d6113ffbefa0d79174673867d3efc399a76128a38cadf0e6ddc06baa45a5719193be48784cc96361cad732e543bd6c4bd5
7
+ data.tar.gz: 37437cba5c79511cd060c4dc49aaead5356f76ff45c746f147349c19f3b28e1529cae4ec1b6f2f4c16fe1c41d089f441b28483809f24f78e833385dc41d54685
@@ -0,0 +1,29 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: master
6
+ pull_request: []
7
+
8
+ jobs:
9
+ tests:
10
+ strategy:
11
+ matrix:
12
+ ruby:
13
+ - "2.6"
14
+ - "2.7"
15
+ - "3.0"
16
+ - "3.1"
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Set up Git repository
20
+ uses: actions/checkout@main
21
+
22
+ - name: Set up Ruby
23
+ uses: ruby/setup-ruby@v1
24
+ with:
25
+ ruby-version: ${{ matrix.ruby }}
26
+ bundler-cache: true
27
+
28
+ - name: Run tests
29
+ run: bundle exec rake spec
data/.gitignore CHANGED
@@ -1,19 +1,7 @@
1
- Gemfile.lock
1
+ /Gemfile.lock
2
+ /.bundle/
3
+ /doc/
4
+ /coverage/
5
+ /pkg/
6
+ /.yardoc/
2
7
  *.gem
3
- *.rbc
4
- .bundle
5
- .config
6
- coverage
7
- InstalledFiles
8
- lib/bundler/man
9
- pkg
10
- rdoc
11
- spec/reports
12
- test/tmp
13
- test/version_tmp
14
- tmp
15
-
16
- # YARD artifacts
17
- .yardoc
18
- _yardoc
19
- doc/
data/CODEOWNERS ADDED
@@ -0,0 +1 @@
1
+ * @postmodern @woodruffw
data/ChangeLog.md CHANGED
@@ -1,8 +1,12 @@
1
- ### 0.5.0 / 2016-07-16
1
+ ### 0.6.0 / 2024-01-24
2
+
3
+ * {DMARC::Record.parse} now allows trailing whitespace, per DMARC spec.
4
+
5
+ ### 0.5.0 / 2016-06-16
2
6
 
3
7
  * Added {DMARC::Uri} to represent `mailto:dmarc@example.com!10m` URIs.
4
8
 
5
- ### 0.4.0 / 2016-07-10
9
+ ### 0.4.0 / 2016-06-10
6
10
 
7
11
  * Added {DMARC::Record#to_h}.
8
12
  * Added {DMARC::Record#adkim?}.
data/Gemfile CHANGED
@@ -10,10 +10,10 @@ group :development do
10
10
  gem 'rspec', '~> 3.0'
11
11
 
12
12
  gem 'kramdown'
13
- gem 'yard', '~> 0.8'
13
+ gem 'yard', '~> 0.9'
14
14
  end
15
15
 
16
16
  group :test do
17
17
  gem 'json'
18
- gem 'codeclimate-test-reporter', require: nil
18
+ gem 'simplecov', require: nil
19
19
  end
data/dmarc.gemspec CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
18
18
  gem.require_paths = ["lib"]
19
19
  gem.required_ruby_version = '>= 1.9.1'
20
20
 
21
- gem.add_dependency 'parslet', '~> 1.5'
21
+ gem.add_dependency 'parslet', '>= 1.0.0', '< 3.0.0'
22
22
 
23
- gem.add_development_dependency 'bundler', '~> 1.0'
23
+ gem.add_development_dependency 'bundler', '~> 2.0'
24
24
  end
data/lib/dmarc/parser.rb CHANGED
@@ -16,7 +16,8 @@ module DMARC
16
16
  rule(:dmarc_record) do
17
17
  dmarc_version.repeat(1,1) >>
18
18
  (dmarc_sep >> dmarc_tag).repeat >>
19
- dmarc_sep.maybe
19
+ dmarc_sep.maybe >>
20
+ wsp?.maybe
20
21
  end
21
22
 
22
23
  rule(:dmarc_sep) { wsp? >> str(';') >> wsp? }
data/lib/dmarc/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module DMARC
2
2
  # dmarc version
3
- VERSION = '0.5.0'
3
+ VERSION = '0.6.0'
4
4
  end
data/spec/parser_spec.rb CHANGED
@@ -80,6 +80,15 @@ describe Parser do
80
80
  ])
81
81
  end
82
82
 
83
+ it 'ignores trailing spacing without final separator' do
84
+ record = 'v=DMARC1; p=none '
85
+
86
+ expect(subject.parse(record)).to eq([
87
+ {v: 'DMARC1'},
88
+ {p: 'none'}
89
+ ])
90
+ end
91
+
83
92
  it "ignores unknown tags" do
84
93
  record = 'v=DMARC1;p=none;foo=xxx;sp=reject;bar=xxx;adkim=r;aspf=r'
85
94
  expect(subject.parse(record)).to eq([
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,5 @@
1
- require "codeclimate-test-reporter"
2
- CodeClimate::TestReporter.start
1
+ require 'simplecov'
2
+ SimpleCov.start
3
3
 
4
4
  require 'rspec'
5
5
  require 'dmarc'
metadata CHANGED
@@ -1,43 +1,49 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dmarc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Davis Gallinghouse
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-16 00:00:00.000000000 Z
11
+ date: 2024-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parslet
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 1.0.0
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '1.5'
22
+ version: 3.0.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 1.0.0
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '1.5'
32
+ version: 3.0.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: bundler
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
37
  - - "~>"
32
38
  - !ruby/object:Gem::Version
33
- version: '1.0'
39
+ version: '2.0'
34
40
  type: :development
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
44
  - - "~>"
39
45
  - !ruby/object:Gem::Version
40
- version: '1.0'
46
+ version: '2.0'
41
47
  description: DMARC Record Parser
42
48
  email:
43
49
  - davis@trailofbits.com
@@ -46,10 +52,11 @@ extensions: []
46
52
  extra_rdoc_files: []
47
53
  files:
48
54
  - ".document"
55
+ - ".github/workflows/ci.yml"
49
56
  - ".gitignore"
50
57
  - ".rspec"
51
- - ".travis.yml"
52
58
  - ".yardopts"
59
+ - CODEOWNERS
53
60
  - ChangeLog.md
54
61
  - Gemfile
55
62
  - LICENSE.txt
@@ -74,7 +81,7 @@ homepage: https://github.com/trailofbits/dmarc#readme
74
81
  licenses:
75
82
  - MIT
76
83
  metadata: {}
77
- post_install_message:
84
+ post_install_message:
78
85
  rdoc_options: []
79
86
  require_paths:
80
87
  - lib
@@ -89,9 +96,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
96
  - !ruby/object:Gem::Version
90
97
  version: '0'
91
98
  requirements: []
92
- rubyforge_project:
93
- rubygems_version: 2.4.5.1
94
- signing_key:
99
+ rubygems_version: 3.4.10
100
+ signing_key:
95
101
  specification_version: 4
96
102
  summary: DMARC Record Parser
97
103
  test_files:
data/.travis.yml DELETED
@@ -1,16 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.1.8
4
- - 2.2.4
5
- - 2.3.0
6
- - jruby
7
- - rbx-2
8
- matrix:
9
- allow_failures:
10
- - rvm: rbx-2
11
- addons:
12
- code_climate:
13
- repo_token: 27519af871c1d9576b91e6f264e841eb7b7babbdcda315bf94fcbd095c202949
14
- notifications:
15
- slack:
16
- secure: Jqj30lwH2fnyu8adMI2nXa7rfF70o5JSrL0ZOe425XVu3YMMpfIp8J4DD0Ks/nCxgGRhJpq35oAHXjKmJAEHyda9oxx7GV9QwOuu2oviUrW3VUQQj9UsXPQP0sc0GD9BPI+KVNp4dbGki1ik90I6HVVsqDauek/z5MWt6MJY+tA=