almanack 1.1.0.beta4 → 1.1.0.beta5

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: 52be6f20493ce692c731cb7645ea2a15c1de262a
4
- data.tar.gz: 16bafa4ccf103346e217e27a02ad8903c831eb57
3
+ metadata.gz: 0c36d9bfa065a70d2b6e3b5299213dc8ea38132b
4
+ data.tar.gz: 522b3819c8bc819ba3499f07c9d9e15d3d6476ea
5
5
  SHA512:
6
- metadata.gz: 8e080a7bd3590fd4b1dbba4cc10ee62343ee74a7fa918c892d33e6ba022c187e88b1bff142cbd8ac6d7096637b0b7408bc9f1145c4127494aa86de8a569ae673
7
- data.tar.gz: 4f2161cd106ce44b878b791e943c2f4c92504277d2d7a0fe7d2fda84cc8daf16cfda7bd48886b15637a22a670096f7c5cb354a6bc680ae244c8f379f2a43b964
6
+ metadata.gz: 7abe8380eab8d1a8ad8a7ba45ca92de6b8abbac1764fcd7e83f7d29b6c83b023d00f3530fb4c0604770aedaadbadafd69bc2a9f1b808a27fa8acfcdda0210047
7
+ data.tar.gz: 4cfe46e37c3570ff50858a05869754c501fb2a413b573caaa8038e04a3da79c7296b20172e1f9767b9c6cc83975f5e753c50eea6987772a6f81cc9f69c2bae49
@@ -25,6 +25,7 @@ module Almanack
25
25
 
26
26
  def connection
27
27
  @connection ||= Faraday.new do |conn|
28
+ conn.use FaradayMiddleware::FollowRedirects
28
29
  conn.response(:caching) { cache_store } if cache_responses
29
30
  conn.adapter Faraday.default_adapter
30
31
  end
@@ -15,15 +15,15 @@ module Almanack
15
15
  end
16
16
 
17
17
  def title
18
- self[:title].force_encoding('UTF-8')
18
+ safely_encoded(:title)
19
19
  end
20
20
 
21
21
  def location
22
- self[:location].force_encoding('UTF-8')
22
+ safely_encoded(:location)
23
23
  end
24
24
 
25
25
  def description
26
- self[:description].force_encoding('UTF-8')
26
+ safely_encoded(:description)
27
27
  end
28
28
 
29
29
  # Deprecated in favour of start_time
@@ -52,6 +52,10 @@ module Almanack
52
52
 
53
53
  private
54
54
 
55
+ def safely_encoded(attr)
56
+ self[attr].try(:force_encoding, 'UTF-8')
57
+ end
58
+
55
59
  def serialize_attribute(attribute)
56
60
  value = send(attribute)
57
61
  value.is_a?(Time) ? value.iso8601 : value
@@ -1,6 +1,6 @@
1
1
  module Almanack
2
2
  CODENAME = "Garlick"
3
- VERSION = "1.1.0.beta4"
3
+ VERSION = "1.1.0.beta5"
4
4
  HOMEPAGE = "https://github.com/Aupajo/almanack"
5
5
  ISSUES = "https://github.com/Aupajo/almanack/issues"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: almanack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.beta4
4
+ version: 1.1.0.beta5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Nicholls
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-21 00:00:00.000000000 Z
11
+ date: 2016-02-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra
@@ -378,7 +378,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
378
378
  version: 1.3.1
379
379
  requirements: []
380
380
  rubyforge_project:
381
- rubygems_version: 2.4.5.1
381
+ rubygems_version: 2.5.1
382
382
  signing_key:
383
383
  specification_version: 4
384
384
  summary: Combined events calendar for Google Calendar, iCal, Meetup.com and friends.