steps 1.1.1 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,11 @@
1
+ = 1.1.3
2
+ * fix 1.1.2 breaking the gem build
3
+
4
+ = 1.1.2
5
+ * Add Unit Testing
6
+ * Move away from Jeweler
7
+ * Move to instance providing singleton method for Output class
8
+
1
9
  = 1.1.1
2
10
  * Fix breaking issues with debug mode
3
11
 
data/Gemfile CHANGED
@@ -1,11 +1,3 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem "colored", ">= 1.2"
4
- gem "highline", ">= 1.6"
5
-
6
- group :development do
7
- gem "rspec", "~> 2.11"
8
- gem "bundler", "~> 1.0"
9
- gem "jeweler", "~> 1.8"
10
- gem "simplecov", ">= 0"
11
- end
3
+ gemspec
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # steps
2
2
 
3
+ [![Build Status](https://travis-ci.org/crowdfavorite/gem-steps.png?branch=master,develop)](https://travis-ci.org/crowdfavorite/gem-steps)
4
+
3
5
  ## General
4
6
 
5
7
  A gem that produces simple user feedback in scripting environments.
@@ -12,22 +14,14 @@ Integrates with:
12
14
 
13
15
  ## Installation
14
16
 
15
- ### Github
17
+ gem install steps
16
18
 
17
- Add this to your Gemfile to install and use directly from github.
19
+ ## Usage
18
20
 
19
21
  ```ruby
20
- gem "steps", :git => 'git://github.com/crowdfavorite/gem-steps.git'
22
+ require 'steps'
21
23
  ```
22
24
 
23
- ### RubyGems.org
24
-
25
- This gem is available as 'steps' from rubygems.org
26
-
27
- gem install steps
28
-
29
- ## Usage
30
-
31
25
  To define a "step" in your scripting process simply surround the grouping of operations like this.
32
26
 
33
27
  ```ruby
@@ -147,3 +141,9 @@ If you want to quiet down your Capistrano output and use this to provide the out
147
141
  before "deploy:restart" do start_to "Restart" end
148
142
  after "deploy:restart" do success end
149
143
  ```
144
+
145
+ ### Development
146
+
147
+ rake
148
+ rake install
149
+
data/Rakefile CHANGED
@@ -1,7 +1,12 @@
1
1
  # encoding: utf-8
2
-
3
- require 'rubygems'
4
2
  require 'bundler'
3
+ require "bundler/gem_tasks"
4
+ require 'rake/testtask'
5
+ require 'rake/clean'
6
+
7
+ CLOBBER.include 'pkg/*'
8
+ CLEAN.include 'pkg/*'
9
+
5
10
  begin
6
11
  Bundler.setup(:default, :development)
7
12
  rescue Bundler::BundlerError => e
@@ -9,22 +14,11 @@ rescue Bundler::BundlerError => e
9
14
  $stderr.puts "Run `bundle install` to install missing gems"
10
15
  exit e.status_code
11
16
  end
12
- require 'rake'
13
-
14
- require 'jeweler'
15
- Jeweler::Tasks.new do |gem|
16
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
- gem.name = "steps"
18
- gem.homepage = "http://github.com/crowdfavorite/gem-steps"
19
- gem.license = "Apache 2.0"
20
- gem.summary = %Q{Scripting output helper}
21
- gem.description = <<-EOF.gsub(/^ {4}/, '')
22
- A way to simplify the output of shell scripting written in ruby.
23
17
 
24
- Integrates with Capistrano and Rake tasks.
25
- EOF
26
- gem.authors = ["Crowd Favorite"]
27
- # dependencies defined in Gemfile
18
+ Rake::TestTask.new do |t|
19
+ t.libs.push "lib"
20
+ t.test_files = FileList['specs/*_spec.rb']
21
+ t.verbose = true
28
22
  end
29
- Jeweler::RubygemsDotOrgTasks.new
30
23
 
24
+ task :default => [:test, :clobber, :build]
@@ -0,0 +1,77 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+ require 'steps'
3
+
4
+ report "This is an example of 'steps' output"
5
+
6
+ step "Single Level Task" do
7
+ sleep 1
8
+ end
9
+
10
+ step "Custom Success Message" do
11
+ sleep 1
12
+ "Yay!"
13
+ end
14
+
15
+ step "Task with an error" do
16
+ sleep 1
17
+ raise
18
+ end
19
+
20
+ step "Custom Error Message" do
21
+ sleep 1
22
+ raise "There was a problem"
23
+ end
24
+
25
+ step "Debug Mode", :debug => true do
26
+ sleep 1
27
+ raise "There was a problem"
28
+ end
29
+
30
+ step "Progress Messages" do
31
+ sleep 0.5
32
+ report "Progress 1"
33
+ sleep 0.5
34
+ report "Progress 2"
35
+ true
36
+ end
37
+
38
+ step "User Input" do
39
+ sleep 0.5
40
+ color = retrieve "What is your favorite color?"
41
+ sleep 0.5
42
+ if confirm "Are you sure?"
43
+ report "Favorite color is #{color}"
44
+ else
45
+ report "Favorite color is not #{color}"
46
+ end
47
+ sleep 0.5
48
+ end
49
+
50
+ step "Vital Questions" do
51
+ sleep 0.5
52
+ confirm "This question is vital?", :vital => true
53
+ report "You answered yes."
54
+ sleep 0.5
55
+ end
56
+
57
+ step "Nested Steps" do
58
+ sleep 0.5
59
+ step "Nested Step Level 1" do
60
+ sleep 0.5
61
+ step "Nested Step Level 2" do
62
+ sleep 0.5
63
+ end
64
+ end
65
+ end
66
+
67
+ step "Nested Steps" do
68
+ sleep 0.5
69
+ step "Nested Step Level 1" do
70
+ sleep 0.5
71
+ step "Vital Step Level 2", :vital => true do
72
+ sleep 0.5
73
+ raise "Oooops"
74
+ end
75
+ report "This shouldn't be shown"
76
+ end
77
+ end
@@ -2,34 +2,34 @@
2
2
  require 'steps/output'
3
3
 
4
4
  def step(desc, options={}, &block)
5
- Steps::Output.step(desc, options, &block)
5
+ Steps::Output.singleton.step(desc, options, &block)
6
6
  end
7
7
 
8
8
  def confirm(message, options={})
9
- Steps::Output.confirm(message, options)
9
+ Steps::Output.singleton.confirm(message, options)
10
10
  end
11
11
 
12
12
  def retrieve(message, answer_type = String, &block)
13
- Steps::Output.retrieve(message, answer_type, &block)
13
+ Steps::Output.singleton.retrieve(message, answer_type, &block)
14
14
  end
15
15
 
16
16
  def start_to(message)
17
- Steps::Output.start_to(message)
17
+ Steps::Output.singleton.start_to(message)
18
18
  end
19
19
 
20
20
  def success(message = "✔")
21
- Steps::Output.success(message)
21
+ Steps::Output.singleton.success(message)
22
22
  end
23
23
 
24
24
  def error(message = "X")
25
- Steps::Output.error(message)
25
+ Steps::Output.singleton.error(message)
26
26
  end
27
27
 
28
28
  def error_and_exit(message)
29
- Steps::Output.error_and_exit(message)
29
+ Steps::Output.singleton.error_and_exit(message)
30
30
  end
31
31
 
32
32
  def report(message, color="blue", bold=true)
33
- Steps::Output.report(message, color, bold)
33
+ Steps::Output.singleton.report(message, color, bold)
34
34
  end
35
35
 
@@ -7,13 +7,20 @@ require 'steps/spinner'
7
7
  module Steps
8
8
  class Output
9
9
 
10
- @spinner = Steps::Spinner.new
11
- @task_depth = 0
12
- @stacked_result = false
13
- @highline = HighLine.new
14
- @debug_depth = nil
10
+ @@singleton = nil
11
+ def self.singleton
12
+ @@singleton ||= Output.new
13
+ end
14
+
15
+ def initialize
16
+ @spinner = Steps::Spinner.new
17
+ @task_depth = 0
18
+ @stacked_result = false
19
+ @highline = HighLine.new
20
+ @debug_depth = nil
21
+ end
15
22
 
16
- def self.step(desc, options={}, &block)
23
+ def step(desc, options={}, &block)
17
24
  self.start_to desc
18
25
 
19
26
  # Set debug depth if specified
@@ -48,7 +55,7 @@ module Steps
48
55
  end
49
56
  end
50
57
 
51
- def self.start_to message
58
+ def start_to message
52
59
  lead_str = ""
53
60
  if @spinner.running?
54
61
  @spinner.stop
@@ -69,7 +76,7 @@ module Steps
69
76
  @stacked_result = false
70
77
  end
71
78
 
72
- def self.result message
79
+ def result message
73
80
  @spinner.stop
74
81
 
75
82
  puts message
@@ -85,27 +92,27 @@ module Steps
85
92
  @stacked_result = true
86
93
  end
87
94
 
88
- def self.error message
95
+ def error message
89
96
  if @spinner.running?
90
97
  @spinner.stop
91
98
  end
92
99
  self.result message.red
93
100
  end
94
101
 
95
- def self.error_and_exit message
102
+ def error_and_exit message
96
103
  self.error message
97
104
  exit
98
105
  end
99
106
 
100
- def self.success message
107
+ def success message
101
108
  self.result message.green
102
109
  end
103
110
 
104
- def self.info message
111
+ def info message
105
112
  self.result message.blue
106
113
  end
107
114
 
108
- def self.report message, color, bold = true
115
+ def report message, color, bold = true
109
116
  message = message.to_s # try and make sure we're dealing with a string
110
117
  message.each_line do |line|
111
118
  unless line.empty?
@@ -117,7 +124,7 @@ module Steps
117
124
  end
118
125
  end
119
126
 
120
- def self.confirm(message, options={})
127
+ def confirm(message, options={})
121
128
  message = message + " (y|n) > "
122
129
  message = (options[:vital] ? message.red : message.blue) + " "
123
130
  message = "├── ".yellow + message if @task_depth > 0
@@ -143,7 +150,7 @@ module Steps
143
150
  return result
144
151
  end
145
152
 
146
- def self.retrieve(message, answer_type, &block)
153
+ def retrieve(message, answer_type, &block)
147
154
  message = message + " > "
148
155
  message = message.blue + " "
149
156
  message = "├── ".yellow + message if @task_depth > 0
@@ -13,24 +13,24 @@ module Steps
13
13
  @running
14
14
  end
15
15
 
16
- def start()
17
- if (!@running)
18
- @running = true
19
- @spinner_thread = Thread.new do
20
- while @running do
21
- print @chars.push(@chars.shift).first
22
- sleep(0.1)
23
- print "\b \b"
24
- end
16
+ def start
17
+ return if @running
18
+
19
+ @running = true
20
+ @spinner_thread = Thread.new do
21
+ while @running do
22
+ print @chars.push(@chars.shift).first
23
+ sleep 0.1
24
+ print "\b \b"
25
25
  end
26
26
  end
27
27
  end
28
28
 
29
- def stop()
30
- if @running
31
- @running = false
32
- @spinner_thread.join
33
- end
29
+ def stop
30
+ return unless @running
31
+
32
+ @running = false
33
+ @spinner_thread.join
34
34
  end
35
35
 
36
36
  end
@@ -1,4 +1,4 @@
1
1
  module Steps
2
- VERSION = '1.1.1'
2
+ VERSION = '1.1.3'
3
3
  end
4
4
 
@@ -0,0 +1,114 @@
1
+ require 'minitest/spec'
2
+ require 'minitest/autorun'
3
+ require 'steps/output'
4
+
5
+ describe Steps::Output do
6
+
7
+ after do
8
+ $stdin = STDIN
9
+ end
10
+
11
+ it "should produce a valid singleton" do
12
+ output = Steps::Output.singleton
13
+ output.must_be_same_as Steps::Output.singleton
14
+ output.wont_be_same_as Steps::Output.new
15
+ end
16
+
17
+ it "should continue parent step if nested step is not vital and fails" do
18
+ output = Steps::Output.new
19
+ value = false
20
+ output.step "outer" do
21
+ output.instance_variable_get(:@task_depth).must_equal 1
22
+ output.step "non-vital inner" do
23
+ raise "Ooooops"
24
+ end
25
+ value = true
26
+ end
27
+ value.must_equal true
28
+ end
29
+
30
+ it "should fail parent step if nested step is vital and fails" do
31
+ output = Steps::Output.new
32
+ value = false
33
+ output.step "outer" do
34
+ output.instance_variable_get(:@task_depth).must_equal 1
35
+ output.step "vital inner", :vital => true do
36
+ raise "Ooooops"
37
+ end
38
+ value = true
39
+ end
40
+ value.must_equal false
41
+ end
42
+
43
+ it "should continue parent step if nested step is vital and passes" do
44
+ output = Steps::Output.new
45
+ value = false
46
+ output.step "outer" do
47
+ output.instance_variable_get(:@task_depth).must_equal 1
48
+ output.step "vital inner", :vital => true do
49
+ "Vital Success"
50
+ end
51
+ value = true
52
+ end
53
+ value.must_equal true
54
+ end
55
+
56
+ it "should continue execution of step if negative response to non-vital confirm" do
57
+ $stdin = StringIO.new("n\r\n")
58
+ value = false
59
+ output = Steps::Output.new
60
+ output.step "Non-vital Confirm" do
61
+ output.confirm "This is a regular confirm?"
62
+ value = true
63
+ end
64
+ value.must_equal true
65
+ end
66
+
67
+ it "should continue execution of step if positive response to vital confirm" do
68
+ $stdin = StringIO.new("y\r\n")
69
+ value = false
70
+ output = Steps::Output.new
71
+ output.step "Vital Confirm" do
72
+ output.confirm "This is a vital question?", :vital => true
73
+ value = true
74
+ end
75
+ value.must_equal true
76
+ end
77
+
78
+ it "should stop execution of step if negative response to vital confirm" do
79
+ $stdin = StringIO.new("n\r\n")
80
+ value = false
81
+ output = Steps::Output.new
82
+ output.step "Vital Confirm" do
83
+ output.confirm "This is a vital question?", :vital => true
84
+ value = true
85
+ end
86
+ value.must_equal false
87
+ end
88
+
89
+ it "should increase task_depth with every nested step" do
90
+ output = Steps::Output.new
91
+ output.step "Level 1" do
92
+ output.instance_variable_get(:@task_depth).must_equal 1
93
+ output.step "Level 2" do
94
+ output.instance_variable_get(:@task_depth).must_equal 2
95
+ output.step "Level 3" do
96
+ output.instance_variable_get(:@task_depth).must_equal 3
97
+ end
98
+ end
99
+ end
100
+ end
101
+
102
+ it "should decrease task_depth with every step completion" do
103
+ output = Steps::Output.new
104
+ output.step "Level 1" do
105
+ output.step "Level 2" do
106
+ output.step "Level 3" do
107
+ output.instance_variable_get(:@task_depth).must_equal 3
108
+ end
109
+ output.instance_variable_get(:@task_depth).must_equal 2
110
+ end
111
+ output.instance_variable_get(:@task_depth).must_equal 1
112
+ end
113
+ end
114
+ end
@@ -0,0 +1,26 @@
1
+ require 'minitest/spec'
2
+ require 'minitest/autorun'
3
+ require 'steps/spinner'
4
+
5
+ describe Steps::Spinner do
6
+
7
+ before do
8
+ @spinner = Steps::Spinner.new
9
+ end
10
+
11
+ after do
12
+ @spinner = nil
13
+ end
14
+
15
+ it "should be initialized in a stopped state" do
16
+ @spinner.running?.must_equal false
17
+ end
18
+
19
+ it "reports running? status correctly" do
20
+ @spinner.start
21
+ @spinner.running?.must_equal true
22
+ @spinner.stop
23
+ @spinner.running?.must_equal false
24
+ end
25
+
26
+ end
@@ -1,66 +1,24 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'steps/version'
5
+ require 'date'
5
6
 
6
7
  Gem::Specification.new do |s|
7
- s.name = "steps"
8
- s.version = "1.1.1"
8
+ s.name = "steps"
9
+ s.version = Steps::VERSION
10
+ s.authors = ["Crowd Favorite"]
11
+ s.date = Date.today.to_s
12
+ s.summary = %q{Ruby scripting output helper}
13
+ s.description = %q{A way to simplify the output of shell scripting written in ruby. Integrates with Capistrano and Rake tasks.}
14
+ s.files = Dir['[A-Z]*', 'steps.gemspec', 'lib/**/*', 'example.rb', 'specs/**/*']
15
+ s.homepage = "http://github.com/crowdfavorite/gem-steps"
16
+ s.licenses = ["Apache 2.0"]
17
+ s.required_ruby_version = '>= 1.9.3'
9
18
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Crowd Favorite"]
12
- s.date = "2013-10-06"
13
- s.description = "A way to simplify the output of shell scripting written in ruby.\n\nIntegrates with Capistrano and Rake tasks.\n"
14
- s.extra_rdoc_files = [
15
- "LICENSE.txt",
16
- "README.md"
17
- ]
18
- s.files = [
19
- "CHANGELOG",
20
- "Gemfile",
21
- "Gemfile.lock",
22
- "LICENSE.txt",
23
- "README.md",
24
- "Rakefile",
25
- "VERSION",
26
- "lib/steps.rb",
27
- "lib/steps/output.rb",
28
- "lib/steps/spinner.rb",
29
- "lib/steps/version.rb",
30
- "steps.gemspec",
31
- "test.rb"
32
- ]
33
- s.homepage = "http://github.com/crowdfavorite/gem-steps"
34
- s.licenses = ["Apache 2.0"]
35
- s.require_paths = ["lib"]
36
- s.rubygems_version = "1.8.25"
37
- s.summary = "Scripting output helper"
38
-
39
- if s.respond_to? :specification_version then
40
- s.specification_version = 3
41
-
42
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
43
- s.add_runtime_dependency(%q<colored>, [">= 1.2"])
44
- s.add_runtime_dependency(%q<highline>, [">= 1.6"])
45
- s.add_development_dependency(%q<rspec>, ["~> 2.11"])
46
- s.add_development_dependency(%q<bundler>, ["~> 1.0"])
47
- s.add_development_dependency(%q<jeweler>, ["~> 1.8"])
48
- s.add_development_dependency(%q<simplecov>, [">= 0"])
49
- else
50
- s.add_dependency(%q<colored>, [">= 1.2"])
51
- s.add_dependency(%q<highline>, [">= 1.6"])
52
- s.add_dependency(%q<rspec>, ["~> 2.11"])
53
- s.add_dependency(%q<bundler>, ["~> 1.0"])
54
- s.add_dependency(%q<jeweler>, ["~> 1.8"])
55
- s.add_dependency(%q<simplecov>, [">= 0"])
56
- end
57
- else
58
- s.add_dependency(%q<colored>, [">= 1.2"])
59
- s.add_dependency(%q<highline>, [">= 1.6"])
60
- s.add_dependency(%q<rspec>, ["~> 2.11"])
61
- s.add_dependency(%q<bundler>, ["~> 1.0"])
62
- s.add_dependency(%q<jeweler>, ["~> 1.8"])
63
- s.add_dependency(%q<simplecov>, [">= 0"])
64
- end
19
+ s.add_dependency "colored", ">= 1.2"
20
+ s.add_dependency "highline", ">= 1.6"
21
+ s.add_development_dependency "bundler", "~> 1.3"
22
+ s.add_development_dependency "rake", "~> 10.1.0"
65
23
  end
66
24
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: steps
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-06 00:00:00.000000000 Z
12
+ date: 2013-11-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: colored
@@ -43,22 +43,6 @@ dependencies:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: '1.6'
46
- - !ruby/object:Gem::Dependency
47
- name: rspec
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ~>
52
- - !ruby/object:Gem::Version
53
- version: '2.11'
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ~>
60
- - !ruby/object:Gem::Version
61
- version: '2.11'
62
46
  - !ruby/object:Gem::Dependency
63
47
  name: bundler
64
48
  requirement: !ruby/object:Gem::Requirement
@@ -66,7 +50,7 @@ dependencies:
66
50
  requirements:
67
51
  - - ~>
68
52
  - !ruby/object:Gem::Version
69
- version: '1.0'
53
+ version: '1.3'
70
54
  type: :development
71
55
  prerelease: false
72
56
  version_requirements: !ruby/object:Gem::Requirement
@@ -74,15 +58,15 @@ dependencies:
74
58
  requirements:
75
59
  - - ~>
76
60
  - !ruby/object:Gem::Version
77
- version: '1.0'
61
+ version: '1.3'
78
62
  - !ruby/object:Gem::Dependency
79
- name: jeweler
63
+ name: rake
80
64
  requirement: !ruby/object:Gem::Requirement
81
65
  none: false
82
66
  requirements:
83
67
  - - ~>
84
68
  - !ruby/object:Gem::Version
85
- version: '1.8'
69
+ version: 10.1.0
86
70
  type: :development
87
71
  prerelease: false
88
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -90,49 +74,27 @@ dependencies:
90
74
  requirements:
91
75
  - - ~>
92
76
  - !ruby/object:Gem::Version
93
- version: '1.8'
94
- - !ruby/object:Gem::Dependency
95
- name: simplecov
96
- requirement: !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
- - - ! '>='
100
- - !ruby/object:Gem::Version
101
- version: '0'
102
- type: :development
103
- prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
110
- description: ! 'A way to simplify the output of shell scripting written in ruby.
111
-
112
-
113
- Integrates with Capistrano and Rake tasks.
114
-
115
- '
77
+ version: 10.1.0
78
+ description: A way to simplify the output of shell scripting written in ruby. Integrates
79
+ with Capistrano and Rake tasks.
116
80
  email:
117
81
  executables: []
118
82
  extensions: []
119
- extra_rdoc_files:
120
- - LICENSE.txt
121
- - README.md
83
+ extra_rdoc_files: []
122
84
  files:
123
85
  - CHANGELOG
124
86
  - Gemfile
125
- - Gemfile.lock
126
87
  - LICENSE.txt
127
- - README.md
128
88
  - Rakefile
129
- - VERSION
130
- - lib/steps.rb
89
+ - README.md
90
+ - steps.gemspec
131
91
  - lib/steps/output.rb
132
92
  - lib/steps/spinner.rb
133
93
  - lib/steps/version.rb
134
- - steps.gemspec
135
- - test.rb
94
+ - lib/steps.rb
95
+ - example.rb
96
+ - specs/output_spec.rb
97
+ - specs/spinner_spec.rb
136
98
  homepage: http://github.com/crowdfavorite/gem-steps
137
99
  licenses:
138
100
  - Apache 2.0
@@ -145,7 +107,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
107
  requirements:
146
108
  - - ! '>='
147
109
  - !ruby/object:Gem::Version
148
- version: '0'
110
+ version: 1.9.3
149
111
  required_rubygems_version: !ruby/object:Gem::Requirement
150
112
  none: false
151
113
  requirements:
@@ -157,5 +119,5 @@ rubyforge_project:
157
119
  rubygems_version: 1.8.25
158
120
  signing_key:
159
121
  specification_version: 3
160
- summary: Scripting output helper
122
+ summary: Ruby scripting output helper
161
123
  test_files: []
@@ -1,40 +0,0 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- colored (1.2)
5
- diff-lcs (1.2.4)
6
- git (1.2.5)
7
- highline (1.6.19)
8
- jeweler (1.8.4)
9
- bundler (~> 1.0)
10
- git (>= 1.2.5)
11
- rake
12
- rdoc
13
- json (1.8.0)
14
- multi_json (1.7.7)
15
- rake (10.0.4)
16
- rdoc (4.0.1)
17
- json (~> 1.4)
18
- rspec (2.13.0)
19
- rspec-core (~> 2.13.0)
20
- rspec-expectations (~> 2.13.0)
21
- rspec-mocks (~> 2.13.0)
22
- rspec-core (2.13.1)
23
- rspec-expectations (2.13.0)
24
- diff-lcs (>= 1.1.3, < 2.0)
25
- rspec-mocks (2.13.1)
26
- simplecov (0.7.1)
27
- multi_json (~> 1.0)
28
- simplecov-html (~> 0.7.1)
29
- simplecov-html (0.7.1)
30
-
31
- PLATFORMS
32
- ruby
33
-
34
- DEPENDENCIES
35
- bundler (~> 1.0)
36
- colored (>= 1.2)
37
- highline (>= 1.6)
38
- jeweler (~> 1.8)
39
- rspec (~> 2.11)
40
- simplecov
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 1.1.1
data/test.rb DELETED
@@ -1,57 +0,0 @@
1
- $:.push File.expand_path("../lib", __FILE__)
2
- require 'steps'
3
-
4
- confirm "This is not a vital question, right?"
5
-
6
- step "Update Something" do
7
- sleep 1
8
- end
9
-
10
- confirm "Is this a vital question?", :vital => true
11
-
12
- step "Do Something else" do
13
- confirm "Is this a vital question?", :vital => true
14
- sleep 1
15
- step "Nested Something" do
16
- sleep 1
17
- step "Double! Again" do
18
- report "Something you probably want to know"
19
- sleep 1
20
- end
21
- step "Double! Again", :debug => true do
22
- sleep 1
23
- raise "Problem"
24
- report "Something you probably want to know"
25
- end
26
- step "Double! Nested Something" do
27
- step "Triple (and vital)! Nested Something", :vital => true do
28
- answer = retrieve "What is your favorite color?"
29
- report "this is something important
30
- Another Line
31
- A third line"
32
- report "Something else important"
33
- step "Quad! Nested Something" do
34
- sleep 1
35
- if confirm "Is this a vital question?", :vital => true
36
- step "resolution" do
37
- sleep 1
38
- end
39
- end
40
- end
41
- sleep 1
42
- step "favorite color" do
43
- sleep 1
44
- answer
45
- end
46
- end
47
- step "Another Triple" do
48
- sleep 1
49
- end
50
- sleep 1
51
- end
52
- sleep 1
53
- end
54
-
55
- sleep 1
56
- raise
57
- end