view_component 2.2.0 → 2.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '038805cb5a61ac698697344495e23064c227e169079586e1412f43aee0a7abde'
4
- data.tar.gz: bb53f4c2407eec96e618aba01f4f35cfa564bfc8738c709af434c16a412457d8
3
+ metadata.gz: a0dcab293971e6a9548226ecf4120a35eae4ea32765bef59b3cc2d8dd92d376f
4
+ data.tar.gz: 803b0167794db25dcb023e93dfdfcbd2af3d9442b94885abaf88d66d436986a8
5
5
  SHA512:
6
- metadata.gz: 7adf9a57806404434ad35b23d4df069dfe2a346cb35945e9103b16197e0f86c2b994d1470334c324ee38365781f5be5742a1e42369309a5d29a15f5f3e8b01c8
7
- data.tar.gz: ce7cb220863df4567a97f472fa576fdd96b045aa7ef507c456c69616270195448204a0a6cf01889d177b7430a7fc4f59486af74ad85463927e20427bde3ad996
6
+ metadata.gz: d643fb3348dfcc799eabd1f066a46530df1181f0e868ce10eaa32112c48929132cd0069460a8f986d15094a1e6b74767ff41361acc01f78d6c31bf25599d40eb
7
+ data.tar.gz: 9c897a455c1fd51d887e0c0de9648a5b98e2cbabe4d70b1d37f06944ba31fcaba6def9a13b3ffdc81ef65118f5927fd03f3703f6bef99bb4830fbb1a89ff2ab5
@@ -1,5 +1,11 @@
1
1
  # master
2
2
 
3
+ # v2.2.1
4
+
5
+ * Fix bug where template could not be found if `inherited` was redefined.
6
+
7
+ *Joel Hawksley*
8
+
3
9
  # v2.2.0
4
10
 
5
11
  * Add support for `config.action_view.annotate_template_file_names` (coming in Rails 6.1).
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- view_component (2.2.0)
4
+ view_component (2.2.1)
5
5
  capybara (~> 3)
6
6
 
7
7
  GEM
@@ -148,7 +148,10 @@ module ViewComponent
148
148
  child.include Rails.application.routes.url_helpers unless child < Rails.application.routes.url_helpers
149
149
  end
150
150
 
151
- child.source_location = caller_locations(1, 1)[0].absolute_path
151
+ # Derive the source location of the component Ruby file from the call stack.
152
+ # We need to ignore `inherited` frames here as they indicate that `inherited`
153
+ # has been re-defined by the consuming application, likely in ApplicationComponent.
154
+ child.source_location = caller_locations(1, 10).reject { |l| l.label == "inherited" }[0].absolute_path
152
155
 
153
156
  super
154
157
  end
@@ -4,7 +4,7 @@ module ViewComponent
4
4
  module VERSION
5
5
  MAJOR = 2
6
6
  MINOR = 2
7
- PATCH = 0
7
+ PATCH = 1
8
8
 
9
9
  STRING = [MAJOR, MINOR, PATCH].join(".")
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: view_component
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub Open Source
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-31 00:00:00.000000000 Z
11
+ date: 2020-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara