parcels 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +22 -0
- data/.rspec-local +4 -0
- data/.travis.yml +54 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +6 -0
- data/lib/parcels/dependency_parcel_list.rb +50 -0
- data/lib/parcels/environment.rb +60 -0
- data/lib/parcels/fortitude/alongside_engine.rb +37 -0
- data/lib/parcels/fortitude/assets.rb +212 -0
- data/lib/parcels/fortitude/enabling.rb +72 -0
- data/lib/parcels/fortitude/fortitude_engine.rb +35 -0
- data/lib/parcels/fortitude/fortitude_loader.rb +27 -0
- data/lib/parcels/fortitude/widget_engine.rb +31 -0
- data/lib/parcels/fortitude_alongside_parcel.rb +38 -0
- data/lib/parcels/fortitude_inline_parcel.rb +31 -0
- data/lib/parcels/fortitude_parcel.rb +102 -0
- data/lib/parcels/fragments/css_fragment.rb +107 -0
- data/lib/parcels/index.rb +16 -0
- data/lib/parcels/rails/rails_loader.rb +23 -0
- data/lib/parcels/rails/railtie.rb +16 -0
- data/lib/parcels/sprockets.rb +153 -0
- data/lib/parcels/utils/path_utils.rb +32 -0
- data/lib/parcels/version.rb +3 -0
- data/lib/parcels/widget_tree.rb +158 -0
- data/lib/parcels.rb +21 -0
- data/parcels.gemspec +48 -0
- data/spec/helpers/content_in_helpers.rb +21 -0
- data/spec/helpers/file_structure_helpers.rb +79 -0
- data/spec/helpers/global_helper.rb +34 -0
- data/spec/helpers/new_asset_helpers.rb +31 -0
- data/spec/helpers/new_rails_helpers.rb +31 -0
- data/spec/helpers/parcels_rails_helpers.rb +20 -0
- data/spec/helpers/per_example_helpers.rb +15 -0
- data/spec/helpers/sprockets_helpers.rb +23 -0
- data/spec/lib/spec/expected/base_expected_asset.rb +35 -0
- data/spec/lib/spec/expected/expected_asset.rb +135 -0
- data/spec/lib/spec/expected/expected_asset_set.rb +45 -0
- data/spec/lib/spec/expected/must_not_be_present_asset.rb +17 -0
- data/spec/lib/spec/fixtures/file_set.rb +80 -0
- data/spec/lib/spec/fixtures/widget_base.rb +13 -0
- data/spec/lib/spec/fixtures/widget_file.rb +108 -0
- data/spec/lib/spec/parsing/compiled_asset.rb +94 -0
- data/spec/lib/spec/parsing/compiled_asset_fragment.rb +38 -0
- data/spec/lib/spec/parsing/parsed_css_asset.rb +34 -0
- data/spec/lib/spec/parsing/precompiled_rails_asset.rb +52 -0
- data/spec/lib/spec/parsing/rails_asset.rb +30 -0
- data/spec/lib/spec/parsing/sprockets_asset.rb +40 -0
- data/spec/rails/basic_rails_spec.rb +102 -0
- data/spec/rails/compression_rails_spec.rb +11 -0
- data/spec/rails/development_mode_rails_spec.rb +321 -0
- data/spec/rails/sass_rails_spec.rb +125 -0
- data/spec/rails/sets_rails_spec.rb +85 -0
- data/spec/rails/templates/base/app/assets/stylesheets/application.css +16 -0
- data/spec/rails/templates/base/app/views/widgets/base.rb +4 -0
- data/spec/rails/templates/base/config/environments/production.rb +92 -0
- data/spec/rails/templates/base/lib/null_compressor.rb +5 -0
- data/spec/rails/templates/basic_rails_spec/app/controllers/basic_rails_spec_controller.rb +21 -0
- data/spec/rails/templates/basic_rails_spec/app/views/basic_rails_spec/alongside_and_inline.pcss +1 -0
- data/spec/rails/templates/basic_rails_spec/app/views/basic_rails_spec/alongside_and_inline.rb +9 -0
- data/spec/rails/templates/basic_rails_spec/app/views/basic_rails_spec/alongside_and_inline_html.html.pcss +1 -0
- data/spec/rails/templates/basic_rails_spec/app/views/basic_rails_spec/alongside_and_inline_html.html.rb +9 -0
- data/spec/rails/templates/basic_rails_spec/app/views/basic_rails_spec/alongside_erb.pcss +1 -0
- data/spec/rails/templates/basic_rails_spec/app/views/basic_rails_spec/alongside_erb.rb +7 -0
- data/spec/rails/templates/basic_rails_spec/app/views/basic_rails_spec/inline_erb.rb +9 -0
- data/spec/rails/templates/basic_rails_spec/app/views/basic_rails_spec/multiple_engines.pcss +1 -0
- data/spec/rails/templates/basic_rails_spec/app/views/basic_rails_spec/multiple_engines.rb +9 -0
- data/spec/rails/templates/basic_rails_spec/app/views/basic_rails_spec/no_corresponding_widget.pcss +1 -0
- data/spec/rails/templates/basic_rails_spec/app/views/basic_rails_spec/simple_css.rb +9 -0
- data/spec/rails/templates/compression_rails_spec/app/controllers/compression_rails_spec_controller.rb +5 -0
- data/spec/rails/templates/compression_rails_spec/app/views/compression_rails_spec/inline_and_alongside_css.pcss +1 -0
- data/spec/rails/templates/compression_rails_spec/app/views/compression_rails_spec/inline_and_alongside_css.rb +9 -0
- data/spec/rails/templates/compression_rails_spec/config/environments/production.rb +91 -0
- data/spec/rails/templates/development_mode_rails_spec/app/assets/stylesheets/changingone.scss +1 -0
- data/spec/rails/templates/development_mode_rails_spec/app/assets/stylesheets/changingtwo.scss +1 -0
- data/spec/rails/templates/development_mode_rails_spec/app/assets/stylesheets/import_dir/import_dir_ss_1.scss +1 -0
- data/spec/rails/templates/development_mode_rails_spec/app/controllers/development_mode_rails_spec_controller.rb +45 -0
- data/spec/rails/templates/development_mode_rails_spec/app/views/development_mode_rails_spec/adding_alongside_css.rb +5 -0
- data/spec/rails/templates/development_mode_rails_spec/app/views/development_mode_rails_spec/adding_inline_css.rb +7 -0
- data/spec/rails/templates/development_mode_rails_spec/app/views/development_mode_rails_spec/adding_widget.rb +5 -0
- data/spec/rails/templates/development_mode_rails_spec/app/views/development_mode_rails_spec/basic_widget_with_inline_and_alongside_parcels.pcss +3 -0
- data/spec/rails/templates/development_mode_rails_spec/app/views/development_mode_rails_spec/basic_widget_with_inline_and_alongside_parcels.rb +9 -0
- data/spec/rails/templates/development_mode_rails_spec/app/views/development_mode_rails_spec/changing_alongside_css.pcss +1 -0
- data/spec/rails/templates/development_mode_rails_spec/app/views/development_mode_rails_spec/changing_alongside_css.rb +5 -0
- data/spec/rails/templates/development_mode_rails_spec/app/views/development_mode_rails_spec/changing_import_file.pcss +2 -0
- data/spec/rails/templates/development_mode_rails_spec/app/views/development_mode_rails_spec/changing_import_file.rb +10 -0
- data/spec/rails/templates/development_mode_rails_spec/app/views/development_mode_rails_spec/changing_inline_css.rb +9 -0
- data/spec/rails/templates/development_mode_rails_spec/app/views/development_mode_rails_spec/changing_prefix_imported_file.pcss +1 -0
- data/spec/rails/templates/development_mode_rails_spec/app/views/development_mode_rails_spec/changing_prefix_imported_file.rb +7 -0
- data/spec/rails/templates/development_mode_rails_spec/app/views/development_mode_rails_spec/removing_alongside_css.pcss +1 -0
- data/spec/rails/templates/development_mode_rails_spec/app/views/development_mode_rails_spec/removing_alongside_css.rb +5 -0
- data/spec/rails/templates/development_mode_rails_spec/app/views/development_mode_rails_spec/removing_inline_css.rb +7 -0
- data/spec/rails/templates/development_mode_rails_spec/app/views/development_mode_rails_spec/removing_widget.pcss +1 -0
- data/spec/rails/templates/development_mode_rails_spec/app/views/development_mode_rails_spec/removing_widget.rb +9 -0
- data/spec/rails/templates/development_mode_rails_spec/app/views/import_base.rb +5 -0
- data/spec/rails/templates/development_mode_rails_spec/config/environments/development.rb +37 -0
- data/spec/rails/templates/development_mode_rails_spec/vendor/assets/stylesheets/one.scss +1 -0
- data/spec/rails/templates/development_mode_rails_spec/vendor/assets/stylesheets/two.scss +1 -0
- data/spec/rails/templates/sass_rails_spec/app/assets/foobar/the_import_dir_2/id2ss1.scss +1 -0
- data/spec/rails/templates/sass_rails_spec/app/assets/foobar/the_import_dir_2/id2ss2.scss +1 -0
- data/spec/rails/templates/sass_rails_spec/app/assets/foobar/twelve.scss +1 -0
- data/spec/rails/templates/sass_rails_spec/app/assets/foobar/two.scss +1 -0
- data/spec/rails/templates/sass_rails_spec/app/assets/images/quux/foo.png +0 -0
- data/spec/rails/templates/sass_rails_spec/app/assets/stylesheets/eleven.scss +1 -0
- data/spec/rails/templates/sass_rails_spec/app/assets/stylesheets/one.scss +1 -0
- data/spec/rails/templates/sass_rails_spec/app/assets/stylesheets/shared_import_dir/sid1ss1.scss +1 -0
- data/spec/rails/templates/sass_rails_spec/app/assets/stylesheets/shared_import_dir/sid1ss2.scss +1 -0
- data/spec/rails/templates/sass_rails_spec/app/assets/stylesheets/the_import_dir_1/id1ss1.scss +1 -0
- data/spec/rails/templates/sass_rails_spec/app/assets/stylesheets/the_import_dir_1/id1ss2.scss +1 -0
- data/spec/rails/templates/sass_rails_spec/app/controllers/sass_rails_spec_controller.rb +29 -0
- data/spec/rails/templates/sass_rails_spec/app/views/sass_rails_spec/added_asset_path.pcss +2 -0
- data/spec/rails/templates/sass_rails_spec/app/views/sass_rails_spec/added_asset_path.rb +10 -0
- data/spec/rails/templates/sass_rails_spec/app/views/sass_rails_spec/asset_url.pcss +2 -0
- data/spec/rails/templates/sass_rails_spec/app/views/sass_rails_spec/asset_url.rb +17 -0
- data/spec/rails/templates/sass_rails_spec/app/views/sass_rails_spec/default_sass_import.pcss +6 -0
- data/spec/rails/templates/sass_rails_spec/app/views/sass_rails_spec/default_sass_import.rb +14 -0
- data/spec/rails/templates/sass_rails_spec/app/views/sass_rails_spec/import_directory.pcss +3 -0
- data/spec/rails/templates/sass_rails_spec/app/views/sass_rails_spec/import_directory.rb +11 -0
- data/spec/rails/templates/sass_rails_spec/app/views/sass_rails_spec/import_view_relative_directory.pcss +3 -0
- data/spec/rails/templates/sass_rails_spec/app/views/sass_rails_spec/import_view_relative_directory.rb +11 -0
- data/spec/rails/templates/sass_rails_spec/app/views/sass_rails_spec/other_features.pcss +1 -0
- data/spec/rails/templates/sass_rails_spec/app/views/sass_rails_spec/other_features.rb +9 -0
- data/spec/rails/templates/sass_rails_spec/app/views/sass_rails_spec/shared_imports.rb +10 -0
- data/spec/rails/templates/sass_rails_spec/app/views/sass_rails_spec/vr_import_dir_1/vr1ss1.scss +1 -0
- data/spec/rails/templates/sass_rails_spec/app/views/sass_rails_spec/vr_import_dir_1/vr1ss2.scss +1 -0
- data/spec/rails/templates/sass_rails_spec/app/views/sass_rails_spec/vr_import_dir_2/vr2ss1.scss +1 -0
- data/spec/rails/templates/sass_rails_spec/app/views/sass_rails_spec/vr_import_dir_2/vr2ss2.scss +1 -0
- data/spec/rails/templates/sass_rails_spec/app/views/widgets/import_base.rb +5 -0
- data/spec/rails/templates/sass_rails_spec/config/application.rb +25 -0
- data/spec/rails/templates/sass_rails_spec/lib/more_assets/twenty.scss +1 -0
- data/spec/rails/templates/sass_rails_spec/vendor/assets/stylesheets/thirteen.scss +1 -0
- data/spec/rails/templates/sass_rails_spec/vendor/assets/stylesheets/three.scss +1 -0
- data/spec/rails/templates/sets_rails_spec/app/assets/stylesheets/admin.css.scss +1 -0
- data/spec/rails/templates/sets_rails_spec/app/assets/stylesheets/all.css.scss +1 -0
- data/spec/rails/templates/sets_rails_spec/app/assets/stylesheets/normal.css.scss +1 -0
- data/spec/rails/templates/sets_rails_spec/app/controllers/sets_rails_spec_controller.rb +3 -0
- data/spec/rails/templates/sets_rails_spec/app/views/admin/admin_one.pcss +1 -0
- data/spec/rails/templates/sets_rails_spec/app/views/admin/admin_one.rb +3 -0
- data/spec/rails/templates/sets_rails_spec/app/views/admin/admin_two.pcss +1 -0
- data/spec/rails/templates/sets_rails_spec/app/views/admin/admin_two.rb +3 -0
- data/spec/rails/templates/sets_rails_spec/app/views/admin/base.rb +3 -0
- data/spec/rails/templates/sets_rails_spec/app/views/root.rb +9 -0
- data/spec/rails/templates/sets_rails_spec/app/views/sets_base.rb +3 -0
- data/spec/rails/templates/sets_rails_spec/app/views/sets_rails_spec/normal_one.pcss +1 -0
- data/spec/rails/templates/sets_rails_spec/app/views/sets_rails_spec/normal_one.rb +3 -0
- data/spec/rails/templates/sets_rails_spec/app/views/sets_rails_spec/normal_two.pcss +1 -0
- data/spec/rails/templates/sets_rails_spec/app/views/sets_rails_spec/normal_two.rb +3 -0
- data/spec/system/alongside_file_spec.rb +193 -0
- data/spec/system/autogenerated_class_application_spec.rb +240 -0
- data/spec/system/basic_system_spec.rb +75 -0
- data/spec/system/dependency_sorting_spec.rb +48 -0
- data/spec/system/engines_spec.rb +245 -0
- data/spec/system/prefix_spec.rb +108 -0
- data/spec/system/sass_features_spec.rb +109 -0
- data/spec/system/sets_spec.rb +405 -0
- metadata +477 -0
@@ -0,0 +1 @@
|
|
1
|
+
p { background-image: url("foo-<%= 3 * 7 %>"); }
|
@@ -0,0 +1 @@
|
|
1
|
+
div { background-image: url("<#{'%'}= 7 * 3 %>"); }
|
data/spec/rails/templates/basic_rails_spec/app/views/basic_rails_spec/no_corresponding_widget.pcss
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
span { color: green; }
|
@@ -0,0 +1 @@
|
|
1
|
+
div { color: blue; }
|
@@ -0,0 +1,91 @@
|
|
1
|
+
root_dir = File.basename(File.dirname(File.dirname(File.dirname(__FILE__))))
|
2
|
+
module_name = root_dir.camelize
|
3
|
+
app_outer_module = module_name.constantize
|
4
|
+
app_class = app_outer_module.const_get(:Application)
|
5
|
+
|
6
|
+
app_class.configure do
|
7
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
8
|
+
|
9
|
+
# Code is not reloaded between requests.
|
10
|
+
config.cache_classes = true
|
11
|
+
|
12
|
+
# Eager load code on boot. This eager loads most of Rails and
|
13
|
+
# your application in memory, allowing both threaded web servers
|
14
|
+
# and those relying on copy on write to perform better.
|
15
|
+
# Rake tasks automatically ignore this option for performance.
|
16
|
+
config.eager_load = true
|
17
|
+
|
18
|
+
# Full error reports are disabled and caching is turned on.
|
19
|
+
config.consider_all_requests_local = false
|
20
|
+
config.action_controller.perform_caching = true
|
21
|
+
|
22
|
+
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
23
|
+
# Add `rack-cache` to your Gemfile before enabling this.
|
24
|
+
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
|
25
|
+
# config.action_dispatch.rack_cache = true
|
26
|
+
|
27
|
+
# Disable Rails's static asset server (Apache or nginx will already do this).
|
28
|
+
config.serve_static_assets = true
|
29
|
+
|
30
|
+
# Compress JavaScripts and CSS.
|
31
|
+
if ::Rails.version =~ /^4/
|
32
|
+
config.assets.js_compressor = :uglifier
|
33
|
+
config.assets.css_compressor = :sass
|
34
|
+
else
|
35
|
+
config.assets.compress = true
|
36
|
+
end
|
37
|
+
|
38
|
+
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
39
|
+
config.assets.compile = true
|
40
|
+
|
41
|
+
# Generate digests for assets URLs.
|
42
|
+
config.assets.digest = true
|
43
|
+
|
44
|
+
# `config.assets.precompile` has moved to config/initializers/assets.rb
|
45
|
+
|
46
|
+
# Specifies the header that your server uses for sending files.
|
47
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
48
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
49
|
+
|
50
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
51
|
+
# config.force_ssl = true
|
52
|
+
|
53
|
+
# Set to :debug to see everything in the log.
|
54
|
+
config.log_level = :info
|
55
|
+
|
56
|
+
# Prepend all log lines with the following tags.
|
57
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
58
|
+
|
59
|
+
# Use a different logger for distributed setups.
|
60
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
61
|
+
|
62
|
+
# Use a different cache store in production.
|
63
|
+
# config.cache_store = :mem_cache_store
|
64
|
+
|
65
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
66
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
67
|
+
|
68
|
+
# Precompile additional assets.
|
69
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
70
|
+
# config.assets.precompile += %w( search.js )
|
71
|
+
|
72
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
73
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
74
|
+
# config.action_mailer.raise_delivery_errors = false
|
75
|
+
|
76
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
77
|
+
# the I18n.default_locale when a translation cannot be found).
|
78
|
+
config.i18n.fallbacks = true
|
79
|
+
|
80
|
+
# Send deprecation notices to registered listeners.
|
81
|
+
config.active_support.deprecation = :notify
|
82
|
+
|
83
|
+
# Disable automatic flushing of the log to improve performance.
|
84
|
+
# config.autoflush_log = false
|
85
|
+
|
86
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
87
|
+
config.log_formatter = ::Logger::Formatter.new
|
88
|
+
|
89
|
+
# Do not dump schema after migrations.
|
90
|
+
# config.active_record.dump_schema_after_migration = false
|
91
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
$changing1: #123456;
|
@@ -0,0 +1 @@
|
|
1
|
+
$changing2: #234567;
|
@@ -0,0 +1 @@
|
|
1
|
+
$import_dir_color_1: #abcdef;
|
@@ -0,0 +1,45 @@
|
|
1
|
+
class DevelopmentModeRailsSpecController < ApplicationController
|
2
|
+
def basic_widget_with_inline_and_alongside_parcels
|
3
|
+
# nothing here
|
4
|
+
end
|
5
|
+
|
6
|
+
def changing_inline_css
|
7
|
+
# nothing here
|
8
|
+
end
|
9
|
+
|
10
|
+
def changing_alongside_css
|
11
|
+
# nothing here
|
12
|
+
end
|
13
|
+
|
14
|
+
def adding_inline_css
|
15
|
+
# nothing here
|
16
|
+
end
|
17
|
+
|
18
|
+
def removing_inline_css
|
19
|
+
# nothing here
|
20
|
+
end
|
21
|
+
|
22
|
+
def adding_alongside_css
|
23
|
+
# nothing here
|
24
|
+
end
|
25
|
+
|
26
|
+
def removing_alongside_css
|
27
|
+
# nothing here
|
28
|
+
end
|
29
|
+
|
30
|
+
def changing_import_file
|
31
|
+
# nothing here
|
32
|
+
end
|
33
|
+
|
34
|
+
def adding_widget
|
35
|
+
# nothing here
|
36
|
+
end
|
37
|
+
|
38
|
+
def removing_widget
|
39
|
+
# nothing here
|
40
|
+
end
|
41
|
+
|
42
|
+
def changing_prefix_imported_file
|
43
|
+
# nothing here
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
p { color: blue; }
|
@@ -0,0 +1 @@
|
|
1
|
+
div { color: $import_dir_color_1; }
|
@@ -0,0 +1 @@
|
|
1
|
+
p { color: yellow; }
|
@@ -0,0 +1 @@
|
|
1
|
+
div { color: green; }
|
@@ -0,0 +1,37 @@
|
|
1
|
+
root_dir = File.basename(File.dirname(File.dirname(File.dirname(__FILE__))))
|
2
|
+
module_name = root_dir.camelize
|
3
|
+
app_outer_module = module_name.constantize
|
4
|
+
app_class = app_outer_module.const_get(:Application)
|
5
|
+
|
6
|
+
app_class.configure do
|
7
|
+
# Settings specified here will take precedence over those in config/application.rb
|
8
|
+
|
9
|
+
# In the development environment your application's code is reloaded on
|
10
|
+
# every request. This slows down response time but is perfect for development
|
11
|
+
# since you don't have to restart the web server when you make code changes.
|
12
|
+
config.cache_classes = false
|
13
|
+
|
14
|
+
config.assets.enabled = true
|
15
|
+
|
16
|
+
# Log error messages when you accidentally call methods on nil.
|
17
|
+
config.whiny_nils = true
|
18
|
+
|
19
|
+
# Show full error reports and disable caching
|
20
|
+
config.consider_all_requests_local = true
|
21
|
+
config.action_controller.perform_caching = false
|
22
|
+
|
23
|
+
# Don't care if the mailer can't send
|
24
|
+
config.action_mailer.raise_delivery_errors = false
|
25
|
+
|
26
|
+
# Print deprecation notices to the Rails logger
|
27
|
+
config.active_support.deprecation = :log
|
28
|
+
|
29
|
+
# Only use best-standards-support built into browsers
|
30
|
+
config.action_dispatch.best_standards_support = :builtin
|
31
|
+
|
32
|
+
# Do not compress assets
|
33
|
+
config.assets.compress = false
|
34
|
+
|
35
|
+
# Expands the lines which load the assets
|
36
|
+
config.assets.debug = true
|
37
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
$mycolor1: #aabbcc;
|
@@ -0,0 +1 @@
|
|
1
|
+
$mycolor2: #bbccdd;
|
@@ -0,0 +1 @@
|
|
1
|
+
$the_import_dir_2_color_1: #b1b1b1;
|
@@ -0,0 +1 @@
|
|
1
|
+
$the_import_dir_2_color_2: #b2b2b2;
|
@@ -0,0 +1 @@
|
|
1
|
+
$mycolor12: #12abcd;
|
@@ -0,0 +1 @@
|
|
1
|
+
$mycolor2: #0b1c2d;
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
$mycolor11: #11abcd;
|
@@ -0,0 +1 @@
|
|
1
|
+
$mycolor1: #afedcb;
|
data/spec/rails/templates/sass_rails_spec/app/assets/stylesheets/shared_import_dir/sid1ss1.scss
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
$sid1_color1: #a1a1a1;
|
data/spec/rails/templates/sass_rails_spec/app/assets/stylesheets/shared_import_dir/sid1ss2.scss
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
$sid1_color2: #b2b2b2;
|
@@ -0,0 +1 @@
|
|
1
|
+
$the_import_dir_1_color_1: #a1a1a1;
|
@@ -0,0 +1 @@
|
|
1
|
+
$the_import_dir_1_color_2: #a2a2a2;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
class SassRailsSpecController < ApplicationController
|
2
|
+
def default_sass_import
|
3
|
+
# nothing here
|
4
|
+
end
|
5
|
+
|
6
|
+
def added_asset_path
|
7
|
+
# nothing here
|
8
|
+
end
|
9
|
+
|
10
|
+
def other_features
|
11
|
+
# nothing here
|
12
|
+
end
|
13
|
+
|
14
|
+
def import_directory
|
15
|
+
# nothing here
|
16
|
+
end
|
17
|
+
|
18
|
+
def import_view_relative_directory
|
19
|
+
# nothing here
|
20
|
+
end
|
21
|
+
|
22
|
+
def asset_url
|
23
|
+
# nothing here
|
24
|
+
end
|
25
|
+
|
26
|
+
def shared_imports
|
27
|
+
# nothing here
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class Views::SassRailsSpec::AssetUrl < Views::Widgets::Base
|
2
|
+
if ::Rails.version =~ /^3/
|
3
|
+
css %{
|
4
|
+
p { background: url(asset-path('foo/bar.jpg', 'image')); }
|
5
|
+
div { background: asset-url('bar/baz.png', 'image'); }
|
6
|
+
}
|
7
|
+
else
|
8
|
+
css %{
|
9
|
+
p { background: url(asset-path('foo/bar.jpg')); }
|
10
|
+
div { background: asset-url('bar/baz.png'); }
|
11
|
+
}
|
12
|
+
end
|
13
|
+
|
14
|
+
def content
|
15
|
+
text "hello, world"
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class Views::SassRailsSpec::DefaultSassImport < Views::Widgets::Base
|
2
|
+
css %{
|
3
|
+
@import "one";
|
4
|
+
@import "two";
|
5
|
+
@import "three";
|
6
|
+
p { color: $mycolor1; }
|
7
|
+
div { color: $mycolor2; }
|
8
|
+
span { color: $mycolor3; }
|
9
|
+
}
|
10
|
+
|
11
|
+
def content
|
12
|
+
text "hello, world"
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
div { color: #020304 * 2; }
|
data/spec/rails/templates/sass_rails_spec/app/views/sass_rails_spec/vr_import_dir_1/vr1ss1.scss
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
$vr_import_dir_1_color_1: #1a1a1a;
|
data/spec/rails/templates/sass_rails_spec/app/views/sass_rails_spec/vr_import_dir_1/vr1ss2.scss
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
$vr_import_dir_1_color_2: #2a2a2a;
|
data/spec/rails/templates/sass_rails_spec/app/views/sass_rails_spec/vr_import_dir_2/vr2ss1.scss
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
$vr_import_dir_2_color_1: #1b1b1b;
|
data/spec/rails/templates/sass_rails_spec/app/views/sass_rails_spec/vr_import_dir_2/vr2ss2.scss
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
$vr_import_dir_2_color_2: #2b2b2b;
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
# Require the gems listed in Gemfile, including any gems
|
6
|
+
# you've limited to :test, :development, or :production.
|
7
|
+
Bundler.require(*Rails.groups)
|
8
|
+
|
9
|
+
module SassRailsSpec
|
10
|
+
class Application < Rails::Application
|
11
|
+
# Settings in config/environments/* take precedence over those specified here.
|
12
|
+
# Application configuration should go into files in config/initializers
|
13
|
+
# -- all .rb files in that directory are automatically loaded.
|
14
|
+
|
15
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
16
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
17
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
18
|
+
|
19
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
20
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
21
|
+
# config.i18n.default_locale = :de
|
22
|
+
|
23
|
+
config.assets.paths << ::Rails.root.join('lib', 'more_assets')
|
24
|
+
end
|
25
|
+
end
|