cocoapods-embed-flutter 0.5.3 → 0.6.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/.vscode/extensions.json +6 -0
- data/CHANGELOG.md +22 -0
- data/Gemfile.lock +4 -4
- data/README.md +8 -0
- data/Rakefile +12 -13
- data/lib/cocoapods-embed-flutter/flutter/external_sources.rb +14 -7
- data/lib/cocoapods-embed-flutter/gem_version.rb +1 -1
- data/lib/cocoapods-embed-flutter/src/pub.rb +4 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a64be69df26a945c384cd9c91456396a1dae3542120763103cea1ea95906c62
|
4
|
+
data.tar.gz: 379fd07871bf85cddaf9f3287d08d92e5ef82a31502a81929f14804de9744db6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81f87e0aa277b5eedbd585a6db5c026f08a06913f24e11a3037ffe5226a2bdccdac5c96339fa5cfde605896a276708ee8ce0d89ffe47769aa584ed211e0b25d6
|
7
|
+
data.tar.gz: 29648b77e626389b0a41e8f4548797935d9ce98638ac267dc41594652518ad69e2b22a4a4f353e2a35781b3e25133a16d9b43682d87c355fe1b82b7e140c48b6
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,25 @@
|
|
1
|
+
## [0.6.0](https://github.com/DartBuild/cocoapods-embed-flutter/compare/v0.5.3...v0.6.0) (2022-03-27)
|
2
|
+
|
3
|
+
|
4
|
+
### 📚 Documentation
|
5
|
+
|
6
|
+
* **README:** add pub.dev limitation ([8f955f3](https://github.com/DartBuild/cocoapods-embed-flutter/commit/8f955f36519b1e5eeac89ffebd660a5f84f9983b))
|
7
|
+
|
8
|
+
|
9
|
+
### 🛠 Dependency
|
10
|
+
|
11
|
+
* bump cocoapods from 1.11.2 to 1.11.3 ([#4](https://github.com/DartBuild/cocoapods-embed-flutter/issues/4)) ([152737d](https://github.com/DartBuild/cocoapods-embed-flutter/commit/152737dd77852ef6937b5f458019e6535a426755))
|
12
|
+
|
13
|
+
|
14
|
+
### 💄 Styles
|
15
|
+
|
16
|
+
* add vscode extensions recommendation ([4f021fb](https://github.com/DartBuild/cocoapods-embed-flutter/commit/4f021fbfa75dd58d1257c43ea3d19cb68b8a19e6))
|
17
|
+
|
18
|
+
|
19
|
+
### 🚀 Features
|
20
|
+
|
21
|
+
* allow specifying different path for remote sources ([bc9c850](https://github.com/DartBuild/cocoapods-embed-flutter/commit/bc9c8509f90ef88248b56361794b6f8f1182a082))
|
22
|
+
|
1
23
|
### [0.5.3](https://github.com/DartBuild/cocoapods-embed-flutter/compare/v0.5.2...v0.5.3) (2022-03-18)
|
2
24
|
|
3
25
|
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cocoapods-embed-flutter (0.
|
4
|
+
cocoapods-embed-flutter (0.6.0)
|
5
5
|
cocoapods
|
6
6
|
fileutils
|
7
7
|
yaml
|
@@ -28,10 +28,10 @@ GEM
|
|
28
28
|
bacon (1.2.0)
|
29
29
|
benchmark (0.2.0)
|
30
30
|
claide (1.1.0)
|
31
|
-
cocoapods (1.11.
|
31
|
+
cocoapods (1.11.3)
|
32
32
|
addressable (~> 2.8)
|
33
33
|
claide (>= 1.0.2, < 2.0)
|
34
|
-
cocoapods-core (= 1.11.
|
34
|
+
cocoapods-core (= 1.11.3)
|
35
35
|
cocoapods-deintegrate (>= 1.0.3, < 2.0)
|
36
36
|
cocoapods-downloader (>= 1.4.0, < 2.0)
|
37
37
|
cocoapods-plugins (>= 1.0.0, < 2.0)
|
@@ -46,7 +46,7 @@ GEM
|
|
46
46
|
nap (~> 1.0)
|
47
47
|
ruby-macho (>= 1.0, < 3.0)
|
48
48
|
xcodeproj (>= 1.21.0, < 2.0)
|
49
|
-
cocoapods-core (1.11.
|
49
|
+
cocoapods-core (1.11.3)
|
50
50
|
activesupport (>= 5.0, < 7)
|
51
51
|
addressable (~> 2.8)
|
52
52
|
algoliasearch (~> 1.0)
|
data/README.md
CHANGED
@@ -30,6 +30,7 @@ plugin 'cocoapods-embed-flutter'
|
|
30
30
|
pub 'flutter_module', :path => '../'
|
31
31
|
```
|
32
32
|
|
33
|
+
<a name="path_desc"></a>
|
33
34
|
*`:path` can be path pointing to `pubspec.yaml` or to the directory containing `pubspec.yaml` or to the directory containg flutter module.*
|
34
35
|
|
35
36
|
### Embedding module from a repository.
|
@@ -40,8 +41,15 @@ pub 'flutter_module', :git => 'https://github.com/gowalla/flutter_module.git', :
|
|
40
41
|
pub 'flutter_module', :git => 'https://github.com/gowalla/flutter_module.git', :commit => '082f8319af'
|
41
42
|
```
|
42
43
|
|
44
|
+
*flutter module project should be at the root of repository, if that's not the case add additional `:path` attribute for relative path to flutter project in repository. `:path` follows [these](#path_desc) restictions.*
|
45
|
+
|
46
|
+
```rb
|
47
|
+
pub 'flutter_module', :git => 'https://github.com/gowalla/flutter_module.git', :tag => '0.7.0', :path => 'relative path/to/project'
|
48
|
+
```
|
49
|
+
|
43
50
|
## Limitations
|
44
51
|
|
52
|
+
- Modules hosted in [pub.dev](https://pub.dev/) are not supported, only local modules and modules in remote sources like git are supported.
|
45
53
|
- You won't be able to add more than one flutter module to a single target. Currently flutter only supports one module per target.
|
46
54
|
- No caching is done for external sources, every time you run `pod install` flutter module will be downloaded each time.
|
47
55
|
|
data/Rakefile
CHANGED
@@ -4,6 +4,16 @@ def specs(dir)
|
|
4
4
|
FileList["spec/#{dir}/*_spec.rb"].shuffle.join(' ')
|
5
5
|
end
|
6
6
|
|
7
|
+
def setup_project(pod_install = false)
|
8
|
+
system('bundle install', exception: true)
|
9
|
+
Bundler.with_unbundled_env do
|
10
|
+
Dir.chdir('example/ios_app') do |path|
|
11
|
+
system('bundle install', exception: true)
|
12
|
+
system('bundle exec pod install', exception: true) if pod_install
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
7
17
|
desc 'Runs all the specs'
|
8
18
|
task :specs do
|
9
19
|
sh "bundle exec bacon #{specs('**')}"
|
@@ -11,23 +21,12 @@ end
|
|
11
21
|
|
12
22
|
desc 'Setup example project'
|
13
23
|
task :demo do
|
14
|
-
|
15
|
-
Bundler.with_unbundled_env do
|
16
|
-
Dir.chdir('example/ios_app') do |path|
|
17
|
-
system('bundle install', exception: true)
|
18
|
-
system('bundle exec pod install', exception: true)
|
19
|
-
end
|
20
|
-
end
|
24
|
+
setup_project(true)
|
21
25
|
end
|
22
26
|
|
23
27
|
desc 'Update lock files'
|
24
28
|
task :update do
|
25
|
-
|
26
|
-
Bundler.with_unbundled_env do
|
27
|
-
Dir.chdir('example/ios_app') do |path|
|
28
|
-
system('bundle install', exception: true)
|
29
|
-
end
|
30
|
-
end
|
29
|
+
setup_project
|
31
30
|
end
|
32
31
|
|
33
32
|
desc 'Publish to cocoapods plugins if not present'
|
@@ -38,12 +38,12 @@ module Flutter
|
|
38
38
|
options = options.last if options.is_a?(Array)
|
39
39
|
raise StandardError, "No options specified for flutter module: '#{name}'." unless options.is_a?(Hash)
|
40
40
|
|
41
|
-
if options.key?(
|
42
|
-
path = options[:path]
|
43
|
-
elsif SOURCE_KEYS.keys.any? { |key| options.key?(key) }
|
41
|
+
if SOURCE_KEYS.keys.any? { |key| options.key?(key) }
|
44
42
|
source = DownloaderSource.new(name, options, Pod::Config.instance.podfile_path)
|
45
43
|
source.fetch(Pod::Config.instance.sandbox)
|
46
44
|
path = source.normalized_pupspec_path
|
45
|
+
elsif options.key?(:path)
|
46
|
+
path = options[:path]
|
47
47
|
else
|
48
48
|
raise StandardError, "Invalid flutter module: '#{name}'."
|
49
49
|
end
|
@@ -116,8 +116,8 @@ module Flutter
|
|
116
116
|
# @return [String] a string representation of the source suitable for UI.
|
117
117
|
#
|
118
118
|
def description
|
119
|
-
strategy = Pod::Downloader.strategy_from_options(
|
120
|
-
options =
|
119
|
+
strategy = Pod::Downloader.strategy_from_options(download_params)
|
120
|
+
options = download_params.dup
|
121
121
|
url = options.delete(strategy)
|
122
122
|
result = "from `#{url}`"
|
123
123
|
options.each do |key, value|
|
@@ -148,7 +148,8 @@ module Flutter
|
|
148
148
|
# and expanding it if necessary.
|
149
149
|
#
|
150
150
|
def normalized_pupspec_path
|
151
|
-
|
151
|
+
search_path = params[:path].nil? ? target : File.expand_path(params[:path], target)
|
152
|
+
Spec.find_file(name, search_path)
|
152
153
|
end
|
153
154
|
|
154
155
|
private
|
@@ -203,10 +204,16 @@ module Flutter
|
|
203
204
|
def download_request
|
204
205
|
Pod::Downloader::Request.new(
|
205
206
|
:name => name,
|
206
|
-
:params =>
|
207
|
+
:params => download_params,
|
207
208
|
)
|
208
209
|
end
|
209
210
|
|
211
|
+
# @return [Hash] the options for remote source download.
|
212
|
+
#
|
213
|
+
def download_params
|
214
|
+
params.select { |key, value| !key.equal?(:path) }
|
215
|
+
end
|
216
|
+
|
210
217
|
# @return [String] the path where this flutter project
|
211
218
|
# will be downloaded relative paths.
|
212
219
|
#
|
@@ -99,7 +99,10 @@ module Pod
|
|
99
99
|
# pub 'flutter_module', :git => 'https://github.com/octokit/flutter_module.git', :commit => '082f8319af'
|
100
100
|
#
|
101
101
|
# The flutter module or its `pubspec` file is expected to be in the
|
102
|
-
# root of the repository
|
102
|
+
# root of the repository, if that's not the case specify relative path
|
103
|
+
# to flutter project in repository.
|
104
|
+
#
|
105
|
+
# pub 'flutter_module', :git => 'https://github.com/octokit/flutter_module.git', :tag => '0.7.0', :path => 'custom/flutter_module'
|
103
106
|
#
|
104
107
|
#
|
105
108
|
# @note This method allow a nil name and the raises to be more
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-embed-flutter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Soumya Ranjan Mahunt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: yaml
|
@@ -90,6 +90,7 @@ extensions: []
|
|
90
90
|
extra_rdoc_files: []
|
91
91
|
files:
|
92
92
|
- ".gitignore"
|
93
|
+
- ".vscode/extensions.json"
|
93
94
|
- CHANGELOG.md
|
94
95
|
- CODE_OF_CONDUCT.md
|
95
96
|
- Gemfile
|