thematic 0.0.4 → 0.0.5

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: 357a9903c979c8c7a017e58f58e8f04afecbff7e
4
- data.tar.gz: 73ad286317f94fec04f702e6286c6856f4d333c7
3
+ metadata.gz: 20d3831020ae50fe7a0c770df9af882292784bb5
4
+ data.tar.gz: b78bfc5b91e179e16678b7bd4b9869353afcd0ce
5
5
  SHA512:
6
- metadata.gz: 9aca30a45eb6ca6fffdff26d9f6c6eea4c550e08de7aeb404e6833a99c212dac61d024cf9cc0696072a7125d4fc466e328f51debb06cf83eeae22039436bb654
7
- data.tar.gz: 270296ecfa3fbf9a6a506cd45af2757dca853cf14de222606926acc0ed22fba9371619e27adc56f46ad14916ba02025af4a408eb6d330f2296ae7436e54dd553
6
+ metadata.gz: ab42c49b65dc9e55e6751c390db13d031c43ccd638f20607d7891f60aed513075331f3b3470d3224f0c8791900bb0b88ea185713aa5d63bb43d86cb8df296717
7
+ data.tar.gz: fa2f9da6136dcbf84000fc27e4a7ce12327cdac05aa9994e98b34278c5ea633165850c789d728f641fb9b624aa85ceee7094662a074825b3fb13c101cf43be79
@@ -22,12 +22,16 @@ namespace :thematic do
22
22
  tempfile = File.open("file.tmp", 'w')
23
23
  f.each do |line|
24
24
  if line =~/^*= require_tree ./ #we want to insert new require statements above this line
25
- Dir.open(copy_from_path).each do |filename|
26
- unless File.directory?("#{copy_from_path}/#{filename}") || filename[0] == "."
27
- copy("#{copy_from_path}/#{filename}", "vendor/assets/stylesheets/#{theme_subfolder}/")
28
- tempfile << " *= require #{filename.gsub('.css', '')}\n"
25
+ files_to_copy = Dir[ File.join(copy_from_path, '**', '*') ]
26
+
27
+ files_to_copy.each do |filepath|
28
+ unless File.directory?(filepath)
29
+ filename = filepath.split("/").last
30
+ copy(filepath, "vendor/assets/stylesheets/#{theme_subfolder}/")
31
+ tempfile << " *= require #{theme_subfolder}/#{filename.gsub('.css', '')}\n"
29
32
  end
30
33
  end
34
+
31
35
  end
32
36
  tempfile << line
33
37
  end
@@ -49,11 +53,14 @@ namespace :thematic do
49
53
 
50
54
  tempfile = File.open("file.tmp", 'w')
51
55
  f.each do |line|
52
- if line =~/^\/\/= require_tree ./ #we want to insert new require statements above this line
53
- Dir.open(copy_from_path).each do |filename|
54
- unless File.directory?("#{copy_from_path}/#{filename}") || filename[0] == "."
55
- copy("#{copy_from_path}/#{filename}", "vendor/assets/javascripts/#{theme_subfolder}/") unless File.directory?("#{copy_from_path}/#{filename}")
56
- tempfile << "//= require #{filename.gsub('.js', '')}\n"
56
+ if line =~/^\/\/= require_tree ./ #we want to insert new require statements above
57
+ files_to_copy = Dir[ File.join(copy_from_path, '**', '*') ]
58
+
59
+ files_to_copy.each do |filepath|
60
+ unless File.directory?(filepath)
61
+ filename = filepath.split("/").last
62
+ copy(filepath, "vendor/assets/javascripts/#{theme_subfolder}/")
63
+ tempfile << "//= require #{theme_subfolder}/#{filename.gsub('.js', '')}\n"
57
64
  end
58
65
  end
59
66
  end
@@ -1,3 +1,3 @@
1
1
  module Thematic
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thematic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jay Wengrow