cocoapods-ack_filter 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: 4e92cf63e8d0d7b8c62fcee828ee0f0117b3c774
4
- data.tar.gz: 922ef95c7f0eaea0740f2ddc296907cea3732107
3
+ metadata.gz: 0d1477e23b10a98d27ce16bf1e8990af7c946f37
4
+ data.tar.gz: 44e5edfe9d9714af26b0da910629633ffedddfd9
5
5
  SHA512:
6
- metadata.gz: 3e1bb08069418d166f9d49d4880ab5e364c10dd6d312c688a256c1dfaa24b0cb7b63d80bf921ad0f4a83f998d255f197d1ac28c20ce86d20152b313c389ddfc3
7
- data.tar.gz: b573de61b558b58d24e99a196e6c54e19f19139090580acef072254b9296447159b19feba77d7224aaca4f801d2586cc8e6271161e5c0753781f1b1c024b0145
6
+ metadata.gz: e4a4d0146858da6b5bc150a997d97b80adcd02b072c41ac4acc87f22cf4768c918c202c37cefc0024fa83c6c221001d795765a663bf01c1b7a5f1e5bac01f522
7
+ data.tar.gz: 3a97fbd6b6c4b652b53f35f2807b78e334f6144f0fb92c390da54c4c2fd9d34c9ff85c85c8a5d6b66fe02336d9481f6ecada92ebd7b10ec425e408031497880f
data/README.md CHANGED
@@ -21,10 +21,11 @@ Or install it yourself as:
21
21
  ## Usage
22
22
 
23
23
  ```
24
- pod ack-filter PATTERN [--output=FILENAME]
24
+ pod ack-filter PATTERN [--input=FILENAME] [--output=FILENAME]
25
25
  ```
26
26
 
27
27
  - PATTERN is regexp pattern string
28
+ - --input is input acknowledgements.plist filename
28
29
  - --output is output filename
29
30
 
30
31
  ### Example
@@ -1,5 +1,5 @@
1
1
  module Cocoapods
2
2
  module AckFilter
3
- VERSION = "0.1.1"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -4,15 +4,14 @@ require 'CFPropertyList'
4
4
  module Pod
5
5
  class Command
6
6
  class AckFilter < Command
7
- ACKNOWLEDGEMENTS_FILE = 'Pods/Target Support Files/Pods/Pods-acknowledgements.plist'
8
-
9
7
  self.summary = 'Filter out licenses with pattern from Pods-acknowledgements.plist'
10
8
  self.arguments = [
11
9
  CLAide::Argument.new("PATTERN", true)
12
10
  ]
13
11
 
14
12
  def self.options
15
- [['--output=FILENAME', 'Output filtered acknowledgements to FILENAME']]
13
+ [['--input=FILE_PATH', 'Read acknowledgements file from FILE_PATH'],
14
+ ['--output=FILENAME', 'Output filtered acknowledgements to FILENAME']]
16
15
  end
17
16
 
18
17
  def self.filter(args, &block)
@@ -22,12 +21,14 @@ module Pod
22
21
  def initialize(argv, &block)
23
22
  if argv.kind_of?(CLAide::ARGV)
24
23
  @pattern = Regexp.new(argv.shift_argument) unless argv.empty?
24
+ @input = argv.option('input')
25
25
  @filename = argv.option('output')
26
26
  super
27
27
  else
28
28
  if argv[:pattern]
29
29
  @pattern = argv[:pattern].kind_of?(Regexp) ? argv[:pattern] : Regexp.new(argv[:pattern])
30
30
  end
31
+ @input = argv[:input]
31
32
  @filename = argv[:output]
32
33
  @filter_block = block
33
34
  end
@@ -38,12 +39,16 @@ module Pod
38
39
  help! 'Specify filtering pattern' if !@pattern && !@filter_block
39
40
  end
40
41
 
42
+ def input
43
+ @input || 'Pods/Target Support Files/Pods/Pods-acknowledgements.plist'
44
+ end
45
+
41
46
  def output_filename
42
47
  @filename || 'Acknowledgements.plist'
43
48
  end
44
49
 
45
50
  def run
46
- plist = CFPropertyList::List.new(file: ACKNOWLEDGEMENTS_FILE)
51
+ plist = CFPropertyList::List.new(file: input)
47
52
  specs = plist.value.value['PreferenceSpecifiers']
48
53
  specs.value.reject! do |spec|
49
54
  if @filter_block
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-ack_filter
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
  - Yusuke Mito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-13 00:00:00.000000000 Z
11
+ date: 2015-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods
@@ -116,8 +116,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  version: '0'
117
117
  requirements: []
118
118
  rubyforge_project:
119
- rubygems_version: 2.0.14
119
+ rubygems_version: 2.2.2
120
120
  signing_key:
121
121
  specification_version: 4
122
122
  summary: Filter out licenses with pattern from Pods-acknowledgements.plist
123
123
  test_files: []
124
+ has_rdoc: