pretty_console_output 0.9.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 74a5edd872d03daf229343ca6008ab5543cc8bfa
4
- data.tar.gz: 6c29be3f7b9f97d834f81a61db6ee11b62beba91
3
+ metadata.gz: 6caf95c7e7dac49fb88fc28b8eca83b28437d114
4
+ data.tar.gz: 92e0bf96c504dfa4bfafc8fc43e31b46d986a162
5
5
  SHA512:
6
- metadata.gz: 940fd39c0b32ec12a3144c24eb685de19d86a6fb03232ce30ca81b8a5d64bb482809d4667f11695a03cdbaaa623eaf7d9b7c8a43fc255d10c855515582167a95
7
- data.tar.gz: b4988801f95fab5d57568c8790f6c48b3308c010c78089bbdab13540cd268276a027765f1ba079023ebb39389ee08bab9cb37b6682325cf5e46ae6211c21a024
6
+ metadata.gz: 598e57947a725b5ee1c8e7df93adb36a0bdb707002f50b126106008121bf99a277519836a5b1d0a5dffc4103f79357e09809ec452c17c0b67b1f994b6acd4948
7
+ data.tar.gz: 528057687cb99acb50b12985eefebe96d5ffeb04d2f87b126cb56faed1c661de4725f21e6df0db18aec75f273d7601f2aa14df710c736a4ef8451a669d820a6a
data/.travis.yml ADDED
@@ -0,0 +1,10 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.0
4
+ - 2.1
5
+ - 2.2
6
+ - 2.3.1
7
+
8
+ branches:
9
+ only:
10
+ - master
data/README.md CHANGED
@@ -2,6 +2,7 @@ Pretty Console Output ( for Ruby 2 / Rails )
2
2
  =================================================
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/pretty_console_output.svg)](https://badge.fury.io/rb/pretty_console_output)
5
+ [![Build Status](https://travis-ci.org/guanting112/pretty_console_output.svg?branch=master)](https://travis-ci.org/guanting112/pretty_console_output)
5
6
  [![Code Climate](https://codeclimate.com/github/guanting112/pretty_console_output/badges/gpa.svg)](https://codeclimate.com/github/guanting112/pretty_console_output)
6
7
 
7
8
  Installation
@@ -22,6 +23,8 @@ gem 'pretty_console_output'
22
23
  Usage
23
24
  --------
24
25
 
26
+ ![usage_output](http://i.imgur.com/NmZh9CR.png)
27
+
25
28
  ```ruby
26
29
  require 'pretty_console_output'
27
30
 
@@ -40,8 +43,6 @@ console.tag "All Done"
40
43
  console.done "OK: " + Time.now.to_s
41
44
  ```
42
45
 
43
- ![usage_output](http://i.imgur.com/pgzrEjV.png)
44
-
45
46
 
46
47
  LICENSE
47
48
  --------
data/Rakefile CHANGED
@@ -1,2 +1,9 @@
1
- require "bundler/gem_tasks"
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
+
2
4
  task :default => :spec
5
+
6
+ Rake::TestTask.new(:spec) do |t|
7
+ t.test_files = FileList['spec/*_spec.rb']
8
+ t.warning = true
9
+ end
@@ -8,41 +8,43 @@ module PrettyConsoleOutput
8
8
  options[:theme] = {} if options[:theme].nil?
9
9
  options[:stdout] = $stdout if options[:stdout].nil?
10
10
 
11
- @color = Color.new(options[:stdout])
12
- @theme = Theme.new(options[:theme])
11
+ @color = Color.new(options[:stdout])
12
+ @theme = Theme.new(options[:theme])
13
+ @stdout = options[:stdout]
13
14
  end
14
15
 
15
16
  def puts(obj)
16
- $stdout.puts obj
17
+ @stdout.puts obj
17
18
  end
18
19
 
19
20
  def info(obj)
20
- icon = @color.colorize(" ☞ ", @theme.info_color)
21
- string = @color.colorize(obj.to_s, @theme.info_color)
21
+ string = obj.to_s
22
22
 
23
- puts "#{icon} #{string}"
23
+ puts @color.colorize("#{string}", @theme.info_color)
24
24
  end
25
25
 
26
26
  def log(obj)
27
- puts " #{@color.colorize(obj.to_s, @theme.log_color)}"
27
+ string = obj.to_s
28
+
29
+ puts @color.colorize(" #{string}", @theme.log_color)
28
30
  end
29
31
 
30
32
  def data(obj)
31
- puts @color.colorize(" #{obj.to_s}".gsub(/\n/, "\n "), @theme.log_color)
33
+ string = obj.to_s
34
+
35
+ puts @color.colorize(" #{string}".gsub(/\n/, "\n "), @theme.log_color)
32
36
  end
33
37
 
34
38
  def error(obj)
35
- icon = @color.colorize(" ✘ ", @theme.error_color)
36
- string = @color.colorize(obj.to_s, @theme.error_color)
39
+ string = obj.to_s
37
40
 
38
- puts "#{icon} #{string}"
41
+ puts @color.colorize("#{string}", @theme.error_color)
39
42
  end
40
43
 
41
44
  def done(obj)
42
- icon = @color.colorize(" √ ", @theme.done_color)
43
- string = @color.colorize(obj.to_s, @theme.done_color)
45
+ string = obj.to_s
44
46
 
45
- puts "#{icon} #{string}"
47
+ puts @color.colorize("#{string}", @theme.done_color)
46
48
  end
47
49
 
48
50
  def tag(obj)
@@ -1,3 +1,3 @@
1
1
  module PrettyConsoleOutput
2
- VERSION = "0.9.0"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -31,6 +31,7 @@ Gem::Specification.new do |spec|
31
31
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
32
32
  spec.require_paths = ["lib"]
33
33
 
34
- spec.add_development_dependency "bundler", "~> 1.13"
34
+ spec.add_development_dependency "bundler", "~> 1.7"
35
35
  spec.add_development_dependency "rake", "~> 10.0"
36
+ spec.add_development_dependency 'minitest', '~> 5.0'
36
37
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pretty_console_output
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guanting Chen
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.13'
19
+ version: '1.7'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.13'
26
+ version: '1.7'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '5.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '5.0'
41
55
  description: Pretty Console Output ( for Ruby 2 / Rails )
42
56
  email:
43
57
  - 'cgt886@gmail.com '
@@ -46,6 +60,7 @@ extensions: []
46
60
  extra_rdoc_files: []
47
61
  files:
48
62
  - ".gitignore"
63
+ - ".travis.yml"
49
64
  - Gemfile
50
65
  - LICENSE.txt
51
66
  - README.md