shelr 0.16.2 → 0.16.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -76,6 +76,12 @@ and setup it as recording backend.
76
76
  sudo port install ttyrec # BSD / OSX
77
77
  shelr backend ttyrec # BSD / OSX
78
78
 
79
+ To enable sound recordings, you need to install `sox`.
80
+
81
+ brew install sox # OSX
82
+ sudo port install sox # BSD / OSX
83
+ sudo apt-get install sox # Ubuntu / Debian
84
+
79
85
  ## Copyright
80
86
 
81
87
  (Э) 2010, 2011, 2012 Antono Vasiljev and
@@ -110,18 +110,24 @@ module Shelr
110
110
  end
111
111
 
112
112
  def start_sound_recording
113
- STDOUT.puts "Sound file stored in #{record_file('sound.ogg')}"
114
- @sox_pid = fork do
115
- Signal.trap("INT") { puts "=> Sound recording finished!"; exit }
116
- `rec -C 1 --channels 1 --rate 16k --comment 'Recorded for http://shelr.tv/' #{record_file('sound.ogg')} 2>&1`
113
+ if system('which rec')
114
+ STDOUT.puts "Sound file stored in #{record_file('sound.ogg')}"
115
+ @sox_pid = fork do
116
+ Signal.trap("INT") { puts "=> Sound recording finished!"; exit }
117
+ `rec -C 1 --channels 1 --rate 16k --comment 'Recorded for http://shelr.tv/' #{record_file('sound.ogg')} 2>&1`
118
+ end
119
+ else
120
+ STDOUT.puts "Sound recording is not available. You need to install `sox` to enable sound recordings."
117
121
  end
118
122
  end
119
123
 
120
124
  def stop_sound_recording
121
- STDOUT.puts "=> Stopping sound recorder"
122
- sleep 2 # otherwise record will be cropped for some reason
123
- Process.kill("INT", @sox_pid)
124
- Process.waitpid(@sox_pid)
125
+ unless system('which rec')
126
+ STDOUT.puts "=> Stopping sound recorder"
127
+ sleep 2 # otherwise record will be cropped for some reason
128
+ Process.kill("INT", @sox_pid)
129
+ Process.waitpid(@sox_pid)
130
+ end
125
131
  end
126
132
 
127
133
  def recorder_cmd
data/lib/shelr/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Shelr
2
- VERSION = '0.16.2'
2
+ VERSION = '0.16.3'
3
3
  end
data/shelr.1 CHANGED
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "SHELR" "1" "April 2012" "" ""
4
+ .TH "SHELR" "1" "June 2012" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBshelr\fR \- screencasting for shell ninjas
@@ -21,6 +21,9 @@ Also you can shere Your records at http://shelr\.tv/ or other services\.
21
21
  \fBrecord\fR
22
22
  Will record your terminal unless you type \fBexit\fR or Ctrl+D and store it to $HOME/\.local/share/shelr/
23
23
  .
24
+ .IP
25
+ If you want sound recording pass \-\-sound option\. You should have \fBsox\fR installed\.
26
+ .
24
27
  .TP
25
28
  \fBlist\fR
26
29
  lists all your shellcasts\.
data/shelr.1.ronn CHANGED
@@ -17,6 +17,9 @@ or other services.
17
17
  * `record`:
18
18
  Will record your terminal unless you type `exit` or Ctrl+D and
19
19
  store it to $HOME/.local/share/shelr/
20
+
21
+ If you want sound recording pass --sound option.
22
+ You should have `sox` installed.
20
23
 
21
24
  * `list`:
22
25
  lists all your shellcasts.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shelr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.2
4
+ version: 0.16.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2012-05-06 00:00:00.000000000 Z
15
+ date: 2012-06-19 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: json
@@ -86,18 +86,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
86
86
  - - ! '>='
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
- segments:
90
- - 0
91
- hash: -1846460522952154709
92
89
  required_rubygems_version: !ruby/object:Gem::Requirement
93
90
  none: false
94
91
  requirements:
95
92
  - - ! '>='
96
93
  - !ruby/object:Gem::Version
97
94
  version: '0'
98
- segments:
99
- - 0
100
- hash: -1846460522952154709
101
95
  requirements: []
102
96
  rubyforge_project:
103
97
  rubygems_version: 1.8.21