yamg 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f878b0990d8eaae671edba9ac0a0838d8af4ca4
4
- data.tar.gz: 5ad0cdcd21efd6c019cf9c8237a774e0e63d444e
3
+ metadata.gz: e8a2760ddcfbeb317a2ca6d5915a6c7e7a94378b
4
+ data.tar.gz: a1232ce8502451fb1058de8d6450a9f563e8415e
5
5
  SHA512:
6
- metadata.gz: 9a60a46898ebd5b85c1ea6210e62e25d0899442c4873dee4ec13182eec3b7ae9c9a89752a8b7d1f2e62b35d2e183a7f09d61902134291d3f2113593b03fb4f9c
7
- data.tar.gz: 917579ddbe4b7549e0de1ea83c7e37f1c6ecc50fb0ad90b6d7db8a3b44efef6247c81661e9606f4220561ad8aa2fcbb8b35334ecc7dd4c3c2e5262f024ace79d
6
+ metadata.gz: 39a3bafd89f26b55a2f6c457fbe7b2d4f3c7b31bf880bd3d74c9449b51d7ded8a0047cdd190f8dd42b976affe92edd7450217be50a5d3e2590b7597b75785bf7
7
+ data.tar.gz: 145ab86bed2deca1bb3aa016ed4a779c821a86b2095e30d887dd621dcd2983be8728faa9cf9b6ff0a030041a2214997044a38eb51c39d54672ffa506cc6f5de4
data/README.md CHANGED
@@ -39,6 +39,8 @@ OSX
39
39
  * Find best version (size) to use from icons folder.
40
40
  * Splash screen/banner generation with gravity.
41
41
  * Works with iOS/Android/Other mobile with Phonegap or Cordova.
42
+ * Exports icons and splashes for stores and social networks.
43
+ * Screenshots for stores and advertising.
42
44
 
43
45
 
44
46
  ## Use
data/bin/yamg CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
2
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
3
  require 'yamg'
4
- YAMG::CLI.new(ARGV)
4
+ YAMG::CLI.new(ARGV).work!
data/lib/yamg/cli.rb CHANGED
@@ -11,8 +11,6 @@ module YAMG
11
11
  return YAMG.init if argv.join =~ /init/
12
12
  YAMG.load_config # (argv)
13
13
  @works = YAMG.config['compile']
14
- compile
15
- screenshot
16
14
  end
17
15
 
18
16
  def setup_for(opts)
@@ -58,22 +56,26 @@ module YAMG
58
56
  end
59
57
 
60
58
  def compile(scope = nil)
61
- time = Time.now
62
59
  works.select! { |w| w =~ scope } if scope
63
60
  works.each { |out, opts| compile_work(out, opts) }
64
61
  works.select! { |w| w =~ scope } if scope
65
62
  puts Rainbow("Working on #{works.keys.join(', ')}").yellow
63
+ end
66
64
 
65
+ def screenshot
67
66
  YAMG.config['screenshots'].each do |ss|
68
67
  Thread.new { Screenshot.new(ss).work('./media') }
69
68
  end
69
+ end
70
+
71
+ def work!
72
+ time = Time.now
73
+ compile
74
+ screenshot
70
75
  puts Rainbow(Thread.list.size.to_s + ' jobs').black
71
76
  Thread.list.reject { |t| t == Thread.current }.each(&:join)
72
77
  puts Rainbow('-' * 59).black
73
78
  puts Rainbow("Done compile #{Time.now - time}").red
74
79
  end
75
-
76
- def screenshot
77
- end
78
80
  end
79
81
  end
@@ -6,7 +6,6 @@ module YAMG
6
6
  # Screenshot from multiple providers
7
7
  #
8
8
  class Screenshot
9
- # include Capybara::DSL
10
9
  attr_accessor :url, :size, :command
11
10
 
12
11
  # Uses PhantomJS
@@ -146,6 +146,16 @@ google:
146
146
  '180.png': 180
147
147
  splash:
148
148
  'splash.png': [1024, 768]
149
+ screenshots:
150
+ 'android/android-10in-1280x720-land': [1280, 720]
151
+ 'android/android-10in-2048x1152-land': [2048, 1152]
152
+ 'android/android-10in-1280x720-port': [720, 1280]
153
+ 'android/android-10in-2048x1152-port': [1152, 2048]
154
+ 'android/android-7in-1280x800-land': [1280, 800]
155
+ 'android/android-7in-1280x800-port': [800, 1280]
156
+ 'android/android-4in-1280x720-land': [1920, 1080]
157
+ 'android/android-4in-1280x720-port': [1080, 1920]
158
+
149
159
 
