shiny_themes 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/shiny_themes/engine.rb +10 -4
- data/lib/shiny_themes/version.rb +1 -1
- data/test/dummy/app/themes/test_theme/assets/javascripts/test_theme/manifest.css +0 -0
- data/test/dummy/app/themes/test_theme/views/layouts/test_layout.html.erb +1 -0
- data/test/dummy/log/test.log +138 -0
- data/test/dummy/tmp/app/themes/temp_theme/assets/stylesheets/temp_theme/manifest.scss +12 -0
- metadata +5 -3
- data/test/dummy/tmp/app/themes/temp_theme/assets/stylesheets/temp_theme/manifest.css +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e851c3a8ee29422a20857108934e5f1285ba57c
|
4
|
+
data.tar.gz: de792efe07badc21144e8f57c1b57cb8ec3b8ab4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cb5f4c50b1750ecd2f8b74789b6757b56ca46e7bcd7b631360abdc4b2a46d2dc0e1a71b24c80349b3267a9c5c609e9b18d5d1ceef1c80e0ebfa709ce9fa35aa
|
7
|
+
data.tar.gz: 980e4c80483d83b471197ef3fab39c74ce9e99aefd4561d8913bd9b96b05b032f4b0e20ed7e0c69fbc212fb5a2b359794e3e6e0d84120c8f2e9b62cb7f9427a2
|
data/lib/shiny_themes/engine.rb
CHANGED
@@ -36,13 +36,19 @@ module ShinyThemes
|
|
36
36
|
if path =~ /#{app.config.theme.path}/
|
37
37
|
if !%w(.js .css).include?(File.extname(filename))
|
38
38
|
true
|
39
|
-
elsif path =~ /^[^\/]+\/manifest((_|-).+)?\.(js|css|scss|sass)$/ # named or starts with manifest
|
40
|
-
true
|
41
|
-
else
|
42
|
-
false
|
43
39
|
end
|
44
40
|
end
|
45
41
|
end
|
42
|
+
Dir.glob(Rails.root.join(app.config.theme.path, '*', 'assets', 'javascripts', '**', 'manifest*')) do |manifest|
|
43
|
+
path = Pathname(manifest)
|
44
|
+
next if path.directory?
|
45
|
+
|
46
|
+
if %w(.scss .sass').include?(path.extname)
|
47
|
+
app.config.assets.precompile << "#{path.parent.basename}/#{path.basename}.css"
|
48
|
+
else
|
49
|
+
app.config.assets.precompile << "#{path.parent.basename}/#{path}"
|
50
|
+
end
|
51
|
+
end
|
46
52
|
end
|
47
53
|
|
48
54
|
initializer 'shiny_themes.application_controller' do |_|
|
data/lib/shiny_themes/version.rb
CHANGED
File without changes
|
@@ -3,6 +3,7 @@
|
|
3
3
|
<head>
|
4
4
|
<title>Dummy</title>
|
5
5
|
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
6
|
+
<%= stylesheet_link_tag 'test_theme/manifest', media: 'all' %>
|
6
7
|
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
7
8
|
<%= csrf_meta_tags %>
|
8
9
|
</head>
|
data/test/dummy/log/test.log
CHANGED
@@ -11554,3 +11554,141 @@ EngineTest: test_all_themes_asset_stylesheets_directories_added_to_assets_path
|
|
11554
11554
|
-------------------------------------------------------------------------
|
11555
11555
|
EngineTest: test_all_themes_asset_images_directories_added_to_assets_path
|
11556
11556
|
-------------------------------------------------------------------------
|
11557
|
+
-------------------------------------------------------------------
|
11558
|
+
ThemeConfigTest: test_creates_new_theme_config_on_rails_application
|
11559
|
+
-------------------------------------------------------------------
|
11560
|
+
-------------------------------------------------------------
|
11561
|
+
ThemeConfigTest: test_loads_theme_config_from_config_pathname
|
11562
|
+
-------------------------------------------------------------
|
11563
|
+
-------------------------------------------------------
|
11564
|
+
ThemeConfigTest: test_saves_current_config_to_yaml_file
|
11565
|
+
-------------------------------------------------------
|
11566
|
+
------------------------------------------------------
|
11567
|
+
ThemeConfigTest: test_honors_config_value_over_default
|
11568
|
+
------------------------------------------------------
|
11569
|
+
------------------------------------------------------------------------------
|
11570
|
+
EngineTest: test_all_themes_asset_stylesheets_directories_added_to_assets_path
|
11571
|
+
------------------------------------------------------------------------------
|
11572
|
+
----------------------------------------------------------------
|
11573
|
+
EngineTest: test_includes_RendersTheme_in_application_controller
|
11574
|
+
----------------------------------------------------------------
|
11575
|
+
------------------------------------------------------
|
11576
|
+
EngineTest: test_theme_layout_configured_from_yml_file
|
11577
|
+
------------------------------------------------------
|
11578
|
+
-------------------------------------------------------------------------
|
11579
|
+
EngineTest: test_all_themes_asset_images_directories_added_to_assets_path
|
11580
|
+
-------------------------------------------------------------------------
|
11581
|
+
----------------------------------------------
|
11582
|
+
EngineTest: test_default_theme_path_configured
|
11583
|
+
----------------------------------------------
|
11584
|
+
---------------------------------------------------
|
11585
|
+
EngineTest: test_theme_asset_directories_configured
|
11586
|
+
---------------------------------------------------
|
11587
|
+
----------------------------------------------------
|
11588
|
+
EngineTest: test_theme_name_configured_from_yml_file
|
11589
|
+
----------------------------------------------------
|
11590
|
+
------------------------------------------------------------------------------
|
11591
|
+
EngineTest: test_all_themes_asset_javascripts_directories_added_to_assets_path
|
11592
|
+
------------------------------------------------------------------------------
|
11593
|
+
-----------------------------------------------------
|
11594
|
+
EngineTest: test_theme_config_ordered_options_created
|
11595
|
+
-----------------------------------------------------
|
11596
|
+
-------------------------------------------------
|
11597
|
+
ThemeTest: test_theme_is_invalid_without_a_layout
|
11598
|
+
-------------------------------------------------
|
11599
|
+
------------------------------------------------------------------------
|
11600
|
+
ThemeTest: test_theme_is_invalid_without_an_assets/javascripts_directory
|
11601
|
+
------------------------------------------------------------------------
|
11602
|
+
------------------------------------------------------------------------
|
11603
|
+
ThemeTest: test_theme_is_invalid_without_an_assets/stylesheets_directory
|
11604
|
+
------------------------------------------------------------------------
|
11605
|
+
--------------------------------------------------------------------------------
|
11606
|
+
ThemeTest: test_uses_application_for_default_layout_when_config_value_is_missing
|
11607
|
+
--------------------------------------------------------------------------------
|
11608
|
+
----------------------------------------------------------
|
11609
|
+
ThemeTest: test_theme_is_invalid_without_a_views_directory
|
11610
|
+
----------------------------------------------------------
|
11611
|
+
------------------------------------------------------------------------
|
11612
|
+
ThemeTest: test_is_valid_with_name,_layout_and_valid_directory_structure
|
11613
|
+
------------------------------------------------------------------------
|
11614
|
+
---------------------------------------------
|
11615
|
+
ThemeTest: test_theme_is_invalid_without_name
|
11616
|
+
---------------------------------------------
|
11617
|
+
--------------------------------------------------------------------------------
|
11618
|
+
ThemeTest: test_theme_is_invalid_without_a_stylesheets_asset_namespace_directory
|
11619
|
+
--------------------------------------------------------------------------------
|
11620
|
+
-----------------------------------------------------------
|
11621
|
+
ThemeTest: test_uses_theme_configuration_for_default_layout
|
11622
|
+
-----------------------------------------------------------
|
11623
|
+
------------------------------------------------------------
|
11624
|
+
ThemeTest: test_theme_is_invalid_without_an_assets_directory
|
11625
|
+
------------------------------------------------------------
|
11626
|
+
--------------------------------------------------------------------------------
|
11627
|
+
ThemeTest: test_theme_is_invalid_without_a_javascripts_asset_namespace_directory
|
11628
|
+
--------------------------------------------------------------------------------
|
11629
|
+
--------------------------------------------------------
|
11630
|
+
ThemeTest: test_theme_is_invalid_without_any_directories
|
11631
|
+
--------------------------------------------------------
|
11632
|
+
---------------------------------------------------------
|
11633
|
+
ThemeTest: test_uses_theme_configuration_for_default_name
|
11634
|
+
---------------------------------------------------------
|
11635
|
+
---------------------------------------------------------------------------
|
11636
|
+
ThemeTest: test_theme_is_invalid_without_a_images_asset_namespace_directory
|
11637
|
+
---------------------------------------------------------------------------
|
11638
|
+
-------------------------------------------------------------------
|
11639
|
+
ThemeTest: test_theme_is_invalid_without_an_assets/images_directory
|
11640
|
+
-------------------------------------------------------------------
|
11641
|
+
------------------------------------------------------------
|
11642
|
+
InstallGeneratorTest: test_it_copies_the_theme_configuration
|
11643
|
+
------------------------------------------------------------
|
11644
|
+
-------------------------------------------------------
|
11645
|
+
InstallGeneratorTest: test_it_creates_a_theme_directory
|
11646
|
+
-------------------------------------------------------
|
11647
|
+
-----------------------------------------------------------------
|
11648
|
+
ThemeGeneratorTest: test_creates_a_layout_using_the_name_provided
|
11649
|
+
-----------------------------------------------------------------
|
11650
|
+
------------------------------------------------------
|
11651
|
+
ThemeGeneratorTest: test_creates_javascripts_directory
|
11652
|
+
------------------------------------------------------
|
11653
|
+
----------------------------------------------------------------
|
11654
|
+
ThemeGeneratorTest: test_creates_CSS_manifest_when_sass_is_false
|
11655
|
+
----------------------------------------------------------------
|
11656
|
+
-------------------------------------------------
|
11657
|
+
ThemeGeneratorTest: test_creates_images_directory
|
11658
|
+
-------------------------------------------------
|
11659
|
+
------------------------------------------------------
|
11660
|
+
ThemeGeneratorTest: test_creates_stylesheets_directory
|
11661
|
+
------------------------------------------------------
|
11662
|
+
--------------------------------------------
|
11663
|
+
ThemeGeneratorTest: test_creates_JS_manifest
|
11664
|
+
--------------------------------------------
|
11665
|
+
-------------------------------------------------
|
11666
|
+
ThemeGeneratorTest: test_creates_layout_directory
|
11667
|
+
-------------------------------------------------
|
11668
|
+
-------------------------------------------------------------------
|
11669
|
+
ThemeGeneratorTest: test_creates_an_SCSS_manifest_when_sass_is_true
|
11670
|
+
-------------------------------------------------------------------
|
11671
|
+
---------------------------------------------------------------------
|
11672
|
+
ShinyThemes::RendersThemeTest: test_uses_layout_from_controller_theme
|
11673
|
+
---------------------------------------------------------------------
|
11674
|
+
Processing by ShinyThemes::TestController#test as HTML
|
11675
|
+
Rendered app/themes/test_theme/views/shiny_themes/test/test.html.erb within layouts/test_layout (2.0ms)
|
11676
|
+
Completed 200 OK in 441ms (Views: 441.3ms)
|
11677
|
+
---------------------------------------------------------------------------------
|
11678
|
+
ShinyThemes::RendersThemeTest: test_included_controller_has_theme_class_attribute
|
11679
|
+
---------------------------------------------------------------------------------
|
11680
|
+
------------------------------------------------------------------------------------
|
11681
|
+
ShinyThemes::RendersThemeTest: test_prepends_template_views_to_controller_view_paths
|
11682
|
+
------------------------------------------------------------------------------------
|
11683
|
+
Processing by ShinyThemes::TestController#test as HTML
|
11684
|
+
Rendered app/themes/test_theme/views/shiny_themes/test/test.html.erb within layouts/test_layout (0.0ms)
|
11685
|
+
Completed 200 OK in 21ms (Views: 20.7ms)
|
11686
|
+
---------------------------------------------------------------------------------------------
|
11687
|
+
ShinyThemes::RendersThemeTest: test_#update_current_theme_changes_controller_theme_and_layout
|
11688
|
+
---------------------------------------------------------------------------------------------
|
11689
|
+
---------------------------------------------------------------------
|
11690
|
+
ShinyThemes::RendersThemeTest: test_theme_is_created_from_config_file
|
11691
|
+
---------------------------------------------------------------------
|
11692
|
+
--------------------------------------------------------------------------------------
|
11693
|
+
ShinyThemes::RendersThemeTest: test_.renders_theme_changes_controller_theme_and_layout
|
11694
|
+
--------------------------------------------------------------------------------------
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/* manifest stylesheet
|
2
|
+
* Use this to import all stylesheets for your theme. If you want to
|
3
|
+
* import stylesheets in different pages or layouts simply create another
|
4
|
+
* manifest file and begin the name with 'manifest_' or 'manifest-'
|
5
|
+
*
|
6
|
+
* The scss extension uses sass import syntax to import stylesheets. If
|
7
|
+
* you want to use the sprockets require comment syntax create a manifest
|
8
|
+
* file with a .css extension (or rename this one).
|
9
|
+
*/
|
10
|
+
|
11
|
+
/* Require all stylesheets in the current directory*/
|
12
|
+
@import "*/**";
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shiny_themes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- shinylane
|
@@ -52,6 +52,7 @@ files:
|
|
52
52
|
- test/dummy/app/assets/stylesheets/application.css
|
53
53
|
- test/dummy/app/controllers/application_controller.rb
|
54
54
|
- test/dummy/app/helpers/application_helper.rb
|
55
|
+
- test/dummy/app/themes/test_theme/assets/javascripts/test_theme/manifest.css
|
55
56
|
- test/dummy/app/themes/test_theme/views/layouts/test_layout.html.erb
|
56
57
|
- test/dummy/app/themes/test_theme/views/shiny_themes/test/test.html.erb
|
57
58
|
- test/dummy/app/views/layouts/application.html.erb
|
@@ -85,7 +86,7 @@ files:
|
|
85
86
|
- test/dummy/public/500.html
|
86
87
|
- test/dummy/public/favicon.ico
|
87
88
|
- test/dummy/tmp/app/themes/temp_theme/assets/javascripts/temp_theme/manifest.js
|
88
|
-
- test/dummy/tmp/app/themes/temp_theme/assets/stylesheets/temp_theme/manifest.
|
89
|
+
- test/dummy/tmp/app/themes/temp_theme/assets/stylesheets/temp_theme/manifest.scss
|
89
90
|
- test/dummy/tmp/app/themes/temp_theme/views/layouts/temp_layout.html.erb
|
90
91
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/0GZCmn4-aCSaMKzSmrERVVXKeff_3s5E_YQIniNLyFU.cache
|
91
92
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache
|
@@ -140,6 +141,7 @@ test_files:
|
|
140
141
|
- test/dummy/app/assets/stylesheets/application.css
|
141
142
|
- test/dummy/app/controllers/application_controller.rb
|
142
143
|
- test/dummy/app/helpers/application_helper.rb
|
144
|
+
- test/dummy/app/themes/test_theme/assets/javascripts/test_theme/manifest.css
|
143
145
|
- test/dummy/app/themes/test_theme/views/layouts/test_layout.html.erb
|
144
146
|
- test/dummy/app/themes/test_theme/views/shiny_themes/test/test.html.erb
|
145
147
|
- test/dummy/app/views/layouts/application.html.erb
|
@@ -175,7 +177,7 @@ test_files:
|
|
175
177
|
- test/dummy/Rakefile
|
176
178
|
- test/dummy/README.rdoc
|
177
179
|
- test/dummy/tmp/app/themes/temp_theme/assets/javascripts/temp_theme/manifest.js
|
178
|
-
- test/dummy/tmp/app/themes/temp_theme/assets/stylesheets/temp_theme/manifest.
|
180
|
+
- test/dummy/tmp/app/themes/temp_theme/assets/stylesheets/temp_theme/manifest.scss
|
179
181
|
- test/dummy/tmp/app/themes/temp_theme/views/layouts/temp_layout.html.erb
|
180
182
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/0GZCmn4-aCSaMKzSmrERVVXKeff_3s5E_YQIniNLyFU.cache
|
181
183
|
- test/dummy/tmp/cache/assets/sprockets/v3.0/5kh7smnW6FvEzNG5AUBeXWEcyNse5DU58flJBTw9y4s.cache
|
@@ -1,14 +0,0 @@
|
|
1
|
-
/* manifest stylesheet
|
2
|
-
* Use this to import all stylesheets for your theme. If you want to
|
3
|
-
* import stylesheets in different pages or layouts simply create another
|
4
|
-
* manifest file and begin the name with 'manifest_' or 'manifest-'
|
5
|
-
*
|
6
|
-
* The CSS extension manifests will use require comments that sprockets
|
7
|
-
* uses to import stylesheets. Generate a sass theme to use the sass
|
8
|
-
* import syntax.
|
9
|
-
*
|
10
|
-
* Require this stylesheet
|
11
|
-
*=require_self
|
12
|
-
* Require all stylesheets in the current directory
|
13
|
-
*=require_tree .
|
14
|
-
*/
|