easy_dates 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest CHANGED
@@ -1,5 +1,7 @@
1
1
  Manifest
2
2
  README.rdoc
3
3
  Rakefile
4
+ easy_dates.gemspec
5
+ init.rb
4
6
  lib/easy_dates.rb
5
7
  lib/easy_dates/base.rb
data/README.rdoc CHANGED
@@ -54,6 +54,10 @@ Set your own name
54
54
 
55
55
  Set your own format
56
56
  :format => "strftime format"
57
+ OR
58
+ :format => :us # US based time format (month-day-Year)
59
+ OR
60
+ :format => :world # Generalised time format (day-month-Year)
57
61
 
58
62
  Convenience method "formatted_column_name" is created, unless specified with :as
59
63
 
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('easy_dates', '0.0.1') do |p|
5
+ Echoe.new('easy_dates', '0.1.0') do |p|
6
6
  p.description = "Easy date formatting for ActiveRecord"
7
7
  p.url = "http://github.com/platform45/easy_dates"
8
8
  p.author = "Ryan Oberholzer"
data/easy_dates.gemspec CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{easy_dates}
5
- s.version = "0.0.1"
5
+ s.version = "0.1.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Ryan Oberholzer"]
9
- s.date = %q{2009-12-18}
9
+ s.date = %q{2010-01-03}
10
10
  s.description = %q{Easy date formatting for ActiveRecord}
11
11
  s.email = %q{ryan@platform45.com}
12
12
  s.extra_rdoc_files = ["README.rdoc", "lib/easy_dates.rb", "lib/easy_dates/base.rb"]
13
- s.files = ["Manifest", "README.rdoc", "Rakefile", "lib/easy_dates.rb", "lib/easy_dates/base.rb", "easy_dates.gemspec"]
13
+ s.files = ["Manifest", "README.rdoc", "Rakefile", "easy_dates.gemspec", "init.rb", "lib/easy_dates.rb", "lib/easy_dates/base.rb"]
14
14
  s.homepage = %q{http://github.com/platform45/easy_dates}
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Easy_dates", "--main", "README.rdoc"]
16
16
  s.require_paths = ["lib"]
data/init.rb ADDED
@@ -0,0 +1 @@
1
+ require 'easy_dates'
@@ -31,7 +31,7 @@ module EasyDates
31
31
  def generate_method(name, chosen_name, format)
32
32
  class_eval <<-EOL
33
33
  def #{chosen_name}
34
- #{name}.strftime("#{format}")
34
+ #{name}.nil? ? nil : #{name}.strftime("#{format}")
35
35
  end
36
36
  EOL
37
37
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_dates
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Oberholzer
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-18 00:00:00 +02:00
12
+ date: 2010-01-03 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -27,9 +27,10 @@ files:
27
27
  - Manifest
28
28
  - README.rdoc
29
29
  - Rakefile
30
+ - easy_dates.gemspec
31
+ - init.rb
30
32
  - lib/easy_dates.rb
31
33
  - lib/easy_dates/base.rb
32
- - easy_dates.gemspec
33
34
  has_rdoc: true
34
35
  homepage: http://github.com/platform45/easy_dates
35
36
  licenses: []