pagoda 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,9 +19,9 @@ module Pagoda
19
19
  def display(msg="", newline=true, level=1)
20
20
  indent = build_indent(level)
21
21
  if newline
22
- puts("#{indent}#{msg}".green)
22
+ (running_on_windows?) ? puts("#{indent}#{msg}") : puts("#{indent}#{msg}".green)
23
23
  else
24
- print("#{indent}#{msg}".green)
24
+ (running_on_windows?) ? print("#{indent}#{msg}") : print("#{indent}#{msg}".green)
25
25
  STDOUT.flush
26
26
  end
27
27
  end
@@ -59,7 +59,7 @@ module Pagoda
59
59
  gets.strip
60
60
  end
61
61
 
62
- def confirm(message="Are you sure you wish to continue? (y/n)?".blue, level=1)
62
+ def confirm(message="Are you sure you wish to continue? (y/n)?", level=1)
63
63
  return true if args.include? "-f"
64
64
  case message
65
65
  when Array
@@ -67,14 +67,14 @@ module Pagoda
67
67
  iteration = 0
68
68
  message.each do |m|
69
69
  if iteration == count - 1
70
- display("#{m} ".blue, false, level)
70
+ (running_on_windows?) ? display("#{m} ", false, level) : display("#{m} ".blue, false, level)
71
71
  else
72
- display("#{m} ".blue, true, level)
72
+ (running_on_windows?) ? display("#{m} ", false, level) : display("#{m} ".blue, true, level)
73
73
  end
74
74
  iteration += 1
75
75
  end
76
76
  when String
77
- display("#{message} ".blue, false, level)
77
+ (running_on_windows?) ? display("#{message} ", false, level) : display("#{message} ".blue, false, level)
78
78
  end
79
79
  ask.downcase == 'y'
80
80
  end
@@ -84,12 +84,12 @@ module Pagoda
84
84
  STDERR.puts
85
85
  case msg
86
86
  when Array
87
- STDERR.puts("#{indent}** Error:".red)
87
+ (running_on_windows?) ? STDERR.puts("#{indent}** Error:") : STDERR.puts("#{indent}** Error:".red)
88
88
  msg.each do |m|
89
- STDERR.puts("#{indent}** #{m}".red)
89
+ (running_on_windows?) ? STDERR.puts("#{indent}** #{m}") : STDERR.puts("#{indent}** #{m}".red)
90
90
  end
91
91
  when String
92
- STDERR.puts("#{indent}** Error: #{msg}".red)
92
+ (running_on_windows?) ? STDERR.puts("#{indent}** Error:") : STDERR.puts("#{indent}** Error:".red)
93
93
  end
94
94
  STDERR.puts
95
95
  exit 1 if exit
@@ -1,3 +1,3 @@
1
1
  module Pagoda
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 0
9
- version: 0.3.0
8
+ - 1
9
+ version: 0.3.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - lyon hill