guard-less 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # Guard-Less
2
2
 
3
+ A guard extension that compiles `.less` files to `.css` files when changed.
4
+
3
5
  ## Install
4
6
 
5
- You will need to have [guard](http://github.com/guard/guard) first.
7
+ You will need to have [Guard](https://github.com/guard/guard) first.
6
8
 
7
9
  Install the gem with:
8
10
 
@@ -15,13 +17,17 @@ Add an initial setup to your Guardfile with:
15
17
 
16
18
  ## Usage
17
19
 
18
- A guard extension that compiles `.less` files to `.css` files when changed.
20
+ Please read [Guard usage doc](https://github.com/guard/guard#readme).
21
+
22
+ ## Guardfile
19
23
 
20
24
  guard 'less' do
21
- watch('(.*\.less)$')
25
+ watch(/.*\.less$/)
22
26
  end
23
27
 
24
- #License
28
+ Please read [Guard doc](https://github.com/guard/guard#readme) for more info about Guardfile DSL.
29
+
30
+ # License
25
31
 
26
32
  **Copyright (c) 2011 Brendan Erwin**
27
33
 
@@ -1,33 +1,24 @@
1
- #-*- Mode: ruby; tab-width: 2; indent-tabs-mode: nil;
2
-
3
1
  require 'guard'
4
2
  require 'guard/guard'
5
-
6
3
  require 'less'
7
4
 
5
+ require File.dirname(__FILE__) + "/less/version"
6
+
8
7
  module Guard
9
8
  class Less < Guard
10
9
 
11
- VERSION = '0.0.1'
12
-
13
- def initialize(watchers = [], options = {})
14
- super
15
-
16
- @watchers = watchers
17
- end
18
-
19
10
  # ================
20
11
  # = Guard method =
21
12
  # ================
22
13
 
23
14
  def start
24
- puts "Guard::Less #{VERSION} is on the job!\n"
15
+ UI.info "Guard::Less #{LessVersion::VERSION} is on the job!"
25
16
  end
26
17
 
27
18
  # Call with Ctrl-/ signal
28
19
  # This method should be principally used for long action like running all specs/tests/...
29
20
  def run_all
30
- patterns = @watchers.map {|w| w.pattern}
21
+ patterns = @watchers.map { |w| w.pattern }
31
22
  files = Dir.glob('**/*.*')
32
23
  r = []
33
24
  files.each do |file|
@@ -42,7 +33,7 @@ module Guard
42
33
  def run_on_change(paths)
43
34
  paths.each do |file|
44
35
  unless File.basename(file)[0] == "_"
45
- puts "lessc - #{file}\n"
36
+ UI.info "lessc - #{file}\n"
46
37
  `lessc #{file} --verbose`
47
38
  end
48
39
  end
@@ -1,3 +1,3 @@
1
1
  guard 'less' do
2
- watch('(.*\.less)$')
2
+ watch(/.*\.less$/)
3
3
  end
@@ -0,0 +1,5 @@
1
+ module Guard
2
+ module LessVersion
3
+ VERSION = "0.0.2"
4
+ end
5
+ end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Brendan Erwin
@@ -14,11 +14,12 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-01-04 00:00:00 -05:00
17
+ date: 2011-01-05 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: guard
22
+ prerelease: false
22
23
  requirement: &id001 !ruby/object:Gem::Requirement
23
24
  none: false
24
25
  requirements:
@@ -27,13 +28,13 @@ dependencies:
27
28
  segments:
28
29
  - 0
29
30
  - 2
30
- - 1
31
- version: 0.2.1
31
+ - 2
32
+ version: 0.2.2
32
33
  type: :runtime
33
- prerelease: false
34
34
  version_requirements: *id001
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: less
37
+ prerelease: false
37
38
  requirement: &id002 !ruby/object:Gem::Requirement
38
39
  none: false
39
40
  requirements:
@@ -44,24 +45,7 @@ dependencies:
44
45
  - 2
45
46
  version: "1.2"
46
47
  type: :runtime
47
- prerelease: false
48
48
  version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- name: rspec
51
- requirement: &id003 !ruby/object:Gem::Requirement
52
- none: false
53
- requirements:
54
- - - ~>
55
- - !ruby/object:Gem::Version
56
- segments:
57
- - 2
58
- - 0
59
- - 0
60
- - rc
61
- version: 2.0.0.rc
62
- type: :development
63
- prerelease: false
64
- version_requirements: *id003
65
49
  description: Guard::Less automatically compiles less (like lessc --watch)
66
50
  email:
67
51
  - brendanjerwin@gmail.com
@@ -73,10 +57,11 @@ extra_rdoc_files: []
73
57
 
74
58
  files:
75
59
  - lib/guard/less/templates/Guardfile
60
+ - lib/guard/less/version.rb
76
61
  - lib/guard/less.rb
77
62
  - README.md
78
63
  has_rdoc: true
79
- homepage: http://rubygems.org/gems/guard-less
64
+ homepage: https://github.com/guard/guard-less
80
65
  licenses: []
81
66
 
82
67
  post_install_message: