guard-bundler 0.1.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,62 @@
1
+ # Guard::Bundler
2
+
3
+ Bundler guard allows to automatically & intelligently install/update bundle when needed.
4
+
5
+ * Compatible with Bundler 1.0.x
6
+ * Tested against Ruby 1.8.7, 1.9.2, 1.9.3, REE and the latest versions of Rubinius.
7
+
8
+ ## Install
9
+
10
+ Please be sure to have [Guard](https://github.com/guard/guard) installed before continue.
11
+
12
+ Install the gem:
13
+
14
+ ```
15
+ $ gem install guard-bundler
16
+ ```
17
+
18
+ Add it to your Gemfile (inside development group):
19
+
20
+ ``` ruby
21
+ group :development do
22
+ gem 'guard-bundler'
23
+ end
24
+ ```
25
+
26
+ Add guard definition to your Guardfile by running this command:
27
+
28
+ ```
29
+ $ guard init bundler
30
+ ```
31
+
32
+ ## Usage
33
+
34
+ Please read [Guard usage doc](https://github.com/guard/guard#readme)
35
+
36
+ ## Guardfile
37
+
38
+ Bundler guard can be really adapted to all kind of projects.
39
+
40
+ ### Standard RubyGem project
41
+
42
+ ```ruby
43
+ guard 'bundler' do
44
+ watch('Gemfile')
45
+ # Uncomment next line if Gemfile contain `gemspec' command
46
+ # watch(/^.+\.gemspec/)
47
+ end
48
+ ```
49
+
50
+ Please read [Guard doc](https://github.com/guard/guard#readme) for more information about the Guardfile DSL.
51
+
52
+ == Development
53
+
54
+ * Source hosted at [GitHub](https://github.com/guard/guard-bundler)
55
+ * Report issues/Questions/Feature requests on [GitHub Issues](https://github.com/guard/guard-bundler/issues)
56
+
57
+ Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change
58
+ you make.
59
+
60
+ == Authors
61
+
62
+ {Yann Lugrin}[https://github.com/yannlugrin]
@@ -7,12 +7,6 @@ module Guard
7
7
  class Bundler < Guard
8
8
  autoload :Notifier, 'guard/bundler/notifier'
9
9
 
10
- def initialize(watchers = [], options = {})
11
- super
12
-
13
- options[:notify] = true if options[:notify].nil?
14
- end
15
-
16
10
  def start
17
11
  refresh_bundle
18
12
  end
@@ -21,28 +15,36 @@ module Guard
21
15
  refresh_bundle
22
16
  end
23
17
 
24
- def run_on_change(paths = [])
18
+ def run_all
25
19
  refresh_bundle
26
20
  end
27
21
 
28
- private
22
+ def run_on_additions(paths = [])
23
+ refresh_bundle
24
+ end
29
25
 
30
- def notify?
31
- !!options[:notify]
26
+ def run_on_modifications(paths = [])
27
+ refresh_bundle
28
+ end
29
+
30
+ def cli?
31
+ !!options[:cli]
32
32
  end
33
33
 
34
+ private
35
+
34
36
  def refresh_bundle
35
37
  if bundle_need_refresh?
36
- UI.info 'Refresh bundle', :reset => true
38
+ ::Guard::UI.info 'Refresh bundle', :reset => true
37
39
  start_at = Time.now
38
40
  ::Bundler.with_clean_env do
39
- @result = system('bundle install')
41
+ @result = system("bundle install#{" #{options[:cli]}" if options[:cli]}")
40
42
  end
41
- Notifier::notify(@result, Time.now - start_at) if notify?
43
+ Notifier.notify(@result, Time.now - start_at)
42
44
  @result
43
45
  else
44
46
  UI.info 'Bundle already up-to-date', :reset => true
45
- Notifier::notify('up-to-date', nil) if notify?
47
+ Notifier.notify('up-to-date', nil)
46
48
  true
47
49
  end
48
50
  end
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  module Guard
3
3
  module BundlerVersion
4
- VERSION = '0.1.3'
4
+ VERSION = '1.0.0'
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,107 +1,119 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: guard-bundler
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
4
5
  prerelease:
5
- version: 0.1.3
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Yann Lugrin
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-05-14 00:00:00 +02:00
14
- default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
12
+ date: 2012-06-15 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
17
15
  name: guard
18
- prerelease: false
19
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
20
17
  none: false
21
- requirements:
22
- - - ">="
23
- - !ruby/object:Gem::Version
24
- version: 0.2.2
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '1.1'
25
22
  type: :runtime
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
23
  prerelease: false
30
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '1.1'
30
+ - !ruby/object:Gem::Dependency
31
+ name: bundler
32
+ requirement: !ruby/object:Gem::Requirement
31
33
  none: false
32
- requirements:
33
- - - ">="
34
- - !ruby/object:Gem::Version
35
- version: 1.0.0
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: '1.0'
36
38
  type: :runtime
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
39
- name: rspec
40
39
  prerelease: false
41
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '1.0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rspec
48
+ requirement: !ruby/object:Gem::Requirement
42
49
  none: false
43
- requirements:
50
+ requirements:
44
51
  - - ~>
45
- - !ruby/object:Gem::Version
46
- version: 2.6.0
52
+ - !ruby/object:Gem::Version
53
+ version: '2.6'
47
54
  type: :development
48
- version_requirements: *id003
49
- - !ruby/object:Gem::Dependency
50
- name: guard-rspec
51
55
  prerelease: false
52
- requirement: &id004 !ruby/object:Gem::Requirement
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '2.6'
62
+ - !ruby/object:Gem::Dependency
63
+ name: guard-rspec
64
+ requirement: !ruby/object:Gem::Requirement
53
65
  none: false
54
- requirements:
66
+ requirements:
55
67
  - - ~>
56
- - !ruby/object:Gem::Version
57
- version: 0.3.1
68
+ - !ruby/object:Gem::Version
69
+ version: '1.0'
58
70
  type: :development
59
- version_requirements: *id004
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: '1.0'
60
78
  description: Guard::Bundler automatically install/update your gem bundle when needed
61
- email:
79
+ email:
62
80
  - yann.lugrin@sans-savoir.net
63
81
  executables: []
64
-
65
82
  extensions: []
66
-
67
83
  extra_rdoc_files: []
68
-
69
- files:
70
- - lib/guard/bundler.rb
71
- - lib/guard/bundler/templates/Guardfile
84
+ files:
72
85
  - lib/guard/bundler/notifier.rb
86
+ - lib/guard/bundler/templates/Guardfile
73
87
  - lib/guard/bundler/version.rb
88
+ - lib/guard/bundler.rb
74
89
  - LICENSE
75
- - README.rdoc
76
- has_rdoc: true
90
+ - README.md
77
91
  homepage: http://rubygems.org/gems/guard-bundler
78
92
  licenses: []
79
-
80
93
  post_install_message:
81
- rdoc_options:
94
+ rdoc_options:
82
95
  - --charset=UTF-8
83
- - --main=README.rdoc
96
+ - --main=README.md
84
97
  - --exclude='(lib|test|spec)|(Gem|Guard|Rake)file'
85
- require_paths:
98
+ require_paths:
86
99
  - lib
87
- required_ruby_version: !ruby/object:Gem::Requirement
100
+ required_ruby_version: !ruby/object:Gem::Requirement
88
101
  none: false
89
- requirements:
90
- - - ">="
91
- - !ruby/object:Gem::Version
92
- version: "0"
93
- required_rubygems_version: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ! '>='
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ required_rubygems_version: !ruby/object:Gem::Requirement
94
107
  none: false
95
- requirements:
96
- - - ">="
97
- - !ruby/object:Gem::Version
108
+ requirements:
109
+ - - ! '>='
110
+ - !ruby/object:Gem::Version
98
111
  version: 1.3.6
99
112
  requirements: []
100
-
101
113
  rubyforge_project: guard-bundler
102
- rubygems_version: 1.6.2
114
+ rubygems_version: 1.8.24
103
115
  signing_key:
104
116
  specification_version: 3
105
117
  summary: Guard gem for Bundler
106
118
  test_files: []
107
-
119
+ has_rdoc:
@@ -1,61 +0,0 @@
1
- = Guard::Bundler
2
-
3
- Bundler guard allows to automatically & intelligently install/update bundle when needed.
4
-
5
- - Compatible with Bundler 1.0.x
6
- - Tested on Ruby 1.8.6, 1.8.7 & 1.9.2.
7
-
8
- == Install
9
-
10
- Please be sure to have {Guard}[https://github.com/guard/guard] installed before continue.
11
-
12
- Install the gem:
13
-
14
- gem install guard-bundler
15
-
16
- Add it to your Gemfile (inside test group):
17
-
18
- gem 'guard-bundler'
19
-
20
- Add guard definition to your Guardfile by running this command:
21
-
22
- guard init bundler
23
-
24
- == Usage
25
-
26
- Please read {Guard usage doc}[https://github.com/guard/guard#readme]
27
-
28
- == Guardfile
29
-
30
- Bundler guard can be really be adapted to all kind of projects.
31
- Advice: place Bundler guard before other is recommended.
32
-
33
- === Standard ruby gems
34
-
35
- guard 'bundler' do
36
- watch('Gemfile')
37
- # Uncomment next line if Gemfile contain `gemspec' command
38
- # watch(/^.+\.gemspec/)
39
- end
40
-
41
- == Options
42
-
43
- You can disable desktop notification with:
44
-
45
- guard 'bundler', :notify => false do
46
- ...
47
- end
48
-
49
- Please read {Guard doc}[https://github.com/guard/guard#readme] for more info about Guardfile DSL.
50
-
51
- == Development
52
-
53
- - Source hosted at {GitHub}[https://github.com/guard/guard-bundler]
54
- - Report issues/Questions/Feature requests on {GitHub Issues}[https://github.com/guard/guard-bundler/issues]
55
-
56
- Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change
57
- you make.
58
-
59
- == Authors
60
-
61
- {Yann Lugrin}[https://github.com/yannlugrin]