osdb 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 979dfb4d31ea0378b76781add14375369b33845d
4
- data.tar.gz: 7f0ad3167832f4bb0ae34b2ecdb32d2d60620627
3
+ metadata.gz: 204d2207f396150f87977719e16485bd0e830b7f
4
+ data.tar.gz: 84f0235da1e9a1eb2238732040928ecdb4f3a977
5
5
  SHA512:
6
- metadata.gz: 82f15527f5291e19ec795775e27609e8664508f49fa97bd7751635073df2936babe06a278f302251fe59a4007c6c70cc55f32a91998040942489534bc1592b3a
7
- data.tar.gz: c1bd1ce6031cfcb2da4ab1d427bc413762115afac38c674390c9ae4b669704f4208275818938b0035f008b2819fde6eefb5cd9799bdf068fcbcb30d0cefda4da
6
+ metadata.gz: 84e02bad15fa10fb8fe2aefc81caf37382e6895ca2b86a8b3b9b1bdcc7b64c215fd59e8339e04100efd20917cd9f16fcae3a4e43cb4db628661105dc0f341484
7
+ data.tar.gz: 279a878698b6a7e9497f6af691c8b3c302d84818f8bbd4c9171b12827a9d8147fe9a00fdbea15bac3a2c7709fc21d07ae774688c71630da20c06cd718497b193
@@ -22,7 +22,7 @@ module OSDb
22
22
  else
23
23
  ".#{format}"
24
24
  end
25
- path.gsub(File.extname(path), extension)
25
+ File.join(File.dirname(path), File.basename(path, File.extname(path)) + extension)
26
26
  end
27
27
 
28
28
  def hash
@@ -1,3 +1,3 @@
1
1
  module OSDb
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
@@ -9,4 +9,10 @@ describe OSDb::MovieFile do
9
9
  its(:hash) { should == '243339b48f4e8741' }
10
10
  its(:name) { should == 'somemovie' }
11
11
 
12
+ describe '#sub_path' do
13
+ it 'should only change the extension of the movie' do
14
+ movie_file = OSDb::MovieFile.new('directory-with-extension.avi/movie-file.avi', false)
15
+ movie_file.sub_path('srt').should == 'directory-with-extension.avi/movie-file.srt'
16
+ end
17
+ end
12
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: osdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-18 00:00:00.000000000 Z
11
+ date: 2015-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  version: '0'
153
153
  requirements: []
154
154
  rubyforge_project: osdb
155
- rubygems_version: 2.2.2
155
+ rubygems_version: 2.4.3
156
156
  signing_key:
157
157
  specification_version: 4
158
158
  summary: Ruby library to access OSDb services like OpenSubtitles.org