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

Ruby 3.0 support #364

Merged
merged 1 commit into from
Jan 25, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ language: ruby
cache: bundler
rvm:
- 2.7
- 3.0

addons:
apt:
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ gemspec
# gem 'debugger'
case config["database"]["type"]
when 'mysql'
gem 'mysql2', '~> 0.5', platform: :ruby
gem 'mysql2', platform: :ruby
when 'postgresql'
gem 'pg', '~> 0.15'
end
8 changes: 4 additions & 4 deletions lib/releaf/rspec/features_matchers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ def has_cells_text?(cells, options = {})
has_selector?(type, count: cells_count) && has_text?(cells.join(""))
end

def has_header?(*args)
has_css?("#{primary_header_css_rule} h1", *args)
def has_header?(**args)
has_css?("#{primary_header_css_rule} h1", **args)
end

def has_no_header?(*args)
has_no_css?("#{primary_header_css_rule} h1", *args)
def has_no_header?(**args)
has_no_css?("#{primary_header_css_rule} h1", **args)
end

# Allows to match againg validation errors within forms
Expand Down
1 change: 0 additions & 1 deletion releaf-core/app/builders/releaf/builders/table_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ def format_datetime_content(resource, column)
I18n.l(value, format: format) unless value.nil?
end


def format_time_content(resource, column)
value = column_value(resource, column)
format = Releaf::Builders::Utilities::DateFields.date_or_time_default_format(:time)
Expand Down
2 changes: 1 addition & 1 deletion releaf-core/releaf-core.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Gem::Specification.new do |s|
s.add_dependency 'ckeditor_rails', '~> 4.0'
s.add_dependency 'acts_as_list', '~> 0.8'
s.add_dependency 'will_paginate', '~> 3.1'
s.add_dependency 'font-awesome-rails', '~> 4.6'
s.add_dependency 'font-awesome-rails', '~> 4.0'
s.add_dependency 'globalize', '~> 6.0'
s.add_dependency 'rack-cache', '~> 1.0'
s.add_dependency 'virtus', '~> 1.0'
Expand Down
11 changes: 1 addition & 10 deletions releaf-core/spec/builders/releaf/builders/table_builder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,6 @@ def custom_title(resource); end
allow(subject).to receive(:column_value).with(resource, :birth_date)
.and_return(value)

expect(I18n).to receive(:l).with(value, format: :default)
.and_call_original

expect(subject.format_date_content(resource, :birth_date)).to eq("2012-12-29")
end
end
Expand All @@ -450,10 +447,7 @@ def custom_title(resource); end
allow(subject).to receive(:column_value).with(resource, :created_at)
.and_return(value)

allow(I18n).to receive(:l).with(value, format: "%Y-%m-%d %H:%M")
.and_return("2012-12-29 17:12:07")

expect(subject.format_datetime_content(resource, :created_at)).to eq("2012-12-29 17:12:07")
expect(subject.format_datetime_content(resource, :created_at)).to eq("2012-12-29 17:12")
end
end

Expand All @@ -463,9 +457,6 @@ def custom_title(resource); end
allow(subject).to receive(:column_value).with(resource, :created_at)
.and_return(value)

allow(I18n).to receive(:l).with(value, format: "%H:%M")
.and_return("17:12")

expect(subject.format_time_content(resource, :created_at)).to eq("17:12")
end
end
Expand Down
16 changes: 8 additions & 8 deletions releaf.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ Gem::Specification.new do |s|

s.add_development_dependency 'rspec-rails', '~> 4.0'
s.add_development_dependency 'rails-controller-testing'
s.add_development_dependency 'listen', '~> 3.2.1'
s.add_development_dependency 'capybara', '~> 3.32'
s.add_development_dependency 'selenium-webdriver', '~> 3.142'
s.add_development_dependency 'listen', '~>3.0'
s.add_development_dependency 'capybara', '~> 3.0'
s.add_development_dependency 'selenium-webdriver', '~> 3.0'
s.add_development_dependency 'factory_bot', '~> 5.2'
s.add_development_dependency 'syntax'
s.add_development_dependency 'simplecov', '~> 0.16.1'
s.add_development_dependency 'simplecov', '~> 0.16'
s.add_development_dependency 'simplecov-rcov'
s.add_development_dependency 'database_cleaner', '~> 1.8'
s.add_development_dependency 'shoulda-matchers', '~> 4.3'
s.add_development_dependency 'database_cleaner', '~> 1.0'
s.add_development_dependency 'shoulda-matchers', '~> 4.0'
s.add_development_dependency 'db-query-matchers'
s.add_development_dependency 'coveralls', '~> 0.8'
s.add_development_dependency 'timecop'
s.add_development_dependency 'with_model', '~> 2.1'
s.add_development_dependency 'with_model', '~> 2.0'
s.add_development_dependency 'pry'
s.add_development_dependency 'roo'
s.add_development_dependency 'puma', '~> 4.3'
s.add_development_dependency 'puma'

s.required_ruby_version = '>= 2.5.0'
end