sjunkieex 0.0.4 → 0.1.0

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/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+
data/Gemfile CHANGED
@@ -2,6 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem "turn"
4
4
  gem "ansi"
5
+ gem "rake"
5
6
 
6
7
  # Specify your gem's dependencies in sjunkieex.gemspec
7
8
  gemspec
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Sjunkieex (Serienjunkies Extractor)
1
+ # Sjunkieex (Serienjunkies Extractor) [![Build Status](https://secure.travis-ci.org/pboehm/sjunkieex.png)](http://travis-ci.org/pboehm/sjunkieex)
2
2
 
3
3
  Program that extracts links from serienjunkies.org for your series and
4
4
  searches for new episodes for existing series.
data/Rakefile CHANGED
@@ -2,6 +2,8 @@
2
2
  require 'bundler/gem_tasks'
3
3
  require 'rake/testtask'
4
4
 
5
+ task :default => [:test]
6
+
5
7
  Rake::TestTask.new do |t|
6
8
  t.libs << "test"
7
9
  t.test_files = FileList['test/test*.rb']
data/bin/sjunkieex CHANGED
@@ -5,6 +5,7 @@
5
5
  $LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
6
6
 
7
7
  require 'sjunkieex'
8
+ require 'sindex'
8
9
  require 'hashconfig'
9
10
  require 'optparse'
10
11
  require 'fileutils'
@@ -19,8 +20,7 @@ FileUtils.mkdir(CONFIG_DIR) unless File.directory?(CONFIG_DIR)
19
20
  STANDARD_CONFIG = {
20
21
  :hd_enabled => false,
21
22
  :hd_exceptions => ["SERIES_NOT_EXISTING_PLACEHOLDER"],
22
- :index_directory => File.join(CONFIG_DIR, ".index/"),
23
- :index_suffix => "xml",
23
+ :index_file => "",
24
24
  :hoster_id => "nl",
25
25
  :dump_links => true,
26
26
  :dump_file => "/tmp/gsl_links.txt",
@@ -54,16 +54,12 @@ OptionParser.new do |opts|
54
54
 
55
55
  end.parse!
56
56
 
57
- fail "index directory #{ config[:index_directory]} does not exist" unless
58
- File.directory?(config[:index_directory])
57
+ fail "index file #{ config[:index_file]} does not exist" unless
58
+ File.file?(config[:index_file])
59
59
 
60
+ series_index = Sindex::SeriesIndex.new(index_file: config[:index_file])
60
61
 
61
- glob_pattern = File.join(config[:index_directory] ,"*.#{config[:index_suffix]}")
62
- files = Dir[glob_pattern]
63
-
64
- series_index = Sjunkieex::SeriesIndex.new(files: files)
65
-
66
- fail "there is data for series existing" if series_index.empty?
62
+ fail "there is no data for series existing" if series_index.empty?
67
63
 
68
64
  ###
69
65
  # look for new series
@@ -34,7 +34,7 @@ module Sjunkieex
34
34
 
35
35
  next unless @index.is_series_in_index?(c)
36
36
 
37
- series_name = Sjunkieex::SeriesIndex.extract_seriesname(c)
37
+ series_name = Sindex::SeriesIndex.extract_seriesname(c)
38
38
  next unless series_name
39
39
 
40
40
  next if @index.episode_existing?(series_name, c)
@@ -68,7 +68,7 @@ module Sjunkieex
68
68
 
69
69
  next if @index.episode_existing?(series_name, episode_data)
70
70
 
71
- if id = Sjunkieex::SeriesIndex.extract_episode_identifier(episode_data)
71
+ if id = Sindex::SeriesIndex.extract_episode_identifier(episode_data)
72
72
 
73
73
  # classify episode resolution
74
74
  resolution = :sd
@@ -1,3 +1,3 @@
1
1
  module Sjunkieex
2
- VERSION = "0.0.4"
2
+ VERSION = "0.1.0"
3
3
  end
data/lib/sjunkieex.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  require "sjunkieex/version"
2
2
  require "sjunkieex/interface"
3
- require "sjunkieex/series_index"
4
3
 
5
4
  module Sjunkieex
6
5
 
data/sjunkieex.gemspec CHANGED
@@ -17,4 +17,5 @@ Gem::Specification.new do |gem|
17
17
 
18
18
  gem.add_runtime_dependency(%q<nokogiri>, [">= 1.5"])
19
19
  gem.add_runtime_dependency(%q<hashconfig>, [">= 0.0.1"])
20
+ gem.add_runtime_dependency(%q<sindex>, [">= 0.1.0"])
20
21
  end