guard-live-set 0.1.0
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/lib/guard/live-set.rb +58 -0
- data/lib/guard/live-set/templates/Guardfile +3 -0
- data/lib/guard/live-set/version.rb +5 -0
- metadata +61 -0
@@ -0,0 +1,58 @@
|
|
1
|
+
require 'guard'
|
2
|
+
require 'guard/guard'
|
3
|
+
|
4
|
+
require 'zlib'
|
5
|
+
|
6
|
+
module Guard
|
7
|
+
class LiveSet < Guard
|
8
|
+
|
9
|
+
# Initialize a Guard.
|
10
|
+
# @param [Array<Guard::Watcher>] watchers the Guard file watchers
|
11
|
+
# @param [Hash] options the custom Guard options
|
12
|
+
def initialize(watchers = [], options = {})
|
13
|
+
super
|
14
|
+
end
|
15
|
+
|
16
|
+
# Call once when Guard starts. Please override initialize method to init stuff.
|
17
|
+
# @raise [:task_has_failed] when start has failed
|
18
|
+
def start
|
19
|
+
end
|
20
|
+
|
21
|
+
# Called when `stop|quit|exit|s|q|e + enter` is pressed (when Guard quits).
|
22
|
+
# @raise [:task_has_failed] when stop has failed
|
23
|
+
def stop
|
24
|
+
end
|
25
|
+
|
26
|
+
# Called when `reload|r|z + enter` is pressed.
|
27
|
+
# This method should be mainly used for "reload" (really!) actions like reloading passenger/spork/bundler/...
|
28
|
+
# @raise [:task_has_failed] when reload has failed
|
29
|
+
def reload
|
30
|
+
end
|
31
|
+
|
32
|
+
# Called when just `enter` is pressed
|
33
|
+
# This method should be principally used for long action like running all specs/tests/...
|
34
|
+
# @raise [:task_has_failed] when run_all has failed
|
35
|
+
def run_all
|
36
|
+
end
|
37
|
+
|
38
|
+
# Called on file(s) modifications that the Guard watches.
|
39
|
+
# @param [Array<String>] paths the changes files or paths
|
40
|
+
# @raise [:task_has_failed] when run_on_change has failed
|
41
|
+
def run_on_change(paths)
|
42
|
+
paths.each do |path|
|
43
|
+
Zlib::GzipReader.open(path) do |gz|
|
44
|
+
File.open(path + '.xml', 'w') do |file|
|
45
|
+
file << gz.read
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
# Called on file(s) deletions that the Guard watches.
|
52
|
+
# @param [Array<String>] paths the deleted files or paths
|
53
|
+
# @raise [:task_has_failed] when run_on_change has failed
|
54
|
+
def run_on_deletion(paths)
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
end
|
metadata
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: guard-live-set
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Michael Garriss
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-01-07 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: guard
|
16
|
+
requirement: &2156235140 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *2156235140
|
25
|
+
description: Converts Ableton Live .als files to XML as their saved. The point of
|
26
|
+
this is so that you can use git with your .als files. Git is a lot more useful
|
27
|
+
with line based text files then binary files. Just gzip the .xml files and rename
|
28
|
+
them to .als to have Ableton Live load them.
|
29
|
+
email: mgarriss@gmail.com
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- lib/guard/live-set/templates/Guardfile
|
35
|
+
- lib/guard/live-set/version.rb
|
36
|
+
- lib/guard/live-set.rb
|
37
|
+
homepage: http://github.com/mgarriss/guard-live-set
|
38
|
+
licenses: []
|
39
|
+
post_install_message:
|
40
|
+
rdoc_options: []
|
41
|
+
require_paths:
|
42
|
+
- lib
|
43
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
44
|
+
none: false
|
45
|
+
requirements:
|
46
|
+
- - ! '>='
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
requirements: []
|
56
|
+
rubyforge_project:
|
57
|
+
rubygems_version: 1.8.12
|
58
|
+
signing_key:
|
59
|
+
specification_version: 3
|
60
|
+
summary: Converts Ableton Live .als files to XML as their saved.
|
61
|
+
test_files: []
|