lono 6.1.2 → 6.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/lono/config_location.rb +1 -6
- data/lib/lono/template/dsl/builder/helpers/core_helper.rb +20 -5
- data/lib/lono/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ef1d674e91dc1454c1da60e22877ce51d26d7c4a3c9a1a2cd8246150116b40c
|
4
|
+
data.tar.gz: 457fddede95499b97a424e67f9ee779b88555b12a6ea190b54c4e79b5d8c6880
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06b21af8dcf2d0ff984a0c83a82c769029965fd03df98dfcbb2950c4bf82a8564c477cc0982e1a10e22868e305f9ebf1e9686efc42058a5d3d52c8ae1da3752d
|
7
|
+
data.tar.gz: e06da40b85427018b179bdd38ff958e027b9953821a915784e67df5b28f5282a92ecca795c94a6f25ae7102f0bf37b23bf58d6e677c651f154d87bce82e62106
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,9 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [6.1.3]
|
7
|
+
- #21 smarter tags helper. use @tags variable if tags called without arguments
|
8
|
+
|
6
9
|
## [6.1.2]
|
7
10
|
- #20 improve param Conditional form with 3rd form
|
8
11
|
|
data/lib/lono/config_location.rb
CHANGED
@@ -73,12 +73,7 @@ module Lono
|
|
73
73
|
def determine_requested
|
74
74
|
# param is usually set from the convention. when set from convention stack name takes higher precedence
|
75
75
|
config_key = @config.singularize.to_sym # param or variable
|
76
|
-
|
77
|
-
if from_convention
|
78
|
-
@options[:stack]
|
79
|
-
else
|
80
|
-
@options[config_key] || @options[:config] || @options[:stack]
|
81
|
-
end
|
76
|
+
@options[config_key] || @options[:config] || @options[:stack]
|
82
77
|
end
|
83
78
|
|
84
79
|
def requested_file(path)
|
@@ -2,13 +2,28 @@ module Lono::Template::Dsl::Builder::Helpers
|
|
2
2
|
module CoreHelper
|
3
3
|
extend Memoist
|
4
4
|
|
5
|
-
def tags(
|
6
|
-
|
7
|
-
|
5
|
+
def tags(list={})
|
6
|
+
casing = list.delete(:casing) || :camelize
|
7
|
+
if list.empty?
|
8
|
+
tag_list(@tags) # when list is empty, we'll use variables
|
9
|
+
else
|
10
|
+
tag_list(list, casing: casing)
|
11
|
+
end
|
8
12
|
end
|
9
13
|
|
10
|
-
def tag_list(
|
11
|
-
|
14
|
+
def tag_list(list, casing: :camelize)
|
15
|
+
raise "tags list cannot be empty" if list == nil
|
16
|
+
|
17
|
+
if list.is_a?(Array)
|
18
|
+
hash = list.inject({}) do |h,i|
|
19
|
+
i.symbolize_keys!
|
20
|
+
h[i[:Key]] = i[:Value]
|
21
|
+
h
|
22
|
+
end
|
23
|
+
return tag_list(hash) # recursive call tag_list to normalized the argument with a Hash
|
24
|
+
end
|
25
|
+
|
26
|
+
list.map do |k,v|
|
12
27
|
k = k.to_s
|
13
28
|
k = case casing
|
14
29
|
when :camelize
|
data/lib/lono/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lono
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.1.
|
4
|
+
version: 6.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|