in_array 0.1.4 → 0.1.5

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: 1a8e4f410010aceefc1816040c2b3b54a8bcd8b6
4
- data.tar.gz: 49119bd6a51e2db2e9a51bf517939c0d10659dc7
3
+ metadata.gz: 319f3faf520405e8675f0e6779be8b8895494ab1
4
+ data.tar.gz: 4942d3c77f61a11c162d00c97fd534ea5249678c
5
5
  SHA512:
6
- metadata.gz: 884f59125deddec82a8d302cfd608b75264c6c17e69432b2b79ee9a54d004d00a699e55ef220d156dc208e6726df6e0a8caee3c898120cae594b22d09a2bd6d4
7
- data.tar.gz: 243cf3a7acbcb93d451951c3057a0eaa6be59ad34de0117257def81e4bf39499360db155f74b381b337bfe5b1629f38237352f8f8a19e5b66eacb6c307ee567e
6
+ metadata.gz: f8634d5780c3b61bdc45f7cb0c9a951fe6fda3d3d27a489a33f5ba8303e228aa5a92845900d8c795f6fb7cf080cd028ffc99ae7a4797069ddb28443d9de00a4c
7
+ data.tar.gz: e889618b96c516cff842b1220463496dfee30681ad9459bfb118f699b94100a312224f0f1a59b4840bac7e3a11b0236c656f07ff0617d936268adfba79722d23
data/README.md CHANGED
@@ -41,6 +41,7 @@ Or install it yourself as:
41
41
 
42
42
  $ gem install in_array
43
43
 
44
+ The in_array gem itself is found at: ( https://rubygems.org/gems/in_array )
44
45
 
45
46
  ## Usage
46
47
  This is as simple as:
@@ -55,8 +56,8 @@ my_object.in_array.each do |option| #etc, etc, etc...
55
56
 
56
57
  instead of
57
58
  ```ruby
58
- my_object = [my_object] unless my_object.is_a?(Array)
59
- my_object.each do |option| #etc, etc, etc...
59
+ my_object = [my_object] unless my_object.is_a?(Array)
60
+ my_object.each do |option| #etc, etc, etc...
60
61
  ```
61
62
 
62
63
  #### Extending the Protocol
data/irbt.rb ADDED
@@ -0,0 +1,20 @@
1
+ # coding: utf-8
2
+ # An IRB + in_array bed
3
+
4
+ require 'irb'
5
+ $force_alias_read_line_module = true
6
+ require 'mini_readline'
7
+
8
+ puts "Starting an IRB console with in_array loaded."
9
+
10
+ if ARGV[0] == 'local'
11
+ require_relative 'lib/in_array'
12
+ puts "in_array loaded locally: #{InArray::VERSION}"
13
+
14
+ ARGV.shift
15
+ else
16
+ require 'in_array'
17
+ puts "in_array loaded from gem: #{InArray::VERSION}"
18
+ end
19
+
20
+ IRB.start
@@ -1,5 +1,7 @@
1
1
  #Add support for the in_array method to ruby.
2
2
 
3
+ require_relative 'in_array/version'
4
+
3
5
  #Extend everything with in_array.
4
6
  class BasicObject
5
7
  #Return the object in an array.
@@ -3,5 +3,5 @@
3
3
  #* version.rb - The version string for flex array.
4
4
  module InArray
5
5
  #The version string for flex array.
6
- VERSION = "0.1.4"
6
+ VERSION = "0.1.5"
7
7
  end
@@ -24,6 +24,11 @@ task :reek do |t|
24
24
  `reek lib\\*.rb > reek.txt`
25
25
  end
26
26
 
27
+ desc "Fire up an IRB session with in_array preloaded."
28
+ task :console do
29
+ system "ruby irbt.rb local"
30
+ end
31
+
27
32
  desc "What version of in_array is this?"
28
33
  task :vers do |t|
29
34
  puts
@@ -7,6 +7,13 @@ class InArrayTester < Minitest::Test
7
7
  #Track mini-test progress.
8
8
  include MinitestVisible
9
9
 
10
+ def test_the_basics
11
+ assert(InArray, "The module InArray should exist.")
12
+ assert(InArrayAlready, "The module InArrayAlready should exist.")
13
+
14
+ assert_equal(String, InArray::VERSION.class)
15
+ end
16
+
10
17
  def test_that_it_encapsulates_in_arrays
11
18
  assert_equal(nil.in_array, [nil])
12
19
  assert_equal('Hello'.in_array, ['Hello'])
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: in_array
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Camilleri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-29 00:00:00.000000000 Z
11
+ date: 2016-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest_visible
@@ -107,6 +107,7 @@ files:
107
107
  - bench/complex_bench.rb
108
108
  - bench/simple_bench.rb
109
109
  - in_array.gemspec
110
+ - irbt.rb
110
111
  - lib/in_array.rb
111
112
  - lib/in_array/version.rb
112
113
  - license.txt