twuckoo 0.4.0 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,4 @@
1
+ v0.4.2 Reset initial state when running out of things to tweet and send email about it. Tweet limit: tweets this many lines and then quits. Config file renamed to twuckoo.yml
1
2
  v0.2.2 Minor modification because of changed Wikipedia TFA markup
2
3
  v0.2 Wikipedia TFA module, command line argument decides which file to include
3
4
  v0.1.3 Length of sleeping interval settable from config
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.2
data/bin/twuckoo CHANGED
@@ -3,6 +3,6 @@
3
3
  dir = File.join(File.dirname(__FILE__), '..', 'lib')
4
4
  require File.join(dir, 'twuckoo')
5
5
 
6
- @runner = Twuckoo::Runner.new(ARGV)
6
+ @runner = Twuckoo::Runner.create(ARGV)
7
7
  # @runner.set_testing
8
8
  @runner.run
@@ -8,11 +8,9 @@ module WikipediaTFA
8
8
  def initialize(args=[])
9
9
  end
10
10
 
11
- def load_tweets
12
- end
13
-
14
- def store(line)
15
- end
11
+ def load_tweets; end
12
+ def store(line); end
13
+ def reset; end
16
14
 
17
15
  def fetch_main_page
18
16
  Hpricot(open("#{WIKIPEDIA_HOST}/wiki/Main_Page"))
@@ -102,7 +102,7 @@ class Twuckoo::Runner
102
102
  @config ||= ::Twuckoo::Config.new
103
103
  end
104
104
 
105
- def get_config_values_from_file(file='config/cuckoo.yml')
105
+ def get_config_values_from_file(file='config/twuckoo.yml')
106
106
  begin
107
107
  open(file, 'r') do |f|
108
108
  YAML.load(f.read)
@@ -119,7 +119,7 @@ class Twuckoo::Runner
119
119
  def setup_from_file
120
120
  setup do |config|
121
121
  get_config_values_from_file.each_pair do |attr, value|
122
- config[attr] = value
122
+ config[attr.to_sym] = value
123
123
  end
124
124
  end
125
125
  end
@@ -165,8 +165,8 @@ class Twuckoo::Runner
165
165
  Mail.deliver do
166
166
  from 'twuckoo@nowhere.com'
167
167
  to config[:email]
168
- subject %([twuckoo]: instance "#{name}" has nothing more to tweet)
169
- body "So please fill it up!"
168
+ subject %([twuckoo]: instance "#{name}" has done a reset)
169
+ body "And is now going full speed again."
170
170
  end
171
171
  end
172
172
  end
@@ -108,14 +108,4 @@ describe "A cuckoo twitterer with one line from a file" do
108
108
 
109
109
  end
110
110
 
111
- it "loads the lines when reset" do
112
- pending
113
- @twuckoo.stubs(:get_unused_lines).returns(["tweet me this", "tweet me that"])
114
- @twuckoo.setup do |config|
115
- config[:tweet_limit] = 2
116
- end
117
- @twuckoo.expects(:tweet).times(5)
118
- @twuckoo.run
119
- end
120
-
121
111
  end
data/twuckoo.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{twuckoo}
8
- s.version = "0.4.0"
8
+ s.version = "0.4.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Balint Erdi"]
12
- s.date = %q{2010-04-26}
12
+ s.date = %q{2010-04-28}
13
13
  s.default_executable = %q{twuckoo}
14
14
  s.description = %q{ A simple yet elegant solution to tweet a message regularly from a file (or from a webpage, a database, etc.)
15
15
  }
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
+ - 2
9
+ version: 0.4.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Balint Erdi
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-26 00:00:00 +02:00
17
+ date: 2010-04-28 00:00:00 +02:00
18
18
  default_executable: twuckoo
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency