video-torrent-info 0.1.23 → 0.1.24

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: 7aff9c070c4891b542eb76c6c77ad42d8dfae191
4
- data.tar.gz: 3cddab60704085e7aa2448e469f6f54b8a58f8c6
3
+ metadata.gz: bc394961b9c5c7b753be80e81edd7df5bb773c04
4
+ data.tar.gz: fff28069b2d58659e0d6ae207fb32235a2c99976
5
5
  SHA512:
6
- metadata.gz: 8a2f73867553e60484060843fd1cecebc42226c4753b3058c6f594267d69d22126ceaa0cb9c90a4aea1fa6edb6c25c708d99cba2625f33808f1f5c78c5af61a0
7
- data.tar.gz: 2d02b81844807aac950915876025863d056fdc9c9d8f4e894c0d0a3e0a9621a20112be17227a9489dac62ba72de59718d974ba3fd25f92d1e38bccc05a4d918e
6
+ metadata.gz: 9f551038adbbea7c36eef98365b7fbc4d35274c9cdf58654e0d59158106bf50344289c1a4040b64e13429f1f4b95e10cabb0116e3cdc2a7f2d8e19a2271b02e6
7
+ data.tar.gz: 1ac937357cffc96fe3d94048fe71bc14c79b346a1eb510fd66c2d8d8fd5e6c773bdc43f73b9981c5cb7d320d0540381bb526d691c6554339955933234123344e
@@ -0,0 +1,57 @@
1
+ # rcov generated
2
+ coverage
3
+ coverage.data
4
+
5
+ # rdoc generated
6
+ rdoc
7
+
8
+ # yard generated
9
+ doc
10
+ .yardoc
11
+
12
+ # bundler
13
+ .bundle
14
+
15
+ # jeweler generated
16
+ pkg
17
+
18
+ # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
19
+ #
20
+ # * Create a file at ~/.gitignore
21
+ # * Include files you want ignored
22
+ # * Run: git config --global core.excludesfile ~/.gitignore
23
+ #
24
+ # After doing this, these files will be ignored in all your git projects,
25
+ # saving you from having to 'pollute' every project you touch with them
26
+ #
27
+ # Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
28
+ #
29
+ # For MacOS:
30
+ #
31
+ #.DS_Store
32
+
33
+ # For TextMate
34
+ #*.tmproj
35
+ #tmtags
36
+
37
+ # For emacs:
38
+ #*~
39
+ #\#*
40
+ #.\#*
41
+
42
+ # For vim:
43
+ #*.swp
44
+
45
+ # For redcar:
46
+ #.redcar
47
+
48
+ # For rubinius:
49
+ #*.rbc
50
+ tmp
51
+ *.bundle
52
+ *.so
53
+ *.gem
54
+
55
+ .git
56
+
57
+ pkg
@@ -0,0 +1,26 @@
1
+ ---
2
+ language: ruby
3
+ sudo: false
4
+ rvm:
5
+ - 1.9.3
6
+ - 2.0.0
7
+ - 2.1.5
8
+ - 2.2.2
9
+ - 2.3.0
10
+ os:
11
+ - linux
12
+ - osx
13
+
14
+ matrix:
15
+ allow_failures:
16
+ # https://github.com/travis-ci/travis-ci/issues/5361
17
+ - os: osx
18
+ rvm: 2.3.0
19
+ - os: osx
20
+ rvm: 2.0.0
21
+
22
+ env:
23
+ global:
24
+ - CODECLIMATE_REPO_TOKEN=cb22b6809538fd7986ead14ac5fe2f561196cac9451a13b239855cd19ecbfd55
25
+
26
+ script: travis_wait 40 bundle exec rake
@@ -0,0 +1,73 @@
1
+ FROM buildpack-deps:xenial
2
+
3
+ # skip installing gem documentation
4
+ RUN mkdir -p /usr/local/etc \
5
+ && { \
6
+ echo 'install: --no-document'; \
7
+ echo 'update: --no-document'; \
8
+ } >> /usr/local/etc/gemrc
9
+
10
+ ENV RUBY_MAJOR 2.3
11
+ ENV RUBY_VERSION 2.3.0
12
+ ENV RUBY_DOWNLOAD_SHA256 ba5ba60e5f1aa21b4ef8e9bf35b9ddb57286cb546aac4b5a28c71f459467e507
13
+ ENV RUBYGEMS_VERSION 2.5.2
14
+
15
+ # some of ruby's build scripts are written in ruby
16
+ # we purge this later to make sure our final image uses what we just built
17
+ RUN set -ex \
18
+ && buildDeps=' \
19
+ bison \
20
+ libgdbm-dev \
21
+ ruby \
22
+ ' \
23
+ && apt-get update \
24
+ && apt-get install -y --no-install-recommends $buildDeps \
25
+ && apt-get install -y --no-install-recommends clang-3.8 clang \
26
+ && rm -rf /var/lib/apt/lists/* \
27
+ && curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
28
+ && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
29
+ && mkdir -p /usr/src/ruby \
30
+ && tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
31
+ && rm ruby.tar.gz \
32
+ && cd /usr/src/ruby \
33
+ && { echo '#define ENABLE_PATH_CHECK 0'; echo; cat file.c; } > file.c.new && mv file.c.new file.c \
34
+ && autoconf \
35
+ && ./configure --disable-install-doc --enable-shared \
36
+ && make -j"$(nproc)" \
37
+ && make install \
38
+ && apt-get purge -y --auto-remove $buildDeps \
39
+ && gem update --system $RUBYGEMS_VERSION \
40
+ && rm -r /usr/src/ruby
41
+
42
+ ENV BUNDLER_VERSION 1.11.2
43
+
44
+ RUN gem install bundler --version "$BUNDLER_VERSION"
45
+
46
+ # install things globally, for great justice
47
+ # and don't create ".bundle" in all our apps
48
+ ENV GEM_HOME /bundle
49
+ ENV BUNDLE_PATH="$GEM_HOME" \
50
+ BUNDLE_BIN="$GEM_HOME/bin" \
51
+ BUNDLE_SILENCE_ROOT_WARNING=1 \
52
+ BUNDLE_APP_CONFIG="$GEM_HOME"
53
+ ENV PATH $BUNDLE_BIN:$PATH
54
+ RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \
55
+ && chmod 777 "$GEM_HOME" "$BUNDLE_BIN"
56
+
57
+ # throw errors if Gemfile has been modified since Gemfile.lock
58
+ RUN bundle config --global frozen 1
59
+
60
+ RUN mkdir -p /usr/src/gem
61
+ WORKDIR /usr/src/gem
62
+
63
+ COPY Gemfile /usr/src/gem/
64
+ COPY Gemfile.lock /usr/src/gem/
65
+
66
+ RUN bundle install
67
+
68
+ COPY . /usr/src/gem
69
+
70
+ # RUN apt-get update && apt-get install -y nodejs --no-install-recommends && rm -rf /var/lib/apt/lists/*
71
+ # RUN apt-get update && apt-get install -y mysql-client postgresql-client sqlite3 --no-install-recommends && rm -rf /var/lib/apt/lists/*
72
+
73
+ CMD ["bundle", "exec", "rake"]
data/Gemfile CHANGED
@@ -7,4 +7,5 @@ group :development do
7
7
  gem 'rake-compiler'
8
8
  gem 'bencode', :git => 'git://github.com/vintikzzz/ruby-bencode.git'
9
9
  gem 'ffmpeg-video-info'
10
+ gem 'mini_portile2'
10
11
  end
@@ -8,19 +8,21 @@ GEM
8
8
  remote: http://rubygems.org/
9
9
  specs:
10
10
  diff-lcs (1.2.5)
11
- ffmpeg-video-info (0.2.10)
11
+ ffmpeg-video-info (0.2.13)
12
12
  mini_portile2
13
+ json (1.8.3)
13
14
  mini_portile2 (2.1.0)
14
15
  rake (10.5.0)
15
16
  rake-compiler (0.9.5)
16
17
  rake
17
- rdoc (4.2.1)
18
+ rdoc (4.2.2)
19
+ json (~> 1.4)
18
20
  rice (2.1.0)
19
21
  rspec (3.4.0)
20
22
  rspec-core (~> 3.4.0)
21
23
  rspec-expectations (~> 3.4.0)
22
24
  rspec-mocks (~> 3.4.0)
23
- rspec-core (3.4.2)
25
+ rspec-core (3.4.3)
24
26
  rspec-support (~> 3.4.0)
25
27
  rspec-expectations (3.4.0)
26
28
  diff-lcs (>= 1.2.0, < 2.0)
@@ -37,6 +39,7 @@ DEPENDENCIES
37
39
  bencode!
38
40
  bundler
39
41
  ffmpeg-video-info
42
+ mini_portile2
40
43
  rake-compiler
41
44
  rdoc
42
45
  rice
@@ -1,9 +1,17 @@
1
1
  = video-torrent-info
2
2
 
3
- Description goes here.
3
+ It simply loads small part of torrent that contains metadata and processes it with FFmpeg
4
+
5
+ == Status
6
+
7
+ {<img src="https://travis-ci.org/vintikzzz/video-torrent-info.svg?branch=master" alt="Build Status" />}[https://travis-ci.org/vintikzzz/video-torrent-info]
8
+ {<img src="https://codeclimate.com/github/vintikzzz/video-torrent-info/badges/gpa.svg" />}[https://codeclimate.com/github/vintikzzz/video-torrent-info]
9
+ {<img src="https://codeclimate.com/github/vintikzzz/video-torrent-info/badges/gpa.svg" />}[https://codeclimate.com/github/vintikzzz/video-torrent-info]
10
+ {<img src="https://www.versioneye.com/user/projects/56cc993418b2710494d7d474/badge.svg?style=flat" alt="Dependency Status" />}[https://www.versioneye.com/user/projects/56cc993418b2710494d7d474]
11
+
4
12
 
5
13
  == Contributing to video-torrent-info
6
-
14
+
7
15
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
8
16
  * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
9
17
  * Fork the project.
@@ -16,4 +24,3 @@ Description goes here.
16
24
 
17
25
  Copyright (c) 2013 Pavel Tatarsky. See LICENSE.txt for
18
26
  further details.
19
-
data/Rakefile CHANGED
@@ -1,6 +1,8 @@
1
1
  require 'rubygems'
2
2
  require 'bundler'
3
3
  require 'rake/extensiontask'
4
+ require 'rspec/core/rake_task'
5
+ RSpec::Core::RakeTask.new
4
6
  begin
5
7
  Bundler.setup(:default, :development)
6
8
  rescue Bundler::BundlerError => e
@@ -19,5 +21,9 @@ Rake::RDocTask.new do |rdoc|
19
21
  rdoc.rdoc_files.include('lib/**/*.rb')
20
22
  end
21
23
 
24
+ task :compile => [:'compile:torrent_client']
25
+ task :spec => [:compile]
26
+ task :default => :spec
27
+
22
28
  require 'rake/extensiontask'
23
29
  Rake::ExtensionTask.new('torrent_client')
@@ -0,0 +1,10 @@
1
+ gem:
2
+ build: .
3
+ volumes_from:
4
+ - tmp
5
+
6
+ tmp:
7
+ image: busybox
8
+ command: echo 'Data container running!'
9
+ volumes:
10
+ - /usr/src/gem/tmp
@@ -1,11 +1,121 @@
1
1
  require 'rubygems'
2
2
  require 'mkmf-rice'
3
+ require 'fileutils'
4
+ gem 'mini_portile2'
5
+ require 'mini_portile2'
6
+ $CXXFLAGS = '' if $CXXFLAGS.nil?
7
+ $CPPFLAGS << ' -Wno-unused-result -Wno-deprecated-declarations -Wno-sign-compare -Wno-unused-variable'
8
+ message "Using mini_portile version #{MiniPortile::VERSION}\n"
9
+
10
+ class BoostRecipe < MiniPortile
11
+ def configure
12
+ return if configured?
13
+
14
+ md5_file = File.join(tmp_path, 'configure.md5')
15
+ digest = Digest::MD5.hexdigest(computed_options.to_s)
16
+ File.open(md5_file, "w") { |f| f.write digest }
17
+ args = %W[
18
+ --with-toolset=clang
19
+ --without-libraries=python
20
+ stage
21
+ #{configure_prefix}
22
+ ]
23
+ execute('configure', %w(./bootstrap.sh) + args)
24
+ end
25
+
26
+ def make_cmd
27
+ './b2'
28
+ end
29
+ end
30
+
31
+ boost_recipe = BoostRecipe.new('boost', '1.60.0')
32
+ file = "http://downloads.sourceforge.net/project/boost/boost/#{boost_recipe.version}/boost_#{boost_recipe.version.gsub('.', '_')}.tar.gz"
33
+ message "Boost source url #{file}\n"
34
+ boost_recipe.files = [file]
35
+ checkpoint = ".#{boost_recipe.name}-#{boost_recipe.version}.installed"
36
+ unless File.exist?(checkpoint)
37
+ boost_recipe.cook
38
+ FileUtils.touch(checkpoint)
39
+ end
40
+ boost_recipe.activate
41
+
42
+ class OpenSSLRecipe < MiniPortile
43
+ def configure
44
+ return if configured?
45
+
46
+ md5_file = File.join(tmp_path, 'configure.md5')
47
+ digest = Digest::MD5.hexdigest(computed_options.to_s)
48
+ File.open(md5_file, "w") { |f| f.write digest }
49
+ if RUBY_PLATFORM =~ /darwin/
50
+ args = %W[
51
+ darwin64-x86_64-cc
52
+ enable-ec_nistp_64_gcc_128
53
+ #{configure_prefix}
54
+ shared
55
+ ]
56
+ execute('configure', %w(./Configure) + args)
57
+ elsif RUBY_PLATFORM =~ /linux/
58
+ args = %W[
59
+ #{configure_prefix}
60
+ shared
61
+ ]
62
+ execute('configure', %w(./config) + args)
63
+ end
64
+ end
65
+ end
66
+
67
+ openssl_recipe = OpenSSLRecipe.new('openssl', '1.0.2f')
68
+ file = "https://www.openssl.org/source/openssl-#{openssl_recipe.version}.tar.gz"
69
+ message "OpenSSL source url #{file}\n"
70
+ openssl_recipe.files = [file]
71
+ checkpoint = ".#{openssl_recipe.name}-#{openssl_recipe.version}.installed"
72
+ unless File.exist?(checkpoint)
73
+ openssl_recipe.cook
74
+ FileUtils.touch(checkpoint)
75
+ end
76
+ openssl_recipe.activate
77
+
78
+ class LibtorrentRecipe < MiniPortile
79
+ def configure
80
+ return if configured?
81
+
82
+ md5_file = File.join(tmp_path, 'configure.md5')
83
+ digest = Digest::MD5.hexdigest(computed_options.to_s)
84
+ File.open(md5_file, "w") { |f| f.write digest }
85
+ execute('configure', %w(./bootstrap.sh) + computed_options)
86
+ end
87
+ end
88
+
89
+ libtorrent_recipe = LibtorrentRecipe.new('libtorrent', '1.0.8')
90
+ file = "http://codeload.github.com/arvidn/libtorrent/tar.gz/libtorrent-#{libtorrent_recipe.version.gsub('.', '_')}"
91
+ message "Libtorrent source url #{file}\n"
92
+ libtorrent_recipe.files = [file]
93
+ libtorrent_recipe.configure_options = %W[
94
+ --enable-dht
95
+ --with-openssl=#{openssl_recipe.path}
96
+ --with-boost-libdir=#{boost_recipe.path}/lib
97
+ ]
98
+ checkpoint = ".#{libtorrent_recipe.name}-#{libtorrent_recipe.version}.installed"
99
+ unless File.exist?(checkpoint)
100
+ libtorrent_recipe.cook
101
+ FileUtils.touch(checkpoint)
102
+ end
103
+ libtorrent_recipe.activate
104
+
105
+ recipes = [libtorrent_recipe, boost_recipe, openssl_recipe]
106
+
107
+ $LDFLAGS << " -Wl,-rpath,#{recipes.map { |r| r.path + '/lib'}.join(':')}"
108
+
109
+ recipes.each do |r|
110
+ $LDFLAGS << " -L#{r.path}/lib"
111
+ $CPPFLAGS << " -I#{r.path}/include"
112
+ end
3
113
 
4
114
  if RUBY_PLATFORM =~ /darwin/
5
- $LDFLAGS << " -g -O2 -ftemplate-depth=120 -fvisibility-inlines-hidden -Wl,-bind_at_load -L/usr/local/lib -ltorrent-rasterbar -lboost_system -lssl -lcrypto -lz"
115
+ $LDFLAGS << " -g -O2 -ftemplate-depth=120 -fvisibility-inlines-hidden -Wl,-bind_at_load -ltorrent-rasterbar -lboost_system -lssl -lcrypto -lz"
6
116
  $CPPFLAGS << " -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PTHREAD=1 -DHAVE_BOOST=1 -DHAVE_BOOST_SYSTEM=1 -DHAVE_GETHOSTBYNAME=1 -DNDEBUG=1 -DTORRENT_USE_OPENSSL=1 -DWITH_SHIPPED_GEOIP_H=1 -DBOOST_ASIO_HASH_MAP_BUCKETS=1021 -DBOOST_EXCEPTION_DISABLE=1 -DBOOST_ASIO_ENABLE_CANCELIO=1 -DBOOST_ASIO_DYN_LINK=1 -DTORRENT_BUILDING_SHARED=1 -I. -ftemplate-depth-50 -Os -I/usr/local/include -g -O2 -ftemplate-depth=120 -fvisibility-inlines-hidden"
7
117
  elsif RUBY_PLATFORM =~ /linux/
8
- $LDFLAGS << " -g -O2 -fvisibility-inlines-hidden -L/usr/lib -ltorrent-rasterbar -lboost_system -lssl -lcrypto -lpthread"
118
+ $LDFLAGS << " -g -O2 -fvisibility-inlines-hidden -ltorrent-rasterbar -lboost_system -lssl -lcrypto -lpthread"
9
119
  $CPPFLAGS << " -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_PTHREAD=1 -DHAVE_BOOST=1 -DHAVE_BOOST_SYSTEM=1 -DHAVE_GETHOSTBYNAME=1 -DHAVE_GETHOSTBYNAME_R=1 -DGETHOSTBYNAME_R_RETURNS_INT=1 -DHAVE_CLOCK_GETTIME=1 -DNDEBUG=1 -DTORRENT_USE_OPENSSL=1 -DHAVE_LINUX_TYPES_H=1 -DHAVE_LINUX_FIEMAP_H=1 -DWITH_SHIPPED_GEOIP_H=1 -DBOOST_ASIO_HASH_MAP_BUCKETS=1021 -DBOOST_EXCEPTION_DISABLE=1 -DBOOST_ASIO_ENABLE_CANCELIO=1 -DBOOST_ASIO_DYN_LINK=1 -DTORRENT_BUILDING_SHARED=1 -I. -ftemplate-depth-50 -Os -I/usr/include -g -O2 -fvisibility-inlines-hidden"
