poleica 0.10.3 → 0.10.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.dockerignore +4 -0
- data/Dockerfile +10 -0
- data/Gemfile +4 -2
- data/Gemfile.lock +1 -1
- data/lib/poleica/converters/libre_office.rb +1 -1
- data/lib/poleica/pathable.rb +8 -0
- data/lib/poleica/polei.rb +1 -9
- data/lib/poleica/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff772ed05f5fb4b006f18a60e4c34861e8ef09cb
|
4
|
+
data.tar.gz: e36bc66f94ae66bbc0af69f336431dfdcb160658
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e1b692c2c472737ca61f0e3d8022ef48d966fabdb9486df3192ea5f12eb321ae478b0bd60ca75ecad815102012ce774b926849f8c2ba6eb1dfc09368fb23813
|
7
|
+
data.tar.gz: 5a1e11cb1f28fb6ab17e19c9dc819f4fdd26abcae56d102ac4ae260dba60bc400ff2f43ae30e362d9283736b7d3635f37fd8d2e90b7b8161d491433e45627f0e
|
data/.dockerignore
ADDED
data/Dockerfile
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
FROM phusion/passenger-ruby21:0.9.15
|
2
|
+
|
3
|
+
RUN apt-get update -qq && apt-get install -qq libreoffice wget build-essential ghostscript
|
4
|
+
RUN wget http://78.108.103.11/MIRROR/ftp/GraphicsMagick/1.3/GraphicsMagick-1.3.20.tar.gz
|
5
|
+
RUN tar -xvf GraphicsMagick-1.3.20.tar.gz
|
6
|
+
RUN cd GraphicsMagick-1.3.20 && ./configure && make && make install
|
7
|
+
|
8
|
+
ADD . /poleica
|
9
|
+
WORKDIR /poleica
|
10
|
+
RUN bundle install
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -66,7 +66,7 @@ module Poleica
|
|
66
66
|
if File.directory?(options[:path])
|
67
67
|
File.join(options[:path], File.basename(polei.path_with_md5))
|
68
68
|
else
|
69
|
-
pathable_object.path_for_extension(
|
69
|
+
pathable_object.path_for_extension(polei.extension)
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
data/lib/poleica/pathable.rb
CHANGED
@@ -10,6 +10,14 @@ module Poleica
|
|
10
10
|
File.join(File.dirname(path), File.basename(path, '.*'))
|
11
11
|
end
|
12
12
|
|
13
|
+
def extension
|
14
|
+
File.extname(path)[1..-1] || ''
|
15
|
+
end
|
16
|
+
|
17
|
+
def name
|
18
|
+
File.basename(path, ".#{extension}")
|
19
|
+
end
|
20
|
+
|
13
21
|
def path_with_md5(extension = self.extension)
|
14
22
|
data = File.read(path)
|
15
23
|
md5 = Digest::MD5.new
|
data/lib/poleica/polei.rb
CHANGED
@@ -6,19 +6,11 @@ module Poleica
|
|
6
6
|
include Poleica::Pathable
|
7
7
|
include Poleica::Convertible
|
8
8
|
|
9
|
-
attr_reader :path
|
9
|
+
attr_reader :path
|
10
10
|
|
11
11
|
def initialize(path)
|
12
12
|
@path = path.strip
|
13
13
|
fail "No file @ #{path}" unless File.exist?(path)
|
14
14
|
end
|
15
|
-
|
16
|
-
def name
|
17
|
-
File.basename(path, ".#{extension}")
|
18
|
-
end
|
19
|
-
|
20
|
-
def extension
|
21
|
-
File.extname(path)[1..-1]
|
22
|
-
end
|
23
15
|
end # class Polei
|
24
16
|
end # module Poleica
|
data/lib/poleica/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: poleica
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antoine Lyset
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: childprocess
|
@@ -45,10 +45,12 @@ executables: []
|
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
|
+
- ".dockerignore"
|
48
49
|
- ".gitignore"
|
49
50
|
- ".rubocop.yml"
|
50
51
|
- ".travis.yml"
|
51
52
|
- CHANGELOG.md
|
53
|
+
- Dockerfile
|
52
54
|
- Gemfile
|
53
55
|
- Gemfile.lock
|
54
56
|
- Guardfile
|