ubermajestix-lightning 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.txt +1 -1
- data/lib/lightning.rb +1 -1
- data/lib/lightning/parser.rb +9 -2
- data/lib/lightning/post.rb +3 -9
- data/lightning.gemspec +2 -2
- metadata +2 -2
data/README.txt
CHANGED
data/lib/lightning.rb
CHANGED
data/lib/lightning/parser.rb
CHANGED
@@ -21,8 +21,15 @@ module Lightning
|
|
21
21
|
title = item.find('title').first.content
|
22
22
|
link = item.find('link').first.content
|
23
23
|
pub_date = Time.parse(item.find('pubDate').first.content)
|
24
|
-
thumbnail = item.find('media:thumbnail').first.attributes[:url] if item.find('media:thumbnail').first
|
25
|
-
|
24
|
+
thumbnail = item.find('media:thumbnail').first.attributes[:url] if item.find('media:thumbnail').first
|
25
|
+
player = item.find('media:player').first.attributes[:url] if item.find('media:player').first
|
26
|
+
posts << Lightning::Post.new( :title=>title,
|
27
|
+
:pub_date => pub_date,
|
28
|
+
:link => link,
|
29
|
+
:description => desc,
|
30
|
+
:feed => feed,
|
31
|
+
:thumbnail => thumbnail,
|
32
|
+
:player => player )
|
26
33
|
end
|
27
34
|
return posts
|
28
35
|
end
|
data/lib/lightning/post.rb
CHANGED
@@ -1,12 +1,6 @@
|
|
1
1
|
module Lightning
|
2
2
|
class Post
|
3
|
-
attr_accessor :feed
|
4
|
-
attr_accessor :title
|
5
|
-
attr_accessor :link
|
6
|
-
attr_accessor :description
|
7
|
-
attr_accessor :pub_date
|
8
|
-
attr_accessor :thumbnail
|
9
|
-
|
3
|
+
attr_accessor :feed, :title, :link, :description, :pub_date, :thumbnail, :player
|
10
4
|
|
11
5
|
def initialize(opts={})
|
12
6
|
self.title = opts[:title]
|
@@ -15,8 +9,8 @@ module Lightning
|
|
15
9
|
self.pub_date = opts[:pub_date]
|
16
10
|
self.feed = opts[:feed]
|
17
11
|
self.thumbnail = opts[:thumbnail]
|
18
|
-
|
19
|
-
|
12
|
+
self.player = opts[:player]
|
13
|
+
end
|
20
14
|
|
21
15
|
end
|
22
16
|
end
|
data/lightning.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{lightning}
|
5
|
-
s.version = "1.0.
|
5
|
+
s.version = "1.0.1"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Tyler Montgomery"]
|
9
|
-
s.date = %q{2009-03-
|
9
|
+
s.date = %q{2009-03-06}
|
10
10
|
s.description = %q{}
|
11
11
|
s.email = %q{tyler.a.montgomery@gmail.com}
|
12
12
|
s.executables = ["lightning", "url_puller"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ubermajestix-lightning
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tyler Montgomery
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-03-
|
12
|
+
date: 2009-03-06 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|