10
120
  end
11
- create_makefile('torrent_client')
121
+ create_makefile('torrent_client')
@@ -1,3 +1,3 @@
1
1
  class VideoTorrentInfo
2
- VERSION = '0.1.23'
2
+ VERSION = '0.1.24'
3
3
  end
@@ -22,6 +22,7 @@ Gem::Specification.new do |s|
22
22
 
23
23
  s.add_dependency 'ffmpeg-video-info'
24
24
  s.add_dependency 'bencode'
25
+ s.add_dependency 'mini_portile2'
25
26
 
26
27
  s.add_development_dependency 'rdoc'
27
28
  s.add_development_dependency 'rake'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: video-torrent-info
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.23
4
+ version: 0.1.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Tatarsky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-12 00:00:00.000000000 Z
11
+ date: 2016-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffmpeg-video-info
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: mini_portile2
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rdoc
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -130,14 +144,18 @@ extensions:
130
144
  - ext/torrent_client/extconf.rb
131
145
  extra_rdoc_files: []
132
146
  files:
147
+ - ".dockerignore"
133
148
  - ".document"
134
149
  - ".gitignore"
135
150
  - ".rspec"
151
+ - ".travis.yml"
152
+ - Dockerfile
136
153
  - Gemfile
137
154
  - Gemfile.lock
138
155
  - LICENSE.txt
139
156
  - README.rdoc
140
157
  - Rakefile
158
+ - docker-compose.yml
141
159
  - ext/torrent_client/extconf.rb
142
160
  - ext/torrent_client/torrent_client.cpp
143
161
  - lib/video_torrent_info.rb