pat-maddox-twinkies 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 1
2
+ :patch: 2
3
3
  :major: 0
4
4
  :minor: 1
@@ -0,0 +1,5 @@
1
+ class DateTime
2
+ def pretty
3
+ strftime '%a, %d %b %Y %H:%M:%S'
4
+ end
5
+ end
@@ -45,7 +45,7 @@ module Twinkies
45
45
  xml.item do
46
46
  xml.title "#{tweet.user} - #{tweet.text}"
47
47
  xml.link tweet.link
48
- xml.pubDate tweet.created_at
48
+ xml.pubDate tweet.created_at.pretty
49
49
  xml.guid tweet.id, :isPermaLink => false
50
50
  end
51
51
  end
data/lib/twinkies.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  $:.unshift File.dirname(__FILE__)
2
2
  require 'dm-core'
3
3
  require 'twitter'
4
+ require 'ext/date_time'
4
5
  require 'twinkies/friend_searcher'
5
6
  require 'twinkies/url_list'
6
7
  require 'twinkies/item'
@@ -0,0 +1,8 @@
1
+ require File.dirname(__FILE__) + '/spec_helper'
2
+
3
+ describe DateTime, "#pretty" do
4
+ it "should print 'Day, dd Mon 2009 01:23:45" do
5
+ DateTime.parse('1/9/2009 3:45pm').pretty.
6
+ should == 'Fri, 09 Jan 2009 15:45:00'
7
+ end
8
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pat-maddox-twinkies
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pat Maddox
@@ -50,6 +50,8 @@ extra_rdoc_files: []
50
50
  files:
51
51
  - VERSION.yml
52
52
  - bin/twinkies
53
+ - lib/ext
54
+ - lib/ext/date_time.rb
53
55
  - lib/twinkies.rb
54
56
  - lib/twinkies
55
57
  - lib/twinkies/friend_searcher.rb
@@ -58,6 +60,7 @@ files:
58
60
  - lib/twinkies/item.rb
59
61
  - spec/spec_helper.rb
60
62
  - spec/url_list_spec.rb
63
+ - spec/date_time_spec.rb
61
64
  - spec/item_spec.rb
62
65
  has_rdoc: false
63
66
  homepage: http://github.com/pat-maddox/twinkies