longbow 0.6.1 → 1.0.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: 8264f7d4b5bb123a0bc4e9de8d55caac3b952910
4
- data.tar.gz: 62e6d79597e2c34fd4dac6c80ca1f1570cfa611f
3
+ metadata.gz: 73f95934d5cf17c32f132c28f1bcf58cf55c792a
4
+ data.tar.gz: b5c3aecf5eebabeb4382b3a6462d9791049c2760
5
5
  SHA512:
6
- metadata.gz: b15bdc15e0c683ba765a5dbc950ac2ed6662ea602cb5924f8a52c899aab7e2495b4c9dc8efc2dbb26e79053c53c0468ada4a30b104648ee830dceada6014512c
7
- data.tar.gz: 5e70e82c9359d9c62e6b6046b270a88a85e2fe556d9ac3321e03f0aafc247d4ece97d79eac4875ab0bcbb02177d203e90400be016587140bf04db76da67883a0
6
+ metadata.gz: de4004db97b741fb0e69c4931126d37a1310924bd204837e6a059d39fd3a9f7834d49c6de28dc88937cf0afe162220531a991bf22ac94ea969eb5ed98172b30c
7
+ data.tar.gz: 9e22e2301503257cefd03ad33e00c26bc14f08256673857aa1084d901bf9d8c4448b77db16cefd972308f4edec7c928281ba169e662b8ef78c3ef040a009386d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- longbow (0.5.1)
4
+ longbow (0.6.3)
5
5
  bundler (~> 1.3)
6
6
  commander (~> 4.1)
7
7
  dotenv (~> 0.7)
@@ -13,7 +13,8 @@ PATH
13
13
  GEM
14
14
  remote: https://rubygems.org/
15
15
  specs:
16
- activesupport (3.2.16)
16
+ CFPropertyList (2.2.8)
17
+ activesupport (3.2.19)
17
18
  i18n (~> 0.6, >= 0.6.4)
18
19
  multi_json (~> 1.0)
19
20
  colored (1.2)
@@ -25,12 +26,13 @@ GEM
25
26
  fileutils (0.7)
26
27
  rmagick (>= 2.13.1)
27
28
  highline (1.6.21)
28
- i18n (0.6.9)
29
+ i18n (0.6.11)
29
30
  json (1.8.1)
30
- multi_json (1.9.3)
31
+ multi_json (1.10.1)
31
32
  rake (10.1.1)
32
- rmagick (2.13.2)
33
- xcodeproj (0.17.0)
33
+ rmagick (2.13.3)
34
+ xcodeproj (0.19.1)
35
+ CFPropertyList (~> 2.2)
34
36
  activesupport (~> 3.0)
35
37
  colored (~> 1.2)
36
38
 
@@ -31,6 +31,8 @@ module Longbow
31
31
  end
32
32
  end
33
33
 
34
+ #puts proj.pretty_print
35
+
34
36
  # Create Target if Necessary
35
37
  main_target = proj.targets.first
36
38
  @target = create_target(proj, target) unless @target
@@ -50,8 +52,10 @@ module Longbow
50
52
  @target.build_configurations.each do |b|
51
53
  # Main Settings
52
54
  main_settings = nil
55
+ base_config = nil
53
56
  main_target.build_configurations.each do |bc|
54
57
  main_settings = bc.build_settings if bc.to_s == b.to_s
58
+ base_config = bc.base_configuration_reference if bc.to_s == b.to_s
55
59
  end
56
60
  settings = b.build_settings
57
61
  main_settings.each_key do |key|
@@ -65,8 +69,8 @@ module Longbow
65
69
  settings['SKIP_INSTALL'] = 'NO'
66
70
 
67
71
  if File.exists? directory + '/Pods'
72
+ b.base_configuration_reference = base_config
68
73
  settings['PODS_ROOT'] = '${SRCROOT}/Pods'
69
- settings['HEADER_SEARCH_PATHS'] = ['${PODS_ROOT}/Headers/**']
70
74
  end
71
75
  end
72
76
 
@@ -2,7 +2,7 @@ $:.push File.expand_path('../', __FILE__)
2
2
  require 'colors'
3
3
 
4
4
  module Longbow
5
- VERSION = '0.6.1'
5
+ VERSION = '1.0.0'
6
6
 
7
7
  def self.check_for_newer_version
8
8
  unless Gem.latest_version_for('longbow').to_s == VERSION
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 = "iPhone-6";
46
+ model = "iOS-4-in";
47
47
  } else {
48
48
  model = "iOS-3.5-in";
49
49
  }
@@ -25,25 +25,36 @@ 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
- ui_script="$2"
28
+ scheme_name="$2"
29
+ ui_script="$3"
29
30
 
30
31
  # The locale identifiers for the languages you want to shoot
31
32
  # Use the format like en-US zh-Hans for filenames compatible with iTunes
32
33
  # connect upload tool
33
34
  # FYI: get the locale names for you existing app with iTMSTransporter and:
34
35
  # grep locale ~/Desktop/*.itmsp/metadata.xml | grep name | sort -u
35
- languages="en-US fr ja"
36
+ languages="en-US"
36
37
 
37
38
  # The simulators we want to run the script against, declared as a Bash array.
38
39
  # 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
+ #)
39
45
  declare -a simulators=(
40
- "Resizable iPad"
46
+ "iPhone 4s"
47
+ "iPhone 5s"
48
+ "iPhone 6"
49
+ "iPhone 6 Plus"
41
50
  )
42
51
 
43
52
  function main {
44
53
  _check_destination
45
54
  _check_ui_script
55
+ _check_scheme_name
46
56
  _xcode clean build
57
+ _reset_sim
47
58
 
48
59
  for simulator in "${simulators[@]}"; do
49
60
  for language in $languages; do
@@ -72,8 +83,8 @@ function _check_destination {
72
83
  destination="$HOME/Desktop/screenshots"
73
84
  fi
74
85
  if [ -d "$destination" ]; then
75
- echo "Destination directory \"$destination\" already exists! Aborting."
76
- exit 1
86
+ echo "Destination directory \"$destination\" already exists! Moving Directory."
87
+ mv "$destination" "$HOME/Desktop/screenshots$(date +"%Y%m%d%H%M")"
77
88
  fi
78
89
  }
79
90
 
@@ -89,6 +100,13 @@ function _check_ui_script {
89
100
  fi
90
101
  }
91
102
 
103
+ function _check_scheme_name {
104
+ if [ -z "$scheme_name" ]; then
105
+ scheme_name=$(basename *.xcworkspace .xcworkspace)
106
+ echo "No scheme name specified, using the default."
107
+ fi
108
+ }
109
+
92
110
  function _xcode {
93
111
  # A wrapper around `xcodebuild` that tells it to build the app in the temp
94
112
  # directory. If your app uses workspaces or special schemes, you'll need to
@@ -103,7 +121,7 @@ function _xcode {
103
121
  # or how I became to know this fact
104
122
  xcodebuild -sdk "iphonesimulator$ios_version" \
105
123
  CONFIGURATION_BUILD_DIR="$build_dir/build" \
106
- -workspace $base.xcworkspace -scheme $base -configuration AdHoc \
124
+ -workspace $base.xcworkspace -scheme $scheme_name -configuration AdHoc \
107
125
  DSTROOT=$build_dir \
108
126
  OBJROOT=$build_dir \
109
127
  SYMROOT=$build_dir \
@@ -112,7 +130,7 @@ function _xcode {
112
130
  xcodebuild -sdk "iphonesimulator$ios_version" \
113
131
  CONFIGURATION_BUILD_DIR="$build_dir/build" \
114
132
  PRODUCT_NAME=app \
115
- -workspace $base.xcworkspace -scheme $base -configuration AdHoc \
133
+ -workspace $base.xcworkspace -scheme $scheme_name -configuration AdHoc \
116
134
  DSTROOT=$build_dir \
117
135
  OBJROOT=$build_dir \
118
136
  SYMROOT=$build_dir \
@@ -177,11 +195,18 @@ function _copy_screenshots {
177
195
  cp $trace_results_dir/Run\ 1/*.png "$destination/$language"
178
196
  }
179
197
 
198
+ function _reset_sim {
199
+ count=`ps aux | grep [l]aunchd_sim | wc -l`
200
+ if [ $count -ne 0 ]
201
+ then
202
+ kill -9 $(ps -ef | grep [l]aunchd_sim | awk {'print $2'})
203
+ fi
204
+ }
205
+
180
206
  function _close_sim {
181
207
  # I know, I know. It says "iPhone Simulator". For some reason,
182
208
  # that's the only way Applescript can identify it.
183
209
  osascript -e "tell application \"iPhone Simulator\" to quit"
184
210
  }
185
211
 
186
- main
187
-
212
+ main
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: longbow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 1.0.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-23 00:00:00.000000000 Z
11
+ date: 2014-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler