shenanigans 1.0.13 → 1.0.16

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.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/lib/shenanigans/array/caret.rb +3 -2
  3. data/lib/shenanigans/array/random_subarray.rb +7 -5
  4. data/lib/shenanigans/array/reductions.rb +13 -10
  5. data/lib/shenanigans/array/zip_with.rb +9 -12
  6. data/lib/shenanigans/array.rb +3 -3
  7. data/lib/shenanigans/hash/extract.rb +5 -4
  8. data/lib/shenanigans/hash/has_shape_pred.rb +6 -7
  9. data/lib/shenanigans/hash/to_ostruct.rb +8 -9
  10. data/lib/shenanigans/hash.rb +3 -3
  11. data/lib/shenanigans/integer/divisible_by.rb +13 -0
  12. data/lib/shenanigans/integer/string_length.rb +13 -0
  13. data/lib/shenanigans/integer.rb +2 -0
  14. data/lib/shenanigans/kernel/fn.rb +7 -6
  15. data/lib/shenanigans/kernel/prompt.rb +6 -7
  16. data/lib/shenanigans/kernel/require_optional.rb +8 -8
  17. data/lib/shenanigans/kernel/with.rb +4 -3
  18. data/lib/shenanigans/kernel.rb +4 -4
  19. data/lib/shenanigans/module/private_accessor.rb +6 -6
  20. data/lib/shenanigans/module.rb +1 -1
  21. data/lib/shenanigans/object/display.rb +5 -4
  22. data/lib/shenanigans/object.rb +1 -2
  23. data/lib/shenanigans/string/cmpi.rb +4 -3
  24. data/lib/shenanigans/string/in_groups_of.rb +4 -6
  25. data/lib/shenanigans/string.rb +2 -2
  26. data/lib/shenanigans.rb +7 -7
  27. metadata +81 -51
  28. data/Gemfile +0 -8
  29. data/doc/Array.html +0 -519
  30. data/doc/Fixnum.html +0 -215
  31. data/doc/Hash.html +0 -417
  32. data/doc/Kernel.html +0 -460
  33. data/doc/Module.html +0 -237
  34. data/doc/Object.html +0 -286
  35. data/doc/String.html +0 -299
  36. data/doc/_index.html +0 -185
  37. data/doc/class_list.html +0 -51
  38. data/doc/css/common.css +0 -1
  39. data/doc/css/full_list.css +0 -58
  40. data/doc/css/style.css +0 -499
  41. data/doc/file.README.html +0 -160
  42. data/doc/file_list.html +0 -56
  43. data/doc/frames.html +0 -17
  44. data/doc/index.html +0 -160
  45. data/doc/js/app.js +0 -248
  46. data/doc/js/full_list.js +0 -216
  47. data/doc/js/jquery.js +0 -4
  48. data/doc/method_list.html +0 -187
  49. data/doc/top-level-namespace.html +0 -112
  50. data/lib/shenanigans/fixnum/string_length.rb +0 -14
  51. data/lib/shenanigans/fixnum.rb +0 -1
  52. data/lib/shenanigans/object/it.rb +0 -9
  53. data/test/array/test_caret.rb +0 -9
  54. data/test/array/test_random_subarray.rb +0 -10
  55. data/test/array/test_reductions.rb +0 -27
  56. data/test/array/test_zip_with.rb +0 -14
  57. data/test/fixnum/test_string_length.rb +0 -16
  58. data/test/hash/test_extract.rb +0 -11
  59. data/test/hash/test_has_shape_pred.rb +0 -40
  60. data/test/hash/test_to_ostruct.rb +0 -23
  61. data/test/kernel/test_fn.rb +0 -14
  62. data/test/kernel/test_prompt.rb +0 -27
  63. data/test/kernel/test_require_optional.rb +0 -17
  64. data/test/kernel/test_with.rb +0 -12
  65. data/test/module/test_private_accessor.rb +0 -21
  66. data/test/object/test_display.rb +0 -36
  67. data/test/object/test_it.rb +0 -10
  68. data/test/string/test_cmpi.rb +0 -10
  69. data/test/string/test_in_groups_of.rb +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a9f1eccb5f91c4900d73028357417c17999b7c69b5e775d506973fd90eeff8d6
4
- data.tar.gz: 8c3d497d30c2081f7262096c3af8a7c3e65cec4d0841265476bae9943bd0a302
3
+ metadata.gz: 6e7e996c24ffbe66519073bafd5f160aba38a5de770493d2b6ef013c68398aae
4
+ data.tar.gz: f4785e43a5297504fe49818b80d7f5e57d6f32040c01f89548e1c303f3527556
5
5
  SHA512:
6
- metadata.gz: a3feeb73a90347f1270f214a7fab07316c08823908c1fc76f434a56bccd40e1a600cf2155942469d2028bcef60fa02d8391b163b95d3f4dcc1b621711ece36e2
7
- data.tar.gz: d9e206db73770af8e1265152eedcfbcca3ffdfb60bb1afc0f1fc0ae9c10704062d862dbc5f9b99bf90d5bf4be512dd57c75408da99c2944cf2bcc3d06ef40d17
6
+ metadata.gz: f7e8cb5e2a908f55f863e0859d5ff1ac58bef88ecab500d3f370c2162a25c0ce879e0e2db120cecec7c7ad9a5293ecebd430259afc11f6f50c22c8955609e8b7
7
+ data.tar.gz: dbbd0e0967510ce79c8ab5b47dcf791b31e6b9912b6e25deaba260c9b9c1e9cff2932e41ae4deb9eb04a3cc9e0c929b133221921141013050a871add2eee5264
@@ -1,7 +1,8 @@
1
1
  class Array
2
2
  # Returns an array containing elements exclusive between two arrays.
3
- # [1, 2, 3] ^ [1, 2, 4]
4
- # #=> [3, 4]
3
+ #
4
+ # @example
5
+ # [1, 2, 3] ^ [1, 2, 4] #=> [3, 4]
5
6
  def ^(other)
6
7
  (self - other) | (other - self)
7
8
  end
@@ -2,15 +2,17 @@ class Array
2
2
  # Generates random subarrays. Uses random numbers and
3
3
  # bit-fiddling to assure performant uniform distributions
4
4
  # even for large arrays.
5
+ #
6
+ # @example
5
7
  # a = *1..5
6
- # a.random_subarray(3)
7
- # #=> [[1, 3, 5], [2, 4], [1, 3, 4, 5]]
8
+ # a.random_subarray(3) #=> [[1, 3, 5], [2, 4], [1, 3, 4, 5]]
8
9
 
9
- def random_subarray(n=1)
10
+ def random_subarray(n = 1)
10
11
  raise ArgumentError, "negative argument" if n < 0
12
+
11
13
  (1..n).map do
12
- r = rand(2**self.size)
13
- self.select.with_index { |_, i| r[i] == 1 }
14
+ r = rand(2**size)
15
+ select.with_index { |_, i| r[i] == 1 }
14
16
  end
15
17
  end
16
18
  end
@@ -1,13 +1,16 @@
1
1
  class Array
2
- # Similar to +reduce+/+inject+, but also returns intermediate values. Has the same interface as +reduce+/+inject+, so an initial value, an oprator or both can be supplied. This method may eventually be moved to the +Enumerable+ module.
2
+ # Similar to +reduce+/+inject+, but also returns intermediate values. Has the
3
+ # same interface as +reduce+/+inject+, so an initial value, an operator or
4
+ # both can be supplied. This method may eventually be moved to the
5
+ # +Enumerable+ module.
3
6
  #
4
- # a = [*1..4]
5
- # a.reductions(:+)
6
- # #=> 10
7
- # a.reductions(50, :+)
8
- # #=> 60
9
- # %w(a b c).reductions { |s1, s2| s1+s2 }
10
- # #=> ["a", "ab", "abc"]
7
+ # @example Symbol argument
8
+ # a = (1..4).to_a
9
+ # a.reductions(:+) #=> 10
10
+ # @example Initial value and symbol argument
11
+ # a.reductions(50, :+) #=> 60
12
+ # @example Block argument
13
+ # %w(a b c).reductions { |s1, s2| s1+s2 } #=> ["a", "ab", "abc"]
11
14
  def reductions(*args, &block)
12
15
  arr = dup
13
16
 
@@ -21,9 +24,9 @@ class Array
21
24
 
22
25
  initial ||= arr.shift
23
26
 
24
- arr.inject([initial, [initial]]) do |(acc, result), el|
27
+ arr.inject([initial, [initial]]) { |(acc, result), el|
25
28
  val = op ? acc.send(op, el) : yield(acc, el)
26
29
  [val, result << val]
27
- end.last
30
+ }.last
28
31
  end
29
32
  end
@@ -1,21 +1,18 @@
1
1
  class Array
2
-
3
2
  # Zip <tt>self</tt> with <tt>other</tt>, combining the elements
4
3
  # with the provided block or symbol.
5
4
  # The resulting array will be as long as the shorter of
6
5
  # the two arrays.
7
- # [1,2,3].zip_with([6,5,4], :+)
8
- # #=> [7, 7, 7]
9
- # %w(a b).zip_with(%w(c d), :+)
10
- # #=> ["ac", "bd"]
11
- #
12
- # For more complex combinations, a block can be provided:
13
- #
14
- # [1,2,3].zip_with([6,5,4]) { |a,b| 3*a+2*b }
6
+ # @example With a symbol
7
+ # [1,2,3].zip_with([6,5,4], :+) #=> [7, 7, 7]
8
+ # %w(a b).zip_with(%w(c d), :+) #=> ["ac", "bd"]
9
+ # @example With a block
10
+ # [1,2,3].zip_with([6,5,4]) { |a,b| 3 * a + 2 * b }
15
11
  # #=> [15, 16, 17]
16
- def zip_with(other, op=nil)
17
- return [] if self.empty? || other.empty?
18
- clipped = self[0..other.length-1]
12
+ def zip_with(other, op = nil)
13
+ return [] if empty? || other.empty?
14
+
15
+ clipped = self[0..other.length - 1]
19
16
  zipped = clipped.zip(other)
20
17
 
21
18
  if op
@@ -1,3 +1,3 @@
1
- require_relative 'array/caret'
2
- require_relative 'array/random_subarray'
3
- require_relative 'array/zip_with'
1
+ require_relative "array/caret"
2
+ require_relative "array/random_subarray"
3
+ require_relative "array/zip_with"
@@ -1,10 +1,11 @@
1
1
  class Hash
2
2
  # Returns a new hash only with the specified keys (if present).
3
+ #
4
+ # @example Key order does not matter
3
5
  # hash = { a: 1, b: 2, c: 3 }
4
- # hash.extract(:b, :a)
5
- # #=> { a: 1, b: 2 }
6
- # hash.extract(:a, :d)
7
- # #=> { a: 1}
6
+ # hash.extract(:b, :a) #=> { a: 1, b: 2 }
7
+ # @example Missing keys are ignored
8
+ # hash.extract(:a, :d) #=> { a: 1}
8
9
  def extract(*ks)
9
10
  existing = keys & ks
10
11
  Hash[existing.zip(values_at(*existing))]
@@ -1,15 +1,14 @@
1
1
  class Hash
2
2
  # Checks if a hash has a certain structure.
3
+ #
4
+ # @example Simple hash
3
5
  # h = { k1: 1, k2: "1" }
4
- # h.has_shape?(k1: Fixnum, k2: String)
5
- # #=> true
6
- # h.has_shape?(k1: Class, k2: String)
7
- # #=> false
8
- # It also works with compound data structures.
6
+ # h.has_shape?(k1: Integer, k2: String) #=> true
7
+ # h.has_shape?(k1: Class, k2: String) #=> false
8
+ # @example Nested hashes
9
9
  # h = { k1: [], k2: { k3: Struct.new("Foo") } }
10
10
  # shape = { k1: Array, k2: { k3: Module } }
11
- # h.has_shape?(shape)
12
- # #=> true
11
+ # h.has_shape?(shape) #=> true
13
12
  def has_shape?(shape)
14
13
  all? do |k, v|
15
14
  Hash === v ? v.has_shape?(shape[k]) : shape[k] === v
@@ -1,8 +1,10 @@
1
- require 'ostruct'
1
+ require "ostruct"
2
2
 
3
3
  class Hash
4
4
  # Recursively converts a <tt>Hash</tt> and all nested <tt>Hash</tt>es to
5
5
  # <tt>OpenStruct</tt>s. Especially useful for parsing YAML.
6
+ #
7
+ # @example
6
8
  # yaml=<<EOY
7
9
  # subject: Programming Languages
8
10
  # languages:
@@ -14,14 +16,11 @@ class Hash
14
16
  # creator : Larry Wall
15
17
  # EOY
16
18
  # struct = YAML.load(yaml).to_ostruct
17
- # struct.subject
18
- # #=> "Programming Languages"
19
- # struct.languages.first
20
- # #=> #<OpenStruct name="Ruby", creator="Matz">
21
- # struct.languages.first.creator
22
- # #=> "Matz"
19
+ # struct.subject #=> "Programming Languages"
20
+ # struct.languages.first #=> #<OpenStruct name="Ruby", creator="Matz">
21
+ # struct.languages.first.creator #=> "Matz"
23
22
  def to_ostruct
24
- arr = map do |k, v|
23
+ arr = map { |k, v|
25
24
  case v
26
25
  when Hash
27
26
  [k, v.to_ostruct]
@@ -30,7 +29,7 @@ class Hash
30
29
  else
31
30
  [k, v]
32
31
  end
33
- end
32
+ }
34
33
  OpenStruct.new(Hash[arr])
35
34
  end
36
35
  end
@@ -1,3 +1,3 @@
1
- require_relative 'hash/extract'
2
- require_relative 'hash/has_shape_pred'
3
- require_relative 'hash/to_ostruct'
1
+ require_relative "hash/extract"
2
+ require_relative "hash/has_shape_pred"
3
+ require_relative "hash/to_ostruct"
@@ -0,0 +1,13 @@
1
+ class Integer
2
+ # Checks whether the receiver is cleanly divisble by the argument.
3
+ # @example
4
+ # 3.divisble_by(0) #=> false
5
+ # 3.divisble_by(2) #=> false
6
+ # 9.divisble_bu(3) #=> true
7
+ def divisible_by(n)
8
+ return false if n.zero?
9
+
10
+ self % n == 0
11
+ end
12
+ end
13
+
@@ -0,0 +1,13 @@
1
+ class Integer
2
+ # Returns the length of the number's string representation.
3
+ # @example
4
+ # 0.string_length #=> 1
5
+ # 123.string_length #=> 3
6
+ # -1.string_length #=> 2
7
+ def string_length
8
+ return 1 if zero?
9
+
10
+ len = Math.log10(abs).floor.next
11
+ positive? ? len : len.next
12
+ end
13
+ end
@@ -0,0 +1,2 @@
1
+ require_relative "integer/divisible_by"
2
+ require_relative "integer/string_length"
@@ -1,14 +1,15 @@
1
1
  module Kernel
2
2
  # Composes a list of functions.
3
3
  # Functions can be specified as symbols or lambdas.
4
- # ["foo bar", "baz qux"].map &fn(:split, :last)
5
- # #=> ["bar", "qux"]
6
4
  #
7
- # (1..3).map &fn(:next, -> x { x * x }, -> x { x.to_f / 2 } )
5
+ # @example Composing symbols
6
+ # ["foo bar", "baz qux"].map(&fn(:split, :last)) #=> ["bar", "qux"]
7
+ # @example Composing symbplds and lambdas
8
+ # (1..3).map(&fn(:next, -> x { x * x }, -> x { x.to_f / 2 } ))
8
9
  # #=> [2.0, 4.5, 8.0]
9
- def fn(*funs) #:doc:
10
- -> x do
11
- funs.inject(x) do |v,f|
10
+ def fn(*funs)
11
+ ->(x) do
12
+ funs.inject(x) do |v, f|
12
13
  Proc === f ? f.call(v) : v.send(f)
