flexirest 1.2.3 → 1.2.4

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: 0848a1654b64ccbc585f5dc619fb7c81611f0d7c
4
- data.tar.gz: 8d65facc11bfe9413e2f2f61d79088f7cc7e22c0
3
+ metadata.gz: 04507c65528dc2baef055f9197b1f12edd3492e4
4
+ data.tar.gz: f32284067eabbb3b79e4e010351f8787de76dbcf
5
5
  SHA512:
6
- metadata.gz: 3793f05bd5e8707a704ad3f12fe5f6d725349d4e21a31d7f1a9701ffc4454cdfd5ce2a3c17985aa3dc50f2edb95ca67a1e2204e7e378acfe02a8e6ce6fe95829
7
- data.tar.gz: e4aeb3fd76d09a52ab7f8efab500fb37f73b6824fb118e5ec49f80464379e791df97e9b851130ff7578ab23eb311441ba13ad99ab4b8fab0f17bd7644517cee4
6
+ metadata.gz: 1c1981bf74912034111120ad4054d87d1e18ee0be4725af68ca29e13e03cd80ec88423682ca2ad6d239e2a770ed92fd400a262ae463d0aaf2057211bd6883228
7
+ data.tar.gz: 66c1e257611da681ef0d99e8d3c80995591922a3c1aec4b1517144540e3b68d0c8764036aeef80057139a610c87e3612b5739bbfe410b57559402313babe184e
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.4 / 1.2.3
4
+
5
+ Bugfixes:
6
+
7
+ - Allows setting of base_url, username, password and request_body_type in a project-specific base class, then using that default in subclasses.
8
+ - Strings of four digits in the response are no longer treated as (invalid) dates (thanks Tom Hoen)
9
+ - 1.2.3 was pushed without a successful Travis build
10
+
3
11
  ## 1.2.2
4
12
 
5
13
  Features:
@@ -26,7 +26,7 @@ module Flexirest
26
26
  attribute_name = attribute_name.to_sym
27
27
  if attribute_value.to_s[/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6]))))$/]
28
28
  @attributes[attribute_name] = Date.parse(attribute_value)
29
- elsif attribute_value.to_s[/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/]
29
+ elsif attribute_value.to_s[/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)$/]
30
30
  @attributes[attribute_name] = DateTime.parse(attribute_value)
31
31
  else
32
32
  @attributes[attribute_name] = attribute_value
@@ -186,6 +186,7 @@ module Flexirest
186
186
  @base_url = nil
187
187
  @@base_url = nil
188
188
  @request_body_type = nil
189
+ @@request_body_type = nil
189
190
  @whiny_missing = nil
190
191
  @lazy_load = false
191
192
  @faraday_config = default_faraday_config
@@ -1,3 +1,3 @@
1
1
  module Flexirest
2
- VERSION = "1.2.3"
2
+ VERSION = "1.2.4"
3
3
  end
@@ -94,6 +94,11 @@ describe Flexirest::Base do
94
94
  expect(client["test"]).to eq(d)
95
95
  end
96
96
 
97
+ it "should allow strings of 4 digits and not intepret them as dates" do
98
+ client = EmptyExample.new(:test => "2015")
99
+ expect(client["test"]).to be_an_instance_of(String)
100
+ end
101
+
97
102
  it "should store attributes set using missing method names and mark them as dirty" do
98
103
  client = EmptyExample.new()
99
104
  client.test = "Something"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flexirest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Jeffries