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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c3d0868d560780e9a3e9a91c323259de939ed580
4
- data.tar.gz: 6d6524f7f0077c4cfc388db851e36471761f8ed0
3
+ metadata.gz: ff772ed05f5fb4b006f18a60e4c34861e8ef09cb
4
+ data.tar.gz: e36bc66f94ae66bbc0af69f336431dfdcb160658
5
5
  SHA512:
6
- metadata.gz: 95c11e8b0b621818d251967fc0a0dcd92c3bbb6dbeb6004e28e59db9a46d3e139f72a4b120464345070b244d45f9d929c4dc5e191e8a8a240f080b5221a6df82
7
- data.tar.gz: 7a0a875abbc0c412e70df09286e2569e094f81011e069cb41e5302b7e49349a4806916a2c4e267ec6e88f92dc256a7f133d17483ed9c1a8f71aaff8518a10bdc
6
+ metadata.gz: 8e1b692c2c472737ca61f0e3d8022ef48d966fabdb9486df3192ea5f12eb321ae478b0bd60ca75ecad815102012ce774b926849f8c2ba6eb1dfc09368fb23813
7
+ data.tar.gz: 5a1e11cb1f28fb6ab17e19c9dc819f4fdd26abcae56d102ac4ae260dba60bc400ff2f43ae30e362d9283736b7d3635f37fd8d2e90b7b8161d491433e45627f0e
data/.dockerignore ADDED
@@ -0,0 +1,4 @@
1
+ .DS_Store
2
+ .git
3
+ log/*.log
4
+ tmp
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
@@ -4,8 +4,10 @@ source 'https://rubygems.org'
4
4
  # Specify your gem's dependencies in poleica.gemspec
5
5
  gemspec
6
6
 
7
- platform :mri do
8
- gem 'pry-byebug'
7
+ if RUBY_VERSION.split('.').first == '2'
8
+ platform :mri do
9
+ gem 'pry-byebug'
10
+ end
9
11
  end
10
12
 
11
13
  group :test do
data/Gemfile.lock CHANGED
@@ -9,7 +9,7 @@ GIT
9
9
  PATH
10
10
  remote: .
11
11
  specs:
12
- poleica (0.10.0)
12
+ poleica (0.10.3)
13
13
  childprocess
14
14
 
15
15
  GEM
@@ -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(File.extname(polei.path))
69
+ pathable_object.path_for_extension(polei.extension)
70
70
  end
71
71
  end
72
72
 
@@ -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, :name
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
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  # Poleica namespace
3
3
  module Poleica
4
- VERSION = '0.10.3'
4
+ VERSION = '0.10.4'
5
5
  end # module Poleica
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.3
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-12 00:00:00.000000000 Z
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