guard 1.2.2 → 1.2.3
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/CHANGELOG.md +6 -0
- data/lib/guard/dsl.rb +2 -2
- data/lib/guard/guard.rb +16 -19
- data/lib/guard/runner.rb +2 -2
- data/lib/guard/version.rb +1 -1
- data/lib/guard/version.rbc +1 -1
- data/lib/guard/watcher.rb +1 -1
- metadata +2 -2
data/CHANGELOG.md
CHANGED
data/lib/guard/dsl.rb
CHANGED
@@ -441,7 +441,7 @@ module Guard
|
|
441
441
|
# @example Ignore some paths
|
442
442
|
# ignore %r{^ignored/path/}, /man/
|
443
443
|
#
|
444
|
-
# @param [Regexp]
|
444
|
+
# @param [Regexp] regexps a pattern for ignoring paths
|
445
445
|
#
|
446
446
|
def ignore(*regexps)
|
447
447
|
::Guard.listener = ::Guard.listener.ignore(*regexps)
|
@@ -452,7 +452,7 @@ module Guard
|
|
452
452
|
# @example Filter some files
|
453
453
|
# ignore /\.txt$/, /.*\.zip/
|
454
454
|
#
|
455
|
-
# @param [Regexp]
|
455
|
+
# @param [Regexp] regexps a pattern for filtering paths
|
456
456
|
#
|
457
457
|
def filter(*regexps)
|
458
458
|
::Guard.listener = ::Guard.listener.filter(*regexps)
|
data/lib/guard/guard.rb
CHANGED
@@ -77,25 +77,19 @@ module Guard
|
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
80
|
-
def to_s
|
81
|
-
self.class.to_s
|
82
|
-
end
|
83
|
-
|
84
80
|
# Call once when Guard starts. Please override initialize method to init stuff.
|
85
81
|
#
|
86
82
|
# @raise [:task_has_failed] when start has failed
|
87
83
|
# @return [Object] the task result
|
88
84
|
#
|
89
|
-
|
90
|
-
end
|
85
|
+
# @!method start
|
91
86
|
|
92
87
|
# Called when `stop|quit|exit|s|q|e + enter` is pressed (when Guard quits).
|
93
88
|
#
|
94
89
|
# @raise [:task_has_failed] when stop has failed
|
95
90
|
# @return [Object] the task result
|
96
91
|
#
|
97
|
-
|
98
|
-
end
|
92
|
+
# @!method stop
|
99
93
|
|
100
94
|
# Called when `reload|r|z + enter` is pressed.
|
101
95
|
# This method should be mainly used for "reload" (really!) actions like reloading passenger/spork/bundler/...
|
@@ -103,8 +97,7 @@ module Guard
|
|
103
97
|
# @raise [:task_has_failed] when reload has failed
|
104
98
|
# @return [Object] the task result
|
105
99
|
#
|
106
|
-
|
107
|
-
end
|
100
|
+
# @!method reload
|
108
101
|
|
109
102
|
# Called when just `enter` is pressed
|
110
103
|
# This method should be principally used for long action like running all specs/tests/...
|
@@ -112,8 +105,7 @@ module Guard
|
|
112
105
|
# @raise [:task_has_failed] when run_all has failed
|
113
106
|
# @return [Object] the task result
|
114
107
|
#
|
115
|
-
|
116
|
-
end
|
108
|
+
# @!method run_all
|
117
109
|
|
118
110
|
# Default behaviour on file(s) changes that the Guard plugin watches.
|
119
111
|
#
|
@@ -121,8 +113,7 @@ module Guard
|
|
121
113
|
# @raise [:task_has_failed] when run_on_changes has failed
|
122
114
|
# @return [Object] the task result
|
123
115
|
#
|
124
|
-
|
125
|
-
end
|
116
|
+
# @!method run_on_changes(paths)
|
126
117
|
|
127
118
|
# Called on file(s) additions that the Guard plugin watches.
|
128
119
|
#
|
@@ -130,8 +121,7 @@ module Guard
|
|
130
121
|
# @raise [:task_has_failed] when run_on_additions has failed
|
131
122
|
# @return [Object] the task result
|
132
123
|
#
|
133
|
-
|
134
|
-
end
|
124
|
+
# @!method run_on_additions(paths)
|
135
125
|
|
136
126
|
# Called on file(s) modifications that the Guard plugin watches.
|
137
127
|
#
|
@@ -139,8 +129,7 @@ module Guard
|
|
139
129
|
# @raise [:task_has_failed] when run_on_modifications has failed
|
140
130
|
# @return [Object] the task result
|
141
131
|
#
|
142
|
-
|
143
|
-
end
|
132
|
+
# @!method run_on_modifications(paths)
|
144
133
|
|
145
134
|
# Called on file(s) removals that the Guard plugin watches.
|
146
135
|
#
|
@@ -148,7 +137,15 @@ module Guard
|
|
148
137
|
# @raise [:task_has_failed] when run_on_removals has failed
|
149
138
|
# @return [Object] the task result
|
150
139
|
#
|
151
|
-
|
140
|
+
# @!method run_on_removals(paths)
|
141
|
+
|
142
|
+
# Convert plugin to string representation. The
|
143
|
+
# default just uses the plugin class name.
|
144
|
+
#
|
145
|
+
# @return [String] the string representation
|
146
|
+
#
|
147
|
+
def to_s
|
148
|
+
self.class.to_s
|
152
149
|
end
|
153
150
|
|
154
151
|
end
|
data/lib/guard/runner.rb
CHANGED
@@ -38,7 +38,7 @@ module Guard
|
|
38
38
|
# Runs a Guard-task on all registered guards.
|
39
39
|
#
|
40
40
|
# @param [Symbol] task the task to run
|
41
|
-
# @param [Hash]
|
41
|
+
# @param [Hash] scopes either the Guard plugin or the group to run the task on
|
42
42
|
#
|
43
43
|
# @see self.run_supervised_task
|
44
44
|
#
|
@@ -147,7 +147,7 @@ module Guard
|
|
147
147
|
# Stop the task run for the all Guard plugins within a group if one Guard
|
148
148
|
# throws `:task_has_failed`.
|
149
149
|
#
|
150
|
-
# @param [Hash]
|
150
|
+
# @param [Hash] scopes an hash with a Guard plugin or a group scope
|
151
151
|
# @yield the task to run
|
152
152
|
#
|
153
153
|
def scoped_guards(scopes = {})
|
data/lib/guard/version.rb
CHANGED
data/lib/guard/version.rbc
CHANGED
data/lib/guard/watcher.rb
CHANGED
@@ -105,7 +105,7 @@ module Guard
|
|
105
105
|
|
106
106
|
# Test if any of the files is the Guardfile.
|
107
107
|
#
|
108
|
-
# @param [Array<String>] the files to test
|
108
|
+
# @param [Array<String>] files the files to test
|
109
109
|
# @return [Boolean] whether one of these files is the Guardfile
|
110
110
|
#
|
111
111
|
def self.match_guardfile?(files)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -149,7 +149,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
149
149
|
version: '0'
|
150
150
|
segments:
|
151
151
|
- 0
|
152
|
-
hash:
|
152
|
+
hash: 4606659073432291932
|
153
153
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
154
|
none: false
|
155
155
|
requirements:
|