guard-soca 0.1.2

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.
Files changed (2) hide show
  1. data/lib/guard/soca.rb +47 -0
  2. metadata +70 -0
data/lib/guard/soca.rb ADDED
@@ -0,0 +1,47 @@
1
+ require 'guard'
2
+ require 'guard/guard'
3
+ require 'soca'
4
+
5
+ module Guard
6
+ class Soca < Guard
7
+
8
+ def initialize(watchers = [], options = {})
9
+ super
10
+
11
+ appdir = options[:appdir] || File.expand_path(Dir.pwd)
12
+ env = options[:env] || "default"
13
+ config_file = options[:config_file]
14
+ @pusher = ::Soca::Pusher.new(appdir, env, config_file)
15
+ @times = 0
16
+ end
17
+
18
+ def start
19
+ true
20
+ end
21
+
22
+ def stop
23
+ true
24
+ end
25
+
26
+ def reload
27
+ true
28
+ end
29
+
30
+ def run_all
31
+ true
32
+ end
33
+
34
+ def run_on_change(paths)
35
+ @times += 1
36
+ print "Soca: push..."
37
+ @pusher.push!
38
+ puts "DONE"
39
+ if @times % 5 == 0
40
+ print "Soca: Running a compact..."
41
+ @pusher.compact!
42
+ puts "DONE"
43
+ end
44
+ end
45
+
46
+ end
47
+ end
metadata ADDED
@@ -0,0 +1,70 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: guard-soca
3
+ version: !ruby/object:Gem::Version
4
+ hash: 31
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 2
10
+ version: 0.1.2
11
+ platform: ruby
12
+ authors:
13
+ - Luke Amdor
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-11-24 00:00:00 -06:00
19
+ default_executable:
20
+ dependencies: []
21
+
22
+ description: Guard::Soca runs soca's push automatically
23
+ email:
24
+ - luke.amdor@gmail.com
25
+ executables: []
26
+
27
+ extensions: []
28
+
29
+ extra_rdoc_files: []
30
+
31
+ files:
32
+ - lib/guard/soca.rb
33
+ has_rdoc: true
34
+ homepage: http://github.com/rubbish/guard-soca
35
+ licenses: []
36
+
37
+ post_install_message:
38
+ rdoc_options: []
39
+
40
+ require_paths:
41
+ - lib
42
+ required_ruby_version: !ruby/object:Gem::Requirement
43
+ none: false
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ hash: 3
48
+ segments:
49
+ - 0
50
+ version: "0"
51
+ required_rubygems_version: !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ hash: 23
57
+ segments:
58
+ - 1
59
+ - 3
60
+ - 6
61
+ version: 1.3.6
62
+ requirements: []
63
+
64
+ rubyforge_project: guard-soca
65
+ rubygems_version: 1.3.7
66
+ signing_key:
67
+ specification_version: 3
68
+ summary: Guard gem for soca
69
+ test_files: []
70
+