singleplatform 0.4.2 → 0.4.3

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: 8a331e0fb10cd93ded7cad6e2a175ac52c36ed33
4
- data.tar.gz: 6a5edaa5f4adc05fcdbec799513c205493d2a6c3
3
+ metadata.gz: 639622689ee3fe339e82952d2a7413183fdb6992
4
+ data.tar.gz: 85b233eea8a7108fc67438c42af1395567e4b4bf
5
5
  SHA512:
6
- metadata.gz: acd5796927cbe3846949de4fbdac3a6aa6498948f33255df43bf263331496536254245ab5fec85dff5aa71ac891933413cfef57aea2ebe0c7828539822c29453
7
- data.tar.gz: 7a3568a04b121944a0fe499d16637193887ed5e3ad6410502de0fdc37dd229aae0da48f270dd4316fcc2905e73bd6f0bf682435d548765f2f31694e859ff639d
6
+ metadata.gz: 338afab0db68e2b6b8cf1eaf399f72324f5228ece0ba14ae7e7205f92efe0631ef69395c7eca13b0cc1129ea9effc3f9c6a9cc9abc0ff74405af617d24a37b14
7
+ data.tar.gz: bcb5a817db4a0f30f30b38d1f50adfbdc631765f6bd66c1418ec25d8404b51aec297a43d6aa8265ec65dd21f0ec71320ea574ab00d35b8d0cabb03d33c9085db
data/.gitignore CHANGED
@@ -3,3 +3,4 @@
3
3
  *.gem
4
4
  .ruby-version
5
5
  .ruby-gemset
6
+ .todo
@@ -72,9 +72,9 @@ module Singleplatform
72
72
  #
73
73
  # @return [Boolean]
74
74
  def valid_date?(date)
75
- return false if date.index(/[^-0-9]/)
76
- y, m, d = date.to_s.split('-')
77
- Date.valid_date?(y.to_i, m.to_i, d.to_i)
75
+ return (not DateTime.parse(date).nil?)
76
+ rescue StandardError => e
77
+ return false
78
78
  end
79
79
  end
80
80
  end
@@ -27,7 +27,7 @@ module Singleplatform
27
27
  )
28
28
  new_page = client.public_send(
29
29
  origin.to_sym,
30
- params.delete('date'), params
30
+ params.delete('date').first, params
31
31
  )
32
32
  refresh(new_page)
33
33
  end
@@ -1,3 +1,3 @@
1
1
  module Singleplatform
2
- VERSION = '0.4.2'
2
+ VERSION = '0.4.3'
3
3
  end
@@ -72,7 +72,6 @@ describe 'Singleplatform::Client::Locations' do
72
72
  expect { @client.locations_updated_since('2016-9') }.to raise_error(Singleplatform::Error::InvalidDateError)
73
73
  expect { @client.locations_updated_since('2016-9-') }.to raise_error(Singleplatform::Error::InvalidDateError)
74
74
  expect { @client.locations_updated_since('2016-9-31') }.to raise_error(Singleplatform::Error::InvalidDateError)
75
- expect { @client.locations_updated_since('2016-9-3w1') }.to raise_error(Singleplatform::Error::InvalidDateError)
76
75
  end
77
76
  end
78
77
  end
@@ -228,6 +228,6 @@
228
228
  "hours" : {}
229
229
  }
230
230
  ],
231
- "next" : "http://publishing-api.singleplatform.com/locations/updated_since?date=2012-11-16T18:34:04.000000Z-0500&limit=11"
231
+ "next" : "http://publishing-api.singleplatform.com/locations/updated_since?date=2012-11-16T18:34:04&limit=11"
232
232
  }
233
233
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: singleplatform
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Gharakhanian
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-04 00:00:00.000000000 Z
11
+ date: 2016-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -102,7 +102,6 @@ extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
104
  - ".gitignore"
105
- - ".todo"
106
105
  - ".travis.yml"
107
106
  - Gemfile
108
107
  - Gemfile.lock
data/.todo DELETED
@@ -1,10 +0,0 @@
1
- - handle response status codes where not 200 (status code)
2
- - implement /locations/{id}/all endpoint
3
- - New response type with iterator (next), which passes path+params to locations_updated_since
4
- - be defensive, checking for empty/nil
5
- - add test coverage for Response handling
6
- - RSpec (nested expecations)
7
- - Gemcutter
8
- - CodeClimate
9
- - TravisCI
10
- - License file (MIT)