cocoapods-assets-cleaner 0.0.1 → 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cece82647e1b95f77e2b78d3e59773d2baeb6e173f2f866d6aaf114846a444fa
4
- data.tar.gz: 673cd2620a687a4150565b88717d2068601c773e317219d7e985349058784404
3
+ metadata.gz: daffc3fad0c10a0d7d73c5bdd20fa2a5eaa4c5592497a1b120e9e66feba2c227
4
+ data.tar.gz: c3c641fc24f3aa3d99f4f8dda0dc79b0a697db739b68b899361f0fc51babed28
5
5
  SHA512:
6
- metadata.gz: 729532be45bd03a7027806f0cc77d1c41ba5636aa3e40d01def897834f33dc0a9caa246ea3fe096c94185cc55194fd3744e611df6509376d39d989f48dceefb7
7
- data.tar.gz: fd39d4cedeec6983c78962c35c97a9abf9b899c3bce82116bdd80aebe6ad9f5143b1e80176dd8da0a0974ef5947aef94efca360910e8f39732589c60da3bbb2e
6
+ metadata.gz: 5e35be205096e24bb70debed5d45f86f8aed52b85faae1cfaa95d6ba7dc604e767b51101ef74cd1ef4e544cd8231a247471f4414e5c80e049d95589fe3ca7b44
7
+ data.tar.gz: fdc502fdce00f7ec78d8272a9c53d654db583b02421062653d046a695bcc892709fa3b8db33399a0e419115927ad72b66bcadd27b9d4c4f82bc92b9340549f4e
data/.gitignore ADDED
@@ -0,0 +1,3 @@
1
+ .DS_Store
2
+ pkg
3
+ .idea/
data/Gemfile ADDED
@@ -0,0 +1,13 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in cocoapods-assets-cleaner.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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 Leo Valentim
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2019 Leo Valentim <leo.valent@hotmail.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,34 @@
1
+ # cocoapods-assets-cleaner
2
+
3
+ Assets-cleaner is a cocoapods-plugin that helps to clean assets from unused images on Xcode projects.
4
+
5
+ ## Getting Started
6
+
7
+ ### Installation
8
+
9
+ $ gem install cocoapods-assets-cleaner
10
+
11
+ #### Or with Bundler:
12
+
13
+ * Install Bundler:
14
+
15
+ `$ gem install bundler`
16
+
17
+ * Create a `Gemfile` in the project root folder and add this line to it:
18
+
19
+ `gem 'cocoapods-assets-cleaner'`
20
+
21
+ * Run the Bundler installation command:
22
+
23
+ `$ bundle install`
24
+
25
+
26
+ ## Usage
27
+
28
+ Run `pod clean-unused-assets` command with `--assets-path` to indicate where is Assets.xcassets on your project:
29
+
30
+ $ pod clean-unused-assets --assets-path=./path/to/Assets.xcassets
31
+
32
+ You can also define a specific directory for the plugin to search for unused assets. Just add `--project-path`:
33
+
34
+ $ pod clean-unused-assets --assets-path=./path/to/Assets.xcassets --project-path=./optional/path/
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,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'cocoapods-assets-cleaner/gem_version.rb'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'cocoapods-assets-cleaner'
8
+ spec.version = CocoapodsAssetsCleaner::VERSION
9
+ spec.authors = ['Leo Valentim']
10
+ spec.email = ['leo.valent@hotmail.com']
11
+ spec.description = %q{Assets-cleaner is a Cocoapods-plugin that helps to clean unused assets on Xcode projects.}
12
+ spec.summary = %q{Cocoapods-plugin that helps to clean unused assets on Xcode projects.}
13
+ spec.homepage = 'https://github.com/LeoValentim/cocoapods-assets-cleaner/'
14
+ spec.license = 'MIT'
15
+
16
+ #spec.files = Dir['lib/**/*']
17
+ spec.files = `git ls-files`.split($/)
18
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
+ spec.require_paths = ['lib']
21
+
22
+ spec.add_dependency "cocoapods", ">= 1.5.0"
23
+
24
+ spec.add_development_dependency 'bundler', '~> 1.3'
25
+ spec.add_development_dependency 'rake'
26
+ end
@@ -1,3 +1,3 @@
1
1
  module CocoapodsAssetsCleaner
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -0,0 +1,12 @@
1
+ require File.expand_path('../../spec_helper', __FILE__)
2
+
3
+ module Pod
4
+ describe Command::Cleaner do
5
+ describe 'CLAide' do
6
+ it 'registers it self' do
7
+ Command.parse(%w{ cleaner }).should.be.instance_of Command::Cleaner
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 CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-assets-cleaner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leo Valentim
@@ -10,6 +10,20 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2019-08-08 00:00:00.000000000 Z
12
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.5.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 1.5.0
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -46,12 +60,21 @@ executables: []
46
60
  extensions: []
47
61
  extra_rdoc_files: []
48
62
  files:
63
+ - ".gitignore"
64
+ - Gemfile
65
+ - LICENSE
66
+ - LICENSE.txt
67
+ - README.md
68
+ - Rakefile
69
+ - cocoapods-assets-cleaner.gemspec
49
70
  - lib/cocoapods-assets-cleaner.rb
50
71
  - lib/cocoapods-assets-cleaner/assets_cleaner.rb
51
72
  - lib/cocoapods-assets-cleaner/command.rb
52
73
  - lib/cocoapods-assets-cleaner/command/cleaner.rb
53
74
  - lib/cocoapods-assets-cleaner/gem_version.rb
54
75
  - lib/cocoapods_plugin.rb
76
+ - spec/command/cleaner_spec.rb
77
+ - spec/spec_helper.rb
55
78
  homepage: https://github.com/LeoValentim/cocoapods-assets-cleaner/
56
79
  licenses:
57
80
  - MIT
@@ -76,4 +99,6 @@ rubygems_version: 2.7.8
76
99
  signing_key:
77
100
  specification_version: 4
78
101
  summary: Cocoapods-plugin that helps to clean unused assets on Xcode projects.
79
- test_files: []
102
+ test_files:
103
+ - spec/command/cleaner_spec.rb
104
+ - spec/spec_helper.rb