Skip to content

🚧 Update mongoid version #57

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

davideddr
Copy link

Updated the mongoid gem version for a better compatibility for the new versions.

module Mongoid
module Enum
VERSION = "0.4.0"
VERSION = '0.4.0'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

@@ -1 +1 @@
require "bundler/gem_tasks"
require 'bundler/gem_tasks'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

expect { |b| Mongoid::Enum.configure &b }
.to yield_with_args Mongoid::Enum.configuration
.to yield_with_args Mongoid::Enum.configuration
Copy link
Collaborator

Choose a reason for hiding this comment

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

Layout/DotPosition: Place the . on the previous line, together with the method call receiver.

describe ".configure" do
it "yields configuration if block is given" do
describe '.configure' do
it 'yields configuration if block is given' do
Copy link
Collaborator

Choose a reason for hiding this comment

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

Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

expect(Mongoid::Enum.configuration).to be Mongoid::Enum.configuration
end
end

describe ".configure" do
it "yields configuration if block is given" do
describe '.configure' do
Copy link
Collaborator

Choose a reason for hiding this comment

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

Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

it "uses the first value" do
describe 'default values' do
context 'when not specified' do
it 'uses the first value' do
Copy link
Collaborator

Choose a reason for hiding this comment

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

Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

context "when not specified" do
it "uses the first value" do
describe 'default values' do
context 'when not specified' do
Copy link
Collaborator

Choose a reason for hiding this comment

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

Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

describe "default values" do
context "when not specified" do
it "uses the first value" do
describe 'default values' do
Copy link
Collaborator

Choose a reason for hiding this comment

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

Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

context "and more than one document" do
it "returns all documents with those values" do
context 'and more than one document' do
it 'returns all documents with those values' do
Copy link
Collaborator

Choose a reason for hiding this comment

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

Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

instance.save
instance.author!
instance.editor!
expect(User.author.to_a).to eq [instance]
end
end

context "and more than one document" do
it "returns all documents with those values" do
context 'and more than one document' do
Copy link
Collaborator

Choose a reason for hiding this comment

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

Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

Copy link

@wladimirgramacho wladimirgramacho left a comment

Choose a reason for hiding this comment

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

I currently created a fork for my company just to update the gem version, so it'd be very good if we could update it in the main repo

@wladimirgramacho
Copy link

@thetron could you take a look at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants