sendyr 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -137,16 +137,14 @@ module Sendyr
137
137
  value.nil? ? false : value
138
138
  end
139
139
 
140
- def underscore(word)
141
- word = word.to_s.dup
142
- word.gsub!(/::/, '/')
143
- word.gsub!(/(?:([A-Za-z\d])|^)(#{inflections.acronym_regex})(?=\b|[^a-z])/) { "#{$1}#{$1 && '_'}#{$2.downcase}" }
144
- word.gsub!(/([A-Z\d]+)([A-Z][a-z])/,'\1_\2')
145
- word.gsub!(/([a-z\d])([A-Z])/,'\1_\2')
146
- word.tr!("-", "_")
147
- word.downcase!
148
- word
149
- end
140
+ def underscore(word)
141
+ word.gsub(/::/, '/').
142
+ gsub(/\s/, '_').
143
+ gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
144
+ gsub(/([a-z\d])([A-Z])/,'\1_\2').
145
+ tr("-", "_").
146
+ downcase
147
+ end
150
148
 
151
149
  def noop
152
150
  :noop
@@ -1,3 +1,3 @@
1
1
  module Sendyr
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: sendyr
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.0
5
+ version: 0.2.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Carl Mercier
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-09 00:00:00.000000000 Z
12
+ date: 2013-05-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  version_requirements: !ruby/object:Gem::Requirement