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

Chore: bump mongoid 9 and support ruby 3.3 #214

Merged
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
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ jobs:
strategy:
matrix:
mongodb: [4.4]
ruby: [2.7, "3.0", 3.1, 3.2]
ruby: [2.7, "3.0", 3.1, 3.2, 3.3]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

gemfile:
- carrierwave-2.1
- carrierwave-2.2
- mongoid-7
- mongoid-8
- mongoid-9
include:
- { mongodb: "4.4", ruby: "2.6", gemfile: "carrierwave-0.10" }
- { mongodb: "4.4", ruby: "2.6", gemfile: "carrierwave-0.11" }
Expand All @@ -31,15 +32,15 @@ jobs:
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongodb }}
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: cat /home/runner/work/carrierwave-mongoid/carrierwave-mongoid/vendor/bundle/ruby/3.0.0/extensions/x86_64-linux/3.0.0/mimemagic-0.4.3/gem_make.out
- run: cat /home/runner/work/carrierwave-mongoid/carrierwave-mongoid/vendor/bundle/ruby/${{ matrix.ruby }}/extensions/x86_64-linux/${{ matrix.ruby }}/mimemagic-0.4.3/gem_make.out
if: ${{ failure() }}
- run: cat /home/runner/work/carrierwave-mongoid/carrierwave-mongoid/vendor/bundle/ruby/3.0.0/gems/mimemagic-0.4.3/ext/mimemagic/Rakefile
- run: cat /home/runner/work/carrierwave-mongoid/carrierwave-mongoid/vendor/bundle/ruby/${{ matrix.ruby }}/gems/mimemagic-0.4.3/ext/mimemagic/Rakefile
if: ${{ failure() }}
- name: Run tests
run: bundle exec rake
4 changes: 2 additions & 2 deletions carrierwave-mongoid.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ Gem::Specification.new do |s|
s.require_paths = ["lib"]

s.add_dependency "carrierwave", [">= 0.8", "< 3"]
s.add_dependency "mongoid", [">= 3.0", "< 9.0"]
s.add_dependency "mongoid", [">= 3.0", "< 10.0"]
s.add_dependency "mongoid-grid_fs", [">= 1.3", "< 3.0"]
s.add_dependency "mime-types", "< 3" if RUBY_VERSION < "2.0" # mime-types 3+ doesn't support ruby 1.9
s.add_development_dependency "rspec", "~> 3.4"
s.add_development_dependency "rake", ">= 12.3.3"
s.add_development_dependency "mini_magick"
s.add_development_dependency "mini_magick", "< 5"
s.add_development_dependency "pry"
end
6 changes: 6 additions & 0 deletions gemfiles/mongoid-9.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source "https://rubygems.org"

gem "mongoid", "~> 9.0"
gem "carrierwave", "~> 2.2"

gemspec path: "../"
6 changes: 4 additions & 2 deletions spec/mongoid_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -623,11 +623,13 @@ def filename

it "attaches a new file to an existing document that had no file at first" do
doc = @class.new
doc.mongo_locations.build
new_file = doc.mongo_locations.build
expect(new_file.save).to be_truthy
expect(doc.save).to be_truthy
doc.reload

doc.mongo_locations.first.image = stub_file('test.jpeg')
new_file.image = stub_file('test.jpeg')
expect(new_file.save).to be_truthy
expect(doc.save).to be_truthy
doc.reload

Expand Down
Loading