podrpt 1.0.2 → 2.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae1f6086149bbe23d778fd9e9ea91efc5bc7b06f8d59b79d0e79f082bd7acb84
4
- data.tar.gz: 1aa791ecf1d1b95f04be09ca1fd5ed075f8e22e731d9a5a41b3bc9902685f179
3
+ metadata.gz: 7a08405047738c51c8a479b472d837704e9ce682c637bf6bdb554afea457908b
4
+ data.tar.gz: cc193339430b9bd34836908e548eb84ac5388de8d72638b571624358fddc8109
5
5
  SHA512:
6
- metadata.gz: afbebced78bb8a84f55dd88c34a865a2103d1db1278d6d296a8403d788569c05b51123d130ed808af7be47a70f622b7973c6e6840d519f42966e1fd25b501b6f
7
- data.tar.gz: b1e194be0f0859a264e208d943965a572b82f825ad3fba9e68bcbd4b32a0486b40173498e6e62071a379bb3311843ac4998f47a0e6d7cfd24fc17da7d4f492ae
6
+ metadata.gz: ceb0f61dd383f7b5ee0e9c05c7980d35d7491735e8fe9f1b2e22e87637d7a375ad868179ab4a63d3478ff2b8d0ad1d2695337a75585bfdd94438806f72af8d0b
7
+ data.tar.gz: aa0c27ddde2cec7ab9f1d82716eca6fe85862734766282a70d859b55ca891e1c903d5519575407dd78c30f00f30966fd58f0fbffbbfc08717199794b3d5cc34b
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- ## [Unreleased]
1
+ ## [Released]
2
+
3
+ ## [2.0.0] - 2025-11-06
4
+
5
+ - remove unnecessary code
2
6
 
3
7
  ## [1.0.2] - 2025-09-28
4
8
 
data/README.md CHANGED
@@ -1,27 +1,44 @@
1
- # Podrpt
1
+ <div align="center">
2
+ <h1>Podrpt</h1>
3
+ <p><strong>A CLI tool 💎 for analyzing and reporting outdated CocoaPods dependencies directly to Slack.</strong></p>
4
+
5
+ <p>
6
+ <a href="https://rubygems.org/gems/podrpt"><img src="https://img.shields.io/gem/v/podrpt.svg?style=flat-square" alt="Gem Version"/></a>
7
+ </p>
8
+ </div>
2
9
 
3
- Podrpt is a command-line tool written in Ruby to analyze and report outdated CocoaPods dependencies in iOS projects. It's designed to be fast, flexible, and CI/CD-friendly, providing clear, actionable reports directly to Slack.
10
+ **Podrpt** is a command-line tool written in Ruby, focused on speed and automation. It parses your `Podfile.lock`, identifies outdated pods, and sends a clear, actionable report to Slack, making it perfect for Continuous Integration (CI/CD) pipelines.
4
11
 
5
- It leverages the native CocoaPods API for high-performance analysis, avoiding slow external process calls for version fetching.
12
+ ## Table of Contents
6
13
 
7
- **Features**
8
- - **Fast Analysis**: Uses the native CocoaPods gem API instead of shelling out to pod search.
14
+ - [✨ Key Features](#-key-features)
15
+ - [🚀 Getting Started](#-getting-started)
16
+ - [1. Installation](#1-installation)
17
+ - [2. Initial Setup](#2-initial-setup)
18
+ - [3. Usage](#3-usage)
19
+ - [📜 License](#-license)
20
+ - [⚖️ Code of Conduct](#️-code-of-conduct)
9
21
 
10
- - **Outdated Pod Detection**: Compares versions in your **Podfile.lock** against the latest public releases.
22
+ ---
11
23
 
12
- - **Risk Assessment**: Assign custom risk scores and owner teams to dependencies via a PodsRisk.yaml file.
24
+ ## Key Features
13
25
 
14
- - **Dependency Filtering**: Use an PodsAllowlist.yaml file to filter out transitive dependencies and focus only on the pods you directly manage.
26
+ * 🚀 **Fast Analysis**: Uses the native CocoaPods API for superior performance, avoiding slow shell-out commands.
27
+ * 📊 **Slack Reports**: Sends cleanly formatted notifications directly to a Slack channel, ideal for CI/CD pipelines.
28
+ * ⚠️ **Risk Assessment**: Assign custom risk scores and owner teams to each dependency via a `PodsRisk.yaml` file.
29
+ * 🎯 **Dependency Filtering**: Ignore transitive dependencies and focus only on the pods you directly manage with a `PodsAllowlist.yaml`.
30
+ * ⚙️ **Interactive Setup**: A simple `init` command generates all the necessary configuration files to get you started.
31
+ * 🤖 **CI/CD Focused**: Designed to run in automated environments without leaving behind unnecessary file artifacts.
15
32
 
16
- - **Slack Notifications**: Delivers a clean, formatted report directly to a Slack channel, perfect for CI/CD pipelines.
33
+ ---
17
34
 
18
- - **CI/CD Focused**: Designed to run in automated environments without leaving behind unnecessary file artifacts.
35
+ ## 🚀 Getting Started
19
36
 
20
- - Interactive Setup: A simple init command to generate all necessary configuration files.-
37
+ Follow the three steps below to set up and run Podrpt in your project.
21
38
 
22
- ## Installation
39
+ ### 1. Installation
23
40
 
24
- Add this line to your application's Gemfile:
41
+ Add the gem to your project's `Gemfile`:
25
42
  ```ruby
26
43
  gem 'podrpt', '~> 1.0.0'
27
44
  ```
@@ -53,6 +70,7 @@ pods:
53
70
  ```
54
71
 
55
72
  2 Create a sample **PodsAllowlist.yaml** file for filtering dependencies.
73
+
56
74
  3 Prompt you for your Slack Incoming Webhook URL and save it securely in a .podrpt.yml file (which should be added to your .gitignore).
57
75
 
58
76
  After running init, customize the generated .yaml files to fit your project's needs.
@@ -73,10 +91,10 @@ bundle exec podrpt run --dry-run
73
91
 
74
92
  The report will only include outdated pods by default.
75
93
 
76
- ## License
94
+ ## 📜 License
77
95
 
78
96
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
79
97
 
80
- ## Code of Conduct
98
+ ## ⚖️ Code of Conduct
81
99
 
82
100
  Everyone interacting in the Podrpt project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/podrpt/blob/master/CODE_OF_CONDUCT.md).
data/lib/podrpt/cli.rb CHANGED
@@ -28,12 +28,10 @@ module Podrpt
28
28
  if File.exist?(lockfile_path)
29
29
  puts "📄 `Podfile.lock` encontrado. Analisando pods para pré-popular os arquivos..."
30
30
  begin
31
- # Analisa o lockfile para obter a lista completa de pods externos
32
31
  analyzer = Podrpt::LockfileAnalyzer.new(project_dir)
33
32
  all_pods_versions = analyzer.pod_versions
34
33
  classified_pods = analyzer.classify_pods
35
34
 
36
- # Filtramos apenas para pods que não são de desenvolvimento local
37
35
  external_pods_filter = classified_pods[:spec_repo].dup
38
36
  external_pods_filter -= classified_pods[:dev_path]
39
37
 
@@ -47,18 +45,12 @@ module Podrpt
47
45
  puts "⚠️ `Podfile.lock` não encontrado. Os arquivos serão criados com exemplos."
48
46
  end
49
47
 
50
- # Cria os arquivos de configuração, passando a lista de pods encontrados
51
48
  Podrpt::Configuration.create_allowlist_file(pod_names: pod_names_to_configure)
52
49
  Podrpt::Configuration.create_risk_file(pod_names: pod_names_to_configure)
53
50
 
54
- puts "\nAgora, por favor, informe a URL do seu Incoming Webhook do Slack:"
55
- print "> "
56
- url = $stdin.gets.chomp
57
- Podrpt::Configuration.save_slack_url(url)
58
51
  puts "\nConfiguração concluída! Edite os arquivos .yaml conforme necessário e execute 'podrpt run'."
59
52
  end
60
53
 
61
- # O método `run_reporter` e seus auxiliares permanecem os mesmos da última versão funcional
62
54
  def self.run_reporter(args)
63
55
  options = parse_run_options(args)
64
56
  analyzer = Podrpt::LockfileAnalyzer.new(options.project_dir)
@@ -94,8 +86,6 @@ module Podrpt
94
86
 
95
87
  reporter = Podrpt::ReportGenerator.new(final_analysis, options)
96
88
  report_text = reporter.build_report_text
97
-
98
- Podrpt::SlackNotifier.notify(options.slack_webhook_url, report_text, dry_run: options.dry_run)
99
89
  end
100
90
 
101
91
  def self.parse_run_options(args)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Podrpt
4
- VERSION = "1.0.2"
4
+ VERSION = "2.0.0"
5
5
  end
data/podrpt-1.0.2.gem ADDED
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: podrpt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Alves
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-09-28 00:00:00.000000000 Z
11
+ date: 2025-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods
@@ -88,10 +88,10 @@ files:
88
88
  - lib/podrpt/lockfile_analyzer.rb
89
89
  - lib/podrpt/models.rb
90
90
  - lib/podrpt/report_generator.rb
91
- - lib/podrpt/slack_notifier.rb
92
91
  - lib/podrpt/version.rb
93
92
  - lib/podrpt/version_comparer.rb
94
93
  - lib/podrpt/version_fetcher.rb
94
+ - podrpt-1.0.2.gem
95
95
  - sig/podrpt.rbs
96
96
  homepage: https://github.com/swiftdrew/podrpt
97
97
  licenses:
@@ -1,39 +0,0 @@
1
- # lib/podrpt/slack_notifier.rb
2
-
3
- module Podrpt
4
- class SlackNotifier
5
- def self.notify(webhook_url, report_text, dry_run: false)
6
- if dry_run
7
- puts "\n--- SLACK NOTIFICATION DRY RUN ---"
8
- puts "Target URL: #{webhook_url || 'Nenhuma URL fornecida'}"
9
- puts "--- Payload ---"
10
- puts report_text
11
- puts "----------------------------------"
12
- puts "Dry run completed. No notification was sent."
13
- return
14
- end
15
-
16
- unless webhook_url && !webhook_url.empty?
17
- puts "ERRO: Slack URL not provided. Logging out."
18
- exit 1
19
- end
20
-
21
- puts "Sending report to Slack..."
22
- headers = { 'Content-Type' => 'application/json' }
23
- payload = { text: "```\n#{report_text}\n```" }.to_json
24
-
25
- begin
26
- response = HTTParty.post(webhook_url, body: payload, headers: headers)
27
- if response.success?
28
- puts "Report sent successfully!"
29
- else
30
- puts "ERROR sending to Slack. Status: #{response.code}, Response: #{response.body}"
31
- exit 1
32
- end
33
- rescue => e
34
- puts "Connection ERROR when sending to Slack: #{e.message}"
35
- exit 1
36
- end
37
- end
38
- end
39
- end