deliver 0.3.0 → 0.3.1

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: 6d7708e4295165aff4212ab8ea1b6ca557fa5d17
4
- data.tar.gz: cb7c41edde81f621ba842b0ebe5b9b7e13a3ef08
3
+ metadata.gz: 9074ee087705d2000cc56a2baa077e9361bb0506
4
+ data.tar.gz: 7fa2d77af3c9db33724d3c359fbe6a409dc54e05
5
5
  SHA512:
6
- metadata.gz: 9ff33402549e494ea3f5d6d34c4073bdfa2f6d069336025ae668c13e649e26fae1b0383bc4a9fa13991bca8645dba721efe76156d8d2140886e386b2df410825
7
- data.tar.gz: 2e215dfabc2406db66a67cdb0d1e15bdf867b49af73bbba2da5a2a264d0d7c0a36e08281ed92bc90b116a6e4c7b774b6783b05cc4b4000cc6ce7a6b04cd7cab2
6
+ metadata.gz: d45c8ae078611d98ec7549f7fe11765cd74572877203812f5e462fff4877658d2460bd0f2d474ed5542b2dc5fa5c25c3a33c5ca6c934a7207349abcc77d4a6d9
7
+ data.tar.gz: 0ecdabdc955d80a69a0f7bc1f2e3430a3cf09de1281189e78a8513d98e39466fc26200d27f1e19690499330f8438fc7ab003186eab6b6d11bed5dfe427be1fef
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  <p align="center">
2
2
  <b>Deliver</b> &bull;
3
- <a href="https://github.com/KrauseFx/snapshot">Snapshot</a>
3
+ <a href="https://github.com/KrauseFx/snapshot">Snapshot</a> &bull;
4
+ <a href="https://github.com/KrauseFx/frameit">FrameIt</a>
4
5
  </p>
5
6
  -------
6
7
 
@@ -108,6 +109,8 @@ screenshots_path "./screenshots"
108
109
  ```
109
110
  The screenshots folder must include one subfolder per language (see [Available language codes](#available-language-codes)).
110
111
 
112
+ The screenshots are ordered alphabetically. The best way to sort them is to prepend a number before the actual screenshot name.
113
+
111
114
  To let the computer create the screenshots for you, checkout [this section of the README](#automatically-create-screenshots).
112
115
 
113
116
  #### Upload a new ipa file with a changelog to the App Store
@@ -9,8 +9,6 @@ module Deliver
9
9
  def render(deliverer, export_path = nil)
10
10
  export_path ||= '/tmp'
11
11
 
12
- pdf = Prawn::Document.new(:margin => [0, 0, 0, 0])
13
-
14
12
  resulting_path = "#{export_path}/#{Time.now.to_i}.pdf"
15
13
  Prawn::Document.generate(resulting_path) do
16
14
 
@@ -27,13 +25,10 @@ module Deliver
27
25
 
28
26
  move_down 30
29
27
 
30
-
31
-
32
28
  col1 = 200
33
29
  modified_color = '0000AA'
34
30
  standard_color = '000000'
35
31
 
36
-
37
32
  prev_cursor = cursor.to_f
38
33
  # Description on right side
39
34
  bounding_box([col1, cursor], width: 340.0) do
@@ -53,7 +48,6 @@ module Deliver
53
48
 
54
49
  move_cursor_to prev_cursor
55
50
 
56
-
57
51
  all_keys = [:support_url, :privacy_url, :software_url, :keywords]
58
52
 
59
53
  all_keys.each_with_index do |key, index|
@@ -87,18 +81,27 @@ module Deliver
87
81
  end
88
82
  end
89
83
 
90
- image_width = 60
84
+ image_width = bounds.width / 6 # wide enough for 5 portrait screenshots to fit
91
85
  padding = 10
92
86
  last_size = nil
93
87
  top = [cursor, title_bottom].min - padding
94
88
  index = 0
95
89
  previous_image_height = 0
90
+ move_cursor_to top
91
+
96
92
  if (content[:screenshots] || []).count > 0
97
- content[:screenshots].sort{ |a, b| a.screen_size <=> b.screen_size }.each do |screenshot|
93
+ content[:screenshots].sort_by { |a| [:screen_size, :path] }.each do |screenshot|
98
94
 
99
95
  if last_size and last_size != screenshot.screen_size
100
96
  # Next row (other simulator size)
101
97
  top -= (previous_image_height + padding)
98
+ move_cursor_to top
99
+
100
+ if top < previous_image_height
101
+ start_new_page
102
+ top = cursor
103
+ end
104
+
102
105
  index = 0
103
106
  end
104
107
 
@@ -1,3 +1,3 @@
1
1
  module Deliver
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deliver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause