bonethug 0.0.76 → 0.0.77
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.
- data/lib/bonethug/version.rb +2 -2
- data/lib/bonethug/watcher.rb +12 -6
- metadata +4 -4
data/lib/bonethug/version.rb
CHANGED
data/lib/bonethug/watcher.rb
CHANGED
@@ -58,7 +58,7 @@ module Bonethug
|
|
58
58
|
concat_js = []
|
59
59
|
if js_concats = conf.get('watch.concat_js')
|
60
60
|
js_concats.each do |index, watch|
|
61
|
-
concat_js.push(src: watch.get('src'
|
61
|
+
concat_js.push(src: watch.get('src'), dest: watch.get('dest'), filter: watch.get('filter','Array'), type: :concat_js)
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
@@ -66,7 +66,7 @@ module Bonethug
|
|
66
66
|
concat_css = []
|
67
67
|
if css_concats = conf.get('watch.concat_css')
|
68
68
|
css_concats.each do |index, watch|
|
69
|
-
concat_css.push(src: watch.get('src'
|
69
|
+
concat_css.push(src: watch.get('src'), dest: watch.get('dest'), filter: watch.get('filter','Array'), type: :concat_css)
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
@@ -95,7 +95,7 @@ module Bonethug
|
|
95
95
|
end
|
96
96
|
|
97
97
|
# combine the watches
|
98
|
-
watches = coffee + sass + uglify + erb + slim
|
98
|
+
watches = coffee + sass + concat_js + concat_css + uglify + erb + slim
|
99
99
|
|
100
100
|
# Generate Guardfile
|
101
101
|
puts 'Generating Guardfile...'
|
@@ -110,11 +110,17 @@ module Bonethug
|
|
110
110
|
watch_val = "'#{watch[:filter]}'"
|
111
111
|
when 'Regexp'
|
112
112
|
watch_val = watch[:filter].inspect
|
113
|
+
when 'Array'
|
114
|
+
watch_val = "%w(#{watch[:filter].join(' ')})"
|
113
115
|
else
|
114
116
|
raise "invalid filter type: " + watch[:filter].class.name
|
115
117
|
end
|
116
118
|
|
117
|
-
|
119
|
+
if watch[:filter].class.name == 'Array'
|
120
|
+
filter = watch_val
|
121
|
+
else
|
122
|
+
filter = watch[:filter] ? "watch #{watch_val}" : ""
|
123
|
+
end
|
118
124
|
|
119
125
|
case type
|
120
126
|
when 'sprockets'
|
@@ -138,11 +144,11 @@ module Bonethug
|
|
138
144
|
"
|
139
145
|
elsif watch[:type] == :concat_css
|
140
146
|
guardfile_content += "
|
141
|
-
guard :concat, :output => '#{watch[:dest]}', :input_dir => #{watch[:src]
|
147
|
+
guard :concat, :output => '#{watch[:dest]}', :input_dir => '#{watch[:src]}', :type => 'css', :files => #{filter}
|
142
148
|
"
|
143
149
|
elsif watch[:type] == :concat_js
|
144
150
|
guardfile_content += "
|
145
|
-
guard :concat, :output => '#{watch[:dest]}', :input_dir => #{watch[:src]
|
151
|
+
guard :concat, :output => '#{watch[:dest]}', :input_dir => '#{watch[:src]}', :type => 'js', :files => #{filter}
|
146
152
|
"
|
147
153
|
elsif watch[:type] == :uglify
|
148
154
|
guardfile_content += "
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bonethug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.77
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-04-
|
12
|
+
date: 2014-04-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -556,7 +556,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
556
556
|
version: '0'
|
557
557
|
segments:
|
558
558
|
- 0
|
559
|
-
hash:
|
559
|
+
hash: 964366539695014773
|
560
560
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
561
561
|
none: false
|
562
562
|
requirements:
|
@@ -565,7 +565,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
565
565
|
version: '0'
|
566
566
|
segments:
|
567
567
|
- 0
|
568
|
-
hash:
|
568
|
+
hash: 964366539695014773
|
569
569
|
requirements: []
|
570
570
|
rubyforge_project:
|
571
571
|
rubygems_version: 1.8.23
|