nike_v2 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ext/core_ext.rb +3 -8
- data/lib/nike_v2/resource.rb +1 -0
- data/lib/nike_v2/version.rb +1 -1
- data/lib/nike_v2.rb +2 -4
- data/nike_v2.gemspec +1 -2
- metadata +1 -1
data/lib/ext/core_ext.rb
CHANGED
@@ -6,7 +6,7 @@ class String
|
|
6
6
|
tr("-", "_").
|
7
7
|
downcase
|
8
8
|
end
|
9
|
-
def
|
9
|
+
def ss_camelize(first_letter_in_uppercase = false)
|
10
10
|
lower_case_and_underscored_word = self.to_s
|
11
11
|
if first_letter_in_uppercase
|
12
12
|
lower_case_and_underscored_word.gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase }
|
@@ -17,12 +17,7 @@ class String
|
|
17
17
|
end
|
18
18
|
|
19
19
|
class Symbol
|
20
|
-
def
|
21
|
-
|
22
|
-
if first_letter_in_uppercase
|
23
|
-
lower_case_and_underscored_word.gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase }.to_sym
|
24
|
-
else
|
25
|
-
(lower_case_and_underscored_word[0].downcase + lower_case_and_underscored_word.camelize[1..-1]).to_sym
|
26
|
-
end
|
20
|
+
def ss_camelize(first_letter_in_uppercase = false)
|
21
|
+
self.to_s.ss_camelize.to_sym
|
27
22
|
end
|
28
23
|
end
|
data/lib/nike_v2/resource.rb
CHANGED
data/lib/nike_v2/version.rb
CHANGED
data/lib/nike_v2.rb
CHANGED
@@ -1,7 +1,4 @@
|
|
1
|
-
require 'httparty'
|
2
|
-
require 'forwardable'
|
3
1
|
require 'alchemist'
|
4
|
-
require 'ext/core_ext'
|
5
2
|
|
6
3
|
require 'nike_v2/base'
|
7
4
|
require 'nike_v2/metric'
|
@@ -13,4 +10,5 @@ require 'nike_v2/activity'
|
|
13
10
|
require 'nike_v2/activities'
|
14
11
|
require 'nike_v2/summary'
|
15
12
|
require 'nike_v2/gps_data'
|
16
|
-
|
13
|
+
|
14
|
+
require 'ext/core_ext'
|
data/nike_v2.gemspec
CHANGED