solidify 0.0.1.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.rspec +2 -0
- data/.rubocop.yml +40 -0
- data/.travis.yml +10 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +3 -0
- data/Guardfile +51 -0
- data/LICENSE.txt +21 -0
- data/README.md +75 -0
- data/Rakefile +42 -0
- data/app/controllers/concerns/solidify/liquid.rb +26 -0
- data/app/controllers/solidify/addresses_controller.rb +15 -0
- data/app/controllers/solidify/carts_controller.rb +15 -0
- data/app/controllers/solidify/collections_controller.rb +26 -0
- data/app/controllers/solidify/customers_controller.rb +16 -0
- data/app/controllers/solidify/home_controller.rb +15 -0
- data/app/controllers/solidify/liquid_controller.rb +25 -0
- data/app/controllers/solidify/orders_controller.rb +19 -0
- data/app/controllers/solidify/pages_controller.rb +22 -0
- data/app/controllers/solidify/products_controller.rb +34 -0
- data/app/controllers/solidify/registrations_controller.rb +25 -0
- data/app/controllers/solidify/responders/solidify/liquid_responder.rb +29 -0
- data/app/controllers/solidify/search_controller.rb +41 -0
- data/app/controllers/solidify/sessions_controller.rb +15 -0
- data/app/drops/rails_settings/scoped_settings_drop.rb +11 -0
- data/app/drops/solidify/errors_drop.rb +14 -0
- data/app/drops/solidify/link_drop.rb +15 -0
- data/app/drops/solidify/link_list_drop.rb +7 -0
- data/app/drops/solidify/nil_drop.rb +7 -0
- data/app/drops/solidify/page_drop.rb +7 -0
- data/app/drops/solidify/search_drop.rb +7 -0
- data/app/drops/spree/address_drop.rb +28 -0
- data/app/drops/spree/image_drop.rb +32 -0
- data/app/drops/spree/line_item_drop.rb +98 -0
- data/app/drops/spree/option_type_drop.rb +4 -0
- data/app/drops/spree/order_drop.rb +64 -0
- data/app/drops/spree/product_drop.rb +97 -0
- data/app/drops/spree/taxon_drop.rb +53 -0
- data/app/drops/spree/user_drop.rb +54 -0
- data/app/drops/spree/variant_drop.rb +111 -0
- data/app/fields/spree/address_fields.rb +18 -0
- data/app/fields/spree/image_fields.rb +12 -0
- data/app/fields/spree/line_item_fields.rb +21 -0
- data/app/fields/spree/order_fields.rb +22 -0
- data/app/fields/spree/product_fields.rb +22 -0
- data/app/fields/spree/taxon_fields.rb +18 -0
- data/app/fields/spree/user_fields.rb +14 -0
- data/app/fields/spree/variant_fields.rb +19 -0
- data/app/filters/solidify/additional_filters.rb +22 -0
- data/app/filters/solidify/html_filters.rb +16 -0
- data/app/filters/solidify/money_filters.rb +39 -0
- data/app/filters/solidify/string_filters.rb +47 -0
- data/app/filters/solidify/url_filters.rb +59 -0
- data/app/helpers/solidify/liquid_helper.rb +111 -0
- data/app/helpers/solidify/shop_helper.rb +7 -0
- data/app/models/concerns/solidify/address.rb +15 -0
- data/app/models/concerns/solidify/full_name.rb +11 -0
- data/app/models/concerns/solidify/handle.rb +25 -0
- data/app/models/concerns/solidify/inventory_policy.rb +7 -0
- data/app/models/concerns/solidify/validation_cancel.rb +33 -0
- data/app/models/concerns/spree/order_state.rb +19 -0
- data/app/models/solidify/asset.rb +12 -0
- data/app/models/solidify/link.rb +10 -0
- data/app/models/solidify/link_list.rb +7 -0
- data/app/models/solidify/page.rb +5 -0
- data/app/models/solidify/setting.rb +8 -0
- data/app/models/solidify/theme.rb +19 -0
- data/app/models/spree/address_decorator.rb +13 -0
- data/app/models/spree/image_decorator.rb +7 -0
- data/app/models/spree/line_item_decorator.rb +7 -0
- data/app/models/spree/order_decorator.rb +10 -0
- data/app/models/spree/product_decorator.rb +8 -0
- data/app/models/spree/taxon_decorator.rb +20 -0
- data/app/models/spree/user_decorator.rb +9 -0
- data/app/models/spree/variant_decorator.rb +11 -0
- data/app/poro/solidify/search.rb +14 -0
- data/app/services/solidify/app_specific_string_io.rb +15 -0
- data/app/services/solidify/asset_compiler.rb +11 -0
- data/app/services/solidify/asset_postprocessor.rb +53 -0
- data/app/services/solidify/collections_all_builder.rb +12 -0
- data/app/services/solidify/link_list_seeder.rb +26 -0
- data/app/services/solidify/liquid_asset_compiler.rb +19 -0
- data/app/services/solidify/scss_asset_compiler.rb +15 -0
- data/app/services/solidify/shop_settings_seeder.rb +26 -0
- data/app/services/solidify/theme_mechanic.rb +30 -0
- data/app/uploaders/solidify/asset_uploader.rb +10 -0
- data/app/views/solidify/global/content_for_header.html.erb +0 -0
- data/app/views/solidify/themes/skeleton-theme/README.md +54 -0
- data/app/views/solidify/themes/skeleton-theme/assets/arrow-down.svg.liquid +3 -0
- data/app/views/solidify/themes/skeleton-theme/assets/cart.svg.liquid +4 -0
- data/app/views/solidify/themes/skeleton-theme/assets/shop.js.liquid +75 -0
- data/app/views/solidify/themes/skeleton-theme/assets/shopify_common.js +14 -0
- data/app/views/solidify/themes/skeleton-theme/assets/style.scss.liquid +768 -0
- data/app/views/solidify/themes/skeleton-theme/config/settings.html +217 -0
- data/app/views/solidify/themes/skeleton-theme/config/settings_data.json +26 -0
- data/app/views/solidify/themes/skeleton-theme/layout/theme.liquid +181 -0
- data/app/views/solidify/themes/skeleton-theme/snippets/article-grid-item.liquid +73 -0
- data/app/views/solidify/themes/skeleton-theme/snippets/collection-grid-item.liquid +46 -0
- data/app/views/solidify/themes/skeleton-theme/snippets/collection-listing.liquid +46 -0
- data/app/views/solidify/themes/skeleton-theme/snippets/open-graph-tags.liquid +35 -0
- data/app/views/solidify/themes/skeleton-theme/snippets/product-grid-item.liquid +70 -0
- data/app/views/solidify/themes/skeleton-theme/snippets/site-nav.liquid +57 -0
- data/app/views/solidify/themes/skeleton-theme/snippets/social-links.liquid +42 -0
- data/app/views/solidify/themes/skeleton-theme/snippets/twitter-card.liquid +41 -0
- data/app/views/solidify/themes/skeleton-theme/templates/404.liquid +2 -0
- data/app/views/solidify/themes/skeleton-theme/templates/article.liquid +160 -0
- data/app/views/solidify/themes/skeleton-theme/templates/blog.grid.liquid +30 -0
- data/app/views/solidify/themes/skeleton-theme/templates/blog.liquid +92 -0
- data/app/views/solidify/themes/skeleton-theme/templates/cart.liquid +123 -0
- data/app/views/solidify/themes/skeleton-theme/templates/collection.liquid +102 -0
- data/app/views/solidify/themes/skeleton-theme/templates/customers/account.liquid +57 -0
- data/app/views/solidify/themes/skeleton-theme/templates/customers/activate_account.liquid +26 -0
- data/app/views/solidify/themes/skeleton-theme/templates/customers/addresses.liquid +173 -0
- data/app/views/solidify/themes/skeleton-theme/templates/customers/login.liquid +90 -0
- data/app/views/solidify/themes/skeleton-theme/templates/customers/order.liquid +103 -0
- data/app/views/solidify/themes/skeleton-theme/templates/customers/register.liquid +32 -0
- data/app/views/solidify/themes/skeleton-theme/templates/customers/reset_password.liquid +27 -0
- data/app/views/solidify/themes/skeleton-theme/templates/index.liquid +39 -0
- data/app/views/solidify/themes/skeleton-theme/templates/list-collections.liquid +19 -0
- data/app/views/solidify/themes/skeleton-theme/templates/page.liquid +16 -0
- data/app/views/solidify/themes/skeleton-theme/templates/product.liquid +202 -0
- data/app/views/solidify/themes/skeleton-theme/templates/search.liquid +72 -0
- data/bin/rails +12 -0
- data/config/app.yml +0 -0
- data/config/initializers/carrierwave.rb +25 -0
- data/config/initializers/devise.rb +286 -0
- data/config/initializers/form_tag.rb +43 -0
- data/config/initializers/liquid.rb +213 -0
- data/config/initializers/sass.rb +15 -0
- data/config/initializers/spree.rb +7 -0
- data/config/initializers/theme_settings.rb +29 -0
- data/config/routes.rb +52 -0
- data/config/spring.rb +2 -0
- data/db/migrate/20170223064316_create_solidify_assets.solidify.rb +14 -0
- data/db/migrate/20170223064317_create_solidify_themes.solidify.rb +10 -0
- data/db/migrate/20170223064318_create_solidify_link_lists.solidify.rb +12 -0
- data/db/migrate/20170223064319_create_solidify_links.solidify.rb +13 -0
- data/db/migrate/20170223064320_create_solidify_settings.solidify.rb +22 -0
- data/db/migrate/20170223064321_create_solidify_pages.solidify.rb +16 -0
- data/db/migrate/20170223064322_add_attributes_to_spree_users.solidify.rb +7 -0
- data/db/migrate/20170223064323_add_handle_to_spree_taxons.solidify.rb +7 -0
- data/db/migrate/20170228115149_add_state_and_country_fields_to_spree_addresses.solidify.rb +7 -0
- data/lib/generators/solidify/install/install_generator.rb +23 -0
- data/lib/solidify.rb +11 -0
- data/lib/solidify/configuration.rb +21 -0
- data/lib/solidify/engine.rb +24 -0
- data/lib/solidify/testing_support/factories.rb +5 -0
- data/lib/solidify/testing_support/factories/assets.rb +75 -0
- data/lib/solidify/testing_support/factories/solidify_pages.rb +10 -0
- data/lib/solidify/testing_support/factories/spree_addresses.rb +9 -0
- data/lib/solidify/testing_support/factories/spree_line_items.rb +10 -0
- data/lib/solidify/testing_support/factories/spree_orders.rb +9 -0
- data/lib/solidify/testing_support/factories/spree_products.rb +8 -0
- data/lib/solidify/testing_support/factories/spree_taxons.rb +7 -0
- data/lib/solidify/testing_support/factories/spree_variants.rb +7 -0
- data/lib/solidify/testing_support/factories/themes.rb +7 -0
- data/lib/solidify/version.rb +3 -0
- data/lib/tasks/download_theme.rake +18 -0
- data/lib/tasks/seed_default_theme.rake +8 -0
- data/lib/tasks/seed_everything.rake +12 -0
- data/lib/tasks/seed_link_list.rake +8 -0
- data/lib/tasks/seed_shop_settings.rake +8 -0
- data/solidify.gemspec +61 -0
- metadata +668 -0
@@ -0,0 +1,15 @@
|
|
1
|
+
# rubocop:disable all
|
2
|
+
module Sass
|
3
|
+
module Selector
|
4
|
+
class SimpleSequence < AbstractSequence
|
5
|
+
def check_directives_match!(extend, parent_directives)
|
6
|
+
dirs1 = extend.directives.map {|d| d.resolved_value}
|
7
|
+
dirs2 = parent_directives.map {|d| d.resolved_value}
|
8
|
+
return if Sass::Util.subsequence?(dirs1, dirs2)
|
9
|
+
line = extend.node.line
|
10
|
+
filename = extend.node.filename
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
# rubocop:enable all
|
@@ -0,0 +1,29 @@
|
|
1
|
+
if Solidify::Theme.table_exists?
|
2
|
+
Solidify::Theme.all.each do |theme|
|
3
|
+
settings_file = Rails.root.join(
|
4
|
+
'app', 'views', 'themes', theme.id.to_s, 'config', 'settings_data.json'
|
5
|
+
)
|
6
|
+
next unless settings_file.exist?
|
7
|
+
settings_data = JSON.parse(
|
8
|
+
File.read(settings_file)
|
9
|
+
)
|
10
|
+
settings = if settings_data['current'].is_a? String
|
11
|
+
settings_data['presets'][settings_data['current']].to_json
|
12
|
+
else
|
13
|
+
settings_data['current'].to_json
|
14
|
+
end
|
15
|
+
Redis.current.set("solidify_themes_#{theme.id}", settings)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
settings_file = Solidify::Engine.root.join(
|
20
|
+
'app', 'views', 'solidify', 'themes', 'skeleton-theme', 'config',
|
21
|
+
'settings_data.json'
|
22
|
+
)
|
23
|
+
settings_data = JSON.parse(File.read(settings_file))
|
24
|
+
settings = if settings_data['current'].is_a? String
|
25
|
+
settings_data['presets'][settings_data['current']].to_json
|
26
|
+
else
|
27
|
+
settings_data['current'].to_json
|
28
|
+
end
|
29
|
+
Redis.current.set('solidify_themes_', settings)
|
data/config/routes.rb
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# rubocop:disable Metrics/BlockLength
|
2
|
+
Solidify::Engine.routes.draw do
|
3
|
+
root to: 'home#index'
|
4
|
+
get 'pages/:id', to: 'pages#show', as: :page
|
5
|
+
get 'account/addresses', to: 'addresses#index', as: :customer_addresses
|
6
|
+
get 'account/orders/:id', to: 'orders#show', as: :customer_order
|
7
|
+
|
8
|
+
devise_for :customers,
|
9
|
+
path: 'account',
|
10
|
+
class_name: 'Spree::User',
|
11
|
+
# module: :devise,
|
12
|
+
path_names: {
|
13
|
+
registration: 'register',
|
14
|
+
sign_up: '',
|
15
|
+
sign_in: 'login',
|
16
|
+
sign_out: 'logout',
|
17
|
+
password: 'recover',
|
18
|
+
confirmation: 'verification',
|
19
|
+
edit: ''
|
20
|
+
},
|
21
|
+
controllers: {
|
22
|
+
registrations: 'solidify/registrations',
|
23
|
+
sessions: 'solidify/sessions'
|
24
|
+
}
|
25
|
+
|
26
|
+
devise_scope :customer do
|
27
|
+
get 'account/login', to: 'sessions#new'
|
28
|
+
post 'account/login', to: 'sessions#create'
|
29
|
+
get 'account/logout', to: 'sessions#destroy'
|
30
|
+
get 'account/signup', to: 'registrations#new'
|
31
|
+
post 'account/signup', to: 'registrations#create'
|
32
|
+
get 'account/password/recover', to: 'passwords#new'
|
33
|
+
post 'account/password/recover', to: 'passwords#create'
|
34
|
+
get 'account/password/change', to: 'passwords#edit'
|
35
|
+
put 'account/password/change', to: 'passwords#update'
|
36
|
+
get 'account/register', to: 'registrations#new'
|
37
|
+
post 'account/register', to: 'registrations#create'
|
38
|
+
end
|
39
|
+
|
40
|
+
get '/account', to: 'customers#show', as: :customer
|
41
|
+
get '/collections/:id', to: 'collections#show', as: :taxon
|
42
|
+
get '/search', to: 'search#index', as: :search
|
43
|
+
|
44
|
+
get '/collections/:collection_id/products/:id?variant=:variant_id',
|
45
|
+
to: 'products#show'
|
46
|
+
get '/collections/:collection_id/products/:id', to: 'products#show'
|
47
|
+
get '/products/:id?variant=:variant_id', to: 'products#show', as: :variant
|
48
|
+
get '/products/:id', to: 'products#show', as: :product
|
49
|
+
|
50
|
+
post '/cart/add', to: 'orders#populate'
|
51
|
+
get '/cart', to: 'carts#show', as: :cart
|
52
|
+
end
|
data/config/spring.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# This migration comes from solidify (originally 20170130114732)
|
2
|
+
class CreateSolidifyAssets < ActiveRecord::Migration[5.0]
|
3
|
+
def change
|
4
|
+
create_table :solidify_assets do |t|
|
5
|
+
t.integer :theme_id
|
6
|
+
t.string :key
|
7
|
+
t.string :file
|
8
|
+
|
9
|
+
t.timestamps null: false
|
10
|
+
end
|
11
|
+
add_index :solidify_assets, :theme_id
|
12
|
+
add_index :solidify_assets, :key
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# This migration comes from solidify (originally 20170206094936)
|
2
|
+
class CreateSolidifyLinkLists < ActiveRecord::Migration[5.0]
|
3
|
+
def change
|
4
|
+
create_table :solidify_link_lists do |t|
|
5
|
+
t.string :name
|
6
|
+
t.string :slug
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
add_index :solidify_link_lists, :slug
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# This migration comes from solidify (originally 20170206095308)
|
2
|
+
class CreateSolidifyLinks < ActiveRecord::Migration[5.0]
|
3
|
+
def change
|
4
|
+
create_table :solidify_links do |t|
|
5
|
+
t.string :name
|
6
|
+
t.string :url
|
7
|
+
t.integer :link_list_id
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
add_index :solidify_links, :link_list_id
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# This migration comes from solidify (originally 20170208021602)
|
2
|
+
class CreateSolidifySettings < ActiveRecord::Migration[5.0]
|
3
|
+
def self.up
|
4
|
+
# create_table :solidify_settings do |t|
|
5
|
+
create_table :settings do |t|
|
6
|
+
t.string :var, null: false
|
7
|
+
t.text :value, null: true
|
8
|
+
t.integer :thing_id, null: true
|
9
|
+
t.string :thing_type, null: true, limit: 30
|
10
|
+
t.timestamps
|
11
|
+
end
|
12
|
+
|
13
|
+
add_index :settings,
|
14
|
+
%i(thing_type thing_id var),
|
15
|
+
unique: true,
|
16
|
+
name: 'index_settings_on_thing_and_var'
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.down
|
20
|
+
drop_table :settings
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# This migration comes from solidify (originally 20170209055257)
|
2
|
+
class CreateSolidifyPages < ActiveRecord::Migration[5.0]
|
3
|
+
def change
|
4
|
+
create_table :solidify_pages do |t|
|
5
|
+
t.string :author
|
6
|
+
t.string :name
|
7
|
+
t.string :slug
|
8
|
+
t.text :body_html
|
9
|
+
t.datetime :published_at
|
10
|
+
t.string :template_suffix
|
11
|
+
|
12
|
+
t.timestamps
|
13
|
+
end
|
14
|
+
add_index :solidify_pages, :slug
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Solidify
|
2
|
+
module Generators
|
3
|
+
class InstallGenerator < ::Rails::Generators::Base
|
4
|
+
def add_migrations
|
5
|
+
run 'rails railties:install:migrations'
|
6
|
+
end
|
7
|
+
|
8
|
+
def run_migrations
|
9
|
+
run 'rails db:migrate'
|
10
|
+
end
|
11
|
+
|
12
|
+
def install_routes
|
13
|
+
insert_into_file(File.join('config', 'routes.rb'),
|
14
|
+
after: "Rails.application.routes.draw do\n") do
|
15
|
+
<<~ROUTES
|
16
|
+
# Setup Solidify's routes
|
17
|
+
mount Solidify::Engine, at: '/'
|
18
|
+
ROUTES
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/solidify.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'solidus_core'
|
2
|
+
require 'solidus_auth_devise'
|
3
|
+
require 'solidify/configuration'
|
4
|
+
require 'solidify/version'
|
5
|
+
require 'carrierwave'
|
6
|
+
require 'devise'
|
7
|
+
require 'solidify/engine'
|
8
|
+
require 'liquid-rails'
|
9
|
+
require 'rails-settings-cached'
|
10
|
+
require 'redis'
|
11
|
+
require 'sass'
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Solidify
|
2
|
+
class Configuration
|
3
|
+
attr_accessor :cart_class
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
@cart_class = ::Cart if defined? ::Cart
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.configuration
|
11
|
+
@configuration ||= Configuration.new
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.configuration=(config)
|
15
|
+
@configuration = config
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.configure
|
19
|
+
yield configuration
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'rails/engine'
|
2
|
+
|
3
|
+
module Solidify
|
4
|
+
class Engine < ::Rails::Engine
|
5
|
+
config.autoload_paths << Engine.root.join(
|
6
|
+
'app', 'controllers', 'solidify', 'responders'
|
7
|
+
)
|
8
|
+
isolate_namespace Solidify
|
9
|
+
engine_name 'solidify'
|
10
|
+
|
11
|
+
config.generators do |g|
|
12
|
+
g.test_framework :rspec
|
13
|
+
g.fixture_replacement :factory_girl, dir: 'spec/factories'
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.activate
|
17
|
+
Dir.glob(File.join(__dir__, '../../app/**/*_decorator*.rb')) do |c|
|
18
|
+
Rails.configuration.cache_classes ? require(c) : load(c)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
config.to_prepare(&method(:activate).to_proc)
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
module Solidify
|
2
|
+
# rubocop:disable Metrics/BlockLength
|
3
|
+
FactoryGirl.define do
|
4
|
+
factory :asset, class: Asset do
|
5
|
+
theme_id 1
|
6
|
+
key 'simple.liquid'
|
7
|
+
file do
|
8
|
+
Rack::Test::UploadedFile.new(
|
9
|
+
File.join(Solidify::Engine.root, 'spec', 'data',
|
10
|
+
'simple.liquid')
|
11
|
+
)
|
12
|
+
end
|
13
|
+
|
14
|
+
trait :javascript do
|
15
|
+
key 'assets/shop.js.liquid'
|
16
|
+
file do
|
17
|
+
Rack::Test::UploadedFile.new(
|
18
|
+
File.join(Solidify::Engine.root, 'spec', 'data', 'assets',
|
19
|
+
'shop.js.liquid')
|
20
|
+
)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
trait :snippet do
|
25
|
+
key 'snippets/open-graph-tags.liquid'
|
26
|
+
file do
|
27
|
+
Rack::Test::UploadedFile.new(
|
28
|
+
File.join(Solidify::Engine.root, 'spec', 'data', 'snippets',
|
29
|
+
'open-graph-tags.liquid')
|
30
|
+
)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
trait :stylesheet_liquid do
|
35
|
+
key 'assets/style.scss.liquid'
|
36
|
+
file do
|
37
|
+
Rack::Test::UploadedFile.new(
|
38
|
+
File.join(Solidify::Engine.root, 'spec', 'data', 'assets',
|
39
|
+
'style.scss.liquid')
|
40
|
+
)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
trait :stylesheet_liquid_with_asset_url do
|
45
|
+
key 'assets/style_with_asset_url_filter.scss.liquid'
|
46
|
+
file do
|
47
|
+
Rack::Test::UploadedFile.new(
|
48
|
+
File.join(Solidify::Engine.root, 'spec', 'data', 'assets',
|
49
|
+
'style_with_asset_url_filter.scss.liquid')
|
50
|
+
)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
trait :stylesheet_scss do
|
55
|
+
key 'assets/style.scss'
|
56
|
+
file do
|
57
|
+
Rack::Test::UploadedFile.new(
|
58
|
+
File.join(Solidify::Engine.root, 'spec', 'data', 'assets',
|
59
|
+
'style.scss')
|
60
|
+
)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
trait :stylesheet_scss_css do
|
65
|
+
key 'assets/style.scss.css'
|
66
|
+
file do
|
67
|
+
Rack::Test::UploadedFile.new(
|
68
|
+
File.join(Solidify::Engine.root, 'spec', 'data', 'assets',
|
69
|
+
'style.scss.css')
|
70
|
+
)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|