cocoapods-embed-flutter 0.5.0 → 0.5.3

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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +28 -1
  3. data/Gemfile +1 -0
  4. data/Gemfile.lock +60 -2
  5. data/README.md +21 -1
  6. data/Rakefile +14 -2
  7. data/cocoapods-embed-flutter.gemspec +22 -11
  8. data/lib/cocoapods-embed-flutter/flutter/dependency.rb +2 -2
  9. data/lib/cocoapods-embed-flutter/flutter/downloader.rb +3 -4
  10. data/lib/cocoapods-embed-flutter/flutter/external_sources.rb +29 -11
  11. data/lib/cocoapods-embed-flutter/flutter/pubspec.rb +3 -10
  12. data/lib/cocoapods-embed-flutter/flutter.rb +30 -0
  13. data/lib/cocoapods-embed-flutter/gem_version.rb +6 -1
  14. data/lib/cocoapods-embed-flutter/src/pub.rb +20 -2
  15. data/lib/cocoapods-embed-flutter.rb +1 -0
  16. metadata +13 -34
  17. data/.github/config/config.js +0 -21
  18. data/.github/config/package-lock.json +0 -223
  19. data/.github/config/package.json +0 -16
  20. data/.github/config/pre_changelog_hook.js +0 -27
  21. data/.github/dependabot.yml +0 -23
  22. data/.github/workflows/main.yml +0 -145
  23. data/example/flutter_module/.gitignore +0 -48
  24. data/example/flutter_module/.metadata +0 -10
  25. data/example/flutter_module/README.md +0 -11
  26. data/example/flutter_module/analysis_options.yaml +0 -4
  27. data/example/flutter_module/flutter_module.iml +0 -18
  28. data/example/flutter_module/flutter_module_android.iml +0 -27
  29. data/example/flutter_module/lib/main.dart +0 -112
  30. data/example/flutter_module/pubspec.lock +0 -174
  31. data/example/flutter_module/pubspec.yaml +0 -87
  32. data/example/flutter_module/test/widget_test.dart +0 -30
  33. data/example/ios_app/Gemfile +0 -4
  34. data/example/ios_app/Gemfile.lock +0 -110
  35. data/example/ios_app/Podfile +0 -11
  36. data/example/ios_app/Podfile.lock +0 -28
  37. data/example/ios_app/ios_app/Assets.xcassets/AccentColor.colorset/Contents.json +0 -11
  38. data/example/ios_app/ios_app/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -98
  39. data/example/ios_app/ios_app/Assets.xcassets/Contents.json +0 -6
  40. data/example/ios_app/ios_app/ContentView.swift +0 -40
  41. data/example/ios_app/ios_app/Preview Content/Preview Assets.xcassets/Contents.json +0 -6
  42. data/example/ios_app/ios_app/ios_appApp.swift +0 -18
  43. data/example/ios_app/ios_app.xcodeproj/project.pbxproj +0 -426
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 385431ac48133784d4ee45961f3352ad076229c9d8642f83e4991413db2a5203
4
- data.tar.gz: e3082842d2508fa799519692701f48de3dc3129f74b4df82aa4220f64e1d2761
3
+ metadata.gz: a2967996d60f14ff19b440e5a75e87b0a6cea80cd5c0c0c656ca64fe724c170c
4
+ data.tar.gz: 7c370b83a302656f8f7747a51788a202558c2cc11c14067e1866dd30841173c3
5
5
  SHA512:
