vsclean 1.0.4

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
+ SHA1:
3
+ metadata.gz: 150ef2accc42de50614346ff12e166710e05b2ba
4
+ data.tar.gz: b0d4deb2274b28f8e90a3bb4abebd9bfb3aa88fc
5
+ SHA512:
6
+ metadata.gz: 906d7f0d8ce82dd34c2ec1323fe91e8bddac340f66155269d9bf6aa15808fa053eeb54329d45ad78989c42a7e4502ffee385fe5371560782d90b3cdabac2f33d
7
+ data.tar.gz: 928d97b27707953c60834978a49439b374bb0d99779a7bd3605c1bdbcbcbc8026e29b1c753ef84a397ea3f6b72372240c608d8075ca55aee5328220465063efa
data/.gitattributes ADDED
@@ -0,0 +1,2 @@
1
+ .multirepo.lock merge=ours
2
+ .multirepo.meta merge=ours
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.multirepo ADDED
@@ -0,0 +1,5 @@
1
+ ---
2
+ - !ruby/object:MultiRepo::ConfigEntry
3
+ id: 7c2eb791-fa86-4c01-a56a-fd5699b4b951
4
+ path: ../vsclean-dummy/
5
+ url: git@github.com:fortinmike/vsclean-dummy.git
data/.multirepo.lock ADDED
@@ -0,0 +1,6 @@
1
+ ---
2
+ - !ruby/object:MultiRepo::LockEntry
3
+ name: vsclean-dummy
4
+ id: 7c2eb791-fa86-4c01-a56a-fd5699b4b951
5
+ head: f0620f9f055abc0fb85e9cb4b26f76cac3643fc3
6
+ branch: master
data/.multirepo.meta ADDED
@@ -0,0 +1,2 @@
1
+ --- !ruby/object:MultiRepo::MetaFile
2
+ version: 1.0.0.beta58
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in binclean.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Michaël Fortin
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
13
+ all 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
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,16 @@
1
+ # vsclean
2
+
3
+ A recursive delete of temporary Visual Studio and ReSharper output files, vsclean performs.
4
+
5
+ ## Installation:
6
+
7
+ $ gem install vsclean
8
+
9
+ ## Usage:
10
+
11
+ ### Local Cleanup
12
+
13
+ $ vsclean
14
+
15
+ - Deletes `**/{bin,obj}`
16
+ - Deletes `**/.vs/**/.suo`
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
data/bin/vsclean ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "clean"
4
+
5
+ VsClean::Clean.run(ARGV)
data/lib/clean.rb ADDED
@@ -0,0 +1,42 @@
1
+ require "claide"
2
+ require "info"
3
+ require "console"
4
+ require "fileutils"
5
+
6
+ module VsClean
7
+ class Clean < CLAide::Command
8
+ self.command = "vsclean"
9
+ self.version = VsClean::VERSION
10
+ self.description = VsClean::DESCRIPTION
11
+
12
+ def initialize(argv)
13
+ super
14
+ end
15
+
16
+ def run
17
+ # Delete bin and obj directories
18
+ paths = Dir.glob("**/{bin,obj}").select { |f| File.directory?(f) }
19
+
20
+ # Delete .suo files (can cause Intellisense errors, among other things)
21
+ paths.push(*Dir.glob("**/.vs/**/.suo"))
22
+
23
+ if paths.none?
24
+ Console.log_step("All is well with the world... nothing to clean!")
25
+ return
26
+ end
27
+
28
+ Console.log_step("Cleaning...")
29
+
30
+ paths.each { |d| delete(d) }
31
+
32
+ Console.log_step("Done!")
33
+ end
34
+
35
+ def delete(path)
36
+ FileUtils.rm_r(path)
37
+ Console.log_substep("Deleted ./#{path}")
38
+ rescue StandardError => e
39
+ Console.log_error("Could not delete './#{path}': #{e.message}")
40
+ end
41
+ end
42
+ end
data/lib/console.rb ADDED
@@ -0,0 +1,34 @@
1
+ require "colored"
2
+
3
+ module VsClean
4
+ class Console
5
+ def self.log_step(message)
6
+ print_arrow
7
+ puts message.bold.green + "\r"
8
+ end
9
+
10
+ def self.log_substep(message)
11
+ print_arrow
12
+ puts message.blue + "\r"
13
+ end
14
+
15
+ def self.log_info(message)
16
+ print_arrow
17
+ puts message.white + "\r"
18
+ end
19
+
20
+ def self.log_warning(message)
21
+ print_arrow
22
+ puts message.yellow + "\r"
23
+ end
24
+
25
+ def self.log_error(message)
26
+ print_arrow
27
+ puts message.red + "\r"
28
+ end
29
+
30
+ def self.print_arrow
31
+ print $stdout.isatty ? "> ".white : ""
32
+ end
33
+ end
34
+ end
data/lib/info.rb ADDED
@@ -0,0 +1,5 @@
1
+ module VsClean
2
+ NAME = "vsclean"
3
+ VERSION = "1.0.4"
4
+ DESCRIPTION = %q{Recursively delete temporary Visual Studio files from the current directory}
5
+ end
data/vsclean.gemspec ADDED
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'info'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = VsClean::NAME
8
+ spec.version = VsClean::VERSION
9
+ spec.authors = ["Michaël Fortin"]
10
+ spec.email = ["fortinmike@irradiated.net"]
11
+
12
+ spec.summary = VsClean::DESCRIPTION
13
+ spec.homepage = "https://github.com/fortinmike/vsclean"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_runtime_dependency "claide", "~> 0.8", ">= 0.8.0"
21
+ spec.add_runtime_dependency "colored", "~> 1.2"
22
+
23
+ spec.add_development_dependency "bundler", "~> 1.9"
24
+ spec.add_development_dependency "rake", "~> 10.0"
25
+ end
metadata ADDED
@@ -0,0 +1,121 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vsclean
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.4
5
+ platform: ruby
6
+ authors:
7
+ - Michaël Fortin
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-04-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: claide
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.8'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.8.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '0.8'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 0.8.0
33
+ - !ruby/object:Gem::Dependency
34
+ name: colored
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '1.2'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '1.2'
47
+ - !ruby/object:Gem::Dependency
48
+ name: bundler
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '1.9'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '1.9'
61
+ - !ruby/object:Gem::Dependency
62
+ name: rake
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '10.0'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '10.0'
75
+ description:
76
+ email:
77
+ - fortinmike@irradiated.net
78
+ executables:
79
+ - vsclean
80
+ extensions: []
81
+ extra_rdoc_files: []
82
+ files:
83
+ - ".gitattributes"
84
+ - ".gitignore"
85
+ - ".multirepo"
86
+ - ".multirepo.lock"
87
+ - ".multirepo.meta"
88
+ - Gemfile
89
+ - LICENSE.txt
90
+ - README.md
91
+ - Rakefile
92
+ - bin/vsclean
93
+ - lib/clean.rb
94
+ - lib/console.rb
95
+ - lib/info.rb
96
+ - vsclean.gemspec
97
+ homepage: https://github.com/fortinmike/vsclean
98
+ licenses:
99
+ - MIT
100
+ metadata: {}
101
+ post_install_message:
102
+ rdoc_options: []
103
+ require_paths:
104
+ - lib
105
+ required_ruby_version: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ required_rubygems_version: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: '0'
115
+ requirements: []
116
+ rubyforge_project:
117
+ rubygems_version: 2.2.3
118
+ signing_key:
119
+ specification_version: 4
120
+ summary: Recursively delete temporary Visual Studio files from the current directory
121
+ test_files: []