diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 00000000..a4dd9dba --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.7.4 diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000..3435d870 --- /dev/null +++ b/Gemfile @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +source 'https://rubygems.org' + +gem 'cocoapods', '~> 1.12' \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 00000000..d2bb7908 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,95 @@ +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (3.0.6) + rexml + activesupport (7.0.5) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + addressable (2.8.4) + public_suffix (>= 2.0.2, < 6.0) + algoliasearch (1.27.5) + httpclient (~> 2.8, >= 2.8.3) + json (>= 1.5.1) + atomos (0.1.3) + claide (1.1.0) + cocoapods (1.12.1) + addressable (~> 2.8) + claide (>= 1.0.2, < 2.0) + cocoapods-core (= 1.12.1) + cocoapods-deintegrate (>= 1.0.3, < 2.0) + cocoapods-downloader (>= 1.6.0, < 2.0) + cocoapods-plugins (>= 1.0.0, < 2.0) + cocoapods-search (>= 1.0.0, < 2.0) + cocoapods-trunk (>= 1.6.0, < 2.0) + cocoapods-try (>= 1.1.0, < 2.0) + colored2 (~> 3.1) + escape (~> 0.0.4) + fourflusher (>= 2.3.0, < 3.0) + gh_inspector (~> 1.0) + molinillo (~> 0.8.0) + nap (~> 1.0) + ruby-macho (>= 2.3.0, < 3.0) + xcodeproj (>= 1.21.0, < 2.0) + cocoapods-core (1.12.1) + activesupport (>= 5.0, < 8) + addressable (~> 2.8) + algoliasearch (~> 1.0) + concurrent-ruby (~> 1.1) + fuzzy_match (~> 2.0.4) + nap (~> 1.0) + netrc (~> 0.11) + public_suffix (~> 4.0) + typhoeus (~> 1.0) + cocoapods-deintegrate (1.0.5) + cocoapods-downloader (1.6.3) + cocoapods-plugins (1.0.0) + nap + cocoapods-search (1.0.1) + cocoapods-trunk (1.6.0) + nap (>= 0.8, < 2.0) + netrc (~> 0.11) + cocoapods-try (1.2.0) + colored2 (3.1.2) + concurrent-ruby (1.2.2) + escape (0.0.4) + ethon (0.16.0) + ffi (>= 1.15.0) + ffi (1.15.5) + fourflusher (2.3.1) + fuzzy_match (2.0.4) + gh_inspector (1.1.3) + httpclient (2.8.3) + i18n (1.14.1) + concurrent-ruby (~> 1.0) + json (2.6.3) + minitest (5.18.0) + molinillo (0.8.0) + nanaimo (0.3.0) + nap (1.1.0) + netrc (0.11.0) + public_suffix (4.0.7) + rexml (3.2.5) + ruby-macho (2.5.1) + typhoeus (1.4.0) + ethon (>= 0.9.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + xcodeproj (1.22.0) + CFPropertyList (>= 2.3.3, < 4.0) + atomos (~> 0.1.3) + claide (>= 1.0.2, < 2.0) + colored2 (~> 3.1) + nanaimo (~> 0.3.0) + rexml (~> 3.2.4) + +PLATFORMS + arm64-darwin-22 + +DEPENDENCIES + cocoapods (~> 1.12) + +BUNDLED WITH + 2.3.23 diff --git a/PulseCore.podspec b/PulseCore.podspec new file mode 100644 index 00000000..2c4f3bf5 --- /dev/null +++ b/PulseCore.podspec @@ -0,0 +1,23 @@ +Pod::Spec.new do |s| + +s.name = "PulseCore" +s.module_name = "Pulse" +s.version = "3.7.3" +s.summary = "Logging system for Apple platforms" +s.swift_version = "5.6" + +s.description = <<-DESC +Pulse is a powerful logging system for Apple Platforms. Native. Built with SwiftUI. +DESC + +s.homepage = "https://github.com/kean/Pulse" +s.license = "MIT" +s.author = { "kean" => "https://github.com/kean" } +s.authors = { "kean" => "https://github.com/kean" } +s.source = { :git => "https://github.com/kean/Pulse.git", :tag => "#{s.version}" } +s.social_media_url = "https://kean.blog/" + +s.ios.deployment_target = "14.0" +s.source_files = "Sources/Pulse/**/*.swift" + +end diff --git a/PulseUI.podspec b/PulseUI.podspec new file mode 100644 index 00000000..2089080e --- /dev/null +++ b/PulseUI.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + +s.name = "PulseUI" +s.module_name = "PulseUI" +s.version = "3.7.3" +s.summary = "Logging system for Apple platforms" +s.swift_version = "5.6" + +s.description = <<-DESC +Pulse is a powerful logging system for Apple Platforms. Native. Built with SwiftUI. +DESC + +s.homepage = "https://github.com/kean/Pulse" +s.license = "MIT" +s.author = { "kean" => "https://github.com/kean" } +s.authors = { "kean" => "https://github.com/kean" } +s.source = { :git => "https://github.com/kean/Pulse.git", :tag => "#{s.version}" } +s.social_media_url = "https://kean.blog/" + +s.ios.deployment_target = "14.0" +s.dependency "PulseCore", '~> 3.0' +s.source_files = "Sources/PulseUI/**/*.swift" + +end diff --git a/Sources/Pulse/NetworkLogger/NetworkLogger+Redacting.swift b/Sources/Pulse/NetworkLogger/NetworkLogger+Redacting.swift index ade11e2d..0be81f03 100644 --- a/Sources/Pulse/NetworkLogger/NetworkLogger+Redacting.swift +++ b/Sources/Pulse/NetworkLogger/NetworkLogger+Redacting.swift @@ -182,12 +182,12 @@ private extension Data { guard let json = try? JSONSerialization.jsonObject(with: self) else { return self } - let redacted = Pulse.redactingSensitiveFields(json, fields) + let redacted = _redactingSensitiveFields(json, fields) return (try? JSONSerialization.data(withJSONObject: redacted)) ?? self } } -private func redactingSensitiveFields(_ value: Any, _ fields: Set) -> Any { +private func _redactingSensitiveFields(_ value: Any, _ fields: Set) -> Any { switch value { case var object as [String: Any]: for key in object.keys.filter(fields.contains) { @@ -195,7 +195,7 @@ private func redactingSensitiveFields(_ value: Any, _ fields: Set) -> An } return object case let array as [Any]: - return array.map { redactingSensitiveFields($0, fields) } + return array.map { _redactingSensitiveFields($0, fields) } default: return value }