songdrop 0.1.6 → 0.1.7

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: 47d48248c1c2945482c9daba56b6dc3719150842
4
- data.tar.gz: c5f5a1615f65eab071cc0c5f2c302de719745dea
3
+ metadata.gz: c43caf721fafd77cee6ef6c7b65c03204eef25a0
4
+ data.tar.gz: 7b21184eb52411c51dbcea7ee03e55eb97d11492
5
5
  SHA512:
6
- metadata.gz: 2e1450e1b68274070a6877f32366147d3d264f24e2d49c9b0f026c432cef6d69ab569fbc7fcaa2d85c2f9e6dc836512b039347b0c21cc4ba9679f84a8dd523a9
7
- data.tar.gz: 3af936f35cae30ee10c5673bfc8d067b914fe4d13c4f209be43dc26b46e2ee2f45eb58391fc6bff2b41cf0710b3f87ed7dda280c2496251e94c194c51209f5da
6
+ metadata.gz: c83f183370b994bb2939e72e12221b0f921c726602c81d3f760382924f4814333e3c90968f05629fdb128cc78358abe8fc6f8ec5e0ccd9903c4afbf8d7f84000
7
+ data.tar.gz: 268b15f34f6c3a46fd62b7ccbd128b0946e2fc1be59465d32ad09d589a97f5aac820dd9c6e0bba1fc6b7d0b40825a9c68f3e5d52375ec7f0bb8e629eae7659cd
@@ -9,7 +9,10 @@ module Songdrop
9
9
  def method_missing(method, *args, &block)
10
10
  method = $1 if method =~ /(\S+)\?/
11
11
  method = method.to_sym
12
- @_properties[method]
12
+ result = @_properties[method]
13
+ result = Time.at(result.to_i) if result and method =~ /_at/
14
+ result = Time.at(result.to_i).to_date if result and method =~ /_on/
15
+ result
13
16
  end
14
17
 
15
18
  end
data/lib/songdrop.rb CHANGED
@@ -13,6 +13,7 @@ else
13
13
 
14
14
  require 'rest-client'
15
15
  require 'json'
16
+ require 'date'
16
17
 
17
18
  require_relative './songdrop/parser'
18
19
  require_relative './songdrop/client'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: songdrop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Taylor
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-17 00:00:00.000000000 Z
11
+ date: 2013-07-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: songdrop is a Ruby & RubyMotion client for the Songdrop.com API.
14
14
  email: moomerman@gmail.com