action_component 0.1.4 → 0.2.0

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: 3fbf8e868dac03a1621fa3ada8a11095af7516d7d93e985584d151d2f87562ad
4
- data.tar.gz: 5db92917abc041b20605b5b86bbaa6551b41c41d32cb8e3db90b398ca56f1007
3
+ metadata.gz: b62740fabb047d12511ea452f934c17219d5f3ad7576cd6b30285b9bb4165931
4
+ data.tar.gz: 325d11efdc3f2a5462647c778b8b67558174e19d5e8bf7b1e0b4d24f6b10c83e
5
5
  SHA512:
6
- metadata.gz: 9bf414f78978581af3dc64abbdc98b58e18e23b61566464fa122aa0c1e435c3ad49e02546241bc4a14c6e1742ebd92ca3a0b61db5f5d4de9eb5f55e69a01b933
7
- data.tar.gz: 133eb974b57d40b56cf9aabaf36d4f9cc810d300c943405e3f59ff0432229eed6860f7f5e38b057e8e2ce483557e9f6e776850c0f2edef8d8df4610f0a7f46b5
6
+ metadata.gz: 4dd0655be2c7ab277216d7eb9faf91b390b5b0a5f9e2541754af5121de6680aba924648419ea5189641ce88ad62fb5867facf0373900750ed012f82ffee478c2
7
+ data.tar.gz: 61a9808b49e1ebff6b3ddb7a1c50f6c53df135190d23de2c5d926bbc264965e2cf2393f74025ea2f35519e7549d7d659ffc4fa48160f198117f13714dc5c3e67
data/Gemfile.lock CHANGED
@@ -9,73 +9,74 @@ PATH
9
9
  GEM
10
10
  remote: http://rubygems.org/
11
11
  specs:
12
- actionpack (6.0.2.1)
13
- actionview (= 6.0.2.1)
14
- activesupport (= 6.0.2.1)
15
- rack (~> 2.0, >= 2.0.8)
12
+ actionpack (6.1.4.1)
13
+ actionview (= 6.1.4.1)
14
+ activesupport (= 6.1.4.1)
15
+ rack (~> 2.0, >= 2.0.9)
16
16
  rack-test (>= 0.6.3)
17
17
  rails-dom-testing (~> 2.0)
18
18
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
19
- actionview (6.0.2.1)
20
- activesupport (= 6.0.2.1)
19
+ actionview (6.1.4.1)
20
+ activesupport (= 6.1.4.1)
21
21
  builder (~> 3.1)
22
22
  erubi (~> 1.4)
23
23
  rails-dom-testing (~> 2.0)
24
24
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
25
- activesupport (6.0.2.1)
25
+ activesupport (6.1.4.1)
26
26
  concurrent-ruby (~> 1.0, >= 1.0.2)
27
- i18n (>= 0.7, < 2)
28
- minitest (~> 5.1)
29
- tzinfo (~> 1.1)
30
- zeitwerk (~> 2.2)
27
+ i18n (>= 1.6, < 2)
28
+ minitest (>= 5.1)
29
+ tzinfo (~> 2.0)
30
+ zeitwerk (~> 2.3)
31
31
  builder (3.2.4)
32
- concurrent-ruby (1.1.5)
33
- crass (1.0.5)
34
- diff-lcs (1.3)
35
- erubi (1.9.0)
36
- i18n (1.8.1)
32
+ concurrent-ruby (1.1.9)
33
+ crass (1.0.6)
34
+ diff-lcs (1.4.4)
35
+ erubi (1.10.0)
36
+ i18n (1.8.10)
37
37
  concurrent-ruby (~> 1.0)
38
- loofah (2.4.0)
38
+ loofah (2.12.0)
39
39
  crass (~> 1.0.2)
40
40
  nokogiri (>= 1.5.9)
41
- method_source (0.9.2)
42
- mini_portile2 (2.4.0)
43
- minitest (5.13.0)
44
- nokogiri (1.10.7)
45
- mini_portile2 (~> 2.4.0)
46
- rack (2.1.0)
41
+ method_source (1.0.0)
42
+ mini_portile2 (2.6.1)
43
+ minitest (5.14.4)
44
+ nokogiri (1.12.4)
45
+ mini_portile2 (~> 2.6.1)
46
+ racc (~> 1.4)
47
+ racc (1.5.2)
48
+ rack (2.2.3)
47
49
  rack-test (1.1.0)
48
50
  rack (>= 1.0, < 3)
49
51
  rails-dom-testing (2.0.3)
50
52
  activesupport (>= 4.2.0)
51
53
  nokogiri (>= 1.6)
