almost-happy 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/almost-happy.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{almost-happy}
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Darcy Laycock"]
12
- s.date = %q{2010-07-08}
12
+ s.date = %q{2010-07-17}
13
13
  s.description = %q{Helpers, convertors etc for Rails 3 to make page / post models for simple cases simple}
14
14
  s.email = %q{sutto@sutto.net}
15
15
  s.extra_rdoc_files = [
@@ -94,6 +94,6 @@ module AlmostHappy
94
94
  add_renderer :raw do |raw|
95
95
  Albino.highlight_code(raw.to_s)
96
96
  end
97
-
97
+
98
98
  end
99
- end
99
+ end
@@ -11,7 +11,11 @@ module AlmostHappy
11
11
  else
12
12
  value = value.present? && !["0", "false"].include?(value.to_s)
13
13
  end
14
- self.published_at = (value ? Time.now : nil)
14
+ if !published_at? && value
15
+ self.published_at = value
16
+ elsif published_at? && !value
17
+ self.published_at = nil
18
+ end
15
19
  end
16
20
 
17
21
  def published?
data/lib/almost_happy.rb CHANGED
@@ -4,7 +4,7 @@ require 'active_support/core_ext/class/attribute'
4
4
  require 'active_support/concern'
5
5
 
6
6
  module AlmostHappy
7
- VERSION = '0.2.1'.freeze
7
+ VERSION = '0.2.2'.freeze
8
8
 
9
9
  extend ActiveSupport::Autoload
10
10
 
data/lib/vendor/albino.rb CHANGED
@@ -95,4 +95,4 @@ class Albino
95
95
  string + " -#{flag} #{value}"
96
96
  end
97
97
  end
98
- end
98
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: almost-happy
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Darcy Laycock
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-08 00:00:00 +08:00
18
+ date: 2010-07-17 00:00:00 +08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency