bigfiles 0.1.0 → 0.1.1

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: 41d328a76b807f9b04515205d044fb073501e061
4
- data.tar.gz: aaf0ace57859750f58e8b96317d6c454d143cb8f
3
+ metadata.gz: 081838b533410641cc43b8f85912bc2dd5df243a
4
+ data.tar.gz: eb79f6b36dbd021cddda1953a11ccb0acf8db24c
5
5
  SHA512:
6
- metadata.gz: 2bfd66a70391b9772bcfe9f4403bd568b9f3bad61630361bedb310b58441767b90d1cb24a33c68ff560bcdda415954d9d902a5995b45095f5e02341f88203414
7
- data.tar.gz: 0079f1c6572aef4fd1a5694ec29a6723c225daf65bdce97064f71f3d25e9663d2a7cbb9aa530e7d3c36f7aeb4385d004fcbf73a80fa5196c9472098e0bda02c9
6
+ metadata.gz: a58fb9c1c23c171463c59812935609e43d25a55d4b148e30eb6d9f3e0903434e486191d965c380827118fa430a6050a923c2af444e52b638a0b502fab090735c
7
+ data.tar.gz: 6325b25b5bda5110d8e6ae465b63120539a9aa88159762474153c5e7a88011bdfa680865504067c61ed53d41c0ed03f9ea825e963d4d3eb9853fc30d7a398e06
data/bigfiles.gemspec CHANGED
@@ -26,6 +26,7 @@ Gem::Specification.new do |s|
26
26
  s.rubygems_version = '1.3.6'
27
27
  s.summary = 'Finds largest source files in a project'
28
28
 
29
+ s.add_development_dependency('source_finder')
29
30
  s.add_development_dependency('bundler')
30
31
  s.add_development_dependency('rake')
31
32
  s.add_development_dependency('quality')
data/lib/bigfiles.rb CHANGED
@@ -1,10 +1,7 @@
1
1
  require 'optparse'
2
2
 
3
- require_relative 'bigfiles/source_code_finder'
4
3
  require_relative 'bigfiles/file_with_lines'
5
-
6
- # XXX: Take out source_file_globber.rb from quality into its own gem
7
- # and start building on that.
4
+ require 'source_finder/source_file_globber'
8
5
 
9
6
  # Simple tool to find the largest source files in your project.
10
7
  module BigFiles
@@ -14,12 +11,12 @@ module BigFiles
14
11
  io: Kernel,
15
12
  exiter: Kernel,
16
13
  file_with_lines: FileWithLines,
17
- source_file_finder: SourceCodeFinder.new,
14
+ source_file_globber: SourceFinder::SourceFileGlobber.new,
18
15
  option_parser_class: OptionParser)
19
16
  @io = io
20
17
  @exiter = exiter
21
18
  @file_with_lines = file_with_lines
22
- @source_file_finder = source_file_finder
19
+ @source_file_globber = source_file_globber
23
20
  @option_parser_class = option_parser_class
24
21
  @options = parse_options(args)
25
22
  end
@@ -33,6 +30,7 @@ module BigFiles
33
30
  options
34
31
  end
35
32
 
33
+ # XXX: Move to using SourceFinder for this
36
34
  DEFAULT_GLOB =
37
35
  '{app,lib,test,spec,feature}/**/*.{rb,swift,cpp,c,java,py}'
38
36
 
@@ -79,7 +77,9 @@ module BigFiles
79
77
  end
80
78
 
81
79
  def find_analyze_and_report_on_files
82
- file_list = @source_file_finder.find(glob, exclude_glob)
80
+ @source_file_globber.source_files_glob = glob
81
+ @source_file_globber.source_files_exclude_glob = exclude_glob
82
+ file_list = @source_file_globber.source_files
83
83
  files_with_lines = file_list.map do |filename|
84
84
  @file_with_lines.new(filename)
85
85
  end
@@ -1,4 +1,4 @@
1
1
  # Tool to find the largest source files in your project
2
2
  module BigFiles
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bigfiles
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vince Broz
@@ -10,6 +10,20 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2015-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: source_finder
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -94,7 +108,6 @@ files:
94
108
  - bin/bigfiles
95
109
  - lib/bigfiles.rb
96
110
  - lib/bigfiles/file_with_lines.rb
97
- - lib/bigfiles/source_code_finder.rb
98
111
  - lib/bigfiles/version.rb
99
112
  homepage: http://github.com/apiology/bigfiles
100
113
  licenses:
@@ -1,16 +0,0 @@
1
- require 'find'
2
-
3
- module BigFiles
4
- # Finds source code files in the current directory
5
- class SourceCodeFinder
6
- def initialize(filefind: Find,
7
- globber: Dir)
8
- @filefind = filefind
9
- @globber = globber
10
- end
11
-
12
- def find(glob, exclude_glob)
13
- @globber.glob(glob) - @globber.glob(exclude_glob)
14
- end
15
- end
16
- end