fui 0.1.1 → 0.2.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
  SHA1:
3
- metadata.gz: 619c1a68c51c4bb87e46a9912afa504591c11d07
4
- data.tar.gz: 0a26f50935809404993bb98a4e38d3902d53a7d9
3
+ metadata.gz: 39c221175e03a81032408c1a8635b7191e7b112a
4
+ data.tar.gz: 221f943408123601fe7fbd671a64bdbe4b856c1c
5
5
  SHA512:
6
- metadata.gz: f3e6969d0852b92f4ecec1b3adeaf11686159724b29e15495e26e0e4144c0f1b8c6b3994701687f6d458ba737a93d170a6a244a76b67ac8eeb5fb1de99b47471
7
- data.tar.gz: 77e9a9ea48ff86fe4f6a042f3104bc0f0ba05eb720d1b24a0450f6dbc7c522285d0ef165b224322dd2a442d3edfff43671b0947b646ed5f9ff6e7a90c75ffee6
6
+ metadata.gz: 9af00c9579ebff0ad21c72d4b47c366b8905c45b8e2bad576bd275f76f0df522d6c5638c7fbc7dc9639745baf09db42194c49fa3915335400ca6511bb54c377b
7
+ data.tar.gz: 872db52c29157f6ea883ea4c371445755ac7c00531972b8f403e022ba1e03b03d6cda891550e8eed45376b822b8d7a84d0e17177b12e03e5846037e7b1787444
@@ -1,3 +1,8 @@
1
+ ### 0.2.0 (1/23/2014)
2
+
3
+ * By default will display (simulation) because no actual files are being deleted - [@dblock](https://github.com/dblock).
4
+ * Fui's exit code with `find` will be the number of unused references found - [@dblock](https://github.com/dblock).
5
+
1
6
  ### 0.1.1 (1/22/2014)
2
7
 
3
8
  * Fix: properly handle .pch includes - [@dblock](https://github.com/dblock).
data/README.md CHANGED
@@ -23,6 +23,8 @@ fui help
23
23
  fui find
24
24
  ```
25
25
 
26
+ The `find` command lists all the files that contain unused interfaces and exits with the number of files found.
27
+
26
28
  #### Find Unused Classes in a Path
27
29
 
28
30
  ```
@@ -41,6 +43,6 @@ See [CONTRIBUTING](CONTRIBUTING.md).
41
43
 
42
44
  ## Copyright and License
43
45
 
44
- Copyright (c) 2014, Daniel Doubrovkine, [Artsy](http://artsy.github.io), based on code by [@dstnbrkr](https://github.com/dstnbrkr).
46
+ Copyright (c) 2014, Daniel Doubrovkine, [Artsy](http://artsy.github.io), based on code by [Dustin Barker](https://github.com/dstnbrkr).
45
47
 
46
48
  This project is licensed under the [MIT License](LICENSE.md).
data/bin/fui CHANGED
@@ -16,6 +16,7 @@ pre do |global_options, command, options, args|
16
16
  end
17
17
 
18
18
  desc "Find unused classes"
19
+ long_desc "Note: fui's exit code will be the number of unused interfaces found."
19
20
  command :find do |c|
20
21
  c.action do |global_options, options, args|
21
22
  root = Pathname.new($fui.path)
@@ -30,6 +31,7 @@ command :find do |c|
30
31
  puts relative_path
31
32
  end
32
33
  end
34
+ exit_now! nil, $fui.unused_references.count
33
35
  end
34
36
  end
35
37
 
@@ -56,23 +58,22 @@ command :delete do |c|
56
58
  next unless response.chr == 'Y'
57
59
  end
58
60
  if global_options[:verbose]
59
- puts "Removing #{relative_path}\r\n"
61
+ puts "Removing #{relative_path}#{options[:perform] ? '' : ' (simulation)'}\r\n"
60
62
  else
61
- puts "#{relative_path}\r\n"
63
+ puts "#{relative_path}#{options[:perform] ? '' : ' (simulation)'}\r\n"
62
64
  end
63
65
  File.delete(k.path) if options[:perform]
64
66
  impl_path = k.path.gsub(/\.h$/, '.m')
65
67
  if File.exists?(impl_path)
66
68
  relative_path = Pathname.new(impl_path).relative_path_from(root).to_s
67
69
  if global_options[:verbose]
68
- puts "Removing #{relative_path}\r\n"
70
+ puts "Removing #{relative_path}#{options[:perform] ? '' : ' (simulation)'}\r\n"
69
71
  else
70
- puts "#{relative_path}\r\n"
72
+ puts "#{relative_path}#{options[:perform] ? '' : ' (simulation)'}\r\n"
71
73
  end
72
74
  File.delete(impl_path) if options[:perform]
73
75
  end
74
76
  end
75
-
76
77
  ensure
77
78
  system("stty -raw echo")
78
79
  end
@@ -1,3 +1,3 @@
1
1
  module Fui
2
- VERSION = '0.1.1'
2
+ VERSION = '0.2.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Doubrovkine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-22 00:00:00.000000000 Z
11
+ date: 2014-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gli
@@ -60,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
60
60
  version: 1.3.6
61
61
  requirements: []
62
62
  rubyforge_project:
63
- rubygems_version: 2.1.11
63
+ rubygems_version: 2.0.14
64
64
  signing_key:
65
65
  specification_version: 4
66
66
  summary: Find unused Objective-C imports.