bercow 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/bercow +18 -3
- data/lib/bercow/version.rb +1 -1
- metadata +5 -5
data/bin/bercow
CHANGED
@@ -82,12 +82,27 @@ rss_url = "#{options['host']}#{rss_host}/rss.xml"
|
|
82
82
|
reference = rss.xpath("//channel/atom:link[@rel = 'self']").to_a[0]
|
83
83
|
reference['href'] = rss_url
|
84
84
|
|
85
|
-
|
85
|
+
host_root = File.join options['cache'], rss_host
|
86
|
+
rss_feed = File.join host_root, 'rss.xml'
|
86
87
|
File.open rss_feed, 'w+' do |f|
|
87
88
|
f.print rss.to_s
|
88
89
|
end
|
89
90
|
|
91
|
+
subscribe_file = File.join host_root, 'index.html'
|
92
|
+
itpc_url = rss_url.gsub /^http/, 'itpc'
|
93
|
+
File.open subscribe_file, 'w+' do |f|
|
94
|
+
f.print <<-HTML
|
95
|
+
<html>
|
96
|
+
<head>
|
97
|
+
<title>Subscribe to #{options['rss']} as a podcast</title>
|
98
|
+
</head>
|
99
|
+
<body>
|
100
|
+
<p>Got iTunes? <a href="#{itpc_url}">Subscribe to #{options['rss']} as a podcast</a>.</p>
|
101
|
+
</body>
|
102
|
+
</html>
|
103
|
+
HTML
|
104
|
+
end
|
105
|
+
|
90
106
|
if options['verbose']
|
91
|
-
|
92
|
-
puts "iTunes users can subscribe at #{iptc_url}"
|
107
|
+
puts "iTunes users can subscribe at #{itpc_url}"
|
93
108
|
end
|
data/lib/bercow/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bercow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-10-08 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: stomp
|
16
|
-
requirement: &
|
16
|
+
requirement: &70325085784540 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70325085784540
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: nokogiri
|
27
|
-
requirement: &
|
27
|
+
requirement: &70325085779060 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70325085779060
|
36
36
|
description: ''
|
37
37
|
email:
|
38
38
|
- craig@barkingiguana.com
|