iruby_helpers 0.1.0 → 0.2.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 +4 -4
- data/README.md +9 -2
- data/iruby_helpers-0.1.0.gem +0 -0
- data/lib/iruby_helpers.rb +7 -2
- data/lib/iruby_helpers/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1fd39b9d4058f5b7d98c5075d768bd07e1d499a9
|
4
|
+
data.tar.gz: 294cca2083be0092987c19c3711cc8f87f58ed65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2b0b408cbdd8b85edffc12f73f7e2be172c37543dbc2395c4bfb6032d9a1d1b24343188487923877e7de4bf1c11fc5ab58518b0b168979ce6f3e859499db35b
|
7
|
+
data.tar.gz: 9244bd2e1189cbfceb5a86cf511a8bfd5e75be41ac3028683e4279305735fbce377b7ddcbfcd27d168d00749f3fbb7b9a2cd41487d34e9a423fa8ad69a67a550
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# IrubyHelpers
|
2
2
|
|
3
|
-
|
3
|
+
Some helper functions to help make iruby a little easier to use.
|
4
4
|
|
5
5
|
TODO: Delete this and the text above, and describe your gem
|
6
6
|
|
@@ -22,7 +22,14 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
25
|
+
Right now, there is just a couple functions that help simplify user input/output
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
|
29
|
+
user_input = gets_prompt("Enter a value")
|
30
|
+
puts_prompt "You entered: #{user_input}"
|
31
|
+
|
32
|
+
```
|
26
33
|
|
27
34
|
## Development
|
28
35
|
|
Binary file
|
data/lib/iruby_helpers.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require "iruby_helpers/version"
|
2
2
|
|
3
|
+
# shortcut to having a prompt that returns a value
|
3
4
|
def gets_prompt(prompt = "")
|
4
5
|
p = IRuby.popup prompt do
|
5
6
|
input :input
|
@@ -7,5 +8,9 @@ def gets_prompt(prompt = "")
|
|
7
8
|
p[:input]
|
8
9
|
end
|
9
10
|
|
10
|
-
|
11
|
-
|
11
|
+
# a hacky way to simply popup a message
|
12
|
+
def puts_alert(alert = "")
|
13
|
+
IRuby.popup alert do
|
14
|
+
# nothing
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iruby_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan Stryker
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,6 +52,7 @@ files:
|
|
52
52
|
- Rakefile
|
53
53
|
- bin/console
|
54
54
|
- bin/setup
|
55
|
+
- iruby_helpers-0.1.0.gem
|
55
56
|
- iruby_helpers.gemspec
|
56
57
|
- lib/iruby_helpers.rb
|
57
58
|
- lib/iruby_helpers/version.rb
|