music_today_api_wrapper 22.12.15.01 → 22.12.15.02

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
  SHA1:
3
- metadata.gz: b670e5d9e8d88a3dfb228e043105c42cc2b41160
4
- data.tar.gz: a4de60be3bdf2fe0914a3115b96222c95d2439da
3
+ metadata.gz: fe7ef535ebb2583ffd33da42ed9622ecddbdd289
4
+ data.tar.gz: d30f851887f6fa99ff9d102d82827259df8a3e3f
5
5
  SHA512:
6
- metadata.gz: 1b7c4eb3c514036871506cf8e5c4fb47e7a8571bd70373342260555f5e5a4496a475c77bd8f9f7a9c7566fd3330b5d9a39b5b863391d3df119de063610459f43
7
- data.tar.gz: bce782e82917e6e5182f08610048ab84b41cb19b66ccfdc2ff61083115313d232f2a60ae453b2f71ffea2f7d090e9c897c2343c7539d38d3f3fcb88174bcea01
6
+ metadata.gz: 7af11049cf359e22f6e2742c3f777b593c0e7ca8594610575cedf67bf9e74360370c67d14c5b1689659590f4b13aefabe86927f0a8a7d5e87e4d419df35a24a9
7
+ data.tar.gz: 316da87c1172e1be150323c5e781ff3df661aa60a2d8f1a2b9458b1ffbade7d5a523dd3b8cc12d63b842713926202f505c939e6c2aa7fef669dcf3b67eb38307
@@ -0,0 +1,10 @@
1
+ class String
2
+ def to_underscore!
3
+ gsub!(/(.)([A-Z])/, '\1_\2')
4
+ downcase!
5
+ end
6
+
7
+ def to_underscore
8
+ dup.tap(&:to_underscore!)
9
+ end
10
+ end
@@ -1,4 +1,4 @@
1
- require 'facets'
1
+ require 'resources/string'
2
2
  module MusicTodayApiWrapper
3
3
  module Resources
4
4
  class Variant
@@ -19,7 +19,9 @@ module MusicTodayApiWrapper
19
19
 
20
20
  variant_hash['variantNames'].each do |variant|
21
21
  variant_name = {}
22
- variant_name[variant.keys[0].snakecase.to_sym] = variant.values[0]
22
+ variant_name[variant.keys[0]
23
+ .to_underscore
24
+ .to_sym] = variant.values[0]
23
25
  variant_names << variant_name
24
26
  end
25
27
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: music_today_api_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 22.12.15.01
4
+ version: 22.12.15.02
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pablo Gonzaga
@@ -195,6 +195,7 @@ files:
195
195
  - lib/resources/product.rb
196
196
  - lib/resources/purchase/item.rb
197
197
  - lib/resources/purchase/shipping_option.rb
198
+ - lib/resources/string.rb
198
199
  - lib/resources/variant.rb
199
200
  - lib/rest_clients/common_response.rb
200
201
  - lib/rest_clients/music_today_rest_client.rb