Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 3.3.5 #131

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,39 @@ jobs:
matrix:
gemfile:
- Gemfile
- gemfiles/Gemfile-rails-7-1
- gemfiles/Gemfile-rails-7-0
- gemfiles/Gemfile-rails-6-1
- gemfiles/Gemfile-rails-6-0
ruby:
- 2.7
- 3.0
- 3.1
- 3.2
- 3.3
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
UPLOADCARE_PUBLIC_KEY: demopublickey
UPLOADCARE_SECRET_KEY: demoprivatekey
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs bundle install and caches installed gems automatically
bundler: latest
- run: bundle exec rake

code-analysis:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version:
- 2.7
- 3.2
- 3.3
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Install gems
run: gem install rubocop
- name: Check code
run: bundle exec rubocop
15 changes: 13 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.
The format is based now on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 3.3.5 — 2023-10-15

### Fixed

* Documentation issue with `uploadcare_include_tag`
vipulnsward marked this conversation as resolved.
Show resolved Hide resolved

### Breaking Changes

* Drop support for Ruby < 3.x
* Drop support for Rails < 6.1x

## 3.3.4 — 2023-04-04

### Changed
Expand Down Expand Up @@ -40,7 +51,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

Guarantee support of maintainable versions of Ruby and Rails.

### Breaking Сhanges
### Breaking Changes

Drop support of unmaintainable Ruby 2.4, 2.5, 2.6 and Rails before 6.0.

Expand All @@ -57,7 +68,7 @@ This version supports latest Uploadcare REST API — [v0.7](https://uploadcare.c
* [Virus checking](https://uploadcare.com/docs/security/malware-protection/)
* [Object recognition](https://uploadcare.com/docs/intelligence/object-recognition/)

### Breaking Сhanges
### Breaking Changes

- For `Uploadcare::FileApi#get_file`
- File information doesn't return `image_info` and `video_info` fields anymore
Expand Down
6 changes: 5 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ gemspec

gem 'http-parser', '~> 1.2', '>= 1.2.3'
gem 'rake', '~> 13.0.6'
gem 'rspec', '~> 3.10'
gem 'rspec', '~> 3.12'
gem 'rspec-rails', '>= 5.1'
gem 'rubocop', '~> 1.48'
gem 'vcr', '~> 6.1'
gem 'webmock', '~> 3.18'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Add this string to your `<head>` html-tag
<html>
<head>
<title>RailsApp</title>
<%= uploadcare_widget_tag %>
<%= uploadcare_include_tag %>
<!--
results in:
<script src="https://ucarecdn.com/libs/widget/3.x/uploadcare.full.min.js"></script>
Expand Down
5 changes: 0 additions & 5 deletions gemfiles/Gemfile-rails-6-0

This file was deleted.

8 changes: 8 additions & 0 deletions gemfiles/Gemfile-rails-6-1
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,11 @@ source "https://rubygems.org"
gemspec path: ".."

gem "rails", '~> 6.1.0', github: 'rails/rails', branch: '6-1-stable'

gem 'http-parser', '~> 1.2', '>= 1.2.3'
gem 'rake', '~> 13.0.6'
gem 'rspec', '~> 3.12'
gem 'rspec-rails', '>= 5.1'
gem 'rubocop', '~> 1.48'
gem 'vcr', '~> 6.1'
gem 'webmock', '~> 3.18'
8 changes: 8 additions & 0 deletions gemfiles/Gemfile-rails-7-0
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,11 @@ source "https://rubygems.org"
gemspec path: ".."

gem "rails", '~> 7.0.0', github: 'rails/rails', branch: '7-0-stable'

gem 'http-parser', '~> 1.2', '>= 1.2.3'
gem 'rake', '~> 13.0.6'
gem 'rspec', '~> 3.12'
gem 'rspec-rails', '>= 5.1'
gem 'rubocop', '~> 1.48'
gem 'vcr', '~> 6.1'
gem 'webmock', '~> 3.18'
13 changes: 13 additions & 0 deletions gemfiles/Gemfile-rails-7-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
source "https://rubygems.org"

gemspec path: ".."

gem "rails", '~> 7.1.0', github: 'rails/rails', branch: '7-1-stable'

gem 'http-parser', '~> 1.2', '>= 1.2.3'
gem 'rake', '~> 13.0.6'
gem 'rspec', '~> 3.12'
gem 'rspec-rails', '>= 5.1'
gem 'rubocop', '~> 1.48'
gem 'vcr', '~> 6.1'
gem 'webmock', '~> 3.18'
4 changes: 2 additions & 2 deletions lib/uploadcare/rails/active_record/mount_uploadcare_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ def mount_uploadcare_file(attribute)
end

unless Uploadcare::Rails.configuration.do_not_store
after_save "uploadcare_store_#{attribute}!".to_sym, if: "will_save_change_to_#{attribute}?".to_sym
after_save :"uploadcare_store_#{attribute}!", if: :"will_save_change_to_#{attribute}?"
end

return unless Uploadcare::Rails.configuration.delete_files_after_destroy

after_destroy "uploadcare_delete_#{attribute}!".to_sym
after_destroy :"uploadcare_delete_#{attribute}!"
end
# rubocop:enable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def mount_uploadcare_file_group(attribute)
Uploadcare::GroupApi.store_group(group_id)
end

after_save "uploadcare_store_#{attribute}!".to_sym unless Uploadcare::Rails.configuration.do_not_store
after_save :"uploadcare_store_#{attribute}!" unless Uploadcare::Rails.configuration.do_not_store
end
# rubocop:enable Metrics/MethodLength
end
Expand Down
2 changes: 1 addition & 1 deletion lib/uploadcare/rails/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module Uploadcare
module Rails
VERSION = '3.3.4'
VERSION = '3.3.5'
end
end
6 changes: 0 additions & 6 deletions uploadcare-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,4 @@ Gem::Specification.new do |gem|
gem.version = Uploadcare::Rails::VERSION
gem.add_dependency 'rails', '>= 6'
gem.add_dependency 'uploadcare-ruby', '>= 4.3'

gem.add_development_dependency 'rspec', '~> 3.12'
gem.add_development_dependency 'rspec-rails', '>= 5.1'
gem.add_development_dependency 'rubocop', '~> 1.48'
gem.add_development_dependency 'vcr', '~> 6.1'
gem.add_development_dependency 'webmock', '~> 3.18'
end