pod-tools 0.1.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1d82b18ade77587f63d805b3c4fac3cb7e2c79d0
4
+ data.tar.gz: be112b20fdc3c96dc347945751232a54d8e5d292
5
+ SHA512:
6
+ metadata.gz: e31b73b6426dd496cafb7bc14c9630872473d3760949b44402fb6f5abb731b43ab534372e415e9aea92cfca576d7c3f424fb31cc4fdb3b1f602f3018d848971f
7
+ data.tar.gz: fb97a34538b11745d186d7cfe4e2318aaad2a526b65409a1f3833af926a8fb97d4ea64d84e58607df60db7dcde03f6c56b6e4614d12f702be7233ddc7d53ddd3
@@ -0,0 +1,96 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ # Created by https://www.gitignore.io
11
+
12
+ ### RubyMine ###
13
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
14
+
15
+ *.iml
16
+
17
+ ## Directory-based project format:
18
+ .idea/
19
+ # if you remove the above rule, at least ignore the following:
20
+
21
+ # User-specific stuff:
22
+ # .idea/workspace.xml
23
+ # .idea/tasks.xml
24
+ # .idea/dictionaries
25
+
26
+ # Sensitive or high-churn files:
27
+ # .idea/dataSources.ids
28
+ # .idea/dataSources.xml
29
+ # .idea/sqlDataSources.xml
30
+ # .idea/dynamic.xml
31
+ # .idea/uiDesigner.xml
32
+
33
+ # Gradle:
34
+ # .idea/gradle.xml
35
+ # .idea/libraries
36
+
37
+ # Mongo Explorer plugin:
38
+ # .idea/mongoSettings.xml
39
+
40
+ ## File-based project format:
41
+ *.ipr
42
+ *.iws
43
+
44
+ ## Plugin-specific files:
45
+
46
+ # IntelliJ
47
+ /out/
48
+
49
+ # mpeltonen/sbt-idea plugin
50
+ .idea_modules/
51
+
52
+ # JIRA plugin
53
+ atlassian-ide-plugin.xml
54
+
55
+ # Crashlytics plugin (for Android Studio and IntelliJ)
56
+ com_crashlytics_export_strings.xml
57
+ crashlytics.properties
58
+ crashlytics-build.properties
59
+
60
+
61
+ ### Ruby ###
62
+ *.gem
63
+ *.rbc
64
+ /.config
65
+ /coverage/
66
+ /InstalledFiles
67
+ /pkg/
68
+ /spec/reports/
69
+ /test/tmp/
70
+ /test/version_tmp/
71
+ /tmp/
72
+
73
+ ## Specific to RubyMotion:
74
+ .dat*
75
+ .repl_history
76
+ build/
77
+
78
+ ## Documentation cache and generated files:
79
+ /.yardoc/
80
+ /_yardoc/
81
+ /doc/
82
+ /rdoc/
83
+
84
+ ## Environment normalisation:
85
+ /.bundle/
86
+ /vendor/bundle
87
+ /lib/bundler/man/
88
+
89
+ # for a library or gem, you might want to ignore these files since the code is
90
+ # intended to run in multiple environments; otherwise, check them in:
91
+ # Gemfile.lock
92
+ # .ruby-version
93
+ # .ruby-gemset
94
+
95
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
96
+ .rvmrc
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format documentation
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.2.0
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/Podfile ADDED
File without changes
@@ -0,0 +1,36 @@
1
+ # Pod Tools
2
+
3
+ Clear CocoaPods cache, re-download and re-install all pods
4
+
5
+
6
+ ## Installation
7
+
8
+ Install it via terminal:
9
+
10
+ $ gem install pod-tools
11
+
12
+ ## Usage
13
+
14
+ On your iOS project folder:
15
+
16
+ ```bash
17
+ # Clean cocoapods data
18
+ pod-clean
19
+ # Clean cocoapods data and Reinstall
20
+ pod-reinstall
21
+ # Clean all XCode derived data
22
+ pod-clean-derived-data
23
+ ```
24
+
25
+ <p align="center">
26
+ <img src="https://raw.github.com/cesarferreira/pod-tools/master/extras/images/terminal01.gif" />
27
+ </p>
28
+
29
+
30
+ ## Contributing
31
+
32
+ 1. Fork it ( https://github.com/cesarferreira/pod-tools/fork )
33
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
34
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
35
+ 4. Push to the branch (`git push origin my-new-feature`)
36
+ 5. Create a new Pull Request
@@ -0,0 +1,5 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ task :default => :test
5
+ RSpec::Core::RakeTask.new(:test)
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+ require 'bundler/setup'
3
+ require 'colorize'
4
+ require 'pod-tools'
5
+
6
+ current_path = `pwd`
7
+ current_path = current_path.tr("\n","")
8
+
9
+ PodTools.delete_podfiles(current_path)
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ require 'bundler/setup'
3
+ require 'colorize'
4
+ require 'pod-tools'
5
+
6
+ PodTools.delete_derived_data
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+ require 'bundler/setup'
3
+ require 'colorize'
4
+ require 'pod-tools'
5
+
6
+ current_path = `pwd`
7
+ current_path = current_path.tr("\n","")
8
+
9
+ PodTools.delete_podfiles(current_path)
10
+ PodTools.reinstall(current_path)
@@ -0,0 +1,60 @@
1
+ require 'version'
2
+ require 'colorize'
3
+
4
+ module PodTools
5
+
6
+ # Remove a file
7
+ def self.remove_file(path)
8
+ puts " #{path.green}"
9
+ to_remove = "rm -rf #{path}"
10
+ FileUtils.rm_rf("#{path}", secure: true)
11
+ end
12
+
13
+ # Reinstall Pods
14
+ def self.reinstall(path)
15
+ puts 'Reinstalling pods...'
16
+ `pod install`
17
+
18
+ end
19
+
20
+ # Delete all derived data
21
+ def self.delete_derived_data
22
+ puts 'Cleaning derived data...'
23
+ deletion = `rm -rf ~/Library/Developer/Xcode/DerivedData/*`
24
+ puts ' Derived data deleted!'.green
25
+ end
26
+
27
+ # Remove Cocoapods' files
28
+ def self.remove_podfiles(path)
29
+ puts 'Cleaning Podfile related data...'
30
+
31
+ # add items
32
+ disposables = Array.new
33
+
34
+ disposables << 'Podfile.lock'
35
+ disposables << 'Pods/'
36
+ disposables << '*.xcworkspace'
37
+
38
+ # Iterate the disposables
39
+ disposables.each do |item|
40
+ full_path = "#{path}/#{item}"
41
+ # remove item
42
+ remove_file (full_path)
43
+ end
44
+ end
45
+
46
+ # Delete podfiles
47
+ def self.delete_podfiles(current_path)
48
+
49
+ # Check if you are on a project with Podfile
50
+ bool = File.exist?("#{current_path}/Podfile")
51
+
52
+ unless bool
53
+ puts "You're not on a XCode project...".red
54
+ exit 1
55
+ end
56
+
57
+ remove_podfiles(current_path)
58
+
59
+ end
60
+ end
@@ -0,0 +1,3 @@
1
+ module PodTools
2
+ VERSION = '0.1.0'
3
+ end
@@ -0,0 +1,32 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'pod-tools'
8
+ spec.version = PodTools::VERSION
9
+ spec.authors = ['cesar ferreira']
10
+ spec.email = ['cesar.manuel.ferreira@gmail.com']
11
+
12
+ if spec.respond_to?(:metadata)
13
+ #spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com' to prevent pushes to rubygems.org, or delete to allow pushes to any server."
14
+ end
15
+
16
+ spec.summary = 'Pod tools'
17
+ spec.description = 'Pod tools'
18
+ spec.homepage = "https://github.com/cesarferreira/pod-tools"
19
+ spec.license = 'MIT'
20
+
21
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
22
+ spec.bindir = 'bin'
23
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
24
+ spec.require_paths = ['lib']
25
+
26
+ spec.add_development_dependency 'rake', '~> 10.0'
27
+ spec.add_development_dependency 'rspec', '~> 3.2'
28
+ spec.add_dependency 'bundler', '>= 1.7'
29
+ spec.add_dependency 'colorize', '~> 0.7'
30
+ spec.add_dependency 'cocoapods', '>= 0.36'
31
+
32
+ end
metadata ADDED
@@ -0,0 +1,130 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pod-tools
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - cesar ferreira
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-04-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '10.0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '10.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.2'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.2'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '1.7'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '1.7'
55
+ - !ruby/object:Gem::Dependency
56
+ name: colorize
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.7'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.7'
69
+ - !ruby/object:Gem::Dependency
70
+ name: cocoapods
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0.36'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0.36'
83
+ description: Pod tools
84
+ email:
85
+ - cesar.manuel.ferreira@gmail.com
86
+ executables:
87
+ - pod-clean
88
+ - pod-clean-derived-data
89
+ - pod-reinstall
90
+ extensions: []
91
+ extra_rdoc_files: []
92
+ files:
93
+ - ".gitignore"
94
+ - ".rspec"
95
+ - ".travis.yml"
96
+ - Gemfile
97
+ - Podfile
98
+ - README.md
99
+ - Rakefile
100
+ - bin/pod-clean
101
+ - bin/pod-clean-derived-data
102
+ - bin/pod-reinstall
103
+ - lib/pod-tools.rb
104
+ - lib/version.rb
105
+ - pod-tools.gemspec
106
+ homepage: https://github.com/cesarferreira/pod-tools
107
+ licenses:
108
+ - MIT
109
+ metadata: {}
110
+ post_install_message:
111
+ rdoc_options: []
112
+ require_paths:
113
+ - lib
114
+ required_ruby_version: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ required_rubygems_version: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ requirements: []
125
+ rubyforge_project:
126
+ rubygems_version: 2.4.6
127
+ signing_key:
128
+ specification_version: 4
129
+ summary: Pod tools
130
+ test_files: []