fastlane-plugin-react_native_util 0.1.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 4b3170c0aee43c4c77d49b79ba6400092fe793f4b9f64bc09db2e8972118ff78
4
+ data.tar.gz: 5c47814501159ddee2b7187effcfe784e1da927e87e3bdeac6f8be8fb09e0577
5
+ SHA512:
6
+ metadata.gz: cc4bab479037537eaf8b1b55b4bc33adc533edf2f39668018079066b58f879b93dadd93a30c538fe9f4ee5c0176fb4c81ab0db0ecc5560d781e47638f98c9370
7
+ data.tar.gz: f19204cad9dcb041bc49c7e73105162b4da811e424d111c492d985b9c73d47e33f8e3d54359330ccb13d18715b4af941b9b1bff1b14d86740d2f4caef27569fd
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Jimmy Dee <jgvdthree@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,92 @@
1
+ # react_native_util plugin
2
+
3
+ [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-react_native_util)
4
+ [![Gem](https://img.shields.io/gem/v/fastlane-plugin-react_native_util.svg?style=flat)](https://rubygems.org/gems/fastlane-plugin-react_native_util)
5
+ [![Downloads](https://img.shields.io/gem/dt/fastlane-plugin-react_native_util.svg?style=flat)](https://rubygems.org/gems/fastlane-plugin-react_native_util)
6
+ [![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/jdee/fastlane-plugin-react_native_util/blob/master/LICENSE)
7
+ [![CircleCI](https://img.shields.io/circleci/project/github/jdee/fastlane-plugin-react_native_util.svg)](https://circleci.com/gh/jdee/fastlane-plugin-react_native_util)
8
+
9
+ ## CLI/gem
10
+
11
+ See also https://github.com/jdee/react_native_util
12
+
13
+ ## Getting Started
14
+
15
+ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-react_native_util`, add it to your project by running:
16
+
17
+ ```bash
18
+ fastlane add_plugin react_native_util
19
+ ```
20
+
21
+ ## About react_native_util
22
+
23
+ ### react_pod action
24
+
25
+ Converts a React Native Xcode project to use the React pod from node_modules
26
+ instead of the projects in the Libraries group. This makes it easier to manage
27
+ native dependencies while preserving compatibility with `react-native link`.
28
+ The command looks for your app's package.json in the current directory and
29
+ expects your Xcode project to be located under the ios subdirectory and have
30
+ the name specified for your app in package.json. If a Podfile is found in the
31
+ ios subdirectory, the conversion will fail.
32
+
33
+ The React.xcodeproj in the Libraries group of a project created by
34
+ `react-native init` automatically starts the Metro packager via a Run Script
35
+ build phase. When the react_pod command removes the Libraries group from your
36
+ app project, it adds an equivalent build phase to your app project so that the
37
+ packager will automatically be started when necessary by Xcode.
38
+
39
+ Use the `update` option to update the packager script after
40
+ updating React Native, in case the packager script on the React.xcodeproj changes
41
+ after it's removed from your project.
42
+
43
+ ### Options
44
+
45
+ |option|description|type|default|env. var.|
46
+ |------|-----------|----|-------|---------|
47
+ |chdir|Specify the path to the app (location of package.json)|String|.||
48
+ |update|Update a previously converted project|Boolean|false||
49
+ |repo_update|Don't update the local podspec repo|Boolean|true|REACT_NATIVE_UTIL_REPO_UPDATE|
50
+
51
+ ## Example
52
+
53
+ Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
54
+
55
+ Convert examples/UnconvertedApp:
56
+ ```bash
57
+ fastlane convert_app
58
+ ```
59
+
60
+ Update examples/ConvertedApp:
61
+ ```bash
62
+ fastlane update_app
63
+ ```
64
+
65
+ ## Run tests for this plugin
66
+
67
+ To run both the tests, and code style validation, run
68
+
69
+ ```
70
+ rake
71
+ ```
72
+
73
+ To automatically fix many of the styling issues, use
74
+ ```
75
+ rubocop -a
76
+ ```
77
+
78
+ ## Issues and Feedback
79
+
80
+ For any other issues and feedback about this plugin, please submit it to this repository.
81
+
82
+ ## Troubleshooting
83
+
84
+ If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
85
+
86
+ ## Using _fastlane_ Plugins
87
+
88
+ For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
89
+
90
+ ## About _fastlane_
91
+
92
+ _fastlane_ is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).
@@ -0,0 +1,16 @@
1
+ require 'fastlane/plugin/react_native_util/version'
2
+
3
+ module Fastlane
4
+ module ReactNativeUtil
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::ReactNativeUtil.all_classes.each do |current|
15
+ require current
16
+ end
@@ -0,0 +1,68 @@
1
+ require 'fastlane/action'
2
+ require 'react_native_util'
3
+ require_relative '../helper/react_native_util_helper'
4
+
5
+ module Fastlane
6
+ module Actions
7
+ class ReactPodAction < Action
8
+ def self.run(params)
9
+ UI.message "Running in #{params[:chdir]}"
10
+ Dir.chdir params[:chdir] do
11
+ converter = ::ReactNativeUtil::Converter.new repo_update: params[:repo_update]
12
+
13
+ begin
14
+ if params[:update]
15
+ converter.update_project!
16
+ else
17
+ converter.convert_to_react_pod!
18
+ end
19
+ rescue ::ReactNativeUtil::BaseException => e
20
+ UI.user_error! e.message
21
+ end
22
+ end
23
+ end
24
+
25
+ def self.description
26
+ "Community utilities for React Native projects"
27
+ end
28
+
29
+ def self.authors
30
+ ["Jimmy Dee"]
31
+ end
32
+
33
+ def self.return_value
34
+ # If your method provides a return value, you can describe here what it does
35
+ end
36
+
37
+ def self.details
38
+ # Optional:
39
+ "more to come"
40
+ end
41
+
42
+ def self.available_options
43
+ [
44
+ FastlaneCore::ConfigItem.new(key: :chdir,
45
+ description: 'Root of app project',
46
+ optional: true,
47
+ default_value: '.',
48
+ type: String),
49
+ FastlaneCore::ConfigItem.new(key: :update,
50
+ description: 'Update a converted project',
51
+ optional: true,
52
+ default_value: false,
53
+ is_string: false),
54
+ FastlaneCore::ConfigItem.new(key: :repo_update,
55
+ env_name: 'REACT_NATIVE_UTIL_REPO_UPDATE',
56
+ description: 'Update local podspec repo',
57
+ optional: true,
58
+ default_value: true,
59
+ is_string: false)
60
+ ]
61
+ end
62
+
63
+ def self.is_supported?(platform)
64
+ platform == :ios
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,16 @@
1
+ require 'fastlane_core/ui/ui'
2
+
3
+ module Fastlane
4
+ UI = FastlaneCore::UI unless Fastlane.const_defined?("UI")
5
+
6
+ module Helper
7
+ class ReactNativeUtilHelper
8
+ # class methods that you define here become available in your action
9
+ # as `Helper::ReactNativeUtilHelper.your_method`
10
+ #
11
+ def self.show_message
12
+ UI.message("Hello from the react_native_util plugin helper!")
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,5 @@
1
+ module Fastlane
2
+ module ReactNativeUtil
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,216 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fastlane-plugin-react_native_util
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Jimmy Dee
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-05-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: react_native_util
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.5'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.5'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '1.16'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '1.16'
41
+ - !ruby/object:Gem::Dependency
42
+ name: fastlane
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.122'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.122'
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.12'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.12'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '12.3'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '12.3'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '3.8'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '3.8'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec-simplecov
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.2'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '0.2'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rspec_junit_formatter
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '0.4'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '0.4'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rubocop
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - '='
130
+ - !ruby/object:Gem::Version
131
+ version: 0.65.0
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - '='
137
+ - !ruby/object:Gem::Version
138
+ version: 0.65.0
139
+ - !ruby/object:Gem::Dependency
140
+ name: rubocop-require_tools
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '0.1'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '0.1'
153
+ - !ruby/object:Gem::Dependency
154
+ name: simplecov
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '0.16'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '0.16'
167
+ - !ruby/object:Gem::Dependency
168
+ name: yard
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: '0.9'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '0.9'
181
+ description:
182
+ email: jgvdthree@gmail.com
183
+ executables: []
184
+ extensions: []
185
+ extra_rdoc_files: []
186
+ files:
187
+ - LICENSE
188
+ - README.md
189
+ - lib/fastlane/plugin/react_native_util.rb
190
+ - lib/fastlane/plugin/react_native_util/actions/react_pod_action.rb
191
+ - lib/fastlane/plugin/react_native_util/helper/react_native_util_helper.rb
192
+ - lib/fastlane/plugin/react_native_util/version.rb
193
+ homepage: https://github.com/jdee/fastlane-plugin-react_native_util
194
+ licenses:
195
+ - MIT
196
+ metadata: {}
197
+ post_install_message:
198
+ rdoc_options: []
199
+ require_paths:
200
+ - lib
201
+ required_ruby_version: !ruby/object:Gem::Requirement
202
+ requirements:
203
+ - - ">="
204
+ - !ruby/object:Gem::Version
205
+ version: '0'
206
+ required_rubygems_version: !ruby/object:Gem::Requirement
207
+ requirements:
208
+ - - ">="
209
+ - !ruby/object:Gem::Version
210
+ version: '0'
211
+ requirements: []
212
+ rubygems_version: 3.0.3
213
+ signing_key:
214
+ specification_version: 4
215
+ summary: Community utilities for React Native projects
216
+ test_files: []