Skip to content

Commit

Permalink
Do not depend on pastel
Browse files Browse the repository at this point in the history
  • Loading branch information
rzane committed Dec 13, 2019
1 parent 3adbc96 commit 4a01afa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
6 changes: 0 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,16 @@ PATH
remote: .
specs:
snapshot_testing (0.2.0)
pastel (~> 0.7)

GEM
remote: https://rubygems.org/
specs:
coderay (1.1.2)
diff-lcs (1.3)
docile (1.3.2)
equatable (0.6.1)
json (2.2.0)
method_source (0.9.2)
minitest (5.11.3)
pastel (0.7.3)
equatable (~> 0.6)
tty-color (~> 0.5)
power_assert (1.1.3)
pry (0.12.2)
coderay (~> 1.1.0)
Expand All @@ -42,7 +37,6 @@ GEM
simplecov-html (0.10.2)
test-unit (3.2.9)
power_assert
tty-color (0.5.0)

PLATFORMS
ruby
Expand Down
9 changes: 7 additions & 2 deletions lib/snapshot_testing/recorder.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require "fileutils"
require "pastel"

module SnapshotTesting
class Recorder
Expand Down Expand Up @@ -65,7 +64,13 @@ def commit
def log(count, status, color)
label = count == 1 ? "snapshot" : "snapshots"
message = "#{count} #{label} #{status}."
warn Pastel.new.public_send(color, message)

case color
when :yellow
warn "\e[33m#{message}\e[0m"
when :green
warn "\e[32m#{message}\e[0m"
end
end

def write(snapshots)
Expand Down
1 change: 0 additions & 1 deletion snapshot_testing.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Gem::Specification.new do |spec|

spec.required_ruby_version = '>= 2.4.0'

spec.add_dependency "pastel", "~> 0.7"
spec.add_development_dependency "bundler", "~> 2.0"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "rspec", "~> 3.0"
Expand Down

0 comments on commit 4a01afa

Please sign in to comment.