prick-inflector 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a76c1380f25d21d7189a53e9e9411eea1bd101051e4da60935f37032ffa461b
4
- data.tar.gz: 53045c403e00bae01cb58525a8f2900d8b8c5a87000255d5cb45ed0ddc4c51ff
3
+ metadata.gz: ffc4c6b3f0e1b00a5dc6bdc56bd1ea60ad834956604f1b621206545df1c6dc9a
4
+ data.tar.gz: 46be81d23f549b91108ebd02fef2686f62d1a9e414d7fa092af6871e72f5dc26
5
5
  SHA512:
6
- metadata.gz: f67136b4fbcb6570177d4941d850002468486d7eb0ea0606bc6f392dbb02f68c6311d3cfc5a5553c05e42c48ee77a1996841300250a15b2f4919c7733dbf0d5c
7
- data.tar.gz: 256faee2e43fed297d413feb2edc677f039f58c69f95fd19c16b3d9966692b6d5696cc8266b70ef612bbebbc9df0e3727326869666ad787e24df45d9df9b742f
6
+ metadata.gz: 2d5fdbb7adc0d67ccbce0575a894532b26a5ed76a08f28dbc7cb2d34f5aff531c66deda9639e28ffbd0a3ce867ee8453bcdca2b153bb01ef6b656e1067fd53c5
7
+ data.tar.gz: 9c0ad1f1fd6b4bab004542751c63a33df797ce1752097f9c165e231059ff5dde6e7ce38bc792ed5d356ebc9bdead3f6b399d838d5ffeb943ad14abf8607a3ecf
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Prick
4
4
  module Inflector
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
@@ -22,7 +22,9 @@ module Prick::Inflector
22
22
  # Note that DryInflector::singularize handles the special PgGraph
23
23
  # pluralization rules by default
24
24
  def self.singularize(word)
25
- if word =~ /^(.*s)es$/ && pluralize($1) == word
25
+ if word == "s" # Dry::Inflector return an empty string
26
+ "s"
27
+ elsif word =~ /^(.*s)es$/ && pluralize($1) == word
26
28
  $1
27
29
  else
28
30
  @@inflector.singularize(word)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prick-inflector
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
  - Claus Rasmussen