6
- metadata.gz: 9ff10e59c66e053d58b0d24c9f751efdf306aac5da5982ebe2b287870127c29a6a96fb2089d993518cc0a79bee14a4404d67cc0415c673ac73909784fd654b70
7
- data.tar.gz: 0c6040229a99b21a714ea8701cfa330f40101e8449ded6bdceb16acfd26dc846210d7b305f8f154f3591aec015ece56e77d1d8573c219e9e82bae3df4cb6e3a9
6
+ metadata.gz: b92b9b9aa47ee784402cad9ad294c316b148acf4bb0574246f9ed7c4bbf73fb671868559cc0acb1c3d9a3105a6127717e795be1cfe2e93d22b7d9f4277c6f785
7
+ data.tar.gz: 2ba932ff07f3291cb0797345720c2676b53ddb51ab37086a2b8d13a417fae2112bff668a6f7749f0a1bbb751d747c565edf723b06893b440ee1beafce4367ba2
data/CHANGELOG.md CHANGED
@@ -1,4 +1,31 @@
1
- ## 0.5.0 (2022-03-11)
1
+ ### [0.5.3](https://github.com/DartBuild/cocoapods-embed-flutter/compare/v0.5.2...v0.5.3) (2022-03-18)
2
+
3
+
4
+ ### 📚 Documentation
5
+
6
+ * **README:** add limitations ([9133edc](https://github.com/DartBuild/cocoapods-embed-flutter/commit/9133edc006973892b2e55ef13a30f6ae8e8b7ad4))
7
+
8
+ ### [0.5.2](https://github.com/DartBuild/cocoapods-embed-flutter/compare/v0.5.1...v0.5.2) (2022-03-12)
9
+
10
+
11
+ ### 📚 Documentation
12
+
13
+ * add helpful links and badges ([4ab6983](https://github.com/DartBuild/cocoapods-embed-flutter/commit/4ab69837d5057a0049e1533a00c6209556aec5b0))
14
+
15
+
16
+ ### 💡 Continuous Integration
17
+
18
+ * **Deps:** bump actions/checkout from 2 to 3 ([#2](https://github.com/DartBuild/cocoapods-embed-flutter/issues/2)) ([3d1ca07](https://github.com/DartBuild/cocoapods-embed-flutter/commit/3d1ca0732a87e04561bc68ba1bbfc337173cd783))
19
+ * **Deps:** bump actions/setup-node from 2 to 3 ([#3](https://github.com/DartBuild/cocoapods-embed-flutter/issues/3)) ([efd8f1a](https://github.com/DartBuild/cocoapods-embed-flutter/commit/efd8f1a82ce8ca6cd12adc1e5ca943a316a44b03))
20
+
21
+ ### [0.5.1](https://github.com/DartBuild/cocoapods-embed-flutter/compare/v0.5.0...v0.5.1) (2022-03-11)
22
+
23
+
24
+ ### 📚 Documentation
25
+
26
+ * add code documentation ([87c06fd](https://github.com/DartBuild/cocoapods-embed-flutter/commit/87c06fd45d3c63a94cda6ce3ae00a200f412bb2a))
27
+
28
+ ## [0.5.0](https://github.com/DartBuild/cocoapods-embed-flutter/compare/3358c2b251f51154010990b95b7eaa741049d707...v0.5.0) (2022-03-11)
2
29
 
3
30
 
4
31
  ### 🚀 Features
data/Gemfile CHANGED
@@ -12,4 +12,5 @@ group :development do
12
12
  gem 'bacon'
13
13
  gem 'mocha-on-bacon'
14
14
  gem 'prettybacon'
15
+ gem 'solargraph'
15
16
  end
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-embed-flutter (0.5.0)
4
+ cocoapods-embed-flutter (0.5.3)
5
5
  cocoapods
6
6
  fileutils
7
7
  yaml
@@ -11,7 +11,7 @@ GEM
11
11
  specs:
12
12
  CFPropertyList (3.0.5)
13
13
  rexml
14
- activesupport (6.1.4.7)
14
+ activesupport (6.1.5)
15
15
  concurrent-ruby (~> 1.0, >= 1.0.2)
16
16
  i18n (>= 1.6, < 2)
17
17
  minitest (>= 5.1)
@@ -22,8 +22,11 @@ GEM
22
22
  algoliasearch (1.27.5)
23
23
  httpclient (~> 2.8, >= 2.8.3)
24
24
  json (>= 1.5.1)
25
+ ast (2.4.2)
25
26
  atomos (0.1.3)
27
+ backport (1.2.0)
26
28
  bacon (1.2.0)
29
+ benchmark (0.2.0)
27
30
  claide (1.1.0)
28
31
  cocoapods (1.11.2)
29
32
  addressable (~> 2.8)
@@ -66,6 +69,8 @@ GEM
66
69
  concurrent-ruby (1.1.9)
67
70
  descendants_tracker (0.0.4)
68
71
  thread_safe (~> 0.3, >= 0.3.1)
72
+ diff-lcs (1.5.0)
73
+ e2mmap (0.1.0)
69
74
  escape (0.0.4)
70
75
  ethon (0.15.0)
71
76
  ffi (>= 1.15.0)
@@ -107,8 +112,13 @@ GEM
107
112
  httpclient (2.8.3)
108
113
  i18n (1.10.0)
109
114
  concurrent-ruby (~> 1.0)
115
+ jaro_winkler (1.5.4)
110
116
  json (2.6.1)
111
117
  jwt (2.3.0)
118
+ kramdown (2.3.1)
119
+ rexml
120
+ kramdown-parser-gfm (1.1.0)
121
+ kramdown (~> 2.0)
112
122
  minitest (5.15.0)
113
123
  mocha (1.13.0)
114
124
  mocha-on-bacon (0.2.3)
@@ -120,25 +130,70 @@ GEM
120
130
  nanaimo (0.3.0)
121
131
  nap (1.1.0)
122
132
  netrc (0.11.0)
133
+ nokogiri (1.13.3-arm64-darwin)
134
+ racc (~> 1.4)
135
+ nokogiri (1.13.3-x86_64-darwin)
136
+ racc (~> 1.4)
137
+ nokogiri (1.13.3-x86_64-linux)
138
+ racc (~> 1.4)
123
139
  oauth2 (1.4.9)
124
140
  faraday (>= 0.17.3, < 3.0)
125
141
  jwt (>= 1.0, < 3.0)
126
142
  multi_json (~> 1.3)
127
143
  multi_xml (~> 0.5)
128
144
  rack (>= 1.2, < 3)
145
+ parallel (1.21.0)
146
+ parser (3.1.1.0)
147
+ ast (~> 2.4.1)
129
148
  prettybacon (0.0.2)
130
149
  bacon (~> 1.2)
131
150
  public_suffix (4.0.6)
151
+ racc (1.6.0)
132
152
  rack (2.2.3)
153
+ rainbow (3.1.1)
133
154
  rake (13.0.6)
155
+ regexp_parser (2.2.1)
156
+ reverse_markdown (2.1.1)
157
+ nokogiri
134
158
  rexml (3.2.5)
159
+ rubocop (1.26.0)
160
+ parallel (~> 1.10)
161
+ parser (>= 3.1.0.0)
162
+ rainbow (>= 2.2.2, < 4.0)
163
+ regexp_parser (>= 1.8, < 3.0)
164
+ rexml
165
+ rubocop-ast (>= 1.16.0, < 2.0)
166
+ ruby-progressbar (~> 1.7)
167
+ unicode-display_width (>= 1.4.0, < 3.0)
168
+ rubocop-ast (1.16.0)
169
+ parser (>= 3.1.1.0)
135
170
  ruby-macho (2.5.1)
171
+ ruby-progressbar (1.11.0)
136
172
  ruby2_keywords (0.0.5)
173
+ solargraph (0.44.3)
174
+ backport (~> 1.2)
175
+ benchmark
176
+ bundler (>= 1.17.2)
177
+ diff-lcs (~> 1.4)
178
+ e2mmap
179
+ jaro_winkler (~> 1.5)
180
+ kramdown (~> 2.3)
181
+ kramdown-parser-gfm (~> 1.1)
182
+ parser (~> 3.0)
183
+ reverse_markdown (>= 1.0.5, < 3)
184
+ rubocop (>= 0.52)
185
+ thor (~> 1.0)
186
+ tilt (~> 2.0)
187
+ yard (~> 0.9, >= 0.9.24)
188
+ thor (1.2.1)
137
189
  thread_safe (0.3.6)
190
+ tilt (2.0.10)
138
191
  typhoeus (1.4.0)
139
192
  ethon (>= 0.9.0)
140
193
  tzinfo (2.0.4)
141
194
  concurrent-ruby (~> 1.0)
195
+ unicode-display_width (2.1.0)
196
+ webrick (1.7.0)
142
197
  xcodeproj (1.21.0)
143
198
  CFPropertyList (>= 2.3.3, < 4.0)
144
199
  atomos (~> 0.1.3)
@@ -147,6 +202,8 @@ GEM
147
202
  nanaimo (~> 0.3.0)
148
203
  rexml (~> 3.2.4)
149
204
  yaml (0.2.0)
205
+ yard (0.9.27)
206
+ webrick (~> 1.7.0)
150
207
  zeitwerk (2.5.4)
151
208
 
152
209
  PLATFORMS
@@ -165,6 +222,7 @@ DEPENDENCIES
165
222
  mocha-on-bacon
166
223
  prettybacon
167
224
  rake
225
+ solargraph
168
226
 
169
227
  BUNDLED WITH
170
228
  2.3.7
data/README.md CHANGED
@@ -1,16 +1,22 @@
1
1
  # cocoapods-embed-flutter
2
2
 
3
+ [![CI/CD](https://github.com/DartBuild/cocoapods-embed-flutter/actions/workflows/main.yml/badge.svg?branch=main&event=push)](https://github.com/DartBuild/cocoapods-embed-flutter/actions/workflows/main.yml)
3
4
  [![Gem Version](https://badge.fury.io/rb/cocoapods-embed-flutter.svg)](http://badge.fury.io/rb/cocoapods-embed-flutter)
4
- <!--- [![Code Climate](https://codeclimate.com/github/DartBuild/cocoapods-embed-flutter.png)](https://codeclimate.com/github/DartBuild/cocoapods-embed-flutter) -->
5
+ [![Code Climate](https://codeclimate.com/github/DartBuild/cocoapods-embed-flutter.png)](https://codeclimate.com/github/DartBuild/cocoapods-embed-flutter)
5
6
 
6
7
  Straight forward way of declaring flutter modules as dependency for targets, just like cocoapods does with pods.
7
8
 
8
9
  ## Installation
9
10
 
11
+ ### Install using command line.
10
12
  ```bash
11
13
  $ [sudo] gem install cocoapods-embed-flutter
12
14
  ```
13
15
 
16
+ ### Or add this to your `Gemfile`.
17
+ ```rb
18
+ gem 'cocoapods-embed-flutter'
19
+ ```
14
20
  ## Usage
15
21
 
16
22
  In your host project `Podfile`, write the below line before any target definition
@@ -33,3 +39,17 @@ pub 'flutter_module', :git => 'https://github.com/gowalla/flutter_module.git', :
33
39
  pub 'flutter_module', :git => 'https://github.com/gowalla/flutter_module.git', :tag => '0.7.0'
34
40
  pub 'flutter_module', :git => 'https://github.com/gowalla/flutter_module.git', :commit => '082f8319af'
35
41
  ```
42
+
43
+ ## Limitations
44
+
45
+ - 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
+ - No caching is done for external sources, every time you run `pod install` flutter module will be downloaded each time.
47
+
48
+ ## Links
49
+
50
+ | Link | Description |
51
+ | :----- | :------ |
52
+ [Gem page](https://rubygems.org/gems/cocoapods-embed-flutter) | Official Ruby Gems page.
53
+ [Code docs](https://www.rubydoc.info/gems/cocoapods-embed-flutter) | Generated code documentation.
54
+ [Changelog](https://github.com/DartBuild/cocoapods-embed-flutter/blob/main/CHANGELOG.md) | See the changes introduced in each version.
55
+ [Code of Conduct](CODE_OF_CONDUCT.md) | Find out the standards we hold ourselves to.
data/Rakefile CHANGED
@@ -12,7 +12,7 @@ end
12
12
  desc 'Setup example project'
13
13
  task :demo do
14
14
  system('bundle install', exception: true)
15
- Bundler.with_clean_env do
15
+ Bundler.with_unbundled_env do
16
16
  Dir.chdir('example/ios_app') do |path|
17
17
  system('bundle install', exception: true)
18
18
  system('bundle exec pod install', exception: true)
@@ -20,6 +20,16 @@ task :demo do
20
20
  end
21
21
  end
22
22
 
23
+ desc 'Update lock files'
24
+ task :update do
25
+ system('bundle install', exception: true)
26
+ Bundler.with_unbundled_env do
27
+ Dir.chdir('example/ios_app') do |path|
28
+ system('bundle install', exception: true)
29
+ end
30
+ end
31
+ end
32
+
23
33
  desc 'Publish to cocoapods plugins if not present'
24
34
  task :publish do
25
35
  require 'rubygems'
@@ -31,7 +41,9 @@ task :publish do
31
41
  return if known_plugins.one? { |plugin| plugin['gem'] == gem.name }
32
42
 
33
43
  require 'github_api'
34
- return if Github.search.issues(q: "#{gem.name} user:CocoaPods repo:CocoaPods/cocoapods-plugins in:title").items.count > 0
44
+ return if Github.search.issues(
45
+ q: "#{gem.name} user:CocoaPods repo:CocoaPods/cocoapods-plugins in:title"
46
+ ).items.count > 0
35
47
  system('pod plugins publish', exception: true)
36
48
  end
37
49
 
@@ -4,27 +4,38 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'cocoapods-embed-flutter/gem_version.rb'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
+ repo = 'DartBuild/cocoapods-embed-flutter'
8
+ repo_url = "https://github.com/#{repo}"
9
+
7
10
  spec.name = 'cocoapods-embed-flutter'
8
11
  spec.version = CocoapodsEmbedFlutter::VERSION
12
+ spec.homepage = repo_url
13
+ spec.license = 'MIT'
9
14
  spec.authors = ['Soumya Ranjan Mahunt']
10
15
  spec.email = ['devsoumyamahunt@gmail.com']
11
- spec.description = %q{Embed flutter modules in iOS projects.}
12
- spec.summary = <<-DESC
13
- Straight forward way of declaring flutter modules as dependency for targets,
14
- just like cocoapods does with pods.
15
- DESC
16
- spec.homepage = 'https://github.com/DartBuild/cocoapods-embed-flutter'
17
- spec.license = 'MIT'
16
+ spec.summary = %q{Embed flutter modules in iOS projects.}
17
+ spec.description = <<-EOF
18
+ Straight forward way of declaring flutter modules as dependency for targets,
19
+ just like cocoapods does with pods.
20
+ EOF
18
21
 
19
- spec.files = `git ls-files`.split($/)
22
+ spec.files = `git ls-files`.split($/).grep_v(%r{^(example|.github)/})
20
23
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
21
24
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
22
25
  spec.require_paths = ['lib']
23
26
 
24
- spec.add_dependency 'yaml'
25
- spec.add_dependency 'fileutils'
26
- spec.add_dependency 'cocoapods'
27
+ spec.add_runtime_dependency 'yaml'
28
+ spec.add_runtime_dependency 'fileutils'
29
+ spec.add_runtime_dependency 'cocoapods'
27
30
 
28
31
  spec.add_development_dependency 'bundler'
29
32
  spec.add_development_dependency 'rake'
33
+
34
+ spec.required_ruby_version = '>= 2.6'
35
+ spec.metadata = {
36
+ 'bug_tracker_uri' => "#{repo_url}/issues",
37
+ 'changelog_uri' => "#{repo_url}/blob/main/CHANGELOG.md",
38
+ 'source_code_uri' => repo_url,
39
+ 'github_repo' => "git@github.com:#{repo}.git"
40
+ }
30
41
  end
@@ -1,4 +1,4 @@
1
- require 'cocoapods-embed-flutter/flutter/pubspec'
1
+ require 'cocoapods-embed-flutter/flutter'
2
2
 
3
3
  module Flutter
4
4
  module Pub
@@ -76,7 +76,7 @@ module Flutter
76
76
 
77
77
  # Install this dependency for the parent project.
78
78
  #
79
- # @return void
79
+ # @return [void]
80
80
  #
81
81
  def install
82
82
  spec.setup if local?
@@ -9,17 +9,16 @@ module Flutter
9
9
  # @return [Response] The download response for this download.
10
10
  #
11
11
  # @param [Request] request
12
- # the request that describes this pod download.
12
+ # the request that describes the flutter project download.
13
13
  #
14
14
  # @param [Pathname,Nil] target
15
- # the location to which this pod should be downloaded. If `nil`,
16
- # then the pod will only be cached.
15
+ # the location to which the flutter project should be downloaded.
17
16
  #
18
17
  # @param [Boolean] can_cache
19
18
  # whether caching is allowed.
20
19
  #
21
20
  # @param [Pathname,Nil] cache_path
22
- # the path used to cache pod downloads.
21
+ # the path used to cache flutter project downloads.
23
22
  #
24
23
  # @todo Implement caching for remote sources.
25
24
  #
@@ -1,11 +1,16 @@
1
1
  # Similar to:
2
2
  # https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/external_sources/abstract_external_source.rb
3
- require 'cocoapods-embed-flutter/flutter/downloader'
3
+ require 'cocoapods-embed-flutter/flutter'
4
4
  require 'cocoapods'
5
5
 
6
6
  module Flutter
7
7
  module Pub
8
+ # The ExternalSources modules name-spaces all the classes
9
+ # for accessing remote Flutter projects.
10
+ #
8
11
  module ExternalSources
12
+ # The keys accepted by the hash of the source attribute.
13
+ #
9
14
  SOURCE_KEYS = {
10
15
  :git => [:tag, :branch, :commit, :submodules].freeze,
11
16
  :svn => [:folder, :tag, :revision].freeze,
@@ -97,11 +102,9 @@ module Flutter
97
102
 
98
103
  public
99
104
 
100
- # @!group Subclasses hooks
101
-
102
105
  # Fetches the external source from the remote according to the params.
103
106
  #
104
- # @param [Sandbox] sandbox
107
+ # @param [Pod::Sandbox] sandbox
105
108
  # the sandbox where the specification should be stored.
106
109
  #
107
110
  # @return [void]
@@ -138,6 +141,12 @@ module Flutter
138
141
  Spec.find_file(name, declared_path)
139
142
  end
140
143
 
144
+ # Return the normalized path for a pubspec assuming sandbox
145
+ # pod folder as location.
146
+ #
147
+ # @return [String] The uri of the pubspec appending the name of the file
148
+ # and expanding it if necessary.
149
+ #
141
150
  def normalized_pupspec_path
142
151
  Spec.find_file(name, target)
143
152
  end
@@ -146,21 +155,24 @@ module Flutter
146
155
 
147
156
  # @! Subclasses helpers
148
157
 
149
- # Pre-downloads a Pod passing the options to the downloader and informing
150
- # the sandbox.
158
+ # Pre-downloads a flutter project passing the options to the downloader
159
+ # and informing the sandbox.
151
160
  #
152
- # @param [Sandbox] sandbox
153
- # The sandbox where the Pod should be downloaded.
161
+ # @param [Pod::Sandbox] sandbox
162
+ # The sandbox where the flutter project should be downloaded.
154
163
  #
155
- # @note To prevent a double download of the repository the pod is
156
- # marked as pre-downloaded indicating to the installer that only
164
+ # @note To prevent a double download of the repository the flutter project
165
+ # is marked as pre-downloaded indicating to the installer that only
157
166
  # clean operations are needed.
158
167
  #
159
168
  # @todo The downloader configuration is the same of the
160
- # #{PodSourceInstaller} and it needs to be kept in sync.
169
+ # #{Pod::Installer::PodSourceInstaller}
170
+ # and it needs to be kept in sync.
161
171
  #
162
172
  # @return [void]
163
173
  #
174
+ # @todo Implement caching for remote sources.
175
+ #
164
176
  def pre_download(sandbox)
165
177
  title = "Pre-downloading: `#{name}` #{description}"
166
178
  Pod::UI.titled_section(title, :verbose_prefix => '-> ') do
@@ -185,6 +197,9 @@ module Flutter
185
197
  end
186
198
  end
187
199
 
200
+ # @return [Pod::Downloader::Request] the request to remote
201
+ # flutter project source.
202
+ #
188
203
  def download_request
189
204
  Pod::Downloader::Request.new(
190
205
  :name => name,
@@ -192,6 +207,9 @@ module Flutter
192
207
  )
193
208
  end
194
209
 
210
+ # @return [String] the path where this flutter project
211
+ # will be downloaded relative paths.
212
+ #
195
213
  def target
196
214
  return Pod::Config.instance.sandbox.pod_dir(name)
197
215
  end
@@ -1,15 +1,8 @@
1
- require 'cocoapods-embed-flutter/flutter/dependency'
1
+ require 'cocoapods-embed-flutter/flutter'
2
2
  require 'yaml'
3
3
 
4
4
  module Flutter
5
- NAME = 'flutter'.freeze
6
- DIR_NAME = 'Flutter'.freeze
7
-
8
5
  module Pub
9
- SPEC_FILE = 'pubspec.yaml'.freeze
10
- TOOL_DIR = '.dart_tool'.freeze
11
- CACHE_FILE = 'package_config.json'.freeze
12
-
13
6
  # The Specification provides a DSL to describe a flutter project.
14
7
  # A project is defined as a library originating from a source.
15
8
  # A specification can support detailed attributes for modules of code
@@ -139,7 +132,7 @@ module Flutter
139
132
 
140
133
  # Sets up the project installing all specified dependencies.
141
134
  #
142
- # @return void
135
+ # @return [void]
143
136
  #
144
137
  def setup
145
138
  return if setup?
@@ -149,7 +142,7 @@ module Flutter
149
142
 
150
143
  # Runs `flutter pub get` on project directory.
151
144
  #
152
- # @return void
145
+ # @return [void]
153
146
  #
154
147
  def pup_get
155
148
  Dir.chdir(project_path) { |path| system('flutter pub get', exception: true) }
@@ -0,0 +1,30 @@
1
+ # The Flutter modules name-spaces all the classes for Flutter.
2
+ #
3
+ module Flutter
4
+ # The flutter command name.
5
+ #
6
+ NAME = 'flutter'.freeze
7
+ # The directory name for flutter specific
8
+ # files in a flutter project.
9
+ #
10
+ DIR_NAME = 'Flutter'.freeze
11
+ # The Pub modules name-spaces all the classes for Flutter Pub.
12
+ #
13
+ module Pub
14
+ # The file name for flutter specification declaration.
15
+ #
16
+ SPEC_FILE = 'pubspec.yaml'.freeze
17
+ # The folder name containing flutter dependencies cache files.
18
+ #
19
+ TOOL_DIR = '.dart_tool'.freeze
20
+ # The cache file name for flutter projects.
21
+ #
22
+ CACHE_FILE = 'package_config.json'.freeze
23
+
24
+ require 'cocoapods-embed-flutter/flutter/downloader'
25
+ require 'cocoapods-embed-flutter/flutter/external_sources'
26
+
27
+ autoload :Dependency, 'cocoapods-embed-flutter/flutter/dependency'
28
+ autoload :Spec, 'cocoapods-embed-flutter/flutter/pubspec'
29
+ end
30
+ end
@@ -1,3 +1,8 @@
1
+ # The CocoapodsEmbedFlutter modules name-spaces
2
+ # all the plugin specific classes.
3
+ #
1
4
  module CocoapodsEmbedFlutter
2
- VERSION = '0.5.0'.freeze
5
+ # The version of the cocoapods-embed-flutter.
6
+ #
7
+ VERSION = '0.5.3'.freeze
3
8
  end
@@ -1,8 +1,18 @@
1
1
  require 'cocoapods-embed-flutter/gem_version'
2
- require 'cocoapods-embed-flutter/flutter/pubspec'
3
- require 'cocoapods-embed-flutter/flutter/external_sources'
2
+ require 'cocoapods-embed-flutter/flutter'
4
3
 
4
+ # The Pod modules name-spaces all the classes and methods
5
+ # providing flutter specific functionality to podfile.
6
+ #
5
7
  module Pod
8
+ # The Podfile is a specification that describes the dependencies of the
9
+ # targets of an Xcode project.
10
+ #
11
+ # It supports its own DSL and is stored in a file named `Podfile`.
12
+ #
13
+ # The Podfile creates a hierarchy of target definitions that store the
14
+ # information necessary to generate the CocoaPods libraries.
15
+ #
6
16
  class Podfile
7
17
  # The Podfile is a specification that describes the dependencies of the
8
18
  # targets of one or more Xcode projects. With Embed Flutter
@@ -104,6 +114,14 @@ module Pod
104
114
  install_flutter_pods_for_pubspec(pubspec)
105
115
  end
106
116
 
117
+ # Integrates flutter module provided in `pubspec`
118
+ # to an Xcode project target.
119
+ #
120
+ # @param [Flutter::Pub::Spec] pubspec
121
+ # the flutter module project specification.
122
+ #
123
+ # @return [void]
124
+ #
107
125
  def install_flutter_pods_for_pubspec(pubspec)
108
126
  raise ArgumentError, "Invalid `pubspec` argument." unless pubspec.is_a?(Flutter::Pub::Spec)
109
127
  load pubspec.pod_helper_path
@@ -1,3 +1,4 @@
1
1
  require 'cocoapods-embed-flutter/gem_version'
2
2
  require 'cocoapods-embed-flutter/source'
3
3
  require 'cocoapods-embed-flutter/hooks'
4
+ require 'cocoapods-embed-flutter/flutter'
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.5.0
4
+ version: 0.5.3
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 00:00:00.000000000 Z
11
+ date: 2022-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yaml
@@ -80,19 +80,15 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
- description: Embed flutter modules in iOS projects.
83
+ description: |2
84
+ Straight forward way of declaring flutter modules as dependency for targets,
85
+ just like cocoapods does with pods.
84
86
  email:
85
87
  - devsoumyamahunt@gmail.com
86
88
  executables: []
87
89
  extensions: []
88
90
  extra_rdoc_files: []
89
91
  files:
90
- - ".github/config/config.js"
91
- - ".github/config/package-lock.json"
92
- - ".github/config/package.json"
93
- - ".github/config/pre_changelog_hook.js"
94
- - ".github/dependabot.yml"
95
- - ".github/workflows/main.yml"
96
92
  - ".gitignore"
97
93
  - CHANGELOG.md
98
94
  - CODE_OF_CONDUCT.md
@@ -102,28 +98,8 @@ files:
102
98
  - README.md
103
99
  - Rakefile
104
100
  - cocoapods-embed-flutter.gemspec
105
- - example/flutter_module/.gitignore
106
- - example/flutter_module/.metadata
107
- - example/flutter_module/README.md
108
- - example/flutter_module/analysis_options.yaml
109
- - example/flutter_module/flutter_module.iml
110
- - example/flutter_module/flutter_module_android.iml
111
- - example/flutter_module/lib/main.dart
112
- - example/flutter_module/pubspec.lock
113
- - example/flutter_module/pubspec.yaml
114
- - example/flutter_module/test/widget_test.dart
115
- - example/ios_app/Gemfile
116
- - example/ios_app/Gemfile.lock
117
- - example/ios_app/Podfile
118
- - example/ios_app/Podfile.lock
119
- - example/ios_app/ios_app.xcodeproj/project.pbxproj
120
- - example/ios_app/ios_app/Assets.xcassets/AccentColor.colorset/Contents.json
121
- - example/ios_app/ios_app/Assets.xcassets/AppIcon.appiconset/Contents.json
122
- - example/ios_app/ios_app/Assets.xcassets/Contents.json
123
- - example/ios_app/ios_app/ContentView.swift
124
- - example/ios_app/ios_app/Preview Content/Preview Assets.xcassets/Contents.json
125
- - example/ios_app/ios_app/ios_appApp.swift
126
101
  - lib/cocoapods-embed-flutter.rb
102
+ - lib/cocoapods-embed-flutter/flutter.rb
127
103
  - lib/cocoapods-embed-flutter/flutter/dependency.rb
128
104
  - lib/cocoapods-embed-flutter/flutter/downloader.rb
129
105
  - lib/cocoapods-embed-flutter/flutter/external_sources.rb
@@ -139,7 +115,11 @@ files:
139
115
  homepage: https://github.com/DartBuild/cocoapods-embed-flutter
140
116
  licenses:
141
117
  - MIT
142
- metadata: {}
118
+ metadata:
119
+ bug_tracker_uri: https://github.com/DartBuild/cocoapods-embed-flutter/issues
120
+ changelog_uri: https://github.com/DartBuild/cocoapods-embed-flutter/blob/main/CHANGELOG.md
121
+ source_code_uri: https://github.com/DartBuild/cocoapods-embed-flutter
122
+ github_repo: git@github.com:DartBuild/cocoapods-embed-flutter.git
143
123
  post_install_message:
144
124
  rdoc_options: []
145
125
  require_paths:
@@ -148,7 +128,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
148
128
  requirements:
149
129
  - - ">="
150
130
  - !ruby/object:Gem::Version
151
- version: '0'
131
+ version: '2.6'
152
132
  required_rubygems_version: !ruby/object:Gem::Requirement
153
133
  requirements:
154
134
  - - ">="
@@ -158,8 +138,7 @@ requirements: []
158
138
  rubygems_version: 3.0.3.1
159
139
  signing_key:
160
140
  specification_version: 4
161
- summary: Straight forward way of declaring flutter modules as dependency for targets,
162
- just like cocoapods does with pods.
141
+ summary: Embed flutter modules in iOS projects.
163
142
  test_files:
164
143
  - spec/info_spec.rb
165
144
  - spec/spec_helper.rb