guard-rails-assets 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.
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Guard::RailsAssets
2
2
 
3
3
 
4
- Guard::RailsAssets compiles all the assets in Rails 3.1 application automatically when files are modified.
4
+ Guard::RailsAssets compiles the assets in Rails 3.1 application automatically when files are modified.
5
5
 
6
6
  Tested on MRI Ruby 1.9.2 (please report if it works on your platform).
7
7
 
@@ -42,10 +42,10 @@ As of current Rails 3.1 edge that means that the assets will be deleted before t
42
42
 
43
43
  In addition to the standard configuration, this Guard has options to specify when exacly to precompile assets.
44
44
 
45
- - `:start` - compile assets when the guard starts (default)
46
- - `:reload` - compile assets when the guard quites (Ctrl-C) (not enabled)
47
- - `:all` - compile assets when running all the guard (Ctrl-/) (default)
48
- - `:change` - compile assets when watched files change (default)
45
+ - `:start` - compile assets when the guard starts (enabled by default)
46
+ - `:change` - compile assets when watched files change (enabled by default)
47
+ - `:reload` - compile assets when the guard quites (Ctrl-C) (not enabled by default)
48
+ - `:all` - compile assets when running all the guards (Ctrl-/) (not enabled by default)
49
49
 
50
50
  For example:
51
51
 
@@ -62,7 +62,7 @@ guard 'rails-assets', :run_on => [:start, :change] do
62
62
  end
63
63
 
64
64
  # This is the default behaviour
65
- guard 'rails-assets', :run_on => [:start, :change, :all] do
65
+ guard 'rails-assets', :run_on => [:start, :change] do
66
66
  watch(%r{^app/assets/.+$})
67
67
  end
68
68
  ```
@@ -75,7 +75,24 @@ end
75
75
 
76
76
  Pull requests are very welcome!
77
77
 
78
- ## License
78
+ ## Licensed under WTFPL
79
+
80
+ ```
81
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
82
+ Version 2, December 2004
83
+
84
+ Copyright (C) 2011 Dmytrii Nagirniak <dnagir@gmail.com>
85
+
86
+ Everyone is permitted to copy and distribute verbatim or modified
87
+ copies of this license document, and changing it is allowed as long
88
+ as the name is changed.
89
+
90
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
91
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
92
+
93
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
94
+ ```
95
+
96
+
79
97
 
80
- MIT License
81
98
 
@@ -34,11 +34,9 @@ module Guard
34
34
  end
35
35
  end
36
36
 
37
- private
38
-
39
37
  def run_for? command
40
38
  run_on = @options[:run_on]
41
- run_on = [:start, :change] if not run_on or run_on.empty?
39
+ run_on = [:start, :change] if not run_on or run_on.to_s.empty?
42
40
  run_on = [run_on] unless run_on.respond_to?(:include?)
43
41
  run_on.include?(command)
44
42
  end
data/lib/guard/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module RailsAssetsVersion
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
@@ -21,6 +21,19 @@ describe Guard::RailsAssets do
21
21
  it_behaves_like 'guard command', :command => :run_on_change, :run => true
22
22
  end
23
23
 
24
+ describe 'run options' do
25
+ it 'should allow array of symbols' do
26
+ guard = Guard::RailsAssets.new(['watchers'], :run_on => [:start, :change])
27
+ guard.run_for?(:start).should be_true
28
+ guard.run_for?(:reload).should be_false
29
+ end
30
+
31
+ it 'should allow symbol' do
32
+ guard = Guard::RailsAssets.new(['watchers'], :run_on => :start)
33
+ guard.run_for?(:start).should be_true
34
+ guard.run_for?(:reload).should be_false
35
+ end
36
+ end
24
37
 
25
38
  describe 'asset compilation using CLI' do
26
39
  def stub_system_with result
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-rails-assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
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-07-08 00:00:00.000000000Z
12
+ date: 2011-07-16 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: guard
16
- requirement: &18207700 !ruby/object:Gem::Requirement
16
+ requirement: &18715380 !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: *18207700
24
+ version_requirements: *18715380
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &18176800 !ruby/object:Gem::Requirement
27
+ requirement: &18714840 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *18176800
35
+ version_requirements: *18714840
36
36
  description: guard-rails-assets automatically generates JavaScript, CSS, Image files
37
37
  using Rails assets pipelie
38
38
  email:
@@ -65,18 +65,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
65
65
  - - ! '>='
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
- segments:
69
- - 0
70
- hash: 3447106499935285699
71
68
  required_rubygems_version: !ruby/object:Gem::Requirement
72
69
  none: false
73
70
  requirements:
74
71
  - - ! '>='
75
72
  - !ruby/object:Gem::Version
76
73
  version: '0'
77
- segments:
78
- - 0
79
- hash: 3447106499935285699
80
74
  requirements: []
81
75
  rubyforge_project: guard-rails-assets
82
76
  rubygems_version: 1.8.5