carrierwave-roz 0.3.4 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 00189d4c697f734d23f0736ea72c97616800001d
4
- data.tar.gz: 838a2ff26f5c11159f291540a4ca4819faaa4fb6
3
+ metadata.gz: f0888ca2ee85a1cd217dfb9011fa018fba8b72ed
4
+ data.tar.gz: 5b1d144956d18a18849e95e99c9be456f3d07922
5
5
  SHA512:
6
- metadata.gz: 93c3010b753078153e300a0e882e1d3ef4484e0a538946603ec38e7254ee1089c3e3645da182d766387d973f986e41c79dd4d82a39e6b01081efee7bcd72e8a1
7
- data.tar.gz: 4626e2d4a4ef0ae4d9ebf4a7ed4c28fb73b6fce8fcb336e18a10b2d8b4c4290ab985937d73f2bbeefe2ea2ed3dffd584298d53369053de54f6d3f75a1f757199
6
+ metadata.gz: a02015259442f6beba7a21a69cbe5155dce5c785b5d8c07c208187f352b9bcf6382a91d2d47b444bdcd8fa7aae3cad2ac4e48cef25b392c827351774cce60f20
7
+ data.tar.gz: eab5d1e124fb225931a7c86241b9444be0da2fd4055d89ac1ea7558e23128b442771f2359629e2a567e7cb2a238b3644e3f5f7ed86fc6910465edd8a09a4409f
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  CarrierWave Roz
2
2
  ===============
3
3
 
4
+ [![Build Status](https://travis-ci.org/biola/carrierwave-roz.svg)](https://travis-ci.org/biola/carrierwave-roz)
5
+
4
6
  carrierwave-roz is a [carrierwave](https://github.com/carrierwaveuploader/carrierwave) storage plugin that for the [roz](https://github.com/biola/roz) file storage API.
5
7
 
6
8
  Installation
@@ -20,7 +22,7 @@ Add the following to your uploader class
20
22
  ```ruby
21
23
  class ExampleUploader < CarrierWave::Uploader::Base
22
24
  storage :roz
23
-
25
+
24
26
  api_base_url "https://api.example.com/assets"
25
27
  files_base_url "https://assets.example.com"
26
28
  access_id "*************"
@@ -7,8 +7,7 @@ module CarrierWave
7
7
  def identifier
8
8
  return nil unless uploader.filename
9
9
 
10
- full_filename = [uploader.version_name, uploader.filename].compact.join('_')
11
- ::File.join(*[uploader.access_id, uploader.store_dir, full_filename].map(&:to_s))
10
+ ::File.join(*[uploader.access_id, uploader.store_dir, uploader.filename].map(&:to_s))
12
11
  end
13
12
 
14
13
  def store!(file)
@@ -22,13 +21,13 @@ module CarrierWave
22
21
  end
23
22
 
24
23
  class File
25
- attr_reader :path
24
+ attr_reader :identifier
26
25
  attr_reader :uploader
27
26
  attr_reader :file
28
27
 
29
- def initialize(uploader, path)
28
+ def initialize(uploader, identifier)
30
29
  @uploader = uploader
31
- @path = path
30
+ @identifier = identifier
32
31
  end
33
32
 
34
33
  def store(file)
@@ -46,9 +45,7 @@ module CarrierWave
46
45
  # Backwards compatibility for when we were storing only the filename
47
46
  URI.join(uploader.files_base_url, "#{uploader.access_id.to_s}/", "#{uploader.store_dir}/", path).to_s
48
47
  else
49
- dirname = ::File.dirname(path)
50
- basename = [uploader.version_name, ::File.basename(path)].compact.join('_')
51
- URI.join(uploader.files_base_url, "#{dirname}/", basename).to_s
48
+ URI.join(uploader.files_base_url, path).to_s
52
49
  end
53
50
  end
54
51
 
@@ -56,6 +53,12 @@ module CarrierWave
56
53
  ::File.basename(path)
57
54
  end
58
55
 
56
+ def path
57
+ dirname = ::File.dirname(identifier)
58
+ basename = [uploader.version_name, ::File.basename(identifier)].compact.join('_')
59
+ ::File.join("#{dirname}/", basename).to_s
60
+ end
61
+
59
62
  def read
60
63
  file.content
61
64
  end
@@ -1,3 +1,3 @@
1
1
  module CarrierwaveRoz
2
- VERSION = '0.3.4'
2
+ VERSION = '0.3.6'
3
3
  end
metadata CHANGED
@@ -1,29 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrierwave-roz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Crownoble
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-01 00:00:00.000000000 Z
11
+ date: 2014-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: api-auth
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.2'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: carrierwave
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
31
  - - "~>"
18
32
  - !ruby/object:Gem::Version
19
- version: '0.10'
33
+ version: 0.10.0
20
34
  type: :runtime
21
35
  prerelease: false
22
36
  version_requirements: !ruby/object:Gem::Requirement
23
37
  requirements:
24
38
  - - "~>"
25
39
  - !ruby/object:Gem::Version
26
- version: '0.10'
40
+ version: 0.10.0
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: multipart-post
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -39,19 +53,117 @@ dependencies:
39
53
  - !ruby/object:Gem::Version
40
54
  version: '2.0'
41
55
  - !ruby/object:Gem::Dependency
42
- name: api-auth
56
+ name: combustion
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
59
  - - "~>"
46
60
  - !ruby/object:Gem::Version
47
- version: '1.2'
48
- type: :runtime
61
+ version: '0.5'
62
+ type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
66
  - - "~>"
53
67
  - !ruby/object:Gem::Version
54
- version: '1.2'
68
+ version: '0.5'
69
+ - !ruby/object:Gem::Dependency
70
+ name: capybara
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '2.4'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '2.4'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec-rails
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '3.1'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '3.1'
97
+ - !ruby/object:Gem::Dependency
98
+ name: launchy
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '2.4'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '2.4'
111
+ - !ruby/object:Gem::Dependency
112
+ name: activerecord
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '4.1'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '4.1'
125
+ - !ruby/object:Gem::Dependency
126
+ name: actionpack
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '4.1'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '4.1'
139
+ - !ruby/object:Gem::Dependency
140
+ name: sqlite3
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '1.3'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '1.3'
153
+ - !ruby/object:Gem::Dependency
154
+ name: webmock
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '1.20'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '1.20'
55
167
  description: CarrierWave plugin for storing files in the Roz files API
56
168
  email: adam@obledesign.com
57
169
  executables: []
@@ -90,4 +202,3 @@ signing_key:
90
202
  specification_version: 4
91
203
  summary: CarrierWave storage plugin for Roz
92
204
  test_files: []
93
- has_rdoc: