tumblr_wrapper 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -89,6 +89,18 @@ For example,
89
89
  response.blog[:title].should == "Your Blog Title"
90
90
  response.posts.should be_a(Array)
91
91
 
92
+ Additional:
93
+ The date format tumblr expects when you are scheduling a post or updating the date the post was created is a lambda defined here:
94
+
95
+ TumblrWrapper.date_format
96
+
97
+ In Rails 3, for example, you may want to set it up in an initializer:
98
+
99
+ Time::DATE_FORMATS[:tumblr] = TumblrWrapper.date_format
100
+
101
+ Time.now.to_s(:tumblr)
102
+ => "2012-08-10 19:12:32 GMT"
103
+
92
104
  ## Contributing
93
105
 
94
106
  1. Fork it
@@ -35,6 +35,10 @@ module TumblrWrapper
35
35
  @@consumer_secret
36
36
  end
37
37
 
38
+ def self.date_format
39
+ lambda { |t| t.utc.strftime("%Y-%m-%d %H:%M:%S GMT") }
40
+ end
41
+
38
42
  def self.oauth_endpoint
39
43
  OAUTH_ENDPOINT
40
44
  end
@@ -1,3 +1,3 @@
1
1
  module TumblrWrapper
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 0
9
- version: 0.4.0
8
+ - 1
9
+ version: 0.4.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - rheaton
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2012-08-07 00:00:00 -04:00
17
+ date: 2012-08-08 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency