Skip to content

Commit

Permalink
Add some color to the success msg like jekyll new (#75)
Browse files Browse the repository at this point in the history
Merge pull request 75
  • Loading branch information
ashmaroli authored and jekyllbot committed Oct 8, 2018
1 parent 2d098d7 commit cca8f90
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/jekyll-compose/file_creator.rb
Expand Up @@ -37,7 +37,7 @@ def write_file
f.puts(file.content)
end

Jekyll.logger.info "New #{file.resource_type} created at #{file_path}."
Jekyll.logger.info "New #{file.resource_type} created at #{file_path.cyan}"
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/draft_spec.rb
Expand Up @@ -27,7 +27,7 @@

it "writes a helpful success message" do
output = capture_stdout { described_class.process(args) }
expect(output).to include("New draft created at _drafts/a-test-post.md.")
expect(output).to include("New draft created at #{"_drafts/a-test-post.md".cyan}")
end

it "errors with no arguments" do
Expand Down
2 changes: 1 addition & 1 deletion spec/page_spec.rb
Expand Up @@ -35,7 +35,7 @@

it "should write a helpful message when successful" do
output = capture_stdout { described_class.process(args) }
expect(output).to include("New page created at #{filename}.")
expect(output).to include("New page created at #{filename.cyan}")
end

it "errors with no arguments" do
Expand Down
2 changes: 1 addition & 1 deletion spec/post_spec.rb
Expand Up @@ -51,7 +51,7 @@

it "should write a helpful message when successful" do
output = capture_stdout { described_class.process(args) }
expect(output).to include("New post created at _posts/#{filename}.")
expect(output).to include("New post created at #{File.join("_posts", filename).cyan}")
end

it "errors with no arguments" do
Expand Down

0 comments on commit cca8f90

Please sign in to comment.