handbrake 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ 0.0.2
2
+ =====
3
+
4
+ - Add {HandBrake::Chapter#number}.
5
+
1
6
  0.0.1
2
7
  =====
3
8
 
data/handbrake.gemspec CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Rhett Sutphin"]
10
10
  s.email = ["rhett@detailedbalance.net"]
11
- s.homepage = "https://github.com/rsutphin/handbrake-ruby"
11
+ s.homepage = "https://github.com/rsutphin/handbrake.rb"
12
12
  s.summary = %q{A ruby wrapper for HandBrakeCLI}
13
13
  s.description = %q{A lightweight literate ruby wrapper for HandBrakeCLI, the command-line interface for the HandBrake video transcoder.}
14
14
 
@@ -166,6 +166,11 @@ module HandBrake
166
166
  # "hh:mm:ss"
167
167
  attr_accessor :duration
168
168
 
169
+ ##
170
+ # @return [Fixnum] The chapter number for this chapter (a positive
171
+ # integer)
172
+ attr_accessor :number
173
+
169
174
  ##
170
175
  # Creates a new instance from the given title subtree.
171
176
  #
@@ -175,6 +180,7 @@ module HandBrake
175
180
  def self.from_tree(chapter_node)
176
181
  self.new.tap do |ch|
177
182
  ch.duration = chapter_node.name.scan(/duration (\d\d:\d\d:\d\d)/).first.first
183
+ ch.number = chapter_node.name.scan(/(\d+): cells/).first.first.to_i
178
184
  end
179
185
  end
180
186
  end
@@ -1,5 +1,5 @@
1
1
  module HandBrake
2
2
  ##
3
3
  # The current version
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
  end
@@ -83,6 +83,10 @@ module HandBrake
83
83
  it 'has the duration in seconds' do
84
84
  chapter.seconds.should == 203
85
85
  end
86
+
87
+ it 'has the number' do
88
+ chapter.number.should == 5
89
+ end
86
90
  end
87
91
  end
88
92
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: handbrake
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
  - Rhett Sutphin
@@ -89,7 +89,7 @@ files:
89
89
  - spec/handbrake/version_spec.rb
90
90
  - spec/spec_helper.rb
91
91
  has_rdoc: true
92
- homepage: https://github.com/rsutphin/handbrake-ruby
92
+ homepage: https://github.com/rsutphin/handbrake.rb
93
93
  licenses: []
94
94
 
95
95
  post_install_message: