gridcli 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,12 +33,12 @@ module GridCLI
33
33
  begin
34
34
  log "Trying to send a message '#{subject}' to '#{recipients}'"
35
35
  post = Post::Message.create :subject => subject, :body => body, :recipients => recipients, :posttype => 'message'
36
+ puts "Message to #{recipients} send successfully."
36
37
  rescue ActiveResource::ClientError
37
38
  puts "There was an error sending your message. Please make sure everyone in your recipient list is a friend, and the message body isn't empty."
38
39
  return
39
40
  end
40
-
41
- pprint post.to_post_json
41
+
42
42
  end
43
43
  end
44
44
 
@@ -104,7 +104,11 @@ module GridCLI
104
104
  j = JSON.parse(string)
105
105
  @type = j.keys.first
106
106
  @contents = j[@type]
107
- @contents['created_at'] = Time.parse(@contents['created_at']).localtime.to_s
107
+ if @contents.has_key? 'created_at'
108
+ @contents['created_at'] = Time.parse(@contents['created_at']).localtime.to_s
109
+ else
110
+ @contents['created_at'] = Time.now
111
+ end
108
112
  rescue JSON::ParserError
109
113
  @type = nil
110
114
  @format = nil
@@ -1,3 +1,3 @@
1
1
  module GridCLI
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gridcli
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 9
10
- version: 0.0.9
9
+ - 10
10
+ version: 0.0.10
11
11
  platform: ruby
12
12
  authors:
13
13
  - Brian Muller