snapshot 1.0.4 → 1.0.5

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: 72ab251cce55026b8950a9022e034fbc42a173bd
4
- data.tar.gz: 2a5cc37c91b72758f39cd2162314d77180c4a989
3
+ metadata.gz: 151fb2b63c45fbd4f2a3b504b54ed939100e5077
4
+ data.tar.gz: 51dc88520b4b87f6e47b40fd8dc38388e309407c
5
5
  SHA512:
6
- metadata.gz: c1ab4c22f2fb38d6b60fe371ee3883c331a612e4c5aae3a289b2e33204192dd6c0fb9100bcc7ae810c16cc1dc7bd39b62c22a6c17957c5182f8340e432101cc0
7
- data.tar.gz: 7befdf103c2b8bf1370910a4fad0f0e3d3d2b26a01b79abe5e153673bdaed9651c95b51115ba44399555de9fd3513139cf4be8b64c61d5e3504480cd32f3f0f5
6
+ metadata.gz: b079c02208bde8f19e36852913b28d3358e9c1b225aaf04aa20c10ef27bd85c8cac8e46bcd19d02a9b6ca7437aa87491ff58cafc18be780f9c0d6a43a69e1e9a
7
+ data.tar.gz: e4c04be3a68e162cd46426671cded11335db414cd3c8fc05748b166a29815921abe361e781eef0004513afb9c0ab4ce48a6c3e997ee58526b03664bce67b8bed
data/README.md CHANGED
@@ -1,18 +1,18 @@
1
1
  <h3 align="center">
2
- <a href="https://github.com/KrauseFx/fastlane">
2
+ <a href="https://github.com/fastlane/fastlane">
3
3
  <img src="assets/fastlane.png" width="150" />
4
4
  <br />
5
5
  fastlane
6
6
  </a>
7
7
  </h3>
8
8
  <p align="center">
9
- <a href="https://github.com/KrauseFx/deliver">deliver</a> &bull;
9
+ <a href="https://github.com/fastlane/deliver">deliver</a> &bull;
10
10
  <b>snapshot</b> &bull;
11
- <a href="https://github.com/KrauseFx/frameit">frameit</a> &bull;
12
- <a href="https://github.com/KrauseFx/PEM">PEM</a> &bull;
13
- <a href="https://github.com/KrauseFx/sigh">sigh</a> &bull;
14
- <a href="https://github.com/KrauseFx/produce">produce</a> &bull;
15
- <a href="https://github.com/KrauseFx/cert">cert</a> &bull;
11
+ <a href="https://github.com/fastlane/frameit">frameit</a> &bull;
12
+ <a href="https://github.com/fastlane/PEM">PEM</a> &bull;
13
+ <a href="https://github.com/fastlane/sigh">sigh</a> &bull;
14
+ <a href="https://github.com/fastlane/produce">produce</a> &bull;
15
+ <a href="https://github.com/fastlane/cert">cert</a> &bull;
16
16
  <a href="https://github.com/fastlane/spaceship">spaceship</a> &bull;
17
17
  <a href="https://github.com/fastlane/pilot">pilot</a> &bull;
18
18
  <a href="https://github.com/fastlane/boarding">boarding</a> &bull;
@@ -29,7 +29,7 @@ snapshot
29
29
  ============
30
30
 
31
31
  [![Twitter: @KauseFx](https://img.shields.io/badge/contact-@KrauseFx-blue.svg?style=flat)](https://twitter.com/KrauseFx)
32
- [![License](http://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/KrauseFx/snapshot/blob/master/LICENSE)
32
+ [![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/fastlane/snapshot/blob/master/LICENSE)
33
33
  [![Gem](https://img.shields.io/gem/v/snapshot.svg?style=flat)](http://rubygems.org/gems/snapshot)
34
34
 
35
35
  ###### Automate taking localized screenshots of your iOS app on every device
@@ -42,7 +42,7 @@ It's hard to get everything right!
42
42
  - No loading indicators
43
43
  - Same content / screens
44
44
  - [Clean Status Bar](#use-a-clean-status-bar)
45
- - Uploading screenshots ([`deliver`](https://github.com/KrauseFx/deliver) is your friend)
45
+ - Uploading screenshots ([`deliver`](https://github.com/fastlane/deliver) is your friend)
46
46
 
47
47
  More information about [creating perfect screenshots](https://krausefx.com/blog/creating-perfect-app-store-screenshots-of-your-ios-app).
48
48
 
@@ -86,7 +86,7 @@ Please check out the [MigrationGuide to 1.0](/MigrationGuide.md) :+1:
86
86
  - Create hundreds of screenshots in multiple languages on all simulators
87
87
  - Configure it once, store the configuration in git
88
88
  - Do something else, while the computer takes the screenshots for you
89
- - Integrates with [`fastlane`](https://fastlane.tools) and [`deliver`](https://github.com/KrauseFx/deliver)
89
+ - Integrates with [`fastlane`](https://fastlane.tools) and [`deliver`](https://github.com/fastlane/deliver)
90
90
  - Generates a beautiful web page, which shows all screenshots on all devices. This is perfect to send to Q&A or the marketing team
91
91
  - `snapshot` automatically waits for network requests to be finished before taking a screenshot (we don't want loading images in the App Store screenshots)
92
92
 
@@ -258,12 +258,12 @@ Also, feel free to duplicate radar [23062925](https://openradar.appspot.com/rada
258
258
  ## [`fastlane`](https://fastlane.tools) Toolchain
259
259
 
260
260
  - [`fastlane`](https://fastlane.tools): Connect all deployment tools into one streamlined workflow
261
- - [`deliver`](https://github.com/KrauseFx/deliver): Upload screenshots, metadata and your app to the App Store
262
- - [`frameit`](https://github.com/KrauseFx/frameit): Quickly put your screenshots into the right device frames
263
- - [`PEM`](https://github.com/KrauseFx/pem): Automatically generate and renew your push notification profiles
264
- - [`sigh`](https://github.com/KrauseFx/sigh): Because you would rather spend your time building stuff than fighting provisioning
265
- - [`produce`](https://github.com/KrauseFx/produce): Create new iOS apps on iTunes Connect and Dev Portal using the command line
266
- - [`cert`](https://github.com/KrauseFx/cert): Automatically create and maintain iOS code signing certificates
261
+ - [`deliver`](https://github.com/fastlane/deliver): Upload screenshots, metadata and your app to the App Store
262
+ - [`frameit`](https://github.com/fastlane/frameit): Quickly put your screenshots into the right device frames
263
+ - [`PEM`](https://github.com/fastlane/pem): Automatically generate and renew your push notification profiles
264
+ - [`sigh`](https://github.com/fastlane/sigh): Because you would rather spend your time building stuff than fighting provisioning
265
+ - [`produce`](https://github.com/fastlane/produce): Create new iOS apps on iTunes Connect and Dev Portal using the command line
266
+ - [`cert`](https://github.com/fastlane/cert): Automatically create and maintain iOS code signing certificates
267
267
  - [`spaceship`](https://github.com/fastlane/spaceship): Ruby library to access the Apple Dev Center and iTunes Connect
268
268
  - [`pilot`](https://github.com/fastlane/pilot): The best way to manage your TestFlight testers and builds from your terminal
269
269
  - [`boarding`](https://github.com/fastlane/boarding): The easiest way to invite your TestFlight beta testers
@@ -13,38 +13,53 @@ var deviceLanguage = ""
13
13
 
14
14
  func setLanguage(app: XCUIApplication)
15
15
  {
16
- let path = "/tmp/language.txt"
17
-
18
- do {
19
- let locale = try NSString(contentsOfFile: path, encoding: NSUTF8StringEncoding) as String
20
- deviceLanguage = locale
21
- app.launchArguments = ["-AppleLanguages", "(\(locale))", "-AppleLocale", "\"\(locale)\"","-ui_testing"]
22
- } catch {
23
- print("Couldn't detect/set language...")
24
- }
16
+ Snapshot.setLanguage(app)
25
17
  }
26
18
 
27
19
  func snapshot(name: String, waitForLoadingIndicator: Bool = true)
28
20
  {
29
- if (waitForLoadingIndicator)
30
- {
31
- waitForLoadingIndicatorToDisappear()
32
- }
33
- print("snapshot: \(name)") // more information about this, check out https://github.com/krausefx/snapshot
34
-
35
- let view = XCUIApplication()
36
- let start = view.coordinateWithNormalizedOffset(CGVectorMake(32.10, 30000))
37
- let finish = view.coordinateWithNormalizedOffset(CGVectorMake(31, 30000))
38
- start.pressForDuration(0, thenDragToCoordinate: finish)
39
- sleep(1)
21
+ Snapshot.snapshot(name, waitForLoadingIndicator: waitForLoadingIndicator)
40
22
  }
41
23
 
42
- func waitForLoadingIndicatorToDisappear()
24
+
25
+
26
+ @objc class Snapshot: NSObject
43
27
  {
44
- let query = XCUIApplication().statusBars.childrenMatchingType(.Other).elementBoundByIndex(1).childrenMatchingType(.Other)
28
+ class func setLanguage(app: XCUIApplication)
29
+ {
30
+ let path = "/tmp/language.txt"
31
+
32
+ do {
33
+ let locale = try NSString(contentsOfFile: path, encoding: NSUTF8StringEncoding) as String
34
+ deviceLanguage = locale
35
+ app.launchArguments = ["-AppleLanguages", "(\(locale))", "-AppleLocale", "\"\(locale)\"","-ui_testing"]
36
+ } catch {
37
+ print("Couldn't detect/set language...")
38
+ }
39
+ }
45
40
 
46
- while (query.count > 4) {
41
+ class func snapshot(name: String, waitForLoadingIndicator: Bool = false)
42
+ {
43
+ if (waitForLoadingIndicator)
44
+ {
45
+ waitForLoadingIndicatorToDisappear()
46
+ }
47
+ print("snapshot: \(name)") // more information about this, check out https://github.com/krausefx/snapshot
48
+
49
+ let view = XCUIApplication()
50
+ let start = view.coordinateWithNormalizedOffset(CGVectorMake(32.10, 30000))
51
+ let finish = view.coordinateWithNormalizedOffset(CGVectorMake(31, 30000))
52
+ start.pressForDuration(0, thenDragToCoordinate: finish)
47
53
  sleep(1)
48
- print("Number of Elements in Status Bar: \(query.count)... waiting for status bar to disappear")
54
+ }
55
+
56
+ class func waitForLoadingIndicatorToDisappear()
57
+ {
58
+ let query = XCUIApplication().statusBars.childrenMatchingType(.Other).elementBoundByIndex(1).childrenMatchingType(.Other)
59
+
60
+ while (query.count > 4) {
61
+ sleep(1)
62
+ print("Number of Elements in Status Bar: \(query.count)... waiting for status bar to disappear")
63
+ }
49
64
  }
50
65
  }
@@ -45,6 +45,7 @@ module Snapshot
45
45
  def actions
46
46
  actions = []
47
47
  # actions << :clean if config[:clean]
48
+ actions << :build # https://github.com/fastlane/snapshot/issues/246
48
49
  actions << :test
49
50
 
50
51
  actions
@@ -1,4 +1,4 @@
1
1
  module Snapshot
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  DESCRIPTION = "Automate taking localized screenshots of your iOS app on every device"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snapshot
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-27 00:00:00.000000000 Z
11
+ date: 2015-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastimage