PerfectlyNormal-Twitorious 0.2.6 → 0.2.7

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.
data/bin/twit CHANGED
@@ -21,7 +21,7 @@ module Twitorious
21
21
  status = Readline.readline("> ", true)
22
22
  raise Twitorious::TooLongUpdate.new(status) if status.length > 140
23
23
 
24
- cmd, args = status.split(" ")
24
+ cmd, *args = status.split(" ")
25
25
  case cmd
26
26
  when "!update": update
27
27
  when "!quit": exit
data/lib/twitorious.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Twitorious
2
- VERSION = '0.2.6'
2
+ VERSION = '0.2.7'
3
3
 
4
4
  class TooLongUpdate < StandardError; end
5
5
  end
@@ -34,8 +34,9 @@ module Twitorious
34
34
  return if updates.empty?
35
35
 
36
36
  updates.reverse.each do |update|
37
- image = Twitorious::Image.from_url(update["user"]["profile_image_url"], @config.image_store)
38
- @notifier.notify(update["user"]["screen_name"], update["text"], image.filename)
37
+ image = Twitorious::Image.from_url(update["user"]["profile_image_url"], @config.image_store)
38
+ filename = image ? image.filename : @site[:icon]
39
+ @notifier.notify(update["user"]["screen_name"], update["text"], filename)
39
40
  sleep @config.sleep_between_notifications.to_i
40
41
  end
41
42
 
@@ -24,7 +24,7 @@ module Twitorious
24
24
  end
25
25
  puts res.class
26
26
 
27
- return Image.new(File.join([path, "default.png"])) unless res.class == Net::HTTPOK
27
+ return nil unless res.class == Net::HTTPOK
28
28
  File.mkdirs(path) if !File.exists?(path)
29
29
 
30
30
  File.open(file, "wb+") do |f|
data/twitorious.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "Twitorious"
3
- s.version = "0.2.6"
3
+ s.version = "0.2.7"
4
4
  s.date = "2009-03-26"
5
5
  s.author = "Per Christian B. Viken"
6
6
  s.email = "perchr@northblue.org"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: PerfectlyNormal-Twitorious
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Per Christian B. Viken