mingle-storage 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/storage/s3_store.rb +6 -1
  2. metadata +54 -34
  3. checksums.yaml +0 -15
@@ -105,6 +105,7 @@ module Storage
105
105
  @path_prefix = path_prefix
106
106
  @url_expires = options[:url_expires] || HALF_AN_HOUR
107
107
  @bucket_name = options[:bucket_name]
108
+ @namespace = options[:namespace]
108
109
  end
109
110
 
110
111
  def upload(path, local_file)
@@ -189,9 +190,13 @@ module Storage
189
190
  def object(path)
190
191
  bucket.objects[s3_path(path)]
191
192
  end
193
+
194
+ def namespace
195
+ Proc === @namespace ? @namespace.call : @namespace
196
+ end
192
197
 
193
198
  def s3_path(*paths)
194
- File.join(*([@path_prefix, *paths].compact))
199
+ File.join(*([namespace, @path_prefix, *paths].compact))
195
200
  end
196
201
 
197
202
  def bucket
metadata CHANGED
@@ -1,60 +1,80 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: mingle-storage
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.5
3
+ version: !ruby/object:Gem::Version
4
+ hash: 19
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 6
10
+ version: 0.0.6
5
11
  platform: ruby
6
- authors:
12
+ authors:
7
13
  - ThoughtWorks Studios
8
14
  autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
- date: 2013-08-16 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2013-08-16 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
14
21
  name: aws-sdk
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ! '>='
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
22
  prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ! '>='
25
- - !ruby/object:Gem::Version
26
- version: '0'
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
32
+ type: :runtime
33
+ version_requirements: *id001
27
34
  description: Mingle storage API to support filesystem and AWS S3 backed storage
28
35
  email: mingle-dev@thoughtworks.com
29
36
  executables: []
37
+
30
38
  extensions: []
39
+
31
40
  extra_rdoc_files: []
32
- files:
41
+
42
+ files:
33
43
  - lib/storage/filesystem_store.rb
34
44
  - lib/storage/s3_store.rb
35
45
  - lib/storage.rb
36
46
  homepage: http://www.thoughtworks.com/products
37
- licenses:
47
+ licenses:
38
48
  - MIT
39
- metadata: {}
40
49
  post_install_message:
41
50
  rdoc_options: []
42
- require_paths:
51
+
52
+ require_paths:
43
53
  - lib
44
- required_ruby_version: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - ! '>='
47
- - !ruby/object:Gem::Version
48
- version: '0'
49
- required_rubygems_version: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - ! '>='
52
- - !ruby/object:Gem::Version
53
- version: '0'
54
+ required_ruby_version: !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ hash: 3
60
+ segments:
61
+ - 0
62
+ version: "0"
63
+ required_rubygems_version: !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ hash: 3
69
+ segments:
70
+ - 0
71
+ version: "0"
54
72
  requirements: []
73
+
55
74
  rubyforge_project:
56
- rubygems_version: 2.0.7
75
+ rubygems_version: 1.8.24
57
76
  signing_key:
58
- specification_version: 4
77
+ specification_version: 3
59
78
  summary: Mingle storage API to support filesystem and AWS S3 backed storage
60
79
  test_files: []
80
+
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MzRhNmJmNDBlMjY5MzVmOWUwNTVhMDRkNWQ3MzMxOTgxM2ViYmI2NA==
5
- data.tar.gz: !binary |-
6
- YWI5Yjc2NjkzYzJjZjU5Nzc1MzE0NzQ2YmZlNDliNGMzMDQwNTRiMA==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- NGEwYzhjYmQ2MTFiMTc4YWMxNDUzMzdjNGExMjllMjhmMTE2OGEyZTFhN2Qz
10
- NGY3NGEyYzcxNDNmYmIzMDZjZTI2N2YxZjM0NzhlNWEwOGM0OWU2NzY2ODdj
11
- YzhjNTY1YjU0MGY4NTM0MTdhMzM5YmU2YzdhNjQ0NmI3ZjkyMTg=
12
- data.tar.gz: !binary |-
13
- MTEyMGFhZDZjYmJiNGM2OTViYWM5OGZlZDExNjFjMThhN2Y3MDQxMzA3OTlh
14
- NzVlMTcwYzcyYzVmNWQ3MGVmMGVkNzcxZjJkZjQwZWU0MjAxYThmNTE2Nzdl
15
- MjUyNjExMmYzOGQzNzFhMDhlMDBjZjA5NTNkZmYwZTg4Y2FlNTI=