guard-mouch 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/guard/mouch.rb +42 -0
  2. metadata +65 -0
@@ -0,0 +1,42 @@
1
+ require 'guard'
2
+ require 'guard/guard'
3
+
4
+ module Guard
5
+ class Mouch < Guard
6
+
7
+ def initialize(watchers = [], options = {})
8
+ super
9
+
10
+ if options[:url] !~ /^https{0,1}:\/\//
11
+ raise "Please provide Guard::Mouch with a valid CouchDB server URL to push your app to."
12
+ end
13
+ @options = options
14
+ end
15
+
16
+ def start
17
+ true
18
+ end
19
+
20
+ def stop
21
+ true
22
+ end
23
+
24
+ def reload
25
+ true
26
+ end
27
+
28
+ def run_all
29
+ true
30
+ end
31
+
32
+ def run_on_change(paths)
33
+ print "Mouch push..."
34
+ mouch_file = @options[:mouch_cmd_file] || './mouch'
35
+ config_file = @options[:mouch_config_file] || 'app.json.erb'
36
+ url = @options[:url]
37
+ system(mouch_file, config_file, url)
38
+ puts "... DONE"
39
+ end
40
+
41
+ end
42
+ end
metadata ADDED
@@ -0,0 +1,65 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: guard-mouch
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Matthias Geisler
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2012-08-09 00:00:00 Z
19
+ dependencies: []
20
+
21
+ description: Guard::Mouch runs mouch's push automatically
22
+ email: matthias@semanticdreamer.com
23
+ executables: []
24
+
25
+ extensions: []
26
+
27
+ extra_rdoc_files: []
28
+
29
+ files:
30
+ - lib/guard/mouch.rb
31
+ homepage: https://github.com/semanticdreamer/guard-mouch
32
+ licenses: []
33
+
34
+ post_install_message:
35
+ rdoc_options: []
36
+
37
+ require_paths:
38
+ - lib
39
+ required_ruby_version: !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ hash: 3
45
+ segments:
46
+ - 0
47
+ version: "0"
48
+ required_rubygems_version: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ hash: 3
54
+ segments:
55
+ - 0
56
+ version: "0"
57
+ requirements: []
58
+
59
+ rubyforge_project:
60
+ rubygems_version: 1.8.10
61
+ signing_key:
62
+ specification_version: 3
63
+ summary: Guard gem for mouch
64
+ test_files: []
65
+