interactive 0.3.0 → 0.4.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d9dcea125c70a876fcb818733193c9d9554a4455
4
- data.tar.gz: f992006a8ae904ccf96f52bd227892edccabef92
3
+ metadata.gz: fc90b251376282f7c2fbab5ef3fc94ad4547ecf3
4
+ data.tar.gz: c8b1d933341201dbb9edeb0caf733b436f933ba9
5
5
  SHA512:
6
- metadata.gz: 95ce90bea80d01932067744d6dbd7c7581ba971a4736968b4562361124cce93fa5a2e70f3004ece8bb98d61c94c0b8218f9be6dfe2d1df25e3da78f00ceeaf73
7
- data.tar.gz: f50ec4bc741764e1a8eb07c4afe6380f9e07575afd5ed9ed921bd300a7365d6a3318cc07d6310ab2ac1954ea0b335430131489e2d995ca90f38049e13d4e8687
6
+ metadata.gz: 8c7d6275910d2e2946bd744a3a2318b548818b4c086801a1e97eba37766dd667254dc86cd498f60f8817aba8301120cb7ddaa3f72b478573fec66e554e24703f
7
+ data.tar.gz: 8d98bb7e1f87b0f8bb4d52e96f307bfe1ca57528e55046ebbeb80330c0f8bdbdb26250a5770b16b793a9a811aa47d5c37a6b8481b47550946c3a02f5c8686acf
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,9 @@
1
+ v0.4.0 -- Thu Mar 19 08:32:20 EDT 2015
2
+ --------------------------------------
3
+ - added support for stubbing Question#ask RSpec's `instance_double` method.
4
+ (i.e. `instance_double("Interactive::Question", ask: nil)` does not
5
+ throw an error)
6
+
1
7
  v0.3.0 -- Wed Mar 18 11:28:05 EDT 2015
2
8
  --------------------------------------
3
9
  - Added support for questions without options
data/README.md CHANGED
@@ -28,7 +28,7 @@ If you want to ask a user a question accepting all answers:
28
28
 
29
29
  ```ruby
30
30
  require 'interactive'
31
- include 'interactive'
31
+ include Interactive
32
32
 
33
33
  question = Question.new do |q|
34
34
  q.question = "What is your api token password?"
@@ -67,7 +67,7 @@ If you want to ask a user a question expecting certain answers:
67
67
 
68
68
  ```ruby
69
69
  require 'interactive'
70
- include 'interactive'
70
+ include Interactive
71
71
 
72
72
  question = Question.new do |q|
73
73
  q.question = "Which item do you want to use?"
@@ -125,7 +125,7 @@ explanation right after asking the question:
125
125
 
126
126
  ```ruby
127
127
  require 'interactive'
128
- include 'interactive'
128
+ include Interactive
129
129
 
130
130
  # ...
131
131
 
@@ -9,13 +9,16 @@ module Interactive
9
9
 
10
10
  raise ArgumentError, "question cannot be nil nor empty." if question.nil? || question.empty?
11
11
  @question_type = @options.has_hash? ? QuestionWithEagerFullExplanation.new(self) : QuestionWithLazyFullExplanation.new(self)
12
- alias :ask :ask_and_wait_for_valid_response
13
12
  end
14
13
 
15
14
  def ask_and_wait_for_valid_response(&block)
16
15
  @question_type.ask_and_wait_for_valid_response(&block)
17
16
  end
18
17
 
18
+ def ask(&block)
19
+ ask_and_wait_for_valid_response(&block)
20
+ end
21
+
19
22
  private
20
23
 
21
24
  def response
@@ -1,3 +1,3 @@
1
1
  module Interactive
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: interactive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edderic Ugaddan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-18 00:00:00.000000000 Z
11
+ date: 2015-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake