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 +4 -4
- data/.travis.yml +3 -0
- data/CHANGELOG.md +3 -0
- data/README.md +26 -0
- data/VERSION +1 -1
- data/filestack-ruby.gemspec +1 -1
- data/lib/filestack/ruby/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cd82b05952e8a7a1d58e3ed928719d34aabd06f4849ed4a6b1758f2603f89b4
|
4
|
+
data.tar.gz: 74a9f2662472ab83fb278f8606192ce73a339dd0869f5c707c50e0c37d62ef89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
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.
|
1
|
+
2.9.0
|
data/filestack-ruby.gemspec
CHANGED
@@ -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.
|
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"
|
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.
|
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:
|
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.
|
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.
|
60
|
+
version: 0.3.8
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: progress_bar
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|