fastlane-plugin-bugsnag 2.2.1 → 2.3.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 +4 -4
- data/lib/fastlane/plugin/bugsnag/actions/find_info_plist_path.rb +7 -0
- data/lib/fastlane/plugin/bugsnag/actions/send_build_to_bugsnag.rb +13 -8
- data/lib/fastlane/plugin/bugsnag/actions/upload_symbols_to_bugsnag.rb +4 -8
- data/lib/fastlane/plugin/bugsnag/version.rb +1 -1
- data/spec/send_build_to_bugsnag_spec.rb +36 -0
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d1a05778ac305a52d3d186c4f8210fd37b67a86e1c738dc82ec187094ac5896
|
4
|
+
data.tar.gz: 138124efd6fc4b08dd8b28262b34b89db018d4c5f8ecbdd95d12fa118bd2afa1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6077446540b8180aa8953db6f961eba67e585af79e7007e254bbd47fedf90da22d5bdba1374db49d77cb9159dd4c6c0552353883ccc0769788199f6d88ca0d4b
|
7
|
+
data.tar.gz: 991cc2b7bd6a9c59c1e4225d5e86cf9d8d422f16e1a667b2cd0457d481f0e4f1f753d2eaaada274343590bfede4cb8d50b8ef300339d4900c267ad47f5740b8e
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require "xmlsimple"
|
2
2
|
require "json"
|
3
|
+
require_relative "find_info_plist_path"
|
3
4
|
|
4
5
|
module Fastlane
|
5
6
|
module Actions
|
@@ -38,6 +39,9 @@ module Fastlane
|
|
38
39
|
payload[:sourceControl][:repository] = params[:repository] if params[:repository]
|
39
40
|
payload[:sourceControl][:provider] = params[:provider] if params[:provider]
|
40
41
|
|
42
|
+
# If provided apply metadata to payload.
|
43
|
+
payload[:metadata] = params[:metadata]
|
44
|
+
|
41
45
|
payload.reject! {|k,v| v == nil || (v.is_a?(Hash) && v.empty?)}
|
42
46
|
|
43
47
|
if payload[:apiKey].nil? || !payload[:apiKey].is_a?(String)
|
@@ -167,7 +171,12 @@ module Fastlane
|
|
167
171
|
FastlaneCore::ConfigItem.new(key: :endpoint,
|
168
172
|
description: "Bugsnag deployment endpoint",
|
169
173
|
optional: true,
|
170
|
-
default_value: "https://build.bugsnag.com")
|
174
|
+
default_value: "https://build.bugsnag.com"),
|
175
|
+
FastlaneCore::ConfigItem.new(key: :metadata,
|
176
|
+
description: "Metadata",
|
177
|
+
optional:true,
|
178
|
+
type: Object,
|
179
|
+
default_value: nil)
|
171
180
|
]
|
172
181
|
end
|
173
182
|
|
@@ -196,7 +205,7 @@ module Fastlane
|
|
196
205
|
when nil
|
197
206
|
if file_path = default_android_manifest_path
|
198
207
|
return file_path
|
199
|
-
elsif file_path = default_info_plist_path
|
208
|
+
elsif file_path = FindInfoPlist.default_info_plist_path
|
200
209
|
return file_path
|
201
210
|
end
|
202
211
|
when :android
|
@@ -204,7 +213,7 @@ module Fastlane
|
|
204
213
|
return file_path
|
205
214
|
end
|
206
215
|
else
|
207
|
-
if file_path = default_info_plist_path
|
216
|
+
if file_path = FindInfoPlist.default_info_plist_path
|
208
217
|
return file_path
|
209
218
|
end
|
210
219
|
end
|
@@ -224,10 +233,6 @@ module Fastlane
|
|
224
233
|
end
|
225
234
|
end
|
226
235
|
|
227
|
-
def self.default_info_plist_path
|
228
|
-
Dir.glob("./{ios/,}*/Info.plist").reject {|path| path =~ /build|test/i }.sort.first
|
229
|
-
end
|
230
|
-
|
231
236
|
def self.load_options_from_plist file_path
|
232
237
|
options = {}
|
233
238
|
plist_getter = Fastlane::Actions::GetInfoPlistValueAction
|
@@ -319,7 +324,7 @@ module Fastlane
|
|
319
324
|
nil
|
320
325
|
end
|
321
326
|
end
|
322
|
-
|
327
|
+
|
323
328
|
def self.send_notification(url, body)
|
324
329
|
require "net/http"
|
325
330
|
uri = URI.parse(url)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require_relative "find_info_plist_path"
|
2
|
+
|
1
3
|
module Fastlane
|
2
4
|
module Actions
|
3
5
|
class UploadSymbolsToBugsnagAction < Action
|
@@ -131,18 +133,12 @@ module Fastlane
|
|
131
133
|
env_name: "BUGSNAG_CONFIG_FILE",
|
132
134
|
description: "Info.plist location",
|
133
135
|
optional: true,
|
134
|
-
default_value: default_info_plist_path)
|
136
|
+
default_value: FindInfoPlist.default_info_plist_path)
|
135
137
|
]
|
136
138
|
end
|
137
139
|
|
138
140
|
private
|
139
141
|
|
140
|
-
def self.default_info_plist_path
|
141
|
-
# Find first 'Info.plist' in the current working directory
|
142
|
-
# ignoring any in 'build', or 'test' folders
|
143
|
-
return Dir.glob("./{ios/,}*/Info.plist").reject{|path| path =~ /build|test/i }.sort.first
|
144
|
-
end
|
145
|
-
|
146
142
|
def self.options_from_info_plist file_path
|
147
143
|
plist_getter = Fastlane::Actions::GetInfoPlistValueAction
|
148
144
|
bugsnag_dict = plist_getter.run(path: file_path, key: "bugsnag")
|
@@ -211,4 +207,4 @@ module Fastlane
|
|
211
207
|
end
|
212
208
|
end
|
213
209
|
end
|
214
|
-
end
|
210
|
+
end
|
@@ -121,5 +121,41 @@ describe BuildAction do
|
|
121
121
|
end
|
122
122
|
end
|
123
123
|
end
|
124
|
+
|
125
|
+
context 'metadata added to payload' do
|
126
|
+
it "single key:value pair added" do
|
127
|
+
expect(BuildAction).to receive(:send_notification) do |url, body|
|
128
|
+
payload = ::JSON.load(body)
|
129
|
+
expect(payload['appVersion']).to eq '4.0-project'
|
130
|
+
expect(payload['apiKey']).to eq '12345678901234567890123456789DDD'
|
131
|
+
expect(payload['metadata']).to eq '"test1": "First test"'
|
132
|
+
end
|
133
|
+
|
134
|
+
Dir.chdir(File.join(FIXTURE_PATH, 'ios_proj')) do
|
135
|
+
run_with({
|
136
|
+
app_version: '4.0-project',
|
137
|
+
api_key: '12345678901234567890123456789DDD',
|
138
|
+
metadata: '"test1": "First test"'
|
139
|
+
})
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
it "multiple key:value pairs added" do
|
144
|
+
expect(BuildAction).to receive(:send_notification) do |url, body|
|
145
|
+
payload = ::JSON.load(body)
|
146
|
+
expect(payload['appVersion']).to eq '4.0-project'
|
147
|
+
expect(payload['apiKey']).to eq '12345678901234567890123456789DDD'
|
148
|
+
expect(payload['metadata']).to eq '"test1": "First test", "test2": "Second test", "test3": "Third test"'
|
149
|
+
end
|
150
|
+
|
151
|
+
Dir.chdir(File.join(FIXTURE_PATH, 'ios_proj')) do
|
152
|
+
run_with({
|
153
|
+
app_version: '4.0-project',
|
154
|
+
api_key: '12345678901234567890123456789DDD',
|
155
|
+
metadata: '"test1": "First test", "test2": "Second test", "test3": "Third test"'
|
156
|
+
})
|
157
|
+
end
|
158
|
+
end
|
159
|
+
end
|
124
160
|
end
|
125
161
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-bugsnag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.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:
|
11
|
+
date: 2023-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xml-simple
|
@@ -136,7 +136,7 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: 2.28.5
|
139
|
-
description:
|
139
|
+
description:
|
140
140
|
email: iskanamagus@gmail.com
|
141
141
|
executables: []
|
142
142
|
extensions: []
|
@@ -145,6 +145,7 @@ files:
|
|
145
145
|
- LICENSE.txt
|
146
146
|
- bugsnag-dsym-upload
|
147
147
|
- lib/fastlane/plugin/bugsnag.rb
|
148
|
+
- lib/fastlane/plugin/bugsnag/actions/find_info_plist_path.rb
|
148
149
|
- lib/fastlane/plugin/bugsnag/actions/send_build_to_bugsnag.rb
|
149
150
|
- lib/fastlane/plugin/bugsnag/actions/upload_symbols_to_bugsnag.rb
|
150
151
|
- lib/fastlane/plugin/bugsnag/version.rb
|
@@ -167,7 +168,7 @@ homepage: https://github.com/bugsnag/bugsnag-dsym-upload
|
|
167
168
|
licenses:
|
168
169
|
- MIT
|
169
170
|
metadata: {}
|
170
|
-
post_install_message:
|
171
|
+
post_install_message:
|
171
172
|
rdoc_options: []
|
172
173
|
require_paths:
|
173
174
|
- lib
|
@@ -182,8 +183,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
182
183
|
- !ruby/object:Gem::Version
|
183
184
|
version: '0'
|
184
185
|
requirements: []
|
185
|
-
rubygems_version: 3.
|
186
|
-
signing_key:
|
186
|
+
rubygems_version: 3.1.4
|
187
|
+
signing_key:
|
187
188
|
specification_version: 4
|
188
189
|
summary: Uploads dSYM files to Bugsnag
|
189
190
|
test_files:
|