growltdf 0.4.2 → 0.4.3

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.
Files changed (5) hide show
  1. data/README +37 -0
  2. data/Rakefile +2 -4
  3. data/bin/growltdf +48 -30
  4. data/growltdf.gemspec +2 -2
  5. metadata +2 -1
data/README ADDED
@@ -0,0 +1,37 @@
1
+ NAME
2
+ growltdf v0.4.2
3
+
4
+ SYNOPSIS
5
+ growltdf [options]+
6
+
7
+ DESCRIPTION
8
+ growltdf is the greatest program evar. it let's you scrape
9
+ http://cyclingnews.com for TDF updates and dump them into growl to you can
10
+ keep up with the race while working.
11
+
12
+ . to install this code
13
+
14
+ - sudo gem install growltdf
15
+
16
+ . to run you need to enable your growl prefpane to look like this
17
+
18
+ http://s3.amazonaws.com/drawohara.com.screenshots/growltdf-prefpane.png
19
+
20
+ if you set a password you'll need to supply to the program when run.
21
+
22
+ . to run
23
+
24
+ without password
25
+
26
+ growltdf
27
+
28
+ with password
29
+
30
+ growltdf --growl-password=password
31
+
32
+ PARAMETERS
33
+ --stage=stage (0 ~> stage=latest)
34
+ --growl-password=growl-password (0 ~> growl-password)
35
+ --version
36
+ --help, -h
37
+
data/Rakefile CHANGED
@@ -184,11 +184,9 @@ BEGIN {
184
184
  end
185
185
  This.lib = lib
186
186
 
187
- version = ENV['VERSION'] || '0.4.2'
187
+ version = ENV['VERSION']
188
188
  unless version
189
- name = lib.capitalize
190
- require "./lib/#{ lib }"
191
- version = eval(name).send(:version)
189
+ version = `./bin/growltdf --version`.strip
192
190
  end
193
191
  This.version = version
194
192
 
data/bin/growltdf CHANGED
@@ -1,32 +1,34 @@
1
1
  #! /usr/bin/env ruby
2
2
 
3
- #
4
- # growltdf is the greatest program evar. it let's you scrape
5
- # http://cyclingnews.com for TDF updates and dump them into growl to you can
6
- # keep up with the race while working.
7
- #
8
- # . to install this code
9
- #
10
- # - sudo gem install growltdf
11
- #
12
- # . to run you need to enable your growl prefpane to look like this
13
- #
14
- # http://s3.amazonaws.com/drawohara.com.screenshots/growltdf-prefpane.png
15
- #
16
- # if you set a password you'll need to supply to the program when run.
17
- #
18
- # . to run
19
- #
20
- # without password
21
- #
22
- # growltdf
23
- #
24
- # with password
25
- #
26
- # growltdf --growl-password=password
27
- #
28
-
29
3
  Main {
4
+ description <<-__
5
+ growltdf is the greatest program evar. it let's you scrape
6
+ http://cyclingnews.com for TDF updates and dump them into growl to you can
7
+ keep up with the race while working.
8
+
9
+ . to install this code
10
+
11
+ - sudo gem install growltdf
12
+
13
+ . to run you need to enable your growl prefpane to look like this
14
+
15
+ http://s3.amazonaws.com/drawohara.com.screenshots/growltdf-prefpane.png
16
+
17
+ if you set a password you'll need to supply to the program when run.
18
+
19
+ . to run
20
+
21
+ without password
22
+
23
+ growltdf
24
+
25
+ with password
26
+
27
+ growltdf --growl-password=password
28
+ __
29
+
30
+ version '0.4.3'
31
+
30
32
  option('stage'){
31
33
  argument :required
32
34
  default :latest
@@ -36,6 +38,9 @@ Main {
36
38
  argument :required
37
39
  }
38
40
 
41
+ option('version'){
42
+ }
43
+
39
44
  def run
40
45
  setup_growl
41
46
 
@@ -53,9 +58,18 @@ Main {
53
58
  def setup_growl
54
59
  @growl =
55
60
  Growl.new(
56
- 'localhost', 'growltdf', %w[ race stage ],
61
+ 'localhost', 'growltdf', %w[ initialize race stage ],
57
62
  default_notifies=nil, params['growl-password'].value
58
63
  )
64
+
65
+ @growl.notify 'initialize', 'growltdf', 'starting...'
66
+
67
+ puts <<-__
68
+ you should see a growl notification now.
69
+ if you do not you need to configure growl as per
70
+
71
+ http://s3.amazonaws.com/drawohara.com.screenshots/growltdf-prefpane.png
72
+ __
59
73
  end
60
74
 
61
75
  def determine_the_current_stage
@@ -68,9 +82,6 @@ Main {
68
82
  if today.month == 7
69
83
  stage = today.day - 3
70
84
  if (1..21).include?(stage)
71
- if @stage != stage
72
- @growl.notify 'stage', "Stage #{ stage }"
73
- end
74
85
  @stage = stage
75
86
  end
76
87
  end
@@ -150,6 +161,13 @@ Main {
150
161
  rescue
151
162
  return false
152
163
  end
164
+
165
+ def before_run
166
+ if param['version'].given?
167
+ puts(version)
168
+ exit
169
+ end
170
+ end
153
171
  }
154
172
 
155
173
  BEGIN {
data/growltdf.gemspec CHANGED
@@ -3,11 +3,11 @@
3
3
 
4
4
  Gem::Specification::new do |spec|
5
5
  spec.name = "growltdf"
6
- spec.version = "0.4.2"
6
+ spec.version = "0.4.3"
7
7
  spec.platform = Gem::Platform::RUBY
8
8
  spec.summary = "growltdf"
9
9
 
10
- spec.files = ["bin", "bin/growltdf", "growltdf.gemspec", "Rakefile"]
10
+ spec.files = ["bin", "bin/growltdf", "growltdf.gemspec", "Rakefile", "README"]
11
11
  spec.executables = ["growltdf"]
12
12
 
13
13
  spec.require_path = "lib"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: growltdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ara T. Howard
@@ -55,6 +55,7 @@ files:
55
55
  - bin/growltdf
56
56
  - growltdf.gemspec
57
57
  - Rakefile
58
+ - README
58
59
  has_rdoc: true
59
60
  homepage: http://github.com/ahoward/growltdf/tree/master
60
61
  post_install_message: