cocoapods-bugsnag 1.0.0 → 2.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 52c681af1a4ec0233a2dedcf5577e4d00b0b1009
4
- data.tar.gz: 3f87de8cd0c5074e96c45c2f21fe5a5460e046ea
3
+ metadata.gz: 482f70c66ea52e9633b644d594c1c8ef9bdddbe5
4
+ data.tar.gz: f4a0810109c18cf8edd07bcbda48d2d84ec37d9b
5
5
  SHA512:
6
- metadata.gz: 566e861732f79ca5290f368dd95b01276c9c12a6b023747de76b56d8525267cad2d54af05851c8a0fb8228054f9276add6ec970de20a68b8ceed376e44afeaef
7
- data.tar.gz: 2bd2821d340e786374ac2060eb3c5b9cc886c4473a7bce1504d70b32508c1e48ff999c6454703a9e130d69a084adeaac1b4058c81bbac2afe95116d06c821d5e
6
+ metadata.gz: 17a00ed6b43c406eba7390a722cf06930b32780c030efc2218b4d856a8a71981994fbc3925c87d4185b1ff988c7a2631c6445e1f45328e725b71dfa69a11e5ad
7
+ data.tar.gz: 8432e08a32cf59006b02fbe56fc846221544aaea895eea9c5eb3ae76d6e9d7a01dd3dd0c729028ef2b5899f8c25cbc276914ffca24bea94a34d722587d9c4e57
@@ -0,0 +1,48 @@
1
+ # Changelog
2
+
3
+ ## 2.2.0 (30 Sept 2020)
4
+
5
+ ### Enhancements
6
+
7
+ * This plugin now finds `Info.plist` using Xcode environment variables, rather than a `glob` operation for robustness.
8
+ | [#15](https://github.com/bugsnag/cocoapods-bugsnag/pull/15)
9
+
10
+ * 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`.
11
+ | [#16](https://github.com/bugsnag/cocoapods-bugsnag/pull/16)
12
+
13
+ ## 2.1.0 (14 Aug 2020)
14
+
15
+ ### Enhancements
16
+
17
+ * 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).
18
+ | [#9](https://github.com/bugsnag/cocoapods-bugsnag/pull/9)
19
+
20
+ * Process now fails if no API key can be found before the upload begins
21
+ | [b624b58](https://github.com/bugsnag/cocoapods-bugsnag/commit/b624b58079a45cff55fed297bcf2ebc6073069a5) fixes [#5](https://github.com/bugsnag/cocoapods-bugsnag/issues/5)
22
+
23
+ ### Bug fixes
24
+
25
+ * 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.
26
+ | [#8](https://github.com/bugsnag/cocoapods-bugsnag/pull/8)
27
+
28
+ ## 2.0.1 (04 Dec 2018)
29
+
30
+ ### Enhancements
31
+
32
+ * Added API key to generated upload command
33
+ | [#4](https://github.com/bugsnag/cocoapods-bugsnag/pull/4)
34
+
35
+ ## 2.0.0 (30 Jun 2016)
36
+
37
+ Version update to support CocoaPods 1.0
38
+
39
+ ## 1.0.1 (23 Dec 2015)
40
+
41
+ ### Bug Fixes
42
+
43
+ * Fix for missing specification warning during `pod install`
44
+ | [7d70389](https://github.com/bugsnag/cocoapods-bugsnag/commit/7d70389af31b2b8807195aca3dae0e62140ff176)
45
+
46
+ ## 1.0.0 (19 Dec 2015)
47
+
48
+ Initial Release
@@ -0,0 +1,52 @@
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)
@@ -0,0 +1,22 @@
1
+ Gem::Specification.new do |spec|
2
+ spec.name = "cocoapods-bugsnag"
3
+ spec.version = "2.2.0"
4
+ spec.homepage = "https://bugsnag.com"
5
+ spec.description = "Configures the dSYM upload phase of your project when integrated with bugsnag."
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."
7
+ spec.authors = [ "Delisa Mason" ]
8
+ spec.email = [ "delisa@bugsnag.com" ]
9
+ spec.files = [
10
+ "lib/cocoapods_bugsnag.rb",
11
+ "lib/cocoapods_plugin.rb",
12
+ "cocoapods-bugsnag.gemspec"
13
+ ]
14
+ spec.extra_rdoc_files = [ "README.md", "CHANGELOG.md" ]
15
+ spec.test_files = [ "spec/cocoapods_bugsnag_spec.rb" ]
16
+ spec.require_paths = [ "lib" ]
17
+ spec.license = "MIT"
18
+
19
+ spec.add_dependency "cocoapods", "~> 1.0"
20
+ spec.add_development_dependency "rake", ">= 12.3.3"
21
+ spec.add_development_dependency "bacon", "~> 1.0"
22
+ end
@@ -3,6 +3,23 @@ module Pod
3
3
 
4
4
  BUGSNAG_PHASE_NAME = "Upload Bugsnag dSYM"
5
5
  BUGSNAG_PHASE_SCRIPT = <<'RUBY'
6
+ api_key = nil # Insert your key here to use it directly from this script
7
+
8
+ # Attempt to get the API key from an environment variable
9
+ unless api_key
10
+ api_key = ENV["BUGSNAG_API_KEY"]
11
+
12
+ # If not present, attempt to lookup the value from the Info.plist
13
+ unless api_key
14
+ info_plist_path = "#{ENV["BUILT_PRODUCTS_DIR"]}/#{ENV["INFOPLIST_PATH"]}"
15
+ plist_buddy_response = `/usr/libexec/PlistBuddy -c "print :bugsnag:apiKey" "#{info_plist_path}"`
16
+ plist_buddy_response = `/usr/libexec/PlistBuddy -c "print :BugsnagAPIKey" "#{info_plist_path}"` if !$?.success?
17
+ api_key = plist_buddy_response if $?.success?
18
+ end
19
+ end
20
+
21
+ 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
22
+
6
23
  fork do
7
24
  Process.setsid
8
25
  STDIN.reopen("/dev/null")
@@ -12,7 +29,10 @@ fork do
12
29
  require 'shellwords'
13
30
 
14
31
  Dir["#{ENV["DWARF_DSYM_FOLDER_PATH"]}/*/Contents/Resources/DWARF/*"].each do |dsym|
15
- system("curl -F dsym=@#{Shellwords.escape(dsym)} -F projectRoot=#{Shellwords.escape(ENV["PROJECT_DIR"])} https://upload.bugsnag.com/")
32
+ curl_command = "curl --http1.1 -F dsym=@#{Shellwords.escape(dsym)} -F projectRoot=#{Shellwords.escape(ENV["PROJECT_DIR"])} "
33
+ curl_command += "-F apiKey=#{Shellwords.escape(api_key)} "
34
+ curl_command += "https://upload.bugsnag.com/"
35
+ system(curl_command)
16
36
  end
17
37
  end
18
38
  RUBY
@@ -20,7 +40,7 @@ RUBY
20
40
  alias_method :integrate_without_bugsnag!, :integrate!
21
41
  def integrate!
22
42
  integrate_without_bugsnag!
23
- return unless has_bugsnag_dependency?
43
+ return unless should_add_build_phase?
24
44
  return if bugsnag_native_targets.empty?
25
45
  UI.section("Integrating with Bugsnag") do
26
46
  add_bugsnag_upload_script_phase
@@ -42,10 +62,12 @@ RUBY
42
62
  end
43
63
  end
44
64
 
45
- def has_bugsnag_dependency?
46
- target.target_definition.dependencies.detect do |dep|
65
+ def should_add_build_phase?
66
+ has_bugsnag_dep = target.target_definition.dependencies.any? do |dep|
47
67
  dep.name.include?('Bugsnag')
48
- end != nil
68
+ end
69
+ uses_bugsnag_plugin = target.target_definition.podfile.plugins.key?('cocoapods-bugsnag')
70
+ return has_bugsnag_dep && uses_bugsnag_plugin
49
71
  end
50
72
 
51
73
  def bugsnag_native_targets
metadata CHANGED
@@ -1,51 +1,70 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-bugsnag
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delisa Mason
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-19 00:00:00.000000000 Z
11
+ date: 2020-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: cocoapods
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: rake
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
- - - '>='
31
+ - - ">="
18
32
  - !ruby/object:Gem::Version
19
- version: '0'
33
+ version: 12.3.3
20
34
  type: :development
21
35
  prerelease: false
22
36
  version_requirements: !ruby/object:Gem::Requirement
23
37
  requirements:
24
- - - '>='
38
+ - - ">="
25
39
  - !ruby/object:Gem::Version
26
- version: '0'
40
+ version: 12.3.3
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bacon
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
- - - '>='
45
+ - - "~>"
32
46
  - !ruby/object:Gem::Version
33
- version: '0'
47
+ version: '1.0'
34
48
  type: :development
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
- - - '>='
52
+ - - "~>"
39
53
  - !ruby/object:Gem::Version
40
- version: '0'
54
+ version: '1.0'
41
55
  description: Configures the dSYM upload phase of your project when integrated with
42
56
  bugsnag.
43
57
  email:
44
58
  - delisa@bugsnag.com
45
59
  executables: []
46
60
  extensions: []
47
- extra_rdoc_files: []
61
+ extra_rdoc_files:
62
+ - README.md
63
+ - CHANGELOG.md
48
64
  files:
65
+ - CHANGELOG.md
66
+ - README.md
67
+ - cocoapods-bugsnag.gemspec
49
68
  - lib/cocoapods_bugsnag.rb
50
69
  - lib/cocoapods_plugin.rb
51
70
  - spec/cocoapods_bugsnag_spec.rb
@@ -53,24 +72,24 @@ homepage: https://bugsnag.com
53
72
  licenses:
54
73
  - MIT
55
74
  metadata: {}
56
- post_install_message:
75
+ post_install_message:
57
76
  rdoc_options: []
58
77
  require_paths:
59
78
  - lib
60
79
  required_ruby_version: !ruby/object:Gem::Requirement
61
80
  requirements:
62
- - - '>='
81
+ - - ">="
63
82
  - !ruby/object:Gem::Version
64
83
  version: '0'
65
84
  required_rubygems_version: !ruby/object:Gem::Requirement
66
85
  requirements:
67
- - - '>='
86
+ - - ">="
68
87
  - !ruby/object:Gem::Version
69
88
  version: '0'
70
89
  requirements: []
71
- rubyforge_project:
72
- rubygems_version: 2.0.14
73
- signing_key:
90
+ rubyforge_project:
91
+ rubygems_version: 2.6.14
92
+ signing_key:
74
93
  specification_version: 4
75
94
  summary: To get meaningful stacktraces from your crashes, the Bugsnag service needs
76
95
  your dSYM file for your build. This plugin adds an upload phase to your project