hooloo 0.2.0 → 0.2.1

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: 9f4f095f6794fb08c27b89da708e199b775aacfa
4
- data.tar.gz: b5cbca03b377ac16a3318c1ecd2cf0b7257852e0
3
+ metadata.gz: 85573d2b1b378c17ec0143207b0fe001e121e14b
4
+ data.tar.gz: 49a263beb1aebb40aad6122b973f047112bb91e4
5
5
  SHA512:
6
- metadata.gz: ceb4f432f0f795e0731cf84a3b2c51aedb7357493f884c5cf43242737a5cd70ebedb08fc8b66a34021f72b868a25395cdad4cdf0b94bc710b890740f53f9b192
7
- data.tar.gz: 693349abfc7048bfa83e5abf7694326b33aa16feb11bc6d95af520fd2467effb58a2e1329a874245c0d5ddbe3e66b150d371ab014ffa58f0ef00298dd80fe25b
6
+ metadata.gz: 102aab5dee2acd6fe9638a091340adbade108ba5bc2077e9a127a874ba73c42d6a9431ea122c4ef7e09ea26f0eb7129d37d78336c20611702e91fb6d0ab0cf2e
7
+ data.tar.gz: dbe99bf1541d50a9033402201f6f69dcff16cfbcce0ea350c0f1dc3c80f0ddf94913c01e47ac10c8772acb5406caccdf0ab4558a3ace25709840515d9e355cc4
@@ -30,5 +30,4 @@ an unofficial PHP client for this same API.
30
30
  spec.add_development_dependency "rake"
31
31
  spec.add_development_dependency "codeclimate-test-reporter"
32
32
  spec.add_development_dependency "fakeweb"
33
- spec.add_development_dependency "httplog"
34
33
  end
@@ -21,6 +21,16 @@ class Hooloo::MozartHash
21
21
  define_method(field.to_s + '?') { @obj[mapping] }
22
22
  end
23
23
  end
24
+ def uri(*mappings)
25
+ field_mapping(mappings).each do |field, mapping|
26
+ define_method(field.to_s) { URI @obj[mapping.to_s] }
27
+ end
28
+ end
29
+ def float(*mappings)
30
+ field_mapping(mappings).each do |field, mapping|
31
+ define_method(field.to_s) { @obj[mapping.to_s].to_f }
32
+ end
33
+ end
24
34
  def cast(klass, mappings, opts={map_array: true, map: false})
25
35
  field_mapping(mappings).each do |field, mapping|
26
36
  define_method(field) do
@@ -1,3 +1,3 @@
1
1
  class Hooloo
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -15,6 +15,6 @@ class Hooloo::Video < Hooloo::MozartHash
15
15
  date :available_at, :cache_time, :original_premiere_date, :released_at
16
16
  bool :embed_permitted, :has_captions, :has_hd, :is_auth_valid, :is_expiring, :is_html5_enabled,
17
17
  :is_mature, :is_subscriber_only, :is_web_only
18
- cast Float, :duration
19
- cast URI, :thumbnail_url
18
+ float :duration
19
+ uri :thumbnail_url
20
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hooloo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Lejeck
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-12 00:00:00.000000000 Z
11
+ date: 2014-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -80,20 +80,6 @@ dependencies:
80
80
  - - '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: httplog
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - '>='
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - '>='
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
83
  description: |
98
84
  Based on the magic of APIs, we are now capable of connecting to Hulu and retrieving their data for
99
85
  use in other applications. A warning to ye who dare use this, however: Hulu does not guarantee
@@ -150,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
136
  version: '0'
151
137
  requirements: []
152
138
  rubyforge_project:
153
- rubygems_version: 2.0.5
139
+ rubygems_version: 2.1.11
154
140
  signing_key:
155
141
  specification_version: 4
156
142
  summary: Unofficial Client for the Hulu "Hidden" API