guard-bower_rails 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +55 -0
- data/lib/guard/bower_rails.rb +51 -0
- data/lib/guard/bower_rails/templates/Guardfile +3 -0
- data/lib/guard/bower_rails/version.rb +5 -0
- metadata +91 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1d47766f9fb943d443bdbe3c80b534c54633081e
|
4
|
+
data.tar.gz: a82bb01b6795621adc23f5a5980c697aca41af71
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 250ab50344665482f64130ba2f37a1c2231198561e7fb50ae7bd1f8741d1d78c2aa5586e99d342a357e768e3c2a48cdad1ea0b842badee520ff5ea4e5d15f747
|
7
|
+
data.tar.gz: 66d12cc8f0e5a485e1729f09250e5ae3c53a02689257d76616114c2f190ab030e1d590cdbd35fbda8dd7078325e00c226633e683856b8b5837172ee7d27620a1
|
data/README.md
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
# Guard::BowerRails
|
2
|
+
|
3
|
+
Guard::BowerRails allows to automatically install/update bower when needed.
|
4
|
+
|
5
|
+
guard-bower_rails is inspired by
|
6
|
+
[guard-bower](https://github.com/mickey/guard-bower)
|
7
|
+
|
8
|
+
## Install
|
9
|
+
|
10
|
+
Add the gem to your `Gemfile`:
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
group :development do
|
14
|
+
gem 'guard-bower_rails', require: false
|
15
|
+
end
|
16
|
+
```
|
17
|
+
|
18
|
+
Add the plugin definition to your Guardfile by running this command:
|
19
|
+
|
20
|
+
```bash
|
21
|
+
$ guard init bower_rails
|
22
|
+
```
|
23
|
+
|
24
|
+
## Usage
|
25
|
+
|
26
|
+
Please read the [Guard usage doc](https://github.com/guard/guard#readme)
|
27
|
+
|
28
|
+
## Guardfile
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
guard :bower_rails do
|
32
|
+
watch('Bowerfile')
|
33
|
+
end
|
34
|
+
```
|
35
|
+
|
36
|
+
Please read the [Guard usage doc](https://github.com/guard/guard#readme) for more information about the Guardfile DSL.
|
37
|
+
|
38
|
+
## Development
|
39
|
+
|
40
|
+
* Documentation hosted at [RubyDoc](http://rubydoc.info/github/xinminlabs/guard-bower_rails/master/frames).
|
41
|
+
* Source hosted at [GitHub](https://github.com/xinminlabs/guard-bower_rails).
|
42
|
+
|
43
|
+
Pull requests are very welcome! Please try to follow these simple rules if applicable:
|
44
|
+
|
45
|
+
* Please create a topic branch for every separate change you make.
|
46
|
+
* Update the [README](https://github.com/xinminlabs/guard-bower_rails/blob/master/README.md).
|
47
|
+
* Please **do not change** the version number.
|
48
|
+
|
49
|
+
## Author
|
50
|
+
|
51
|
+
[Richard Huang](https://github.com/flyerhzm)
|
52
|
+
|
53
|
+
## Contributors
|
54
|
+
|
55
|
+
[https://github.com/xinminlabs/guard-bower_rails/graphs/contributors](https://github.com/xinminlabs/guard-bower_rails/graphs/contributors)
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'guard'
|
3
|
+
|
4
|
+
module Guard
|
5
|
+
class BowerRails < Plugin
|
6
|
+
def initialize(options = {})
|
7
|
+
super
|
8
|
+
end
|
9
|
+
|
10
|
+
def start
|
11
|
+
bower_install
|
12
|
+
end
|
13
|
+
|
14
|
+
def stop
|
15
|
+
end
|
16
|
+
|
17
|
+
def reload
|
18
|
+
bower_install
|
19
|
+
end
|
20
|
+
|
21
|
+
def run_all
|
22
|
+
bower_install
|
23
|
+
end
|
24
|
+
|
25
|
+
def run_on_additions(paths)
|
26
|
+
bower_install
|
27
|
+
end
|
28
|
+
|
29
|
+
def run_on_modifications(paths)
|
30
|
+
bower_install
|
31
|
+
end
|
32
|
+
|
33
|
+
def run_on_removals(paths)
|
34
|
+
bower_install
|
35
|
+
end
|
36
|
+
|
37
|
+
private
|
38
|
+
|
39
|
+
def bower_install
|
40
|
+
if system "rake bower:install"
|
41
|
+
UI.info "Bower install"
|
42
|
+
Notifier.notify "Bower install"
|
43
|
+
true
|
44
|
+
else
|
45
|
+
UI.error "Bower install failed"
|
46
|
+
Notifier.notify "Bower install failed", :title => 'Bower', :image => :failed
|
47
|
+
false
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
metadata
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: guard-bower_rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Richard Huang
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-02-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: guard
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.2'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.2'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.3'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.3'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Guard::BowerRails automatically install/update your bower dependencies
|
56
|
+
when needed
|
57
|
+
email:
|
58
|
+
- flyerhzm@gmail.com
|
59
|
+
executables: []
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- README.md
|
64
|
+
- lib/guard/bower_rails.rb
|
65
|
+
- lib/guard/bower_rails/templates/Guardfile
|
66
|
+
- lib/guard/bower_rails/version.rb
|
67
|
+
homepage: https://rubygems.org/gems/guard-bower_rails
|
68
|
+
licenses:
|
69
|
+
- MIT
|
70
|
+
metadata: {}
|
71
|
+
post_install_message:
|
72
|
+
rdoc_options: []
|
73
|
+
require_paths:
|
74
|
+
- lib
|
75
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: 1.9.2
|
80
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
85
|
+
requirements: []
|
86
|
+
rubyforge_project:
|
87
|
+
rubygems_version: 2.4.5
|
88
|
+
signing_key:
|
89
|
+
specification_version: 4
|
90
|
+
summary: Guard gem for bower-rails
|
91
|
+
test_files: []
|