arbre 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9702ea598ff503038115048f407b05a69f1cf441cb061b33ca2586197b6fa6a9
4
- data.tar.gz: 3c5ce4c57dd03b32fe470aad04075d1daa9e7f195fa2bae26e562bc85bd1767b
3
+ metadata.gz: 27066f3cf1264e3ec0cb4e5498c05b706565055fe69fbc25afe98825c90915bd
4
+ data.tar.gz: efe323ea9b3faddac096ca11d796231fd5d0872f8f4e1ffec71c2bbf452a5cd1
5
5
  SHA512:
6
- metadata.gz: fed97f8796827e8d807b8878cee2a55d32c05c1d8d730b49b77ced63fd94ad8aae8812dd8f79f2ee7981ea7a732b60de5bc70b5711d3c3b25ccfc0575eb8ee5f
7
- data.tar.gz: fdc92e7b702113922416fe6b3ac0c4d669d34e8068e176aa87a47d65025bb379c462fad30b17b6a8e1d36e5b76d9434916056b34139611ccdf31ba457651b27f
6
+ metadata.gz: d40b99ace19107c5b2d9089d183cce4b2eebc5229475f1ac8965df1fb6a31412d5dc0787ad618063d966ef4821ce679bd0d77ddf16a38048f13dde26192d3acc
7
+ data.tar.gz: 2346922bcc1c31da78a980ca68f20f7c8335a4fdf14c6cd90e766c23fea5cd70f0ec44aabf3ab989b9ae2f863f3b332c1e351fdb2096b59df56bef656ef324f6
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Master (unreleased)
4
4
 
