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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 13fb8e21ac37243f1df99aaab383d31c631e5311
4
- data.tar.gz: bf82255d76d2d42c6e3c4ce9c30cb68121ebc281
3
+ metadata.gz: ce0627b6185d6ade6e13b1a7813614b59c5f0bcd
4
+ data.tar.gz: f5af3ad97dd19aafa2c2084171ff15f74b6845d6
5
5
  SHA512:
6
- metadata.gz: 526dfda587bb526f4ef9b28b6e350fdb0fc68a0cac090183697c8c55a53fd937cec8de01f6dd77aabf0209c2df7cd1a6a8d7c3799db22ab49cc93c8f46cfe89c
7
- data.tar.gz: ae235708b3a410943bfeb34c1bffb60bbab6f65f1a6be8eb9bdc6628bf4328b4f079c49b1564359eaa66d5df707d10ed779384082e717251c08595c24dbf02db
6
+ metadata.gz: 56ee8f2c27d9069361b8fbb32ac41b416286e20b633a7752d1d5fd0f2f8ba9cd9c63dccff4fd369e87407d32158126b6dd098d3f22687155b2b656536cb6663e
7
+ data.tar.gz: c44407c8181f833fbdcb30445cc9ad6d29dd59b322792ac008c2a6fce1d72615a60acd9bb116b0bc2e0a392f3b2aa2c153e9fc76fe63e83d4c99386773c0d5d0
@@ -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
 
@@ -66,7 +66,7 @@ module Photoapp
66
66
  end
67
67
 
68
68
  def add_to_photos
69
- `automator -i #{config['print']} #{@session.gem_dir("lib/import-photos.workflow")}`
69
+ `automator -i #{config['print']} #{Photoapp.gem_dir("lib/import-photos.workflow")}`
70
70
  end
71
71
 
72
72
  def cleanup
@@ -1,3 +1,3 @@
1
1
  module Photoapp
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: desoto-photoapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis