publinator 0.0.12 → 0.0.13

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.
@@ -4,11 +4,8 @@ module Publinator
4
4
  class PublishableController < Publinator::ApplicationController
5
5
  def index
6
6
  @publication = Publinator::Publication.find_by_publishable_type_and_slug(params[:publishable_type].classify, 'index')
7
- if @publication.nil?
8
- logger.info "looking for publication with slug #{params[:publishable_type]}"
9
- @publication = Publinator::Publication.find_by_slug(params[:publishable_type])
7
+ if @publication
10
8
  @publishable = @publication.publishable
11
- logger.info @publication.to_yaml
12
9
  begin
13
10
  render "#{params[:publishable_type]}/show"
14
11
  rescue ActionView::MissingTemplate
@@ -12,7 +12,6 @@ module Publinator
12
12
  end
13
13
 
14
14
  def menu_section(title, path = "", collection)
15
- logger.info "Generating Menu Section for #{title}"
16
15
  if path.blank?
17
16
  ct = "
18
17
  <li id=\"#{title.underscore}\">#{title}<br>\n"
@@ -28,8 +27,6 @@ module Publinator
28
27
  end
29
28
  ct += "</ul>
30
29
  </div>"
31
- else
32
- logger.info "collection: #{ collection } did not generate a submenu."
33
30
  end
34
31
  ct += "</li>"
35
32
  ct.html_safe
@@ -3,6 +3,7 @@ module Publinator
3
3
  self.table_name = 'publinator_pages'
4
4
  acts_as_publishable
5
5
  attr_accessible :body, :kicker, :subtitle, :teaser, :title, :section, :asset_items, :asset_item, :asset_file
6
+ alias_attribute :name, :title
6
7
 
7
8
  def asset_types
8
9
  ['header']
@@ -25,7 +25,6 @@ module Publinator
25
25
  end
26
26
 
27
27
  def generate_slug
28
- logger.info "generating slug"
29
28
  if self.slug.blank? || slug =~ /temporary_slug\d?/
30
29
  if default
31
30
  self.slug = 'index'
@@ -42,7 +41,6 @@ module Publinator
42
41
  self.slug = "temporary_slug_#{rand(100000)}"
43
42
  end
44
43
  end
45
- logger.info "slug is #{ slug }"
46
44
  end
47
45
 
48
46
  def self.get_by_slug(slug)
@@ -3,8 +3,6 @@ module Publinator
3
3
  attr_accessible :name, :sluggable, :layout
4
4
 
5
5
  def self.matches?(request)
6
- logger.info request.path_parameters
7
- logger.info request.path_parameters[:publishable_type]
8
6
  pt = self.find_by_name(request.path_parameters[:publishable_type].singularize.capitalize)
9
7
  return pt.present?
10
8
  end
@@ -1,6 +1,5 @@
1
1
  <%= semantic_form_for [:manage, @publishable], :html => { :multipart => true } do |form| %>
2
2
  <% if @publishable.errors && @publishable.errors.count > 0 %>
3
- <% logger.info @publishable_errors.to_yaml %>
4
3
  <% @publishable.errors.full_messages.each do |e| %>
5
4
  <%= e %><br>
6
5
  <% end %>
@@ -1,6 +1,5 @@
1
- <% logger.info @site.class %>
2
1
  <%= form_for @site, :url => manage_sites_path do |form| %>
3
2
  <%= form.label :site, "Site Name" %>
4
3
  <%= form.text_field :name %>
5
4
  <%= form.submit %>
6
- <% end %>
5
+ <% end %>
@@ -1,3 +1,3 @@
1
- <h1><%= params["publishable_type"].capitalize %></h1>
1
+ <h1><%= params["publishable_type"].humanize.titleize %></h1>
2
2
 
3
- <%= render :collection => @publishables, :partial => "summary" %>
3
+ <%= render :collection => @publishables, :partial => "summary" %>
@@ -1,3 +1,3 @@
1
1
  module Publinator
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.13"
3
3
  end
data/lib/publinator.rb CHANGED
@@ -82,7 +82,6 @@ module Publinator
82
82
  end
83
83
 
84
84
  def verify_publication
85
- logger.info "verifying publication"
86
85
  if publication.nil?
87
86
  self.publication = Publinator::Publication.new(:publishable => self)
88
87
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: publinator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -350,7 +350,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
350
350
  version: '0'
351
351
  segments:
352
352
  - 0
353
- hash: 1803182662308414009
353
+ hash: -369282763332865225
354
354
  required_rubygems_version: !ruby/object:Gem::Requirement
355
355
  none: false
356
356
  requirements:
@@ -359,7 +359,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
359
359
  version: '0'
360
360
  segments:
361
361
  - 0
362
- hash: 1803182662308414009
362
+ hash: -369282763332865225
363
363
  requirements: []
364
364
  rubyforge_project:
365
365
  rubygems_version: 1.8.24