Skip to content

Commit

Permalink
Prepare 0.3.1 release
Browse files Browse the repository at this point in the history
Contains:
Fix: prevent `nil` elements when placing additional element on
     empty articles

Also make version number in specs dynamic
  • Loading branch information
nicolas-fricke committed Nov 29, 2017
1 parent 7f14ceb commit c6a3474
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Changelog

## WIP
- Fix additional element placement on empty articles
## 0.3.1 - 2017/11/29
- **Fix:** prevent `nil` elements when placing additional element on empty articles

## 0.3.0 - 2017/11/21
In this third bigger release we **added support**:
Expand Down
2 changes: 1 addition & 1 deletion lib/article_json/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module ArticleJSON
VERSION = '0.3.0'
VERSION = '0.3.1'
end
6 changes: 4 additions & 2 deletions spec/article_json/article_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
shared_examples_for 'a correctly parsed Hash' do
let(:example_hash) do
{
article_json_version: '0.3.0',
article_json_version: ArticleJSON::VERSION,
content: [
{
type: :paragraph,
Expand All @@ -175,7 +175,9 @@
end

shared_examples_for 'a correctly parsed empty Hash' do
let(:example_hash) { { article_json_version: '0.3.0', content: [] } }
let(:example_hash) do
{ article_json_version: ArticleJSON::VERSION, content: [] }
end
it { should be_a described_class }
it('contains the right content') { expect(subject.elements).to be_empty }
it('is reversible') { expect(subject.to_h).to eq example_hash }
Expand Down
12 changes: 6 additions & 6 deletions spec/article_json/import/google_doc/html/parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
context 'when a text box is not closed' do
let(:html) { File.read('spec/fixtures/google_doc_unclosed_textbox.html') }
let(:json) do
<<-json
<<~JSON
{
"article_json_version": "0.3.0",
"article_json_version": "#{ArticleJSON::VERSION}",
"content": [
{
"type": "text_box",
Expand All @@ -45,17 +45,17 @@
}
]
}
json
JSON
end
it { should eq minified_json }
end

context 'when paragraphs contain no text' do
let(:html) { File.read('spec/fixtures/google_doc_empty_paragraphs.html') }
let(:json) do
<<-json
<<~JSON
{
"article_json_version": "0.3.0",
"article_json_version": "#{ArticleJSON::VERSION}",
"content": [
{
"type": "paragraph",
Expand All @@ -71,7 +71,7 @@
}
]
}
json
JSON
end
it { should eq minified_json }
end
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/reference_document_parsed.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"article_json_version": "0.3.0",
"article_json_version": "0.3.1",
"content": [
{
"type": "paragraph",
Expand Down

0 comments on commit c6a3474

Please sign in to comment.