desoto-photoapp 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/desoto-photoapp.rb +9 -7
- data/lib/desoto-photoapp/photo.rb +1 -1
- data/lib/desoto-photoapp/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce0627b6185d6ade6e13b1a7813614b59c5f0bcd
|
4
|
+
data.tar.gz: f5af3ad97dd19aafa2c2084171ff15f74b6845d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56ee8f2c27d9069361b8fbb32ac41b416286e20b633a7752d1d5fd0f2f8ba9cd9c63dccff4fd369e87407d32158126b6dd098d3f22687155b2b656536cb6663e
|
7
|
+
data.tar.gz: c44407c8181f833fbdcb30445cc9ad6d29dd59b322792ac008c2a6fce1d72615a60acd9bb116b0bc2e0a392f3b2aa2c153e9fc76fe63e83d4c99386773c0d5d0
|
data/lib/desoto-photoapp.rb
CHANGED
@@ -5,6 +5,12 @@ require 'yaml'
|
|
5
5
|
require 'colorator'
|
6
6
|
|
7
7
|
module Photoapp
|
8
|
+
extend self
|
9
|
+
|
10
|
+
def gem_dir(*paths)
|
11
|
+
File.expand_path(File.join(File.dirname(__FILE__), '..', *paths))
|
12
|
+
end
|
13
|
+
|
8
14
|
class Session
|
9
15
|
attr_accessor :photos, :print, :upload
|
10
16
|
|
@@ -27,8 +33,8 @@ module Photoapp
|
|
27
33
|
config = {
|
28
34
|
'source' => Dir.pwd, # where photos are located
|
29
35
|
'url_base' => 'www.cave.pics',
|
30
|
-
'watermark' => gem_dir('assets', 'watermark.png'),
|
31
|
-
'font' => gem_dir('assets', "SourceSansPro-Semibold.ttf"),
|
36
|
+
'watermark' => Photoapp.gem_dir('assets', 'watermark.png'),
|
37
|
+
'font' => Photoapp.gem_dir('assets', "SourceSansPro-Semibold.ttf"),
|
32
38
|
'font_size' => 30,
|
33
39
|
'config' => 'photoapp.yml',
|
34
40
|
'upload' => 'upload',
|
@@ -51,10 +57,6 @@ module Photoapp
|
|
51
57
|
|
52
58
|
end
|
53
59
|
|
54
|
-
def gem_dir(*paths)
|
55
|
-
File.expand_path(File.join(File.dirname(__FILE__), '..', *paths))
|
56
|
-
end
|
57
|
-
|
58
60
|
def root(path='')
|
59
61
|
File.expand_path(File.join(ROOT, path))
|
60
62
|
end
|
@@ -72,7 +74,7 @@ module Photoapp
|
|
72
74
|
load_photos.each do |f|
|
73
75
|
FileUtils.mv f, tmp
|
74
76
|
path = File.join(tmp, File.basename(f))
|
75
|
-
`automator -i #{path} #{gem_dir("lib/adjust-image.workflow")}`
|
77
|
+
`automator -i #{path} #{Photoapp.gem_dir("lib/adjust-image.workflow")}`
|
76
78
|
photos << Photo.new(path, logo, self)
|
77
79
|
end
|
78
80
|
|