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
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/controllers/comfy/admin/cms/revisions/page_controller_test.rb
test/controllers/comfy/admin/cms/revisions/page_controller_test.rb
# frozen_string_literal: true require_relative "../../../../../test_helper" class Comfy::Admin::Cms::Revisions::PageControllerTest < ActionDispatch::IntegrationTest setup do @site = comfy_cms_sites(:default) @page = comfy_cms_pages(:default) @revision = comfy_cms_revisions(:page) end def t...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/controllers/comfy/cms/assets_controller_test.rb
test/controllers/comfy/cms/assets_controller_test.rb
# frozen_string_literal: true require_relative "../../../test_helper" class Comfy::Cms::AssetsControllerTest < ActionDispatch::IntegrationTest def setup @site = comfy_cms_sites(:default) @layout = comfy_cms_layouts(:default) end def test_render_css_with_site_with_path @site.update_column(:path, ...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/controllers/comfy/cms/content_controller_test.rb
test/controllers/comfy/cms/content_controller_test.rb
# frozen_string_literal: true require_relative "../../../test_helper" class Comfy::Cms::ContentControllerTest < ActionDispatch::IntegrationTest setup do @site = comfy_cms_sites(:default) @layout = comfy_cms_layouts(:default) @page = comfy_cms_pages(:default) @translation = co...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/models/page_test.rb
test/models/page_test.rb
# frozen_string_literal: true require_relative "../test_helper" class CmsPageTest < ActiveSupport::TestCase setup do @site = comfy_cms_sites(:default) @layout = comfy_cms_layouts(:default) @page = comfy_cms_pages(:default) end def new_params(options = {}) { label: "Test Page", slug:...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/models/layout_test.rb
test/models/layout_test.rb
# frozen_string_literal: true require_relative "../test_helper" class CmsLayoutTest < ActiveSupport::TestCase setup do @site = comfy_cms_sites(:default) @layout = comfy_cms_layouts(:default) @page = comfy_cms_pages(:default) end def test_fixtures_validity Comfy::Cms::Layout.all.each do |la...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/models/fragment_test.rb
test/models/fragment_test.rb
# frozen_string_literal: true require_relative "../test_helper" class CmsFragmentTest < ActiveSupport::TestCase setup do @site = comfy_cms_sites(:default) @layout = comfy_cms_layouts(:default) @page = comfy_cms_pages(:default) @upload_doc = fixture_file_upload("files/document.pdf", "applicatio...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/models/snippet_test.rb
test/models/snippet_test.rb
# frozen_string_literal: true require_relative "../test_helper" class CmsSnippetTest < ActiveSupport::TestCase setup do @site = comfy_cms_sites(:default) end def test_fixtures_validity Comfy::Cms::Snippet.all.each do |snippet| assert snippet.valid?, snippet.errors.full_messages.to_s end en...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/models/site_test.rb
test/models/site_test.rb
# frozen_string_literal: true require_relative "../test_helper" class CmsSiteTest < ActiveSupport::TestCase setup do @site = comfy_cms_sites(:default) end def test_fixtures_validity Comfy::Cms::Site.all.each do |site| assert site.valid?, site.errors.inspect end end def test_validation ...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/models/category_test.rb
test/models/category_test.rb
# frozen_string_literal: true require_relative "../test_helper" class CmsCategoryTest < ActiveSupport::TestCase def test_fixtures_validity Comfy::Cms::Category.all.each do |category| assert category.valid?, category.errors.full_messages.to_s end end def test_validation category = Comfy::Cms:...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/models/file_test.rb
test/models/file_test.rb
# frozen_string_literal: true require_relative "../test_helper" class CmsFileTest < ActiveSupport::TestCase def test_fixtures_validity Comfy::Cms::File.all.each do |file| assert file.valid?, file.errors.full_messages.to_s assert file.attachment assert file.attachment.blob end end def...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/models/translation_test.rb
test/models/translation_test.rb
# frozen_string_literal: true require_relative "../test_helper" class CmsPageTest < ActiveSupport::TestCase setup do @site = comfy_cms_sites(:default) @page = comfy_cms_pages(:default) @translation = comfy_cms_translations(:default) end def test_fixtures_validity Comfy::Cms::T...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/models/categorization_test.rb
test/models/categorization_test.rb
# frozen_string_literal: true require_relative "../test_helper" class CmsCategorizationTest < ActiveSupport::TestCase setup do @category = comfy_cms_categories(:default) end def test_fixtures_validity Comfy::Cms::Categorization.all.each do |categorization| assert categorization.valid?, categoriz...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/generators/cms_assets_generator_test.rb
test/generators/cms_assets_generator_test.rb
# frozen_string_literal: true require_relative "../test_helper" require_relative "../../lib/generators/comfy/cms/assets_generator" class CmsAssetsGeneratorTest < Rails::Generators::TestCase tests Comfy::Generators::Cms::AssetsGenerator def test_generator run_generator assert_directory "app/assets/javasc...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/generators/cms_controllers_generator_test.rb
test/generators/cms_controllers_generator_test.rb
# frozen_string_literal: true require_relative "../test_helper" require_relative "../../lib/generators/comfy/cms/controllers_generator" class CmsControllersGeneratorTest < Rails::Generators::TestCase tests Comfy::Generators::Cms::ControllersGenerator def test_generator run_generator assert_directory "ap...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/generators/cms_views_generator_test.rb
test/generators/cms_views_generator_test.rb
# frozen_string_literal: true require_relative "../test_helper" require_relative "../../lib/generators/comfy/cms/views_generator" class CmsViewsGeneratorTest < Rails::Generators::TestCase tests Comfy::Generators::Cms::ViewsGenerator def test_generator run_generator assert_directory "app/views/comfy" ...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/generators/cms_models_generator_test.rb
test/generators/cms_models_generator_test.rb
# frozen_string_literal: true require_relative "../test_helper" require_relative "../../lib/generators/comfy/cms/models_generator" class CmsModelsGeneratorTest < Rails::Generators::TestCase tests Comfy::Generators::Cms::ModelsGenerator def test_generator run_generator assert_directory "app/models/comfy"...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/generators/scaffold_generator_test.rb
test/generators/scaffold_generator_test.rb
# frozen_string_literal: true require_relative "../test_helper" require_relative "../../lib/generators/comfy/scaffold/scaffold_generator" class ScaffoldGeneratorTest < Rails::Generators::TestCase tests Comfy::Generators::ScaffoldGenerator def test_generator run_generator %w[Foo bar:string] assert_migra...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/generators/cms_generator_test.rb
test/generators/cms_generator_test.rb
# frozen_string_literal: true require_relative "../test_helper" require_relative "../../lib/generators/comfy/cms/cms_generator" class CmsGeneratorTest < Rails::Generators::TestCase tests Comfy::Generators::CmsGenerator def test_generator run_generator assert_migration "db/migrate/create_cms.rb" as...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/configuration_test.rb
test/lib/configuration_test.rb
# frozen_string_literal: true require_relative "../test_helper" class ConfigurationTest < ActiveSupport::TestCase def test_configuration_presence assert config = ComfortableMexicanSofa.configuration assert_equal "ComfortableMexicanSofa CMS Engine", config.cms_title assert_equal "ApplicationController",...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/form_builder_test.rb
test/lib/form_builder_test.rb
# frozen_string_literal: true require_relative "../test_helper" class FormBuilderTest < ActionView::TestCase setup do @page = comfy_cms_pages(:default) @builder = ComfortableMexicanSofa::FormBuilder.new(:page, @page, self, bootstrap: { layout: "horizontal" }) end def test_fragment_field_for_text t...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/revisions_test.rb
test/lib/revisions_test.rb
# frozen_string_literal: true require_relative "../test_helper" class RevisionsTest < ActiveSupport::TestCase setup do @site = comfy_cms_sites(:default) @layout = comfy_cms_layouts(:default) @page = comfy_cms_pages(:default) @snippet = comfy_cms_snippets(:default) end def test_fixtu...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/seeds_test.rb
test/lib/seeds_test.rb
# frozen_string_literal: true require_relative "../test_helper" class SeedsTest < ActiveSupport::TestCase def test_import_all Comfy::Cms::Page.destroy_all Comfy::Cms::Layout.destroy_all Comfy::Cms::Snippet.destroy_all assert_difference(-> { Comfy::Cms::Layout.count }, 2) do assert_difference...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/seeds/snippets_test.rb
test/lib/seeds/snippets_test.rb
# frozen_string_literal: true require_relative "../../test_helper" class SeedsSnippetsTest < ActiveSupport::TestCase setup do @site = comfy_cms_sites(:default) @snippet = comfy_cms_snippets(:default) end def test_creation Comfy::Cms::Snippet.delete_all assert_difference -> { Comfy::Cms::...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/seeds/files_test.rb
test/lib/seeds/files_test.rb
# frozen_string_literal: true require_relative "../../test_helper" class SeedsFilesTest < ActiveSupport::TestCase setup do @site = comfy_cms_sites(:default) end def test_creation Comfy::Cms::File.delete_all assert_difference -> { Comfy::Cms::File.count } do ComfortableMexicanSofa::Seeds::Fi...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/seeds/layouts_test.rb
test/lib/seeds/layouts_test.rb
# frozen_string_literal: true require_relative "../../test_helper" class SeedsLayoutsTest < ActiveSupport::TestCase DEFAULT_HTML = <<~HTML <html> <body> {{ cms:file header, as: image }} {{ cms:markdown content }} </body> </html> HTML NESTED_HTML = <<~HTML {{ cms:file t...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/seeds/pages_test.rb
test/lib/seeds/pages_test.rb
# frozen_string_literal: true require_relative "../../test_helper" class SeedsPagesTest < ActiveSupport::TestCase setup do @site = comfy_cms_sites(:default) @layout = comfy_cms_layouts(:default) @page = comfy_cms_pages(:default) end def test_creation Comfy::Cms::Page.delete_all assert...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/content/renderer_test.rb
test/lib/content/renderer_test.rb
# frozen_string_literal: true require_relative "../../test_helper" class ContentRendererTest < ActiveSupport::TestCase class TestTag < ComfortableMexicanSofa::Content::Tag def content "test tag content" end end class TestNestedTag < ComfortableMexicanSofa::Content::Tag def content "...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/content/tag_test.rb
test/lib/content/tag_test.rb
# frozen_string_literal: true require_relative "../../test_helper" class ContentTagTest < ActiveSupport::TestCase class TestTag < ComfortableMexicanSofa::Content::Tag def content "test tag content" end end class TestNestedTag < ComfortableMexicanSofa::Content::Tag def content "test ...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/content/block_test.rb
test/lib/content/block_test.rb
# frozen_string_literal: true require_relative "../../test_helper" class ContentBlockTest < ActiveSupport::TestCase class TestBlockTag < ComfortableMexicanSofa::Content::Block # ... end setup do ComfortableMexicanSofa::Content::Renderer.register_tag(:test_block, TestBlockTag) end teardown do ...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/content/params_parser_test.rb
test/lib/content/params_parser_test.rb
# frozen_string_literal: true require_relative "../../test_helper" class ContentParamsParserTest < ActiveSupport::TestCase PARSER = ComfortableMexicanSofa::Content::ParamsParser def test_tokenizer tokens = PARSER.new.send(:tokenize, "param") assert_equal [[:string, "param"]], tokens end def test_to...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/content/tags/asset_test.rb
test/lib/content/tags/asset_test.rb
# frozen_string_literal: true require_relative "../../../test_helper" class ContentTagsAssetTest < ActiveSupport::TestCase setup do @page = comfy_cms_pages(:default) end def test_init tag = ComfortableMexicanSofa::Content::Tag::Asset.new( context: @page, params: ["default"] ) asser...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/content/tags/template_test.rb
test/lib/content/tags/template_test.rb
# frozen_string_literal: true require_relative "../../../test_helper" class ContentTagsTemplateTest < ActiveSupport::TestCase def test_init tag = ComfortableMexicanSofa::Content::Tag::Template.new( context: @page, params: ["path/to/template"] ) assert_equal "path/to/template", tag.path en...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/content/tags/datetime_test.rb
test/lib/content/tags/datetime_test.rb
# frozen_string_literal: true require_relative "../../../test_helper" class ContentTagsDatetimeTest < ActiveSupport::TestCase setup do @page = comfy_cms_pages(:default) @frag = comfy_cms_fragments(:datetime) end def test_init tag = ComfortableMexicanSofa::Content::Tag::Datetime.new(context: @page,...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/content/tags/textarea_test.rb
test/lib/content/tags/textarea_test.rb
# frozen_string_literal: true require_relative "../../../test_helper" class ContentTagsTextAreaTest < ActiveSupport::TestCase setup do @page = comfy_cms_pages(:default) end def test_init tag = ComfortableMexicanSofa::Content::Tag::TextArea.new(context: @page, params: ["test"]) assert_equal "test",...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/content/tags/files_test.rb
test/lib/content/tags/files_test.rb
# frozen_string_literal: true require_relative "../../../test_helper" class ContentTagsFilesTest < ActiveSupport::TestCase delegate :rails_blob_path, to: "Rails.application.routes.url_helpers" setup do @page = comfy_cms_pages(:default) end # -- Tests ----------------------------------------------------...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/content/tags/fragment_test.rb
test/lib/content/tags/fragment_test.rb
# frozen_string_literal: true require_relative "../../../test_helper" class ContentTagsFragmentTest < ActiveSupport::TestCase setup do @page = comfy_cms_pages(:default) end def test_init tag = ComfortableMexicanSofa::Content::Tag::Fragment.new(context: @page, params: ["content"]) assert_equal @pag...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/content/tags/snippet_test.rb
test/lib/content/tags/snippet_test.rb
# frozen_string_literal: true require_relative "../../../test_helper" class ContentTagsSnippetTest < ActiveSupport::TestCase setup do @page = comfy_cms_pages(:default) end def test_init tag = ComfortableMexicanSofa::Content::Tag::Snippet.new(context: @page, params: ["default"]) assert_equal "defau...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/content/tags/page_file_link_test.rb
test/lib/content/tags/page_file_link_test.rb
# frozen_string_literal: true require_relative "../../../test_helper" class ContentTagsPageFileLinkTest < ActiveSupport::TestCase delegate :rails_blob_path, to: "Rails.application.routes.url_helpers" setup do @page = comfy_cms_pages(:default) @file = comfy_cms_files(:default) end # -- Tests -------...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/content/tags/wysiwyg_test.rb
test/lib/content/tags/wysiwyg_test.rb
# frozen_string_literal: true require_relative "../../../test_helper" class ContentTagsWysiwygTest < ActiveSupport::TestCase setup do @page = comfy_cms_pages(:default) end def test_init tag = ComfortableMexicanSofa::Content::Tag::Wysiwyg.new(context: @page, params: ["test"]) assert_equal "test", t...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/content/tags/helper_test.rb
test/lib/content/tags/helper_test.rb
# frozen_string_literal: true require_relative "../../../test_helper" class ContentTagsHelperTest < ActiveSupport::TestCase def test_init tag = ComfortableMexicanSofa::Content::Tag::Helper.new(context: @page, params: ["helper_method"]) assert_equal "helper_method", tag.method_name assert_equal [], tag....
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/content/tags/partial_test.rb
test/lib/content/tags/partial_test.rb
# frozen_string_literal: true require_relative "../../../test_helper" class ContentTagsPartialTest < ActiveSupport::TestCase def test_init tag = ComfortableMexicanSofa::Content::Tag::Partial.new( context: @page, params: ["path/to/partial"] ) assert_equal "path/to/partial", tag.path asse...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/content/tags/file_link_test.rb
test/lib/content/tags/file_link_test.rb
# frozen_string_literal: true require_relative "../../../test_helper" class ContentTagsFileLinkTest < ActiveSupport::TestCase delegate :rails_blob_path, to: "Rails.application.routes.url_helpers" setup do @page = comfy_cms_pages(:default) @file = comfy_cms_files(:default) end # -- Tests -----------...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/content/tags/markdown_test.rb
test/lib/content/tags/markdown_test.rb
# frozen_string_literal: true require_relative "../../../test_helper" class ContentTagsMarkdownTest < ActiveSupport::TestCase setup do @page = comfy_cms_pages(:default) end def test_init tag = ComfortableMexicanSofa::Content::Tag::Markdown.new(context: @page, params: ["test"]) assert_equal "test",...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/content/tags/text_test.rb
test/lib/content/tags/text_test.rb
# frozen_string_literal: true require_relative "../../../test_helper" class ContentTagsTextTest < ActiveSupport::TestCase setup do @page = comfy_cms_pages(:default) end def test_init tag = ComfortableMexicanSofa::Content::Tag::Text.new(context: @page, params: ["test"]) assert_equal "test", tag.ide...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/content/tags/file_test.rb
test/lib/content/tags/file_test.rb
# frozen_string_literal: true require_relative "../../../test_helper" class ContentTagsFileTest < ActiveSupport::TestCase delegate :rails_blob_path, :rails_representation_path, to: "Rails.application.routes.url_helpers" setup do @page = comfy_cms_pages(:default) end # -- Tests ...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/content/tags/date_test.rb
test/lib/content/tags/date_test.rb
# frozen_string_literal: true require_relative "../../../test_helper" class ContentTagsDateTest < ActiveSupport::TestCase setup do @page = comfy_cms_pages(:default) end def test_init tag = ComfortableMexicanSofa::Content::Tag::Date.new(context: @page, params: ["test"]) assert_equal "test", tag.ide...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/content/tags/number_test.rb
test/lib/content/tags/number_test.rb
# frozen_string_literal: true require_relative "../../../test_helper" class ContentTagsNumberTest < ActiveSupport::TestCase setup do @page = comfy_cms_pages(:default) end def test_init tag = ComfortableMexicanSofa::Content::Tag::Number.new(context: @page, params: ["test"]) assert_equal "test", tag...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/test/lib/content/tags/checkbox_test.rb
test/lib/content/tags/checkbox_test.rb
# frozen_string_literal: true require_relative "../../../test_helper" class ContentTagsCheckboxTest < ActiveSupport::TestCase setup do @page = comfy_cms_pages(:default) end def test_init tag = ComfortableMexicanSofa::Content::Tag::Checkbox.new(context: @page, params: ["test"]) assert_equal "test",...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa.rb
lib/comfortable_mexican_sofa.rb
# frozen_string_literal: true # Loading engine only if this is not a standalone installation unless defined? ComfortableMexicanSofa::Application require_relative "comfortable_mexican_sofa/engine" end require_relative "comfortable_mexican_sofa/version" require_relative "comfortable_mexican_sofa/error" require_relati...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/generators/comfy/scaffold/scaffold_generator.rb
lib/generators/comfy/scaffold/scaffold_generator.rb
# frozen_string_literal: true require "rails/generators/generated_attribute" require "rails/generators/active_record" module Comfy module Generators class ScaffoldGenerator < Rails::Generators::NamedBase include Rails::Generators::Migration no_tasks do attr_accessor :model_attrs end ...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/generators/comfy/cms/models_generator.rb
lib/generators/comfy/cms/models_generator.rb
# frozen_string_literal: true module Comfy module Generators module Cms class ModelsGenerator < Rails::Generators::Base source_root File.expand_path(File.join(File.dirname(__FILE__), "../../../../app/models")) def generate_models directory "comfy", "app/models/comfy" end...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/generators/comfy/cms/assets_generator.rb
lib/generators/comfy/cms/assets_generator.rb
# frozen_string_literal: true module Comfy module Generators module Cms class AssetsGenerator < Rails::Generators::Base source_root File.expand_path(File.join(File.dirname(__FILE__), "../../../../app/assets")) def generate_assets directory "javascripts/comfy/admin/cms", "app/ass...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/generators/comfy/cms/controllers_generator.rb
lib/generators/comfy/cms/controllers_generator.rb
# frozen_string_literal: true module Comfy module Generators module Cms class ControllersGenerator < Rails::Generators::Base source_root File.expand_path(File.join(File.dirname(__FILE__), "../../../../app/controllers")) def generate_controllers directory "comfy", "app/controller...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/generators/comfy/cms/views_generator.rb
lib/generators/comfy/cms/views_generator.rb
# frozen_string_literal: true module Comfy module Generators module Cms class ViewsGenerator < Rails::Generators::Base source_root File.expand_path(File.join(File.dirname(__FILE__), "../../../../app/views")) def generate_views directory "comfy", "app/views/comfy" end ...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/generators/comfy/cms/cms_generator.rb
lib/generators/comfy/cms/cms_generator.rb
# frozen_string_literal: true require "rails/generators/active_record" module Comfy module Generators class CmsGenerator < Rails::Generators::Base include Rails::Generators::Migration include Thor::Actions source_root File.expand_path("../../../..", __dir__) def generate_migration ...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/seeds.rb
lib/comfortable_mexican_sofa/seeds.rb
# frozen_string_literal: true module ComfortableMexicanSofa::Seeds SEED_CLASSES = %w[Layout Page Snippet File].freeze class Error < StandardError; end require "mimemagic" class Importer attr_accessor :site, :path, :from, :to, :see...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content.rb
lib/comfortable_mexican_sofa/content.rb
# frozen_string_literal: true module ComfortableMexicanSofa::Content # ... end require_relative "content/renderer" require_relative "content/params_parser" require_relative "content/tag" require_relative "content/block" require_relative "content/tags/fragment" require_relative "content/tags/wysiwyg" require_relat...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/version.rb
lib/comfortable_mexican_sofa/version.rb
# frozen_string_literal: true module ComfortableMexicanSofa VERSION = "2.0.19" end
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/render_methods.rb
lib/comfortable_mexican_sofa/render_methods.rb
# frozen_string_literal: true module ComfortableMexicanSofa::RenderMethods def self.included(base) # If application controller doesn't have template associated with it # CMS will attempt to find one. This is so you don't have to explicitly # call render cms_page: '/something' base.rescue_from "Actio...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/routing.rb
lib/comfortable_mexican_sofa/routing.rb
# frozen_string_literal: true require_relative "routes/cms_admin" require_relative "routes/cms" class ActionDispatch::Routing::Mapper def comfy_route(identifier, options = {}) send("comfy_route_#{identifier}", options) end end
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/view_hooks.rb
lib/comfortable_mexican_sofa/view_hooks.rb
# frozen_string_literal: true # This mechanism is used by 3rd party plugins. # Normally you'd use partials from your own app module ComfortableMexicanSofa::ViewHooks # Array of declared hooks def self.hooks @hooks ||= {} end # Renders hook content def self.render(name, template, options = {}) out =...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/configuration.rb
lib/comfortable_mexican_sofa/configuration.rb
# frozen_string_literal: true class ComfortableMexicanSofa::Configuration # Don't like ComfortableMexicanSofa? Set it to whatever you like. :( attr_accessor :cms_title # Controller that is inherited from CmsAdmin::BaseController # 'ApplicationController' is the default attr_accessor :admin_base_controller ...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/form_builder.rb
lib/comfortable_mexican_sofa/form_builder.rb
# frozen_string_literal: true class ComfortableMexicanSofa::FormBuilder < ComfyBootstrapForm::FormBuilder # Renders form input for a fragment # # @param [Comfy::Cms::Page] record # @param [ComfortableMexicanSofa::Content::Tag] tag # @param [Integer] index def fragment_field(tag, index) tag.form_field(...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/engine.rb
lib/comfortable_mexican_sofa/engine.rb
# frozen_string_literal: true require "comfortable_mexican_sofa" require "rails" require "rails-i18n" require "comfy_bootstrap_form" require "active_link_to" require "kramdown" require "jquery-rails" require "haml-rails" require "sassc-rails" module ComfortableMexicanSofa class Engine < ::Rails::Engine initial...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/error.rb
lib/comfortable_mexican_sofa/error.rb
# frozen_string_literal: true module ComfortableMexicanSofa class Error < StandardError end class MissingSite < ComfortableMexicanSofa::Error def initialize(identifier) super "Cannot find CMS Site with identifier: #{identifier}" end end class MissingLayout < ComfortableMexicanSofa::Error ...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/seeds/file/exporter.rb
lib/comfortable_mexican_sofa/seeds/file/exporter.rb
# frozen_string_literal: true module ComfortableMexicanSofa::Seeds::File class Exporter < ComfortableMexicanSofa::Seeds::Exporter def initialize(from, to = from) super self.path = ::File.join(ComfortableMexicanSofa.config.seeds_path, to, "files/") end def export! prepare_folder!(path)...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/seeds/file/importer.rb
lib/comfortable_mexican_sofa/seeds/file/importer.rb
# frozen_string_literal: true module ComfortableMexicanSofa::Seeds::File class Importer < ComfortableMexicanSofa::Seeds::Importer def initialize(from, to = from) super self.path = ::File.join(ComfortableMexicanSofa.config.seeds_path, from, "files/") end def import! Dir["#{path}[^_]*"]...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/seeds/layout/exporter.rb
lib/comfortable_mexican_sofa/seeds/layout/exporter.rb
# frozen_string_literal: true module ComfortableMexicanSofa::Seeds::Layout class Exporter < ComfortableMexicanSofa::Seeds::Exporter def initialize(from, to = from) super self.path = ::File.join(ComfortableMexicanSofa.config.seeds_path, to, "layouts/") end def export! prepare_folder!(p...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/seeds/layout/importer.rb
lib/comfortable_mexican_sofa/seeds/layout/importer.rb
# frozen_string_literal: true module ComfortableMexicanSofa::Seeds::Layout class Importer < ComfortableMexicanSofa::Seeds::Importer def initialize(from, to = from) super self.path = ::File.join(ComfortableMexicanSofa.config.seeds_path, from, "layouts/") end def import!(path = self.path, par...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/seeds/page/exporter.rb
lib/comfortable_mexican_sofa/seeds/page/exporter.rb
# frozen_string_literal: true module ComfortableMexicanSofa::Seeds::Page class Exporter < ComfortableMexicanSofa::Seeds::Exporter def initialize(from, to = from) super self.path = ::File.join(ComfortableMexicanSofa.config.seeds_path, to, "pages/") end def export! prepare_folder!(path)...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/seeds/page/importer.rb
lib/comfortable_mexican_sofa/seeds/page/importer.rb
# frozen_string_literal: true module ComfortableMexicanSofa::Seeds::Page class Importer < ComfortableMexicanSofa::Seeds::Importer # tracking target page linking. Since we might be linking to something that # doesn't exist yet, we'll defer linking to the end of import attr_accessor :target_pages def...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/seeds/snippet/exporter.rb
lib/comfortable_mexican_sofa/seeds/snippet/exporter.rb
# frozen_string_literal: true module ComfortableMexicanSofa::Seeds::Snippet class Exporter < ComfortableMexicanSofa::Seeds::Exporter def initialize(from, to = from) super self.path = ::File.join(ComfortableMexicanSofa.config.seeds_path, to, "snippets/") end def export! prepare_folder!...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/seeds/snippet/importer.rb
lib/comfortable_mexican_sofa/seeds/snippet/importer.rb
# frozen_string_literal: true module ComfortableMexicanSofa::Seeds::Snippet class Importer < ComfortableMexicanSofa::Seeds::Importer def initialize(from, to = from) super self.path = ::File.join(ComfortableMexicanSofa.config.seeds_path, from, "snippets/") end def import! Dir.glob("#{p...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content/tag.rb
lib/comfortable_mexican_sofa/content/tag.rb
# frozen_string_literal: true class ComfortableMexicanSofa::Content::Tag class Error < StandardError; end # @type [Comfy::Cms::WithFragments] attr_reader :context # @type [Array<String, {String => String}>] params attr_reader :params # @type [String, nil] source attr_reader :source # @param [Comfy...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content/renderer.rb
lib/comfortable_mexican_sofa/content/renderer.rb
# frozen_string_literal: true require "strscan" # Processing content follows these stages: # # string - Text with tags. like this: "some {{cms:fragment content}} text" # tokenization - Splits string into a list of strings and hashes that define tags # Example: ["some ", {tag_class: "frag...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content/params_parser.rb
lib/comfortable_mexican_sofa/content/params_parser.rb
# frozen_string_literal: true require "strscan" class ComfortableMexicanSofa::Content::ParamsParser class Error < StandardError; end STRING_LITERAL = %r{'[^']*'|"[^"]*"} IDENTIFIER = %r{[a-z0-9][\w\-/.]*}i HASH_KEY = %r{#{IDENTIFIER}:} COMMA = %r{,} HASH_OPEN = %r{\{} HASH...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content/block.rb
lib/comfortable_mexican_sofa/content/block.rb
# frozen_string_literal: true # wtf does this mean # it means that all nodes between this must be moved into here # {{cms:block}} some content {{cms:end_block}} class ComfortableMexicanSofa::Content::Block < ComfortableMexicanSofa::Content::Tag attr_writer :nodes def nodes @nodes ||= [] end end
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content/tags/snippet.rb
lib/comfortable_mexican_sofa/content/tags/snippet.rb
# frozen_string_literal: true # Tag for reusable snippets within context's site scope. Looks like this: # {{cms:snippet identifier}} # Snippets may have more tags in them like fragments, so they may be expanded too. # class ComfortableMexicanSofa::Content::Tag::Snippet < ComfortableMexicanSofa::Content::Tag attr_...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content/tags/page_file_link.rb
lib/comfortable_mexican_sofa/content/tags/page_file_link.rb
# frozen_string_literal: true require_relative "./mixins/file_content" # This tag allows you to link page-level files from within the page content. # # E.g. if your layout has: # # {{ cms:file graphic, render: false }} # {{ cms:files attachments, redner: false }} # # You can link to the files from an individual p...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content/tags/textarea.rb
lib/comfortable_mexican_sofa/content/tags/textarea.rb
# frozen_string_literal: true # Tag for text content that is going to be rendered using textarea # {{ cms:textarea identifier }} # class ComfortableMexicanSofa::Content::Tag::TextArea < ComfortableMexicanSofa::Content::Tag::Fragment def form_field(object_name, view, index) name = "#{object_name}[fragments_...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content/tags/files.rb
lib/comfortable_mexican_sofa/content/tags/files.rb
# frozen_string_literal: true # Same tag as File, only it handles multiple attachments. # Generally not a bad idea to handle rendering of this in a partial/helper. # Example tag: # {{ cms:files identifier }} # class ComfortableMexicanSofa::Content::Tag::Files < ComfortableMexicanSofa::Content::Tag::File def conte...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content/tags/text.rb
lib/comfortable_mexican_sofa/content/tags/text.rb
# frozen_string_literal: true # Tag for text content that is going to be rendered using text input # {{ cms:text identifier }} # class ComfortableMexicanSofa::Content::Tag::Text < ComfortableMexicanSofa::Content::Tag::Fragment def form_field(object_name, view, index) name = "#{object_name}[fragments_attrib...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content/tags/fragment.rb
lib/comfortable_mexican_sofa/content/tags/fragment.rb
# frozen_string_literal: true # Base Tag class that other fragment tags depend on. # Tag handles following options: # `render`: true (default) | false # do we want to render this content on the page, or manually access it via # helpers. Good example would be content for meta tags. # `namespace`: # Just...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content/tags/file.rb
lib/comfortable_mexican_sofa/content/tags/file.rb
# frozen_string_literal: true require_relative "./mixins/file_content" # File tag allows attaching of file to the page. This controls how files are # uploaded and then displayed on the page. Example tag: # {{ cms:file identifier, as: link, label: "My File" }} # # `as` - url (default) | link | image - render ou...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content/tags/number.rb
lib/comfortable_mexican_sofa/content/tags/number.rb
# frozen_string_literal: true # Tag for text content that is going to be rendered using number input # {{ cms:number identifier }} # class ComfortableMexicanSofa::Content::Tag::Number < ComfortableMexicanSofa::Content::Tag::Fragment def form_field(object_name, view, index) name = "#{object_name}[fragments_...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content/tags/template.rb
lib/comfortable_mexican_sofa/content/tags/template.rb
# frozen_string_literal: true # Tag for injecting template rendering. Example tag: # {{cms:template template/path}} # This expands into something like this: # <%= render template: "template/path" %> # Whitelist is can be used to control what templates are available. # class ComfortableMexicanSofa::Content::Tag::Te...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content/tags/markdown.rb
lib/comfortable_mexican_sofa/content/tags/markdown.rb
# frozen_string_literal: true # Tag for text content that is going to be rendered using textarea with markdown # {{ cms:markdown identifier }} # class ComfortableMexicanSofa::Content::Tag::Markdown < ComfortableMexicanSofa::Content::Tag::Fragment def render renderable ? Kramdown::Document.new(content.to_s).to...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content/tags/datetime.rb
lib/comfortable_mexican_sofa/content/tags/datetime.rb
# frozen_string_literal: true # Tag for text content that is going to be rendered using text input with datetime widget # {{ cms:datetime identifier, strftime: "at %I:%M%p" }} # # `strftime` - Format datetime string during rendering # class ComfortableMexicanSofa::Content::Tag::Datetime < ComfortableMexicanSofa::Con...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content/tags/helper.rb
lib/comfortable_mexican_sofa/content/tags/helper.rb
# frozen_string_literal: true # Tag for injecting view helpers. Example tag: # {{cms:helper method_name, param_a, param_b, foo: bar}} # This expands into something like this: # <%= method_name("param_a", "param_b", "foo" => "bar") %> # Whitelist is can be used to control what helpers are available. # By default th...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content/tags/file_link.rb
lib/comfortable_mexican_sofa/content/tags/file_link.rb
# frozen_string_literal: true require_relative "./mixins/file_content" # This is how you link previously uploaded file to anywhere. Good example may be # a header image you want to use on the layout level. # {{cms:file_link id, as: image}} # # `as` - url (default) | link | image - how file gets rendered out # ...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content/tags/wysiwyg.rb
lib/comfortable_mexican_sofa/content/tags/wysiwyg.rb
# frozen_string_literal: true # Tag for text content that is going to be rendered using Redactor (default) in # the admin area # {{ cms:wysiwyg identifier }} # # class ComfortableMexicanSofa::Content::Tag::Wysiwyg < ComfortableMexicanSofa::Content::Tag::Fragment def form_field(object_name, view, index) name ...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content/tags/partial.rb
lib/comfortable_mexican_sofa/content/tags/partial.rb
# frozen_string_literal: true # Tag for injecting partials. Example tag: # {{cms:partial path/to/partial, foo: bar, zip: zoop}} # This expands into a familiar: # <%= render partial: "path/to/partial", locals: {foo: bar, zip: zoop} %> # Whitelist is can be used to control what partials are renderable. # class Comfo...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content/tags/checkbox.rb
lib/comfortable_mexican_sofa/content/tags/checkbox.rb
# frozen_string_literal: true # Tag for boolean content that is going to be rendered using checkbox # {{ cms:checkbox identifier }} # class ComfortableMexicanSofa::Content::Tag::Checkbox < ComfortableMexicanSofa::Content::Tag::Fragment def content fragment.boolean end def form_field(object_name, view, in...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content/tags/asset.rb
lib/comfortable_mexican_sofa/content/tags/asset.rb
# frozen_string_literal: true # This tag allows for linking of js and css content defined on the layout. # Looks something like this: # {{cms:asset layout_identifier, type: css, as: tag}} # # `type` - css | js - what we're outputting here # `as` - url (default) | tag - output url or wrap it in the appropriate tag ...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content/tags/date.rb
lib/comfortable_mexican_sofa/content/tags/date.rb
# frozen_string_literal: true # Tag for text content that is going to be rendered using text input with date widget # {{ cms:date identifier }} # class ComfortableMexicanSofa::Content::Tag::Date < ComfortableMexicanSofa::Content::Tag::Datetime def form_field(object_name, view, index) name = "#{object_name}...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/content/tags/mixins/file_content.rb
lib/comfortable_mexican_sofa/content/tags/mixins/file_content.rb
# frozen_string_literal: true # A mixin for tags that returns the file as their content. module ComfortableMexicanSofa::Content::Tag::Mixins module FileContent # @param [ActiveStorage::Blob] file # @param ["link", "image", "url"] as # @param [{String => String}] variant_attrs ImageMagick variant attribu...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/extensions/acts_as_tree.rb
lib/comfortable_mexican_sofa/extensions/acts_as_tree.rb
# frozen_string_literal: true module ComfortableMexicanSofa::ActsAsTree def self.included(base) base.extend(ClassMethods) end module ClassMethods def cms_acts_as_tree(options = {}) configuration = { foreign_key: "parent_id", order: nil, counter_cache: nil, ...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/extensions/has_revisions.rb
lib/comfortable_mexican_sofa/extensions/has_revisions.rb
# frozen_string_literal: true module ComfortableMexicanSofa::HasRevisions def self.included(base) base.send :extend, ClassMethods end module ClassMethods def cms_has_revisions_for(*fields) include ComfortableMexicanSofa::HasRevisions::InstanceMethods attr_accessor :revision_data ha...
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/access_control/public_authentication.rb
lib/comfortable_mexican_sofa/access_control/public_authentication.rb
# frozen_string_literal: true module ComfortableMexicanSofa::AccessControl module PublicAuthentication # By defaut all published pages are accessible def authenticate true end end end
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false
comfy/comfortable-mexican-sofa
https://github.com/comfy/comfortable-mexican-sofa/blob/8f7e425a06aca9cfa8e21de6b7a10669c8495fc3/lib/comfortable_mexican_sofa/access_control/public_authorization.rb
lib/comfortable_mexican_sofa/access_control/public_authorization.rb
# frozen_string_literal: true module ComfortableMexicanSofa::AccessControl module PublicAuthorization # By default there's no authorization of any kind def authorize true end end end
ruby
MIT
8f7e425a06aca9cfa8e21de6b7a10669c8495fc3
2026-01-04T15:53:10.116705Z
false