string_namify 0.1.0 → 0.1.1

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: dead6c2d75a9f456291e331e97841f3fb3be7bbb
4
- data.tar.gz: 7732b8b3cdd65491740a9a6a3a32ce2e3693f8b7
3
+ metadata.gz: 38bc10b040f1b9fe440438a15cda9feefa8bc139
4
+ data.tar.gz: 357241f357ea20a5bebd1f832c6e5fdb573aa0b0
5
5
  SHA512:
6
- metadata.gz: d174e0982a67eeac7dbdcebce20779374a677ff4a4be4d4f584e815273c8ee87afc6b8011b233a190ed9e395d28ac9451e1f606662c62dcaf9380ab9446e13f2
7
- data.tar.gz: 3512fa24b4744c42fb64f7fe61b1058bcaa27a1e7fe7d06491d8cd4dd2a073ac38018840400fea8bf66801b40af8cb96f4d19bf88d1b38b7fdb21e48e99f639b
6
+ metadata.gz: 09b41f50bfcd48caa51fcc30a285f33eb427a478b30dae8fb4f55b963ec8c509a739193753ed65b4eb1cac205b110516a58c46ecb42bccd312b6285f6e119274
7
+ data.tar.gz: 6344e342d505a4a3702c8385678a13830f68dc7a1b2aa121eb843adca78411f09e308e52685b3470e5dbb1b274f2fb8e72f7ff2bc713ec0cba6909534de67788
data/.gitignore CHANGED
@@ -7,4 +7,3 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
- .byebug_history
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # StringNamify
2
2
 
3
- StringNamify is a simple ruby gem to allow to namify even names with apostrophe, such as `Andrea O'Rampin`.
3
+ StringNamify is a simple ruby gem to allow to namify strings with apostrophe, such as `Andrea O'Rampin`.
4
4
 
5
5
  ## Installation
6
6
 
@@ -1,9 +1,11 @@
1
1
  String.class_eval do
2
2
  def namify
3
- return self if self.nil? || self.empty?
3
+ return self if self.empty?
4
4
  capitalized = self.split.map(&:capitalize).join(' ')
5
- capitalized.gsub!(/'(?<str>[a-z]{2})/) do |str|
6
- "'#{str[1..-1].capitalize}"
5
+ capitalized.gsub!(/['-](?<str>[a-z]{2})/) do |str|
6
+ pivot = str[0]
7
+ str.slice!(0)
8
+ "#{pivot}#{str.capitalize}"
7
9
  end
8
10
  capitalized
9
11
  end
@@ -1,3 +1,3 @@
1
1
  module StringNamify
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -9,10 +9,19 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Andrea Rampin"]
10
10
  spec.email = ["andrea.rampin@gmail.com"]
11
11
 
12
- spec.description = %q{Namify even names with apostrophe.}
12
+ spec.description = %q{Namify any string even strings with apostrophe.}
13
13
  spec.summary = spec.description
14
14
  spec.homepage = "https://github.com/andrearampin/string_namify"
15
15
 
16
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
18
+ if spec.respond_to?(:metadata)
19
+ spec.metadata['allowed_push_host'] = "http://mygemserver.com"
20
+ else
21
+ raise "RubyGems 2.0 or newer is required to protect against " \
22
+ "public gem pushes."
23
+ end
24
+
16
25
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
26
  f.match(%r{^(test|spec|features)/})
18
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: string_namify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrea Rampin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-07 00:00:00.000000000 Z
11
+ date: 2017-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -66,7 +66,7 @@ dependencies:
66
66
  - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- description: Namify even names with apostrophe.
69
+ description: Namify any string even strings with apostrophe.
70
70
  email:
71
71
  - andrea.rampin@gmail.com
72
72
  executables: []
@@ -86,7 +86,8 @@ files:
86
86
  - string_namify.gemspec
87
87
  homepage: https://github.com/andrearampin/string_namify
88
88
  licenses: []
89
- metadata: {}
89
+ metadata:
90
+ allowed_push_host: http://mygemserver.com
90
91
  post_install_message:
91
92
  rdoc_options: []
92
93
  require_paths:
@@ -106,5 +107,5 @@ rubyforge_project:
106
107
  rubygems_version: 2.0.14.1
107
108
  signing_key:
108
109
  specification_version: 4
109
- summary: Namify even names with apostrophe.
110
+ summary: Namify any string even strings with apostrophe.
110
111
  test_files: []