150
160
  apple:
151
161
  icons:
@@ -154,40 +164,19 @@ apple:
154
164
  splash:
155
165
  'splash.png': [1024, 768]
156
166
  screenshots:
167
+ 'ios/ipad-1024x768-land': [1024, 768]
168
+ 'ios/ipad-1024x768-port': [768, 1024]
169
+ 'ios/ipadretina-2048x1536-land': [2048, 1536, 2]
170
+ 'ios/ipadretina-2048x1536-port': [1536, 2048, 2]
171
+ 'ios/iphone4-960x640-land': [960, 640]
172
+ 'ios/iphone4-640x960-port': [640, 960]
173
+ 'ios/iphone5-1136x640-land': [1136, 640, 2]
174
+ 'ios/iphone5-640x1136-port': [640, 1136, 2]
175
+ 'ios/iphone6p-1080x1920-port': [1080, 1920, 2]
176
+ 'ios/iphone6p-1920x1080-land': [1920, 1080, 2]
177
+ 'ios/iphone6-1334x750-land': [1334, 750, 2]
178
+ 'ios/iphone6-750x1334-port': [750, 1334, 2]
157
179
 
158
- {filename: "android-10in-1280x720-land", width: 1280, height: 720, savePath: 'Media/android/screenshots/10in'},
159
- {filename: "android-10in-2048x1152-land", width: 2048, height: 1152, savePath: 'Media/android/screenshots/10in'},
160
- {filename: "android-7in-1280x800-land", width: 1280, height: 800, savePath: 'Media/android/screenshots/7in'},
161
- {filename: "android-10in-1280x720-port", width: 720, height: 1280, savePath: 'Media/android/screenshots/10in'},
162
- {filename: "android-10in-2048x1152-port", width: 1152, height: 2048, savePath: 'Media/android/screenshots/10in'},
163
- {filename: "android-7in-1280x800-port", width: 800, height: 1280, savePath: 'Media/android/screenshots/7in'},
164
- {filename: "android-4in-1280x720-land", width: 1920, height: 1080, savePath: 'Media/android/screenshots/4in'},
165
- {filename: "android-4in-1280x720-port", width: 1080, height: 1920, savePath: 'Media/android/screenshots/4in'},
166
- {filename: "ipad-1024x768-land", width: 1024, height: 768, savePath: 'Media/ios/screenshots/ipad'},
167
- {
168
- filename: "ipadretina-2048x1536-land",
169
- width: 2048,
170
- height: 1536,
171
- devicePixelRatio: 2,
172
- savePath: 'Media/ios/screenshots/ipadRetina'
173
- },
174
- {filename: "iphone4-960x640-land", width: 960, height: 640, savePath: 'Media/ios/screenshots/iphone4'},
175
- {filename: "iphone5-1136x640-land", width: 1136, height: 640, savePath: 'Media/ios/screenshots/iphone5'},
176
- {filename: "ipad-1024x768-port", width: 768, height: 1024, savePath: 'Media/ios/screenshots/ipad'},
177
- {
178
- filename: "ipadretina-2048x1536-port",
179
- width: 1536,
180
- height: 2048,
181
- devicePixelRatio: 2,
182
- savePath: 'Media/ios/screenshots/ipadRetina'
183
- },
184
- {filename: "iphone4-640x960-port", width: 640, height: 960, savePath: 'Media/ios/screenshots/iphone4'},
185
- {filename: "iphone5-640x1136-port", width: 640, height: 1136, savePath: 'Media/ios/screenshots/iphone5'},
186
- {filename: "iphone6p-1080x1920-port", width: 1080, height: 1920, savePath: 'Media/ios/screenshots/iphone6p'},
187
- {filename: "iphone6p-1920x1080-land", width: 1920, height: 1080, savePath: 'Media/ios/screenshots/iphone6p'},
188
- {filename: "iphone6-1334x750-land", width: 1334, height: 750, savePath: 'Media/ios/screenshots/iphone6'},
189
- {filename: "iphone6-750x1334-port", width: 750, height: 1334, savePath: 'Media/ios/screenshots/iphone6'}
190
- ]
191
180
 
192
181
  facebook:
193
182
  icons:
data/lib/yamg/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # :nodoc:
2
2
  module YAMG
3
- VERSION = '0.0.7'
3
+ VERSION = '0.0.8'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yamg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcos Piccinini