hulu-automuter 0.0.1 → 0.0.2

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/README.markdown CHANGED
@@ -1,14 +1,14 @@
1
1
  # Hulu Automuter
2
2
 
3
3
 
4
- Hulu Automuter automatically mutes commercials that play while you watch Hulu
5
- shows and movies in your web browser.
4
+ Hulu Automuter automatically mutes your computer while a commercial is playing
5
+ at Hulu.com.
6
6
 
7
7
  [screenshots]
8
8
 
9
9
  Benefits:
10
10
 
11
- * You won't have to manually toggle your sound to mute those darn commercials
11
+ * You won't have to manually toggle your sound to mute those awesome commercials
12
12
  * The sound comes back on right on cue
13
13
  * Hulu still gets their ad impressions registered: it's as if you paid attention to them
14
14
 
@@ -16,7 +16,7 @@ Benefits:
16
16
  ## Prerequisites
17
17
 
18
18
  * Ruby 1.8.6 or higher (developed on Ruby 1.9.2)
19
- * OS X or Linux with `amixer` installed
19
+ * OS X, or Linux with `amixer` installed
20
20
  * a web browser you can configure to use an HTTP proxy (e.g. Chrome, Firefox)
21
21
 
22
22
 
@@ -44,7 +44,7 @@ To upgrade Hulu Automuter to a newer version, just repeat the installation proce
44
44
  To use hulu-automuter, you need to configure the web browser you want to use
45
45
  for watching Hulu to use hulu-automuter as its HTTP proxy.
46
46
 
47
- Configure the HTTP proxy setting in your web browser network proxy preferences
47
+ Configure the HTTP proxy setting in your web browser's network proxy preferences
48
48
  to localhost:proxy-port.
49
49
 
50
50
  For example, if you want to use the default, you should set your browser to use
@@ -60,8 +60,8 @@ Press `CTRL-c` to stop hulu-automuter.
60
60
 
61
61
  Please submit these at either of these places:
62
62
 
63
- * <https://github.com/danchoi/hulu-automuter/issues>
64
- * <http://groups.google.com/group/hulu-automuter-users>
63
+ * <https://github.com/danchoi/hulu_automuter/issues>
64
+ * <http://groups.google.com/group/hulu_automuter-users>
65
65
 
66
66
 
67
67
  ## About the developer
data/bin/hulu-automuter CHANGED
@@ -6,12 +6,39 @@ require 'hulu_automuter/version'
6
6
 
7
7
  port = 8123
8
8
 
9
+ help = <<END
10
+
11
+ ----------------------------------------
12
+ Hulu Automuter
13
+ by Daniel Choi <dhchoi@gmail.com>
14
+
15
+ Usage:
16
+
17
+ hulu-automuter [ -p port ]
18
+
19
+ -p [port] proxy port to use (default: 8123)
20
+ -v print version number
21
+
22
+ To use hulu-automuter, you need to configure the web browser you want to use
23
+ for watching Hulu to use hulu-automuter as its HTTP proxy.
24
+
25
+ Configure the HTTP proxy setting in your web browser network proxy preferences
26
+ to localhost:proxy-port.
27
+
28
+ For example, if you want to use the default, you should set your browser to use
29
+ a HTTP proxy at localhost:8123.
30
+
31
+ Then you can start hulu-automuter and go to hulu.com in your configured web
32
+ browser.
33
+
34
+ END
35
+
9
36
  if ARGV.first =~ /-p/
10
37
  port = ARGV[1] || 8123
11
38
  elsif ARGV.first =~ /-v/
12
39
  puts "HuluAutomuter v#{HuluAutomuter::VERSION}"
13
40
  elsif ARGV.first =~ /-h/
14
- puts DATA.read
41
+ puts help
15
42
  exit
16
43
  end
17
44
 
@@ -69,10 +96,17 @@ proxyproc = Proc.new{|req,res|
69
96
  end
70
97
  nil
71
98
  }
99
+
72
100
  $stderr = File.new('/dev/null', 'w')
73
- s = WEBrick::HTTPProxyServer.new(:Port => port,
74
- :BindAddress => '0.0.0.0',
75
- :RequestCallback => proxyproc)
101
+
102
+ begin
103
+ s = WEBrick::HTTPProxyServer.new(:Port => port,
104
+ :BindAddress => '0.0.0.0',
105
+ :RequestCallback => proxyproc)
106
+ rescue
107
+ $stderr = STDERR
108
+ raise
109
+ end
76
110
  trap("INT"){s.shutdown}
77
111
 
78
112
  puts "HuluAutomuter is starting on port #{port}"
@@ -83,28 +117,3 @@ s.start
83
117
 
84
118
  puts "Done"
85
119
 
86
- __END__
87
- ----------------------------------------
88
- Hulu Automuter
89
- by Daniel Choi <dhchoi@gmail.com>
90
-
91
- Usage:
92
-
93
- hulu-automuter [ -p port ]
94
-
95
- -p [port] proxy port to use (default: 8123)
96
- -v print version number
97
-
98
- To use hulu-automuter, you need to configure the web browser you want to use
99
- for watching Hulu to use hulu-automuter as its HTTP proxy.
100
-
101
- Configure the HTTP proxy setting in your web browser network proxy preferences
102
- to localhost:proxy-port.
103
-
104
- For example, if you want to use the default, you should set your browser to use
105
- a HTTP proxy at localhost:8123.
106
-
107
- Then you can start hulu-automuter and go to hulu.com in your configured web
108
- browser.
109
-
110
-
@@ -1,3 +1,3 @@
1
1
  module HuluAutomuter
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: hulu-automuter
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.1
5
+ version: 0.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Daniel Choi
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-07-11 00:00:00 -04:00
13
+ date: 2011-07-12 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies: []
16
16