├── .gitignore ├── lib ├── cocoapods_plugin.rb ├── cocoapods_debug.rb └── cocoapods_debug │ ├── command.rb │ ├── gem_version.rb │ └── command │ └── debug.rb ├── README.md ├── Rakefile ├── Gemfile ├── CHANGELOG.md ├── spec ├── command │ └── debug_spec.rb └── spec_helper.rb ├── cocoapods-debug.gemspec ├── LICENSE.txt └── Gemfile.lock /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | pkg 3 | .idea/ 4 | -------------------------------------------------------------------------------- /lib/cocoapods_plugin.rb: -------------------------------------------------------------------------------- 1 | require 'cocoapods_debug/command' 2 | -------------------------------------------------------------------------------- /lib/cocoapods_debug.rb: -------------------------------------------------------------------------------- 1 | require 'cocoapods_debug/gem_version' 2 | -------------------------------------------------------------------------------- /lib/cocoapods_debug/command.rb: -------------------------------------------------------------------------------- 1 | require 'cocoapods_debug/command/debug' 2 | -------------------------------------------------------------------------------- /lib/cocoapods_debug/gem_version.rb: -------------------------------------------------------------------------------- 1 | module CocoapodsDebug 2 | VERSION = '0.1.0'.freeze 3 | end 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # cocoapods-debug 2 | 3 | A simple plugin to ease debugging CocoaPods. 4 | 5 | ## Installation 6 | 7 | $ gem install cocoapods_debug 8 | 9 | ## Usage 10 | 11 | $ pod debug 12 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require 'bundler/gem_tasks' 2 | require 'bundler/setup' 3 | 4 | require 'rspec/core/rake_task' 5 | require 'rubocop/rake_task' 6 | 7 | RSpec::Core::RakeTask.new 8 | RuboCop::RakeTask.new 9 | 10 | task default: [:spec, :rubocop] 11 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # Specify your gem's dependencies in cocoapods_debug.gemspec 4 | gemspec 5 | 6 | group :development do 7 | gem 'cocoapods', '> 0.a' 8 | 9 | gem 'rspec', '~> 3.4' 10 | gem 'rubocop', '~> 0.37.1' 11 | end 12 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## Master 2 | 3 | ##### Enhancements 4 | 5 | * None. 6 | 7 | ##### Bug Fixes 8 | 9 | * None. 10 | 11 | 12 | ## 0.1.0 (2016-02-25) 13 | 14 | ##### Enhancements 15 | 16 | * Initial implementation. 17 | [Samuel Giddins](https://github.com/segiddins) 18 | -------------------------------------------------------------------------------- /lib/cocoapods_debug/command/debug.rb: -------------------------------------------------------------------------------- 1 | module Pod 2 | class Command 3 | # A command that just starts a debugger 4 | class Debug < Command 5 | self.summary = 'Start a debugging session' 6 | 7 | def run 8 | require 'pry' 9 | pry(config) 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /spec/command/debug_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | module Pod 4 | describe Command::Debug do 5 | let(:args) { %w(debug) } 6 | subject { Command.parse(args) } 7 | 8 | describe 'CLAide' do 9 | it 'registers it self' do 10 | expect(subject).to be_instance_of(Command::Debug) 11 | end 12 | end 13 | 14 | describe '#run' do 15 | it 'starts a pry session' do 16 | expect(subject).to receive(:pry).with(Pod::Config.instance) 17 | subject.run 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /cocoapods-debug.gemspec: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | lib = File.expand_path('../lib', __FILE__) 3 | $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) 4 | require 'cocoapods_debug/gem_version' 5 | 6 | Gem::Specification.new do |spec| 7 | spec.name = 'cocoapods_debug' 8 | spec.version = CocoapodsDebug::VERSION 9 | spec.authors = ['Samuel Giddins'] 10 | spec.email = ['segiddins@segiddins.me'] 11 | spec.summary = 'A simple plugin to ease debugging CocoaPods.' 12 | spec.homepage = 'https://github.com/segiddins/cocoapods_debug' 13 | spec.license = 'MIT' 14 | 15 | spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR) 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.add_runtime_dependency 'pry', '~> 0.10.3' 21 | 22 | spec.add_development_dependency 'bundler', '~> 1.3' 23 | spec.add_development_dependency 'rake' 24 | end 25 | -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | require 'bundler/setup' 2 | 3 | require 'cocoapods' 4 | require 'cocoapods_debug/command' 5 | 6 | #-----------------------------------------------------------------------------# 7 | 8 | module Pod 9 | # Disable the wrapping so the output is deterministic in the tests. 10 | # 11 | UI.disable_wrap = true 12 | 13 | # Redirects the messages to an internal store. 14 | # 15 | module UI 16 | @output = '' 17 | @warnings = '' 18 | 19 | class << self 20 | attr_accessor :output 21 | attr_accessor :warnings 22 | 23 | def puts(message = '') 24 | @output << "#{message}\n" 25 | end 26 | 27 | def warn(message = '', _actions = []) 28 | @warnings << "#{message}\n" 29 | end 30 | 31 | def print(message) 32 | @output << message 33 | end 34 | end 35 | end 36 | end 37 | 38 | #-----------------------------------------------------------------------------# 39 | 40 | RSpec.configure do |config| 41 | config.before(:each) do 42 | Pod::UI.output = '' 43 | Pod::UI.warnings = '' 44 | end 45 | end 46 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Samuel Giddins 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. 23 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | PATH 2 | remote: . 3 | specs: 4 | cocoapods_debug (0.1.0) 5 | pry (~> 0.10.3) 6 | 7 | GEM 8 | remote: https://rubygems.org/ 9 | specs: 10 | activesupport (4.2.5.1) 11 | i18n (~> 0.7) 12 | json (~> 1.7, >= 1.7.7) 13 | minitest (~> 5.1) 14 | thread_safe (~> 0.3, >= 0.3.4) 15 | tzinfo (~> 1.1) 16 | ast (2.2.0) 17 | claide (1.0.0.beta.1) 18 | cocoapods (1.0.0.beta.4) 19 | activesupport (>= 4.0.2) 20 | claide (>= 1.0.0.beta.1, < 2.0) 21 | cocoapods-core (= 1.0.0.beta.4) 22 | cocoapods-deintegrate (>= 1.0.0.beta.1, < 2.0) 23 | cocoapods-downloader (>= 1.0.0.beta.1, < 2.0) 24 | cocoapods-plugins (>= 1.0.0.beta.1, < 2.0) 25 | cocoapods-search (>= 1.0.0.beta.1, < 2.0) 26 | cocoapods-stats (>= 1.0.0.beta.3, < 2.0) 27 | cocoapods-trunk (>= 1.0.0.beta.2, < 2.0) 28 | cocoapods-try (>= 1.0.0.beta.2, < 2.0) 29 | colored (~> 1.2) 30 | escape (~> 0.0.4) 31 | fourflusher (~> 0.3.0) 32 | molinillo (~> 0.4.3) 33 | nap (~> 1.0) 34 | xcodeproj (>= 1.0.0.beta.3, < 2.0) 35 | cocoapods-core (1.0.0.beta.4) 36 | activesupport (>= 4.0.2) 37 | fuzzy_match (~> 2.0.4) 38 | nap (~> 1.0) 39 | cocoapods-deintegrate (1.0.0.beta.1) 40 | cocoapods-downloader (1.0.0.beta.1) 41 | cocoapods-plugins (1.0.0.beta.1) 42 | nap 43 | cocoapods-search (1.0.0.beta.1) 44 | cocoapods-stats (1.0.0.beta.3) 45 | cocoapods-trunk (1.0.0.beta.2) 46 | nap (>= 0.8, < 2.0) 47 | netrc (= 0.7.8) 48 | cocoapods-try (1.0.0.beta.2) 49 | coderay (1.1.0) 50 | colored (1.2) 51 | diff-lcs (1.2.5) 52 | escape (0.0.4) 53 | fourflusher (0.3.0) 54 | fuzzy_match (2.0.4) 55 | i18n (0.7.0) 56 | json (1.8.3) 57 | method_source (0.8.2) 58 | minitest (5.8.4) 59 | molinillo (0.4.3) 60 | nap (1.1.0) 61 | netrc (0.7.8) 62 | parser (2.3.0.6) 63 | ast (~> 2.2) 64 | powerpack (0.1.1) 65 | pry (0.10.3) 66 | coderay (~> 1.1.0) 67 | method_source (~> 0.8.1) 68 | slop (~> 3.4) 69 | rainbow (2.1.0) 70 | rake (10.5.0) 71 | rspec (3.4.0) 72 | rspec-core (~> 3.4.0) 73 | rspec-expectations (~> 3.4.0) 74 | rspec-mocks (~> 3.4.0) 75 | rspec-core (3.4.3) 76 | rspec-support (~> 3.4.0) 77 | rspec-expectations (3.4.0) 78 | diff-lcs (>= 1.2.0, < 2.0) 79 | rspec-support (~> 3.4.0) 80 | rspec-mocks (3.4.1) 81 | diff-lcs (>= 1.2.0, < 2.0) 82 | rspec-support (~> 3.4.0) 83 | rspec-support (3.4.1) 84 | rubocop (0.37.2) 85 | parser (>= 2.3.0.4, < 3.0) 86 | powerpack (~> 0.1) 87 | rainbow (>= 1.99.1, < 3.0) 88 | ruby-progressbar (~> 1.7) 89 | unicode-display_width (~> 0.3) 90 | ruby-progressbar (1.7.5) 91 | slop (3.6.0) 92 | thread_safe (0.3.5) 93 | tzinfo (1.2.2) 94 | thread_safe (~> 0.1) 95 | unicode-display_width (0.3.1) 96 | xcodeproj (1.0.0.beta.3) 97 | activesupport (>= 3) 98 | claide (>= 1.0.0.beta.1, < 2.0) 99 | colored (~> 1.2) 100 | 101 | PLATFORMS 102 | ruby 103 | 104 | DEPENDENCIES 105 | bundler (~> 1.3) 106 | cocoapods (> 0.a) 107 | cocoapods_debug! 108 | rake 109 | rspec (~> 3.4) 110 | rubocop (~> 0.37.1) 111 | 112 | BUNDLED WITH 113 | 1.12.0.pre.1 114 | --------------------------------------------------------------------------------