sutazekarate 0.0.8 → 0.0.9

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: 46c5e24e72aee40b8888d2b57ed84a7d37f9bb9888a2b704ae7ac452f079d2fd
4
- data.tar.gz: c2b6c9b7f62a6b849c7483b2ea81deac0a36a67e09621c680c5d0e54dddc260e
3
+ metadata.gz: d634c436128b74a8c862220ff7b580d25257cae676e63dbec3644fd2b0f13fe8
4
+ data.tar.gz: 71c32e15098702df9dc23b2cc9bba33e6ac3d02f11b68fdb6111385519ae429b
5
5
  SHA512:
6
- metadata.gz: 56750003dfe9b909d58e32bb99c6eb3e6e35757c939f01fdbfc8a14e79d64a44e8011035fc323da998bdd5209f99b88ba12986eb3db41448241c28dc2528dba5
7
- data.tar.gz: bd625c28c312ff1ea7b41a2573e9bc3b7630ee796fcaaa899db7d07a094ed8bbd112ccc95cb6be730ea46a62aa542e3c3b5ce519393bcad78aeaf957df99f12a
6
+ metadata.gz: cf52132698ba781788f20d3b4dfc2dc2a5c90ea5495aacfc9e778303b5df4eb47251f639ea9bc9fc2be31f72d356530f0d5653ee98cd33afc7b33b7c634afd6c
7
+ data.tar.gz: bd0e81a7c1e77f38cdaa2333c0c9d6b554427f4cb0febe896dc48441b3c6eee38f08d18afaf8fa94406a97ada1e91204986ac8ffa9407ca71b7b98041031bd4b
@@ -10,6 +10,7 @@ module Sutazekarate
10
10
  attribute :id
11
11
  attribute :position
12
12
  attribute :name
13
+ attribute :gender
13
14
  attribute :discipline
14
15
  attribute :duration
15
16
  attribute :location
@@ -116,6 +117,13 @@ module Sutazekarate
116
117
  category_element = Nokogiri::HTML5.fragment(data['kategoria'])
117
118
  category_span_elements = category_element.search('span')
118
119
  name_raw = category_span_elements[0].text.strip
120
+ gender = :unknown
121
+ if category_span_elements[0].attr('class').include?('classzeny')
122
+ gender = :female
123
+ end
124
+ if category_span_elements[0].attr('class').include?('classmuzi')
125
+ gender = :male
126
+ end
119
127
  name_match = name_raw.match(/^([^(\/]+?)\s*(?:\(([^)]+)\))?\s*(?:\/([^\/]+)\/)?$/)
120
128
  name = name_match[1]
121
129
  duration = name_match[3]
@@ -136,6 +144,7 @@ module Sutazekarate
136
144
  id:,
137
145
  position: data['pc'],
138
146
  name:,
147
+ gender:,
139
148
  discipline:,
140
149
  duration:,
141
150
  location:,
@@ -1,3 +1,3 @@
1
1
  module Sutazekarate
2
- VERSION = '0.0.8'.freeze
2
+ VERSION = '0.0.9'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sutazekarate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ahmed Al Hafoudh