wcr 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 +4 -4
- data/lib/wcr.rb +3 -1
- data/lib/wcr/arguments_parser.rb +4 -0
- data/lib/wcr/command.rb +6 -2
- data/lib/wcr/version.rb +3 -0
- data/wcr.gemspec +6 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bec05f739eb92b8fbd916e69c4ed14f81a92487f
|
4
|
+
data.tar.gz: 4125d8ea9543444527bc936ac438c71c5500e0db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 724a2b5fb950c1b2910ed9319a7c8a3ce9c5611f6df469adf711f25ab1b4a6887d5a5ec2deb7519137d38efc84b886655296f6cc25759223beac06c1b6d3aa0b
|
7
|
+
data.tar.gz: 8afbb5fc8ce8a16e532d5cec96fdffe798726262a458a440082c6e0d1bade30dccb3ba7634725b42ecb58cca03ea50985a1aaf73f7f69afc51aea7ef8be07692
|
data/lib/wcr.rb
CHANGED
data/lib/wcr/arguments_parser.rb
CHANGED
data/lib/wcr/command.rb
CHANGED
@@ -1,9 +1,13 @@
|
|
1
|
-
require 'wcr/arguments_parser'
|
2
|
-
|
3
1
|
module WordCountRecursive
|
4
2
|
class Command
|
5
3
|
def initialize
|
6
4
|
@paths, @options = ::WordCountRecursive::ArgumentsParser.new.parse
|
5
|
+
|
6
|
+
if @options.include? :version
|
7
|
+
puts @options[:version]
|
8
|
+
exit(1)
|
9
|
+
end
|
10
|
+
|
7
11
|
@command = `wc #{@options[:command_opts]} #{"\`find #{@paths || '.'} -type f #{@options[:hidden_files]}\`"}`
|
8
12
|
@command = @command.split('\n').grep(/^[^\.]/)
|
9
13
|
end
|
data/lib/wcr/version.rb
ADDED
data/wcr.gemspec
CHANGED
@@ -1,7 +1,11 @@
|
|
1
|
+
lib = File.expand_path('../lib', __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib)
|
3
|
+
require "wcr"
|
4
|
+
|
1
5
|
Gem::Specification.new do |s|
|
2
6
|
s.name = 'wcr'
|
3
|
-
s.version =
|
4
|
-
s.date =
|
7
|
+
s.version = WordCountRecursive::VERSION
|
8
|
+
s.date = Time.now.strftime("%F")
|
5
9
|
s.summary = "wc-recursive"
|
6
10
|
s.description = "A wrapper on wc command. Permit to execute wc recursively with a more flexible argument parser."
|
7
11
|
s.homepage = 'https://github.com/mehdi-farsi/wcr'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wcr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mehdi Farsi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A wrapper on wc command. Permit to execute wc recursively with a more
|
14
14
|
flexible argument parser.
|
@@ -25,6 +25,7 @@ files:
|
|
25
25
|
- lib/wcr.rb
|
26
26
|
- lib/wcr/arguments_parser.rb
|
27
27
|
- lib/wcr/command.rb
|
28
|
+
- lib/wcr/version.rb
|
28
29
|
- wcr.gemspec
|
29
30
|
homepage: https://github.com/mehdi-farsi/wcr
|
30
31
|
licenses:
|
@@ -46,7 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
46
47
|
version: '0'
|
47
48
|
requirements: []
|
48
49
|
rubyforge_project:
|
49
|
-
rubygems_version: 2.
|
50
|
+
rubygems_version: 2.4.5.1
|
50
51
|
signing_key:
|
51
52
|
specification_version: 4
|
52
53
|
summary: wc-recursive
|