wordnik 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/wordnik/version.rb +1 -1
- metadata +1 -2
- data/lib/wordnik/monkey_patches.rb +0 -26
data/Gemfile.lock
CHANGED
data/lib/wordnik/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: wordnik
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.3.
|
5
|
+
version: 0.3.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Zeke Sikelianos
|
@@ -145,7 +145,6 @@ files:
|
|
145
145
|
- lib/wordnik.rb
|
146
146
|
- lib/wordnik/configuration.rb
|
147
147
|
- lib/wordnik/endpoint.rb
|
148
|
-
- lib/wordnik/monkey_patches.rb
|
149
148
|
- lib/wordnik/operation.rb
|
150
149
|
- lib/wordnik/operation_parameter.rb
|
151
150
|
- lib/wordnik/request.rb
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# The methods below were snatch right outta Rails' ActiveSupport, so we don't have to depend on it..
|
2
|
-
# See http://api.rubyonrails.org/classes/ActiveSupport/Inflector.html#method-i-camelize
|
3
|
-
|
4
|
-
class String
|
5
|
-
|
6
|
-
# File activesupport/lib/active_support/inflector/methods.rb, line 48
|
7
|
-
def underscore(camel_cased_word)
|
8
|
-
word = camel_cased_word.to_s.dup
|
9
|
-
word.gsub!(/::/, '/')
|
10
|
-
word.gsub!(/([A-Z]+)([A-Z][a-z])/,'\1_\2')
|
11
|
-
word.gsub!(/([a-z\d])([A-Z])/,'\1_\2')
|
12
|
-
word.tr!("-", "_")
|
13
|
-
word.downcase!
|
14
|
-
word
|
15
|
-
end
|
16
|
-
|
17
|
-
# File activesupport/lib/active_support/inflector/methods.rb, line 28
|
18
|
-
def camelize(lower_case_and_underscored_word, first_letter_in_uppercase = true)
|
19
|
-
if first_letter_in_uppercase
|
20
|
-
lower_case_and_underscored_word.to_s.gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase }
|
21
|
-
else
|
22
|
-
lower_case_and_underscored_word.to_s[0].chr.downcase + camelize(lower_case_and_underscored_word)[1..-1]
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|