acts_as_content_node 0.1.10 → 0.1.11

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.10
1
+ 0.1.11
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{acts_as_content_node}
8
- s.version = "0.1.10"
8
+ s.version = "0.1.11"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Steve England"]
12
- s.date = %q{2010-01-27}
12
+ s.date = %q{2010-02-19}
13
13
  s.description = %q{Common functions for a record used as content of a website. Generator for cms and front end.}
14
14
  s.email = %q{steve@wearebeef.co.uk}
15
15
  s.extra_rdoc_files = [
@@ -58,8 +58,8 @@ Gem::Specification.new do |s|
58
58
  s.summary = %q{Common functions for a record used as content of a website. Generator for cms and front end}
59
59
  s.test_files = [
60
60
  "test/acts_as_content_node_test.rb",
61
- "test/schema.rb",
62
- "test/test_helper.rb"
61
+ "test/test_helper.rb",
62
+ "test/schema.rb"
63
63
  ]
64
64
 
65
65
  if s.respond_to? :specification_version then
@@ -18,14 +18,15 @@ module Beef
18
18
 
19
19
  def published?
20
20
  return false if published_at.nil?
21
- @published ||= published_at < Time.zone.now
21
+ RAILS_DEFAULT_LOGGER.debug "#{published_at} #{published_to}"
22
+ @published ||= (published_at <= Time.zone.now && (published_to.nil? || published_to > Time.zone.now))
22
23
  end
23
24
 
24
25
  private
25
26
 
26
27
  def set_published
27
28
  write_attribute :published_at, Time.zone.now if @publish and published_at.nil?
28
- if @hide
29
+ if @hide
29
30
  write_attribute :published_at, nil
30
31
  write_attribute :published_to, nil
31
32
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_content_node
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve England
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-27 00:00:00 +00:00
12
+ date: 2010-02-19 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -86,5 +86,5 @@ specification_version: 3
86
86
  summary: Common functions for a record used as content of a website. Generator for cms and front end
87
87
  test_files:
88
88
  - test/acts_as_content_node_test.rb
89
- - test/schema.rb
90
89
  - test/test_helper.rb
90
+ - test/schema.rb