5
+ ## 1.2.1 [☰](https://github.com/activeadmin/arbre/compare/v1.2.0...v1.2.1)
6
+
7
+ * Revert [#64][] to fix several regressions, at the cost of reintroducing [#46][]. [#121][] by [@deivid-rodriguez][]
8
+
5
9
  ## 1.2.0 [☰](https://github.com/activeadmin/arbre/compare/v1.2.0.rc1...v1.2.0)
6
10
 
7
11
  _No changes_.
@@ -72,11 +76,13 @@ Initial release and extraction from Active Admin
72
76
  [#36]: https://github.com/activeadmin/arbre/issues/36
73
77
  [#39]: https://github.com/activeadmin/arbre/issues/39
74
78
  [#40]: https://github.com/activeadmin/arbre/issues/40
79
+ [#46]: https://github.com/activeadmin/arbre/issues/46
75
80
  [#49]: https://github.com/activeadmin/arbre/issues/49
76
81
  [#59]: https://github.com/activeadmin/arbre/issues/59
77
82
  [#64]: https://github.com/activeadmin/arbre/pull/64
78
83
  [#78]: https://github.com/activeadmin/arbre/pull/78
79
84
  [#110]: https://github.com/activeadmin/arbre/pull/110
85
+ [#121]: https://github.com/activeadmin/arbre/pull/121
80
86
 
81
87
  [@aramvisser]: https://github.com/aramvisser
82
88
  [@LTe]: https://github.com/LTe
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- arbre (1.2.0)
4
+ arbre (1.2.1)
5
5
  activesupport (>= 3.0.0)
6
6
 
7
7
  GEM
@@ -104,8 +104,8 @@ GEM
104
104
  nokogiri (1.10.2-java)
105
105
  octokit (4.13.0)
106
106
  sawyer (~> 0.8.0, >= 0.5.3)
107
- parallel (1.14.0)
108
- parser (2.6.0.0)
107
+ parallel (1.17.0)
108
+ parser (2.6.2.1)
109
109
  ast (~> 2.4.0)
110
110
  pry (0.12.2)
111
111
  coderay (~> 1.1.0)
@@ -169,7 +169,7 @@ GEM
169
169
  rspec-mocks (~> 3.8.0)
170
170
  rspec-support (~> 3.8.0)
171
171
  rspec-support (3.8.0)
172
- rubocop (0.66.0)
172
+ rubocop (0.67.2)
173
173
  jaro_winkler (~> 1.5.1)
174
174
  parallel (~> 1.10)
175
175
  parser (>= 2.5, != 2.5.1.1)
@@ -178,20 +178,11 @@ module Arbre
178
178
  elsif assigns && assigns.has_key?(name)
179
179
  assigns[name]
180
180
  elsif helpers.respond_to?(name)
181
- helper_capture(name, *args, &block)
181
+ helpers.send(name, *args, &block)
182
182
  else
183
183
  super
184
184
  end
185
185
  end
186
186
 
187
- # The helper might have a block that builds Arbre elements
188
- # which will be rendered (#to_s) inside ActionView::Base#capture.
189
- # We do not want such elements added to self, so we push a dummy
190
- # current_arbre_element.
191
- def helper_capture(name, *args, &block)
192
- s = ""
193
- within(Element.new) { s = helpers.send(name, *args, &block) }
194
- s.is_a?(Element) ? s.to_s : s
195
- end
196
187
  end
197
188
  end
@@ -1,21 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
- ActionView::Base.class_eval do
4
- def capture(*args)
5
- value = nil
6
- buffer = with_output_buffer { value = yield(*args) }
7
-
8
- # Override to handle Arbre elements inside helper blocks.
9
- # See https://github.com/rails/rails/issues/17661
10
- # and https://github.com/rails/rails/pull/18024#commitcomment-8975180
11
- value = value.to_s if value.is_a?(Arbre::Element)
12
-
13
- if (string = buffer.presence || value) && string.is_a?(String)
14
- ERB::Util.html_escape string
15
- end
16
- end
17
- end
18
-
19
1
  module Arbre
20
2
  module Rails
21
3
  class TemplateHandler
@@ -1,3 +1,3 @@
1
1
  module Arbre
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
@@ -30,10 +30,6 @@ class TestController < ActionController::Base
30
30
  @my_instance_var = "From Instance Var"
31
31
  render "arbre/page_with_arb_partial_and_assignment"
32
32
  end
33
-
34
- def render_page_with_helpers
35
- render "arbre/page_with_helpers"
36
- end
37
33
  end
38
34
 
39
35
 
@@ -100,15 +96,4 @@ describe TestController, "Rendering with Arbre", type: :request do
100
96
  expect(body).to have_selector("p", text: "Partial: From Instance Var")
101
97
  end
102
98
 
103
- it "should render a page with helpers" do
104
- get "/test/render_page_with_helpers"
105
- expect(response).to be_successful
106
- expect(body).to eq <<~HTML
107
- <span>before h1 link</span>
108
- <h1><a href="/h1_link_path">h1 link text</a></h1>
109
- <span>before link_to block</span>
110
- <a href="/link_path"> <i class=\"link-class\">Link text</i>
111
- </a><span>at end</span>
112
- HTML
113
- end
114
99
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arbre
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Bell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-03 00:00:00.000000000 Z
11
+ date: 2019-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -94,7 +94,6 @@ files:
94
94
  - spec/rails/templates/arbre/page_with_arb_partial_and_assignment.arb
95
95
  - spec/rails/templates/arbre/page_with_assignment.arb
96
96
  - spec/rails/templates/arbre/page_with_erb_partial.arb
97
- - spec/rails/templates/arbre/page_with_helpers.arb
98
97
  - spec/rails/templates/arbre/page_with_partial.arb
99
98
  - spec/rails/templates/arbre/simple_page.arb
100
99
  - spec/rails/templates/erb/_partial.erb
@@ -1,7 +0,0 @@
1
- span { 'before h1 link' }
2
- h1 { link_to('/h1_link_path') { 'h1 link text' } }
3
-
4
- span { 'before link_to block' }
5
- text_node link_to('/link_path') { i("Link text", class: 'link-class') }
6
-
7
- span { 'at end' }