signore 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -7
- data/.ruby-version +1 -1
- data/Gemfile.lock +44 -28
- data/Rakefile +5 -6
- data/lib/signore.rb +3 -0
- data/lib/signore/cli.rb +1 -2
- data/lib/signore/repo.rb +1 -2
- data/lib/signore/settings.rb +1 -2
- data/lib/signore/sig_finder.rb +1 -2
- data/lib/signore/sig_from_stream.rb +1 -2
- data/signore.gemspec +6 -5
- data/{spec → test}/fixtures/signatures.legacy.yml +0 -0
- data/{spec → test}/fixtures/signatures.yml +0 -0
- data/{spec → test}/fixtures/wrapper.yml +0 -0
- data/{spec/signore/cli_spec.rb → test/signore/cli_test.rb} +2 -2
- data/{spec/signore/mapper_spec.rb → test/signore/mapper_test.rb} +1 -1
- data/{spec/signore/repo_spec.rb → test/signore/repo_test.rb} +5 -5
- data/{spec/signore/settings_spec.rb → test/signore/settings_test.rb} +4 -5
- data/{spec/signore/sig_finder_spec.rb → test/signore/sig_finder_test.rb} +2 -2
- data/{spec/signore/sig_from_stream_spec.rb → test/signore/sig_from_stream_test.rb} +1 -1
- data/{spec/signore/signature_spec.rb → test/signore/signature_test.rb} +2 -3
- data/{spec/spec_helper.rb → test/test_helper.rb} +0 -0
- metadata +42 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6cfb842786a542e13dc3cdee1e74bc008dd789a4
|
4
|
+
data.tar.gz: 3f0c4e0cb4e27b390fd32b62cb59fe7317b9f58b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 961505f7494b297608087821fb41c95f9d1fa4fa7cb9afb096467708cc036cf7011146fa9bac5aceaba0e4aab1d44fd90078917d5bdfe144841c103db415a14d
|
7
|
+
data.tar.gz: 5ffbfc986b267f701ddc91ba1bfcba3f9274c303b8fd7a24d0eb581357994532b04a918294e34e9bb5cce4efe2ff38ac5ed358e52b5b7afa465049f4d2dc1947
|
data/.rubocop.yml
CHANGED
@@ -1,14 +1,11 @@
|
|
1
|
-
AndOr:
|
1
|
+
Style/AndOr:
|
2
2
|
Enabled: false
|
3
3
|
|
4
|
-
Documentation:
|
4
|
+
Style/Documentation:
|
5
5
|
Enabled: false
|
6
6
|
|
7
|
-
Not:
|
7
|
+
Style/Not:
|
8
8
|
Enabled: false
|
9
9
|
|
10
|
-
|
11
|
-
Enabled: false
|
12
|
-
|
13
|
-
TrailingComma:
|
10
|
+
Style/TrailingComma:
|
14
11
|
EnforcedStyleForMultiline: comma
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.2
|
data/Gemfile.lock
CHANGED
@@ -1,62 +1,78 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
signore (0.3.
|
5
|
-
lovely_rufus (~> 0.
|
4
|
+
signore (0.3.3)
|
5
|
+
lovely_rufus (~> 0.3.0)
|
6
|
+
private_attr (~> 1.0)
|
6
7
|
|
7
8
|
GEM
|
8
9
|
remote: https://rubygems.org/
|
9
10
|
specs:
|
11
|
+
abstract_type (0.0.7)
|
12
|
+
adamantium (0.2.0)
|
13
|
+
ice_nine (~> 0.11.0)
|
14
|
+
memoizable (~> 0.4.0)
|
10
15
|
ast (2.0.0)
|
11
16
|
astrolabe (1.3.0)
|
12
17
|
parser (>= 2.2.0.pre.3, < 3.0)
|
13
|
-
bogus (0.1.
|
18
|
+
bogus (0.1.6)
|
14
19
|
dependor (>= 0.0.4)
|
15
20
|
celluloid (0.16.0)
|
16
21
|
timers (~> 4.0.0)
|
22
|
+
concord (0.1.5)
|
23
|
+
adamantium (~> 0.2.0)
|
24
|
+
equalizer (~> 0.0.9)
|
17
25
|
dependor (1.0.1)
|
26
|
+
diff-lcs (1.2.5)
|
27
|
+
equalizer (0.0.9)
|
18
28
|
ffi (1.9.6)
|
19
29
|
hitimes (1.2.2)
|
20
|
-
|
30
|
+
ice_nine (0.11.1)
|
31
|
+
listen (2.8.5)
|
21
32
|
celluloid (>= 0.15.2)
|
22
33
|
rb-fsevent (>= 0.9.3)
|
23
34
|
rb-inotify (>= 0.9)
|
24
|
-
lovely_rufus (0.
|
25
|
-
|
35
|
+
lovely_rufus (0.3.0)
|
36
|
+
private_attr (~> 1.0)
|
37
|
+
memoizable (0.4.2)
|
38
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
39
|
+
minitest (5.5.1)
|
26
40
|
minitest-focus (1.1.0)
|
27
41
|
minitest (>= 4, < 6)
|
28
|
-
parser (2.2.0.
|
42
|
+
parser (2.2.0.2)
|
29
43
|
ast (>= 1.1, < 3.0)
|
30
|
-
|
31
|
-
|
44
|
+
powerpack (0.1.0)
|
45
|
+
private_attr (1.0.0)
|
46
|
+
procto (0.0.2)
|
32
47
|
rainbow (2.0.0)
|
33
|
-
rake (10.
|
48
|
+
rake (10.4.2)
|
34
49
|
rb-fsevent (0.9.4)
|
35
50
|
rb-inotify (0.9.5)
|
36
51
|
ffi (>= 0.5.0)
|
37
|
-
reek (
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
sexp_processor (~> 4.4)
|
52
|
+
reek (2.0.0)
|
53
|
+
parser (~> 2.2)
|
54
|
+
rainbow (~> 2.0)
|
55
|
+
unparser (~> 0.2.2)
|
42
56
|
rerun (0.10.0)
|
43
57
|
listen (~> 2.7, >= 2.7.3)
|
44
|
-
rubocop (0.
|
58
|
+
rubocop (0.29.0)
|
45
59
|
astrolabe (~> 1.3)
|
46
|
-
parser (>= 2.2.0.
|
47
|
-
powerpack (~> 0.
|
60
|
+
parser (>= 2.2.0.1, < 3.0)
|
61
|
+
powerpack (~> 0.1)
|
48
62
|
rainbow (>= 1.99.1, < 3.0)
|
49
63
|
ruby-progressbar (~> 1.4)
|
50
|
-
ruby-progressbar (1.7.
|
51
|
-
|
52
|
-
ruby_parser (~> 3.1)
|
53
|
-
sexp_processor (~> 4.0)
|
54
|
-
ruby_parser (3.6.3)
|
55
|
-
sexp_processor (~> 4.1)
|
56
|
-
sexp_processor (4.4.4)
|
57
|
-
slop (3.6.0)
|
64
|
+
ruby-progressbar (1.7.1)
|
65
|
+
thread_safe (0.3.4)
|
58
66
|
timers (4.0.1)
|
59
67
|
hitimes
|
68
|
+
unparser (0.2.2)
|
69
|
+
abstract_type (~> 0.0.7)
|
70
|
+
adamantium (~> 0.2.0)
|
71
|
+
concord (~> 0.1.5)
|
72
|
+
diff-lcs (~> 1.2.5)
|
73
|
+
equalizer (~> 0.0.9)
|
74
|
+
parser (~> 2.2.0.2)
|
75
|
+
procto (~> 0.0.2)
|
60
76
|
|
61
77
|
PLATFORMS
|
62
78
|
ruby
|
@@ -66,7 +82,7 @@ DEPENDENCIES
|
|
66
82
|
minitest (~> 5.0)
|
67
83
|
minitest-focus (~> 1.1)
|
68
84
|
rake (~> 10.1)
|
69
|
-
reek (~>
|
85
|
+
reek (~> 2.0)
|
70
86
|
rerun (~> 0.10.0)
|
71
|
-
rubocop (~> 0.
|
87
|
+
rubocop (~> 0.29.0)
|
72
88
|
signore!
|
data/Rakefile
CHANGED
@@ -2,17 +2,16 @@ require 'rake/testtask'
|
|
2
2
|
require 'reek/rake/task'
|
3
3
|
require 'rubocop/rake_task'
|
4
4
|
|
5
|
-
task default: %i(
|
5
|
+
task default: %i(test rubocop reek)
|
6
6
|
|
7
|
-
Rake::TestTask.new
|
8
|
-
task.
|
9
|
-
task.warning
|
7
|
+
Rake::TestTask.new do |task|
|
8
|
+
task.pattern = 'test/**/*_test.rb'
|
9
|
+
task.warning = true
|
10
10
|
end
|
11
11
|
|
12
12
|
Reek::Rake::Task.new do |task|
|
13
|
-
task.
|
13
|
+
task.config_file = 'config/reek.yml'
|
14
14
|
task.fail_on_error = false
|
15
|
-
task.reek_opts = '--quiet'
|
16
15
|
end
|
17
16
|
|
18
17
|
RuboCop::RakeTask.new do |task|
|
data/lib/signore.rb
CHANGED
data/lib/signore/cli.rb
CHANGED
data/lib/signore/repo.rb
CHANGED
data/lib/signore/settings.rb
CHANGED
data/lib/signore/sig_finder.rb
CHANGED
data/signore.gemspec
CHANGED
@@ -7,19 +7,20 @@ Gem::Specification.new do |gem|
|
|
7
7
|
gem.license = 'AGPL-3.0'
|
8
8
|
gem.name = 'signore'
|
9
9
|
gem.summary = 'signore: an email signature manager/randomiser'
|
10
|
-
gem.version = '0.3.
|
10
|
+
gem.version = '0.3.3'
|
11
11
|
|
12
12
|
gem.files = `git ls-files -z`.split "\0"
|
13
13
|
gem.executables = gem.files.grep(/^bin\//).map { |path| File.basename(path) }
|
14
|
-
gem.test_files = gem.files.grep(/^
|
14
|
+
gem.test_files = gem.files.grep(/^test\/.*\.rb$/)
|
15
15
|
|
16
|
-
gem.add_dependency 'lovely_rufus', '~> 0.
|
16
|
+
gem.add_dependency 'lovely_rufus', '~> 0.3.0'
|
17
|
+
gem.add_dependency 'private_attr', '~> 1.0'
|
17
18
|
|
18
19
|
gem.add_development_dependency 'bogus', '~> 0.1.3'
|
19
20
|
gem.add_development_dependency 'minitest', '~> 5.0'
|
20
21
|
gem.add_development_dependency 'minitest-focus', '~> 1.1'
|
21
22
|
gem.add_development_dependency 'rake', '~> 10.1'
|
22
|
-
gem.add_development_dependency 'reek', '~>
|
23
|
+
gem.add_development_dependency 'reek', '~> 2.0'
|
23
24
|
gem.add_development_dependency 'rerun', '~> 0.10.0'
|
24
|
-
gem.add_development_dependency 'rubocop', '~> 0.
|
25
|
+
gem.add_development_dependency 'rubocop', '~> 0.29.0'
|
25
26
|
end
|
File without changes
|
File without changes
|
File without changes
|
@@ -2,7 +2,7 @@ require 'pathname'
|
|
2
2
|
require 'stringio'
|
3
3
|
require 'tempfile'
|
4
4
|
require 'tmpdir'
|
5
|
-
require_relative '../
|
5
|
+
require_relative '../test_helper'
|
6
6
|
require_relative '../../lib/signore/cli'
|
7
7
|
|
8
8
|
module Signore
|
@@ -22,7 +22,7 @@ module Signore
|
|
22
22
|
|
23
23
|
describe 'prego' do
|
24
24
|
let(:repo) { Repo.new(path: path) }
|
25
|
-
let(:path) { Pathname.new('
|
25
|
+
let(:path) { Pathname.new('test/fixtures/signatures.yml') }
|
26
26
|
|
27
27
|
it 'prints a signature tagged with the provided tags' do
|
28
28
|
args = %w(prego tech programming)
|
@@ -2,7 +2,7 @@ require 'fileutils'
|
|
2
2
|
require 'pathname'
|
3
3
|
require 'tempfile'
|
4
4
|
require 'tmpdir'
|
5
|
-
require_relative '../
|
5
|
+
require_relative '../test_helper'
|
6
6
|
require_relative '../../lib/signore/repo'
|
7
7
|
require_relative '../../lib/signore/signature'
|
8
8
|
require_relative '../../lib/signore/tags'
|
@@ -20,14 +20,14 @@ module Signore
|
|
20
20
|
end
|
21
21
|
|
22
22
|
it 'rewrites legacy YAML files on save' do
|
23
|
-
FileUtils.cp Pathname.new('
|
23
|
+
FileUtils.cp Pathname.new('test/fixtures/signatures.legacy.yml'), path
|
24
24
|
Repo.new(path: path) << sig
|
25
25
|
path.read.wont_include 'Signore::Signature'
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
29
|
describe '#find' do
|
30
|
-
let(:path) { Pathname.new('
|
30
|
+
let(:path) { Pathname.new('test/fixtures/signatures.yml') }
|
31
31
|
let(:repo) { Repo.new(path: path, sig_finder: sig_finder) }
|
32
32
|
let(:sig_finder) { fake(:sig_finder, as: :class) }
|
33
33
|
let(:sigs) { repo.sigs }
|
@@ -55,7 +55,7 @@ module Signore
|
|
55
55
|
end
|
56
56
|
|
57
57
|
it 'keeps working with legacy YAML files' do
|
58
|
-
path = Pathname.new('
|
58
|
+
path = Pathname.new('test/fixtures/signatures.legacy.yml')
|
59
59
|
repo = Repo.new(path: path, sig_finder: sig_finder)
|
60
60
|
stub(sig_finder).find(sigs, tags: Tags.new) { sigs.last }
|
61
61
|
repo.find.must_equal sigs.last
|
@@ -64,7 +64,7 @@ module Signore
|
|
64
64
|
|
65
65
|
describe '#sigs' do
|
66
66
|
it 'returns all the Signatures from the Repo' do
|
67
|
-
path = Pathname.new('
|
67
|
+
path = Pathname.new('test/fixtures/signatures.yml')
|
68
68
|
sigs = Repo.new(path: path).sigs
|
69
69
|
sigs.size.must_equal 6
|
70
70
|
sigs.first.author.must_equal 'Clive James'
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'pathname'
|
2
2
|
require 'tmpdir'
|
3
|
-
require_relative '../
|
3
|
+
require_relative '../test_helper'
|
4
4
|
require_relative '../../lib/signore/settings'
|
5
5
|
require_relative '../../lib/signore/tags'
|
6
6
|
|
@@ -16,12 +16,11 @@ module Signore
|
|
16
16
|
it 'honours XDG_DATA_HOME if it’s set' do
|
17
17
|
begin
|
18
18
|
old_xdg = ENV.delete('XDG_DATA_HOME')
|
19
|
-
|
20
|
-
ENV['XDG_DATA_HOME']
|
21
|
-
path = "#{tempdir}/signore/signatures.yml"
|
19
|
+
ENV['XDG_DATA_HOME'] = Dir.mktmpdir
|
20
|
+
path = "#{ENV['XDG_DATA_HOME']}/signore/signatures.yml"
|
22
21
|
Settings.new.repo_path.must_equal Pathname.new(path)
|
23
22
|
ensure
|
24
|
-
FileUtils.rmtree
|
23
|
+
FileUtils.rmtree ENV['XDG_DATA_HOME']
|
25
24
|
old_xdg ? ENV['XDG_DATA_HOME'] = old_xdg : ENV.delete('XDG_DATA_HOME')
|
26
25
|
end
|
27
26
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
require 'yaml/store'
|
2
|
-
require_relative '../
|
2
|
+
require_relative '../test_helper'
|
3
3
|
require_relative '../../lib/signore/sig_finder'
|
4
4
|
require_relative '../../lib/signore/tags'
|
5
5
|
|
6
6
|
module Signore
|
7
7
|
describe SigFinder do
|
8
8
|
let(:sigs) do
|
9
|
-
Repo.new(path: Pathname.new('
|
9
|
+
Repo.new(path: Pathname.new('test/fixtures/signatures.yml')).sigs
|
10
10
|
end
|
11
11
|
|
12
12
|
let(:sig_finder) { SigFinder.new(sigs) }
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'yaml'
|
2
|
-
require_relative '../
|
2
|
+
require_relative '../test_helper'
|
3
3
|
require_relative '../../lib/signore/signature'
|
4
4
|
|
5
5
|
module Signore
|
@@ -49,7 +49,6 @@ module Signore
|
|
49
49
|
sig.to_h.must_equal 'author' => 'Anonymous Coward', 'source' => '/.',
|
50
50
|
'subject' => 'on ‘Monty Wants to Save MySQL’',
|
51
51
|
'tags' => %w(/. MySQL), 'text' => text
|
52
|
-
|
53
52
|
end
|
54
53
|
|
55
54
|
it 'removes non-existing keys' do
|
@@ -115,7 +114,7 @@ module Signore
|
|
115
114
|
end
|
116
115
|
|
117
116
|
it 'handles edge cases properly' do
|
118
|
-
YAML.load_file('
|
117
|
+
YAML.load_file('test/fixtures/wrapper.yml').each do |sig, wrapped|
|
119
118
|
sig.to_s.must_equal wrapped
|
120
119
|
end
|
121
120
|
end
|
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: signore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Szotkowski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lovely_rufus
|
@@ -16,14 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.3.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.3.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: private_attr
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bogus
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,14 +100,14 @@ dependencies:
|
|
86
100
|
requirements:
|
87
101
|
- - "~>"
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
103
|
+
version: '2.0'
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
108
|
- - "~>"
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
110
|
+
version: '2.0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: rerun
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,14 +128,14 @@ dependencies:
|
|
114
128
|
requirements:
|
115
129
|
- - "~>"
|
116
130
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.
|
131
|
+
version: 0.29.0
|
118
132
|
type: :development
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
136
|
- - "~>"
|
123
137
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.
|
138
|
+
version: 0.29.0
|
125
139
|
description: signore helps manage email signatures and select random ones based on
|
126
140
|
their tags
|
127
141
|
email: chastell@chastell.net
|
@@ -149,17 +163,17 @@ files:
|
|
149
163
|
- lib/signore/signature.rb
|
150
164
|
- lib/signore/tags.rb
|
151
165
|
- signore.gemspec
|
152
|
-
-
|
153
|
-
-
|
154
|
-
-
|
155
|
-
-
|
156
|
-
-
|
157
|
-
-
|
158
|
-
-
|
159
|
-
-
|
160
|
-
-
|
161
|
-
-
|
162
|
-
-
|
166
|
+
- test/fixtures/signatures.legacy.yml
|
167
|
+
- test/fixtures/signatures.yml
|
168
|
+
- test/fixtures/wrapper.yml
|
169
|
+
- test/signore/cli_test.rb
|
170
|
+
- test/signore/mapper_test.rb
|
171
|
+
- test/signore/repo_test.rb
|
172
|
+
- test/signore/settings_test.rb
|
173
|
+
- test/signore/sig_finder_test.rb
|
174
|
+
- test/signore/sig_from_stream_test.rb
|
175
|
+
- test/signore/signature_test.rb
|
176
|
+
- test/test_helper.rb
|
163
177
|
homepage: http://github.com/chastell/signore
|
164
178
|
licenses:
|
165
179
|
- AGPL-3.0
|
@@ -180,16 +194,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
194
|
version: '0'
|
181
195
|
requirements: []
|
182
196
|
rubyforge_project:
|
183
|
-
rubygems_version: 2.
|
197
|
+
rubygems_version: 2.4.5
|
184
198
|
signing_key:
|
185
199
|
specification_version: 4
|
186
200
|
summary: 'signore: an email signature manager/randomiser'
|
187
201
|
test_files:
|
188
|
-
-
|
189
|
-
-
|
190
|
-
-
|
191
|
-
-
|
192
|
-
-
|
193
|
-
-
|
194
|
-
-
|
195
|
-
-
|
202
|
+
- test/signore/cli_test.rb
|
203
|
+
- test/signore/mapper_test.rb
|
204
|
+
- test/signore/repo_test.rb
|
205
|
+
- test/signore/settings_test.rb
|
206
|
+
- test/signore/sig_finder_test.rb
|
207
|
+
- test/signore/sig_from_stream_test.rb
|
208
|
+
- test/signore/signature_test.rb
|
209
|
+
- test/test_helper.rb
|