shell-utils 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/lib/progress.rb +12 -0
  2. data/spec/progress_spec.rb +16 -0
  3. metadata +4 -2
data/lib/progress.rb ADDED
@@ -0,0 +1,12 @@
1
+ class Progress
2
+
3
+ def self.next
4
+ STDOUT.print "."
5
+ STDOUT.flush
6
+ end
7
+
8
+ def self.end
9
+ STDOUT.puts
10
+ end
11
+ end
12
+
@@ -0,0 +1,16 @@
1
+ require 'progress'
2
+
3
+ describe Progress do
4
+
5
+ it 'should print dots and flush in next' do
6
+ STDOUT.should_receive(:print).with(".")
7
+ STDOUT.should_receive(:flush)
8
+ Progress.next
9
+ end
10
+
11
+ it 'should print empty line in end' do
12
+ STDOUT.should_receive(:puts)
13
+ Progress.end
14
+ end
15
+
16
+ end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - CodersDojo-Team
@@ -41,6 +41,7 @@ extra_rdoc_files: []
41
41
 
42
42
  files:
43
43
  - lib/filename.rb
44
+ - lib/progress.rb
44
45
  - lib/session_zipper.rb
45
46
  - lib/shell_argument_exception.rb
46
47
  - lib/shell_process.rb
@@ -79,4 +80,5 @@ specification_version: 3
79
80
  summary: Shell Utilities
80
81
  test_files:
81
82
  - spec/filename_spec.rb
83
+ - spec/progress_spec.rb
82
84
  - spec/shell_wrapper_spec.rb