longbow 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +42 -0
- data/lib/longbow/commands/shoot.rb +3 -1
- data/lib/longbow/version.rb +1 -1
- data/resources/capture.js +1 -1
- data/resources/ui-screen-shooter.sh +8 -32
- metadata +42 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f87106345d087aa1e5f706aec86e5fe1c75bc38
|
4
|
+
data.tar.gz: b99f85461d9c7113eb7aa3e416e4ced2efac45c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa191c29489e00e43b81baa3ef374a0f86bac9342379357ca8f43c53f45fd8fefa46382612dfc7f559f7a4e7144601cde7dfd63646bcf58fc5d745a84c55b0dd
|
7
|
+
data.tar.gz: 5fda5b997d8a085245fdd701049ac1f1d07f4fbdacc8358830fa247ba2e82a29834f5840bcf3f596e529c436666885db8f36514f37a7d6c616d15e3e9034756b
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
longbow (0.5.1)
|
5
|
+
bundler (~> 1.3)
|
6
|
+
commander (~> 4.1)
|
7
|
+
dotenv (~> 0.7)
|
8
|
+
fileutils
|
9
|
+
json
|
10
|
+
rmagick (~> 2.13.2)
|
11
|
+
xcodeproj
|
12
|
+
|
13
|
+
GEM
|
14
|
+
remote: https://rubygems.org/
|
15
|
+
specs:
|
16
|
+
activesupport (3.2.16)
|
17
|
+
i18n (~> 0.6, >= 0.6.4)
|
18
|
+
multi_json (~> 1.0)
|
19
|
+
colored (1.2)
|
20
|
+
commander (4.2.0)
|
21
|
+
highline (~> 1.6.11)
|
22
|
+
dotenv (0.11.1)
|
23
|
+
dotenv-deployment (~> 0.0.2)
|
24
|
+
dotenv-deployment (0.0.2)
|
25
|
+
fileutils (0.7)
|
26
|
+
rmagick (>= 2.13.1)
|
27
|
+
highline (1.6.21)
|
28
|
+
i18n (0.6.9)
|
29
|
+
json (1.8.1)
|
30
|
+
multi_json (1.9.3)
|
31
|
+
rake (10.1.1)
|
32
|
+
rmagick (2.13.2)
|
33
|
+
xcodeproj (0.17.0)
|
34
|
+
activesupport (~> 3.0)
|
35
|
+
colored (~> 1.2)
|
36
|
+
|
37
|
+
PLATFORMS
|
38
|
+
ruby
|
39
|
+
|
40
|
+
DEPENDENCIES
|
41
|
+
longbow!
|
42
|
+
rake
|
@@ -13,6 +13,7 @@ command :shoot do |c|
|
|
13
13
|
c.option '-n', '--name NAME', 'Target name from the corresponding longbow.json file.'
|
14
14
|
c.option '-d', '--directory DIRECTORY', 'Path where the .xcodeproj or .xcworkspace file && the longbow.json file live.'
|
15
15
|
c.option '-u', '--url URL', 'URL of a longbow formatted JSON file.'
|
16
|
+
c.option '-i', '--images IMAGES', 'Set this flag to not recreate images in the longbow file.'
|
16
17
|
|
17
18
|
c.action do |args, options|
|
18
19
|
# Check for newer version
|
@@ -21,6 +22,7 @@ command :shoot do |c|
|
|
21
22
|
# Set Up
|
22
23
|
@target_name = options.name ? options.name : nil
|
23
24
|
@directory = options.directory ? options.directory : Dir.pwd
|
25
|
+
@noimages = options.images ? true : false
|
24
26
|
@url = options.url ? options.url : nil
|
25
27
|
@targets = []
|
26
28
|
|
@@ -57,7 +59,7 @@ command :shoot do |c|
|
|
57
59
|
icon = t['icon_url'] || t['icon_path']
|
58
60
|
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']
|
59
61
|
Longbow::update_target @directory, t['name'], obj['global_info_keys'], t['info_plist'], icon, launch
|
60
|
-
Longbow::create_images
|
62
|
+
Longbow::create_images(@directory, t, obj) unless @noimages
|
61
63
|
Longbow::green " Finished: #{t['name']}\n" unless $nolog
|
62
64
|
end
|
63
65
|
end
|
data/lib/longbow/version.rb
CHANGED
data/resources/capture.js
CHANGED
@@ -43,7 +43,7 @@ function captureLocalizedScreenshot(name) {
|
|
43
43
|
|
44
44
|
if (model.match(/iPhone/)) {
|
45
45
|
if ((orientation == "portrait" && rect.size.height > 480) || (orientation == "landscape" && rect.size.width > 480)) {
|
46
|
-
model = "
|
46
|
+
model = "iPhone-6";
|
47
47
|
} else {
|
48
48
|
model = "iOS-3.5-in";
|
49
49
|
}
|
@@ -25,34 +25,25 @@ set -e
|
|
25
25
|
|
26
26
|
# We require a parameter for where to put the results and the test script
|
27
27
|
destination="$1"
|
28
|
-
|
29
|
-
ui_script="$3"
|
28
|
+
ui_script="$2"
|
30
29
|
|
31
30
|
# The locale identifiers for the languages you want to shoot
|
32
31
|
# Use the format like en-US zh-Hans for filenames compatible with iTunes
|
33
32
|
# connect upload tool
|
34
33
|
# FYI: get the locale names for you existing app with iTMSTransporter and:
|
35
34
|
# grep locale ~/Desktop/*.itmsp/metadata.xml | grep name | sort -u
|
36
|
-
languages="en-US"
|
35
|
+
languages="en-US fr ja"
|
37
36
|
|
38
37
|
# The simulators we want to run the script against, declared as a Bash array.
|
39
38
|
# Run `instruments -w help` to get a list of all the possible string values.
|
40
|
-
#declare -a simulators=(
|
41
|
-
#"iPhone Retina (3.5-inch) - Simulator - iOS 7.1"
|
42
|
-
#"iPhone Retina (4-inch) - Simulator - iOS 7.1"
|
43
|
-
#"iPad Retina - Simulator - iOS 7.1"
|
44
|
-
#)
|
45
39
|
declare -a simulators=(
|
46
|
-
"
|
47
|
-
"iPhone Retina (4-inch) - Simulator - iOS 7.1"
|
40
|
+
"Resizable iPad"
|
48
41
|
)
|
49
42
|
|
50
43
|
function main {
|
51
44
|
_check_destination
|
52
45
|
_check_ui_script
|
53
|
-
_check_scheme_name
|
54
46
|
_xcode clean build
|
55
|
-
_reset_sim
|
56
47
|
|
57
48
|
for simulator in "${simulators[@]}"; do
|
58
49
|
for language in $languages; do
|
@@ -81,8 +72,8 @@ function _check_destination {
|
|
81
72
|
destination="$HOME/Desktop/screenshots"
|
82
73
|
fi
|
83
74
|
if [ -d "$destination" ]; then
|
84
|
-
echo "Destination directory \"$destination\" already exists!
|
85
|
-
|
75
|
+
echo "Destination directory \"$destination\" already exists! Aborting."
|
76
|
+
exit 1
|
86
77
|
fi
|
87
78
|
}
|
88
79
|
|
@@ -98,13 +89,6 @@ function _check_ui_script {
|
|
98
89
|
fi
|
99
90
|
}
|
100
91
|
|
101
|
-
function _check_scheme_name {
|
102
|
-
if [ -z "$scheme_name" ]; then
|
103
|
-
scheme_name=$(basename *.xcworkspace .xcworkspace)
|
104
|
-
echo "No scheme name specified, using the default."
|
105
|
-
fi
|
106
|
-
}
|
107
|
-
|
108
92
|
function _xcode {
|
109
93
|
# A wrapper around `xcodebuild` that tells it to build the app in the temp
|
110
94
|
# directory. If your app uses workspaces or special schemes, you'll need to
|
@@ -119,7 +103,7 @@ function _xcode {
|
|
119
103
|
# or how I became to know this fact
|
120
104
|
xcodebuild -sdk "iphonesimulator$ios_version" \
|
121
105
|
CONFIGURATION_BUILD_DIR="$build_dir/build" \
|
122
|
-
-workspace $base.xcworkspace -scheme $
|
106
|
+
-workspace $base.xcworkspace -scheme $base -configuration AdHoc \
|
123
107
|
DSTROOT=$build_dir \
|
124
108
|
OBJROOT=$build_dir \
|
125
109
|
SYMROOT=$build_dir \
|
@@ -128,7 +112,7 @@ function _xcode {
|
|
128
112
|
xcodebuild -sdk "iphonesimulator$ios_version" \
|
129
113
|
CONFIGURATION_BUILD_DIR="$build_dir/build" \
|
130
114
|
PRODUCT_NAME=app \
|
131
|
-
-workspace $base.xcworkspace -scheme $
|
115
|
+
-workspace $base.xcworkspace -scheme $base -configuration AdHoc \
|
132
116
|
DSTROOT=$build_dir \
|
133
117
|
OBJROOT=$build_dir \
|
134
118
|
SYMROOT=$build_dir \
|
@@ -164,7 +148,7 @@ function _run_automation {
|
|
164
148
|
in language \"${language}\"..."
|
165
149
|
|
166
150
|
dev_tools_dir=`xcode-select -print-path`
|
167
|
-
tracetemplate="$dev_tools_dir/../Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.
|
151
|
+
tracetemplate="$dev_tools_dir/../Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate"
|
168
152
|
|
169
153
|
# Check out the `unix_instruments.sh` script to see why we need this wrapper.
|
170
154
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
@@ -193,14 +177,6 @@ function _copy_screenshots {
|
|
193
177
|
cp $trace_results_dir/Run\ 1/*.png "$destination/$language"
|
194
178
|
}
|
195
179
|
|
196
|
-
function _reset_sim {
|
197
|
-
count=`ps aux | grep [l]aunchd_sim | wc -l`
|
198
|
-
if [ $count -ne 0 ]
|
199
|
-
then
|
200
|
-
kill -9 $(ps -ef | grep [l]aunchd_sim | awk {'print $2'})
|
201
|
-
fi
|
202
|
-
}
|
203
|
-
|
204
180
|
function _close_sim {
|
205
181
|
# I know, I know. It says "iPhone Simulator". For some reason,
|
206
182
|
# that's the only way Applescript can identify it.
|
metadata
CHANGED
@@ -1,125 +1,125 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: longbow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Intermark Interactive
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.3'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: fileutils
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: commander
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '4.1'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '4.1'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: dotenv
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0.7'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0.7'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rmagick
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - ~>
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 2.13.2
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - ~>
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 2.13.2
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: xcodeproj
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: json
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rake
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
description: One codebase. Multiple App Store submission targets with different icons,
|
@@ -131,26 +131,27 @@ executables:
|
|
131
131
|
extensions: []
|
132
132
|
extra_rdoc_files: []
|
133
133
|
files:
|
134
|
-
- ./Gemfile
|
135
|
-
- ./
|
136
|
-
- ./
|
137
|
-
- ./
|
138
|
-
- ./
|
139
|
-
- ./lib/longbow
|
140
|
-
- ./lib/longbow/
|
141
|
-
- ./lib/longbow/
|
142
|
-
- ./lib/longbow/
|
143
|
-
- ./lib/longbow/
|
144
|
-
- ./lib/longbow/
|
145
|
-
- ./lib/longbow/
|
146
|
-
- ./lib/longbow.rb
|
147
|
-
- ./
|
148
|
-
- ./
|
149
|
-
- ./
|
150
|
-
- ./
|
151
|
-
- ./resources/
|
152
|
-
- ./resources/
|
153
|
-
- ./resources/
|
134
|
+
- "./Gemfile"
|
135
|
+
- "./Gemfile.lock"
|
136
|
+
- "./LICENSE.txt"
|
137
|
+
- "./README.md"
|
138
|
+
- "./Rakefile"
|
139
|
+
- "./lib/longbow.rb"
|
140
|
+
- "./lib/longbow/colors.rb"
|
141
|
+
- "./lib/longbow/commands.rb"
|
142
|
+
- "./lib/longbow/commands/aim.rb"
|
143
|
+
- "./lib/longbow/commands/install.rb"
|
144
|
+
- "./lib/longbow/commands/shoot.rb"
|
145
|
+
- "./lib/longbow/images.rb"
|
146
|
+
- "./lib/longbow/json.rb"
|
147
|
+
- "./lib/longbow/plist.rb"
|
148
|
+
- "./lib/longbow/targets.rb"
|
149
|
+
- "./lib/longbow/utilities.rb"
|
150
|
+
- "./lib/longbow/version.rb"
|
151
|
+
- "./resources/banner.png"
|
152
|
+
- "./resources/capture.js"
|
153
|
+
- "./resources/ui-screen-shooter.sh"
|
154
|
+
- "./resources/unix_instruments.sh"
|
154
155
|
- bin/longbow
|
155
156
|
homepage: https://github.com/intermark/longbow
|
156
157
|
licenses:
|
@@ -162,17 +163,17 @@ require_paths:
|
|
162
163
|
- lib
|
163
164
|
required_ruby_version: !ruby/object:Gem::Requirement
|
164
165
|
requirements:
|
165
|
-
- -
|
166
|
+
- - ">="
|
166
167
|
- !ruby/object:Gem::Version
|
167
168
|
version: '0'
|
168
169
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
169
170
|
requirements:
|
170
|
-
- -
|
171
|
+
- - ">="
|
171
172
|
- !ruby/object:Gem::Version
|
172
173
|
version: '0'
|
173
174
|
requirements: []
|
174
175
|
rubyforge_project:
|
175
|
-
rubygems_version: 2.
|
176
|
+
rubygems_version: 2.2.2
|
176
177
|
signing_key:
|
177
178
|
specification_version: 4
|
178
179
|
summary: Better target creation for one iOS codebase.
|