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/images/spec/support/shared_examples/image_uploader.rb
images/spec/support/shared_examples/image_uploader.rb
shared_examples 'uploads images' do before do raise "please set let(:initial_path)" if initial_path.blank? ensure_on(initial_path) initialize_context end let(:uploading_an_image) { ->{ open_upload_dialog page.within_frame(dialog_frame_id) do select_upload attach_file 'image_imag...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/spec/support/shared_examples/image_indexer.rb
images/spec/support/shared_examples/image_indexer.rb
shared_examples_for 'indexes images' do let(:image_count) {[Refinery::Image.count, Refinery::Images.pages_per_admin_index].min} before do raise "please set let(:initial_path)" if initial_path.blank? ensure_on(initial_path) initialize_context end it 'shows all the images', js: true do if index...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/spec/support/shared_examples/image_translator.rb
images/spec/support/shared_examples/image_translator.rb
shared_examples 'translates an image' do before do allow(Refinery::I18n).to receive(:frontend_locales).and_return([:en, :fr]) ensure_on(initial_path) end context "when in list view" do before do ensure_on(current_path + "?view=list") end it "can have a second locale added to it" do ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/spec/support/shared_examples/image_inserter.rb
images/spec/support/shared_examples/image_inserter.rb
shared_examples 'inserts images' do before do raise "please set let(:initial_path)" if initial_path.blank? ensure_on(initial_path) end def select_and_insert_image(title, size='medium') page.within_frame(dialog_frame_id) do within '#existing_image_area_content' do find(:xpath, "//img[@a...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/spec/support/shared_examples/image_previewer.rb
images/spec/support/shared_examples/image_previewer.rb
def preview_image preview_window = window_opened_by do find(:linkhref, image_url).click end page.within_window preview_window do expect(page).to have_image(image_url) end preview_window.close end shared_examples 'shows an image preview' do before do raise "please set let(:initial_path)" if ini...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/spec/support/shared_examples/image_editor.rb
images/spec/support/shared_examples/image_editor.rb
shared_examples 'edits an image' do pending end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/spec/support/shared_examples/image_deleter.rb
images/spec/support/shared_examples/image_deleter.rb
shared_examples_for 'deletes an image' do before do raise "please set let(:initial_path)" if initial_path.blank? ensure_on(initial_path) end let(:image_count) {[Refinery::Image.count, Refinery::Images.pages_per_admin_index].min} let(:deleting_an_image) { -> { first("#records li").click_link(:...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/spec/support/shared_contexts/many_images.rb
images/spec/support/shared_contexts/many_images.rb
shared_context 'many images' do let!(:image) { FactoryBot.create(:image) } let!(:alt_image) { FactoryBot.create(:alternate_image) } let!(:another_image) { FactoryBot.create(:another_image) } end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/spec/support/shared_contexts/no_images.rb
images/spec/support/shared_contexts/no_images.rb
shared_context "no existing images" do let(:image) { FactoryBot.create(:image) } end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/spec/support/shared_contexts/admin_images_tab.rb
images/spec/support/shared_contexts/admin_images_tab.rb
shared_context 'admin images tab' do let(:open_upload_dialog) { find('a', text: ::I18n.t('create_new_image', scope: 'refinery.admin.images.actions')).click } let(:select_upload) {} let(:initialize_context) {} let(:index_in_frame) {false} let(:dialog_frame_id) {'dialog_iframe'} let(:initial_path) { refinery...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/spec/support/shared_contexts/visual_editor_add_image.rb
images/spec/support/shared_contexts/visual_editor_add_image.rb
shared_context 'Visual Editor - add image' do let(:page_for_image) { page = Refinery::Page.create :title => "Add Image to me" # we need page parts so that there's a visual editor Refinery::Pages.default_parts.each_with_index do |default_page_part, index| page.parts.create(:title => default_page_par...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/spec/support/shared_contexts/one_image.rb
images/spec/support/shared_contexts/one_image.rb
shared_context "one image" do let!(:image) { FactoryBot.create(:image) } end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/spec/factories/image.rb
images/spec/factories/image.rb
FactoryBot.define do factory :image, :class => ::Refinery::Image do image { Refinery.roots('refinery/images').join("spec/fixtures/beach.jpeg") } end factory :alternate_image, :class => ::Refinery::Image do image { Refinery.roots('refinery/images').join("spec/fixtures/beach-alternate.jpeg") } end fac...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/spec/models/refinery/thumbnail_dimensions_spec.rb
images/spec/models/refinery/thumbnail_dimensions_spec.rb
require 'spec_helper' module Refinery describe ThumbnailDimensions, type: :model do subject(:dimensions) { described_class.new(geometry, 500, 375) } describe '#scale' do context 'when no width is supplied' do let(:geometry) { 'x225>' } it 'scales by height factor' do expect(...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/spec/models/refinery/image_spec.rb
images/spec/models/refinery/image_spec.rb
require 'spec_helper' require 'uri' module Refinery describe Image, :type => :model do let(:image) { FactoryBot.build(:image) } let(:created_image) { FactoryBot.create(:image) } let(:titled_image) { FactoryBot.create(:image, image_title: 'Image Title')} let(:image_with_alt_text) { FactoryBo...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/spec/lib/generators/refinery/images/images_generator_spec.rb
images/spec/lib/generators/refinery/images/images_generator_spec.rb
require 'spec_helper' require 'generator_spec/test_case' require 'generators/refinery/images/images_generator' module Refinery describe ImagesGenerator do include GeneratorSpec::TestCase destination File.expand_path("../../../../tmp", __FILE__) before do prepare_destination run_generator %w[...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/spec/lib/refinery/images/engine_spec.rb
images/spec/lib/refinery/images/engine_spec.rb
require 'spec_helper' module Refinery describe Images do it_has_behaviour 'Creates a dragonfly App:' it_has_behaviour 'adds the dragonfly app to the middleware stack' end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/lib/refinerycms-images.rb
images/lib/refinerycms-images.rb
require 'refinery/images'
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/lib/generators/refinery/images/images_generator.rb
images/lib/generators/refinery/images/images_generator.rb
module Refinery class ImagesGenerator < Rails::Generators::Base class_option :skip_migrations, :type => :boolean, :default => false, :aliases => nil, :group => :runtime, :desc => "Skip over installing or running migrations." source_root File.expand_path('../templates', __FILE__) ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/lib/refinery/images.rb
images/lib/refinery/images.rb
require 'refinerycms/core' require 'refinerycms/dragonfly' module Refinery autoload :ImagesGenerator, 'generators/refinery/images/images_generator' module Images require 'refinery/images/engine' require 'refinery/dragonfly/extension_configuration' require 'refinery/images/configuration' autoload ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/lib/refinery/images/configuration.rb
images/lib/refinery/images/configuration.rb
module Refinery module Images extend Refinery::Dragonfly::ExtensionConfiguration include ActiveSupport::Configurable config_accessor :max_image_size, :pages_per_dialog, :pages_per_admin_index, :pages_per_dialog_that_have_size_options, :user_image_sizes, :user_image_ratios, ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/lib/refinery/images/engine.rb
images/lib/refinery/images/engine.rb
module Refinery module Images class Engine < ::Rails::Engine extend Refinery::Engine isolate_namespace Refinery engine_name :refinery_images config.autoload_paths += %W( #{config.root}/lib ) initializer 'attach-refinery-images-with-dragonfly', :before => :finisher_hook do |app| ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/lib/refinery/images/validators.rb
images/lib/refinery/images/validators.rb
module Refinery module Images module Validators autoload :ImageSizeValidator, 'refinery/images/validators/image_size_validator' autoload :ImageUpdateValidator, 'refinery/images/validators/image_update_validator' end end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/lib/refinery/images/validators/image_update_validator.rb
images/lib/refinery/images/validators/image_update_validator.rb
module Refinery module Images module Validators class ImageUpdateValidator < ActiveModel::Validator def validate(record) if record.image_name_changed? record.errors.add :image_name, ::I18n.t("different_file_name", :scope => "activerecord.er...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/lib/refinery/images/validators/image_size_validator.rb
images/lib/refinery/images/validators/image_size_validator.rb
module Refinery module Images module Validators class ImageSizeValidator < ActiveModel::Validator def validate(record) image = record.image if image.respond_to?(:length) && image.length > Images.max_image_size record.errors[:image] << ::I18n.t('too_big', ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/lib/refinerycms/images.rb
images/lib/refinerycms/images.rb
require_relative '../refinery/images'
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/images/config/routes.rb
images/config/routes.rb
Refinery::Core::Engine.routes.draw do get '/system/images/*dragonfly', to: Dragonfly.app(:refinery_images) namespace :admin, path: Refinery::Core.backend_route do resources :images, except: :show do get :insert, on: :collection patch :crop match 'crop', to: 'images#destroy_crop', via: :delete...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/resources/app/controllers/refinery/admin/resources_controller.rb
resources/app/controllers/refinery/admin/resources_controller.rb
module Refinery module Admin class ResourcesController < ::Refinery::AdminController crudify :'refinery/resource', include: [:translations], order: "updated_at DESC", sortable: false before_action :init_dialog def new @resource = Resource.new ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/resources/app/models/refinery/resource.rb
resources/app/models/refinery/resource.rb
# frozen_string_literal: true require 'dragonfly' module Refinery class Resource < Refinery::Core::BaseModel include Resources::Validators extend Mobility translates :resource_title dragonfly_accessor :file, app: :refinery_resources validates :file, presence: true validates_with FileSizeV...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/resources/db/migrate/20150430180959_add_translated_title_to_refinery_resources.rb
resources/db/migrate/20150430180959_add_translated_title_to_refinery_resources.rb
class AddTranslatedTitleToRefineryResources < ActiveRecord::Migration[4.2] def change create_table :refinery_resource_translations do |t| # Translated attribute(s) t.string :resource_title t.string :locale, null: false t.integer :refinery_resource_id, null: false t.timestamps nul...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/resources/db/migrate/20100913234709_create_refinerycms_resources_schema.rb
resources/db/migrate/20100913234709_create_refinerycms_resources_schema.rb
class CreateRefinerycmsResourcesSchema < ActiveRecord::Migration[4.2] def change create_table :refinery_resources do |t| t.string :file_mime_type t.string :file_name t.integer :file_size t.string :file_uid t.string :file_ext t.timestamps end end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/resources/spec/spec_helper.rb
resources/spec/spec_helper.rb
module Capybara 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_behave_like_to :it_has_behaviour, 'has behaviour:' end def uri_filename(url) File.basename(URI.parse(url).p...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/resources/spec/system/refinery/admin/resources_spec.rb
resources/spec/system/refinery/admin/resources_spec.rb
# frozen_string_literal: true require 'spec_helper' module Refinery module Admin describe 'Resources', type: :system do refinery_login context 'when no files' do it 'invites to upload file' do visit refinery.admin_resources_path expect(page).to have_content('There are no...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/resources/spec/factories/resource.rb
resources/spec/factories/resource.rb
# frozen_string_literal: true FactoryBot.define do factory :resource, class: Refinery::Resource do file { Refinery.roots('refinery/resources').join('spec/fixtures/cape-town-tide-table.pdf') } end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/resources/spec/models/refinery/resource_spec.rb
resources/spec/models/refinery/resource_spec.rb
# frozen_string_literal: true require 'spec_helper' module Refinery describe Resource, type: :model do let(:resource) { FactoryBot.create(:resource) } let(:titled_resource) { FactoryBot.create(:resource, resource_title: 'Resource Title') } context 'with valid attributes' do it 'should create succ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/resources/spec/lib/generators/refinery/resources/resources_generator_spec.rb
resources/spec/lib/generators/refinery/resources/resources_generator_spec.rb
require 'spec_helper' require 'generator_spec/test_case' require 'generators/refinery/resources/resources_generator' module Refinery describe ResourcesGenerator do include GeneratorSpec::TestCase destination File.expand_path("../../../../tmp", __FILE__) before do prepare_destination run_gene...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/resources/spec/lib/refinery/resources/engine_spec.rb
resources/spec/lib/refinery/resources/engine_spec.rb
require 'spec_helper' module Refinery describe Resources do it_has_behaviour 'Creates a dragonfly App:' it_has_behaviour 'adds the dragonfly app to the middleware stack' it 'calls dragonfly#before_serve to set configuration' do dummy_proc = -> (_job, _env) {} expect_any_instance_of(::Dragonf...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/resources/lib/refinerycms-resources.rb
resources/lib/refinerycms-resources.rb
require 'refinery/resources'
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/resources/lib/generators/refinery/resources/resources_generator.rb
resources/lib/generators/refinery/resources/resources_generator.rb
module Refinery class ResourcesGenerator < Rails::Generators::Base class_option :skip_migrations, :type => :boolean, :default => false, :aliases => nil, :group => :runtime, :desc => "Skip over installing or running migrations." source_root File.expand_path('../templates', __FILE__)...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/resources/lib/refinery/resources.rb
resources/lib/refinery/resources.rb
require 'refinerycms/core' require 'refinerycms/dragonfly' module Refinery autoload :ResourcesGenerator, 'generators/refinery/resources/resources_generator' module Resources require 'refinery/resources/engine' require 'refinery/dragonfly/extension_configuration' require 'refinery/resources/configurati...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/resources/lib/refinery/resources/configuration.rb
resources/lib/refinery/resources/configuration.rb
# frozen_string_literal: true module Refinery module Resources extend Refinery::Dragonfly::ExtensionConfiguration include ActiveSupport::Configurable config_accessor :max_file_size, :pages_per_dialog, :pages_per_admin_index, :content_disposition, :whitelisted_mime_types self.con...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/resources/lib/refinery/resources/engine.rb
resources/lib/refinery/resources/engine.rb
module Refinery module Resources class Engine < ::Rails::Engine extend Refinery::Engine isolate_namespace Refinery engine_name :refinery_resources config.autoload_paths += %W( #{config.root}/lib ) initializer 'attach-refinery-resources-with-dragonfly', :before => :finisher_hook do...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/resources/lib/refinery/resources/validators.rb
resources/lib/refinery/resources/validators.rb
module Refinery module Resources module Validators autoload :FileSizeValidator, 'refinery/resources/validators/file_size_validator' end end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/resources/lib/refinery/resources/validators/file_size_validator.rb
resources/lib/refinery/resources/validators/file_size_validator.rb
module Refinery module Resources module Validators class FileSizeValidator < ActiveModel::Validator def validate(record) file = record.file if file.respond_to?(:length) && file.length > Resources.max_file_size record.errors[:file] << ::I18n.t('too_big', ...
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/resources/lib/refinerycms/resources.rb
resources/lib/refinerycms/resources.rb
require_relative '../refinery/resources'
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
refinery/refinerycms
https://github.com/refinery/refinerycms/blob/b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3/resources/config/routes.rb
resources/config/routes.rb
Refinery::Core::Engine.routes.draw do get '/system/resources/*dragonfly', :to => Dragonfly.app(:refinery_resources) namespace :admin, :path => Refinery::Core.backend_route do resources :resources, :except => :show do get :insert, :on => :collection end end end
ruby
MIT
b31d093a0c1c28f33ec532dcf527b8fae1ea3ad3
2026-01-04T15:48:02.394643Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/spec_helper.rb
spec/spec_helper.rb
if ENV['TRAVIS'] # When running in Travis, report coverage stats to Coveralls. require 'coveralls' Coveralls.wear! else # Otherwise render coverage information in coverage/index.html and display # coverage percentage in the console. require 'simplecov' end require 'scss_lint' Dir["#{File.dirname(__FILE__)...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/support/isolated_environment.rb
spec/support/isolated_environment.rb
require 'fileutils' require 'tmpdir' shared_context 'isolated environment' do around do |example| Dir.mktmpdir do |tmpdir| original_home = ENV['HOME'] begin virtual_home = File.expand_path(File.join(tmpdir, 'home')) Dir.mkdir(virtual_home) ENV['HOME'] = virtual_home ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/support/matchers/report_lint.rb
spec/support/matchers/report_lint.rb
RSpec::Matchers.define :report_lint do |options| options ||= {} count = options[:count] expected_line = options[:line] match do |linter| has_lints?(linter, expected_line, count) end failure_message do |linter| expected_count = if count.nil? 'a lint' elsif count == 1 'ex...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/file_finder_spec.rb
spec/scss_lint/file_finder_spec.rb
require 'spec_helper' require 'fileutils' describe SCSSLint::FileFinder do let(:config) { SCSSLint::Config.default } subject { described_class.new(config) } describe '#find' do include_context 'isolated environment' subject { super().find(patterns) } context 'when no patterns are given' do ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter_registry_spec.rb
spec/scss_lint/linter_registry_spec.rb
require 'spec_helper' describe SCSSLint::LinterRegistry do context 'when including the LinterRegistry module' do after do described_class.linters.delete(FakeLinter) end it 'adds the linter to the set of registered linters' do expect do class FakeLinter < SCSSLint::Linter in...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/preprocess_spec.rb
spec/scss_lint/preprocess_spec.rb
require 'spec_helper' describe SCSSLint::Engine do let(:engine) { described_class.new(options) } let(:command) { 'my-command' } let(:scss) { <<-SCSS } --- --- $red: #f00; SCSS let(:processed) { <<-SCSS } $red: #f00; SCSS context 'preprocess_command is specified' do let(:options) { { ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/cli_spec.rb
spec/scss_lint/cli_spec.rb
require 'spec_helper' require 'scss_lint/cli' describe SCSSLint::CLI do include_context 'isolated environment' let(:config_options) do { 'linters' => { 'FakeTestLinter1' => { 'enabled' => true }, 'FakeTestLinter2' => { 'enabled' => true }, }, } end let(:config) { SCSSLint:...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/reporter_spec.rb
spec/scss_lint/reporter_spec.rb
require 'spec_helper' describe SCSSLint::Reporter do class SCSSLint::Reporter::FakeReporter < SCSSLint::Reporter; end describe '#descendants' do it 'contains FakeReporter' do SCSSLint::Reporter.descendants.should include(SCSSLint::Reporter::FakeReporter) end end end
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/logger_spec.rb
spec/scss_lint/logger_spec.rb
require 'spec_helper' describe SCSSLint::Logger do let(:io) { StringIO.new } let(:logger) { described_class.new(io) } describe '#color_enabled' do subject { io.string } before do logger.color_enabled = enabled logger.success('Success!') end context 'when color is enabled' do ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/location_spec.rb
spec/scss_lint/location_spec.rb
require 'spec_helper' describe SCSSLint::Location do let(:engine) { described_class.new(css) } describe '#<=>' do let(:locations) do [ SCSSLint::Location.new(2, 2, 2), SCSSLint::Location.new(2, 2, 1), SCSSLint::Location.new(2, 1, 2), SCSSLint::Location.new(2, 1, 1), ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/rake_task_spec.rb
spec/scss_lint/rake_task_spec.rb
require 'spec_helper' require 'scss_lint/rake_task' require 'tempfile' describe SCSSLint::RakeTask do before do $stdout.stub(:write) # Silence console output end after(:each) do Rake::Task['scss_lint'].clear if Rake::Task.task_defined?('scss_lint') end let(:file) do Tempfile.new(%w[scss-file .s...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/report_lint_spec.rb
spec/scss_lint/report_lint_spec.rb
require 'spec_helper' require 'rspec/matchers/fail_matchers' RSpec.configure do |config| config.include RSpec::Matchers::FailMatchers end RSpec::Matchers.define_negated_matcher :succeed, :raise_error # In these tests, we cover all of the combinations of successful and failed # matches, expecting and _not_ expectin...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/plugins_spec.rb
spec/scss_lint/plugins_spec.rb
require 'spec_helper' module SCSSLint describe Plugins do let(:subject) { described_class.new(Config.new(config_options, Config.user_file)) } describe '#load' do context 'when gem plugins are specified' do let(:config_options) { { 'plugin_gems' => ['a_gem'] } } let(:plugin) { double(lo...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/runner_spec.rb
spec/scss_lint/runner_spec.rb
require 'spec_helper' describe SCSSLint::Runner do let(:config_options) do { 'linters' => { 'FakeLinter1' => { 'enabled' => true }, 'FakeLinter2' => { 'enabled' => false }, }, } end let(:config) { SCSSLint::Config.new(config_options) } let(:runner) { described_class.new(con...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter_spec.rb
spec/scss_lint/linter_spec.rb
require 'spec_helper' describe SCSSLint::Linter do describe 'control comments' do let(:linter_config) { {} } subject { SCSSLint::Linter::Fake.new } module SCSSLint class Linter::Fake < SCSSLint::Linter def visit_root(_node) add_lint(engine.lines.count, 'final new line...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/selector_visitor_spec.rb
spec/scss_lint/selector_visitor_spec.rb
require 'spec_helper' describe SCSSLint::SelectorVisitor do describe '#visit' do let(:engine) { SCSSLint::Engine.new(code: scss) } before { RuleVisitor.new(visitor).run(engine) } # Visits every rule in the given parse tree and passes the parsed selector # to the given `selector_visitor`. class R...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/config_spec.rb
spec/scss_lint/config_spec.rb
require 'spec_helper' require 'fileutils' describe SCSSLint::Config do class SCSSLint::Linter::FakeConfigLinter < SCSSLint::Linter; end module SCSSLint::Linter::SomeNamespace class FakeLinter1 < SCSSLint::Linter; end class FakeLinter2 < SCSSLint::Linter; end end let(:default_file) { File.open(describ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/engine_spec.rb
spec/scss_lint/engine_spec.rb
require 'spec_helper' describe SCSSLint::Engine do let(:engine) { described_class.new(code: scss) } context 'when a @media directive is present' do let(:scss) { <<-SCSS } @media only screen { } SCSS it 'has a parse tree' do engine.tree.should_not be_nil end end context 'whe...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/options_spec.rb
spec/scss_lint/options_spec.rb
require 'spec_helper' require 'scss_lint/options' describe SCSSLint::Options do describe '#parse' do subject { super().parse(args) } context 'when no arguments are specified' do let(:args) { [] } it { should be_a Hash } it 'defines no files to lint by default' do subject[:files]....
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/extend_directive_spec.rb
spec/scss_lint/linter/extend_directive_spec.rb
require 'spec_helper' describe SCSSLint::Linter::ExtendDirective do context 'when extending with a class' do let(:scss) { <<-SCSS } p { @extend .error; } SCSS it { should report_lint line: 2 } end context 'when extending with a type' do let(:scss) { <<-SCSS } p { ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/url_format_spec.rb
spec/scss_lint/linter/url_format_spec.rb
require 'spec_helper' describe SCSSLint::Linter::UrlFormat do shared_examples_for 'UrlFormat linter' do context 'when URL contains protocol' do let(:url) { 'https://something.com/image.png' } it { should report_lint } end context 'when URL contains domain with protocol-less double slashes' ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/hex_length_spec.rb
spec/scss_lint/linter/hex_length_spec.rb
require 'spec_helper' describe SCSSLint::Linter::HexLength do let(:linter_config) { { 'style' => style } } let(:style) { 'short' } context 'when rule is empty' do let(:scss) { <<-SCSS } p { } SCSS it { should_not report_lint } end context 'when rule contains properties with valid h...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/single_line_per_property_spec.rb
spec/scss_lint/linter/single_line_per_property_spec.rb
require 'spec_helper' describe SCSSLint::Linter::SingleLinePerProperty do context 'when properties are each on their own line' do let(:scss) { <<-SCSS } p { color: #fff; margin: 0; padding: 5px; } SCSS it { should_not report_lint } end context 'when two propertie...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/unnecessary_parent_reference_spec.rb
spec/scss_lint/linter/unnecessary_parent_reference_spec.rb
require 'spec_helper' describe SCSSLint::Linter::UnnecessaryParentReference do context 'when an amperand precedes a direct descendant operator' do let(:scss) { <<-SCSS } p { & > a {} } SCSS it { should report_lint line: 2 } end context 'when an amperand precedes a general child'...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/single_line_per_selector_spec.rb
spec/scss_lint/linter/single_line_per_selector_spec.rb
require 'spec_helper' describe SCSSLint::Linter::SingleLinePerSelector do context 'when rule has one selector' do let(:scss) { <<-SCSS } p { } SCSS it { should_not report_lint } end context 'when rule has one selector on each line' do let(:scss) { <<-SCSS } p, a { ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/unnecessary_mantissa_spec.rb
spec/scss_lint/linter/unnecessary_mantissa_spec.rb
require 'spec_helper' describe SCSSLint::Linter::UnnecessaryMantissa do context 'when value is zero' do let(:scss) { <<-SCSS } p { margin: 0; padding: func(0); top: 0em; } SCSS it { should_not report_lint } end context 'when value contains no mantissa' do let...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/space_after_comma_spec.rb
spec/scss_lint/linter/space_after_comma_spec.rb
require 'spec_helper' describe SCSSLint::Linter::SpaceAfterComma do let(:linter_config) { { 'style' => style } } context 'when one space is preferred' do let(:style) { 'one_space' } context 'in a mixin declaration' do context 'where spaces do not follow commas' do let(:scss) { <<-SCSS } ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/pseudo_element_spec.rb
spec/scss_lint/linter/pseudo_element_spec.rb
require 'spec_helper' describe SCSSLint::Linter::PseudoElement do context 'when a pseudo-element has two colons' do let(:scss) { <<-SCSS } ::before {} p::before {} p#nav::before {} p div::before {} p::before div {} p, div::before {} p::before, div {} SCSS it { s...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/property_spelling_spec.rb
spec/scss_lint/linter/property_spelling_spec.rb
require 'spec_helper' describe SCSSLint::Linter::PropertySpelling do context 'with a regular property' do let(:scss) { <<-SCSS } p { margin: 5px; } SCSS it { should_not report_lint } end context 'with a property containing interpolation' do let(:scss) { <<-SCSS } p { ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/name_format_spec.rb
spec/scss_lint/linter/name_format_spec.rb
require 'spec_helper' describe SCSSLint::Linter::NameFormat do shared_examples 'hyphenated_lowercase' do context 'when no variable, functions, or mixin declarations exist' do let(:scss) { <<-SCSS } p { margin: 0; } SCSS it { should_not report_lint } end conte...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/selector_depth_spec.rb
spec/scss_lint/linter/selector_depth_spec.rb
require 'spec_helper' describe SCSSLint::Linter::SelectorDepth do context 'when sequence has a depth of one' do let(:scss) { 'p {}' } it { should_not report_lint } end context 'when sequence has a depth of three' do let(:scss) { 'body article p {}' } it { should_not report_lint } context ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/nesting_depth_spec.rb
spec/scss_lint/linter/nesting_depth_spec.rb
require 'spec_helper' describe SCSSLint::Linter::NestingDepth do context 'and selectors are nested up to depth 3' do let(:scss) { <<-SCSS } .one { .two { .three { background: #f00; } } } SCSS it { should_not report_lint } end context 'and ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/declaration_order_spec.rb
spec/scss_lint/linter/declaration_order_spec.rb
require 'spec_helper' describe SCSSLint::Linter::DeclarationOrder do context 'when rule is empty' do let(:scss) { <<-SCSS } p { } SCSS it { should_not report_lint } end context 'when rule contains only properties' do let(:scss) { <<-SCSS } p { background: #000; ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/private_naming_convention_spec.rb
spec/scss_lint/linter/private_naming_convention_spec.rb
require 'spec_helper' describe SCSSLint::Linter::PrivateNamingConvention do context 'when a private variable' do context 'is not used in the same file it is defined' do let(:scss) { <<-SCSS } $_foo: red; SCSS it { should report_lint line: 1 } end context 'is used but not defin...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/border_zero_spec.rb
spec/scss_lint/linter/border_zero_spec.rb
require 'spec_helper' describe SCSSLint::Linter::BorderZero do context 'when a rule is empty' do let(:scss) { <<-SCSS } p { } SCSS it { should_not report_lint } end context 'when a property' do let(:lint_description) { subject.lints.first.description } context 'contains a norma...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/string_quotes_spec.rb
spec/scss_lint/linter/string_quotes_spec.rb
require 'spec_helper' describe SCSSLint::Linter::StringQuotes do context 'when string is written with single quotes' do let(:scss) { <<-SCSS } p { content: 'hello'; } SCSS it { should_not report_lint } context 'and contains escaped single quotes' do let(:scss) { <<-SCSS } ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/space_before_brace_spec.rb
spec/scss_lint/linter/space_before_brace_spec.rb
require 'spec_helper' describe SCSSLint::Linter::SpaceBeforeBrace do context 'with a @at-root block' do context 'when brace is preceded by a space' do let(:scss) { <<-SCSS } .parent { @at-root .child { } } SCSS it { should_not report_lint } context 'a...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/import_path_spec.rb
spec/scss_lint/linter/import_path_spec.rb
require 'spec_helper' describe SCSSLint::Linter::ImportPath do context 'when the path includes no directories' do context 'and the filename has no leading underscore or filename extension' do let(:scss) { '@import "filename";' } it { should_not report_lint } end context 'and the filename ha...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/hex_notation_spec.rb
spec/scss_lint/linter/hex_notation_spec.rb
require 'spec_helper' describe SCSSLint::Linter::HexNotation do let(:linter_config) { { 'style' => style } } let(:style) { nil } context 'when rule is empty' do let(:scss) { <<-SCSS } p { } SCSS it { should_not report_lint } end context 'when rule contains color keyword' do let...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/length_variable_spec.rb
spec/scss_lint/linter/length_variable_spec.rb
require 'spec_helper' describe SCSSLint::Linter::LengthVariable do context 'when a length literal is used in a variable declaration' do let(:scss) { <<-SCSS } $my-length: 10px; SCSS it { should_not report_lint } end context 'when a length calculation containing literals is used in a variable ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/else_placement_spec.rb
spec/scss_lint/linter/else_placement_spec.rb
require 'spec_helper' describe SCSSLint::Linter::ElsePlacement do context 'when @if contains no accompanying @else' do let(:scss) { <<-SCSS } @if $condition { $var: 1; } SCSS it { should_not report_lint } end context 'when @else is on different line' do let(:scss) { <<-SCSS ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/color_variable_spec.rb
spec/scss_lint/linter/color_variable_spec.rb
require 'spec_helper' describe SCSSLint::Linter::ColorVariable do context 'when a color literal is used in a variable declaration' do let(:scss) { <<-SCSS } $my-color: #f00; $my-shadow: 2px 2px 2px #f00; SCSS it { should_not report_lint } end context 'when a color function containing li...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/space_after_property_colon_spec.rb
spec/scss_lint/linter/space_after_property_colon_spec.rb
require 'spec_helper' describe SCSSLint::Linter::SpaceAfterPropertyColon do let(:linter_config) { { 'style' => style } } context 'when one space is preferred' do let(:style) { 'one_space' } context 'when the colon after a property is not followed by space' do let(:scss) { <<-SCSS } p { ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/bem_depth_spec.rb
spec/scss_lint/linter/bem_depth_spec.rb
require 'spec_helper' describe SCSSLint::Linter::BemDepth do context 'with the default maximum number of elements' do context 'when a selector lacks elements' do let(:scss) { <<-SCSS } .block { background: #f00; } %block { background: #0f0; } SCSS ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/vendor_prefix_spec.rb
spec/scss_lint/linter/vendor_prefix_spec.rb
require 'spec_helper' describe SCSSLint::Linter::VendorPrefix do context 'when no vendor-prefix is used' do let(:scss) { <<-SCSS } div { transition: none; } SCSS it { should_not report_lint } end context 'when a rule is empty' do let(:scss) { <<-SCSS } div { } ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/selector_format_spec.rb
spec/scss_lint/linter/selector_format_spec.rb
require 'spec_helper' describe SCSSLint::Linter::SelectorFormat do context 'when class has alphanumeric chars and is separated by hyphens' do let(:scss) { <<-SCSS } .foo-bar-77 { } SCSS it { should_not report_lint } end context 'when id has alphanumeric chars and is separated by hyphens...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/property_units_spec.rb
spec/scss_lint/linter/property_units_spec.rb
require 'spec_helper' describe SCSSLint::Linter::PropertyUnits do context 'when global units are set and local are not set' do let(:linter_config) { { 'global' => ['rem'], 'properties' => {} } } context 'when unit is allowed' do let(:scss) { <<-SCSS } p { font-size: 1.54rem; ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/trailing_zero_spec.rb
spec/scss_lint/linter/trailing_zero_spec.rb
require 'spec_helper' describe SCSSLint::Linter::TrailingZero do context 'when no values exist' do let(:scss) { 'p {}' } it { should_not report_lint } end context 'when a zero exists' do let(:scss) { <<-SCSS } p { margin: 0; } SCSS it { should_not report_lint } end ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/zero_unit_spec.rb
spec/scss_lint/linter/zero_unit_spec.rb
require 'spec_helper' describe SCSSLint::Linter::ZeroUnit do context 'when no properties exist' do let(:scss) { <<-SCSS } p { } SCSS it { should_not report_lint } end context 'when properties with unit-less zeros exist' do let(:scss) { <<-SCSS } p { margin: 0; } ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/transition_all_spec.rb
spec/scss_lint/linter/transition_all_spec.rb
require 'spec_helper' describe SCSSLint::Linter::TransitionAll do context 'when transition-property is not set' do let(:scss) { <<-SCSS } p { } SCSS it { should_not report_lint } end context 'when transition-property is set to none' do let(:scss) { <<-SCSS } p { transi...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/trailing_whitespace_spec.rb
spec/scss_lint/linter/trailing_whitespace_spec.rb
require 'spec_helper' describe SCSSLint::Linter::TrailingWhitespace do context 'when lines contain trailing spaces' do let(:scss) { <<-SCSS } p { margin: 0;\s\s } SCSS it { should report_lint line: 2 } end context 'when lines contain trailing tabs' do let(:scss) { <<-SCSS } ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/color_keyword_spec.rb
spec/scss_lint/linter/color_keyword_spec.rb
require 'spec_helper' describe SCSSLint::Linter::ColorKeyword do context 'when a color is specified as a hex' do let(:scss) { <<-SCSS } p { color: #fff; } SCSS it { should_not report_lint } end context 'when a color is specified as a keyword' do let(:scss) { <<-SCSS } ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/chained_classes_spec.rb
spec/scss_lint/linter/chained_classes_spec.rb
require 'spec_helper' describe SCSSLint::Linter::ChainedClasses do context 'with a single class' do let(:scss) { <<-SCSS } .class {} SCSS it { should_not report_lint } end context 'with a single class with a descendant ' do let(:scss) { <<-SCSS } .class .descendant {} SCSS ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false
sds/scss-lint
https://github.com/sds/scss-lint/blob/9099df2a76c24a36fd53a258505ce4ce10dbf3aa/spec/scss_lint/linter/space_after_comment_spec.rb
spec/scss_lint/linter/space_after_comment_spec.rb
require 'spec_helper' describe SCSSLint::Linter::SpaceAfterComment do context 'when no comments exist' do let(:scss) { <<-SCSS } p { margin: 0; } SCSS it { should_not report_lint } end context 'when one space is preferred' do let(:linter_config) { { 'style' => 'one_space' } ...
ruby
MIT
9099df2a76c24a36fd53a258505ce4ce10dbf3aa
2026-01-04T15:49:38.837314Z
false