52
- rails-html-sanitizer (1.3.0)
54
+ rails-html-sanitizer (1.4.2)
53
55
  loofah (~> 2.3)
54
- railties (6.0.2.1)
55
- actionpack (= 6.0.2.1)
56
- activesupport (= 6.0.2.1)
56
+ railties (6.1.4.1)
57
+ actionpack (= 6.1.4.1)
58
+ activesupport (= 6.1.4.1)
57
59
  method_source
58
- rake (>= 0.8.7)
59
- thor (>= 0.20.3, < 2.0)
60
- rake (13.0.1)
61
- rspec (3.9.0)
62
- rspec-core (~> 3.9.0)
63
- rspec-expectations (~> 3.9.0)
64
- rspec-mocks (~> 3.9.0)
65
- rspec-core (3.9.1)
66
- rspec-support (~> 3.9.1)
67
- rspec-expectations (3.9.0)
60
+ rake (>= 0.13)
61
+ thor (~> 1.0)
62
+ rake (13.0.6)
63
+ rspec (3.10.0)
64
+ rspec-core (~> 3.10.0)
65
+ rspec-expectations (~> 3.10.0)
66
+ rspec-mocks (~> 3.10.0)
67
+ rspec-core (3.10.1)
68
+ rspec-support (~> 3.10.0)
69
+ rspec-expectations (3.10.1)
68
70
  diff-lcs (>= 1.2.0, < 2.0)
69
- rspec-support (~> 3.9.0)
70
- rspec-mocks (3.9.1)
71
+ rspec-support (~> 3.10.0)
72
+ rspec-mocks (3.10.2)
71
73
  diff-lcs (>= 1.2.0, < 2.0)
72
- rspec-support (~> 3.9.0)
73
- rspec-support (3.9.2)
74
- thor (1.0.1)
75
- thread_safe (0.3.6)
76
- tzinfo (1.2.6)
77
- thread_safe (~> 0.1)
78
- zeitwerk (2.2.2)
74
+ rspec-support (~> 3.10.0)
75
+ rspec-support (3.10.2)
76
+ thor (1.1.0)
77
+ tzinfo (2.0.4)
78
+ concurrent-ruby (~> 1.0)
79
+ zeitwerk (2.4.2)
79
80
 
80
81
  PLATFORMS
81
82
  ruby
@@ -85,4 +86,4 @@ DEPENDENCIES
85
86
  rspec (~> 3.5)
86
87
 
87
88
  BUNDLED WITH
88
- 1.17.3
89
+ 2.2.17
@@ -50,8 +50,9 @@ module ActionComponent
50
50
  end
51
51
  end
52
52
 
53
- def text(content)
54
- @_view.concat content
53
+ def text(content = nil, &block)
54
+ @_view.concat content if content
55
+ @_view.concat block.call if block
55
56
  nil
56
57
  end
57
58
 
@@ -1,3 +1,3 @@
1
1
  module ActionComponent
2
- VERSION = "0.1.4"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -49,6 +49,10 @@ RSpec.describe ActionComponent::Base do
49
49
 
50
50
  text "!"
51
51
 
52
+ text do
53
+ "block return"
54
+ end
55
+
52
56
  render "some_view"
53
57
 
54
58
  component AuthorComponent, author: @post.author
@@ -77,6 +81,7 @@ RSpec.describe ActionComponent::Base do
77
81
  [:content_tag, "div", "28 November 2016 11:09", {:class=>"datetime"}],
78
82
  [:concat, "content_tag [\"div\", \"28 November 2016 11:09\", {:class=>\"datetime\"}]"],
79
83
  [:concat, "!"],
84
+ [:concat, "block return"],
80
85
  [:render, "some_view"],
81
86
  [:concat, "render [\"some_view\"]"],
82
87
  [:content_tag, "div", "Roger Nesbitt", nil],
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_component
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roger Nesbitt
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-10 00:00:00.000000000 Z
11
+ date: 2021-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -119,7 +119,7 @@ homepage: https://github.com/mogest/action_component
119
119
  licenses:
120
120
  - MIT
121
121
  metadata: {}
122
- post_install_message:
122
+ post_install_message:
123
123
  rdoc_options: []
124
124
  require_paths:
125
125
  - lib
@@ -134,9 +134,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
134
  - !ruby/object:Gem::Version
135
135
  version: '0'
136
136
  requirements: []
137
- rubyforge_project:
138
- rubygems_version: 2.7.6
139
- signing_key:
137
+ rubygems_version: 3.1.6
138
+ signing_key:
140
139
  specification_version: 4
141
140
  summary: React-style components for Rails
142
141
  test_files: