roku 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/roku/version.rb +1 -1
- data/lib/roku/zip.rb +13 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e21125460c3e1c23a62056d1b0e769247e0e710e
|
4
|
+
data.tar.gz: 2b0ab0402a0b3b010bd92ae6e5adcdcd68be566a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3de9353814831e3569298c3029cd3ba5b1edebd171db257a12573f9df03b953d5e49ce9591cbcec6574046c098b0d5c8f23eae333f4b40e516d5900ae2b9d7e1
|
7
|
+
data.tar.gz: c4413e09c976b2b2e740c8daf904b3f89ad985430bb47ecfe3214c27fb274c21c3b82e5e8a6f844c31bc73c29ddbcf403f7f22db59694fadedb59b1f30b6ef99
|
data/lib/roku/version.rb
CHANGED
data/lib/roku/zip.rb
CHANGED
@@ -1,13 +1,24 @@
|
|
1
1
|
# This example is pulled straight from https://github.com/rubyzip/rubyzip/blob/master/samples/example_recursive.rb
|
2
|
-
# With the exception of
|
2
|
+
# With the exception of:
|
3
|
+
# minor class method addition on line 12
|
4
|
+
# dot file exclusion on line 14
|
5
|
+
# is_build_directory? method on line 18
|
6
|
+
#
|
7
|
+
# TODO: This file is in need of complete rewrite
|
8
|
+
#
|
3
9
|
require 'zip'
|
4
10
|
|
5
11
|
module Roku
|
6
12
|
class Zip
|
7
13
|
|
8
14
|
def self.generate(input, output); new(input, output).write; end
|
15
|
+
|
9
16
|
def files_in(dir)
|
10
|
-
Dir.entries(dir).select {|file| file =~ /^[^\.]/ }
|
17
|
+
Dir.entries(dir).select {|file| file =~ /^[^\.]/ && !is_build_directory?(dir, file) }
|
18
|
+
end
|
19
|
+
|
20
|
+
def is_build_directory?(current_directory, file)
|
21
|
+
!!(@outputFile =~ Regexp.new(current_directory + "/#{file}/(?:[^\/]*)\.zip"))
|
11
22
|
end
|
12
23
|
|
13
24
|
# Initialize with the directory to zip and the location of the output archive.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roku
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Baldwin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|