Skip to content

Commit

Permalink
Merge pull request #60 from chrisbloom7/parslet-dependency-bump
Browse files Browse the repository at this point in the history
Parslet dependency bump
  • Loading branch information
jm authored Jun 9, 2020
2 parents c4d2f56 + 6369b97 commit 91daa06
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions test/test_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,23 @@ def setup
"date" => DateTime.now,
"nil" => nil
}

end

def test_generator
doc = @doc.clone
body = TOML::Generator.new(doc).body

doc_parsed = TOML::Parser.new(body).parsed

# removing the nil value
remove_nil = doc.delete "nil"
remove_nil_table = doc["key"].delete "nil_table"

# Extracting dates since Ruby's DateTime equality testing sucks.
original_date = doc.delete "date"
parsed_date = doc_parsed.delete "date"
assert_equal original_date.to_time.to_s, parsed_date.to_time.to_s
assert_equal original_date.to_time.utc.to_s, parsed_date.to_time.utc.to_s

refute doc_parsed.length > doc.length, "Parsed doc has more items than we started with."
doc.each do |key, val|
Expand Down
2 changes: 1 addition & 1 deletion toml.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Gem::Specification.new do |s|
s.rdoc_options = ["--charset=UTF-8"]
s.extra_rdoc_files = %w[README.md LICENSE CHANGELOG.md]

s.add_dependency "parslet", "~> 1.8.0"
s.add_dependency "parslet", ">= 1.8.0", "< 3.0.0"

s.add_development_dependency "rake"

Expand Down

0 comments on commit 91daa06

Please sign in to comment.