squash_ios_symbolicator 1.0.1 → 1.1.2

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: a6ef9ee6d8930743af24cf36eef298867293a217166310c3649d2b613cfe0fc6
4
+ data.tar.gz: f8c01278c965c4cd7ea495e7bdb7d1c22be461644b74863cc8caec6c1479bd8b
5
+ SHA512:
6
+ metadata.gz: 14ee844df80d9b6cb492cdc0231cca2a0ad373a0caa851fe2fe60e29e5d7ecff3acf802b5839d34554a9097269d688be17cb6439c3c5cd6d013cee70847e54e3
7
+ data.tar.gz: '029bce8a1aee842d3ae6f67aebb09c40d725e74054db8e4aed60927966e775980d54939b70cbb07b21261e85cb4d36055a1a868709329f599ec3e3c99fdef2c9'
data/README.md CHANGED
@@ -1,3 +1,10 @@
1
+ # ⚠️ Deprecated
2
+
3
+ This gem is no longer maintained. Square's Squash service has been discontinued.
4
+ See alternatives like Sentry, Honeybadger, Bugsnag, or Rollbar.
5
+
6
+ ---
7
+
1
8
  Squash iOS Symbolicator
2
9
  =======================
3
10
 
@@ -38,6 +45,13 @@ This gem uses `dwarfdump` to perform its symbolication. You'll therefore need
38
45
  the Xcode Command Line tools installed on the machine that will be performing
39
46
  the symbolication upload.
40
47
 
48
+ If you wish to use the symbolication tools provided in your own Ruby program,
49
+ you will need to add this gem to your Gemfile:
50
+
51
+ ```` ruby
52
+ gem 'squash_ios_symbolicator', :require => 'squash/symbolicator'
53
+ ````
54
+
41
55
  Usage
42
56
  -----
43
57
 
data/bin/squash_release CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- # Copyright 2012 Square Inc.
3
+ # Copyright 2013 Square Inc.
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
17
17
  require 'optparse'
18
18
  require 'rubygems'
19
19
  require 'squash/uploader'
20
+ require 'plist'
20
21
 
21
22
  def git_revision(dir)
22
23
  head = File.read(File.join(dir, '.git', 'HEAD')).chomp
@@ -27,25 +28,34 @@ def git_revision(dir)
27
28
  end
28
29
  end
29
30
 
30
- project_dir = Dir.getwd
31
+ plist_path = File.join(ENV['PROJECT_DIR'], ENV['INFOPLIST_FILE']) if ENV['PROJECT_DIR'] && ENV['INFOPLIST_FILE']
32
+ infoplist = Plist.parse_xml(plist_path) if plist_path
33
+
34
+ project_dir = ENV['PROJECT_DIR'] || Dir.getwd
31
35
  revision = nil
32
- options = {}
36
+ if infoplist
37
+ build = infoplist['CFBundleVersion']
38
+ version = infoplist['CFBundleShortVersionString']
39
+ end
40
+ options = {:success => [Net::HTTPSuccess, 422]}
33
41
 
34
42
  parser = OptionParser.new do |parser|
35
- parser.banner = "Usage: squash_release [options] YOUR_SQUASH_HOST YOUR_API_KEY ENVIRONMENT BUILD_NUMBER"
43
+ parser.banner = "Usage: squash_release [options] YOUR_SQUASH_HOST YOUR_API_KEY ENVIRONMENT"
36
44
  parser.on('-o', '--open-timeout N', Integer, "HTTP connection open timeout") { |ot| options[:open_timeout] = ot }
37
45
  parser.on('-r', '--read-timeout N', Integer, "HTTP connection data received timeout") { |rt| options[:read_timeout] = rt }
38
46
  parser.on('-k', '--[no-]skip-verification', "Do not perform SSL peer verification") { |sv| options[:skip_verification] = sv }
39
47
 
40
48
  parser.on('-p', '--project-dir F', "Specify a custom project directory (default current directory)") { |pd| project_dir = pd }
41
49
  parser.on('-r', '--revision R', "Specify a code revision that was deployed (default current revision)") { |r| revision = r }
50
+ parser.on('-b', '--build B', "Specify a machine-readble build number that was deployed (default from Info.plist)") { |b| build = b }
51
+ parser.on('-v', '--product-version V', "Specify a human-readable version that was deployed (default from Info.plist)") { |v| version = v }
42
52
 
43
53
  parser.on('-h', '--help', "Show this message") { puts parser; exit }
44
54
  parser.on('--version', "Display version number of this program") { puts "1.0.0"; exit }
45
55
  end
46
56
  parser.parse!(ARGV)
47
57
 
48
- if ARGV.size != 4
58
+ if ARGV.size != 3 || !build || !version
49
59
  puts parser
50
60
  exit 1
51
61
  end
@@ -53,7 +63,6 @@ end
53
63
  host = ARGV.shift
54
64
  api_key = ARGV.shift
55
65
  environment = ARGV.shift
56
- build = ARGV.shift
57
66
  revision = revision || git_revision(project_dir)
58
67
 
59
68
  Squash::Uploader.new(host, options).transmit '/api/1.0/deploy.json',
@@ -63,6 +72,7 @@ Squash::Uploader.new(host, options).transmit '/api/1.0/deploy.json',
63
72
  'deploy' => {
64
73
  'deployed_at' => Time.now,
65
74
  'revision' => revision,
66
- 'build' => build
75
+ 'build' => build,
76
+ 'version' => version
67
77
  }
68
78
  }
data/bin/symbolicate CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- # Copyright 2012 Square Inc.
3
+ # Copyright 2013 Square Inc.
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ require 'yaml'
21
21
 
22
22
  require 'rubygems'
23
23
  require 'squash/uploader'
24
- require 'squash_ios_symbolicator'
24
+ require 'squash/symbolicator'
25
25
 
26
26
  def git_revision(dir)
27
27
  head = File.read(File.join(dir, '.git', 'HEAD')).chomp
@@ -66,7 +66,7 @@ else
66
66
  end
67
67
  end
68
68
 
69
- sym = Symbolicator.new(dsym_file, project_dir)
69
+ sym = Squash::Symbolicator.new(dsym_file, project_dir)
70
70
  archs = sym.architectures
71
71
  uuids = Hash.new
72
72
  archs.each do |arch, uuid|
@@ -75,10 +75,10 @@ end
75
75
 
76
76
  Squash::Uploader.new(host, options).transmit '/api/1.0/symbolication.json',
77
77
  'symbolications' =>
78
- uuids.map do |uuid, (symbols, lines)|
78
+ uuids.map { |uuid, (symbols, lines)|
79
79
  {
80
80
  'uuid' => uuid,
81
81
  'symbols' => Base64.encode64(Zlib::Deflate.deflate(symbols.to_yaml)),
82
82
  'lines' => Base64.encode64(Zlib::Deflate.deflate(lines.to_yaml))
83
83
  }
84
- end
84
+ }
@@ -1,4 +1,4 @@
1
- # Copyright 2012 Square Inc.
1
+ # Copyright 2013 Square Inc.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -12,14 +12,25 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ require 'serialbox'
16
+
17
+ Squash::Symbolicator::Line = Struct.new(:start_address, :file, :line, :column)
18
+
15
19
  # An address ranged mapped to a specific line of code, as part of a {Lines}
16
20
  # aggregation. No symbol data is included.
17
21
 
18
- Squash::Symbolicator::Line = Struct.new(:start_address, :file, :line, :column)
22
+ class Squash::Symbolicator::Line
23
+ include SerialBox
24
+ serialize_with :JSON
25
+ serialize_fields do |s|
26
+ s.serialize :start_address, :file, :line, :column
27
+ end
19
28
 
20
- Squash::Symbolicator::Line.send(:define_method, :<=>) do |other|
21
- raise ArgumentError unless other.kind_of?(Squash::Symbolicator::Line)
22
- start_address <=> other.start_address
29
+ # @private
30
+ def <=>(other)
31
+ raise ArgumentError unless other.kind_of?(Squash::Symbolicator::Line)
32
+ start_address <=> other.start_address
33
+ end
23
34
  end
24
35
 
25
36
  # An aggregation of the `Symbolicator::Line`s of a binary class. This class
@@ -28,6 +39,10 @@ end
28
39
  class Squash::Symbolicator::Lines
29
40
  include Enumerable
30
41
 
42
+ include SerialBox
43
+ serialize_with :JSON
44
+ serialize_fields { |s| s.serialize :@lines }
45
+
31
46
  # Creates a new empty aggregation.
32
47
 
33
48
  def initialize
@@ -1,4 +1,4 @@
1
- # Copyright 2012 Square Inc.
1
+ # Copyright 2013 Square Inc.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -12,18 +12,27 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ Squash::Symbolicator::Symbol = Struct.new(:start_address, :end_address, :file, :line, :ios_method)
16
+
15
17
  # An address ranged mapped to a symbol (method or function name), as part of a
16
18
  # {Symbols} aggregation. The file and line where the symbol is declared is also
17
19
  # included.
18
20
 
19
- Squash::Symbolicator::Symbol = Struct.new(:start_address, :end_address, :file, :line, :ios_method)
21
+ class Squash::Symbolicator::Symbol
22
+ include SerialBox
23
+ serialize_with :JSON
24
+ serialize_fields do |s|
25
+ s.serialize :start_address, :end_address, :file, :line, :ios_method
26
+ end
20
27
 
21
- Squash::Symbolicator::Symbol.send(:define_method, :<=>) do |other|
22
- raise ArgumentError unless other.kind_of?(Squash::Symbolicator::Symbol)
23
- if start_address == other.start_address
24
- end_address <=> other.end_address
25
- else
26
- start_address <=> other.start_address
28
+ # @private
29
+ def <=>(other)
30
+ raise ArgumentError unless other.kind_of?(Squash::Symbolicator::Symbol)
31
+ if start_address == other.start_address
32
+ end_address <=> other.end_address
33
+ else
34
+ start_address <=> other.start_address
35
+ end
27
36
  end
28
37
  end
29
38
 
@@ -33,6 +42,10 @@ end
33
42
  class Squash::Symbolicator::Symbols
34
43
  include Enumerable
35
44
 
45
+ include SerialBox
46
+ serialize_with :JSON
47
+ serialize_fields { |s| s.serialize :@symbols }
48
+
36
49
  # Creates a new empty aggregation.
37
50
 
38
51
  def initialize
@@ -1,4 +1,4 @@
1
- # Copyright 2012 Square Inc.
1
+ # Copyright 2013 Square Inc.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -40,7 +40,7 @@ module Squash
40
40
 
41
41
  stdin, stdout, stderr = Open3.popen3('dwarfdump', '-u', @dsym)
42
42
  stdout.each_line do |line|
43
- if line =~ /^UUID: ([0-9A-F\-]+) \((.+?)\) [^\s]+$/
43
+ if line =~ /^UUID: ([0-9A-F\-]+) \((.+?)\)/
44
44
  architectures[$2] = $1
45
45
  end
46
46
  end
@@ -78,6 +78,7 @@ module Squash
78
78
 
79
79
  current_subprogram[tag] = value
80
80
  elsif line =~ /^0x[0-9a-f]+:\s+TAG_(\w+)/
81
+ next unless %w(low_pc high_pc decl_file decl_line name).all? { |k| current_subprogram.include? k }
81
82
  current_subprogram['decl_file'].sub!(/^#{Regexp.escape @project_dir}\//, '') if @project_dir
82
83
  symbolications.add current_subprogram['low_pc'],
83
84
  current_subprogram['high_pc'],
metadata CHANGED
@@ -1,117 +1,123 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: squash_ios_symbolicator
3
- version: !ruby/object:Gem::Version
4
- hash: 21
5
- prerelease:
6
- segments:
7
- - 1
8
- - 0
9
- - 1
10
- version: 1.0.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.2
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Tim Morgan
14
- autorequire:
15
8
  bindir: bin
16
9
  cert_chain: []
17
-
18
- date: 2013-01-04 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- requirement: &id001 !ruby/object:Gem::Requirement
22
- none: false
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- hash: 3
27
- segments:
28
- - 0
29
- version: "0"
30
- version_requirements: *id001
10
+ date: 2013-01-18 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
31
13
  name: plist
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '0'
19
+ type: :runtime
32
20
  prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: '0'
26
+ - !ruby/object:Gem::Dependency
27
+ name: serialbox
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
33
  type: :runtime
34
- - !ruby/object:Gem::Dependency
35
- requirement: &id002 !ruby/object:Gem::Requirement
36
- none: false
37
- requirements:
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
38
37
  - - ">="
39
- - !ruby/object:Gem::Version
40
- hash: 3
41
- segments:
42
- - 0
43
- version: "0"
44
- version_requirements: *id002
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ - !ruby/object:Gem::Dependency
45
41
  name: squash_uploader
46
- prerelease: false
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 1.0.1
47
47
  type: :runtime
48
- - !ruby/object:Gem::Dependency
49
- requirement: &id003 !ruby/object:Gem::Requirement
50
- none: false
51
- requirements:
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
52
51
  - - ">="
53
- - !ruby/object:Gem::Version
54
- hash: 3
55
- segments:
56
- - 0
57
- version: "0"
58
- version_requirements: *id003
52
+ - !ruby/object:Gem::Version
53
+ version: 1.0.1
54
+ - !ruby/object:Gem::Dependency
59
55
  name: rspec
60
- prerelease: false
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
61
  type: :development
62
- - !ruby/object:Gem::Dependency
63
- requirement: &id004 !ruby/object:Gem::Requirement
64
- none: false
65
- requirements:
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
66
65
  - - ">="
67
- - !ruby/object:Gem::Version
68
- hash: 3
69
- segments:
70
- - 0
71
- version: "0"
72
- version_requirements: *id004
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ - !ruby/object:Gem::Dependency
73
69
  name: yard
74
- prerelease: false
70
+ requirement: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
75
  type: :development
76
- - !ruby/object:Gem::Dependency
77
- requirement: &id005 !ruby/object:Gem::Requirement
78
- none: false
79
- requirements:
76
+ prerelease: false
77
+ version_requirements: !ruby/object:Gem::Requirement
78
+ requirements:
80
79
  - - ">="
81
- - !ruby/object:Gem::Version
82
- hash: 3
83
- segments:
84
- - 0
85
- version: "0"
86
- version_requirements: *id005
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ - !ruby/object:Gem::Dependency
87
83
  name: redcarpet
88
- prerelease: false
84
+ requirement: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
89
  type: :development
90
- - !ruby/object:Gem::Dependency
91
- requirement: &id006 !ruby/object:Gem::Requirement
92
- none: false
93
- requirements:
90
+ prerelease: false
91
+ version_requirements: !ruby/object:Gem::Requirement
92
+ requirements:
94
93
  - - ">="
95
- - !ruby/object:Gem::Version
96
- hash: 3
97
- segments:
98
- - 0
99
- version: "0"
100
- version_requirements: *id006
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ - !ruby/object:Gem::Dependency
101
97
  name: jeweler
102
- prerelease: false
98
+ requirement: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
103
  type: :development
104
- description: This gem includes a library that imports dwarfdump symbolications, and a binary that uploads the data to Squash.
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ description: This gem includes a library that imports dwarfdump symbolications, and
111
+ a binary that uploads the data to Squash.
105
112
  email: tim@squareup.com
106
- executables:
107
- - symbolicate
113
+ executables:
108
114
  - squash_release
115
+ - symbolicate
109
116
  extensions: []
110
-
111
- extra_rdoc_files:
117
+ extra_rdoc_files:
112
118
  - LICENSE.txt
113
119
  - README.md
114
- files:
120
+ files:
115
121
  - LICENSE.txt
116
122
  - README.md
117
123
  - bin/squash_release
@@ -120,37 +126,35 @@ files:
120
126
  - lib/squash/symbolicator/lines.rb
121
127
  - lib/squash/symbolicator/symbols.rb
122
128
  homepage: http://github.com/SquareSquash/ios_symbolicator
123
- licenses:
129
+ licenses:
124
130
  - Apache 2.0
125
- post_install_message:
126
- rdoc_options: []
131
+ metadata: {}
132
+ post_install_message: |2+
133
+
134
+ ⚠️ DEPRECATED: squash_ios_symbolicator is no longer maintained.
135
+
136
+ Square's Squash error-tracking service has been discontinued.
137
+ Consider Sentry, Honeybadger, Bugsnag, or Rollbar as alternatives.
127
138
 
128
- require_paths:
139
+ This is the final release. No further updates are planned.
140
+
141
+ rdoc_options: []
142
+ require_paths:
129
143
  - lib
130
- required_ruby_version: !ruby/object:Gem::Requirement
131
- none: false
132
- requirements:
144
+ required_ruby_version: !ruby/object:Gem::Requirement
145
+ requirements:
133
146
  - - ">="
134
- - !ruby/object:Gem::Version
135
- hash: 3
136
- segments:
137
- - 0
138
- version: "0"
139
- required_rubygems_version: !ruby/object:Gem::Requirement
140
- none: false
141
- requirements:
147
+ - !ruby/object:Gem::Version
148
+ version: '0'
149
+ required_rubygems_version: !ruby/object:Gem::Requirement
150
+ requirements:
142
151
  - - ">="
143
- - !ruby/object:Gem::Version
144
- hash: 3
145
- segments:
146
- - 0
147
- version: "0"
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
148
154
  requirements: []
149
-
150
- rubyforge_project:
151
- rubygems_version: 1.8.24
152
- signing_key:
155
+ rubygems_version: 4.0.11
153
156
  specification_version: 3
154
- summary: Binary and library for symbolicating your iOS project and uploading the symbolication to Squash.
157
+ summary: "[DEPRECATED] Binary and library for symbolicating your iOS project and uploading
158
+ the symbolication to Squash."
155
159
  test_files: []
156
-
160
+ ...