Skip to content

Ruby3 #3518

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 41 commits into
base: main
Choose a base branch
from
Open

Ruby3 #3518

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
bb34c7e
Tested with Rails 6.1
anitagraham Jul 15, 2022
76ea092
Use matching ruby3 branch of refinerycms-i18n while still a work in p…
anitagraham Jul 18, 2022
404b7dd
Change workflow to test only Ruby 3.1. Correct reference to refinery…
anitagraham Jul 18, 2022
2d16f91
Merge branch 'master' into ruby3
anitagraham Jul 18, 2022
c06f640
Use Ruby 3 syntax callling Resource.create. Add a description for Fi…
anitagraham Jul 21, 2022
fd22de0
Tidy up configurations for mobility 1.2.9
anitagraham Jul 21, 2022
16e23dd
WIP
anitagraham Aug 20, 2022
d1d981e
Merge branch 'main' into ruby3
parndt May 11, 2023
bc748cd
Merge pull request #6 from refinery/main
anitagraham Dec 17, 2024
00c3cd6
Merge remote-tracking branch 'origin/ruby3' into ruby3
anitagraham Dec 17, 2024
0067df3
remove all capybara configuration from spec/spec_helper to already ex…
anitagraham Dec 19, 2024
19eb40d
remove reliance on www.example.com in tests, use attribute selectors …
anitagraham Dec 19, 2024
b6b34e2
previous usage of 'Pages' as a constant referring to Refinery::Pages …
anitagraham Dec 19, 2024
febcc90
saving generator options before switching to 'pretend=true' inside th…
anitagraham Dec 19, 2024
5394a97
remove another instance of 'www.example.com'
anitagraham Dec 19, 2024
fe68993
refinery_help_tag will always show the 'tooltip' message
anitagraham Dec 25, 2024
6e78d70
css cleanup: remove units from unitless values. (0px -> 0)
anitagraham Dec 29, 2024
75afa2a
css cleanup: remove recent_activities and recent_inquiries from style…
anitagraham Dec 29, 2024
b38d277
use mixins for common styles between image views
anitagraham Jan 5, 2025
2ed8b63
define ImageObject for use in Admin image views
anitagraham Jan 5, 2025
c4a4bcc
cleanup stylesheets:
anitagraham Jan 5, 2025
7be64ac
use recommended dragonfly call for stripping images instead of deprec…
anitagraham Jan 6, 2025
6257bd2
scss style reformatted all over to add blank lines and spaces.
anitagraham Jan 7, 2025
d504098
Add defined colours for image index actions.
anitagraham Jan 7, 2025
8837cdc
Add defined colours for image index actions.
anitagraham Jan 7, 2025
6eafef5
Change naming of 'grid_view' and 'list_view' to 'grid_format' and 'gr…
anitagraham Jan 7, 2025
7cf83cb
Pages
anitagraham Jan 28, 2025
c68d478
Pages
anitagraham Jan 28, 2025
3176ae8
refactor(assets): stylesheets
anitagraham Feb 1, 2025
082bc60
refactor(refinery-images): make ruby3 compatible
anitagraham Feb 10, 2025
9b1bf45
Changes to refinery/pages
anitagraham Feb 10, 2025
4b068d4
refactor(refinery-core): new helper 'locales_with_translated_field'
anitagraham Feb 11, 2025
8e734c5
refactor(refinery-core): new helper 'edit_in_locales'
anitagraham Feb 11, 2025
0acd6e1
add resource_helper to resources_controller
anitagraham Feb 11, 2025
c11dcf3
Revert "Change naming of 'grid_view' and 'list_view' to 'grid_format'…
anitagraham Feb 11, 2025
cc59b67
update jquery-ui-rails to version '~7.0.0'
anitagraham Feb 12, 2025
df965f6
update Rails to ~>7.1
anitagraham Feb 12, 2025
56b7635
update dependencies in refinerycms-testing
anitagraham Feb 12, 2025
e09e3ee
stylesheets: refactor locale icons/buttons
anitagraham Feb 18, 2025
6e16238
refactor locale actions
anitagraham Feb 18, 2025
e095a11
Changes from ruby3 branch which are really Rails 7 changes
anitagraham Feb 18, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
matrix:
database: [ mysql, postgresql ]
extension: [ core, dragonfly, images, pages, resources ]
ruby: [ 2.7, 2.6 ]
ruby: [ 3.1]
fail-fast: false
max-parallel: 20
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,4 @@ Gemfile.lock

# rspec failures
.rspec_failures
Refinery Review.md
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Refinery Review.md

19 changes: 12 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
source 'https://rubygems.org'

ruby "3.2.4"
gemspec

gem 'rails', "~>7.1"
gem 'net-smtp', require: false
gem 'net-imap', require: false
gem 'net-pop', require: false


path "./" do
gem "refinerycms-core"
gem "refinerycms-dragonfly"
gem "refinerycms-images"
gem "refinerycms-pages"
gem "refinerycms-resources"
end

gem 'refinerycms-i18n', github: 'refinery/refinerycms-i18n', branch: 'master'
gem 'refinerycms-i18n', git: 'https://github.com/anitagraham/refinerycms-i18n', branch: 'ruby3'

# Add support for refinerycms-acts-as-indexed
gem 'refinerycms-acts-as-indexed', ['~> 4.0', '>= 4.0.0'],
git: 'https://github.com/refinery/refinerycms-acts-as-indexed',
branch: 'master'
gem 'refinerycms-acts-as-indexed', '~> 4.0', '>= 4.0.0', git: 'https://github.com/refinery/refinerycms-acts-as-indexed', branch: 'master'

# Add the default visual editor, for now.
gem 'refinerycms-wymeditor', ['~> 3.0', '>= 3.0.0']
Expand Down Expand Up @@ -43,6 +49,8 @@ group :development, :test do
gem 'activejob'
gem 'bootsnap', require: false
gem 'listen', '~> 3.0'
gem 'rspec-rails', '~> 6.0.0.rc1'
gem 'puma', require: false
end

group :test do
Expand All @@ -53,9 +61,6 @@ group :test do
gem 'rspec-retry'
gem 'falcon'
gem 'falcon-capybara'

# TODO: Use beta source for Rails 6 support
gem 'rspec-rails', '~> 4.0.0.beta3'
end

# Load local gems according to Refinery developer preference.
Expand Down
2 changes: 1 addition & 1 deletion core/app/assets/javascripts/refinery/admin.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ var page_options = {
if( typeof(visual_editor_init) == "function" ) {
visual_editor_init();
}


// Wipe the title and increment the index counter by one.
$('#new_page_part_index').val(parseInt($('#new_page_part_index').val(), 10) + 1);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
%icon-font { font-family: 'FontAwesome', Helvetica, Arial, sans-serif; }
$adobe_red: B30C00FF;
$ms_word_blue: #1558BB;
$msxl_green: #0F7C42;
$mspp_brown: #C94B26;
/* icons */

.pdf_icon {@include icon(file-pdf-o, $adobe_red);}

.word_icon {@include icon(file-word-o, $ms_word_blue);}

.excel_icon {@include icon(file-excel-o, $msxl_green);}

.powerpoint_icon {@include icon(file-powerpoint-o, $mspp_brown);}

.photo_icon {@include icon(file-photo-o);}

.picture_icon {@include icon(file-picture-o);}

.plain_icon {@include icon('file-text')} // text/plain

.image_icon {@include icon(file-image-o);}

.zip_icon {@include icon(file-zip-o);}

.archive_icon {@include icon(file-archive-o);}

.sound_icon {@include icon(file-sound-o);}

.audio_icon {@include icon(file-audio-o);}

.movie_icon {@include icon(file-movie-o);}

.video_icon {@include icon(file-video-o);}

.code_icon {@include icon(file-code-o);}
136 changes: 89 additions & 47 deletions core/app/assets/stylesheets/refinery/components/_icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,104 @@

/* icons */

.add_icon {@include icon('plus-circle');}
.back_icon {@include icon('arrow-left');}
.close_icon {@include icon('times-circle')}
.add_icon {@include icon('plus-circle');}

.back_icon {@include icon('arrow-left');}

.close_icon {@include icon('times-circle')}

.delete_icon,
.delete_section_icon {@include icon('minus-circle', $icon_delete_colour);}

.download_icon {@include icon('download');}
.edit_email_icon {@include icon('envelope-o');}
.edit_icon {@include icon('edit', $icon_edit_colour);}
.email_icon {@include icon('envelope-o');}
.error_icon {@include icon('question-circle', $icon_error_colour);}
.failure_icon {@include icon('times');}
.folder_icon {@include icon('folder',$icon_folder_colour)}
.go_icon {@include icon('caret-square-o-right');}
.info_icon {@include icon('info-circle');}
.loading_icon {@include icon('spinner'); @extend .fa-spin}
.page_icon {@include icon('file-o',$icon_page_colour)}
.preview_icon {@include icon('eye', $icon_preview_colour)}
.remove_icon {@include icon('unlink', $icon_delete_colour);}
.reorder_done_icon {@include icon('thumbs-o-up')}
.reorder_h_icon {@include icon('exchange');}
.reorder_icon {@include icon('unsorted');}
.delete_section_icon {@include icon('minus-circle', $icon_delete_colour);}

.download_icon {@include icon('download');}

.edit_email_icon {@include icon('envelope-o');}

.edit_icon {@include icon('edit', $icon_edit_colour);}

.edit_locale_icon {@include icon('edit', $icon_locale_colour, $size: 1.2rem)}

.locale_icon {@include icon('comment', $icon_locale_colour) }

.email_icon {@include icon('envelope-o');}

.error_icon {@include icon('question-circle', $icon_error_colour);}

.failure_icon {@include icon('times');}

.folder_icon {@include icon('folder', $icon_folder_colour)}

.folderopen_icon {@include icon('folder-open', $icon_folder_colour)}

.go_icon {@include icon('caret-square-o-right');}

.info_icon {@include icon('info-circle');}

.loading_icon {@include icon('spinner'); @extend .fa-spin}

.page_icon {@include icon('file-o', $icon_page_colour)}

.preview_icon {@include icon('eye', $icon_preview_colour)}

.remove_icon {@include icon('unlink', $icon_delete_colour);}

.reorder_done_icon {@include icon('thumbs-o-up')}

.reorder_h_icon {@include icon('exchange');}

.reorder_icon {@include icon('unsorted');}

.reorder_icon.loading {@include icon('spinner')}
.search_icon {@include icon('search')}
.settings_icon {@include icon('gear')}
.sortdown_icon {@include icon('sort-down')}
.sortup_icon {@include icon('sort-up')}
.spam_empty_icon {@include icon('trash-o');}
.spam_icon {@include icon('trash');}
.success_icon {@include icon('check');}

.search_icon {@include icon('search')}

.settings_icon {@include icon('gear')}

.sortdown_icon {@include icon('sort-down')}

.sortup_icon {@include icon('sort-up')}

.spam_empty_icon {@include icon('trash-o');}

.spam_icon {@include icon('trash');}

.success_icon {@include icon('check');}

.switch_view_grid_icon {@include icon('th')}

.switch_view_list_icon {@include icon('list')}
.upload_icon {@include icon('upload');}
.user_comment_icon {@include icon('comment-o');}
.warning_icon {@include icon('warning', $icon_warning_colour)}

.hidden_icon {display:none}
.upload_icon {@include icon('upload');}

.user_comment_icon {@include icon('comment-o');}

.warning_icon {@include icon('warning', $icon_warning_colour)}

.hidden_icon {display: none}

.unhidden_icon {display: inline-block}

// stacked icon/text used for locales
.locale_marker {
display: inline-block;
font-size: 8px;
margin-right: 10px;
position: relative;
top: -8px;
.fa-stack strong {
left: 7px;
line-height: 1em;
position: absolute;
top: 9px;
}
.locale_icon {
position: relative;
// icon_base (the icon) occupies the ::before position
@include icon_base($locale_icon_colour, $size: 1.5rem);

&::after {
position: absolute;
left: 0.3rem;
font-size: 0.8rem;
color: $locale_text_colour;
font-weight: bold;
content: attr(id);
text-transform: uppercase;
}
}

// don't want underlines on icons
#content a[class$='icon'] {border-bottom: none}
#content a[class$='icon']:hover {border-bottom: none}
#content {
a[class$='icon'] {
border-bottom: none;

&:hover {border-bottom: none}
}
}
17 changes: 12 additions & 5 deletions core/app/assets/stylesheets/refinery/global/_colours.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,22 @@ $icon_locale_colour: #b7e3fc; // pale blue
$icon_page_colour: #86cffa; //
$icon_warning_colour: #FF6600; // orange

$info_icon_blue: #316CC8;
$info_icon_blue: #022864;

$icon_preview_colour: $icon_default_colour;
$icon_edit_colour: $icon_default_colour;
$icon_add_colour: $icon_default_colour;

$locale_icon_colour: $icon_locale_colour; // pale blue
$locale_text_colour: #444444AA;
$locale_selected_background: #65c3f7;
$locale_hover_background: #cae7fb;
$current_active_locale: #22A7F2;
$locale_active_background: #22A7F2;

$action_background_colour: lighten($icon_locale_colour,10%);
$action_border_colour: $icon_locale_colour;
$action_border_colour: #b7e3fc;

// $icon_preview_colour: #7f00ff; // violet
// $icon_edit_colour: #007fff; // azure
// $icon_add_colour: #7fff00; // chartreuse
$index_entry_hover_background: #f1f1f1;
$index_entry_actions_background: #f1f1f1;
$index_entry_actions_border: #788;
99 changes: 99 additions & 0 deletions core/app/assets/stylesheets/refinery/mixins/_images.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
@mixin indexImage {
padding: 0;
margin: 0;
line-height: 1.2;
a.edit_link {
display: inline-block;
font-weight: bold;
height: fit-content;

&:has(img) { border-bottom: 0}
}
.alt {font-style: italic}
.filename {font-style: italic}
.title {text-transform: capitalize}
}

@mixin gridImage {
@include indexImage;

a:has(img) ~ * {
display: inline-block;
margin-right: 2px;
}
.actions {
@include imageActions {
justify-content: flex-start;
};
margin: 0 0.25rem;
border: 0.5px solid $index_entry_actions_border;
background-color: $index_entry_actions_background;
border-radius: 2px;
}
}

@mixin listImage {
@include indexImage;
//margin: 0 12px 12px 0;
padding: 0;
overflow: hidden;
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: baseline;
gap: 1rem;
.actions {
@include imageActions {
margin-left: auto;
justify-content: flex-end;
}
}

&:hover {
background-color: $index_entry_hover_background;
}
}

@mixin imageIndexLayout {
list-style-type: none;
width: 100%;
padding: 0;
line-height: 1.2;
@content;
}

// apply to #image_grid
@mixin imageGridLayout {
@include imageIndexLayout {
padding-inline-start: 0;
display: grid;
grid-template-columns: repeat(4, 150px);
grid-template-rows: auto;
gap: 15px;
}
}

// apply to #image_list
@mixin imageListLayout {
@include imageIndexLayout {
margin: 10px 0 15px 0;
}
}

@mixin imageActions {
// unset some
position: relative;
top: unset;
right: unset;
width: auto;

display: flex;
flex-direction: row;
gap: 0.5rem;
line-height: 1.5;
a {
float: none;
margin: 0;
}
@content;
}
Loading
Loading