howzit 2.1.5 → 2.1.7

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: 1299678fe342467585d3ced3e03840c89964312c17e865beb77bbeb10fd84d5c
4
- data.tar.gz: 247e0c2819675d4da66c07e7d80af7cfdcb3a1be461a1fea4df901ca0b924bbc
3
+ metadata.gz: 4b0f59c8e5d03f4b8b3fab87cddfe014db34369fc74063e59de098f8abcc38b0
4
+ data.tar.gz: 0c8806ab4ef01df61c6559ca40d07c810637cdaa9712f0c4c44f11629fb609a9
5
5
  SHA512:
6
- metadata.gz: 676fc60b51f92daa8fa61c10ca1d3029e1ac310da7c9dfb9563e40cf090572ccb97cef1384fc2fd7a7e6ef93bd113f6a677d4d61f60ddebf706a9983a0cebafc
7
- data.tar.gz: 3c2e3820b771428413019e68510e50eb7ee3423af04c5540974825c0f18a07844af4eb72a1b3a83818195ce0085b5135b6f21cb6b44621da244afb54e2f98843
6
+ metadata.gz: 655eab2823e223e939d43c25191890a1297a63b37f7132dd869ff819e53e763c14915df8bc670af5066dee2ea88cd1da99a6350830a563058092b058777a8285
7
+ data.tar.gz: 69775ac58ea7d2c387fd3316c0c31b5d368de6a783ccad65d5124eee2c704fd85c4532c7e5a7046c2ce188c4d3df9b59cb7e4aedb27d98f92768a35ecf81e51c
@@ -0,0 +1,2 @@
1
+ github: [ttscoff]
2
+ custom: ['https://brettterpstra.com/support/', 'https://brettterpstra.com/donate/']
data/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ### 2.1.7
2
+
3
+ 2023-05-29 12:59
4
+
5
+ #### FIXED
6
+
7
+ - Handle variable replacements on lines containing colons outside of variable
8
+
9
+ ### 2.1.6
10
+
11
+ 2023-05-29 12:42
12
+
13
+ #### FIXED
14
+
15
+ - Remove empty undefined variables with no default
16
+
1
17
  ### 2.1.5
2
18
 
3
19
  2023-04-12 15:13
data/lib/howzit/config.rb CHANGED
@@ -212,7 +212,7 @@ module Howzit
212
212
  end
213
213
 
214
214
  ##
215
- ## Create a new config file (and directory if needed)
215
+ ## Create a new theme file (and directory if needed)
216
216
  ##
217
217
  ## @param default [Hash] default configuration to write
218
218
  ##
@@ -223,7 +223,11 @@ module Howzit
223
223
  gsub!(/\[%#{k}(:.*?)?\]/, v)
224
224
  end
225
225
 
226
- gsub(/\[%(.*?):(.*?)\]/, '\2')
226
+ # Replace empty variables with default
227
+ gsub!(/\[%([^\]]+?):(.*?)\]/, '\2')
228
+
229
+ # Remove remaining empty variables
230
+ gsub(/\[%.*?\]/, '')
227
231
  end
228
232
 
229
233
  ##
@@ -3,5 +3,5 @@
3
3
  # Primary module for this gem.
4
4
  module Howzit
5
5
  # Current Howzit version.
6
- VERSION = '2.1.5'
6
+ VERSION = '2.1.7'
7
7
  end
data/spec/spec_helper.rb CHANGED
@@ -28,6 +28,8 @@ end
28
28
 
29
29
  def save_buildnote
30
30
  note = <<~EONOTE
31
+ defined: this is defined
32
+
31
33
  # Howzit Test
32
34
 
33
35
  ## Topic Balogna
@@ -39,6 +41,11 @@ def save_buildnote
39
41
  @run(ls -1 &> /dev/null) Null Output
40
42
  @include(Topic Tropic)
41
43
 
44
+ ```run
45
+ #!/usr/bin/env ruby
46
+ title = "[%undefined]".empty? ? "[%defined]" : "[%undefined]"
47
+ ```
48
+
42
49
  @after
43
50
  This should be a postrequisite.
44
51
  @end
@@ -49,6 +56,8 @@ def save_buildnote
49
56
 
50
57
  - It has a list in it
51
58
  - That's pretty fun, right?
59
+ - Defined: '[%defined]'
60
+ - Undefined: '[%undefined]'
52
61
 
53
62
  ## Topic Tropic
54
63
 
data/spec/topic_spec.rb CHANGED
@@ -30,8 +30,8 @@ describe Howzit::Topic do
30
30
  end
31
31
 
32
32
  describe '.tasks' do
33
- it 'has 2 tasks' do
34
- expect(topic.tasks.count).to eq 2
33
+ it 'has 3 tasks' do
34
+ expect(topic.tasks.count).to eq 3
35
35
  end
36
36
  end
37
37
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: howzit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.5
4
+ version: 2.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-12 00:00:00.000000000 Z
11
+ date: 2023-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -291,6 +291,7 @@ extensions: []
291
291
  extra_rdoc_files: []
292
292
  files:
293
293
  - ".editorconfig"
294
+ - ".github/FUNDING.yml"
294
295
  - ".gitignore"
295
296
  - ".howzit.taskpaper.bak"
296
297
  - ".rspec"