fileboost 0.2.0.pre2 → 0.2.0.pre3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +9 -2
- data/Rakefile +20 -0
- data/lib/fileboost/version.rb +1 -1
- data/lib/generators/fileboost/templates/INSTALL.md +13 -22
- metadata +35 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd68355a3cdd26c34422cd082cb8795b10e609a8edbda257982974173a338170
|
4
|
+
data.tar.gz: 9f29b3da4b48d17b58bb2f70565e383ad184758269b8ba51245fb99ebeaa53f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50349d3d91cc8e16b077654a290320cc61d5588f8d070a2b9dab5a91cb2201b55b011ea675e2c1485276db30b12e5a89252d5454911d1e5b5ea3695ea56b8801
|
7
|
+
data.tar.gz: 6ec42cf3b8ef2c80b8fb2b24908c83b219056016f1a1cbf588c9cb9dfed96ed2965cf37a99c108343fb38bb79776b6bf903347802e31a2212ef8a214c040093d
|
data/README.md
CHANGED
@@ -7,6 +7,7 @@ Fileboost is a Rails gem that provides seamless integration with the Fileboost.d
|
|
7
7
|
## Table of Contents
|
8
8
|
|
9
9
|
- [Features](#features)
|
10
|
+
- [Requirements](#requirements)
|
10
11
|
- [Installation](#installation)
|
11
12
|
- [Configuration](#configuration)
|
12
13
|
- [Usage](#usage)
|
@@ -38,6 +39,12 @@ Fileboost is a Rails gem that provides seamless integration with the Fileboost.d
|
|
38
39
|
- 🔧 **Simple configuration** - just project ID and token required
|
39
40
|
- 🔄 **Automatic fallback** - non-ActiveStorage images work exactly as before
|
40
41
|
|
42
|
+
## Requirements
|
43
|
+
|
44
|
+
- Ruby 3.0+
|
45
|
+
- Rails 7.1+
|
46
|
+
- ActiveStorage
|
47
|
+
|
41
48
|
## Installation
|
42
49
|
|
43
50
|
Register an account at [Fileboost.dev](https://fileboost.dev) and obtain your project ID and token.
|
@@ -342,5 +349,5 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
342
349
|
|
343
350
|
## Support
|
344
351
|
|
345
|
-
- [GitHub Issues](https://github.com/
|
346
|
-
- [Documentation](https://github.com/
|
352
|
+
- [GitHub Issues](https://github.com/Fileboost/fileboost-ruby/issues)
|
353
|
+
- [Documentation](https://github.com/Fileboost/fileboost-ruby/wiki)
|
data/Rakefile
CHANGED
@@ -2,6 +2,26 @@ require "bundler/setup"
|
|
2
2
|
require "bundler/gem_tasks"
|
3
3
|
require "rspec/core/rake_task"
|
4
4
|
|
5
|
+
begin
|
6
|
+
require "appraisal"
|
7
|
+
rescue LoadError
|
8
|
+
# Appraisal not available
|
9
|
+
end
|
10
|
+
|
5
11
|
RSpec::Core::RakeTask.new(:spec)
|
6
12
|
|
7
13
|
task default: :spec
|
14
|
+
|
15
|
+
namespace :test do
|
16
|
+
desc "Run tests against all Rails versions"
|
17
|
+
task :all do
|
18
|
+
sh "bundle exec appraisal install"
|
19
|
+
sh "bundle exec appraisal rspec"
|
20
|
+
end
|
21
|
+
|
22
|
+
desc "Run tests against specific Rails version (e.g. rake test:rails[7-1])"
|
23
|
+
task :rails, [ :version ] do |t, args|
|
24
|
+
version = args[:version] || "7-2"
|
25
|
+
sh "bundle exec appraisal rails-#{version} rspec"
|
26
|
+
end
|
27
|
+
end
|
data/lib/fileboost/version.rb
CHANGED
@@ -9,33 +9,24 @@ config/initializers/fileboost.rb
|
|
9
9
|
|
10
10
|
Next steps:
|
11
11
|
|
12
|
-
1.
|
12
|
+
1. Register an account at: https://fileboost.dev
|
13
|
+
Get your project ID and secret token
|
14
|
+
|
15
|
+
2. Set your environment variables:
|
13
16
|
export FILEBOOST_PROJECT_ID="your-project-id"
|
14
17
|
export FILEBOOST_TOKEN="your-secret-token"
|
15
18
|
|
16
|
-
|
17
|
-
Edit config/initializers/fileboost.rb
|
18
|
-
|
19
|
-
3. Start using Fileboost helpers in your views:
|
20
|
-
|
21
|
-
<!-- Replace image_tag with fileboost_image_tag -->
|
22
|
-
|
23
|
-
<%= fileboost_image_tag user.avatar, alt: "Avatar", resize: {width: 100, height: 100, fit: "cover"} %>
|
24
|
-
|
25
|
-
<!-- Generate optimized URLs -->
|
19
|
+
3. Enable drop-in replacement (recommended):
|
20
|
+
Edit config/initializers/fileboost.rb and set:
|
21
|
+
config.patch_image_tag = true
|
26
22
|
|
27
|
-
|
23
|
+
4. Your existing image_tag calls now work with ActiveStorage images:
|
24
|
+
<%= image_tag user.avatar %>
|
25
|
+
<%= image_tag post.image.variant(resize_to_limit: [300, 200]) %>
|
28
26
|
|
29
|
-
|
30
|
-
|
31
|
-
- quality (or q): 1-100
|
32
|
-
- format (or f): webp, jpeg, png, gif, avif
|
33
|
-
- blur (or b): 0-100
|
34
|
-
- brightness (or br): 0-200
|
35
|
-
- contrast (or c): 0-200
|
36
|
-
- rotation (or r): 0-359
|
37
|
-
- fit: cover, contain, fill, scale-down, crop, pad
|
27
|
+
5. Or use explicit helpers:
|
28
|
+
<%= fileboost_image_tag user.avatar, resize: {w: 300, h: 200, fit: "cover"} %>
|
38
29
|
|
39
|
-
For
|
30
|
+
For documentation, visit: https://github.com/Fileboost/fileboost-ruby
|
40
31
|
|
41
32
|
===============================================================================
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fileboost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0.
|
4
|
+
version: 0.2.0.pre3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- bilal
|
7
|
+
- bilal budhani
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
@@ -15,28 +15,48 @@ dependencies:
|
|
15
15
|
requirements:
|
16
16
|
- - ">="
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: '
|
18
|
+
version: '7'
|
19
19
|
type: :runtime
|
20
20
|
prerelease: false
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
22
22
|
requirements:
|
23
23
|
- - ">="
|
24
24
|
- !ruby/object:Gem::Version
|
25
|
-
version: '
|
25
|
+
version: '7'
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
|
-
name:
|
27
|
+
name: appraisal
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|
30
30
|
- - "~>"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '2'
|
32
|
+
version: '2.5'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '2'
|
39
|
+
version: '2.5'
|
40
|
+
- !ruby/object:Gem::Dependency
|
41
|
+
name: bundler
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '2.1'
|
47
|
+
- - "<"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '2.7'
|
50
|
+
type: :development
|
51
|
+
prerelease: false
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '2.1'
|
57
|
+
- - "<"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '2.7'
|
40
60
|
- !ruby/object:Gem::Dependency
|
41
61
|
name: combustion
|
42
62
|
requirement: !ruby/object:Gem::Requirement
|
@@ -69,16 +89,16 @@ dependencies:
|
|
69
89
|
name: rails
|
70
90
|
requirement: !ruby/object:Gem::Requirement
|
71
91
|
requirements:
|
72
|
-
- - "
|
92
|
+
- - ">="
|
73
93
|
- !ruby/object:Gem::Version
|
74
|
-
version:
|
94
|
+
version: '7'
|
75
95
|
type: :development
|
76
96
|
prerelease: false
|
77
97
|
version_requirements: !ruby/object:Gem::Requirement
|
78
98
|
requirements:
|
79
|
-
- - "
|
99
|
+
- - ">="
|
80
100
|
- !ruby/object:Gem::Version
|
81
|
-
version:
|
101
|
+
version: '7'
|
82
102
|
- !ruby/object:Gem::Dependency
|
83
103
|
name: rspec
|
84
104
|
requirement: !ruby/object:Gem::Requirement
|
@@ -146,13 +166,13 @@ files:
|
|
146
166
|
- lib/generators/fileboost/install_generator.rb
|
147
167
|
- lib/generators/fileboost/templates/INSTALL.md
|
148
168
|
- lib/generators/fileboost/templates/fileboost.rb
|
149
|
-
homepage: https://github.com/
|
169
|
+
homepage: https://github.com/Fileboost/fileboost-ruby
|
150
170
|
licenses:
|
151
171
|
- MIT
|
152
172
|
metadata:
|
153
|
-
homepage_uri: https://github.com/
|
154
|
-
source_code_uri: https://github.com/
|
155
|
-
changelog_uri: https://github.com/
|
173
|
+
homepage_uri: https://github.com/Fileboost/fileboost-ruby
|
174
|
+
source_code_uri: https://github.com/Fileboost/fileboost-ruby
|
175
|
+
changelog_uri: https://github.com/Fileboost/fileboost-ruby/blob/main/CHANGELOG.md
|
156
176
|
rdoc_options: []
|
157
177
|
require_paths:
|
158
178
|
- lib
|