cocoapods-lockfile 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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8f71e1cbf4688de927e919dfac9301a569da7721174f8be71cf9db7c3ba87d55
4
+ data.tar.gz: '01308f8aa6f426d36f0f20c408fdc9f97c1e2ada4b19f59f7ee72fd64c2f4e1b'
5
+ SHA512:
6
+ metadata.gz: e43a7aca39442d3eaaf1954013f46dc5cf6fa2a69d5b6893133f8f719ae02dcd3e7f3a219e0bc2bc3b7718920a41837b53ab204182ecce5a69e3c3c3a059cef9
7
+ data.tar.gz: fef2da103c9514d95fcf8d918a085313c1e0e7e12e977f9ead9b28b4e41de2a75e0399511a8f6d286a49b1ceb765b6f6a0c6b19027623e15879d7f61ecdb79d7
data/.gitignore ADDED
@@ -0,0 +1,6 @@
1
+ .DS_Store
2
+ pkg
3
+ .idea/
4
+ Pods/
5
+ Podfile.lock
6
+ *.gem
data/Gemfile ADDED
@@ -0,0 +1,13 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in cocoapods-lockfile.gemspec
4
+ gemspec
5
+
6
+ group :development do
7
+ gem 'cocoapods'
8
+
9
+ gem 'mocha'
10
+ gem 'bacon'
11
+ gem 'mocha-on-bacon'
12
+ gem 'prettybacon'
13
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,117 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ cocoapods-lockfile (0.1.0)
5
+ cocoapods (~> 1.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ CFPropertyList (3.0.5)
11
+ rexml
12
+ activesupport (6.1.7)
13
+ concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ i18n (>= 1.6, < 2)
15
+ minitest (>= 5.1)
16
+ tzinfo (~> 2.0)
17
+ zeitwerk (~> 2.3)
18
+ addressable (2.8.1)
19
+ public_suffix (>= 2.0.2, < 6.0)
20
+ algoliasearch (1.27.5)
21
+ httpclient (~> 2.8, >= 2.8.3)
22
+ json (>= 1.5.1)
23
+ atomos (0.1.3)
24
+ bacon (1.2.0)
25
+ claide (1.1.0)
26
+ cocoapods (1.11.3)
27
+ addressable (~> 2.8)
28
+ claide (>= 1.0.2, < 2.0)
29
+ cocoapods-core (= 1.11.3)
30
+ cocoapods-deintegrate (>= 1.0.3, < 2.0)
31
+ cocoapods-downloader (>= 1.4.0, < 2.0)
32
+ cocoapods-plugins (>= 1.0.0, < 2.0)
33
+ cocoapods-search (>= 1.0.0, < 2.0)
34
+ cocoapods-trunk (>= 1.4.0, < 2.0)
35
+ cocoapods-try (>= 1.1.0, < 2.0)
36
+ colored2 (~> 3.1)
37
+ escape (~> 0.0.4)
38
+ fourflusher (>= 2.3.0, < 3.0)
39
+ gh_inspector (~> 1.0)
40
+ molinillo (~> 0.8.0)
41
+ nap (~> 1.0)
42
+ ruby-macho (>= 1.0, < 3.0)
43
+ xcodeproj (>= 1.21.0, < 2.0)
44
+ cocoapods-core (1.11.3)
45
+ activesupport (>= 5.0, < 7)
46
+ addressable (~> 2.8)
47
+ algoliasearch (~> 1.0)
48
+ concurrent-ruby (~> 1.1)
49
+ fuzzy_match (~> 2.0.4)
50
+ nap (~> 1.0)
51
+ netrc (~> 0.11)
52
+ public_suffix (~> 4.0)
53
+ typhoeus (~> 1.0)
54
+ cocoapods-deintegrate (1.0.5)
55
+ cocoapods-downloader (1.6.3)
56
+ cocoapods-plugins (1.0.0)
57
+ nap
58
+ cocoapods-search (1.0.1)
59
+ cocoapods-trunk (1.6.0)
60
+ nap (>= 0.8, < 2.0)
61
+ netrc (~> 0.11)
62
+ cocoapods-try (1.2.0)
63
+ colored2 (3.1.2)
64
+ concurrent-ruby (1.1.10)
65
+ escape (0.0.4)
66
+ ethon (0.15.0)
67
+ ffi (>= 1.15.0)
68
+ ffi (1.15.5)
69
+ fourflusher (2.3.1)
70
+ fuzzy_match (2.0.4)
71
+ gh_inspector (1.1.3)
72
+ httpclient (2.8.3)
73
+ i18n (1.12.0)
74
+ concurrent-ruby (~> 1.0)
75
+ json (2.6.2)
76
+ minitest (5.16.3)
77
+ mocha (1.16.0)
78
+ mocha-on-bacon (0.2.3)
79
+ mocha (>= 0.13.0)
80
+ molinillo (0.8.0)
81
+ nanaimo (0.3.0)
82
+ nap (1.1.0)
83
+ netrc (0.11.0)
84
+ prettybacon (0.0.2)
85
+ bacon (~> 1.2)
86
+ public_suffix (4.0.7)
87
+ rake (13.0.6)
88
+ rexml (3.2.5)
89
+ ruby-macho (2.5.1)
90
+ typhoeus (1.4.0)
91
+ ethon (>= 0.9.0)
92
+ tzinfo (2.0.5)
93
+ concurrent-ruby (~> 1.0)
94
+ xcodeproj (1.22.0)
95
+ CFPropertyList (>= 2.3.3, < 4.0)
96
+ atomos (~> 0.1.3)
97
+ claide (>= 1.0.2, < 2.0)
98
+ colored2 (~> 3.1)
99
+ nanaimo (~> 0.3.0)
100
+ rexml (~> 3.2.4)
101
+ zeitwerk (2.6.1)
102
+
103
+ PLATFORMS
104
+ ruby
105
+
106
+ DEPENDENCIES
107
+ bacon
108
+ bundler (~> 1.3)
109
+ cocoapods
110
+ cocoapods-lockfile!
111
+ mocha
112
+ mocha-on-bacon
113
+ prettybacon
114
+ rake (~> 13.0)
115
+
116
+ BUNDLED WITH
117
+ 1.17.2
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2022 Israel Soto <israel.spgh@gmail.com>
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,15 @@
1
+ # cocoapods-lockfile
2
+
3
+ The cocoapods-lockfile is a Cocoapods plugin that works with the `install` and `update` commands to generate the **Podfile.lock** file without the need to download the Pods files.
4
+
5
+ ## Installation
6
+
7
+ $ gem install cocoapods-lockfile
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ $ pod install --lockfile-only
13
+ # or
14
+ $ pod update --lockfile-only
15
+ ```
data/Rakefile ADDED
@@ -0,0 +1,13 @@
1
+ require 'bundler/gem_tasks'
2
+
3
+ def specs(dir)
4
+ FileList["spec/#{dir}/*_spec.rb"].shuffle.join(' ')
5
+ end
6
+
7
+ desc 'Runs all the specs'
8
+ task :specs do
9
+ sh "bundle exec bacon #{specs('**')}"
10
+ end
11
+
12
+ task :default => :specs
13
+
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'cocoapods-lockfile/version.rb'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = CocoapodsLockfile::NAME
8
+ spec.version = CocoapodsLockfile::VERSION
9
+ spec.authors = ['Israel Soto']
10
+ spec.email = ['israel.spgh@gmail.com']
11
+ spec.summary = %q{A Cocoapods plugin that generates the Podfile.lock file without the need to download the Pods files.}
12
+ spec.homepage = 'https://github.com/SotoiGhost/cocoapods-lockfile'
13
+ spec.license = 'MIT'
14
+
15
+ spec.files = `git ls-files`.split($/)
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ['lib']
19
+
20
+ spec.required_ruby_version = ">= 2.0"
21
+
22
+ spec.add_runtime_dependency 'cocoapods', '~> 1.0'
23
+
24
+ spec.add_development_dependency 'bundler', '~> 1.3'
25
+ spec.add_development_dependency 'rake', '~> 13.0'
26
+ end
@@ -0,0 +1,45 @@
1
+ require "cocoapods-lockfile/version"
2
+
3
+ module Pod
4
+ class Command
5
+ # This is an example of a cocoapods plugin adding a top-level subcommand
6
+ # to the 'pod' command.
7
+ #
8
+ # You can also create subcommands of existing or new commands. Say you
9
+ # wanted to add a subcommand to `list` to show newly deprecated pods,
10
+ # (e.g. `pod list deprecated`), there are a few things that would need
11
+ # to change.
12
+ #
13
+ # - move this file to `lib/pod/command/list/deprecated.rb` and update
14
+ # the class to exist in the the Pod::Command::List namespace
15
+ # - change this class to extend from `List` instead of `Command`. This
16
+ # tells the plugin system that it is a subcommand of `list`.
17
+ # - edit `lib/cocoapods_plugins.rb` to require this file
18
+ #
19
+ # @todo Create a PR to add your plugin to CocoaPods/cocoapods.org
20
+ # in the `plugins.json` file, once your plugin is released.
21
+ #
22
+ class Install < Command
23
+ self.singleton_class.send(:alias_method, :original_options, :options)
24
+ alias_method :original_initialize, :initialize
25
+ alias_method :original_installer_for_config, :installer_for_config
26
+
27
+ def self.options
28
+ [
29
+ ["--#{CocoapodsLockfile::FLAG_NAME}", "#{CocoapodsLockfile::FLAG_DESCRIPTION}"]
30
+ ].concat(self.original_options)
31
+ end
32
+
33
+ def initialize(argv)
34
+ original_initialize(argv)
35
+ @generate_lockfile_only = argv.flag?("#{CocoapodsLockfile::FLAG_NAME}", false)
36
+ end
37
+
38
+ def installer_for_config
39
+ installer = original_installer_for_config
40
+ installer.generate_lockfile_only = @generate_lockfile_only
41
+ installer
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,45 @@
1
+ require "cocoapods-lockfile/version"
2
+
3
+ module Pod
4
+ class Command
5
+ # This is an example of a cocoapods plugin adding a top-level subcommand
6
+ # to the 'pod' command.
7
+ #
8
+ # You can also create subcommands of existing or new commands. Say you
9
+ # wanted to add a subcommand to `list` to show newly deprecated pods,
10
+ # (e.g. `pod list deprecated`), there are a few things that would need
11
+ # to change.
12
+ #
13
+ # - move this file to `lib/pod/command/list/deprecated.rb` and update
14
+ # the class to exist in the the Pod::Command::List namespace
15
+ # - change this class to extend from `List` instead of `Command`. This
16
+ # tells the plugin system that it is a subcommand of `list`.
17
+ # - edit `lib/cocoapods_plugins.rb` to require this file
18
+ #
19
+ # @todo Create a PR to add your plugin to CocoaPods/cocoapods.org
20
+ # in the `plugins.json` file, once your plugin is released.
21
+ #
22
+ class Update < Command
23
+ self.singleton_class.send(:alias_method, :original_options, :options)
24
+ alias_method :original_initialize, :initialize
25
+ alias_method :original_installer_for_config, :installer_for_config
26
+
27
+ def self.options
28
+ [
29
+ ["--#{CocoapodsLockfile::FLAG_NAME}", "#{CocoapodsLockfile::FLAG_DESCRIPTION}"]
30
+ ].concat(self.original_options)
31
+ end
32
+
33
+ def initialize(argv)
34
+ original_initialize(argv)
35
+ @generate_lockfile_only = argv.flag?("#{CocoapodsLockfile::FLAG_NAME}", false)
36
+ end
37
+
38
+ def installer_for_config
39
+ installer = original_installer_for_config
40
+ installer.generate_lockfile_only = @generate_lockfile_only
41
+ installer
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,2 @@
1
+ require 'cocoapods-lockfile/command/patched_install'
2
+ require 'cocoapods-lockfile/command/patched_update'
@@ -0,0 +1,6 @@
1
+ module CocoapodsLockfile
2
+ NAME = "cocoapods-lockfile"
3
+ VERSION = "0.1.0"
4
+ FLAG_NAME = "lockfile-only"
5
+ FLAG_DESCRIPTION = "Avoid the download of the pods and generate the Podfile.lock file"
6
+ end
@@ -0,0 +1 @@
1
+ require 'cocoapods-lockfile/gem_version'
@@ -0,0 +1,23 @@
1
+ require 'cocoapods-lockfile/command'
2
+ require 'cocoapods-lockfile/version'
3
+
4
+ module Pod
5
+ class Installer
6
+ attr_accessor :generate_lockfile_only
7
+ alias_method :generate_lockfile_only?, :generate_lockfile_only
8
+
9
+ alias_method :original_install!, :install!
10
+
11
+ def install!
12
+ if generate_lockfile_only?
13
+ UI.section "Skipping the download of the dependencies due to --#{CocoapodsLockfile::FLAG_NAME} was passed".yellow
14
+ prepare
15
+ resolve_dependencies
16
+ write_lockfiles
17
+ return
18
+ end
19
+
20
+ original_install!
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,60 @@
1
+ require File.expand_path('../../spec_helper', __FILE__)
2
+ require 'cocoapods-lockfile/version.rb'
3
+
4
+ module Pod
5
+ SPEC_PATH = "spec/pod_test"
6
+
7
+ describe Command::Install do
8
+ describe "CLAide" do
9
+ it "is still an Install" do
10
+ Command.parse(%w{ install }).should.be.instance_of Command::Install
11
+ end
12
+ end
13
+
14
+ describe "Test --#{CocoapodsLockfile::FLAG_NAME} flag" do
15
+
16
+ before do
17
+ require "fileutils"
18
+ FileUtils.rm_f("#{SPEC_PATH}/Podfile.lock")
19
+ FileUtils.rm_rf("#{SPEC_PATH}/Pods")
20
+ @install_command = Command.parse(%W{ install --project-directory=#{SPEC_PATH} --#{CocoapodsLockfile::FLAG_NAME} })
21
+ end
22
+
23
+ it "verifies that the flag is enabled" do
24
+ @install_command.installer_for_config.generate_lockfile_only?.should.be.true
25
+ end
26
+
27
+ it "skips the pods download" do
28
+ @install_command.run
29
+ Dir.empty?("#{SPEC_PATH}/Pods/Headers").should.be.true
30
+ end
31
+ end
32
+ end
33
+
34
+ describe Command::Update do
35
+ describe "CLAide" do
36
+ it "is still an Update" do
37
+ Command.parse(%w{ update }).should.be.instance_of Command::Update
38
+ end
39
+ end
40
+
41
+ describe "Test --#{CocoapodsLockfile::FLAG_NAME} flag" do
42
+
43
+ before do
44
+ require "fileutils"
45
+ FileUtils.rm_f("#{SPEC_PATH}/Podfile.lock")
46
+ FileUtils.rm_rf("#{SPEC_PATH}/Pods")
47
+ @update_command = Command.parse(%W{ update --project-directory=#{SPEC_PATH} --#{CocoapodsLockfile::FLAG_NAME} --no-repo-update })
48
+ end
49
+
50
+ it "verifies that the flag is enabled" do
51
+ @update_command.installer_for_config.generate_lockfile_only?.should.be.true
52
+ end
53
+
54
+ it "skips the pods download" do
55
+ @update_command.run
56
+ Dir.empty?("#{SPEC_PATH}/Pods/Headers").should.be.true
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,7 @@
1
+ install! 'cocoapods', :integrate_targets => false
2
+ use_frameworks!
3
+
4
+ target 'XamarinGoogle_iOS' do
5
+ platform :ios, '12.0'
6
+ pod 'FBSDKCoreKit', '15.0.0'
7
+ end
@@ -0,0 +1,50 @@
1
+ require 'pathname'
2
+ ROOT = Pathname.new(File.expand_path('../../', __FILE__))
3
+ $:.unshift((ROOT + 'lib').to_s)
4
+ $:.unshift((ROOT + 'spec').to_s)
5
+
6
+ require 'bundler/setup'
7
+ require 'bacon'
8
+ require 'mocha-on-bacon'
9
+ require 'pretty_bacon'
10
+ require 'pathname'
11
+ require 'cocoapods'
12
+
13
+ Mocha::Configuration.prevent(:stubbing_non_existent_method)
14
+
15
+ require 'cocoapods_plugin'
16
+
17
+ #-----------------------------------------------------------------------------#
18
+
19
+ module Pod
20
+
21
+ # Disable the wrapping so the output is deterministic in the tests.
22
+ #
23
+ UI.disable_wrap = true
24
+
25
+ # Redirects the messages to an internal store.
26
+ #
27
+ module UI
28
+ @output = ''
29
+ @warnings = ''
30
+
31
+ class << self
32
+ attr_accessor :output
33
+ attr_accessor :warnings
34
+
35
+ def puts(message = '')
36
+ @output << "#{message}\n"
37
+ end
38
+
39
+ def warn(message = '', actions = [])
40
+ @warnings << "#{message}\n"
41
+ end
42
+
43
+ def print(message)
44
+ @output << message
45
+ end
46
+ end
47
+ end
48
+ end
49
+
50
+ #-----------------------------------------------------------------------------#
metadata ADDED
@@ -0,0 +1,105 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cocoapods-lockfile
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Israel Soto
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-10-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: cocoapods
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.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: '1.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.3'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '13.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '13.0'
55
+ description:
56
+ email:
57
+ - israel.spgh@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - Gemfile
64
+ - Gemfile.lock
65
+ - LICENSE.txt
66
+ - README.md
67
+ - Rakefile
68
+ - cocoapods-lockfile.gemspec
69
+ - lib/cocoapods-lockfile.rb
70
+ - lib/cocoapods-lockfile/command.rb
71
+ - lib/cocoapods-lockfile/command/patched_install.rb
72
+ - lib/cocoapods-lockfile/command/patched_update.rb
73
+ - lib/cocoapods-lockfile/version.rb
74
+ - lib/cocoapods_plugin.rb
75
+ - spec/command/lockfile_spec.rb
76
+ - spec/pod_test/Podfile
77
+ - spec/spec_helper.rb
78
+ homepage: https://github.com/SotoiGhost/cocoapods-lockfile
79
+ licenses:
80
+ - MIT
81
+ metadata: {}
82
+ post_install_message:
83
+ rdoc_options: []
84
+ require_paths:
85
+ - lib
86
+ required_ruby_version: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '2.0'
91
+ required_rubygems_version: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ requirements: []
97
+ rubygems_version: 3.0.3.1
98
+ signing_key:
99
+ specification_version: 4
100
+ summary: A Cocoapods plugin that generates the Podfile.lock file without the need
101
+ to download the Pods files.
102
+ test_files:
103
+ - spec/command/lockfile_spec.rb
104
+ - spec/pod_test/Podfile
105
+ - spec/spec_helper.rb