cocoapods-bugsnag 1.0.1 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +55 -0
- data/README.md +56 -0
- data/cocoapods-bugsnag.gemspec +5 -4
- data/lib/cocoapods_bugsnag.rb +34 -7
- metadata +23 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e60881092085623bd9218d8c7e08be44e3580d8ee2c11ea0a987d6a3d6853cc5
|
4
|
+
data.tar.gz: 12d938efbbeca703eaee0d8116a7494a74a534b2bd321f49e9ecbdd5c5ad6084
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3e2c2541c4d531cc1331c2a923a6f0c8c2b0bce74099fb9454de34247bc5dd01ad5ec605202e339c6a3150497b1934ad3c70d8232d22bdfe2f6aa5ee167c231
|
7
|
+
data.tar.gz: bf2af0466ab94413a969861b6e91891bc513b2c349fcc733d8ec5b10bf257f6bbc5384007f39bde4cab4e4e636f3d196874eee188bff2f0813729f2b239d1b0e
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 2.2.1 (20 Nov 2020)
|
4
|
+
|
5
|
+
### Bug fixes
|
6
|
+
|
7
|
+
* The Xcode build phase now specifies its dependencies for improved reliability with Xcode's new build system.
|
8
|
+
| [#20](https://github.com/bugsnag/cocoapods-bugsnag/pull/20)
|
9
|
+
|
10
|
+
## 2.2.0 (30 Sept 2020)
|
11
|
+
|
12
|
+
### Enhancements
|
13
|
+
|
14
|
+
* This plugin now finds `Info.plist` using Xcode environment variables, rather than a `glob` operation for robustness.
|
15
|
+
| [#15](https://github.com/bugsnag/cocoapods-bugsnag/pull/15)
|
16
|
+
|
17
|
+
* This plugin will now only add itself to your Xcode project if it is explicitly added as a plugin in your `Podfile`. Previously it would install if `Bugsnag` was detected in your `Podfile`.
|
18
|
+
| [#16](https://github.com/bugsnag/cocoapods-bugsnag/pull/16)
|
19
|
+
|
20
|
+
## 2.1.0 (14 Aug 2020)
|
21
|
+
|
22
|
+
### Enhancements
|
23
|
+
|
24
|
+
* Added new location for API key in `Info.plist` from [bugsnag-cocoa v6.x](https://github.com/bugsnag/bugsnag-cocoa/releases/tag/v6.0.0).
|
25
|
+
| [#9](https://github.com/bugsnag/cocoapods-bugsnag/pull/9)
|
26
|
+
|
27
|
+
* Process now fails if no API key can be found before the upload begins
|
28
|
+
| [b624b58](https://github.com/bugsnag/cocoapods-bugsnag/commit/b624b58079a45cff55fed297bcf2ebc6073069a5) fixes [#5](https://github.com/bugsnag/cocoapods-bugsnag/issues/5)
|
29
|
+
|
30
|
+
### Bug fixes
|
31
|
+
|
32
|
+
* Added the --http1.1 option to the curl command to force use of HTTP/1.1 to prevent the uploads of larger files from failing.
|
33
|
+
| [#8](https://github.com/bugsnag/cocoapods-bugsnag/pull/8)
|
34
|
+
|
35
|
+
## 2.0.1 (04 Dec 2018)
|
36
|
+
|
37
|
+
### Enhancements
|
38
|
+
|
39
|
+
* Added API key to generated upload command
|
40
|
+
| [#4](https://github.com/bugsnag/cocoapods-bugsnag/pull/4)
|
41
|
+
|
42
|
+
## 2.0.0 (30 Jun 2016)
|
43
|
+
|
44
|
+
Version update to support CocoaPods 1.0
|
45
|
+
|
46
|
+
## 1.0.1 (23 Dec 2015)
|
47
|
+
|
48
|
+
### Bug Fixes
|
49
|
+
|
50
|
+
* Fix for missing specification warning during `pod install`
|
51
|
+
| [7d70389](https://github.com/bugsnag/cocoapods-bugsnag/commit/7d70389af31b2b8807195aca3dae0e62140ff176)
|
52
|
+
|
53
|
+
## 1.0.0 (19 Dec 2015)
|
54
|
+
|
55
|
+
Initial Release
|
data/README.md
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
# cocoapods-bugsnag
|
2
|
+
|
3
|
+
A [CocoaPods](https://cocoapods.org) plugin for integrating Cocoa projects with
|
4
|
+
[Bugsnag](https://bugsnag.com), an error tracking and resolution tool. When
|
5
|
+
installed, the plugin will add a Run Script build phase to your project workspace
|
6
|
+
to upload your
|
7
|
+
[dSYM](http://noverse.com/blog/2010/03/how-to-deal-with-an-iphone-crash-report/)
|
8
|
+
files so the Bugsnag service can provide you with symbolicated stack traces.
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
`cocoapods-bugsnag` is available via [RubyGems](https://rubygems.org). To
|
13
|
+
install, run:
|
14
|
+
|
15
|
+
gem install cocoapods-bugsnag
|
16
|
+
|
17
|
+
### Installing from Source
|
18
|
+
|
19
|
+
1. Clone this repository
|
20
|
+
2. Run `bundle install` from the root of the repository (installing
|
21
|
+
[bundler](http://bundler.io) if needed)
|
22
|
+
3. Build the gem using `gem build cocoapods-bugsnag.gemspec`
|
23
|
+
4. Install the gem using `gem install cocoapods-bugsnag-<version>.gem`
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
To add the build phase to your project, add `pod 'Bugsnag'`, and `plugin 'cocoapods-bugsnag'` to your `Podfile`:
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
pod 'Bugsnag'
|
31
|
+
plugin 'cocoapods-bugsnag'
|
32
|
+
```
|
33
|
+
|
34
|
+
Then, install with:
|
35
|
+
|
36
|
+
```bash
|
37
|
+
pod install
|
38
|
+
```
|
39
|
+
|
40
|
+
Once added, uploading your dSYM files to Bugsnag will occur automatically.
|
41
|
+
|
42
|
+
By default, your Bugsnag API key will either be read from the `BUGSNAG_API_KEY`
|
43
|
+
environment variable or from the `:bugsnag:apiKey` (or `BugsnagAPIKey`) value in your
|
44
|
+
`Info.plist`. Alternatively edit the script in the new "Upload Bugsnag dSYM" build
|
45
|
+
phase in Xcode.
|
46
|
+
|
47
|
+
## Support
|
48
|
+
|
49
|
+
* [Symbolication guide](https://docs.bugsnag.com/platforms/ios/symbolication-guide/)
|
50
|
+
* [Search open and closed issues](https://github.com/bugsnag/cocoapods-bugsnag/issues?utf8=✓&q=is%3Aissue)
|
51
|
+
for similar problems
|
52
|
+
* [Open an issue](https://github.com/bugsnag/cocoapods-bugsnag/issues/new)
|
53
|
+
|
54
|
+
## License
|
55
|
+
|
56
|
+
This module is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details.
|
data/cocoapods-bugsnag.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "cocoapods-bugsnag"
|
3
|
-
spec.version = "
|
3
|
+
spec.version = "2.2.1"
|
4
4
|
spec.homepage = "https://bugsnag.com"
|
5
5
|
spec.description = "Configures the dSYM upload phase of your project when integrated with bugsnag."
|
6
6
|
spec.summary = "To get meaningful stacktraces from your crashes, the Bugsnag service needs your dSYM file for your build. This plugin adds an upload phase to your project where needed."
|
@@ -11,11 +11,12 @@ Gem::Specification.new do |spec|
|
|
11
11
|
"lib/cocoapods_plugin.rb",
|
12
12
|
"cocoapods-bugsnag.gemspec"
|
13
13
|
]
|
14
|
+
spec.extra_rdoc_files = [ "README.md", "CHANGELOG.md" ]
|
14
15
|
spec.test_files = [ "spec/cocoapods_bugsnag_spec.rb" ]
|
15
16
|
spec.require_paths = [ "lib" ]
|
16
17
|
spec.license = "MIT"
|
17
18
|
|
18
|
-
spec.add_dependency "cocoapods", "~>
|
19
|
-
spec.add_development_dependency "rake"
|
20
|
-
spec.add_development_dependency "bacon"
|
19
|
+
spec.add_dependency "cocoapods", "~> 1.0"
|
20
|
+
spec.add_development_dependency "rake", ">= 12.3.3"
|
21
|
+
spec.add_development_dependency "bacon", "~> 1.0"
|
21
22
|
end
|
data/lib/cocoapods_bugsnag.rb
CHANGED
@@ -2,7 +2,28 @@ module Pod
|
|
2
2
|
class Installer::UserProjectIntegrator::TargetIntegrator
|
3
3
|
|
4
4
|
BUGSNAG_PHASE_NAME = "Upload Bugsnag dSYM"
|
5
|
+
BUGSNAG_PHASE_INPUT_PATHS = [
|
6
|
+
"${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}",
|
7
|
+
"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}"]
|
8
|
+
BUGSNAG_PHASE_SHELL_PATH = "/usr/bin/env ruby"
|
5
9
|
BUGSNAG_PHASE_SCRIPT = <<'RUBY'
|
10
|
+
api_key = nil # Insert your key here to use it directly from this script
|
11
|
+
|
12
|
+
# Attempt to get the API key from an environment variable
|
13
|
+
unless api_key
|
14
|
+
api_key = ENV["BUGSNAG_API_KEY"]
|
15
|
+
|
16
|
+
# If not present, attempt to lookup the value from the Info.plist
|
17
|
+
unless api_key
|
18
|
+
info_plist_path = "#{ENV["BUILT_PRODUCTS_DIR"]}/#{ENV["INFOPLIST_PATH"]}"
|
19
|
+
plist_buddy_response = `/usr/libexec/PlistBuddy -c "print :bugsnag:apiKey" "#{info_plist_path}"`
|
20
|
+
plist_buddy_response = `/usr/libexec/PlistBuddy -c "print :BugsnagAPIKey" "#{info_plist_path}"` if !$?.success?
|
21
|
+
api_key = plist_buddy_response if $?.success?
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
fail("No Bugsnag API key detected - add your key to your Info.plist, BUGSNAG_API_KEY environment variable or this Run Script phase") unless api_key
|
26
|
+
|
6
27
|
fork do
|
7
28
|
Process.setsid
|
8
29
|
STDIN.reopen("/dev/null")
|
@@ -12,7 +33,10 @@ fork do
|
|
12
33
|
require 'shellwords'
|
13
34
|
|
14
35
|
Dir["#{ENV["DWARF_DSYM_FOLDER_PATH"]}/*/Contents/Resources/DWARF/*"].each do |dsym|
|
15
|
-
|
36
|
+
curl_command = "curl --http1.1 -F dsym=@#{Shellwords.escape(dsym)} -F projectRoot=#{Shellwords.escape(ENV["PROJECT_DIR"])} "
|
37
|
+
curl_command += "-F apiKey=#{Shellwords.escape(api_key)} "
|
38
|
+
curl_command += "https://upload.bugsnag.com/"
|
39
|
+
system(curl_command)
|
16
40
|
end
|
17
41
|
end
|
18
42
|
RUBY
|
@@ -20,7 +44,7 @@ RUBY
|
|
20
44
|
alias_method :integrate_without_bugsnag!, :integrate!
|
21
45
|
def integrate!
|
22
46
|
integrate_without_bugsnag!
|
23
|
-
return unless
|
47
|
+
return unless should_add_build_phase?
|
24
48
|
return if bugsnag_native_targets.empty?
|
25
49
|
UI.section("Integrating with Bugsnag") do
|
26
50
|
add_bugsnag_upload_script_phase
|
@@ -36,23 +60,26 @@ RUBY
|
|
36
60
|
bp.name == BUGSNAG_PHASE_NAME
|
37
61
|
end.first || native_target.new_shell_script_build_phase(BUGSNAG_PHASE_NAME)
|
38
62
|
|
39
|
-
phase.
|
63
|
+
phase.input_paths = BUGSNAG_PHASE_INPUT_PATHS
|
64
|
+
phase.shell_path = BUGSNAG_PHASE_SHELL_PATH
|
40
65
|
phase.shell_script = BUGSNAG_PHASE_SCRIPT
|
41
66
|
phase.show_env_vars_in_log = '0'
|
42
67
|
end
|
43
68
|
end
|
44
69
|
|
45
|
-
def
|
46
|
-
target.target_definition.dependencies.
|
70
|
+
def should_add_build_phase?
|
71
|
+
has_bugsnag_dep = target.target_definition.dependencies.any? do |dep|
|
47
72
|
dep.name.include?('Bugsnag')
|
48
|
-
end
|
73
|
+
end
|
74
|
+
uses_bugsnag_plugin = target.target_definition.podfile.plugins.key?('cocoapods-bugsnag')
|
75
|
+
return has_bugsnag_dep && uses_bugsnag_plugin
|
49
76
|
end
|
50
77
|
|
51
78
|
def bugsnag_native_targets
|
52
79
|
@bugsnag_native_targets ||=(
|
53
80
|
native_targets.reject do |native_target|
|
54
81
|
native_target.shell_script_build_phases.any? do |bp|
|
55
|
-
bp.name == BUGSNAG_PHASE_NAME && bp.shell_script == BUGSNAG_PHASE_SCRIPT
|
82
|
+
bp.name == BUGSNAG_PHASE_NAME && bp.input_paths == BUGSNAG_PHASE_INPUT_PATHS && bp.shell_path == BUGSNAG_PHASE_SHELL_PATH && bp.shell_script == BUGSNAG_PHASE_SCRIPT
|
56
83
|
end
|
57
84
|
end
|
58
85
|
)
|
metadata
CHANGED
@@ -1,68 +1,72 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-bugsnag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Delisa Mason
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '1.0'
|
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
|
-
version:
|
26
|
+
version: '1.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 12.3.3
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 12.3.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bacon
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
47
|
+
version: '1.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
54
|
+
version: '1.0'
|
55
55
|
description: Configures the dSYM upload phase of your project when integrated with
|
56
56
|
bugsnag.
|
57
57
|
email:
|
58
58
|
- delisa@bugsnag.com
|
59
59
|
executables: []
|
60
60
|
extensions: []
|
61
|
-
extra_rdoc_files:
|
61
|
+
extra_rdoc_files:
|
62
|
+
- README.md
|
63
|
+
- CHANGELOG.md
|
62
64
|
files:
|
65
|
+
- CHANGELOG.md
|
66
|
+
- README.md
|
67
|
+
- cocoapods-bugsnag.gemspec
|
63
68
|
- lib/cocoapods_bugsnag.rb
|
64
69
|
- lib/cocoapods_plugin.rb
|
65
|
-
- cocoapods-bugsnag.gemspec
|
66
70
|
- spec/cocoapods_bugsnag_spec.rb
|
67
71
|
homepage: https://bugsnag.com
|
68
72
|
licenses:
|
@@ -74,17 +78,16 @@ require_paths:
|
|
74
78
|
- lib
|
75
79
|
required_ruby_version: !ruby/object:Gem::Requirement
|
76
80
|
requirements:
|
77
|
-
- -
|
81
|
+
- - ">="
|
78
82
|
- !ruby/object:Gem::Version
|
79
83
|
version: '0'
|
80
84
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
85
|
requirements:
|
82
|
-
- -
|
86
|
+
- - ">="
|
83
87
|
- !ruby/object:Gem::Version
|
84
88
|
version: '0'
|
85
89
|
requirements: []
|
86
|
-
|
87
|
-
rubygems_version: 2.0.14
|
90
|
+
rubygems_version: 3.0.3
|
88
91
|
signing_key:
|
89
92
|
specification_version: 4
|
90
93
|
summary: To get meaningful stacktraces from your crashes, the Bugsnag service needs
|