cocoapods-happyPush 1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c940c553c20bb36d856da25f506214460c91bc780ac897cbb0da00be7e60a7c6
4
+ data.tar.gz: 778a79486f9bdb4bead32e5cbcd974d7052774def2217110d84c20d333c4fe5c
5
+ SHA512:
6
+ metadata.gz: 6573775031d614859b2844f3bd0b607ce162095445cc7791d74dabdfeae7005b6dccb0e50232a07797ecccc04f25c486d60a6ca23f844f76a244619ae8966705
7
+ data.tar.gz: a18f2e9fb9c34bfafce8a7f1214ea223ef802bc4b252327e17e951370552c6eb54e0bb4f4f700a0964a5b6b4936b75aa81e2ab35eba178bb9d168f5935c36669
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ .DS_Store
2
+ pkg
3
+ .idea/
4
+ *.gem
data/Gemfile ADDED
@@ -0,0 +1,13 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in cocoapods-happyPush.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/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2023 lus <ttop2f@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,39 @@
1
+ # cocoapods-happyPush
2
+
3
+ A CocoaPods plugin that adds `--skip-podspec-validation` to `pod repo push`.
4
+
5
+ ## Installation
6
+
7
+ Install from RubyGems:
8
+
9
+ ```bash
10
+ gem install cocoapods-happyPush
11
+ ```
12
+
13
+ Install from local source:
14
+
15
+ ```bash
16
+ gem build cocoapods-happyPush.gemspec
17
+ gem install ./cocoapods-happyPush-0.0.1.gem
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ ```bash
23
+ pod repo push --skip-podspec-validation
24
+ ```
25
+
26
+ ## Release
27
+
28
+ 1. Update version in `lib/cocoapods-happyPush/gem_version.rb`.
29
+ 2. Build gem:
30
+
31
+ ```bash
32
+ gem build cocoapods-happyPush.gemspec
33
+ ```
34
+
35
+ 3. Push to RubyGems:
36
+
37
+ ```bash
38
+ gem push cocoapods-happyPush-<version>.gem
39
+ ```
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,24 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'cocoapods-happyPush/gem_version.rb'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'cocoapods-happyPush'
8
+ spec.version = CocoapodsHappypush::VERSION
9
+ spec.authors = ['lus']
10
+ spec.email = ['ttop2f@gmail.com']
11
+ spec.description = %q{A CocoaPods plugin that adds --skip-podspec-validation to pod repo push.}
12
+ spec.summary = %q{Skip podspec validation when pushing specs with pod repo push via a dedicated CLI flag.}
13
+ spec.homepage = 'https://github.com/no5ugar/cocoapods-happyPush'
14
+ spec.license = 'MIT'
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.end_with?('.gem') }
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ['lib']
20
+
21
+ spec.add_dependency 'cocoapods', '>= 1.10'
22
+ spec.add_development_dependency 'bundler', '~> 1.3'
23
+ spec.add_development_dependency 'rake'
24
+ end
@@ -0,0 +1,45 @@
1
+
2
+ $_options_ = Pod::Command::Repo::Push.options
3
+
4
+ module CocoaPodsDisablePodspecValidations
5
+ module PushCommandMixin
6
+
7
+ push_command_class = Pod::Command::Repo::Push
8
+
9
+ def push_command_class.options
10
+ [
11
+ ['--skip-podspec-validation', 'HappyPush: Lint skips validating the podspec'],
12
+ ].concat($_options_)
13
+ end
14
+
15
+ methods_to_override = push_command_class.instance_methods + push_command_class.private_instance_methods
16
+ methods_to_override.each do |method_name|
17
+ if method_name.to_s == "initialize"
18
+ define_method(method_name) do |*args, &blk|
19
+ first_arg = args[0]
20
+ @skip_podspec_validation = first_arg.flag?('skip-podspec-validation', false)
21
+ super(*args, &blk)
22
+ end
23
+ end
24
+
25
+ if method_name.to_s == "validate_podspec_files"
26
+ define_method(method_name) do |*args, &blk|
27
+ Pod::UI.puts "HappyPush: skip podspec validation." if @skip_podspec_validation
28
+ super(*args, &blk) unless @skip_podspec_validation
29
+ end
30
+ end
31
+ end
32
+
33
+
34
+ end
35
+ end
36
+
37
+ module Pod
38
+ class Command
39
+ class Repo < Command
40
+ class Push < Repo
41
+ prepend ::CocoaPodsDisablePodspecValidations::PushCommandMixin
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1 @@
1
+ require 'cocoapods-happyPush/command/happyPush'
@@ -0,0 +1,3 @@
1
+ module CocoapodsHappypush
2
+ VERSION = "1.0.0"
3
+ end
@@ -0,0 +1 @@
1
+ require 'cocoapods-happyPush/gem_version'
@@ -0,0 +1 @@
1
+ require 'cocoapods-happyPush/command'
@@ -0,0 +1,12 @@
1
+ require File.expand_path('../../spec_helper', __FILE__)
2
+
3
+ module Pod
4
+ describe Command::Happypush do
5
+ describe 'CLAide' do
6
+ it 'registers it self' do
7
+ Command.parse(%w{ happyPush }).should.be.instance_of Command::Happypush
8
+ end
9
+ end
10
+ end
11
+ end
12
+
@@ -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,101 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cocoapods-happyPush
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - lus
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2026-04-01 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.10'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '1.10'
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: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: A CocoaPods plugin that adds --skip-podspec-validation to pod repo push.
56
+ email:
57
+ - ttop2f@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - Gemfile
64
+ - LICENSE.txt
65
+ - README.md
66
+ - Rakefile
67
+ - cocoapods-happyPush.gemspec
68
+ - lib/cocoapods-happyPush.rb
69
+ - lib/cocoapods-happyPush/command.rb
70
+ - lib/cocoapods-happyPush/command/happyPush.rb
71
+ - lib/cocoapods-happyPush/gem_version.rb
72
+ - lib/cocoapods_plugin.rb
73
+ - spec/command/happyPush_spec.rb
74
+ - spec/spec_helper.rb
75
+ homepage: https://github.com/no5ugar/cocoapods-happyPush
76
+ licenses:
77
+ - MIT
78
+ metadata: {}
79
+ post_install_message:
80
+ rdoc_options: []
81
+ require_paths:
82
+ - lib
83
+ required_ruby_version: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ required_rubygems_version: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: '0'
93
+ requirements: []
94
+ rubygems_version: 3.1.6
95
+ signing_key:
96
+ specification_version: 4
97
+ summary: Skip podspec validation when pushing specs with pod repo push via a dedicated
98
+ CLI flag.
99
+ test_files:
100
+ - spec/command/happyPush_spec.rb
101
+ - spec/spec_helper.rb