lite-component 1.0.10 → 1.0.11

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: f2e349c98dc9b50bbf5c354f02dedb88b628fe1b54bdaa70cf8b2b03526b1c7e
4
- data.tar.gz: c0887f8f7bd44e9b05e98f55fe95a8e6758b671a190a4ad43117223847394d99
3
+ metadata.gz: 6d80713505881c685b68cc3a8a5cb9442bec310351d4225b151f759770c12e5e
4
+ data.tar.gz: 87a603392431946bed13580336860d07a750cac9af35e27a087fc4402b506572
5
5
  SHA512:
6
- metadata.gz: 2d64ba9b39cebe86641897b412eaf51c9ecd13a01b57d63a80dff6f995f26be1e88c73bd14e7b374eb1b99b6f3035e4a592adf21e0d7ece238a2c981bdac8d99
7
- data.tar.gz: be52c6a40ca8f3c23f2b96ec8e60327a6b338c6426d6e78f3d59453f7f2837af39669f7aa5d07f4e8e90f4e9446b14755968babeeb0974359a275551d4d47988
6
+ metadata.gz: a91cf54a2dbeff070e6a671cf59a1006d037666ea3552c8aa4ab68f943fa1e2cbc597399dcf5c959267a729c10abe4f3e5229e18fe8364e4603ca6222c42ad1e
7
+ data.tar.gz: a32a1cf7dad38912c7b54cd80b4dbb4635c2a794216f98395f229045e210e2f2f0d021cde47cf2b856ef6f66ad59d32ed322320308c20a071cec83280b6ebc24
@@ -14,6 +14,8 @@ Layout/EmptyLinesAroundModuleBody:
14
14
  EnforcedStyle: empty_lines_except_namespace
15
15
  Layout/LineLength:
16
16
  Max: 100
17
+ Layout/SpaceAroundMethodCallOperator:
18
+ Enabled: true
17
19
  Lint/RaiseException:
18
20
  Enabled: true
19
21
  Lint/StructNewOverride:
@@ -34,6 +36,8 @@ Style/Documentation:
34
36
  Enabled: false
35
37
  Style/ExpandPathArguments:
36
38
  Enabled: false
39
+ Style/ExponentialNotation:
40
+ Enabled: true
37
41
  Style/HashEachMethods:
38
42
  Enabled: true
39
43
  Style/HashTransformKeys:
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.0.11] - 2020-04-24
10
+ ### Added
11
+ - Added `to_h` and `to_hash` aliases for dumping locals
12
+
9
13
  ## [1.0.10] - 2020-04-06
10
14
  ### Added
11
15
  - Added `render?` method for checking complex logic
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lite-component (1.0.10)
4
+ lite-component (1.0.11)
5
5
  actionview
6
6
 
7
7
  GEM
@@ -51,7 +51,7 @@ GEM
51
51
  nokogiri (1.10.9)
52
52
  mini_portile2 (~> 2.4.0)
53
53
  parallel (1.19.1)
54
- parser (2.7.1.0)
54
+ parser (2.7.1.1)
55
55
  ast (~> 2.4.0)
56
56
  rack (2.2.2)
57
57
  rack-test (1.1.0)
@@ -83,7 +83,7 @@ GEM
83
83
  diff-lcs (>= 1.2.0, < 2.0)
84
84
  rspec-support (~> 3.9.0)
85
85
  rspec-support (3.9.2)
86
- rubocop (0.81.0)
86
+ rubocop (0.82.0)
87
87
  jaro_winkler (~> 1.5.1)
88
88
  parallel (~> 1.10)
89
89
  parser (>= 2.7.0.1)
@@ -121,4 +121,4 @@ DEPENDENCIES
121
121
  rubocop-rspec
122
122
 
123
123
  BUNDLED WITH
124
- 2.0.2
124
+ 2.1.4
data/README.md CHANGED
@@ -160,6 +160,7 @@ end
160
160
  ### Locals
161
161
 
162
162
  All components include access to partial locals via the `locals` or `l` methods.
163
+ You can dump locals to hash via the `to_h` and `to_hash` methods.
163
164
  *Note: Objects will be automatically added to locals when rendering collections.*
164
165
 
165
166
  ```erb
@@ -6,6 +6,9 @@ module Lite
6
6
 
7
7
  attr_reader :locals
8
8
 
9
+ alias to_hash locals
10
+ alias to_h locals
11
+
9
12
  def initialize(locals)
10
13
  @locals = (locals || {}).symbolize_keys
11
14
  end
@@ -3,7 +3,7 @@
3
3
  module Lite
4
4
  module Component
5
5
 
6
- VERSION ||= '1.0.10'
6
+ VERSION ||= '1.0.11'
7
7
 
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lite-component
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.10
4
+ version: 1.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-07 00:00:00.000000000 Z
11
+ date: 2020-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview