chordpro 1.0.0 → 1.0.1

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: e3edc27bf8140ea8f823be328ea4bbb0445c8043bff80bb7a96282bc1620d6fc
4
- data.tar.gz: c226e03871b162324c61f852b2b19b90abc7e238a2cb4e3bc8526d28b4388093
3
+ metadata.gz: 681c355ddb2b38d1df7753e15752d8c6da61de6091bb2f1b9af9511d8301f73f
4
+ data.tar.gz: fcc40e9214feea9e711016867c932fa16fdb2d62969680e0e575d8aef03ac16e
5
5
  SHA512:
6
- metadata.gz: 5411d453a8a82e400c4b89f4f5f5010d03cb921c426b52957c06d81c3e9bf6129e8f642483bb3274f921232f4cd516cc2d369640479599cea3280b142d5b22a8
7
- data.tar.gz: aaa2e883a32b1942c000d2b8db0654a0078a5822ecdf592123566096bb100a67078ab74e71139dad48c6100909f5e43333562c121e1ba2144ca2f9fd1049d88d
6
+ metadata.gz: 7d57f73191fc02c29442f4745b895ddff7465e428dadf250abc24beb037da039249a74bb08bc5181b3bf78a47a37196f023a29da7dc55284ae089d26af883441
7
+ data.tar.gz: 5466a1ee8e69dcdc394883c7ed54a2d2c022cbf3cd5ca5b154ba78ece8d038ac0319a324628516dd3d703f5db7583e3d15e64db48066773f23dbb92f6a3b75e2
@@ -4,8 +4,10 @@ module Chordpro
4
4
  directive_name = Directive.find(name) || Directive::Name.new(name.to_s)
5
5
  Chordpro::Directive.new(directive_name, value.to_s)
6
6
  end
7
+
7
8
  rule(directive: {name: simple(:name)}) do
8
- Chordpro::Directive.new(name.to_s)
9
+ directive_name = Directive.find(name) || Directive::Name.new(name.to_s)
10
+ Chordpro::Directive.new(directive_name)
9
11
  end
10
12
 
11
13
  rule(linebreak: simple(:x)) { Chordpro::Linebreak.new }
@@ -1,3 +1,3 @@
1
1
  module Chordpro
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -19,11 +19,16 @@ module Chordpro
19
19
  expect(song.metadata[:artist]).to eq(song.metadata["artist"])
20
20
  end
21
21
 
22
- it "returns nil for unknown directive" do
22
+ it "returns nil for unknown directive with value" do
23
23
  song = Chordpro.parse("{foo: bar}")
24
24
  expect(song.metadata["foo"]).to eq(nil)
25
25
  end
26
26
 
27
+ it "returns nil for unknown directive" do
28
+ song = Chordpro.parse("{foo}")
29
+ expect(song.metadata["foo"]).to eq(nil)
30
+ end
31
+
27
32
  it "returns hash with to_h" do
28
33
  expect(song.metadata.to_h).to eq({
29
34
  "title" => "Africa",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chordpro
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Keepers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-06 00:00:00.000000000 Z
11
+ date: 2022-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parslet