tumbling 0.0.2 → 0.0.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.
- data/README.markdown +9 -0
- data/lib/tumbling/audio.rb +1 -1
- data/lib/tumbling/link.rb +1 -1
- data/lib/tumbling/photo.rb +1 -1
- data/lib/tumbling/post.rb +1 -1
- data/lib/tumbling/quote.rb +1 -1
- data/lib/tumbling/resource.rb +7 -4
- data/lib/tumbling/video.rb +1 -1
- data/lib/tumbling.rb +2 -3
- data/tumbling-0.0.2.gem +0 -0
- data/tumbling.gemspec +1 -1
- metadata +3 -1
data/README.markdown
ADDED
data/lib/tumbling/audio.rb
CHANGED
@@ -17,7 +17,7 @@ module Tumbling
|
|
17
17
|
{
|
18
18
|
:id => attributes['id'],
|
19
19
|
:url => attributes['url_with_slug'],
|
20
|
-
:date => attributes['date_gmt'],
|
20
|
+
:date => parse_time(attributes['date_gmt']),
|
21
21
|
:format => attributes['format'],
|
22
22
|
:slug => attributes['slug'],
|
23
23
|
:body => attributes['audio_player'],
|
data/lib/tumbling/link.rb
CHANGED
@@ -17,7 +17,7 @@ module Tumbling
|
|
17
17
|
{
|
18
18
|
:id => attributes['id'],
|
19
19
|
:url => attributes['url_with_slug'],
|
20
|
-
:date => attributes['date_gmt'],
|
20
|
+
:date => parse_time(attributes['date_gmt']),
|
21
21
|
:format => attributes['format'],
|
22
22
|
:slug => attributes['slug'],
|
23
23
|
:body => attributes['link_url'],
|
data/lib/tumbling/photo.rb
CHANGED
@@ -18,7 +18,7 @@ module Tumbling
|
|
18
18
|
{
|
19
19
|
:id => attributes['id'],
|
20
20
|
:url => attributes['url_with_slug'],
|
21
|
-
:date => attributes['date_gmt'],
|
21
|
+
:date => parse_time(attributes['date_gmt']),
|
22
22
|
:format => attributes['format'],
|
23
23
|
:slug => attributes['slug'],
|
24
24
|
:body => build_body(attributes['photo_url']),
|
data/lib/tumbling/post.rb
CHANGED
@@ -17,7 +17,7 @@ module Tumbling
|
|
17
17
|
{
|
18
18
|
:id => attributes['id'],
|
19
19
|
:url => attributes['url_with_slug'],
|
20
|
-
:date => attributes['date_gmt'],
|
20
|
+
:date => parse_time(attributes['date_gmt']),
|
21
21
|
:format => attributes['format'],
|
22
22
|
:slug => attributes['slug'],
|
23
23
|
:body => attributes['regular_body'],
|
data/lib/tumbling/quote.rb
CHANGED
@@ -18,7 +18,7 @@ module Tumbling
|
|
18
18
|
{
|
19
19
|
:id => attributes['id'],
|
20
20
|
:url => attributes['url_with_slug'],
|
21
|
-
:date => attributes['date_gmt'],
|
21
|
+
:date => parse_time(attributes['date_gmt']),
|
22
22
|
:format => attributes['format'],
|
23
23
|
:slug => attributes['slug'],
|
24
24
|
:body => attributes['quote_text'],
|
data/lib/tumbling/resource.rb
CHANGED
@@ -3,8 +3,8 @@ module Tumbling
|
|
3
3
|
include HTTParty
|
4
4
|
format :xml
|
5
5
|
|
6
|
-
def self.all
|
7
|
-
get_resources(type)
|
6
|
+
def self.all(query = {})
|
7
|
+
get_resources(type, query)
|
8
8
|
end
|
9
9
|
|
10
10
|
def type
|
@@ -17,6 +17,10 @@ module Tumbling
|
|
17
17
|
|
18
18
|
private
|
19
19
|
|
20
|
+
def self.parse_time(time)
|
21
|
+
Time.parse(time)
|
22
|
+
end
|
23
|
+
|
20
24
|
def initialize(hash = {})
|
21
25
|
hash.each do |key, value|
|
22
26
|
send("#{key}=", value)
|
@@ -42,8 +46,7 @@ module Tumbling
|
|
42
46
|
object.build(result)
|
43
47
|
end
|
44
48
|
|
45
|
-
def self.get_resources(type)
|
46
|
-
query = {}
|
49
|
+
def self.get_resources(type, query = {})
|
47
50
|
query.merge!({ :type => type }) unless type.nil?
|
48
51
|
|
49
52
|
results = get '/api/read', :query => query
|
data/lib/tumbling/video.rb
CHANGED
@@ -18,7 +18,7 @@ module Tumbling
|
|
18
18
|
{
|
19
19
|
:id => attributes['id'],
|
20
20
|
:url => attributes['url_with_slug'],
|
21
|
-
:date => attributes['date_gmt'],
|
21
|
+
:date => parse_time(attributes['date_gmt']),
|
22
22
|
:format => attributes['format'],
|
23
23
|
:slug => attributes['slug'],
|
24
24
|
:body => attributes['video_player'],
|
data/lib/tumbling.rb
CHANGED
data/tumbling-0.0.2.gem
ADDED
Binary file
|
data/tumbling.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tumbling
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Cox
|
@@ -41,8 +41,10 @@ files:
|
|
41
41
|
- lib/tumbling/video.rb
|
42
42
|
- lib/tumbling.rb
|
43
43
|
- LICENSE
|
44
|
+
- README.markdown
|
44
45
|
- script/console
|
45
46
|
- tumbling-0.0.1.gem
|
47
|
+
- tumbling-0.0.2.gem
|
46
48
|
- tumbling.gemspec
|
47
49
|
has_rdoc: true
|
48
50
|
homepage: http://github.com/cameroncox/tumbling
|