fastlane-plugin-instabug 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 65d0cd6198a03710afbe292983d1a7192accc0c5
4
+ data.tar.gz: 3a49fc150dd1d4e53545e9893c9b9aa53f71f440
5
+ SHA512:
6
+ metadata.gz: 12dc58d8c061e3bb18ff46d7a2c93ac5c7d4cfb45a278c316570bd6853541ca52bb6e0c95f133dbc5b64a55a38436bd13c7985b36d463d3038b5964bbc1ddcb6
7
+ data.tar.gz: ee887b535084af64264a87e27fd519f579ab30224797569187ac699a3cc21639f0994a76800b9568aaf8a1341ede60e0a3b1f2e74735cc73e6607f9b445eb7df
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Siarhei Fiedartsou <siarhei.fedartsou@gmail.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,57 @@
1
+ # instabug plugin
2
+
3
+ [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-instabug)
4
+
5
+ ## Getting Started
6
+
7
+ This project is a [fastlane](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-instabug`, add it to your project by running:
8
+
9
+ ```bash
10
+ fastlane add_plugin instabug
11
+ ```
12
+
13
+ ## About instabug
14
+
15
+ Uploads dSYM to Instabug
16
+
17
+ **Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
18
+
19
+ ## Actions
20
+
21
+ ### instabug
22
+
23
+ ```ruby
24
+ instabug(api_token: 'INSTABUG_TOKEN',
25
+ dsym_path: '/path/to/dsym')
26
+ ```
27
+
28
+ For more information see `fastlane action instabug`.
29
+
30
+ ## Run tests for this plugin
31
+
32
+ To run both the tests, and code style validation, run
33
+
34
+ ````
35
+ rake
36
+ ```
37
+
38
+ To automatically fix many of the styling issues, use
39
+ ```
40
+ rubocop -a
41
+ ```
42
+
43
+ ## Issues and Feedback
44
+
45
+ For any other issues and feedback about this plugin, please submit it to this repository.
46
+
47
+ ## Troubleshooting
48
+
49
+ If you have trouble using plugins, check out the [Plugins Troubleshooting](https://github.com/fastlane/fastlane/blob/master/fastlane/docs/PluginsTroubleshooting.md) doc in the main `fastlane` repo.
50
+
51
+ ## Using `fastlane` Plugins
52
+
53
+ For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Plugins.md).
54
+
55
+ ## About `fastlane`
56
+
57
+ `fastlane` is the easiest way to automate building and releasing your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).
@@ -0,0 +1,16 @@
1
+ require 'fastlane/plugin/instabug/version'
2
+
3
+ module Fastlane
4
+ module Instabug
5
+ # Return all .rb files inside the "actions" and "helper" directory
6
+ def self.all_classes
7
+ Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
8
+ end
9
+ end
10
+ end
11
+
12
+ # By default we want to import all available actions and helpers
13
+ # A plugin can contain any number of actions and plugins
14
+ Fastlane::Instabug.all_classes.each do |current|
15
+ require current
16
+ end
@@ -0,0 +1,77 @@
1
+ module Fastlane
2
+ module Actions
3
+ class InstabugAction < Action
4
+ def self.run(params)
5
+ api_token = params[:api_token]
6
+ if params[:dsym_path]
7
+ dsym_path = params[:dsym_path]
8
+ UI.user_error! "Provided dSYM doesn't exists" unless File.exist?(dsym_path)
9
+ dsym_zip_path = ZipAction.run(path: dsym_path).shellescape
10
+ elsif params[:dsym_zip_path]
11
+ UI.user_error! "Provided dSYM.zip doesn't exists" unless File.exist?(params[:dsym_zip_path])
12
+ dsym_zip_path = params[:dsym_zip_path].shellescape
13
+ elsif Actions.lane_context[SharedValues::DSYM_ZIP_PATH]
14
+ dsym_zip_path = Actions.lane_context[SharedValues::DSYM_ZIP_PATH].shellescape
15
+ else
16
+ UI.user_error! "Cannot find dSYM"
17
+ end
18
+
19
+
20
+ endpoint = 'https://api.instabug.com/api/ios/v1/dsym'
21
+
22
+ command = "curl #{endpoint} --write-out %{http_code} --silent --output /dev/null -F dsym=@\"#{dsym_zip_path}\" -F token=\"#{api_token}\""
23
+
24
+ UI.verbose command
25
+
26
+ return command if Helper.test?
27
+
28
+ result = Actions.sh(command)
29
+ unless result == 200
30
+ UI.error "Something went wrong during Instabug dSYM upload"
31
+ else
32
+ UI.success "dSYM is successfully uploaded to instabug"
33
+ end
34
+ end
35
+
36
+ #####################################################
37
+ # @!group Documentation
38
+ #####################################################
39
+
40
+ def self.description
41
+ "Instabug dSYM uploading"
42
+ end
43
+
44
+ def self.available_options
45
+ [
46
+ FastlaneCore::ConfigItem.new(key: :api_token,
47
+ env_name: "FL_INSTABUG_API_TOKEN", # The name of the environment variable
48
+ description: "API Token for Instabug", # a short description of this parameter
49
+ verify_block: proc do |value|
50
+ UI.user_error!("No API token for InstabugAction given, pass using `api_token: 'token'`") unless (value and not value.empty?)
51
+ # UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value)
52
+ end),
53
+ FastlaneCore::ConfigItem.new(key: :dsym_path,
54
+ env_name: "FL_INSTABUG_DSYM_PATH",
55
+ description: "Path to *.dSYM file",
56
+ conflicting_options: [:dsym_zip_path],
57
+ is_string: true,
58
+ optional: true),
59
+ FastlaneCore::ConfigItem.new(key: :dsym_zip_path,
60
+ env_name: "FL_INSTABUG_DSYM_ZIP_PATH",
61
+ description: "Path to *.dSYM.zip file",
62
+ conflicting_options: [:dsym_path],
63
+ is_string: true,
64
+ optional: true)
65
+ ]
66
+ end
67
+
68
+ def self.authors
69
+ ["SiarheiFedartsou"]
70
+ end
71
+
72
+ def self.is_supported?(platform)
73
+ platform == :ios
74
+ end
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,5 @@
1
+ module Fastlane
2
+ module Instabug
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,132 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fastlane-plugin-instabug
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Siarhei Fiedartsou
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-06-05 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: pry
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: fastlane
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: 1.94.0
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 1.94.0
97
+ description:
98
+ email: siarhei.fedartsou@gmail.com
99
+ executables: []
100
+ extensions: []
101
+ extra_rdoc_files: []
102
+ files:
103
+ - LICENSE
104
+ - README.md
105
+ - lib/fastlane/plugin/instabug.rb
106
+ - lib/fastlane/plugin/instabug/actions/instabug.rb
107
+ - lib/fastlane/plugin/instabug/version.rb
108
+ homepage: https://github.com/SiarheiFedartsou/fastlane-plugin-instabug
109
+ licenses:
110
+ - MIT
111
+ metadata: {}
112
+ post_install_message:
113
+ rdoc_options: []
114
+ require_paths:
115
+ - lib
116
+ required_ruby_version: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
121
+ required_rubygems_version: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ requirements: []
127
+ rubyforge_project:
128
+ rubygems_version: 2.6.4
129
+ signing_key:
130
+ specification_version: 4
131
+ summary: Uploads dSYM to Instabug
132
+ test_files: []