refinerycms-podcast 0.5 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/app/controllers/refinery/podcasts/admin/podcasts_controller.rb +24 -0
- data/app/controllers/refinery/podcasts/podcasts_controller.rb +39 -0
- data/app/models/refinery/podcasts/podcast.rb +41 -0
- data/app/views/refinery/podcasts/admin/podcasts/_actions.html.erb +23 -0
- data/app/views/refinery/podcasts/admin/podcasts/_form.html.erb +98 -0
- data/app/views/refinery/podcasts/admin/podcasts/_podcast.html.erb +22 -0
- data/app/views/refinery/podcasts/admin/podcasts/_podcasts.html.erb +2 -0
- data/app/views/refinery/podcasts/admin/podcasts/_records.html.erb +18 -0
- data/app/views/refinery/podcasts/admin/podcasts/_sortable_list.html.erb +5 -0
- data/app/views/refinery/podcasts/admin/podcasts/edit.html.erb +1 -0
- data/app/views/refinery/podcasts/admin/podcasts/index.html.erb +7 -0
- data/app/views/refinery/podcasts/admin/podcasts/new.html.erb +1 -0
- data/app/views/refinery/podcasts/podcasts/index.html.erb +11 -0
- data/app/views/refinery/podcasts/podcasts/index.rss.builder +71 -0
- data/app/views/refinery/podcasts/podcasts/show.html.erb +59 -0
- data/config/locales/cs.yml +34 -0
- data/config/locales/en.yml +32 -14
- data/config/locales/es.yml +35 -0
- data/config/locales/fr.yml +34 -0
- data/config/locales/nb.yml +34 -0
- data/config/locales/nl.yml +32 -14
- data/config/routes.rb +15 -6
- data/db/migrate/1_create_refinery_podcasts.rb +33 -0
- data/db/migrate/2_add_slug_to_refinery_podcasts.rb +8 -0
- data/db/migrate/3_add_image_id_to_refinery_podcasts.rb +8 -0
- data/db/seeds.rb +25 -0
- data/lib/generators/refinery/podcasts/podcasts_generator.rb +24 -0
- data/lib/generators/refinery/podcasts/templates/config/initializers/refinery/podcasts.rb.erb +47 -0
- data/lib/refinery/podcasts.rb +22 -0
- data/lib/refinery/podcasts/configuration.rb +20 -0
- data/lib/refinery/podcasts/engine.rb +22 -0
- data/lib/refinerycms-podcast.rb +1 -0
- data/lib/tasks/refinery/podcasts.rake +13 -0
- data/readme.md +10 -44
- metadata +125 -62
- data/app/controllers/admin/podcasts_controller.rb +0 -5
- data/app/controllers/podcasts_controller.rb +0 -12
- data/app/models/podcast.rb +0 -24
- data/app/views/admin/podcasts/_form.html.erb +0 -59
- data/app/views/admin/podcasts/_podcast.html.erb +0 -16
- data/app/views/admin/podcasts/edit.html.erb +0 -1
- data/app/views/admin/podcasts/index.html.erb +0 -34
- data/app/views/admin/podcasts/new.html.erb +0 -1
- data/app/views/podcasts/index.rss.builder +0 -56
- data/generators/podcast/podcast_generator.rb +0 -23
- data/generators/podcast/templates/migration.rb +0 -32
- data/lib/gemspec.rb +0 -30
- data/lib/refinery/podcast.rb +0 -15
- data/lib/tasks/podcast.rake +0 -35
- data/license.md +0 -21
- data/rails/init.rb +0 -14
@@ -0,0 +1,20 @@
|
|
1
|
+
module Refinery
|
2
|
+
module Podcasts
|
3
|
+
include ActiveSupport::Configurable
|
4
|
+
|
5
|
+
config_accessor :title, :subtitle, :description, :author, :explicit_content,
|
6
|
+
:language, :image_url, :category, :subcategory,
|
7
|
+
:owner_name, :owner_email
|
8
|
+
|
9
|
+
self.title = "#{Refinery::Core.site_name} Podcast"
|
10
|
+
self.subtitle = "A show by #{Refinery::Core.site_name}"
|
11
|
+
self.description = "This is a podcast produced by #{Refinery::Core.site_name}"
|
12
|
+
self.author = "#{Refinery::Core.site_name}"
|
13
|
+
self.explicit_content = "no"
|
14
|
+
self.language = "en-us"
|
15
|
+
|
16
|
+
self.category = "Technology"
|
17
|
+
self.subcategory = "Tech News"
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Refinery
|
2
|
+
module Podcasts
|
3
|
+
class Engine < Rails::Engine
|
4
|
+
include Refinery::Engine
|
5
|
+
isolate_namespace Refinery::Podcasts
|
6
|
+
|
7
|
+
engine_name :refinery_podcasts
|
8
|
+
|
9
|
+
before_inclusion do
|
10
|
+
Refinery::Plugin.register do |plugin|
|
11
|
+
plugin.pathname = root
|
12
|
+
plugin.name = "podcasts"
|
13
|
+
plugin.url = proc { Refinery::Core::Engine.routes.url_helpers.podcasts_admin_podcasts_path }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
config.after_initialize do
|
18
|
+
Refinery.register_extension(Refinery::Podcasts)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'refinery/podcasts'
|
data/readme.md
CHANGED
@@ -1,48 +1,14 @@
|
|
1
|
-
#
|
1
|
+
# Podcasts engine for Refinery CMS.
|
2
2
|
|
3
|
-
|
3
|
+
Install using bundler:
|
4
4
|
|
5
|
-
|
5
|
+
```ruby
|
6
|
+
gem 'refinerycms-podcast', '~> 2.0'
|
7
|
+
```
|
6
8
|
|
7
|
-
|
9
|
+
Next, run:
|
8
10
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
gem 'refinerycms-podcast', '= 0.5'
|
14
|
-
|
15
|
-
Now run ``bundle install`` and once bundler has installed the gem run:
|
16
|
-
|
17
|
-
rake refinery:podcast:install
|
18
|
-
|
19
|
-
..and follow the instructions!
|
20
|
-
|
21
|
-
## Installation using Plugin
|
22
|
-
|
23
|
-
From within your Refinery directory at command line, install this as a plugin using:
|
24
|
-
|
25
|
-
script/plugin install git://github.com/djones/refinerycms-podcast.git
|
26
|
-
|
27
|
-
Then run:
|
28
|
-
|
29
|
-
rake refinery:podcast:install
|
30
|
-
|
31
|
-
## Setup
|
32
|
-
|
33
|
-
Edit ``/app/views/podcasts/index.rss.builder`` and fill out the documented parts with your podcast
|
34
|
-
channel information.
|
35
|
-
|
36
|
-
## Usage
|
37
|
-
|
38
|
-
Now on the backend of Refinery you should see a new "Podcast" tab. You can add your podcasts one by one there as you wish to publish them.
|
39
|
-
|
40
|
-
## iTunes Setup
|
41
|
-
|
42
|
-
Your iTunes Podcast URL should now be available at:
|
43
|
-
|
44
|
-
http://yoursite.com/podcast.rss
|
45
|
-
|
46
|
-
Now you need to tell iTunes about your podcast URL. Read: [How to publish a podcast on the iTunes Store](http://support.apple.com/kb/TA23478)
|
47
|
-
|
48
|
-
For more detailed technical information about making iTunes podcasts read: [Making a Podcast](http://www.apple.com/itunes/podcasts/specs.html)
|
11
|
+
```
|
12
|
+
rails generate refinery:podcast
|
13
|
+
rake db:migrate
|
14
|
+
```
|
metadata
CHANGED
@@ -1,85 +1,148 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: refinerycms-podcast
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease: false
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 5
|
9
|
-
version: "0.5"
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
10
5
|
platform: ruby
|
11
|
-
authors:
|
6
|
+
authors:
|
12
7
|
- David Jones
|
8
|
+
- Philip Arndt
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
12
|
+
date: 2016-09-15 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: refinerycms-core
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '3.0'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '3.0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: refinerycms-images
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '3.0'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '3.0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: refinerycms-acts-as-indexed
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '2.0'
|
49
|
+
type: :runtime
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '2.0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: friendly_id
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '5.0'
|
63
|
+
type: :runtime
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '5.0'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: refinerycms-testing
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '3.0'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '3.0'
|
84
|
+
description: Podcasting extension for Refinery CMS
|
85
|
+
email:
|
23
86
|
executables: []
|
24
|
-
|
25
87
|
extensions: []
|
26
|
-
|
27
88
|
extra_rdoc_files: []
|
28
|
-
|
29
|
-
|
30
|
-
- app/controllers/
|
31
|
-
- app/
|
32
|
-
- app/
|
33
|
-
- app/views/admin/podcasts/_form.html.erb
|
34
|
-
- app/views/admin/podcasts/_podcast.html.erb
|
35
|
-
- app/views/admin/podcasts/
|
36
|
-
- app/views/admin/podcasts/
|
37
|
-
- app/views/admin/podcasts/
|
38
|
-
- app/views/podcasts/
|
89
|
+
files:
|
90
|
+
- app/controllers/refinery/podcasts/admin/podcasts_controller.rb
|
91
|
+
- app/controllers/refinery/podcasts/podcasts_controller.rb
|
92
|
+
- app/models/refinery/podcasts/podcast.rb
|
93
|
+
- app/views/refinery/podcasts/admin/podcasts/_actions.html.erb
|
94
|
+
- app/views/refinery/podcasts/admin/podcasts/_form.html.erb
|
95
|
+
- app/views/refinery/podcasts/admin/podcasts/_podcast.html.erb
|
96
|
+
- app/views/refinery/podcasts/admin/podcasts/_podcasts.html.erb
|
97
|
+
- app/views/refinery/podcasts/admin/podcasts/_records.html.erb
|
98
|
+
- app/views/refinery/podcasts/admin/podcasts/_sortable_list.html.erb
|
99
|
+
- app/views/refinery/podcasts/admin/podcasts/edit.html.erb
|
100
|
+
- app/views/refinery/podcasts/admin/podcasts/index.html.erb
|
101
|
+
- app/views/refinery/podcasts/admin/podcasts/new.html.erb
|
102
|
+
- app/views/refinery/podcasts/podcasts/index.html.erb
|
103
|
+
- app/views/refinery/podcasts/podcasts/index.rss.builder
|
104
|
+
- app/views/refinery/podcasts/podcasts/show.html.erb
|
105
|
+
- config/locales/cs.yml
|
39
106
|
- config/locales/en.yml
|
107
|
+
- config/locales/es.yml
|
108
|
+
- config/locales/fr.yml
|
109
|
+
- config/locales/nb.yml
|
40
110
|
- config/locales/nl.yml
|
41
111
|
- config/routes.rb
|
42
|
-
-
|
43
|
-
-
|
44
|
-
-
|
45
|
-
-
|
46
|
-
- lib/
|
47
|
-
-
|
48
|
-
-
|
112
|
+
- db/migrate/1_create_refinery_podcasts.rb
|
113
|
+
- db/migrate/2_add_slug_to_refinery_podcasts.rb
|
114
|
+
- db/migrate/3_add_image_id_to_refinery_podcasts.rb
|
115
|
+
- db/seeds.rb
|
116
|
+
- lib/generators/refinery/podcasts/podcasts_generator.rb
|
117
|
+
- lib/generators/refinery/podcasts/templates/config/initializers/refinery/podcasts.rb.erb
|
118
|
+
- lib/refinery/podcasts.rb
|
119
|
+
- lib/refinery/podcasts/configuration.rb
|
120
|
+
- lib/refinery/podcasts/engine.rb
|
121
|
+
- lib/refinerycms-podcast.rb
|
122
|
+
- lib/tasks/refinery/podcasts.rake
|
49
123
|
- readme.md
|
50
|
-
|
51
|
-
homepage: http://refinerycms.com
|
124
|
+
homepage:
|
52
125
|
licenses: []
|
53
|
-
|
126
|
+
metadata: {}
|
54
127
|
post_install_message:
|
55
128
|
rdoc_options: []
|
56
|
-
|
57
|
-
require_paths:
|
129
|
+
require_paths:
|
58
130
|
- lib
|
59
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
60
|
-
|
61
|
-
requirements:
|
131
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
132
|
+
requirements:
|
62
133
|
- - ">="
|
63
|
-
- !ruby/object:Gem::Version
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
version: "0"
|
68
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
|
-
none: false
|
70
|
-
requirements:
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: '0'
|
136
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
|
+
requirements:
|
71
138
|
- - ">="
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
|
74
|
-
segments:
|
75
|
-
- 0
|
76
|
-
version: "0"
|
139
|
+
- !ruby/object:Gem::Version
|
140
|
+
version: '0'
|
77
141
|
requirements: []
|
78
|
-
|
79
142
|
rubyforge_project:
|
80
|
-
rubygems_version:
|
143
|
+
rubygems_version: 2.6.4
|
81
144
|
signing_key:
|
82
|
-
specification_version:
|
83
|
-
summary:
|
145
|
+
specification_version: 4
|
146
|
+
summary: Podcasts extension for Refinery CMS
|
84
147
|
test_files: []
|
85
|
-
|
148
|
+
has_rdoc:
|
data/app/models/podcast.rb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
class Podcast < ActiveRecord::Base
|
2
|
-
|
3
|
-
acts_as_indexed :fields => [:title, :author, :subtitle, :duration, :keywords, :summary]
|
4
|
-
|
5
|
-
validates_presence_of :title
|
6
|
-
validates_uniqueness_of :title
|
7
|
-
# validations to be added yet
|
8
|
-
|
9
|
-
belongs_to :file, :class_name => 'Resource'
|
10
|
-
|
11
|
-
default_scope :order => "published DESC"
|
12
|
-
|
13
|
-
def episode_number
|
14
|
-
episode = 0
|
15
|
-
|
16
|
-
Podcast.find(:all, :order => "published ASC").each do |p|
|
17
|
-
episode += 1
|
18
|
-
break if p === self
|
19
|
-
end
|
20
|
-
|
21
|
-
episode
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
@@ -1,59 +0,0 @@
|
|
1
|
-
<% form_for [:admin, @podcast] do |f| -%>
|
2
|
-
<%= f.error_messages %>
|
3
|
-
|
4
|
-
<div class='field'>
|
5
|
-
<%= f.label :title -%>
|
6
|
-
<%= f.text_field :title, :class => 'larger widest' -%>
|
7
|
-
</div>
|
8
|
-
|
9
|
-
<div class='field'>
|
10
|
-
<%= f.label :subtitle -%>
|
11
|
-
<%= f.text_field :subtitle, :size => 100 -%>
|
12
|
-
</div>
|
13
|
-
|
14
|
-
<div class='field'>
|
15
|
-
<span class='label_with_help'>
|
16
|
-
<%= f.label :file, 'Podcast file' -%>
|
17
|
-
<%= refinery_help_tag "Supported file formats include .m4a, .mp3, .mov, .mp4, .m4v, and .pdf" %>
|
18
|
-
</span>
|
19
|
-
<%= render :partial => "/shared/admin/resource_picker", :locals => {
|
20
|
-
:f => f,
|
21
|
-
:field => :file_id,
|
22
|
-
:resource => @podcast.file,
|
23
|
-
:description => "podcast"
|
24
|
-
} %>
|
25
|
-
</div>
|
26
|
-
|
27
|
-
<div class='field'>
|
28
|
-
<%= f.label :published -%>
|
29
|
-
<%= f.date_select :published -%>
|
30
|
-
</div>
|
31
|
-
|
32
|
-
<div class='field'>
|
33
|
-
<%= f.label :author -%>
|
34
|
-
<%= f.text_field :author -%>
|
35
|
-
</div>
|
36
|
-
|
37
|
-
<div class='field'>
|
38
|
-
<span class='label_with_help'>
|
39
|
-
<%= f.label :duration -%>
|
40
|
-
<%= refinery_help_tag "In HH:MM:SS format. E.g. \"10:22\" for 10 minutes 22 seconds" %>
|
41
|
-
</span>
|
42
|
-
<%= f.text_field :duration, :size => 6 -%>
|
43
|
-
</div>
|
44
|
-
|
45
|
-
<div class='field'>
|
46
|
-
<span class='label_with_help'>
|
47
|
-
<%= f.label :keywords -%>
|
48
|
-
<%= refinery_help_tag "Up to 12 keywords separated by commas. <br/><br/>E.g. rails, ruby on rails, refinerycms, refinery. <br/><br/>According to iTunes, the best use for keywords is to include common misspellings of your name or title, to ensure your podcast is still searchable despite a misspelling. To prevent keyword abuse, iTunes indexes only the first 12 keywords found in this tag." %>
|
49
|
-
</span>
|
50
|
-
<%= f.text_field :keywords, :size => 100 -%><br/>
|
51
|
-
</div>
|
52
|
-
|
53
|
-
<div class='field'>
|
54
|
-
<%= f.label :summary -%>
|
55
|
-
<%= f.text_area :summary, :rows => 5, :class => 'widest' -%>
|
56
|
-
</div>
|
57
|
-
|
58
|
-
<%= render :partial => "/shared/admin/form_actions", :locals => {:f => f, :continue_editing => false} %>
|
59
|
-
<% end -%>
|
@@ -1,16 +0,0 @@
|
|
1
|
-
<li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= dom_id(podcast) -%>">
|
2
|
-
<span class='title'>
|
3
|
-
#<%= podcast.episode_number %> <%=h podcast.title %>
|
4
|
-
<span class="preview">- <%=h truncate(podcast.subtitle, :length => 50) %></span>
|
5
|
-
</span>
|
6
|
-
<span class='actions'>
|
7
|
-
<%# link_to refinery_icon_tag("page_white_put.png"), podcast.file.public_filename,
|
8
|
-
:title => 'Download File',
|
9
|
-
:target => "_blank" %>
|
10
|
-
<%= link_to refinery_icon_tag("application_edit.png"), edit_admin_podcast_path(podcast),
|
11
|
-
:title => t('.edit') %>
|
12
|
-
<%= link_to refinery_icon_tag("delete.png"), admin_podcast_path(podcast),
|
13
|
-
:class => "cancel confirm-delete",
|
14
|
-
:title => t('.delete') %>
|
15
|
-
</span>
|
16
|
-
</li>
|