{"action":"created","comment":{"url":"https://api.github.com/repos/fastlane/fastlane/pulls/comments/79715355","id":79715355,"diff_hunk":"@@ -0,0 +1,140 @@\n+//\n+//  SnapshotHelper.swift\n+//  Example\n+//\n+//  Created by Felix Krause on 10/8/15.\n+//  Copyright © 2015 Felix Krause. All rights reserved.\n+//\n+\n+// This file should be used if your UI Tests are written in Swift 2.3\n+\n+import Foundation\n+import XCTest\n+\n+var deviceLanguage = \"\"\n+var locale = \"\"\n+\n+@available(*, deprecated, message=\"use setupSnapshot: instead\")\n+func setLanguage(app: XCUIApplication) {\n+    setupSnapshot(app)\n+}\n+\n+func setupSnapshot(app: XCUIApplication) {\n+    Snapshot.setupSnapshot(app)\n+}\n+\n+func snapshot(name: String, waitForLoadingIndicator: Bool = true) {\n+    Snapshot.snapshot(name, waitForLoadingIndicator: waitForLoadingIndicator)\n+}\n+\n+public class Snapshot: NSObject {\n+\n+    public class func setupSnapshot(app: XCUIApplication) {\n+        setLanguage(app)\n+        setLocale(app)\n+        setLaunchArguments(app)\n+    }\n+\n+    class func setLanguage(app: XCUIApplication) {\n+        guard let prefix = pathPrefix() else {\n+            return\n+        }\n+\n+        let path = prefix.stringByAppendingPathComponent(\"language.txt\")\n+\n+        do {\n+            let trimCharacterSet = NSCharacterSet.whitespaceAndNewlineCharacterSet()\n+            deviceLanguage = try NSString(contentsOfFile: path, encoding: NSUTF8StringEncoding).stringByTrimmingCharactersInSet(trimCharacterSet) as String\n+            app.launchArguments += [\"-AppleLanguages\", \"(\\(deviceLanguage))\"]\n+        } catch {\n+            print(\"Couldn't detect/set language...\")\n+        }\n+    }\n+\n+    class func setLocale(app: XCUIApplication) {\n+        guard let prefix = pathPrefix() else {\n+            return\n+        }\n+\n+        let path = prefix.stringByAppendingPathComponent(\"locale.txt\")\n+\n+        do {\n+            let trimCharacterSet = NSCharacterSet.whitespaceAndNewlineCharacterSet()\n+            locale = try NSString(contentsOfFile: path, encoding: NSUTF8StringEncoding).stringByTrimmingCharactersInSet(trimCharacterSet) as String\n+        } catch {\n+            print(\"Couldn't detect/set locale...\")\n+        }\n+        if locale.isEmpty {\n+            locale = NSLocale(localeIdentifier: deviceLanguage).localeIdentifier\n+        }\n+        app.launchArguments += [\"-AppleLocale\", \"\\\"\\(locale)\\\"\"]\n+    }\n+\n+    class func setLaunchArguments(app: XCUIApplication) {\n+        guard let prefix = pathPrefix() else {\n+            return\n+        }\n+\n+        let path = prefix.stringByAppendingPathComponent(\"snapshot-launch_arguments.txt\")\n+        app.launchArguments += [\"-FASTLANE_SNAPSHOT\", \"YES\", \"-ui_testing\"]\n+\n+        do {\n+            let launchArguments = try NSString(contentsOfFile: path, encoding: NSUTF8StringEncoding) as String\n+            let regex = try NSRegularExpression(pattern: \"(\\\\\\\".+?\\\\\\\"|\\\\S+)\", options: [])\n+            let matches = regex.matchesInString(launchArguments, options: [], range: NSRange(location:0, length:launchArguments.characters.count))","path":"snapshot/lib/assets/SnapshotHelper2-3.swift","position":84,"original_position":84,"commit_id":"6311abdc418c35bdab3762985500c38558071bfd","original_commit_id":"6311abdc418c35bdab3762985500c38558071bfd","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Line Length Violation: Line should be 100 characters or less: currently 146 characters (line_length)","created_at":"2016-09-20T21:20:57Z","updated_at":"2016-09-20T21:20:57Z","html_url":"https://github.com/fastlane/fastlane/pull/6218#discussion_r79715355","pull_request_url":"https://api.github.com/repos/fastlane/fastlane/pulls/6218","_links":{"self":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/comments/79715355"},"html":{"href":"https://github.com/fastlane/fastlane/pull/6218#discussion_r79715355"},"pull_request":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/6218"}}},"pull_request":{"url":"https://api.github.com/repos/fastlane/fastlane/pulls/6218","id":86058697,"html_url":"https://github.com/fastlane/fastlane/pull/6218","diff_url":"https://github.com/fastlane/fastlane/pull/6218.diff","patch_url":"https://github.com/fastlane/fastlane/pull/6218.patch","issue_url":"https://api.github.com/repos/fastlane/fastlane/issues/6218","number":6218,"state":"open","locked":false,"title":"Update snapshot to support both Swift 3 and Swift 2.3","user":{"login":"KrauseFx","id":869950,"avatar_url":"https://avatars.githubusercontent.com/u/869950?v=3","gravatar_id":"","url":"https://api.github.com/users/KrauseFx","html_url":"https://github.com/KrauseFx","followers_url":"https://api.github.com/users/KrauseFx/followers","following_url":"https://api.github.com/users/KrauseFx/following{/other_user}","gists_url":"https://api.github.com/users/KrauseFx/gists{/gist_id}","starred_url":"https://api.github.com/users/KrauseFx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KrauseFx/subscriptions","organizations_url":"https://api.github.com/users/KrauseFx/orgs","repos_url":"https://api.github.com/users/KrauseFx/repos","events_url":"https://api.github.com/users/KrauseFx/events{/privacy}","received_events_url":"https://api.github.com/users/KrauseFx/received_events","type":"User","site_admin":false},"body":"<img width=\"916\" alt=\"screenshot 2016-09-20 17 19 30\" src=\"https://cloud.githubusercontent.com/assets/869950/18689327/908494de-7f56-11e6-9d1a-7ac28e344cc4.png\">\r\n","created_at":"2016-09-20T21:20:49Z","updated_at":"2016-09-20T21:20:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"08f9112c5f9fc6ff7903c2f19e41ce78f62ed754","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/fastlane/fastlane/pulls/6218/commits","review_comments_url":"https://api.github.com/repos/fastlane/fastlane/pulls/6218/comments","review_comment_url":"https://api.github.com/repos/fastlane/fastlane/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fastlane/fastlane/issues/6218/comments","statuses_url":"https://api.github.com/repos/fastlane/fastlane/statuses/6311abdc418c35bdab3762985500c38558071bfd","head":{"label":"fastlane:snapshot-swift-3","ref":"snapshot-swift-3","sha":"6311abdc418c35bdab3762985500c38558071bfd","user":{"login":"fastlane","id":11098337,"avatar_url":"https://avatars.githubusercontent.com/u/11098337?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane","html_url":"https://github.com/fastlane","followers_url":"https://api.github.com/users/fastlane/followers","following_url":"https://api.github.com/users/fastlane/following{/other_user}","gists_url":"https://api.github.com/users/fastlane/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane/subscriptions","organizations_url":"https://api.github.com/users/fastlane/orgs","repos_url":"https://api.github.com/users/fastlane/repos","events_url":"https://api.github.com/users/fastlane/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane/received_events","type":"Organization","site_admin":false},"repo":{"id":27442967,"name":"fastlane","full_name":"fastlane/fastlane","owner":{"login":"fastlane","id":11098337,"avatar_url":"https://avatars.githubusercontent.com/u/11098337?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane","html_url":"https://github.com/fastlane","followers_url":"https://api.github.com/users/fastlane/followers","following_url":"https://api.github.com/users/fastlane/following{/other_user}","gists_url":"https://api.github.com/users/fastlane/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane/subscriptions","organizations_url":"https://api.github.com/users/fastlane/orgs","repos_url":"https://api.github.com/users/fastlane/repos","events_url":"https://api.github.com/users/fastlane/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fastlane/fastlane","description":"The easiest way to automate building and releasing your iOS and Android apps","fork":false,"url":"https://api.github.com/repos/fastlane/fastlane","forks_url":"https://api.github.com/repos/fastlane/fastlane/forks","keys_url":"https://api.github.com/repos/fastlane/fastlane/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fastlane/fastlane/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fastlane/fastlane/teams","hooks_url":"https://api.github.com/repos/fastlane/fastlane/hooks","issue_events_url":"https://api.github.com/repos/fastlane/fastlane/issues/events{/number}","events_url":"https://api.github.com/repos/fastlane/fastlane/events","assignees_url":"https://api.github.com/repos/fastlane/fastlane/assignees{/user}","branches_url":"https://api.github.com/repos/fastlane/fastlane/branches{/branch}","tags_url":"https://api.github.com/repos/fastlane/fastlane/tags","blobs_url":"https://api.github.com/repos/fastlane/fastlane/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fastlane/fastlane/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fastlane/fastlane/git/refs{/sha}","trees_url":"https://api.github.com/repos/fastlane/fastlane/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fastlane/fastlane/statuses/{sha}","languages_url":"https://api.github.com/repos/fastlane/fastlane/languages","stargazers_url":"https://api.github.com/repos/fastlane/fastlane/stargazers","contributors_url":"https://api.github.com/repos/fastlane/fastlane/contributors","subscribers_url":"https://api.github.com/repos/fastlane/fastlane/subscribers","subscription_url":"https://api.github.com/repos/fastlane/fastlane/subscription","commits_url":"https://api.github.com/repos/fastlane/fastlane/commits{/sha}","git_commits_url":"https://api.github.com/repos/fastlane/fastlane/git/commits{/sha}","comments_url":"https://api.github.com/repos/fastlane/fastlane/comments{/number}","issue_comment_url":"https://api.github.com/repos/fastlane/fastlane/issues/comments{/number}","contents_url":"https://api.github.com/repos/fastlane/fastlane/contents/{+path}","compare_url":"https://api.github.com/repos/fastlane/fastlane/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fastlane/fastlane/merges","archive_url":"https://api.github.com/repos/fastlane/fastlane/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fastlane/fastlane/downloads","issues_url":"https://api.github.com/repos/fastlane/fastlane/issues{/number}","pulls_url":"https://api.github.com/repos/fastlane/fastlane/pulls{/number}","milestones_url":"https://api.github.com/repos/fastlane/fastlane/milestones{/number}","notifications_url":"https://api.github.com/repos/fastlane/fastlane/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fastlane/fastlane/labels{/name}","releases_url":"https://api.github.com/repos/fastlane/fastlane/releases{/id}","deployments_url":"https://api.github.com/repos/fastlane/fastlane/deployments","created_at":"2014-12-02T17:00:38Z","updated_at":"2016-09-20T20:54:22Z","pushed_at":"2016-09-20T21:20:49Z","git_url":"git://github.com/fastlane/fastlane.git","ssh_url":"git@github.com:fastlane/fastlane.git","clone_url":"https://github.com/fastlane/fastlane.git","svn_url":"https://github.com/fastlane/fastlane","homepage":"https://fastlane.tools","size":63287,"stargazers_count":11105,"watchers_count":11105,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1603,"mirror_url":null,"open_issues_count":476,"forks":1603,"open_issues":476,"watchers":11105,"default_branch":"master"}},"base":{"label":"fastlane:master","ref":"master","sha":"f4dbb0797f30eda4dc94ddc68b468a80c72ea96b","user":{"login":"fastlane","id":11098337,"avatar_url":"https://avatars.githubusercontent.com/u/11098337?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane","html_url":"https://github.com/fastlane","followers_url":"https://api.github.com/users/fastlane/followers","following_url":"https://api.github.com/users/fastlane/following{/other_user}","gists_url":"https://api.github.com/users/fastlane/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane/subscriptions","organizations_url":"https://api.github.com/users/fastlane/orgs","repos_url":"https://api.github.com/users/fastlane/repos","events_url":"https://api.github.com/users/fastlane/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane/received_events","type":"Organization","site_admin":false},"repo":{"id":27442967,"name":"fastlane","full_name":"fastlane/fastlane","owner":{"login":"fastlane","id":11098337,"avatar_url":"https://avatars.githubusercontent.com/u/11098337?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane","html_url":"https://github.com/fastlane","followers_url":"https://api.github.com/users/fastlane/followers","following_url":"https://api.github.com/users/fastlane/following{/other_user}","gists_url":"https://api.github.com/users/fastlane/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane/subscriptions","organizations_url":"https://api.github.com/users/fastlane/orgs","repos_url":"https://api.github.com/users/fastlane/repos","events_url":"https://api.github.com/users/fastlane/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fastlane/fastlane","description":"The easiest way to automate building and releasing your iOS and Android apps","fork":false,"url":"https://api.github.com/repos/fastlane/fastlane","forks_url":"https://api.github.com/repos/fastlane/fastlane/forks","keys_url":"https://api.github.com/repos/fastlane/fastlane/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fastlane/fastlane/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fastlane/fastlane/teams","hooks_url":"https://api.github.com/repos/fastlane/fastlane/hooks","issue_events_url":"https://api.github.com/repos/fastlane/fastlane/issues/events{/number}","events_url":"https://api.github.com/repos/fastlane/fastlane/events","assignees_url":"https://api.github.com/repos/fastlane/fastlane/assignees{/user}","branches_url":"https://api.github.com/repos/fastlane/fastlane/branches{/branch}","tags_url":"https://api.github.com/repos/fastlane/fastlane/tags","blobs_url":"https://api.github.com/repos/fastlane/fastlane/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fastlane/fastlane/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fastlane/fastlane/git/refs{/sha}","trees_url":"https://api.github.com/repos/fastlane/fastlane/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fastlane/fastlane/statuses/{sha}","languages_url":"https://api.github.com/repos/fastlane/fastlane/languages","stargazers_url":"https://api.github.com/repos/fastlane/fastlane/stargazers","contributors_url":"https://api.github.com/repos/fastlane/fastlane/contributors","subscribers_url":"https://api.github.com/repos/fastlane/fastlane/subscribers","subscription_url":"https://api.github.com/repos/fastlane/fastlane/subscription","commits_url":"https://api.github.com/repos/fastlane/fastlane/commits{/sha}","git_commits_url":"https://api.github.com/repos/fastlane/fastlane/git/commits{/sha}","comments_url":"https://api.github.com/repos/fastlane/fastlane/comments{/number}","issue_comment_url":"https://api.github.com/repos/fastlane/fastlane/issues/comments{/number}","contents_url":"https://api.github.com/repos/fastlane/fastlane/contents/{+path}","compare_url":"https://api.github.com/repos/fastlane/fastlane/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fastlane/fastlane/merges","archive_url":"https://api.github.com/repos/fastlane/fastlane/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fastlane/fastlane/downloads","issues_url":"https://api.github.com/repos/fastlane/fastlane/issues{/number}","pulls_url":"https://api.github.com/repos/fastlane/fastlane/pulls{/number}","milestones_url":"https://api.github.com/repos/fastlane/fastlane/milestones{/number}","notifications_url":"https://api.github.com/repos/fastlane/fastlane/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fastlane/fastlane/labels{/name}","releases_url":"https://api.github.com/repos/fastlane/fastlane/releases{/id}","deployments_url":"https://api.github.com/repos/fastlane/fastlane/deployments","created_at":"2014-12-02T17:00:38Z","updated_at":"2016-09-20T20:54:22Z","pushed_at":"2016-09-20T21:20:49Z","git_url":"git://github.com/fastlane/fastlane.git","ssh_url":"git@github.com:fastlane/fastlane.git","clone_url":"https://github.com/fastlane/fastlane.git","svn_url":"https://github.com/fastlane/fastlane","homepage":"https://fastlane.tools","size":63287,"stargazers_count":11105,"watchers_count":11105,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1603,"mirror_url":null,"open_issues_count":476,"forks":1603,"open_issues":476,"watchers":11105,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/6218"},"html":{"href":"https://github.com/fastlane/fastlane/pull/6218"},"issue":{"href":"https://api.github.com/repos/fastlane/fastlane/issues/6218"},"comments":{"href":"https://api.github.com/repos/fastlane/fastlane/issues/6218/comments"},"review_comments":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/6218/comments"},"review_comment":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fastlane/fastlane/pulls/6218/commits"},"statuses":{"href":"https://api.github.com/repos/fastlane/fastlane/statuses/6311abdc418c35bdab3762985500c38558071bfd"}}}}
{"actor":{"display_login":"houndci-bot"}}