blackwinter-rss2mail 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  == VERSION
4
4
 
5
- This documentation refers to rss2mail version 0.0.3
5
+ This documentation refers to rss2mail version 0.0.4
6
6
 
7
7
 
8
8
  == DESCRIPTION
@@ -29,7 +29,10 @@
29
29
  require 'optparse'
30
30
  require 'yaml'
31
31
 
32
- base = File.join(File.dirname(__FILE__), '..')
32
+ require 'rubygems'
33
+ require 'nuggets/env/user_home'
34
+
35
+ base = File.expand_path(File.join(File.dirname(__FILE__), '..'))
33
36
  $: << File.join(base, 'lib')
34
37
 
35
38
  require 'rss2mail'
@@ -66,6 +69,14 @@ OptionParser.new { |opts|
66
69
  opts.on('-D', '--debug', "Print debug output and don't send any mails") {
67
70
  options[:debug] = true
68
71
  }
72
+
73
+ opts.on('-h', '--help', 'Print this help message and exit') {
74
+ abort opts.to_s
75
+ }
76
+
77
+ opts.on('--version', 'Print program version and exit') {
78
+ abort "#{File.basename($0)} v#{RSS2Mail::VERSION}"
79
+ }
69
80
  }.parse!
70
81
 
71
82
  if target = ARGV.shift
@@ -82,7 +93,11 @@ templates = Hash.new { |h, k|
82
93
  end
83
94
  }
84
95
 
85
- feeds_files = options.delete(:files) || [File.join(base, 'feeds.yaml')]
96
+ feeds_files = options.delete(:files) || if File.directory?(d = File.join(ENV.user_home, '.rss2mail'))
97
+ Dir[File.join(d, '*.yaml')]
98
+ else
99
+ [File.join(base, 'feeds.yaml')]
100
+ end
86
101
 
87
102
  feeds_files.each { |feeds_file|
88
103
  feeds = begin
@@ -25,6 +25,7 @@
25
25
  #++
26
26
 
27
27
  require 'rss2mail/feed'
28
+ require 'rss2mail/version'
28
29
 
29
30
  module RSS2Mail
30
31
  end
@@ -4,7 +4,7 @@ module RSS2Mail
4
4
 
5
5
  MAJOR = 0
6
6
  MINOR = 0
7
- TINY = 3
7
+ TINY = 4
8
8
 
9
9
  class << self
10
10
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blackwinter-rss2mail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Wille
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-02 00:00:00 -07:00
12
+ date: 2009-06-29 00:00:00 -07:00
13
13
  default_executable: rss2mail
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -76,19 +76,19 @@ files:
76
76
  - templates/plain.erb
77
77
  - templates/html.erb
78
78
  - example/feeds.yaml
79
- has_rdoc: true
79
+ has_rdoc: false
80
80
  homepage: http://rss2mail.rubyforge.org/
81
81
  post_install_message:
82
82
  rdoc_options:
83
83
  - --line-numbers
84
+ - --main
85
+ - README
84
86
  - --inline-source
85
87
  - --title
86
88
  - rss2mail Application documentation
87
- - --main
88
- - README
89
+ - --all
89
90
  - --charset
90
91
  - UTF-8
91
- - --all
92
92
  require_paths:
93
93
  - lib
94
94
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -108,7 +108,7 @@ requirements: []
108
108
  rubyforge_project: rss2mail
109
109
  rubygems_version: 1.2.0
110
110
  signing_key:
111
- specification_version: 2
111
+ specification_version: 3
112
112
  summary: Send RSS feeds as e-mail
113
113
  test_files: []
114
114