shrine-flickr 1.0.0 → 1.0.1

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: 93196d2074118c12e2a5c3e4ff0f4b08c6948b84
4
- data.tar.gz: 9e1f351116746fc9868d10f6fffbbd15aefd7f29
3
+ metadata.gz: cc2d7fbc4c13c40d1387e6e41649f1a7f9be6902
4
+ data.tar.gz: 68441b4122dc2a1a12374bc776997a09de50073e
5
5
  SHA512:
6
- metadata.gz: f66a38504f2b7687dc543cc0d02fa65c76454d88ceb7c2b6e4f60e74e2878ed7b064d08cb4edabb51f668daa7fb5b08d92f38d9a01bedc92aa42430732a41f30
7
- data.tar.gz: 3b4cec25c7aa76b78cb883a5b0071d1ded09c3d6519e1e8bc8349519779cabad4a81984a0b341c51ea22096246da31ca6c4f775d5892fc9911321c977e173384
6
+ metadata.gz: 68e29fdc553bf82ebf3e010652d334e6e970bbfde15809e16beef3bcd72cb0faf9766dbba5cd0ebc230e622de2ac8d8013b396e4a6734379d1c3f91eda0100ef
7
+ data.tar.gz: 22da03e3228090cafe401210223e64d514649b06c9f81f42b7b26077a56a2d8601903f2051098992496a0faa03e1c1b767de10e634c4e11ca6975a3c98843a88
data/README.md CHANGED
@@ -41,6 +41,7 @@ user.avatar.url(size: :medium_500) # alternative notation
41
41
 
42
42
  user.avatar.url(size: "Original")
43
43
  user.avatar.url(size: :original) # alternative notation
44
+ ```
44
45
 
45
46
  All possible sizes are: "Square 75", "Thumbnail", "Square 150", "Small 240",
46
47
  "Small 320", "Medium 500", "Medium 640", "Medium 800", "Large 1024", and
@@ -63,17 +64,15 @@ can pass in the `:upload_options` option:
63
64
  Shrine::Storage::Flickr.new(upload_options: {hidden: 1})
64
65
  ```
65
66
 
66
- Alternatively, if you would like to do it per-file, you can override
67
- `#extract_metadata` in your uploader, and add upload options under the "flickr"
68
- key:
67
+ You can also add upload options per-upload using the `upload_options` plugin:
69
68
 
70
69
  ```rb
71
70
  class MyUploader < Shrine
72
- def extract_metadata(io, context)
73
- super.update("flickr" => {
71
+ plugin :upload_options, store: ->(io, context) do
72
+ {
74
73
  title: io.original_filename,
75
74
  description: context[:record].description,
76
- })
75
+ }
77
76
  end
78
77
  end
79
78
  ```
@@ -92,7 +91,7 @@ flickr.clear!(:confirm)
92
91
 
93
92
  In Flickr's guidelines it states that if you're displaying photos from Flickr
94
93
  on another webiste, you should always link back to Flickr. This link will be
95
- generate when you don't pass any arguments to `#url`:
94
+ generated when you don't pass any arguments to `#url`:
96
95
 
97
96
  ```erb
98
97
  <a href="<%= @user.avatar.url %>">
@@ -53,7 +53,7 @@ class Shrine
53
53
  photo(photo_id(id)).delete
54
54
  end
55
55
 
56
- def url(id, size: nil)
56
+ def url(id, size: nil, **options)
57
57
  if size
58
58
  size = size.to_s.tr("_", " ").capitalize if size.is_a?(Symbol)
59
59
  "https://farm%s.staticflickr.com/%s/%s_%s%s.%s" % size_data(size, id)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = "shrine-flickr"
3
- gem.version = "1.0.0"
3
+ gem.version = "1.0.1"
4
4
 
5
5
  gem.required_ruby_version = ">= 2.1"
6
6
 
@@ -13,11 +13,11 @@ Gem::Specification.new do |gem|
13
13
  gem.files = Dir["README.md", "LICENSE.txt", "lib/**/*.rb", "shrine-flickr.gemspec"]
14
14
  gem.require_path = "lib"
15
15
 
16
+ gem.add_dependency "shrine", "~> 1.1"
16
17
  gem.add_dependency "flickr-objects", ">= 0.6.1"
17
- gem.add_dependency "down", ">= 1.0.3"
18
+ gem.add_dependency "down", ">= 1.0.5"
18
19
 
19
20
  gem.add_development_dependency "rake"
20
- gem.add_development_dependency "shrine"
21
21
  gem.add_development_dependency "minitest"
22
22
  gem.add_development_dependency "dotenv"
23
23
  end
metadata CHANGED
@@ -1,59 +1,59 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shrine-flickr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Janko Marohnić
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-19 00:00:00.000000000 Z
11
+ date: 2015-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: flickr-objects
14
+ name: shrine
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.6.1
19
+ version: '1.1'
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: 0.6.1
26
+ version: '1.1'
27
27
  - !ruby/object:Gem::Dependency
28
- name: down
28
+ name: flickr-objects
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 1.0.3
33
+ version: 0.6.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 1.0.3
40
+ version: 0.6.1
41
41
  - !ruby/object:Gem::Dependency
42
- name: rake
42
+ name: down
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
47
+ version: 1.0.5
48
+ type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: 1.0.5
55
55
  - !ruby/object:Gem::Dependency
56
- name: shrine
56
+ name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="