mindwords 0.5.3 → 0.5.4

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: c0d833b4c7bb6f1226f6c6d5a8489fed1ba6c8d5a2410bbb6df2b61a9285bc4d
4
- data.tar.gz: 0cc6c2b9ac7cb8e829b52ba224d04579ad0fb20eb15b8bcf8c39c2ba365c6a3c
3
+ metadata.gz: 14ea1cb6b906664113ef2137b3cad143b365d37c9eb0612df38a0b9e2cfdfeac
4
+ data.tar.gz: 8d4a298c78f32c500a941699791b1f6b952075c15b67fb088392c8860fb01fa7
5
5
  SHA512:
6
- metadata.gz: 6f2608e84d67e2303cc61a349a50147028b54f6f537aefb92bd0a6bf15dade2d5e418b84f3a9a543d545d0235fb65d171fd106ad24e9b6ca7239ecef131a961e
7
- data.tar.gz: bd98ce9223b9343b1c827946f972f5ac1420c79484bf11e26e60f8fead39f42a4323682ed684fcee5e0cefa1239ffd9c387623fff31e99567d3ec7319ecd7e34
6
+ metadata.gz: 87afa7b5bd0b7f2cf225177259df456021e90155f57d40712042b13a37105bf879fcea494ce0b05f2b53911717dbf3cebaf6a6b9cfff6d7f3fb1056b6d59e945
7
+ data.tar.gz: a1c42b7e6b6de6c12e25b0de57d0ca980b8f9cc6ec1cefd71e1851f4426795285106802e6ae22c9f95539573f72abaf8b1f0432ce9b706cac86962725b73dbc7
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -34,6 +34,10 @@ class MindWords
34
34
 
35
35
  end
36
36
 
37
+ def add(line)
38
+ @lines << line
39
+ end
40
+
37
41
  def breadcrumb()
38
42
  @parent.attributes[:breadcrumb].split(/ +\/ +/) if @parent
39
43
  end
@@ -53,6 +57,8 @@ class MindWords
53
57
 
54
58
  def save(file=@filepath)
55
59
 
60
+ return if @lines.empty?
61
+
56
62
  puts 'before save' if @debug
57
63
  File.write file, to_s()
58
64
 
@@ -140,7 +146,7 @@ class MindWords
140
146
  def to_s(colour: false)
141
147
 
142
148
  header = "<?mindwords?>\n\n"
143
- return header + @lines.join unless colour
149
+ return header + @lines.map(&:chomp).join("\n") unless colour
144
150
 
145
151
  body = @lines.map do |x|
146
152
  title, hashtags = x.split(/(?=#)/,2)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mindwords
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  aWH7D2AmhOpqNwWnPHzWR/yzpigAVTrvpHfRxZleQj6Z/090nIH2KR0RdioMmPFq
36
36
  3+574KQzs/gR9Y5a+iMcvHRN
37
37
  -----END CERTIFICATE-----
38
- date: 2021-01-28 00:00:00.000000000 Z
38
+ date: 2021-01-29 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: line-tree
metadata.gz.sig CHANGED
Binary file