lib/platformos_check/app.rb in platformos-check-0.0.1 vs lib/platformos_check/app.rb in platformos-check-0.0.2

- old
+ new

@@ -12,10 +12,11 @@ GRAPHQL_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|modules/(.+)(private|public|marketplace_builder|app)/)?)(graph_queries|graphql)s?/(.+)\.graphql\z} MIGRATIONS_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|modules/(.+)(private|public|marketplace_builder|app)/)?)migrations/(.+)\.liquid\z} PAGES_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|modules/(.+)(private|public|marketplace_builder|app)/)?)(pages|views/pages)/(.+)} PARTIALS_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|modules/(.+)(private|public|marketplace_builder|app)/)?)(views/partials|lib)/(.+)} + FORMS_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|modules/(.+)(private|public|marketplace_builder|app)/)?)(form_configurations|forms)/(.+)\.liquid\z} LAYOUTS_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|modules/(.+)(private|public|marketplace_builder|app)/)?)(views/layouts)/(.+)} SCHEMA_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|modules/(.+)(private|public|marketplace_builder|app)/)?)(custom_model_types|model_schemas|schema)/(.+)\.yml\z} SMSES_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|modules/(.+)(private|public|marketplace_builder|app)/)?)(notifications/sms_notifications|smses)/(.+)\.liquid\z} USER_SCHEMA_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/)?)user.yml} TRANSLATIONS_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|modules/(.+)(private|public|marketplace_builder|app)/)?)translations.+.yml} @@ -27,10 +28,11 @@ EMAILS_REGEX => EmailFile, GRAPHQL_REGEX => GraphqlFile, MIGRATIONS_REGEX => MigrationFile, PAGES_REGEX => PageFile, PARTIALS_REGEX => PartialFile, + FORMS_REGEX => FormFile, LAYOUTS_REGEX => LayoutFile, SCHEMA_REGEX => SchemaFile, SMSES_REGEX => SmsFile, USER_SCHEMA_REGEX => UserSchemaFile, TRANSLATIONS_REGEX => TranslationFile, @@ -65,11 +67,11 @@ def assets grouped_files[AssetFile]&.values end def liquid - layouts + partials + pages + notifications + layouts + partials + forms + pages + notifications end def yaml schema + translations end @@ -84,10 +86,14 @@ def partials grouped_files[PartialFile]&.values || [] end + def forms + grouped_files[FormFile]&.values || [] + end + def layouts grouped_files[LayoutFile]&.values || [] end def notifications @@ -96,10 +102,14 @@ def emails grouped_files[EmailFile]&.values || [] end + def graphqls + grouped_files[GraphqlFile]&.values || [] + end + def smses grouped_files[SmsFile]&.values || [] end def api_calls @@ -108,14 +118,10 @@ def pages grouped_files[PageFile]&.values || [] end - def directories - storage.directories - end - def all @all ||= grouped_files.values.map(&:values).flatten end def [](name_or_relative_path) @@ -123,16 +129,8 @@ when Pathname all.find { |t| t.relative_path == name_or_relative_path } else all.find { |t| t.name == name_or_relative_path } end - end - - def sections - liquid.select(&:section?) - end - - def snippets - liquid.select(&:snippet?) end end end