iruby_helpers 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f3954eae0333e1c616caaf2a04ebc797ebf7adf
4
- data.tar.gz: e21de4f6e7109325f41a9dbb288f685d32570357
3
+ metadata.gz: 1fd39b9d4058f5b7d98c5075d768bd07e1d499a9
4
+ data.tar.gz: 294cca2083be0092987c19c3711cc8f87f58ed65
5
5
  SHA512:
6
- metadata.gz: 7a8178a60548ba03b81dc2a1706453f08c005ce1c472602e5d3b62a8ddde8c68aa9354fbee4d4044f779148bc62874506debbc12d69b34081d4fca48c809cd79
7
- data.tar.gz: 804033434f8ec16f051acf5946bd7ac2ea57deb0b3ec83d5292792e2e6e930e3e2d5cd505cab7271c675b6bd64747d22a16930d60f58e489be59ef41c8c52ac1
6
+ metadata.gz: f2b0b408cbdd8b85edffc12f73f7e2be172c37543dbc2395c4bfb6032d9a1d1b24343188487923877e7de4bf1c11fc5ab58518b0b168979ce6f3e859499db35b
7
+ data.tar.gz: 9244bd2e1189cbfceb5a86cf511a8bfd5e75be41ac3028683e4279305735fbce377b7ddcbfcd27d168d00749f3fbb7b9a2cd41487d34e9a423fa8ad69a67a550
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # IrubyHelpers
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/iruby_helpers`. To experiment with that code, run `bin/console` for an interactive prompt.
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
- TODO: Write usage instructions here
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
@@ -1,3 +1,3 @@
1
1
  module IrubyHelpers
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  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.1.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-08 00:00:00.000000000 Z
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