svelte-on-rails 0.0.17 → 0.0.18
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/svelte_on_rails/view_helpers.rb +18 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0bdaed0f08472a9dde76f78c8d69f99b1b9cd1422ed75631620e3e60cff5c8ba
|
4
|
+
data.tar.gz: 6dedb73fdb5b1a85bdd6996c7947e9a66ab5e69663e86a5f868d1dfd20dc8115
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 270ba6319f043ac8aa36bf437d338a400aa2b03005d060b93e86c939df638c40688faf57c0758ccc231031ae6da969bc57d9570a04ae649c7f912e3df41a893f
|
7
|
+
data.tar.gz: 272da007dd9136464b1705b47f4d6fc0f1a3ba046ee1299d70442648c3b412b8450cf655d3888b60a4c7a117fa9a4ee63e56b01adc3d0742be7fcd7bcb763432
|
@@ -8,10 +8,12 @@ module SvelteOnRails
|
|
8
8
|
cff = conf.components_folder_full
|
9
9
|
file_path = cff + "#{filename}.svelte"
|
10
10
|
if !File.exist?(file_path)
|
11
|
-
raise file_not_found_messsage(
|
11
|
+
raise file_not_found_messsage(filename)
|
12
12
|
elsif conf.watch_changes? && !SvelteOnRails::RenderServerSide.file_exist_case_sensitive?(cff, filename + '.svelte')
|
13
13
|
# on development environments we check case sensitivity too
|
14
|
-
|
14
|
+
msg = "File found but Upper and lower case letters are incorrect\n" +
|
15
|
+
"(This check is only on development environments when watch_changes is true):\n."
|
16
|
+
raise file_case_sensitive_messsage(filename)
|
15
17
|
end
|
16
18
|
|
17
19
|
# check what to do
|
@@ -74,12 +76,23 @@ module SvelteOnRails
|
|
74
76
|
end
|
75
77
|
end
|
76
78
|
|
77
|
-
def file_not_found_messsage(
|
79
|
+
def file_not_found_messsage(filename)
|
78
80
|
conf = SvelteOnRails::Configuration.instance
|
79
81
|
ff = conf.frontend_folder
|
80
82
|
cf = conf.components_folder
|
81
|
-
"svelte-on-rails gem, view helper #svelte_component\n\
|
82
|
-
"#{
|
83
|
+
"svelte-on-rails gem, view helper #svelte_component\n\nFile not found:\n" +
|
84
|
+
"#{conf.components_folder_full + "#{filename}.svelte"}\n\n" +
|
85
|
+
"Your configurations are:\n\nfrontend_folder: «#{ff}»\ncomponents_folder: «#{cf}»\n.. and the filename attribute for the view helper: «#{filename}»\n"
|
86
|
+
end
|
87
|
+
|
88
|
+
def file_case_sensitive_messsage(filename)
|
89
|
+
conf = SvelteOnRails::Configuration.instance
|
90
|
+
ff = conf.frontend_folder
|
91
|
+
cf = conf.components_folder
|
92
|
+
"svelte-on-rails gem, view helper #svelte_component\n\n" +
|
93
|
+
"File found but Upper and lower case letters are incorrect:\n" +
|
94
|
+
"(This check is only on development environments when watch_changes is true)\n\n" +
|
95
|
+
"#{conf.components_folder_full + "#{filename}.svelte"}\n\n" +
|
83
96
|
"Your configurations are:\nfrontend_folder: «#{ff}»\ncomponents_folder: «#{cf}»\n.. and the filename attribute for the view helper: «#{filename}»\n"
|
84
97
|
end
|
85
98
|
|