filestack 2.8.1 → 2.9.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
  SHA256:
3
- metadata.gz: 77f23edf489898b7e03305bca017f6eb519cf3995aecd120908a6d01042ca60d
4
- data.tar.gz: bcdc3b18c9ecd5ebbc886cfd518a08b2ba0eccdc994f24e673095fdfdc84945f
3
+ metadata.gz: 0cd82b05952e8a7a1d58e3ed928719d34aabd06f4849ed4a6b1758f2603f89b4
4
+ data.tar.gz: 74a9f2662472ab83fb278f8606192ce73a339dd0869f5c707c50e0c37d62ef89
5
5
  SHA512:
6
- metadata.gz: 596a72ca7995f8ba53a63d78f6ae2b0994f5c02b5b8e38fb273f0b6aefb8f657638544ee2775320d7d8c472dee8879bf5e7765de0f8ecf96ed93c973eeb1707a
7
- data.tar.gz: e55b56cfefdfeaa5bffbd52f83af5d9d92ebf7952150c02fec12a43f256a3f8b2e8575627593f12fe826ac1004104e4c42bf45c1e7c8748609730faaf6ced218
6
+ metadata.gz: b1d0b30ff534db946232fdf344ed306bf4db7d28933303baa4d73e4f31df773b15ca5bdfdc8c8bfc5c00e6df85cfb86ab40be19d916327992bf426c89ca5600a
7
+ data.tar.gz: ac281fac8acf6990d4411fdf8374f46624f250ebba943c7049bd2f7a4f3367deff8132a4ffeb5fc02c7039acbc97b83a8684e8be673a8652abf53fc8f84b4f1c
data/.travis.yml CHANGED
@@ -9,6 +9,9 @@ rvm:
9
9
  before_install:
10
10
  - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
11
11
  - gem install bundler -v '< 2'
12
+ - sudo apt-get update -y
13
+ - sudo apt-get install -y shared-mime-info
14
+ - mkdir -p ./usr/share/mime/packages && cp -a /usr/share/mime/packages/freedesktop.org.xml ./usr/share/mime/packages/
12
15
 
13
16
  after_success:
14
17
  - coveralls
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Filestack-Ruby Changelog
2
2
 
3
+ ## 2.9.0 (March 25, 2020)
4
+ - Update version of mimemagic gem
5
+
3
6
  ## 2.8.1 (October 1, 2020)
4
7
  - Add rescue and raises body message on upload
5
8
 
data/README.md CHANGED
@@ -37,6 +37,19 @@ Or install it yourself as:
37
37
 
38
38
  $ gem install filestack
39
39
 
40
+ ## Dependencies
41
+
42
+ We use the gem `mimemagic` which requires a copy of the Freedesktop.org shared-mime-info database.
43
+
44
+ macOS users can install the database via Homebrew with `brew install shared-mime-info`.
45
+
46
+ If you are unable to use a package manager, you can obtain a copy of the needed file by extracting it from the Debian package. This process will also work on a Windows machine.
47
+
48
+ 1. Download the package from https://packages.debian.org/sid/amd64/shared-mime-info/download
49
+ 2. Ensure the command line version of 7-Zip is installed
50
+ 3. `7z x -so shared-mime-info_2.0-1_amd64.deb data.tar | 7z e -sidata.tar "./usr/share/mime/packages/freedesktop.org.xml"`
51
+ 4. Place the file `freedesktop.org.xml` in an appropriate location, and then set the environment variable `FREEDESKTOP_MIME_TYPES_PATH` to that path. Once that has been done the gem should install successfully. Please note that the gem will depend upon the file remaining in that location at run time.
52
+
40
53
  ## Usage
41
54
 
42
55
  ### Import
@@ -114,6 +127,19 @@ client = FilestackClient.new('YOUR_API_KEY', security: security)
114
127
  ### Using FilestackFilelinks
115
128
  FilestackFilelink objects are representation of a file handle. You can download, get raw file content, delete and overwrite file handles directly. Security is required for overwrite and delete methods.
116
129
 
130
+ Initialize the filelink using the file handle, your API key, and security if required. The file handle is the string following the last slash `/` in the file URL.
131
+
132
+ ```ruby
133
+ filelink = FilestackFilelink.new(handle, apikey: 'YOUR_API_KEY', security: security_object)
134
+ ```
135
+
136
+ ### Deletion
137
+ You can delete a file by simply calling `delete` on the filelink.
138
+
139
+ ```ruby
140
+ filelink.delete
141
+ ```
142
+
117
143
  ### Transformations
118
144
  Transforms can be initiated one of two ways. The first, by calling ```transform``` on a filelink:
119
145
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.8.1
1
+ 2.9.0
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  spec.add_dependency "typhoeus", "~> 1.1"
26
26
  spec.add_dependency "parallel", "~> 1.11", ">= 1.11.2"
27
- spec.add_dependency "mimemagic", "~> 0.3.2"
27
+ spec.add_dependency "mimemagic", "~> 0.3.8"
28
28
  spec.add_dependency "progress_bar"
29
29
 
30
30
  spec.add_development_dependency "bundler", "~> 1.7"
@@ -1,5 +1,5 @@
1
1
  module Filestack
2
2
  module Ruby
3
- VERSION = '2.8.1'.freeze
3
+ VERSION = '2.9.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filestack
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.1
4
+ version: 2.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Filestack
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-02 00:00:00.000000000 Z
11
+ date: 2021-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -50,14 +50,14 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 0.3.2
53
+ version: 0.3.8
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 0.3.2
60
+ version: 0.3.8
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: progress_bar
63
63
  requirement: !ruby/object:Gem::Requirement