13
14
  end
14
15
  end
@@ -1,5 +1,4 @@
1
1
  module Kernel
2
-
3
2
  # Currently only used by <tt>prompt</tt>:
4
3
  # <tt>:to_i</tt>, <tt>:to_f</tt>, <tt>:to_r</tt>, <tt>:to_sym</tt>, <tt>:to_c</tt>
5
4
  CONVERSIONS = [:to_i, :to_f, :to_r, :to_sym, :to_c]
@@ -7,14 +6,14 @@ module Kernel
7
6
  # Displays a prompt and returns chomped input.
8
7
  # Modelled after the Python method <tt>raw_input</tt>, but also can
9
8
  # be supplied with an optional conversion method.
9
+ #
10
+ # @example A simple prompt
10
11
  # prompt("Prompt> ")
11
- # Prompt> 12
12
- # #=> "12"
13
- #
12
+ # Prompt> 12 #=> "12"
13
+ # @example A prompt with conversion
14
14
  # prompt("Prompt> ", :to_f)
15
- # Prompt> 12
16
- # #=> 12.0
17
- def prompt(text='', conversion=nil) #:doc:
15
+ # Prompt> 12 #=> 12.0
16
+ def prompt(text = "", conversion = nil)
18
17
  print text unless text.empty?
19
18
  input = gets.chomp
20
19
  CONVERSIONS.include?(conversion) ? input.send(conversion) : input
@@ -2,17 +2,17 @@ module Kernel
2
2
  # Optionally require a gem. If it is not available, <tt>nil</tt>
3
3
  # will be returned. Alternatively, a block can be provided with code
4
4
  # to run.
5
- # require 'non_existent'
6
- # #=> nil
7
5
  #
8
- # require 'non_existent' do
9
- # puts 'Something went wrong'
10
- # end
11
- # #=> Outputs 'Something went wrong'
12
- def require_optional(gem, &block) #:doc:
6
+ # @example Without a block
7
+ # require "non_existent" #=> nil
8
+ # @example With a custom block
9
+ # require "non_existent" do
10
+ # puts "Something went wrong"
11
+ # end #=> Outputs "Something went wrong"
12
+ def require_optional(gem, &block)
13
13
  require gem
14
14
  rescue LoadError
15
- block.call if block
15
+ block&.call
16
16
  end
17
17
 
18
18
  private :require_optional
@@ -1,12 +1,13 @@
1
1
  module Kernel
2
2
  # A Pascal/ActionScript like <tt>with</tt> method. Yields its
3
3
  # argument to the provided block and then returns it.
4
+ #
5
+ # @example
4
6
  # with([]) do |a|
5
7
  # a << "a"
6
8
  # a << "b"
7
- # end
8
- # #=> ["a", "b"]
9
- def with(o, &blk) #:doc:
9
+ # end #=> ["a", "b"]
10
+ def with(o, &blk)
10
11
  o.tap(&blk)
11
12
  end
12
13
 
@@ -1,4 +1,4 @@
1
- require_relative 'kernel/fn'
2
- require_relative 'kernel/prompt'
3
- require_relative 'kernel/with'
4
- require_relative 'kernel/require_optional'
1
+ require_relative "kernel/fn"
2
+ require_relative "kernel/prompt"
3
+ require_relative "kernel/with"
4
+ require_relative "kernel/require_optional"
@@ -1,10 +1,10 @@
1
1
  class Module
2
- # Works like <tt>attr_accessor</tt> but generates private
3
- # getter/setter methods for class internal use only. Useful
4
- # for enforcing Smalltalk-style internal encapsulation.
2
+ # Works like <tt>attr_accessor</tt> but generates private getter/setter
3
+ # methods for class internal use only. Useful for enforcing Smalltalk-style
4
+ # internal encapsulation.
5
5
  #
6
6
  # For a more complete implementation of a similar feature see {ivar_encapsulation}[https://github.com/citizen428/ivar_encapsulation].
7
- def private_accessor(*names) #:doc:
7
+ def private_accessor(*names)
8
8
  names.each do |name|
9
9
  instance_var_name = "@#{name}"
10
10
 
@@ -16,8 +16,8 @@ class Module
16
16
  instance_variable_set(instance_var_name, value)
17
17
  end
18
18
 
19
- self.send(:private, name)
20
- self.send(:private, "#{name}=")
19
+ send(:private, name)
20
+ send(:private, "#{name}=")
21
21
  end
22
22
  nil # like attr_accessor
23
23
  end
@@ -1 +1 @@
1
- require_relative 'module/private_accessor'
1
+ require_relative "module/private_accessor"
@@ -2,16 +2,17 @@ class Object
2
2
  # Outputs the object and also returns it.
3
3
  # Will use <tt>puts</tt> if <tt>new_line</tt> is <tt>true</tt> and
4
4
  # <tt>print</tt> otherwise.
5
+ #
6
+ # @example
5
7
  # "foo".display
6
- # foo
7
- # #=> "foo"
8
+ # foo #=> "foo"
8
9
  #
9
10
  # "foo".display(false)
10
11
  # foo#=> "foo"
11
12
  def display(new_line = true)
12
13
  m = new_line ? :puts : :print
13
- self.tap { |o| send(m, o) }
14
+ tap { |o| send(m, o) }
14
15
  end
15
16
 
16
- alias :d :display
17
+ alias d display
17
18
  end
@@ -1,2 +1 @@
1
- require_relative 'object/it'
2
- require_relative 'object/display'
1
+ require_relative "object/display"
@@ -1,8 +1,9 @@
1
1
  class String
2
2
  # Compares strings ignoring case
3
- # "test".cmpi("tesT")
4
- # #=> true
3
+ #
4
+ # @example
5
+ # "test".cmpi("tesT") #=> true
5
6
  def cmpi(other)
6
- self.casecmp(other).zero?
7
+ casecmp(other).zero?
7
8
  end
8
9
  end
@@ -1,14 +1,12 @@
1
1
  class String
2
2
  # Returns an array of the string broken down into groups of
3
3
  # <tt>size</tt> characters.
4
- # "aabbcc".in_groups_of(2)
5
- # #=> ['aa', 'bb', 'cc']
6
- # "".in_groups_of(2)
7
- # #=> []
8
- # "".in_groups_of(0)
9
- # #=> ArgumentError
4
+ # "aabbcc".in_groups_of(2) #=> ['aa', 'bb', 'cc']
5
+ # "".in_groups_of(2) #=> []
6
+ # "".in_groups_of(0) #=> ArgumentError
10
7
  def in_groups_of(size)
11
8
  raise ArgumentError, "Size of group must be >= 1" if size < 1
9
+
12
10
  scan(/.{1,#{size}}/)
13
11
  end
14
12
  end
@@ -1,2 +1,2 @@
1
- require_relative 'string/in_groups_of'
2
- require_relative 'string/cmpi'
1
+ require_relative "string/in_groups_of"
2
+ require_relative "string/cmpi"
data/lib/shenanigans.rb CHANGED
@@ -1,7 +1,7 @@
1
- require 'shenanigans/array'
2
- require 'shenanigans/fixnum'
3
- require 'shenanigans/hash'
4
- require 'shenanigans/kernel'
5
- require 'shenanigans/module'
6
- require 'shenanigans/object'
7
- require 'shenanigans/string'
1
+ require "shenanigans/array"
2
+ require "shenanigans/hash"
3
+ require "shenanigans/integer"
4
+ require "shenanigans/kernel"
5
+ require "shenanigans/module"
6
+ require "shenanigans/object"
7
+ require "shenanigans/string"
metadata CHANGED
@@ -1,57 +1,106 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shenanigans
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.13
4
+ version: 1.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Kohl
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-01 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2022-02-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '5.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '5.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '13.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '13.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: standard
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.7'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.7'
69
+ - !ruby/object:Gem::Dependency
70
+ name: yard
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: 0.9.20
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 0.9.20
13
83
  description: A collection of extensions for various Ruby core classes.
14
- email: citizen428@gmail.com
84
+ email: me@citizen428.net
15
85
  executables: []
16
86
  extensions: []
17
87
  extra_rdoc_files: []
18
88
  files:
19
- - Gemfile
20
89
  - LICENSE
21
90
  - README.rdoc
22
- - doc/Array.html
23
- - doc/Fixnum.html
24
- - doc/Hash.html
25
- - doc/Kernel.html
26
- - doc/Module.html
27
- - doc/Object.html
28
- - doc/String.html
29
- - doc/_index.html
30
- - doc/class_list.html
31
- - doc/css/common.css
32
- - doc/css/full_list.css
33
- - doc/css/style.css
34
- - doc/file.README.html
35
- - doc/file_list.html
36
- - doc/frames.html
37
- - doc/index.html
38
- - doc/js/app.js
39
- - doc/js/full_list.js
40
- - doc/js/jquery.js
41
- - doc/method_list.html
42
- - doc/top-level-namespace.html
43
91
  - lib/shenanigans.rb
44
92
  - lib/shenanigans/array.rb
45
93
  - lib/shenanigans/array/caret.rb
46
94
  - lib/shenanigans/array/random_subarray.rb
47
95
  - lib/shenanigans/array/reductions.rb
48
96
  - lib/shenanigans/array/zip_with.rb
49
- - lib/shenanigans/fixnum.rb
50
- - lib/shenanigans/fixnum/string_length.rb
51
97
  - lib/shenanigans/hash.rb
52
98
  - lib/shenanigans/hash/extract.rb
53
99
  - lib/shenanigans/hash/has_shape_pred.rb
54
100
  - lib/shenanigans/hash/to_ostruct.rb
101
+ - lib/shenanigans/integer.rb
102
+ - lib/shenanigans/integer/divisible_by.rb
103
+ - lib/shenanigans/integer/string_length.rb
55
104
  - lib/shenanigans/kernel.rb
56
105
  - lib/shenanigans/kernel/fn.rb
57
106
  - lib/shenanigans/kernel/prompt.rb
@@ -61,32 +110,14 @@ files:
61
110
  - lib/shenanigans/module/private_accessor.rb
62
111
  - lib/shenanigans/object.rb
63
112
  - lib/shenanigans/object/display.rb
64
- - lib/shenanigans/object/it.rb
65
113
  - lib/shenanigans/string.rb
66
114
  - lib/shenanigans/string/cmpi.rb
67
115
  - lib/shenanigans/string/in_groups_of.rb
68
- - test/array/test_caret.rb
69
- - test/array/test_random_subarray.rb
70
- - test/array/test_reductions.rb
71
- - test/array/test_zip_with.rb
72
- - test/fixnum/test_string_length.rb
73
- - test/hash/test_extract.rb
74
- - test/hash/test_has_shape_pred.rb
75
- - test/hash/test_to_ostruct.rb
76
- - test/kernel/test_fn.rb
77
- - test/kernel/test_prompt.rb
78
- - test/kernel/test_require_optional.rb
79
- - test/kernel/test_with.rb
80
- - test/module/test_private_accessor.rb
81
- - test/object/test_display.rb
82
- - test/object/test_it.rb
83
- - test/string/test_cmpi.rb
84
- - test/string/test_in_groups_of.rb
85
116
  homepage: http://rubydoc.info/gems/shenanigans/frames
86
117
  licenses:
87
118
  - MIT
88
119
  metadata: {}
89
- post_install_message:
120
+ post_install_message:
90
121
  rdoc_options: []
91
122
  require_paths:
92
123
  - lib
@@ -101,9 +132,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
132
  - !ruby/object:Gem::Version
102
133
  version: '0'
103
134
  requirements: []
104
- rubyforge_project:
105
- rubygems_version: 2.7.3
106
- signing_key:
135
+ rubygems_version: 3.3.7
136
+ signing_key:
107
137
  specification_version: 4
108
138
  summary: Think Facets, just less useful
109
139
  test_files: []
data/Gemfile DELETED
@@ -1,8 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem "rake"
4
-
5
- group :developement do
6
- gem "minitest", ">= 2.6.0"
7
- gem "yard"
8
- end