signore 0.0.0

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.
@@ -0,0 +1,38 @@
1
+ # encoding: UTF-8
2
+
3
+ require_relative '../spec_helper'
4
+
5
+ module Signore describe Signature do
6
+
7
+ before do
8
+ Database.load 'spec/fixtures/signatures.yml'
9
+ end
10
+
11
+ describe '#display' do
12
+
13
+ it 'returns a signature formatted with meta information (if available)' do
14
+ Database.db[2].display.must_equal '// sometimes I believe compiler ignores all my comments'
15
+ Database.db[4].display.must_equal "stay-at-home executives vs. wallstreet dads\n [kodz]"
16
+ Database.db[1].display.must_equal "You do have to be mad to work here, but it doesn’t help.\n [Gary Barnes, asr]"
17
+ Database.db[3].display.must_equal "Bruce Schneier knows Alice and Bob’s shared secret.\n [Bruce Schneier Facts]"
18
+ Database.db[0].display.must_equal "She was good at playing abstract confusion in\nthe same way a midget is good at being short.\n [Clive James on Marilyn Monroe]"
19
+ Database.db[5].display.must_equal "Amateur fighter pilot ignores orders, listens to\nthe voices in his head and slaughters thousands.\n [Star Wars ending explained]"
20
+ end
21
+
22
+ end
23
+
24
+ describe '#tagged_with?' do
25
+
26
+ it 'says whether a tagged signatura is tagged with a given tag' do
27
+ refute Database.db[2].tagged_with? 'fnord'
28
+ assert Database.db[2].tagged_with? 'programming'
29
+ assert Database.db[2].tagged_with? 'tech'
30
+ end
31
+
32
+ it 'says that an untagged signature is not tagged with any tag' do
33
+ refute Database.db[4].tagged_with? 'fnord'
34
+ end
35
+
36
+ end
37
+
38
+ end end
@@ -0,0 +1,15 @@
1
+ require_relative '../spec_helper'
2
+
3
+ module Signore describe Wrapper do
4
+
5
+ describe '#display' do
6
+
7
+ it 'returns properly wrapped signature (with possible meta information)' do
8
+ YAML.load_file('spec/fixtures/wrapper.yml').each do |sample|
9
+ Wrapper.new(sample[:text], sample[:meta]).display.must_equal sample[:wrapped]
10
+ end
11
+ end
12
+
13
+ end
14
+
15
+ end end
@@ -0,0 +1,7 @@
1
+ gem 'minitest'
2
+ require 'minitest/autorun'
3
+
4
+ require 'pathname'
5
+ require 'tmpdir'
6
+
7
+ require_relative '../lib/signore'
metadata ADDED
@@ -0,0 +1,104 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: signore
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Piotr Szotkowski
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-10-13 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: trollop
16
+ requirement: &9662320 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *9662320
25
+ - !ruby/object:Gem::Dependency
26
+ name: minitest
27
+ requirement: &9649680 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '2.3'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *9649680
36
+ - !ruby/object:Gem::Dependency
37
+ name: rake
38
+ requirement: &9649260 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *9649260
47
+ description:
48
+ email: chastell@chastell.net
49
+ executables:
50
+ - signore
51
+ extensions: []
52
+ extra_rdoc_files: []
53
+ files:
54
+ - .rvmrc
55
+ - Gemfile
56
+ - Gemfile.lock
57
+ - LICENCE
58
+ - README.md
59
+ - Rakefile
60
+ - bin/signore
61
+ - lib/signore.rb
62
+ - lib/signore/database.rb
63
+ - lib/signore/executable.rb
64
+ - lib/signore/signature.rb
65
+ - lib/signore/wrapper.rb
66
+ - signore.gemspec
67
+ - spec/fixtures/min_yaml.yml
68
+ - spec/fixtures/signatures.yml
69
+ - spec/fixtures/wrapper.yml
70
+ - spec/signore/database_spec.rb
71
+ - spec/signore/executable_spec.rb
72
+ - spec/signore/signature_spec.rb
73
+ - spec/signore/wrapper_spec.rb
74
+ - spec/spec_helper.rb
75
+ homepage: http://github.com/chastell/signore
76
+ licenses: []
77
+ post_install_message:
78
+ rdoc_options: []
79
+ require_paths:
80
+ - lib
81
+ required_ruby_version: !ruby/object:Gem::Requirement
82
+ none: false
83
+ requirements:
84
+ - - ! '>='
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
88
+ none: false
89
+ requirements:
90
+ - - ! '>='
91
+ - !ruby/object:Gem::Version
92
+ version: '0'
93
+ requirements: []
94
+ rubyforge_project:
95
+ rubygems_version: 1.8.10
96
+ signing_key:
97
+ specification_version: 3
98
+ summary: ! 'signore: an email signature manager/randomiser'
99
+ test_files:
100
+ - spec/spec_helper.rb
101
+ - spec/signore/database_spec.rb
102
+ - spec/signore/signature_spec.rb
103
+ - spec/signore/wrapper_spec.rb
104
+ - spec/signore/executable_spec.rb