sched 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a101c3e618eec8f111d51642695e6d38452d3d63
4
- data.tar.gz: cfadcf4667315d5bc00719ce1585350f99966bdb
3
+ metadata.gz: d5eac01d5991bee9cc447616c813b14969521e89
4
+ data.tar.gz: b211ae4f06d48638cde04122d48671b0a2552d4c
5
5
  SHA512:
6
- metadata.gz: 281baf4229bb7e1794b1a77420b725a579f6607d4851e824a8644caac250ea831e8ffac70196a69ee1952640eb7ed5c5e349dcc296ce46c81a964628cb8ca016
7
- data.tar.gz: 8281be80bcc4fab4c4208f186fe0c52a172d94d6fc7bfee3f1858cca7eb7cd6fb56668828cce988afede58e669113f5189492319472df6ad6912ed54ecf561d8
6
+ metadata.gz: ea3b43024a511a803eaea8f5a0223262fc60c71b815c3f7665693156d594a0af61f54f8b65b7df8ec00e28e017b580e51881048ca4239df7217d74c831d32558
7
+ data.tar.gz: 71cfbfe5b4c4f6a114603f03a01cdba5139945a0f40ff414b4572f4f65d52289db01d119c68ab3becf15e93fabd433a8a8aed846564dc2c5eacc1015290eec6d
@@ -49,10 +49,17 @@ module Sched
49
49
  c.body_str
50
50
  end
51
51
 
52
- def parse_sessions(results)
53
- attributes = results.shift.map do |a|
54
- a.strip.gsub(/[\u0080-\u00ff]/, "").gsub(/^event_/, "session_").to_sym
52
+ def parse_attributes(attributes)
53
+ attributes.map do |a|
54
+ a.force_encoding("UTF-8")
55
+ .strip.gsub(/[\u0080-\u00ff]/, "")
56
+ .gsub(/^event_/, "session_")
57
+ .to_sym
55
58
  end
59
+ end
60
+
61
+ def parse_sessions(results)
62
+ attributes = parse_attributes(results.shift)
56
63
  results.map do |row|
57
64
  row_hash = {}
58
65
  attributes.each_with_index do |a, i|
@@ -1,3 +1,3 @@
1
1
  module Sched
2
- VERSION = "0.1.7".freeze unless Sched.const_defined?("VERSION")
2
+ VERSION = "0.1.8".freeze unless Sched.const_defined?("VERSION")
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sched
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Inge Jørgensen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-20 00:00:00.000000000 Z
11
+ date: 2016-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curb
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.9.3
27
27
  description: SCHED* (http://sched.org) API client library for Ruby
28
- email: inge@manualdesign.no
28
+ email: inge@kord.no
29
29
  executables: []
30
30
  extensions: []
31
31
  extra_rdoc_files: []