cocoapods-whitelist 0.6.1 → 0.6.2

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: 812928b8696a418ab09f34b1a7d000e1e187a444c152e4690642183320f74315
4
- data.tar.gz: 8063489e178f160785276ae775bbc56c65d73735224f2ae35dda6bd616fb10ab
3
+ metadata.gz: df42fb1e1b8742c776a5336ff5318ba66ce67fb9ee04ec082c807d63d088f2b6
4
+ data.tar.gz: '0825a128530b9e58c7b31d3eaa8eb2aba2f74265c5d64d1337a692b18605dfb8'
5
5
  SHA512:
6
- metadata.gz: 73bdf4a550206d09c461f2ee2d6b2183ef300e7ef20b6276234e4ddf66c8e2c3597cb66888ebf39b94b31dd59071a4c323085c5704b16dab7165c725d7296add
7
- data.tar.gz: be0a53e0a77f39958b0508cfeb41f92b85925843ba8e1d035163cea1ff16e7ea063d2abf800048e835fcd17d43aa8302b01922b97dfe3a6ca550e0d038c21873
6
+ metadata.gz: 203e55f2c36736bd6132c7c162fb06eb4f7d50578f8bd117f0bf3f9720b6b32d691204067397c89ffdb551006241495ce2cf9c54179843a9b710f5115b478be0
7
+ data.tar.gz: cbbec5f56649f7b3a540f56ffc04d9bb9180055b868782615aee0022ef6ad3d6df2d16a003d0f4f0fe747483b3728845d961e9a76153d9f717d3aaf46f2d05ba
data/.gitignore CHANGED
@@ -1,2 +1,3 @@
1
1
  .DS_Store
2
2
  pkg
3
+ *.gem
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-whitelist (0.6.0)
4
+ cocoapods-whitelist (0.6.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -38,9 +38,9 @@ rake
38
38
  ### Publish in RubyGems
39
39
  1. Build
40
40
  ```
41
- gem build cocoapods-allowlist.gemspec
41
+ gem build cocoapods-whitelist.gemspec
42
42
  ```
43
43
  2. Publish
44
44
  ```
45
- gem push cocoapods-allowlist-{version}.gem
46
- ```
45
+ gem push cocoapods-whitelist-{version}.gem
46
+ ```
@@ -51,7 +51,7 @@ class AllowlistResolver
51
51
  status = e.io.status.join(' ')
52
52
  raise "Failed to fetch allowlist from '#{@allowlist_url}'.\n Error: #{status}"
53
53
  rescue => e
54
- raise "Failed to load allowlist: #{e.message}"
54
+ raise e
55
55
  ensure
56
56
  cleanup
57
57
  end
@@ -74,8 +74,7 @@ class AllowlistResolver
74
74
  private
75
75
 
76
76
  def create_temp_directory
77
- @allowlist_directory ||= File.join(Dir.tmpdir, "allowlist")
78
- FileUtils.mkdir_p(@allowlist_directory) unless File.exist?(@allowlist_directory)
77
+ @allowlist_directory ||= Dir.mktmpdir('allowlist-')
79
78
  end
80
79
 
81
80
  def cleanup
@@ -1,3 +1,3 @@
1
1
  module CocoapodsAllowlist
2
- VERSION = "0.6.1"
2
+ VERSION = "0.6.2"
3
3
  end
@@ -4,13 +4,14 @@ require_relative '../utils/command'
4
4
  class GitHelper
5
5
  # Download from a specific branch
6
6
  def self.clone_from_branch(url, destination, branch)
7
- Command.execute("git clone --quiet --depth 1 -b #{branch} --single-branch #{url} #{destination}")
7
+ _stdout, stderr, status = Allowlist::Command.execute("git clone --quiet --depth 1 -b #{branch} --single-branch #{url} #{destination}")
8
+ raise "git clone failed (exit #{status.exitstatus}): #{stderr.strip}" unless status.success?
8
9
  end
9
10
 
10
11
  # Get the latest commit hash
11
12
  def self.get_latest_commit(directory)
12
13
  Dir.chdir(directory) do
13
- Command.execute("git rev-parse HEAD").strip
14
+ Allowlist::Command.execute("git rev-parse HEAD").strip
14
15
  end
15
16
  end
16
17
  end
@@ -1,10 +1,11 @@
1
1
  require 'open3'
2
2
 
3
- class Command
4
-
5
- # This method is for execute commands in terminal
6
- def self.execute(command)
7
- Open3.capture3(command)
3
+ module Allowlist
4
+ class Command
5
+ # This method is for execute commands in terminal
6
+ def self.execute(command)
7
+ ssh_mux = 'ssh -o ControlMaster=auto -o ControlPath=~/.ssh/meli-mux-%C -o ControlPersist=60'
8
+ Open3.capture3({'GIT_SSH_COMMAND' => ssh_mux}, command)
9
+ end
8
10
  end
9
-
10
11
  end
data/spec/spec_helper.rb CHANGED
@@ -16,6 +16,25 @@ require 'cocoapods_plugin'
16
16
 
17
17
  #-----------------------------------------------------------------------------#
18
18
 
19
+ # Make specs hermetic: replace GitHelper.clone_from_branch so it never
20
+ # hits the network. Tests pass either a local mock JSON path or a remote
21
+ # URL as `url`; in both cases we serve the bundled mock allowlist from
22
+ # `spec/mocks/allowlist.json` at the expected destination.
23
+ require 'fileutils'
24
+ require 'cocoapods-allowlist/helpers/git'
25
+
26
+ class GitHelper
27
+ MOCK_ALLOWLIST_PATH = File.join(ROOT, 'spec', 'mocks', 'allowlist.json').freeze
28
+
29
+ def self.clone_from_branch(url, destination, branch)
30
+ source = File.file?(url) ? url : MOCK_ALLOWLIST_PATH
31
+ FileUtils.mkdir_p(destination)
32
+ FileUtils.cp(source, File.join(destination, 'ios-allowlist.json'))
33
+ end
34
+ end
35
+
36
+ #-----------------------------------------------------------------------------#
37
+
19
38
  module Pod
20
39
 
21
40
  # Disable the wrapping so the output is deterministic in the tests.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-whitelist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mobile Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-12-17 00:00:00.000000000 Z
11
+ date: 2026-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler