Class: Guard::Mouch
Instance Method Summary collapse
-
#initialize(watchers = [], options = {}) ⇒ Mouch
constructor
A new instance of Mouch.
- #reload ⇒ Object
- #run_all ⇒ Object
- #run_on_change(paths) ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(watchers = [], options = {}) ⇒ Mouch
Returns a new instance of Mouch.
7 8 9 10 11 12 13 14 |
# File 'lib/guard/mouch.rb', line 7 def initialize(watchers = [], = {}) super if [:url] !~ /^https{0,1}:\/\// raise "Please provide Guard::Mouch with a valid CouchDB server URL to push your app to." end @options = end |
Instance Method Details
#reload ⇒ Object
24 25 26 |
# File 'lib/guard/mouch.rb', line 24 def reload true end |
#run_all ⇒ Object
28 29 30 |
# File 'lib/guard/mouch.rb', line 28 def run_all true end |
#run_on_change(paths) ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/guard/mouch.rb', line 32 def run_on_change(paths) print "Mouch push..." mouch_file = @options[:mouch_cmd_file] || './mouch' config_file = @options[:mouch_config_file] || 'app.json.erb' url = @options[:url] system(mouch_file, config_file, url) puts "... DONE" end |
#start ⇒ Object
16 17 18 |
# File 'lib/guard/mouch.rb', line 16 def start true end |
#stop ⇒ Object
20 21 22 |
# File 'lib/guard/mouch.rb', line 20 def stop true end |