actionview-component 1.3.2 → 1.3.3
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/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/actionview-component.gemspec +1 -1
- data/lib/action_view/component/base.rb +4 -4
- 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: 31181269a68b440c741ff9665ef8cb4df10c7e55bb2b0253423e19ffa96807ab
|
|
4
|
+
data.tar.gz: e851b3a851e95328c969539bad6f02a35311828d5037ea16d21d775651ddf500
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eb1cca60238b879c6452688b59ebce47e436493f7b9031871c3099cbcb876f57cd37c020cff59ce09b70ba821d6e1f075c97739753525158acb7d7caa0e5c279
|
|
7
|
+
data.tar.gz: 0341cf5c599e0453ec78ce7f5131411a55dd73253db7b78019a136899d84bbab01d153c0157038d71d484646617bd26e81bf6caae8ab691e1c11f983e533ae99
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -6,7 +6,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |spec|
|
|
8
8
|
spec.name = "actionview-component"
|
|
9
|
-
spec.version = "1.3.
|
|
9
|
+
spec.version = "1.3.3"
|
|
10
10
|
spec.authors = ["GitHub Open Source"]
|
|
11
11
|
spec.email = ["opensource+actionview-component@github.com"]
|
|
12
12
|
|
|
@@ -117,19 +117,19 @@ module ActionView
|
|
|
117
117
|
|
|
118
118
|
filename = self.instance_method(:initialize).source_location[0]
|
|
119
119
|
filename_without_extension = filename[0..-(File.extname(filename).length + 1)]
|
|
120
|
-
|
|
120
|
+
sibling_template_files = Dir["#{filename_without_extension}.????.{#{ActionView::Template.template_handler_extensions.join(',')}}"] - [filename]
|
|
121
121
|
|
|
122
|
-
if
|
|
122
|
+
if sibling_template_files.length > 1
|
|
123
123
|
raise StandardError.new("More than one template found for #{self}. There can only be one sidecar template file per component.")
|
|
124
124
|
end
|
|
125
125
|
|
|
126
|
-
if
|
|
126
|
+
if sibling_template_files.length == 0
|
|
127
127
|
raise NotImplementedError.new(
|
|
128
128
|
"Could not find a template file for #{self}."
|
|
129
129
|
)
|
|
130
130
|
end
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
sibling_template_files[0]
|
|
133
133
|
end
|
|
134
134
|
end
|
|
135
135
|
|