repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/app/helpers/refinery/custom_assets_helper.rb
core/app/helpers/refinery/custom_assets_helper.rb
module Refinery module CustomAssetsHelper def custom_javascripts ::Refinery::Core.javascripts.uniq end def custom_stylesheets ::Refinery::Core.stylesheets.uniq(&:path) end end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/app/helpers/refinery/translation_helper.rb
core/app/helpers/refinery/translation_helper.rb
module Refinery module TranslationHelper # Overrides Rails' core I18n.t() function to produce a more helpful error message. # The default one wreaks havoc with CSS and makes it hard to understand the problem. def t(key, options = {}) if (val = super) =~ /class.+?translation_missing/ val = v...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/app/helpers/refinery/site_bar_helper.rb
core/app/helpers/refinery/site_bar_helper.rb
module Refinery module SiteBarHelper # Generates the link to determine where the site bar switch button returns to. def site_bar_switch_link link_to_if(admin?, t('.switch_to_your_website', site_bar_translate_locale_args), refinery.root_path(site_bar_translate_locale_args), ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/app/helpers/refinery/html_truncation_helper.rb
core/app/helpers/refinery/html_truncation_helper.rb
require 'truncate_html' module Refinery module HtmlTruncationHelper # Like the Rails _truncate_ helper but doesn't break HTML tags, entities, and words. # <script> tags pass through and are not counted in the total. # the omission specified _does_ count toward the total length count. # use :link => ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/app/helpers/refinery/tag_helper.rb
core/app/helpers/refinery/tag_helper.rb
module Refinery module TagHelper # Returns <img class='help' tooltip='Your Input' src='refinery/icons/information.png' /> # Remember to wrap your block with <span class='label_with_help'></span> if you're using a label next to the help tag. def refinery_help_tag(title='Tip') title = title.html_saf...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/app/helpers/refinery/admin_helper.rb
core/app/helpers/refinery/admin_helper.rb
module Refinery module AdminHelper def current_admin_locale # TODO: move current_admin_locale to Refinery::I18n ::I18n.locale end def locale_country(locale) locale.to_s.upcase.split('-').last end end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/app/helpers/refinery/admin/visual_editor_helper.rb
core/app/helpers/refinery/admin/visual_editor_helper.rb
module Refinery module Admin module VisualEditorHelper def visual_editor_javascripts Refinery::Core.visual_editor_javascripts.uniq end def visual_editor_stylesheets Refinery::Core.visual_editor_stylesheets.uniq(&:path) end end end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/app/controllers/application_controller.rb
core/app/controllers/application_controller.rb
# Filters added to this controller apply to all controllers in the application. # Likewise, all the methods added will be available for all controllers. class ApplicationController < ActionController::Base end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/app/controllers/refinery/sitemap_controller.rb
core/app/controllers/refinery/sitemap_controller.rb
module ::Refinery class SitemapController < ::Refinery::FastController layout nil def index headers['Content-Type'] = 'application/xml' respond_to do |format| format.xml do @locales = Refinery::I18n.frontend_locales end end end end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/app/controllers/refinery/fast_controller.rb
core/app/controllers/refinery/fast_controller.rb
module Refinery class FastController < ActionController::Base def message render :partial => '/refinery/message', :layout => false end end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/app/controllers/refinery/admin_controller.rb
core/app/controllers/refinery/admin_controller.rb
# Filters added to this controller apply to all controllers in the refinery backend. # Likewise, all the methods added will be available for all controllers in the refinery backend. module Refinery class AdminController < ::ActionController::Base include ::Refinery::ApplicationController helper Refinery::Core...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/app/controllers/refinery/admin/core_controller.rb
core/app/controllers/refinery/admin/core_controller.rb
module Refinery module Admin class CoreController < ::Refinery::AdminController def index redirect_to refinery_admin_root_path end end end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/app/controllers/refinery/admin/dialogs_controller.rb
core/app/controllers/refinery/admin/dialogs_controller.rb
module Refinery module Admin class DialogsController < ::Refinery::AdminController TYPES = %w[image link].freeze before_action :find_dialog_type, :find_iframe_src, only: [:show] def index redirect_to Refinery::Core.backend_path end def show render layout: false ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/app/models/refinery/core/base_model.rb
core/app/models/refinery/core/base_model.rb
require 'active_record' module Refinery module Core class BaseModel < ActiveRecord::Base self.abstract_class = true def users_manager @users_manager ||= Refinery::Core::UsersManager.new end end end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/system/refinery/application_layout_spec.rb
core/spec/system/refinery/application_layout_spec.rb
require 'spec_helper' module Refinery describe 'layout', :type => :system do refinery_login let(:home_page) do FactoryBot.create :page, :title => 'Home', :link_url => '/' end describe 'body' do it "has an id that includes the page's canonical name" do visit home_page.url ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/system/refinery/core_spec.rb
core/spec/system/refinery/core_spec.rb
require "spec_helper" module Refinery module Core describe Engine, :type => :system do describe "#refinery_inclusion!" do it "should be idempotent" do expect { visit(refinery.root_path) }.not_to raise_error Engine.refinery_inclusion! Engine.refinery_inclusion! ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/system/refinery/site_bar_spec.rb
core/spec/system/refinery/site_bar_spec.rb
require "spec_helper" module Refinery describe "site bar", :type => :system do refinery_login describe "logout link" do let(:logout_path) { '/refinery/logout' } context "when set" do before do allow(Refinery::Core).to receive(:refinery_logout_path).and_return(logout_path) ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/system/refinery/admin/xhr_paging_spec.rb
core/spec/system/refinery/admin/xhr_paging_spec.rb
require "spec_helper" module Refinery describe "Crudify", type: :system do refinery_login describe "xhr_paging", :js do # Refinery::Admin::ImagesController specifies :order => 'created_at DESC' in crudify let(:first_image) { Image.order('created_at DESC').first } let(:last_image) { Image.o...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/system/refinery/admin/custom_assets_spec.rb
core/spec/system/refinery/admin/custom_assets_spec.rb
require "spec_helper" module Refinery describe "custom", type: :system do refinery_login let(:custom_js){ Refinery.roots('refinery/core').join('spec/support/fixtures/custom_js.js') } let(:custom_css){ Refinery.roots('refinery/core').join('spec/support/fixtures/custom_css.css') } before do Rai...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/system/refinery/admin/dialogs_spec.rb
core/spec/system/refinery/admin/dialogs_spec.rb
require "spec_helper" module Refinery describe "dialog", type: :system do refinery_login context "links" do it "have iframe src" do visit refinery.admin_dialog_path("Link") expect(page).to have_selector("iframe[src$='/refinery/pages_dialogs/link_to']") end end context "i...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/support/refinery.rb
core/spec/support/refinery.rb
require 'refinery/testing' RSpec.configure do |config| config.extend Refinery::Testing::ControllerMacros::Authentication, :type => :controller config.include Refinery::Testing::ControllerMacros::Routes, :type => :controller config.extend Refinery::Testing::FeatureMacros::Authentication, :type => :system # set...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/support/fixtures/valid_engine.rb
core/spec/support/fixtures/valid_engine.rb
module Refinery module ValidEngine class << self def root Pathname.new File.expand_path("../", __FILE__) end end class Engine < Rails::Engine end end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/support/fixtures/invalid_engine.rb
core/spec/support/fixtures/invalid_engine.rb
module Refinery module InvalidEngine class Engine < Rails::Engine end end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/presenters/refinery/translated_field_presenter_spec.rb
core/spec/presenters/refinery/translated_field_presenter_spec.rb
require "spec_helper" module Refinery describe TranslatedFieldPresenter do let(:page) { FactoryBot.build(:page) } before do Mobility.with_locale(:en) do page.title = "draft" page.save! end Mobility.with_locale(:lv) do page.title = "melnraksts" page.save! ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/helpers/refinery/html_truncation_helper_spec.rb
core/spec/helpers/refinery/html_truncation_helper_spec.rb
require "spec_helper" module Refinery describe HtmlTruncationHelper, :type => :helper do describe "#truncate" do it "returns nil if text is not present" do expect(helper.truncate("")).to be_nil end context "when preserve_html_tags option is present" do it "preserve html tags w...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/helpers/refinery/admin_helper_spec.rb
core/spec/helpers/refinery/admin_helper_spec.rb
require "spec_helper" module Refinery describe AdminHelper, :type => :helper do describe "locale_country" do it "should return the second part of a dialect" do expect(helper.locale_country('zh-TW')).to eq("TW") end it "should return the locale if it is not a dialect" do expect(...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/helpers/refinery/pagination_helper_spec.rb
core/spec/helpers/refinery/pagination_helper_spec.rb
require "spec_helper" module Refinery describe PaginationHelper, :type => :helper do describe "#pagination_css_class" do context "when request.xhr? and params[:from_page] is set" do before do allow(controller.request).to receive(:xhr?).and_return(true) end context "when ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/helpers/refinery/custom_assets_helper_spec.rb
core/spec/helpers/refinery/custom_assets_helper_spec.rb
require "spec_helper" module Refinery describe CustomAssetsHelper, :type => :helper do def clear_assets_used_by_spec Refinery::Core.javascripts.reject! {|j| %w[test parndt].include?(j) } Refinery::Core.stylesheets.reject! {|s| %w[test parndt].include?(s.path) } end before { clear_assets_used...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/helpers/refinery/tag_helper_spec.rb
core/spec/helpers/refinery/tag_helper_spec.rb
require "spec_helper" module Refinery describe TagHelper, :type => :helper do describe "#refinery_help_tag" do it "makes title html_safe if it's not already" do expect(helper.refinery_help_tag("<br /> ugisozols")).to match(/&lt;br \/&gt; ugisozols/) end end describe "#refinery_icon_...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/helpers/refinery/translation_helper_spec.rb
core/spec/helpers/refinery/translation_helper_spec.rb
require "spec_helper" module Refinery describe TranslationHelper, :type => :helper do describe "#t" do it "overrides Rails' translation method" do expect(helper.t("ugisozols")).to eq("i18n: Ugisozols") expect(helper.t("ugisozols.test")).to eq("i18n: Test") end end describe "...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/helpers/refinery/meta_helper_spec.rb
core/spec/helpers/refinery/meta_helper_spec.rb
require 'spec_helper' module Refinery describe MetaHelper, type: :helper do describe '#canonical_id' do context "when page doesn't exist" do let(:page) { nil } it 'returns nothing' do expect(helper.canonical_id(page)).to be_nil end end context 'when page exi...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/controllers/refinery/sitemap_controller_spec.rb
core/spec/controllers/refinery/sitemap_controller_spec.rb
require 'spec_helper' module Refinery describe SitemapController, :type => :controller do before (:each) do @request.env['HTTP_ACCEPT'] = 'application/xml' end it "shows a valid xml response" do get :index expect(response).to be_successful end end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/controllers/refinery/admin/dummy_controller_spec.rb
core/spec/controllers/refinery/admin/dummy_controller_spec.rb
require "spec_helper" module Refinery module Admin class DummyController < Refinery::AdminController def index head :ok end end end end module Refinery module Admin describe DummyController, :type => :controller do before do @routes = ActionDispatch::Routing::RouteS...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/lib/generators/refinery/core/core_generator_spec.rb
core/spec/lib/generators/refinery/core/core_generator_spec.rb
require 'spec_helper' require 'generator_spec/test_case' require 'generators/refinery/core/core_generator' module Refinery describe CoreGenerator do include GeneratorSpec::TestCase destination File.expand_path("../../../../../tmp", __FILE__) before do prepare_destination run_generator en...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/lib/generators/refinery/engine/engine_generator_with_author_spec.rb
core/spec/lib/generators/refinery/engine/engine_generator_with_author_spec.rb
require 'spec_helper' require 'fileutils' require 'generator_spec/test_case' require 'generators/refinery/engine/engine_generator' module Refinery describe EngineGenerator do include GeneratorSpec::TestCase destination File.expand_path("../../../../../../tmp", __FILE__) before do prepare_destinati...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/lib/generators/refinery/engine/engine_generator_sanity_check_spec.rb
core/spec/lib/generators/refinery/engine/engine_generator_sanity_check_spec.rb
require 'spec_helper' require 'generator_spec/test_case' require 'generators/refinery/engine/engine_generator' module Refinery describe EngineGenerator do include GeneratorSpec::TestCase it "exits when reserved word is used for extension name" do clash_keywords = YAML.load_file(File.expand_path("../.....
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/lib/generators/refinery/engine/engine_generator_without_frontend_spec.rb
core/spec/lib/generators/refinery/engine/engine_generator_without_frontend_spec.rb
require 'spec_helper' require 'fileutils' require 'generator_spec/test_case' require 'generators/refinery/engine/engine_generator' module Refinery describe EngineGenerator do include GeneratorSpec::TestCase destination File.expand_path("../../../../../../tmp", __FILE__) before do prepare_destinati...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/lib/generators/refinery/engine/engine_generator_spec.rb
core/spec/lib/generators/refinery/engine/engine_generator_spec.rb
require 'spec_helper' require 'fileutils' require 'generator_spec/test_case' require 'generators/refinery/engine/engine_generator' module Refinery describe EngineGenerator do include GeneratorSpec::TestCase destination File.expand_path("../../../../../../tmp", __FILE__) before do prepare_destinati...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/lib/generators/refinery/engine/engine_generator_multiple_resources_spec.rb
core/spec/lib/generators/refinery/engine/engine_generator_multiple_resources_spec.rb
require 'spec_helper' require 'fileutils' require 'generator_spec/test_case' require 'generators/refinery/engine/engine_generator' module Refinery describe EngineGenerator do include GeneratorSpec::TestCase destination File.expand_path("../../../../../../tmp", __FILE__) let(:extension_root){"#{destinatio...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/lib/generators/refinery/engine/engine_generator_with_i18n_spec.rb
core/spec/lib/generators/refinery/engine/engine_generator_with_i18n_spec.rb
require 'spec_helper' require 'fileutils' require 'generator_spec/test_case' require 'generators/refinery/engine/engine_generator' module Refinery describe EngineGenerator do include GeneratorSpec::TestCase destination File.expand_path("../../../../../../tmp", __FILE__) before do prepare_destinati...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/lib/generators/refinery/cms/cms_generator_spec.rb
core/spec/lib/generators/refinery/cms/cms_generator_spec.rb
require 'spec_helper' require 'generator_spec/generator_example_group' require 'generators/refinery/cms/cms_generator' module Refinery describe CmsGenerator do include GeneratorSpec::TestCase destination File.expand_path("../../../../../../tmp", __FILE__) before do prepare_destination File....
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/lib/refinery/authorisation_manager_spec.rb
core/spec/lib/refinery/authorisation_manager_spec.rb
require 'spec_helper_no_rails' require 'refinery/core/authorisation_manager' module Refinery module Core RSpec.describe AuthorisationManager do subject { Refinery::Core::AuthorisationManager.new } end end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/lib/refinery/core_spec.rb
core/spec/lib/refinery/core_spec.rb
require 'spec_helper' describe Refinery do describe "#include_once" do it "shouldn't double include a module" do mod = Module.new do def self.included(base) base::INCLUSIONS << self super end end [Module.new, Class.new].each do |target| target::INCLU...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/lib/refinery/cli_spec.rb
core/spec/lib/refinery/cli_spec.rb
require "spec_helper" require 'refinery/cli' require "rake" describe "Cli" do let(:rake) { Rake::Application.new } before do Rake.application = rake load File.expand_path("../../../../lib/tasks/refinery.rake", __FILE__) Rake::Task.define_task(:environment) end context "rake refinery:override:list...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/lib/refinery/application_controller_spec.rb
core/spec/lib/refinery/application_controller_spec.rb
require "spec_helper" module Refinery describe ApplicationController, :type => :controller do before do Rails.application.routes.draw { mount Refinery::Core::Engine, :at => '/' get "anonymous/index" } end after do Rails.application.reload_routes! end controller...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/lib/refinery/menu_spec.rb
core/spec/lib/refinery/menu_spec.rb
require 'spec_helper' require 'refinery/menu' require 'refinery/menu_item' module Refinery describe Menu do it 'constructs a menu given items' do Menu.new([{:id => 1}, {:id => 2}]).items.each { |item| expect(item).to be_kind_of MenuItem } end it 'allows construction of a new menu fro...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/lib/refinery/plugin_spec.rb
core/spec/lib/refinery/plugin_spec.rb
require 'spec_helper' module Refinery module RefineryRspec class Engine < ::Rails::Engine isolate_namespace ::Refinery ::Refinery::Plugin.register do |plugin| plugin.name = 'refinery_rspec' plugin.hide_from_menu = true end end end end module Refinery RSpec.describe Plug...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/lib/refinery/plugins_spec.rb
core/spec/lib/refinery/plugins_spec.rb
require 'spec_helper' module Refinery module MyPlugin class Engine < ::Rails::Engine isolate_namespace ::Refinery ::Refinery::Plugin.register do |plugin| plugin.name = "my_plugin" plugin.hide_from_menu = true end end end module MyOtherPlugin class Engine < ::Rails::...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/lib/refinery/crud_spec.rb
core/spec/lib/refinery/crud_spec.rb
require "spec_helper" ActiveRecord::Schema.define do create_table :refinery_crud_dummies, force: true do |t| t.integer :parent_id t.integer :lft t.integer :rgt t.integer :depth end end module Refinery class CrudDummy < ActiveRecord::Base acts_as_nested_set end class CrudDummyController ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/lib/refinery/core/configuration_spec.rb
core/spec/lib/refinery/core/configuration_spec.rb
require 'spec_helper' module Refinery module Core describe 'configuration' do describe '.site_name' do # reset any previously defined site name before do Refinery::Core.site_name = nil end context 'when set in configuration' do it 'returns name set by Re...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/lib/refinery/core/users_manager_spec.rb
core/spec/lib/refinery/core/users_manager_spec.rb
require 'spec_helper_no_rails' require 'refinery/core/users_manager' module Refinery module Core RSpec.describe UsersManager do end end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/spec/lib/refinery/core/nil_user_spec.rb
core/spec/lib/refinery/core/nil_user_spec.rb
require 'spec_helper_no_rails' require 'refinery/core/nil_user' module Refinery module Core RSpec.describe NilUser do describe "plugins" do it "has all" do expect(subject.plugins).to eq(Refinery::Plugins.registered) end end describe "landing url" do let(:activ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinery.rb
core/lib/refinery.rb
require 'rails' # from railties require 'active_record' require 'action_controller' require 'rbconfig' require 'font-awesome-sass' require 'jquery-rails' module Refinery require 'refinery/errors' autoload :Activity, 'refinery/activity' autoload :ApplicationController, 'refinery/application_controller' autoloa...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinerycms-core.rb
core/lib/refinerycms-core.rb
require 'refinery/core'
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/generators/refinery/dummy/dummy_generator.rb
core/lib/generators/refinery/dummy/dummy_generator.rb
require 'rails/generators' require 'rails/generators/rails/app/app_generator' module Refinery class DummyGenerator < Rails::Generators::Base desc "Creates blank Rails application, installs Refinery CMS, and all sample data" class_option :database, :default => '' def self.source_paths paths = self...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/generators/refinery/dummy/templates/rails/routes.rb
core/lib/generators/refinery/dummy/templates/rails/routes.rb
Rails.application.routes.draw do mount Refinery::Core::Engine, :at => Refinery::Core.mounted_path end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/generators/refinery/core/core_generator.rb
core/lib/generators/refinery/core/core_generator.rb
module Refinery class CoreGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) def generate_refinery_initializer template "config/initializers/refinery/core.rb.erb", File.join(destination_root, "config", "initializers", "refinery", "core.rb") end...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/generators/refinery/engine/engine_generator.rb
core/lib/generators/refinery/engine/engine_generator.rb
require 'refinery/extension_generation' require 'refinery/generators/named_base' require 'refinery/generators/generated_attribute' module Refinery class EngineGenerator < Refinery::Generators::NamedBase source_root Pathname.new(File.expand_path('../templates', __FILE__)) include Refinery::ExtensionGeneratio...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/generators/refinery/engine/templates/spec/spec_helper.rb
core/lib/generators/refinery/engine/templates/spec/spec_helper.rb
# Configure Rails Environment ENV["RAILS_ENV"] ||= 'test' if File.exist?(dummy_path = File.expand_path('../dummy/config/environment.rb', __FILE__)) require dummy_path elsif File.dirname(__FILE__) =~ %r{vendor/extensions} # Require the path to the refinerycms application this is vendored inside. require File.expa...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/generators/refinery/cms/cms_generator.rb
core/lib/generators/refinery/cms/cms_generator.rb
require 'pathname' require 'mkmf' module Refinery class CmsGenerator < Rails::Generators::Base source_root Pathname.new(File.expand_path('../templates', __FILE__)) class_option :update, :type => :boolean, :aliases => nil, :group => :runtime, :desc => "Update an existing Refinery ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinery/plugins.rb
core/lib/refinery/plugins.rb
require 'forwardable' module Refinery class Plugins include Enumerable extend Forwardable def initialize(*args) @plugins = Array.new(*args) end def_delegators :@plugins, :<<, :each, :delete_if, :length, :size, :to_ary, :unshift def find_by_name(name) detect { |plugin| plugin.na...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinery/core.rb
core/lib/refinery/core.rb
require File.expand_path('../../refinery', __FILE__) require 'truncate_html' require 'will_paginate' require 'refinery/i18n' require 'zilch/authorisation' module Refinery module Core require 'refinery/core/default_route' require 'refinery/core/engine' require 'refinery/core/configuration' class << s...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinery/menu_item.rb
core/lib/refinery/menu_item.rb
module Refinery class MenuItem attr_accessor :menu, :title, :parent_id, :lft, :rgt, :depth, :url, :menu_match, :original_type, :original_id def initialize(menu, options = {}) @menu = menu remap!(options).each do |key, value| send "#{key}=", value end self.at...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinery/version.rb
core/lib/refinery/version.rb
module Refinery class Version @major = 4 @minor = 1 @tiny = 0 @build = nil class << self attr_reader :major, :minor, :tiny, :build def to_s [@major, @minor, @tiny, @build].compact.join('.') end def required_ruby_version '>= 2.5.5' end end end...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinery/menu.rb
core/lib/refinery/menu.rb
module Refinery class Menu def initialize(objects = nil) append(objects) end def append(objects) Array(objects).each do |item| item = item.to_refinery_menu_item if item.respond_to?(:to_refinery_menu_item) items << MenuItem.new(self, item) end end attr_accessor...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinery/errors.rb
core/lib/refinery/errors.rb
module Refinery # = Refinery Errors # # Generic Refinery exception class class RefineryError < StandardError end # Raised when an extension has not been properly defined. See the exception message for further # details class InvalidEngineError < RefineryError end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinery/plugin.rb
core/lib/refinery/plugin.rb
module Refinery class Plugin attr_accessor :name, :class_name, :controller, :directory, :url, :always_allow_access, :menu_match, :hide_from_menu, :pathname def self.register(&_block) yield(plugin = new) raise ArgumentError, "A plugin MUST have a name!: #{plug...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinery/extension_generation.rb
core/lib/refinery/extension_generation.rb
module Refinery module ExtensionGeneration def self.included(base) base.class_eval do argument :attributes, type: :array, default: [], banner: 'field:type field:type' class_option :namespace, type: :string, ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinery/cli.rb
core/lib/refinery/cli.rb
require 'thor' module Refinery class Cli < Thor include Thor::Actions no_tasks do def source_paths Refinery::Plugins.registered.pathnames.map{ |p| %w(app vendor).map{ |dir| p.join(dir, @override_kind[:dir])} }.flatten.uniq end end OVERRIDES = { :view => {...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinery/crud.rb
core/lib/refinery/crud.rb
# Base methods for CRUD actions # Simply override any methods in your action controller you want to be customised # Don't forget to add: # resources :plural_model_name_here # or for scoped: # scope(:as => 'module_module', :module => 'module_name') do # resources :plural_model_name_here # end # to your route...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinery/engine.rb
core/lib/refinery/engine.rb
module Refinery module Engine # Specify a block of code to be run after the refinery inclusion step. See # Refinery::Core::Engine#refinery_inclusion for details regarding the Refinery # inclusion process. # # Example: # module Refinery # module Images # class Engine < Rails...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinery/application_controller.rb
core/lib/refinery/application_controller.rb
require 'refinery/core/authorisation_manager' module Refinery module ApplicationController def self.included(base) # Extend controller base.helper_method :home_page?, :local_request?, :from_dialog?, :admin?, ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinery/admin/base_controller.rb
core/lib/refinery/admin/base_controller.rb
require 'action_controller' require 'refinery/core/authorisation_manager' require 'zilch/authorisation/users_manager' module Refinery module Admin module BaseController def self.included(base) base.layout :layout? base.before_action :force_ssl!, :authenticate_re...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinery/generators/generated_attribute.rb
core/lib/refinery/generators/generated_attribute.rb
require 'rails/generators/generated_attribute' module Refinery module Generators class GeneratedAttribute < Rails::Generators::GeneratedAttribute attr_accessor :refinery_type class << self def reference?(type) [:references, :belongs_to, :image, :resource].include? type end ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinery/generators/named_base.rb
core/lib/refinery/generators/named_base.rb
require 'rails/generators/named_base' module Refinery module Generators class NamedBase < Rails::Generators::NamedBase protected def parse_attributes! #:nodoc: self.attributes = (attributes || []).map do |attr| Refinery::Generators::GeneratedAttribute.parse(attr) end ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinery/core/authorisation_manager.rb
core/lib/refinery/core/authorisation_manager.rb
require "zilch/authorisation/authorisation_manager" require "refinery/core/authorisation_adapter" module Refinery module Core class AuthorisationManager < Zilch::Authorisation::AuthorisationManager def default_adapter @default_adapter ||= Refinery::Core::AuthorisationAdapter.new end end...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinery/core/users_manager.rb
core/lib/refinery/core/users_manager.rb
require 'zilch/authorisation/users_manager' module Refinery module Core class UsersManager < Zilch::Authorisation::UsersManager end end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinery/core/default_route.rb
core/lib/refinery/core/default_route.rb
module Refinery module Core class DefaultRoute class << self def load Refinery::Core::Engine.routes.draw do namespace :admin, :path => Refinery::Core.backend_route do root :to => ::Refinery::Plugins.registered.in_menu.first.url end end ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinery/core/configuration.rb
core/lib/refinery/core/configuration.rb
module Refinery module Core include ActiveSupport::Configurable config_accessor :rescue_not_found, :base_cache_key, :site_name, :google_analytics_page_code, :matomo_analytics_server, :matomo_analytics_site_id, :authenticity_token_on_frontend, :javas...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinery/core/authorisation_adapter.rb
core/lib/refinery/core/authorisation_adapter.rb
require 'refinery/core/nil_user' module Refinery module Core class AuthorisationAdapter < Zilch::Authorisation::Adapters::Default def current_user @current_user ||= Refinery::Core::NilUser.new end end end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinery/core/engine.rb
core/lib/refinery/core/engine.rb
module Refinery module Core class Engine < ::Rails::Engine extend Refinery::Engine isolate_namespace Refinery engine_name :refinery class << self # Performs the Refinery inclusion process which extends the currently loaded Rails # applications with Refinery's controllers ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinery/core/nil_user.rb
core/lib/refinery/core/nil_user.rb
require 'zilch/authorisation/nil_user' require 'refinery/plugins' module Refinery module Core class NilUser < Zilch::Authorisation::NilUser # The default NilUser has all roles and can access all plugins. # Should be overridden in authentication solutions. def has_role?(role) true ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/lib/refinerycms/core.rb
core/lib/refinerycms/core.rb
require_relative '../refinery/core'
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/config/routes.rb
core/config/routes.rb
Refinery::Core::Engine.routes.draw do filter(:refinery_locales) if defined?(RoutingFilter::RefineryLocales) # optionally use i18n. get "#{Refinery::Core.backend_route}/message", :to => 'fast#message', :as => :message namespace :admin, :path => Refinery::Core.backend_route do root to: 'core#index' resourc...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/config/initializers/will_paginate_monkeypatch.rb
core/config/initializers/will_paginate_monkeypatch.rb
require "will_paginate/view_helpers/action_view" module WillPaginate module ActionView class LinkRenderer < ViewHelpers::LinkRenderer def url(page) @base_url_params ||= begin url_params = merge_get_params(default_url_params) merge_optional_params(url_params) end ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/config/initializers/assets.rb
core/config/initializers/assets.rb
# frozen_string_literal: true if Rails.application.config.respond_to?(:assets) Rails.application.config.assets.precompile << 'refinery_core_manifest.js' end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/core/config/initializers/zeitwerk.rb
core/config/initializers/zeitwerk.rb
# frozen_string_literal: true class RefineryInflector < Zeitwerk::Inflector def camelize(basename, abspath) return 'Refinery' if basename.start_with?('refinerycms-') super end end Rails.autoloaders.each do |autoloader| autoloader.inflector = RefineryInflector.new end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/app/helpers/refinery/admin/images_helper.rb
images/app/helpers/refinery/admin/images_helper.rb
module Refinery module Admin module ImagesHelper def other_image_views Refinery::Images.image_views.reject do |image_view| image_view.to_s == Refinery::Images.preferred_image_view.to_s end end def thumbnail_urls(image) thumbnail_urls = { :"data-origin...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/app/controllers/refinery/admin/images_controller.rb
images/app/controllers/refinery/admin/images_controller.rb
module Refinery module Admin class ImagesController < ::Refinery::AdminController crudify :'refinery/image', include: [:translations, :crops], order: "updated_at DESC", sortable: false, conditions: 'parent_id IS NULL' before_action :change_list...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/app/models/refinery/thumbnail_dimensions.rb
images/app/models/refinery/thumbnail_dimensions.rb
module Refinery class ThumbnailDimensions attr_accessor :width, :height, :geometry, :original_width, :original_height def initialize(geometry, original_width, original_height) @geometry = Geometry.new(geometry) @original_width = original_width.to_f @original_height = original_height.to_f ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/app/models/refinery/image.rb
images/app/models/refinery/image.rb
require 'dragonfly' module Refinery class Image < Refinery::Core::BaseModel extend Mobility translates :image_title, :image_alt dragonfly_accessor :image, app: :refinery_images include Images::Validators validates :image, presence: true validates_with ImageSizeValidator validates_with ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/db/migrate/20140814073957_add_title_and_alt_to_refinery_images.rb
images/db/migrate/20140814073957_add_title_and_alt_to_refinery_images.rb
class AddTitleAndAltToRefineryImages < ActiveRecord::Migration[4.2] def change change_table :refinery_images do |t| t.string :image_title t.string :image_alt end end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/db/migrate/20150430171341_translate_refinery_images.rb
images/db/migrate/20150430171341_translate_refinery_images.rb
class TranslateRefineryImages < ActiveRecord::Migration[4.2] def change create_table :refinery_image_translations do |t| # Translated attribute(s) t.string :image_alt t.string :image_title t.string :locale, null: false t.integer :refinery_image_id, null: false t.timestamps ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/db/migrate/20180711122352_add_parent_id_to_refinery_images.rb
images/db/migrate/20180711122352_add_parent_id_to_refinery_images.rb
class AddParentIdToRefineryImages < ActiveRecord::Migration[5.1] def change add_column :refinery_images, :parent_id, :integer end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/db/migrate/20170703143514_remove_translated_columns_from_refinery_images.rb
images/db/migrate/20170703143514_remove_translated_columns_from_refinery_images.rb
class RemoveTranslatedColumnsFromRefineryImages < ActiveRecord::Migration[5.0] def change remove_column :refinery_images, :image_title remove_column :refinery_images, :image_alt end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/db/migrate/20100913234707_create_refinerycms_images_schema.rb
images/db/migrate/20100913234707_create_refinerycms_images_schema.rb
class CreateRefinerycmsImagesSchema < ActiveRecord::Migration[4.2] def change create_table :refinery_images do |t| t.string :image_mime_type t.string :image_name t.integer :image_size t.integer :image_width t.integer :image_height t.string :image_uid t.string :...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/db/migrate/20120625093918_remove_image_ext_from_refinery_images.rb
images/db/migrate/20120625093918_remove_image_ext_from_refinery_images.rb
class RemoveImageExtFromRefineryImages < ActiveRecord::Migration[4.2] def up remove_column :refinery_images, :image_ext end def down add_column :refinery_images, :image_ext, :string end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/spec/system/refinery/admin/dialog_spec.rb
images/spec/system/refinery/admin/dialog_spec.rb
require "spec_helper" module Refinery describe "dialog", :type => :system do refinery_login context 'When there are many images' do include_context 'many images' it "does not have selected an image" do visit refinery.insert_admin_images_path expect(page).to_not have_selector("l...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/spec/system/refinery/admin/images_spec.rb
images/spec/system/refinery/admin/images_spec.rb
require "spec_helper" module Refinery describe "the Admin Images Tab", type: :system do refinery_login include_context 'admin images tab' context 'When there are no images' do include_context 'no existing images' it 'says there are no images' do visit refinery.admin_images_path ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/spec/support/spec_helper.rb
images/spec/support/spec_helper.rb
module Capybara class Session def has_image?(src) has_xpath?("//img[contains(@src,'#{src}')]") end end add_selector(:linkhref) do xpath {|href| ".//a[@href='#{href}']"} end end def ensure_on(path) visit(path) unless current_path == path end RSpec.configure do |c| c.alias_it_should_behav...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false