roku 0.0.3 → 0.0.4

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/roku/version.rb +1 -1
  3. data/lib/roku/zip.rb +13 -2
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 60fe076a6e7109cf813d012b5a58b29945579e75
4
- data.tar.gz: 51debc4b6b0288e2d4910250cd10353d20865ede
3
+ metadata.gz: e21125460c3e1c23a62056d1b0e769247e0e710e
4
+ data.tar.gz: 2b0ab0402a0b3b010bd92ae6e5adcdcd68be566a
5
5
  SHA512:
6
- metadata.gz: 1af5b37845a1d08a15b2b7bded88c5a7611fd4089c96912fd2800609b3e85605b142ce072b9bcbd45a30a5bfd110db1976e4235b5e8e91d4f645eadb081b0a25
7
- data.tar.gz: cb7a58482af7be12258c4ce0f01d679077742aab7071fd89faae9a5f0908d4fbf8e79d9a282bcfc5000dc715da5d307e68d1da3554c1874b1d5329ee403aeca1
6
+ metadata.gz: 3de9353814831e3569298c3029cd3ba5b1edebd171db257a12573f9df03b953d5e49ce9591cbcec6574046c098b0d5c8f23eae333f4b40e516d5900ae2b9d7e1
7
+ data.tar.gz: c4413e09c976b2b2e740c8daf904b3f89ad985430bb47ecfe3214c27fb274c21c3b82e5e8a6f844c31bc73c29ddbcf403f7f22db59694fadedb59b1f30b6ef99
@@ -1,3 +1,3 @@
1
1
  module Roku
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -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 a minor class method addition on line 8 and dot file exclusion on line 9
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.3
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-07-31 00:00:00.000000000 Z
11
+ date: 2015-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip