guard-sprockets2 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -5,3 +5,4 @@ pkg/*
5
5
  examples/rails_app/public/assets/*
6
6
  examples/sinatra_app/public/assets/*
7
7
  tmp/*
8
+ .sass-cache
data/README.md CHANGED
@@ -24,6 +24,7 @@ Configure guard for your environment. The following options are available:
24
24
  that need compiling. Defaults to `[ /\w+\.(?!js|css).+/, /application.(css|js)$/ ]`
25
25
  - `digest` - Optional. Whether to include the digest in the filename. Defaults to true.
26
26
  - `gz` - Optional. Whether to compile a gzipped version of each file. Defaults to true.
27
+ - `clean` - Optional. Whether to remove all files in the asset path. Defaults to true.
27
28
 
28
29
  Example Rails and Sinatra apps can be found in the examples directory.
29
30
 
@@ -27,7 +27,7 @@ module Guard
27
27
  protected
28
28
 
29
29
  def compile_assets
30
- @compiler.clean
30
+ @compiler.clean unless options[:clean] == false
31
31
  print "Compiling assets... " unless ENV["GUARD_ENV"] == "test"
32
32
  successful = true
33
33
  time_taken = time do
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module Sprockets2Version
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
5
5
  end
@@ -39,9 +39,8 @@ describe Guard::Sprockets2::Compiler do
39
39
  app_js_gz_path.should exist
40
40
  end
41
41
 
42
- it "returns true" do
43
- write_hello_coffee("console.log 'hello'")
44
- subject.compile.should be_true
42
+ describe '#compile' do
43
+ specify { subject.compile.should be_true }
45
44
  end
46
45
 
47
46
  context 'with an error' do
@@ -50,8 +49,8 @@ describe Guard::Sprockets2::Compiler do
50
49
  @result = subject.compile
51
50
  end
52
51
 
53
- it "returns false" do
54
- @result.should be_false
52
+ describe '#compile' do
53
+ specify { @result.should be_false }
55
54
  end
56
55
 
57
56
  it "works when the error has been fixed" do
@@ -23,4 +23,20 @@ describe Guard::Sprockets2 do
23
23
  end
24
24
  end
25
25
 
26
+ context 'with clean disabled' do
27
+ before do
28
+ @options = {:option => true, :clean => false}
29
+ @guard = described_class.new(['watchers'], @options)
30
+ end
31
+
32
+ %w[ start run_all run_on_change ].each do |method|
33
+ describe "##{method}" do
34
+ it "should not clean" do
35
+ @compiler.should_not_receive(:clean)
36
+ @guard.send(method)
37
+ end
38
+ end
39
+ end
40
+ end
41
+
26
42
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-sprockets2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-20 00:00:00.000000000Z
12
+ date: 2011-11-19 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: guard
16
- requirement: &70258732026820 !ruby/object:Gem::Requirement
16
+ requirement: &70155410226660 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70258732026820
24
+ version_requirements: *70155410226660
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sprockets
27
- requirement: &70258732025400 !ruby/object:Gem::Requirement
27
+ requirement: &70155409933060 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '2.0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70258732025400
35
+ version_requirements: *70155409933060
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &70258732024460 !ruby/object:Gem::Requirement
38
+ requirement: &70155409927500 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70258732024460
46
+ version_requirements: *70155409927500
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: coffee-script
49
- requirement: &70258732023200 !ruby/object:Gem::Requirement
49
+ requirement: &70155409918360 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70258732023200
57
+ version_requirements: *70155409918360
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: uglifier
60
- requirement: &70258732022200 !ruby/object:Gem::Requirement
60
+ requirement: &70155409912740 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70258732022200
68
+ version_requirements: *70155409912740
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: sass
71
- requirement: &70258732021360 !ruby/object:Gem::Requirement
71
+ requirement: &70155409910440 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70258732021360
79
+ version_requirements: *70155409910440
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: sinatra
82
- requirement: &70258732020600 !ruby/object:Gem::Requirement
82
+ requirement: &70155409906640 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70258732020600
90
+ version_requirements: *70155409906640
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: cucumber
93
- requirement: &70258732019960 !ruby/object:Gem::Requirement
93
+ requirement: &70155409904100 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *70258732019960
101
+ version_requirements: *70155409904100
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: aruba
104
- requirement: &70258732019300 !ruby/object:Gem::Requirement
104
+ requirement: &70155409902380 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *70258732019300
112
+ version_requirements: *70155409902380
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: rails
115
- requirement: &70258732018100 !ruby/object:Gem::Requirement
115
+ requirement: &70155409899720 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ~>
@@ -120,7 +120,7 @@ dependencies:
120
120
  version: '3.1'
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *70258732018100
123
+ version_requirements: *70155409899720
124
124
  description: ''
125
125
  email:
126
126
  - steve@hodgkiss.me
@@ -211,7 +211,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
211
211
  version: '0'
212
212
  segments:
213
213
  - 0
214
- hash: -482744400968965211
214
+ hash: 2561819613360142821
215
215
  required_rubygems_version: !ruby/object:Gem::Requirement
216
216
  none: false
217
217
  requirements:
@@ -220,7 +220,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
220
220
  version: '0'
221
221
  segments:
222
222
  - 0
223
- hash: -482744400968965211
223
+ hash: 2561819613360142821
224
224
  requirements: []
225
225
  rubyforge_project: guard-sprockets2
226
226
  rubygems_version: 1.8.6