padrino-support 0.14.0.rc1 → 0.14.0.rc2

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: 0f074050ef78b1af579c9b9e436c30603c61e9d0
4
- data.tar.gz: be07d1666759dd7e63f15a34596fc88b23e6641f
3
+ metadata.gz: 2565c77140485c35c9ded9a74c2fcaa78d408fcd
4
+ data.tar.gz: f48941eb7752cbacfbb8e08ae937888d0a4b4292
5
5
  SHA512:
6
- metadata.gz: 0e59145d73a2b39bc2777b81e731d4d0e10eca05f3426da02f0006e5a6baa230178704ef6be970befac8665111ddab5b45041cfdc213984735be7bca004b69a1
7
- data.tar.gz: d742cd5e1f270b2a0a2f9099b41f141570165a94470c295389b80fba8b9bfd78e310e3a44997dc8ef0eeed8bb800bf63854e498862dd23f22a3bf5611b90cdf5
6
+ metadata.gz: 908fd1aa19488c39896381d29114e90147e0c5bb2252cb023127b3b06c48877eb463c68f141430b64a61626967dabeeac1a5b693fffce61d01bdabb01267c556
7
+ data.tar.gz: 14d394b4bb7a334ead2eca18a5e62c6fc912ed4b145c236ecb8e9255d23c5dcc529203b7437a44e121e8d11030e1f73f7c6f9e3a2a50d0b5fe4a8989121dabcc
@@ -2,7 +2,6 @@
2
2
  # This file loads certain extensions required by Padrino.
3
3
  #
4
4
  require 'padrino-support/core_ext/string/colorize'
5
- require 'padrino-support/core_ext/object_space'
6
5
  require 'padrino-support/file_set'
7
6
  require 'padrino-support/utils'
8
7
 
@@ -63,7 +63,7 @@ describe 'Padrino::Utils.deep_dup' do
63
63
  array = [1, [2, 3]]
64
64
  dup = Padrino::Utils.deep_dup(array)
65
65
  dup[1][2] = 4
66
- assert_equal nil, array[1][2]
66
+ assert_equal 2, array[1].size
67
67
  assert_equal 4, dup[1][2]
68
68
  end
69
69
 
@@ -71,7 +71,7 @@ describe 'Padrino::Utils.deep_dup' do
71
71
  hash = { :a => { :b => 'b' } }
72
72
  dup = Padrino::Utils.deep_dup(hash)
73
73
  dup[:a][:c] = 'c'
74
- assert_equal nil, hash[:a][:c]
74
+ refute_includes hash[:a], :c
75
75
  assert_equal 'c', dup[:a][:c]
76
76
  end
77
77
 
@@ -79,7 +79,7 @@ describe 'Padrino::Utils.deep_dup' do
79
79
  array = [1, { :a => 2, :b => 3 } ]
80
80
  dup = Padrino::Utils.deep_dup(array)
81
81
  dup[1][:c] = 4
82
- assert_equal nil, array[1][:c]
82
+ refute_includes array[1], :c
83
83
  assert_equal 4, dup[1][:c]
84
84
  end
85
85
 
@@ -87,7 +87,7 @@ describe 'Padrino::Utils.deep_dup' do
87
87
  hash = { :a => [1, 2] }
88
88
  dup = Padrino::Utils.deep_dup(hash)
89
89
  dup[:a][2] = 'c'
90
- assert_equal nil, hash[:a][2]
90
+ assert_equal 2, hash[:a].size
91
91
  assert_equal 'c', dup[:a][2]
92
92
  end
93
93
 
@@ -107,7 +107,7 @@ describe 'Padrino::Utils.deep_dup' do
107
107
  end
108
108
 
109
109
  it 'should not double the frozen keys' do
110
- hash = { Fixnum => 1 }
110
+ hash = { 'a'.freeze => 1 }
111
111
  dup = Padrino::Utils.deep_dup(hash)
112
112
  assert_equal 1, dup.keys.length
113
113
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: padrino-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0.rc1
4
+ version: 0.14.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Padrino Team
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2016-11-02 00:00:00.000000000 Z
15
+ date: 2017-01-19 00:00:00.000000000 Z
16
16
  dependencies: []
17
17
  description: A number of support methods and extensions for Padrino framework
18
18
  email: padrinorb@gmail.com
@@ -26,7 +26,6 @@ files:
26
26
  - LICENSE.txt
27
27
  - Rakefile
28
28
  - lib/padrino-support.rb
29
- - lib/padrino-support/core_ext/object_space.rb
30
29
  - lib/padrino-support/core_ext/string/colorize.rb
31
30
  - lib/padrino-support/default_inflections.rb
32
31
  - lib/padrino-support/file_set.rb
@@ -1,36 +0,0 @@
1
- module ObjectSpace
2
- class << self
3
- ##
4
- # Returns all the classes in the object space.
5
- # Optionally, a block can be passed, for example the following code
6
- # would return the classes that start with the character "A":
7
- #
8
- # ObjectSpace.classes do |klass|
9
- # if klass.to_s[0] == "A"
10
- # klass
11
- # end
12
- # end
13
- #
14
- def classes(&block)
15
- warn 'Warning! ObjectSpace.classes will be removed in Padrino 0.14'
16
- require 'padrino-core/reloader'
17
- Padrino::Reloader::Storage.send(:object_classes, &block)
18
- end
19
-
20
- ##
21
- # Returns a list of existing classes that are not included in "snapshot"
22
- # This method is useful to get the list of new classes that were loaded
23
- # after an event like requiring a file.
24
- # Usage:
25
- #
26
- # snapshot = ObjectSpace.classes
27
- # # require a file
28
- # ObjectSpace.new_classes(snapshot)
29
- #
30
- def new_classes(snapshot)
31
- warn 'Warning! ObjectSpace.new_classes will be removed in Padrino 0.14'
32
- require 'padrino-core/reloader'
33
- Padrino::Reloader::Storage.send(:new_classes, snapshot)
34
- end
35
- end
36
- end