frameit 0.1.2 → 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: 8d254930af1c380d5765525d5c37c1d75c84cbb1
4
- data.tar.gz: 7595ade14e406c4d2359f4b1997c7f83ece450c6
3
+ metadata.gz: 9209d6d82a7676b5cbaee5f77e0031ffda2cc4b4
4
+ data.tar.gz: 9b6ffab3b82c88b66f32ec7cd00ef22dfbf4c2cf
5
5
  SHA512:
6
- metadata.gz: 498772931aedc50f66e597956a0eee315a3d93f9b3c74530061de402f0a57fda7a0f98b1e60a0a6a192c6bed54d461dde513f61b3897cd61aa128b392a8f1804
7
- data.tar.gz: 5eaf24c58946b66de6591604e60605c218502e140e7c502da225147a4891946e353086b8ab63d6a2dd9f7cc6972e6f4dc1ad8f4cff22e30ade21a6788985c4ae
6
+ metadata.gz: d26dc836eaded3dfacc0e8979259eaaac052523be5804b0019dd76bb642c42169b9801bae6232b673eeb15369d23e3a0959fb918dabf87099a36ab2b3d6d686d
7
+ data.tar.gz: 192dca599fe6a69388510c4cc2802e7bb0a2a604c349696ebbba605342c9ffb11c4672c5a9ea4564b7285ecae497eef92ba94ee03790ff59a92a209505769218
data/README.md CHANGED
@@ -72,10 +72,17 @@ You only have to do this once per computer.
72
72
 
73
73
  Why should you have to use Photoshop, just to add a frame around your screenshots?
74
74
 
75
- Just navigate to your folder of screenshots and try the following:
75
+ Just navigate to your folder of screenshots and use the following command:
76
76
 
77
- - ```frameit```
78
- - ```frameit silver```
77
+ frameit
78
+
79
+ To use the silver version of the frames:
80
+
81
+ frameit silver
82
+
83
+ To run the setup process again to add new frames use:
84
+
85
+ frameit setup
79
86
 
80
87
  # Tips
81
88
 
@@ -4,15 +4,9 @@ module Frameit
4
4
  FRAME_PATH = '.frameit/devices_frames'
5
5
 
6
6
  def run
7
- @templates_path = "#{ENV['HOME']}/#{FRAME_PATH}"
8
-
9
7
  self.setup_frames
10
8
  end
11
9
 
12
- def templates_path
13
- @templates_path
14
- end
15
-
16
10
  def setup_frames
17
11
  puts "----------------------------------------------------".green
18
12
  puts "Looks like you have no device templates installed".green
@@ -31,17 +25,17 @@ module Frameit
31
25
  STDIN.gets
32
26
 
33
27
  while not frames_exist?
34
- system("mkdir -p '#{@templates_path}' && open '#{@templates_path}'")
28
+ system("mkdir -p '#{templates_path}' && open '#{templates_path}'")
35
29
  puts "----------------------------------------------------".green
36
30
  puts "Extract the downloaded files into the folder".green
37
- puts "'#{@templates_path}', which should be open in your Finder".green
31
+ puts "'#{templates_path}', which should be open in your Finder".green
38
32
  puts "You can just copy the whole content into it.".green
39
33
  puts "Press Enter when you extracted the files into the given folder".green
40
34
  puts "----------------------------------------------------".green
41
35
  STDIN.gets
42
36
 
43
37
  if not frames_exist?
44
- puts "Sorry, I can't find the PSD files. Make sure you unzipped them into '#{@templates_path}'".red
38
+ puts "Sorry, I can't find the PSD files. Make sure you unzipped them into '#{templates_path}'".red
45
39
  end
46
40
  end
47
41
 
@@ -49,12 +43,16 @@ module Frameit
49
43
  end
50
44
 
51
45
  def frames_exist?
52
- Dir["#{@templates_path}/**/*.psd"].count > 0
46
+ Dir["#{templates_path}/**/*.psd"].count > 0
47
+ end
48
+
49
+ def templates_path
50
+ "#{ENV['HOME']}/#{FRAME_PATH}"
53
51
  end
54
52
 
55
53
  # Converts all the PSD files to trimmed PNG files
56
54
  def convert_frames
57
- Dir["#{@templates_path}/**/*.psd"].each do |psd|
55
+ Dir["#{templates_path}/**/*.psd"].each do |psd|
58
56
  resulting_path = psd.gsub('.psd', '.png')
59
57
  unless File.exists?resulting_path
60
58
  Helper.log.debug "Converting PSD file '#{psd}'".yellow
@@ -1,3 +1,3 @@
1
1
  module Frameit
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frameit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-20 00:00:00.000000000 Z
11
+ date: 2014-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json