longbow 0.0.9 → 0.1.0

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: d29d127b9ce58e856ea0ca9ad5e9fbf2c221a523
4
- data.tar.gz: e33528bfcdced540b9ce58e8063f96c8fbd6a4f7
3
+ metadata.gz: 05bd9d17c6b502aea639b84c1ebdece5bb04b9ec
4
+ data.tar.gz: b402bb6a47291e68c5530e24cf73755845f57d08
5
5
  SHA512:
6
- metadata.gz: ed53321ae7b79fcaa8295a24a8c3fd76d957ef69d5abe107892a3fb8d098b93236e3178c684951790aa49455e38e5cfbb887e245de45dd18fb1d22bba29dad00
7
- data.tar.gz: ab561f41e9ce3f23d3d3d27f59ebebd220e2993474813c297d3b2dd2df774af46097e2715ca81bf202f8c4a7c688ec1d2ceb435ffca8ba87000c18fe97358e0d
6
+ metadata.gz: 2fbde0674131935d8aaa3af4a05c5f2dfc4e0cfc21a85bd444a6a1ac381ecf098884a1c22c85e8821d54e9541187985e418e112bc342237c7d70e5bb5f550edf
7
+ data.tar.gz: 3c246f41f7edc165bb9573e7974c81e370874a35427cb90c64ff350a2eeec0b7da945a75cca191fbf99474755874238ccb04df1813be157c891b1f5ff0846a99
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- longbow (0.0.9)
4
+ longbow (0.1.0)
5
5
  bundler (~> 1.3)
6
6
  commander (~> 4.1)
7
7
  dotenv (~> 0.7)
@@ -24,12 +24,8 @@ command :shoot do |c|
24
24
  # Check for .longbow.json
25
25
  @json_path = @directory + '/longbow.json'
26
26
  if !File.exists?(@json_path)
27
- puts
28
- Longbow::red " Couldn't find longbow.json at " + @json_path
29
- puts
30
- puts " Run this command to install the correct files:"
31
- puts " longbow install"
32
- puts
27
+ Longbow::red "\n Couldn't find longbow.json at #{@json_path}\n"
28
+ puts " Run this command to install the correct files:\n longbow install\n"
33
29
  next
34
30
  end
35
31
 
@@ -48,9 +44,7 @@ command :shoot do |c|
48
44
  end
49
45
 
50
46
  if @targets.length == 0
51
- puts
52
- Longbow::red " Couldn't find a target named " + @target_name + " in the .longbow.json file."
53
- puts
47
+ Longbow::red "\n Couldn't find a target named #{@target_name} in the .longbow.json file.\n"
54
48
  next
55
49
  end
56
50
  else
@@ -65,8 +59,7 @@ command :shoot do |c|
65
59
  launch = t['launch_phone_p_url'] || t['launch_phone_p_path'] || t['launch_phone_l_url'] || t['launch_phone_l_path'] || t['launch_tablet_p_url'] || t['launch_tablet_p_path'] || t['launch_tablet_l_url'] || t['launch_tablet_l_path']
66
60
  Longbow::update_target @directory, t['name'], obj['global_info_keys'], t['info_plist'], icon, launch
67
61
  Longbow::create_images @directory, t, obj
68
- Longbow::green ' Finished: ' + t['name'] unless $nolog
69
- puts unless $nolog
62
+ Longbow::green " Finished: #{t['name']}\n" unless $nolog
70
63
  end
71
64
  end
72
- end
65
+ end
@@ -14,14 +14,8 @@ module Longbow
14
14
  end
15
15
 
16
16
  # Get Device Information
17
- iPhone = false
18
- iPad = false
19
- if obj['devices']
20
- obj['devices'].each do |d|
21
- iPhone = true if d == 'iPhone'
22
- iPad = true if d == 'iPad'
23
- end
24
- end
17
+ iPhone = obj['devices'].include? 'iPhone'
18
+ iPad = obj['devices'].include? 'iPad'
25
19
 
26
20
  # Resize Icons
27
21
  resize_icons directory, t, iPhone, iPad
@@ -54,22 +48,14 @@ module Longbow
54
48
  # Make directory
55
49
  img_dir = make_asset_directory directory, target, '.appiconset/'
56
50
 
57
- # Size for iPhone
58
- if iPhone
51
+ # Resize
52
+ image_sizes = []
53
+ image_sizes += ['120x120', '114x114', '80x80', '58x58', '57x57', '29x29'] if iPhone
54
+ image_sizes += ['152x152', '144x144', '100x100', '80x80', '76x76', '72x72', '58x58', '50x50', '40x40', '29x29'] if iPad
55
+ image_sizes.uniq.each do |size|
59
56
  image = MiniMagick::Image.open(img_path)
60
- return false unless image
61
- ['120x120', '114x114', '80x80', '58x58', '57x57', '29x29'].each do |size|
62
- resize_image_to_directory img_dir, image, size, 'icon'
63
- end
64
- end
65
-
66
- # iPad
67
- if iPad
68
- image = MiniMagick::Image.open(img_path)
69
- return false unless image
70
- ['152x152', '144x144', '100x100', '80x80', '76x76', '72x72', '58x58', '50x50', '40x40', '29x29'].each do |size|
71
- resize_image_to_directory img_dir, image, size, 'icon'
72
- end
57
+ next unless image
58
+ resize_image_to_directory img_dir, image, size, 'icon'
73
59
  end
74
60
 
75
61
  Longbow::green (' - Created Icon images for ' + target) unless $nolog
@@ -409,4 +395,4 @@ module Longbow
409
395
  end
410
396
 
411
397
 
412
- end
398
+ end
@@ -2,7 +2,7 @@ $:.push File.expand_path('../', __FILE__)
2
2
  require 'colors'
3
3
 
4
4
  module Longbow
5
- VERSION = '0.0.9'
5
+ VERSION = '0.1.0'
6
6
 
7
7
  def self.check_for_newer_version
8
8
  if `gem outdated -r`.include? 'longbow'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: longbow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Intermark Interactive