shrine-memory 0.2.2 → 0.3.0

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: b1b4e451fd11a0df9921c1ded7c040061331ae7b
4
- data.tar.gz: 3b7aa57a77fdab0b98a7b1dcad7830bf8692f02b
3
+ metadata.gz: 412e656844c36825189ce0202b7af2f02a3e9b2b
4
+ data.tar.gz: '0048afa50c74e1c2dd48684d915060ca6b81d14d'
5
5
  SHA512:
6
- metadata.gz: acf03632a079d72c6e7e6895f536ebfe497836fea414d140793c30af0ebe168d4785eb2c380ae4405ff5e4da196e61d02783af823436e8d95c5dc705a5bd04cb
7
- data.tar.gz: 9d7731e62f1809227c4f7bd28d2daf7424764df51176021e4cee76a37ec78bba260933233da4dc6ee0c5b1b41b1516fac4611b2dd47dbef944b204c72cf32d98
6
+ metadata.gz: c5a91a061903716b72c289c15009c3a156ba159e5aaffe54b523ee0b82f35770350f294eaa8571a1923a47698d141fa4453dde620ff3b5c5f38f06b62c8f655d
7
+ data.tar.gz: 33827892fe52b16261c55e622c6eaa88123a3d256defc3e4801f8600606caba7c47ac63b9326cc15424cc3047df8360c10639b0fae9671c987c69acae6a04df5
@@ -1,6 +1,5 @@
1
1
  require "shrine"
2
2
  require "stringio"
3
- require "down"
4
3
 
5
4
  class Shrine
6
5
  module Storage
@@ -15,26 +14,10 @@ class Shrine
15
14
  store[id] = io.read
16
15
  end
17
16
 
18
- def download(id)
19
- Down.copy_to_tempfile(id, open(id))
20
- end
21
-
22
- def move(io, id, *)
23
- store[id] = io.storage.delete(io.id)
24
- end
25
-
26
- def movable?(io, id)
27
- io.is_a?(UploadedFile) && io.storage.is_a?(Storage::Memory)
28
- end
29
-
30
17
  def open(id)
31
18
  StringIO.new(store.fetch(id))
32
19
  end
33
20
 
34
- def read(id)
35
- store.fetch(id).dup
36
- end
37
-
38
21
  def exists?(id)
39
22
  store.key?(id)
40
23
  end
@@ -43,10 +26,6 @@ class Shrine
43
26
  store.delete(id)
44
27
  end
45
28
 
46
- def multi_delete(ids)
47
- ids.each { |id| delete(id) }
48
- end
49
-
50
29
  def url(id, **options)
51
30
  "memory://#{id}"
52
31
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = "shrine-memory"
3
- gem.version = "0.2.2"
3
+ gem.version = "0.3.0"
4
4
 
5
5
  gem.required_ruby_version = ">= 2.1"
6
6
 
@@ -13,8 +13,7 @@ Gem::Specification.new do |gem|
13
13
  gem.files = Dir["README.md", "LICENSE.txt", "lib/**/*.rb", "*.gemspec"]
14
14
  gem.require_path = "lib"
15
15
 
16
- gem.add_dependency "shrine", "~> 2.0"
17
- gem.add_dependency "down"
16
+ gem.add_dependency "shrine", "~> 2.2"
18
17
 
19
18
  gem.add_development_dependency "rake"
20
19
  gem.add_development_dependency "minitest"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shrine-memory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Janko Marohnić
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-04 00:00:00.000000000 Z
11
+ date: 2017-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: shrine
@@ -16,28 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '2.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.0'
27
- - !ruby/object:Gem::Dependency
28
- name: down
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
26
+ version: '2.2'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: rake
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -97,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
83
  version: '0'
98
84
  requirements: []
99
85
  rubyforge_project:
100
- rubygems_version: 2.5.1
86
+ rubygems_version: 2.6.11
101
87
  signing_key:
102
88
  specification_version: 4
103
89
  summary: Provides in-memory storage for Shrine.