acts_as_content_node 0.1.12 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.12
1
+ 0.1.13
@@ -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.12"
8
+ s.version = "0.1.13"
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-04-14}
12
+ s.date = %q{2010-07-09}
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 = [
@@ -54,7 +54,7 @@ Gem::Specification.new do |s|
54
54
  s.homepage = %q{http://github.com/beef/acts_as_content_node}
55
55
  s.rdoc_options = ["--charset=UTF-8"]
56
56
  s.require_paths = ["lib"]
57
- s.rubygems_version = %q{1.3.5}
57
+ s.rubygems_version = %q{1.3.7}
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",
@@ -66,7 +66,7 @@ Gem::Specification.new do |s|
66
66
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
67
67
  s.specification_version = 3
68
68
 
69
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
69
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
70
70
  else
71
71
  end
72
72
  else
@@ -5,7 +5,7 @@ module Beef
5
5
  def acts_as_publishable
6
6
  send :include, InstanceMethods
7
7
 
8
- named_scope :published, lambda { { :conditions => ["(published_at IS NOT NULL AND published_at != '') AND published_at <= ? AND (published_to > ? OR published_to IS NULL OR published_to = '')", Time.now, Time.now] } }
8
+ named_scope :published, lambda { { :conditions => ["(published_at IS NOT NULL AND published_at != '') AND published_at <= ? AND (published_to > ? OR published_to IS NULL OR published_to = '')", Time.zone.now, Time.zone.now] } }
9
9
  named_scope :draft, :conditions => { :published_at => nil }
10
10
 
11
11
  before_save :set_published
@@ -18,7 +18,6 @@ module Beef
18
18
 
19
19
  def published?
20
20
  return false if published_at.nil?
21
- RAILS_DEFAULT_LOGGER.debug "#{published_at} #{published_to}"
22
21
  @published ||= (published_at <= Time.zone.now && (published_to.nil? || published_to > Time.zone.now))
23
22
  end
24
23
 
@@ -27,8 +26,8 @@ module Beef
27
26
  def set_published
28
27
  write_attribute :published_at, Time.zone.now if @publish and published_at.nil?
29
28
  if @hide
30
- write_attribute :published_at, nil
31
- write_attribute :published_to, nil
29
+ write_attribute :published_at, nil
30
+ write_attribute :published_to, nil
32
31
  end
33
32
  end
34
33
  end
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_content_node
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ hash: 1
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 13
10
+ version: 0.1.13
5
11
  platform: ruby
6
12
  authors:
7
13
  - Steve England
@@ -9,7 +15,7 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2010-04-14 00:00:00 +01:00
18
+ date: 2010-07-09 00:00:00 +01:00
13
19
  default_executable:
14
20
  dependencies: []
15
21
 
@@ -66,21 +72,27 @@ rdoc_options:
66
72
  require_paths:
67
73
  - lib
68
74
  required_ruby_version: !ruby/object:Gem::Requirement
75
+ none: false
69
76
  requirements:
70
77
  - - ">="
71
78
  - !ruby/object:Gem::Version
79
+ hash: 3
80
+ segments:
81
+ - 0
72
82
  version: "0"
73
- version:
74
83
  required_rubygems_version: !ruby/object:Gem::Requirement
84
+ none: false
75
85
  requirements:
76
86
  - - ">="
77
87
  - !ruby/object:Gem::Version
88
+ hash: 3
89
+ segments:
90
+ - 0
78
91
  version: "0"
79
- version:
80
92
  requirements: []
81
93
 
82
94
  rubyforge_project:
83
- rubygems_version: 1.3.5
95
+ rubygems_version: 1.3.7
84
96
  signing_key:
85
97
  specification_version: 3
86
98
  summary: Common functions for a record used as content of a website. Generator for cms and front end