namie 0.0.1 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 440dea9bb74463fcf2fec7ceb3902107284cc2e7
4
- data.tar.gz: b40cce711ac182df79785adc580a1f2e1b21d7b1
3
+ metadata.gz: a77a801aae009ad5c340686babf894415de8cbc0
4
+ data.tar.gz: 3b4dfa08f18a6be4d5e2e9c6e0343255fb918b42
5
5
  SHA512:
6
- metadata.gz: 1b344dbd9b7f32e62fd4e1ec82f0943334672a8fadd057587dd0033d4ad588c32cdce685c8489fbcb52e89b4a89d5fa84f30198a45518b840c6cee2f60cecbe5
7
- data.tar.gz: 3232b7e12198c6dfb0e29067897e4e9f2d37b5ef34a5b646d97e987c749ec3eaf212de6cf27f98dd016e1a86af55262f1c364cab74f1d7c57643f36a57a4aff2
6
+ metadata.gz: 1dc3d08f07c06320adfade6e236406b8e38cf94299b9b56a3befff3509cf1a81ad15d9617aeb1850cbdef7b0a01fd05528a33424bdb4500b4cb181824ecb5f62
7
+ data.tar.gz: c45f00f9a5c312fe2e09354a615f499c5ad3478d27fbcefc03d42dc511c4d34edafb50c6e128be037c5e2efb16adedd10ad1ad39a41987fcffbe7c5451d36efe
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2014-2015 Hooray Authors
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a
4
+ copy of this software and associated documentation files (the "Software"),
5
+ to deal in the Software without restriction, including without limitation
6
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
7
+ and/or sell copies of the Software, and to permit persons to whom the
8
+ Software is furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be
11
+ included in all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
14
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
16
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
17
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
18
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
19
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
 
2
- .-.
3
- ; : .-.
4
- .;: : .-. . ,';.,';. `-' .-.
5
- .;' \ : ; : ;; ;; ;; ;' .;.-'
6
- .:'.; \: `:::'-' '; ;; '; _.;:._. `:::'
7
- (__.' `. _; `-'
2
+ .-.
3
+ ; : .-.
4
+ .;: : .-. . ,';.,';. `-' .-.
5
+ .;' \ : ; : ;; ;; ;; ;' .;.-'
6
+ .:'.; \: `:::'-' '; ;; '; _.;:._. `:::'
7
+ (__.' `. _; `-'
8
8
 
9
9
 
10
10
 
@@ -23,6 +23,11 @@ module Namie
23
23
  fullname == other.fullname
24
24
  end
25
25
 
26
+ def aka
27
+ match = [first, middle, last].join.match(/['"](\w*)['"]/)
28
+ match && match[1]
29
+ end
30
+
26
31
  def fullname
27
32
  to_s
28
33
  end
@@ -1,4 +1,4 @@
1
1
  # :nodoc:
2
2
  module Namie
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.3'
4
4
  end
@@ -9,8 +9,9 @@ Gem::Specification.new do |s|
9
9
  s.authors = ['Marcos Piccinini']
10
10
  s.email = ['nofxx@github.com']
11
11
  s.homepage = 'http://github.com/nofxx/namie'
12
- s.summary = 'Area codes for phonie'
13
- s.description = 'Area codes for phonie'
12
+ s.summary = 'Names as first class citizens'
13
+ s.description = 'Names as first class citizens'
14
+ s.license = 'MIT'
14
15
 
15
16
  s.files = `git ls-files`.split("\n")
16
17
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -21,6 +21,14 @@ describe Namie::Name do
21
21
  Namie::Name.new('George S. Patton').lastname.must_equal('Patton')
22
22
  end
23
23
 
24
+ it 'should calculate an alias' do
25
+ Namie::Name.new('Ian "Lenny" Kilmister').aka.must_equal('Lenny')
26
+ end
27
+
28
+ it 'should calculate an alias' do
29
+ Namie::Name.new('S. Dumont').aka.must_be_nil
30
+ end
31
+
24
32
  describe 'Simple name' do
25
33
  let(:nam) { Namie::Name.new('Jules Verne') } # Jules Gabriel Verne
26
34
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: namie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcos Piccinini
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- description: Area codes for phonie
55
+ description: Names as first class citizens
56
56
  email:
57
57
  - nofxx@github.com
58
58
  executables: []
@@ -62,6 +62,7 @@ files:
62
62
  - ".gitignore"
63
63
  - Gemfile
64
64
  - Guardfile
65
+ - MIT-LICENSE
65
66
  - README.md
66
67
  - Rakefile
67
68
  - lib/namie.rb
@@ -75,7 +76,8 @@ files:
75
76
  - spec/namie/parser_spec.rb
76
77
  - spec/spec_helper.rb
77
78
  homepage: http://github.com/nofxx/namie
78
- licenses: []
79
+ licenses:
80
+ - MIT
79
81
  metadata: {}
80
82
  post_install_message:
81
83
  rdoc_options: []
@@ -96,7 +98,7 @@ rubyforge_project:
96
98
  rubygems_version: 2.4.3
97
99
  signing_key:
98
100
  specification_version: 4
99
- summary: Area codes for phonie
101
+ summary: Names as first class citizens
100
102
  test_files:
101
103
  - spec/namie/formatter_spec.rb
102
104
  - spec/namie/name_spec.rb