cocoapods-embed-flutter 0.5.0 → 0.5.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 385431ac48133784d4ee45961f3352ad076229c9d8642f83e4991413db2a5203
4
- data.tar.gz: e3082842d2508fa799519692701f48de3dc3129f74b4df82aa4220f64e1d2761
3
+ metadata.gz: 471eb33cb4b395feb321e162537e6f2bc5edd026ce7460842c446fd22f6daecc
4
+ data.tar.gz: 4f12be7ae404447c898e4602cd7ce70191c7e18c55fa62308ccfaf3ffc2b23c0
5
5
  SHA512:
6
- metadata.gz: 9ff10e59c66e053d58b0d24c9f751efdf306aac5da5982ebe2b287870127c29a6a96fb2089d993518cc0a79bee14a4404d67cc0415c673ac73909784fd654b70
7
- data.tar.gz: 0c6040229a99b21a714ea8701cfa330f40101e8449ded6bdceb16acfd26dc846210d7b305f8f154f3591aec015ece56e77d1d8573c219e9e82bae3df4cb6e3a9
6
+ metadata.gz: 70cabc00a991ab2d31a09428bdf14a9f1d6f2a3640065ca56f36ed630ff867228c666767de4300a1dc4d0679b65556beff82bc314728cb468d5432a6e75ab1e2
7
+ data.tar.gz: 1715cc8592d8fe62f4e99314c98c18f2430647a1403a39dea6df732e17248e2a677ceae42f65a2c24f3d179aba86a69b6f72dc6c775fa82e270cf529be20a162
@@ -10,6 +10,11 @@ on:
10
10
  paths-ignore:
11
11
  - '*.md'
12
12
  workflow_dispatch:
13
+ inputs:
14
+ release:
15
+ description: Create release
16
+ required: false
17
+ type: boolean
13
18
 
14
19
  env:
15
20
  RUBY_VER: 2.6
@@ -62,7 +67,7 @@ jobs:
62
67
 
63
68
  cd:
64
69
  name: Build and Publish
65
- if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && needs.ci.outputs.release
70
+ if: (github.event_name == 'push' && needs.ci.outputs.release) || (github.event_name == 'workflow_dispatch' && github.event.inputs.release)
66
71
  needs: ci
67
72
  runs-on: ubuntu-latest
68
73
 
@@ -118,7 +123,7 @@ jobs:
118
123
  gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
119
124
  env:
120
125
  GITHUB_TOKEN: ${{ github.token }}
121
- OWNER: ${{ github.actor }}
126
+ OWNER: ${{ github.repository_owner }}
122
127
 
123
128
  - name: Publish to RubyGems
124
129
  if: steps.conventional_changelog.outputs.skipped == 'false'
@@ -139,7 +144,3 @@ jobs:
139
144
  tag: ${{ steps.conventional_changelog.outputs.tag }}
140
145
  body: ${{ steps.conventional_changelog.outputs.changelog }}
141
146
  artifacts: '*.gem'
142
-
143
- - name: Publish to cocoapods plugins
144
- if: steps.conventional_changelog.outputs.skipped == 'false'
145
- run: bundle exec rake publish
data/CHANGELOG.md CHANGED
@@ -1,4 +1,11 @@
1
- ## 0.5.0 (2022-03-11)
1
+ ### [0.5.1](https://github.com/DartBuild/cocoapods-embed-flutter/compare/v0.5.0...v0.5.1) (2022-03-11)
2
+
3
+
4
+ ### 📚 Documentation
5
+
6
+ * add code documentation ([87c06fd](https://github.com/DartBuild/cocoapods-embed-flutter/commit/87c06fd45d3c63a94cda6ce3ae00a200f412bb2a))
7
+
8
+ ## [0.5.0](https://github.com/DartBuild/cocoapods-embed-flutter/compare/3358c2b251f51154010990b95b7eaa741049d707...v0.5.0) (2022-03-11)
2
9
 
3
10
 
4
11
  ### 🚀 Features
data/Gemfile.lock CHANGED
@@ -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)
@@ -4,6 +4,9 @@ $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
9
12
  spec.authors = ['Soumya Ranjan Mahunt']
@@ -13,7 +16,7 @@ Gem::Specification.new do |spec|
13
16
  Straight forward way of declaring flutter modules as dependency for targets,
14
17
  just like cocoapods does with pods.
15
18
  DESC
16
- spec.homepage = 'https://github.com/DartBuild/cocoapods-embed-flutter'
19
+ spec.homepage = repo_url
17
20
  spec.license = 'MIT'
18
21
 
19
22
  spec.files = `git ls-files`.split($/)
@@ -27,4 +30,11 @@ Gem::Specification.new do |spec|
27
30
 
28
31
  spec.add_development_dependency 'bundler'
29
32
  spec.add_development_dependency 'rake'
33
+
34
+ spec.metadata = {
35
+ 'bug_tracker_uri' => "#{repo_url}/issues",
36
+ 'changelog_uri' => "#{repo_url}/blob/main/CHANGELOG.md",
37
+ 'source_code_uri' => repo_url,
38
+ 'github_repo' => "git@github.com:#{repo}.git"
39
+ }
30
40
  end
@@ -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)
@@ -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.1'.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,7 +1,7 @@
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.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Soumya Ranjan Mahunt
@@ -124,6 +124,7 @@ files:
124
124
  - example/ios_app/ios_app/Preview Content/Preview Assets.xcassets/Contents.json
125
125
  - example/ios_app/ios_app/ios_appApp.swift
126
126
  - lib/cocoapods-embed-flutter.rb
127
+ - lib/cocoapods-embed-flutter/flutter.rb
127
128
  - lib/cocoapods-embed-flutter/flutter/dependency.rb
128
129
  - lib/cocoapods-embed-flutter/flutter/downloader.rb
129
130
  - lib/cocoapods-embed-flutter/flutter/external_sources.rb
@@ -139,7 +140,11 @@ files:
139
140
  homepage: https://github.com/DartBuild/cocoapods-embed-flutter
140
141
  licenses:
141
142
  - MIT
142
- metadata: {}
143
+ metadata:
144
+ bug_tracker_uri: https://github.com/DartBuild/cocoapods-embed-flutter/issues
145
+ changelog_uri: https://github.com/DartBuild/cocoapods-embed-flutter/blob/main/CHANGELOG.md
146
+ source_code_uri: https://github.com/DartBuild/cocoapods-embed-flutter
147
+ github_repo: git@github.com:DartBuild/cocoapods-embed-flutter.git
143
148
  post_install_message:
144
149
  rdoc_options: []
145
150
  require_paths: