Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some color to the success msg like jekyll new #75

Merged
merged 1 commit into from Oct 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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}")
DirtyF marked this conversation as resolved.
Show resolved Hide resolved
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