salutations 0.0.1 → 0.1.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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +9 -0
- data/lib/salutations.rb +14 -13
- data/lib/salutations/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c1224830329e6d82a5bbc3ba457c1f17c253ea8c
|
|
4
|
+
data.tar.gz: 9a421d9a8aa696f76d6047fae651358fa1e0a5a1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 559c48cdf81345ed7e464fbf3fcdd6b0131df061ee7832109e1c27c3e0f4b343ccb68b8a493a8f8fa1858702042f3e80a4905eca2649b899d46f758a3dfd7a56
|
|
7
|
+
data.tar.gz: 4cb0b89a822f18235804494208f5d69c81f423dacce06cf0febe43fb1e6995cff99fe28c5db3929a17c314db686d97bc58e9dd921037acb174e74e1049d55146
|
data/.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*.gem
|
data/README.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Salutations [](http://badge.fury.io/rb/salutations)
|
|
2
|
+
===========
|
|
3
|
+
|
|
4
|
+
Salutations contains a list of salutations (Mr, Mrs, Ms, etc) - sometimes also known a prefixes or honorifics - for usage in forms, and ordered by usage.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
To use in a form:
|
|
8
|
+
|
|
9
|
+
<%= f.select(:salutation, options_for_select(Salutations::get)) %>
|
data/lib/salutations.rb
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
class Salutations
|
|
2
|
+
|
|
3
|
+
COMMON = ["Mr", "Master", "Ms", "Miss", "Mrs", "Mx"]
|
|
4
|
+
SCIENCE = ["Dr", "Prof"]
|
|
5
|
+
FORMAL = ["Sir", "Madam", "Dame", "Lord", "Lady", "Viscount"]
|
|
6
|
+
RELIGION = ["Br", "Sr", "Fr", "Rev", "Pr", "Elder", "Revd Father", "Revd Canon"]
|
|
7
|
+
POLITICS = ["The Hon", "The Hon Mrs", "Rt Hon Lord"]
|
|
8
|
+
LAW = ["Judge"]
|
|
9
|
+
MILITARY = [
|
|
10
|
+
"Capt", "Major", "Lt-Col", "Col", "Lt-Cmdr",
|
|
11
|
+
"Cmdr", "Flt Lt", "Brgdr", "Wng Cmdr", "Group Capt",
|
|
12
|
+
"Maj-Gen", "Air Cdre", "Rear Admrl"
|
|
13
|
+
]
|
|
14
|
+
|
|
2
15
|
def self.get
|
|
3
|
-
[
|
|
4
|
-
"Mr.", "Mrs.", "Miss",
|
|
5
|
-
"Dr.", "Ms.", "Prof.",
|
|
6
|
-
"Rev.", "Lady", "Sir",
|
|
7
|
-
"Capt.", "Major", "Lt.-Col.",
|
|
8
|
-
"Col.", "Lady", "Lt.-Cmdr.",
|
|
9
|
-
"The Hon.", "Cmdr.", "Flt. Lt.",
|
|
10
|
-
"Brgdr.", "Judge", "Lord",
|
|
11
|
-
"The Hon. Mrs", "Wng. Cmdr.", "Group Capt.",
|
|
12
|
-
"Rt. Hon. Lord", "Revd. Father", "Revd Canon",
|
|
13
|
-
"Maj.-Gen.", "Air Cdre.", "Viscount",
|
|
14
|
-
"Dame", "Rear Admrl."
|
|
15
|
-
]
|
|
16
|
+
[COMMON, SCIENCE, FORMAL, RELIGION, POLITICS, LAW, MILITARY].flatten.uniq
|
|
16
17
|
end
|
|
17
18
|
end
|
data/lib/salutations/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: salutations
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- John Hamelink
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2015-06-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Salutations wraps up a list of salutations (Mr, Mrs, Ms, etc) for usage
|
|
14
14
|
in forms, ordered by usage
|
|
@@ -18,7 +18,9 @@ executables: []
|
|
|
18
18
|
extensions: []
|
|
19
19
|
extra_rdoc_files: []
|
|
20
20
|
files:
|
|
21
|
+
- ".gitignore"
|
|
21
22
|
- LICENSE
|
|
23
|
+
- README.md
|
|
22
24
|
- lib/salutations.rb
|
|
23
25
|
- lib/salutations/version.rb
|
|
24
26
|
- salutations.gemspec
|
|
@@ -42,9 +44,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
42
44
|
version: '0'
|
|
43
45
|
requirements: []
|
|
44
46
|
rubyforge_project:
|
|
45
|
-
rubygems_version: 2.
|
|
47
|
+
rubygems_version: 2.4.5
|
|
46
48
|
signing_key:
|
|
47
49
|
specification_version: 4
|
|
48
50
|
summary: Salutations contains a list of salutations (Mr, Mrs, Ms, etc)
|
|
49
51
|
test_files: []
|
|
50
|
-
has_rdoc:
|