fileboost 0.2.0.pre2 → 0.2.0.rc1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b09c6f264244d950aef3d870c4e102e3766449f24b724834de3d58c08e9eecd8
4
- data.tar.gz: beaf90aa5f6a0b579fd54298b108fe9fa427356d3fce5f6bffe570d828cbc0ac
3
+ metadata.gz: 0cf1f9683fd81503138ff63dfa95c700fac053e7c78417408138fddd2898dde1
4
+ data.tar.gz: c5c4db48002ca79ae2c980eba4da9f31a732e134f49233d1c789168c9fb274f1
5
5
  SHA512:
6
- metadata.gz: 143c252e1134fef6790e18ac6d9ea6b85995fb90bd7755475cbdc8411ab85aefa9ae1d80c7362ebc8fadc53500109449ffef66818ebdb641dd302129e5a9bd1e
7
- data.tar.gz: d90e35602b8be26133a51ca1ff25d65db41080ebdadff3988e81888b90c9b69e2843c2d84c58f67c8e5bcc8075d705782f575ac9b9f44d15e7725bc9e1ec549a
6
+ metadata.gz: 6e75628cd0b2de6a9a44a52f40f6668c981aad3e6f1363ca3f32441ffa5abbac6a59a21d0dc3e5aefa5f349986ca2e50f6889ff01174b4aa675c650286858ac0
7
+ data.tar.gz: 1480c6bb56d823e9189b3fd19279169f2ed922ed1d7100882d4940d64464e854776ed4cc1d89ffa56bffff4393573f3e1f622b65f011ce188b6518850ee15e32
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/bilalbudhani/fileboost/issues)
346
- - [Documentation](https://github.com/bilalbudhani/fileboost/wiki)
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
@@ -1,3 +1,3 @@
1
1
  module Fileboost
2
- VERSION = "0.2.0.pre2"
2
+ VERSION = "0.2.0.rc1"
3
3
  end
@@ -9,33 +9,24 @@ config/initializers/fileboost.rb
9
9
 
10
10
  Next steps:
11
11
 
12
- 1. Set your environment variables:
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
- 2. Or configure directly in the initializer file:
17
- Edit config/initializers/fileboost.rb with your credentials
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
- <%= fileboost_url_for post.image %>
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
- 4. Supported transformation options:
30
- - width, height (or w, h)
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 more information, visit: https://fileboost.dev
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.pre2
4
+ version: 0.2.0.rc1
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: '6.0'
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: '6.0'
25
+ version: '7'
26
26
  - !ruby/object:Gem::Dependency
27
- name: bundler
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: 8.0.0
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: 8.0.0
101
+ version: '7'
82
102
  - !ruby/object:Gem::Dependency
83
103
  name: rspec
84
104
  requirement: !ruby/object:Gem::Requirement
@@ -107,20 +127,6 @@ dependencies:
107
127
  - - "~>"
108
128
  - !ruby/object:Gem::Version
109
129
  version: '6.0'
110
- - !ruby/object:Gem::Dependency
111
- name: sqlite3
112
- requirement: !ruby/object:Gem::Requirement
113
- requirements:
114
- - - "~>"
115
- - !ruby/object:Gem::Version
116
- version: '2.0'
117
- type: :development
118
- prerelease: false
119
- version_requirements: !ruby/object:Gem::Requirement
120
- requirements:
121
- - - "~>"
122
- - !ruby/object:Gem::Version
123
- version: '2.0'
124
130
  description: Fileboost provides drop-in replacement Rails image helpers with automatic
125
131
  optimization through the Fileboost.dev service. Works exclusively with ActiveStorage
126
132
  objects, features HMAC authentication, and comprehensive transformation support.
@@ -146,13 +152,13 @@ files:
146
152
  - lib/generators/fileboost/install_generator.rb
147
153
  - lib/generators/fileboost/templates/INSTALL.md
148
154
  - lib/generators/fileboost/templates/fileboost.rb
149
- homepage: https://github.com/bilalbudhani/fileboost-ruby
155
+ homepage: https://github.com/Fileboost/fileboost-ruby
150
156
  licenses:
151
157
  - MIT
152
158
  metadata:
153
- homepage_uri: https://github.com/bilalbudhani/fileboost-ruby
154
- source_code_uri: https://github.com/bilalbudhani/fileboost-ruby
155
- changelog_uri: https://github.com/bilalbudhani/fileboost-ruby/blob/main/CHANGELOG.md
159
+ homepage_uri: https://github.com/Fileboost/fileboost-ruby
160
+ source_code_uri: https://github.com/Fileboost/fileboost-ruby
161
+ changelog_uri: https://github.com/Fileboost/fileboost-ruby/blob/main/CHANGELOG.md
156
162
  rdoc_options: []
157
163
  require_paths:
158
164
  - lib