filestack-rails 5.2.1 → 5.2.2

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: d3f384e23ab91eca28d8659671bcfc0ec3c313ca
4
- data.tar.gz: ca86561f77eedbb676eef1a3beeae062797e3cde
3
+ metadata.gz: 03deb768c0ee4f31c0a11781d56d0dadb0090da1
4
+ data.tar.gz: 9265247c1324245bd47c4125e073559cdd868916
5
5
  SHA512:
6
- metadata.gz: 4ef3b84118150d1d4edf219619696b45d5cb0be6011d3baf2b8b86dccd02b8d83a8dde3230efabc4d85356a247f3e642ddf2654a726f68da280e4f28674d1489
7
- data.tar.gz: dedb079f04adef433455c32307e5653c91cb9371a8401cb94d72829274e3459a61a21972dbb7694f4b1e4a2a8df6df5e7483eb4e03964d9622a3193aad2adbca
6
+ metadata.gz: 97689af0a9f6784f8f3e1cc580333da3f7109d3ab21fb0db6213b6bb4306dd098421592d1d0d877a982350a2567817224735d578079de9b3e8f0b734da2b6d19
7
+ data.tar.gz: 0ddb1a9cd797f27ff48b14a3e9ce7d076e853c102c1b6bcc4e37bf3c63968b2119f429c24f2ddbf97bada706d29438b2f75a88c40c8113117f0ac19e8de6ec33
data/README.md CHANGED
@@ -182,6 +182,12 @@ Filestack::Rails now has access to the full list of image transforms through our
182
182
  ```erb
183
183
  <%= filestack_image @user.filepicker_url, transform: filestack_transform.resize(width:100, height:100).flip.enhance %>
184
184
  ```
185
+
186
+ You can also add attributes to `image_tag`, for instance:
187
+ ```erb
188
+ <%= filestack_image @user.filepicker_url, size: "160x100", alt: "Picture" %>
189
+ ```
190
+
185
191
  ## Migrating from 2.x to 3.x
186
192
  Filestack::Rails 3.x is a significant and breaking change. Users wishing to upgrade will need to change their current implementation in order to use the plugin correctly.
187
193
 
@@ -35,7 +35,7 @@ module FilestackRails
35
35
  transform_object.add_external_url url
36
36
  image_tag transform_object.fs_url, options
37
37
  else
38
- image_tag url
38
+ image_tag url, options
39
39
  end
40
40
  end
41
41
 
@@ -6,13 +6,17 @@ class Picker
6
6
  end
7
7
 
8
8
  def filestack_js_url
9
- "https://static.filestackapi.com/filestack-js/#{version}/filestack.min.js"
9
+ "https://static.#{domain}/filestack-js/#{version}/filestack.min.js"
10
10
  end
11
11
 
12
12
  def version
13
13
  ::Rails.application.config.filestack_rails.version
14
14
  end
15
15
 
16
+ def domain
17
+ ::Rails.application.config.filestack_rails.cname || 'filestackapi.com'
18
+ end
19
+
16
20
  def picker(client_name, api_key, options, callback, other_callbacks = nil)
17
21
  options_string = options[1..-2] # removed curly brackets help to generate pickerOptions in js
18
22
 
@@ -1,3 +1,3 @@
1
1
  module FilestackRails
2
- VERSION = '5.2.1'
2
+ VERSION = '5.2.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filestack-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.1
4
+ version: 5.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - filestack
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-10 00:00:00.000000000 Z
11
+ date: 2020-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 2.6.0
33
+ version: 2.6.5
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: 2.6.0
40
+ version: 2.6.5
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: coveralls
43
43
  requirement: !ruby/object:Gem::Requirement