guard-s3 0.1.1 → 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.
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # guard-s3
2
2
 
3
- guard-s3 is a simple guard library that syncs local directories with S3 as files are changed.
3
+ guard-s3 is a simple guard library that syncs local directories with S3 as files are changed.
4
4
 
5
5
  # Usage
6
6
 
7
- This is a sample Guardfile
7
+ This is a sample Guardfile that will automatically upload all files in the Guard *watchdir* directory into the specified s3 bucket. By default, *watchdir* is the directory from which guard was called, but it can be specified using the `--watchdir/-w` parameter. See the [guard main documentation for details](https://github.com/guard/guard#guard----).
8
8
 
9
9
  opts = {
10
10
  :access_key_id => 'ACCESS_KEY_ID_XXXXXX',
@@ -16,9 +16,14 @@ This is a sample Guardfile
16
16
  guard 's3', opts do
17
17
  watch(/.*/)
18
18
  end
19
-
19
+
20
+
20
21
 
21
22
  # Dependencies
22
23
 
23
24
  - guard
24
- - aws-s3
25
+ - aws-s3
26
+
27
+ # Changes this version
28
+
29
+ - Fixed `watchdir` behavior. Guard-s3 will now watch and upload from the directory path specified in the Guardfile relative to the guard `watchdir`.
@@ -6,8 +6,8 @@ Gem::Specification.new do |s|
6
6
  s.name = "guard-s3"
7
7
  s.version = Guard::S3::VERSION
8
8
  s.platform = Gem::Platform::RUBY
9
- s.authors = ["James Welsh"]
10
- s.email = ["james at supermatter dot com"]
9
+ s.authors = ["James Welsh", "Austin Mullins"]
10
+ s.email = ["james at supermatter dot com", "Austin dot Mullins at WalkeDesigns dot com"]
11
11
  s.homepage = "http://github.com/guard/guard-s3"
12
12
  s.summary = %q{A simple guard library for syncing files with s3}
13
13
  s.description = %q{A simple guard library for syncing files with s3}
@@ -22,12 +22,12 @@ module ::Guard
22
22
  @bucket = options[:bucket]
23
23
  @s3_permissions = options[:s3_permissions]
24
24
  @debug = true
25
- @pwd = watchdir || Dir.pwd
25
+ @watchdir = (Dsl.options[:watchdir] && File.expand_path(Dsl.options[:watchdir])) || Dir.pwd
26
26
  end
27
27
 
28
28
  def run_on_change(paths)
29
29
  paths.each do |path|
30
- file = File.join(pwd, path)
30
+ file = File.join(@watchdir, path)
31
31
  begin
32
32
  if exists?(file)
33
33
  log "Nothing uploaded. #{file} already exists!"
@@ -56,9 +56,5 @@ module ::Guard
56
56
  puts "[#{Time.now}] #{msg}"
57
57
  end
58
58
 
59
- def watchdir
60
- # TODO: Nicer way to detect Guard watching a directory explicitly?
61
- ::Guard::Dsl.class_variable_get(:@@options).watchdir
62
- end
63
59
  end
64
60
  end
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module S3
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,19 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - James Welsh
9
+ - Austin Mullins
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2011-11-27 00:00:00.000000000Z
13
+ date: 2013-02-06 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: aws-s3
16
- requirement: &70217174640680 !ruby/object:Gem::Requirement
17
+ requirement: !ruby/object:Gem::Requirement
17
18
  none: false
18
19
  requirements:
19
20
  - - ! '>='
@@ -21,10 +22,15 @@ dependencies:
21
22
  version: '0'
22
23
  type: :runtime
23
24
  prerelease: false
24
- version_requirements: *70217174640680
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: '0'
25
31
  - !ruby/object:Gem::Dependency
26
32
  name: guard
27
- requirement: &70217174640220 !ruby/object:Gem::Requirement
33
+ requirement: !ruby/object:Gem::Requirement
28
34
  none: false
29
35
  requirements:
30
36
  - - ! '>='
@@ -32,10 +38,16 @@ dependencies:
32
38
  version: '0'
33
39
  type: :runtime
34
40
  prerelease: false
35
- version_requirements: *70217174640220
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
36
47
  description: A simple guard library for syncing files with s3
37
48
  email:
38
49
  - james at supermatter dot com
50
+ - Austin dot Mullins at WalkeDesigns dot com
39
51
  executables: []
40
52
  extensions: []
41
53
  extra_rdoc_files: []
@@ -68,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
80
  version: 1.3.6
69
81
  requirements: []
70
82
  rubyforge_project: guard-s3
71
- rubygems_version: 1.8.11
83
+ rubygems_version: 1.8.24
72
84
  signing_key:
73
85
  specification_version: 3
74
86
  summary: A simple guard library for syncing files with s3