backports 3.9.1 → 3.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.rdoc +6 -0
- data/Rakefile +5 -0
- data/lib/backports/2.4.0/enumerable.rb +3 -0
- data/lib/backports/2.4.0/enumerable/sum.rb +6 -0
- data/lib/backports/2.4.0/enumerable/uniq.rb +5 -0
- data/lib/backports/2.4.0/hash.rb +3 -0
- data/lib/backports/2.4.0/hash/compact.rb +13 -0
- data/lib/backports/2.4.0/hash/transform_values.rb +15 -0
- data/lib/backports/version.rb +1 -1
- data/spec/tags/1.8.6/core/hash/transform_values_spec.rb +2 -0
- data/spec/tags/1.8.7/core/hash/transform_values_spec.rb +2 -0
- data/spec/tags/1.9.1/core/hash/transform_values_spec.rb +2 -0
- data/spec/tags/1.9.2/core/hash/transform_values_spec.rb +2 -0
- metadata +24 -11
- data/Gemfile.lock +0 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57fb341f28684c6358b9c1c5f65a0524bd24c3d3
|
4
|
+
data.tar.gz: f3299e7676fbbdb9f8d58336b4c930553713cd48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfd754b5f4b85b4852bede115f9b2955d7b48f6588621492169679f329646c55044b9b51e8de91633fc690747f57545dc9079bd3daa94bbf06545389ab149704
|
7
|
+
data.tar.gz: de1f1211ea9454930e44a79241b88e720cf4a1adaae2f7f8dbc0d678c90b1964ba98d363c82bd57583931f297bf3004b0d47c9a1ff00cc958c95ac3291c0a965
|
data/.gitignore
CHANGED
data/README.rdoc
CHANGED
data/Rakefile
CHANGED
@@ -128,6 +128,10 @@ IGNORE_IN_19 = %w[
|
|
128
128
|
2.1.0/array/to_h
|
129
129
|
2.1.0/module/include
|
130
130
|
]
|
131
|
+
# These **new** specs cause actual errors while loading in 2.0.0:
|
132
|
+
IGNORE_IN_200 = %w[
|
133
|
+
2.4.0/enumerable/sum
|
134
|
+
]
|
131
135
|
|
132
136
|
CLASS_MAP = Hash.new{|k, v| k[v] = v}.merge!(
|
133
137
|
'match_data' => 'matchdata', # don't ask me why RubySpec uses matchdata instead of match_data
|
@@ -148,6 +152,7 @@ def mspec_cmds(pattern, spec_folder, action='ci')
|
|
148
152
|
next if IGNORE_IN_19.include? version_path
|
149
153
|
next if spec_folder != 'frozen_old_spec' && version <= '2.0.0' # Don't run new specs for pre 2.0 features & ruby
|
150
154
|
end
|
155
|
+
next if RUBY_VERSION < '2.1.0' && IGNORE_IN_200.include?(version_path)
|
151
156
|
deps = [*DEPENDENCIES[version_path]].map{|p| "-r #{p}"}.join(' ')
|
152
157
|
klass, method = path.split('/')
|
153
158
|
path = [CLASS_MAP[klass], method].join('/')
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class Hash
|
2
|
+
def transform_values
|
3
|
+
return to_enum(:transform_values){ size } unless block_given?
|
4
|
+
h = {}
|
5
|
+
each do |key, value|
|
6
|
+
h[key] = yield value
|
7
|
+
end
|
8
|
+
h
|
9
|
+
end unless method_defined? :transform_values
|
10
|
+
|
11
|
+
def transform_values!
|
12
|
+
return to_enum(:transform_values!){ size } unless block_given?
|
13
|
+
replace(transform_values{|i| yield i})
|
14
|
+
end unless method_defined? :transform_values!
|
15
|
+
end
|
data/lib/backports/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backports
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marc-André Lafortune
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Essential backports that enable many of the nice features of Ruby 1.8.7
|
14
14
|
up to 2.1.0 for earlier versions.
|
@@ -18,14 +18,13 @@ executables: []
|
|
18
18
|
extensions: []
|
19
19
|
extra_rdoc_files: []
|
20
20
|
files:
|
21
|
-
-
|
22
|
-
-
|
23
|
-
-
|
24
|
-
-
|
25
|
-
-
|
21
|
+
- .document
|
22
|
+
- .gitignore
|
23
|
+
- .gitmodules
|
24
|
+
- .irbrc
|
25
|
+
- .travis.yml
|
26
26
|
- CHANGELOG.rdoc
|
27
27
|
- Gemfile
|
28
|
-
- Gemfile.lock
|
29
28
|
- LICENSE.txt
|
30
29
|
- README.rdoc
|
31
30
|
- Rakefile
|
@@ -561,12 +560,18 @@ files:
|
|
561
560
|
- lib/backports/2.4.0.rb
|
562
561
|
- lib/backports/2.4.0/comparable.rb
|
563
562
|
- lib/backports/2.4.0/comparable/clamp.rb
|
563
|
+
- lib/backports/2.4.0/enumerable.rb
|
564
|
+
- lib/backports/2.4.0/enumerable/sum.rb
|
565
|
+
- lib/backports/2.4.0/enumerable/uniq.rb
|
564
566
|
- lib/backports/2.4.0/false_class.rb
|
565
567
|
- lib/backports/2.4.0/false_class/dup.rb
|
566
568
|
- lib/backports/2.4.0/fixnum.rb
|
567
569
|
- lib/backports/2.4.0/fixnum/dup.rb
|
568
570
|
- lib/backports/2.4.0/float.rb
|
569
571
|
- lib/backports/2.4.0/float/dup.rb
|
572
|
+
- lib/backports/2.4.0/hash.rb
|
573
|
+
- lib/backports/2.4.0/hash/compact.rb
|
574
|
+
- lib/backports/2.4.0/hash/transform_values.rb
|
570
575
|
- lib/backports/2.4.0/nil_class.rb
|
571
576
|
- lib/backports/2.4.0/nil_class/dup.rb
|
572
577
|
- lib/backports/2.4.0/regexp.rb
|
@@ -646,6 +651,7 @@ files:
|
|
646
651
|
- spec/tags/1.8.6/core/hash/rassoc_spec.rb
|
647
652
|
- spec/tags/1.8.6/core/hash/reject_spec.rb
|
648
653
|
- spec/tags/1.8.6/core/hash/select_spec.rb
|
654
|
+
- spec/tags/1.8.6/core/hash/transform_values_spec.rb
|
649
655
|
- spec/tags/1.8.6/core/integer/round_spec.rb
|
650
656
|
- spec/tags/1.8.6/core/io/binread_spec.rb
|
651
657
|
- spec/tags/1.8.6/core/io/chars_spec.rb
|
@@ -701,6 +707,7 @@ files:
|
|
701
707
|
- spec/tags/1.8.7/core/hash/keep_if_spec.rb
|
702
708
|
- spec/tags/1.8.7/core/hash/rassoc_spec.rb
|
703
709
|
- spec/tags/1.8.7/core/hash/select_spec.rb
|
710
|
+
- spec/tags/1.8.7/core/hash/transform_values_spec.rb
|
704
711
|
- spec/tags/1.8.7/core/integer/round_spec.rb
|
705
712
|
- spec/tags/1.8.7/core/io/binread_spec.rb
|
706
713
|
- spec/tags/1.8.7/core/io/open_spec.rb
|
@@ -732,9 +739,11 @@ files:
|
|
732
739
|
- spec/tags/1.9.1/core/array/rotate_spec.rb
|
733
740
|
- spec/tags/1.9.1/core/env/to_h_spec.rb
|
734
741
|
- spec/tags/1.9.1/core/hash/default_proc_spec.rb
|
742
|
+
- spec/tags/1.9.1/core/hash/transform_values_spec.rb
|
735
743
|
- spec/tags/1.9.1/core/io/write_spec.rb
|
736
744
|
- spec/tags/1.9.1/core/string/uplus_spec.rb
|
737
745
|
- spec/tags/1.9.2/core/array/bsearch_index_spec.rb
|
746
|
+
- spec/tags/1.9.2/core/hash/transform_values_spec.rb
|
738
747
|
- spec/tags/1.9.2/core/io/write_spec.rb
|
739
748
|
- spec/tags/1.9.2/core/method/curry_spec.rb
|
740
749
|
- spec/tags/1.9.2/core/string/uplus_spec.rb
|
@@ -762,17 +771,17 @@ require_paths:
|
|
762
771
|
- lib
|
763
772
|
required_ruby_version: !ruby/object:Gem::Requirement
|
764
773
|
requirements:
|
765
|
-
- -
|
774
|
+
- - '>='
|
766
775
|
- !ruby/object:Gem::Version
|
767
776
|
version: '0'
|
768
777
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
769
778
|
requirements:
|
770
|
-
- -
|
779
|
+
- - '>='
|
771
780
|
- !ruby/object:Gem::Version
|
772
781
|
version: '0'
|
773
782
|
requirements: []
|
774
783
|
rubyforge_project:
|
775
|
-
rubygems_version: 2.
|
784
|
+
rubygems_version: 2.4.8
|
776
785
|
signing_key:
|
777
786
|
specification_version: 4
|
778
787
|
summary: Backports of Ruby features for older Ruby.
|
@@ -806,6 +815,7 @@ test_files:
|
|
806
815
|
- spec/tags/1.8.6/core/hash/rassoc_spec.rb
|
807
816
|
- spec/tags/1.8.6/core/hash/reject_spec.rb
|
808
817
|
- spec/tags/1.8.6/core/hash/select_spec.rb
|
818
|
+
- spec/tags/1.8.6/core/hash/transform_values_spec.rb
|
809
819
|
- spec/tags/1.8.6/core/integer/round_spec.rb
|
810
820
|
- spec/tags/1.8.6/core/io/binread_spec.rb
|
811
821
|
- spec/tags/1.8.6/core/io/chars_spec.rb
|
@@ -861,6 +871,7 @@ test_files:
|
|
861
871
|
- spec/tags/1.8.7/core/hash/keep_if_spec.rb
|
862
872
|
- spec/tags/1.8.7/core/hash/rassoc_spec.rb
|
863
873
|
- spec/tags/1.8.7/core/hash/select_spec.rb
|
874
|
+
- spec/tags/1.8.7/core/hash/transform_values_spec.rb
|
864
875
|
- spec/tags/1.8.7/core/integer/round_spec.rb
|
865
876
|
- spec/tags/1.8.7/core/io/binread_spec.rb
|
866
877
|
- spec/tags/1.8.7/core/io/open_spec.rb
|
@@ -892,9 +903,11 @@ test_files:
|
|
892
903
|
- spec/tags/1.9.1/core/array/rotate_spec.rb
|
893
904
|
- spec/tags/1.9.1/core/env/to_h_spec.rb
|
894
905
|
- spec/tags/1.9.1/core/hash/default_proc_spec.rb
|
906
|
+
- spec/tags/1.9.1/core/hash/transform_values_spec.rb
|
895
907
|
- spec/tags/1.9.1/core/io/write_spec.rb
|
896
908
|
- spec/tags/1.9.1/core/string/uplus_spec.rb
|
897
909
|
- spec/tags/1.9.2/core/array/bsearch_index_spec.rb
|
910
|
+
- spec/tags/1.9.2/core/hash/transform_values_spec.rb
|
898
911
|
- spec/tags/1.9.2/core/io/write_spec.rb
|
899
912
|
- spec/tags/1.9.2/core/method/curry_spec.rb
|
900
913
|
- spec/tags/1.9.2/core/string/uplus_spec.rb
|
data/Gemfile.lock
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
backports (3.9.1)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: http://rubygems.org/
|
8
|
-
specs:
|
9
|
-
activesupport (3.2.13)
|
10
|
-
i18n (= 0.6.1)
|
11
|
-
multi_json (~> 1.0)
|
12
|
-
i18n (0.6.1)
|
13
|
-
minitest (4.7.5)
|
14
|
-
mspec (1.9.1)
|
15
|
-
multi_json (1.7.2)
|
16
|
-
rake (10.1.0)
|
17
|
-
test-unit (2.1.1.0)
|
18
|
-
|
19
|
-
PLATFORMS
|
20
|
-
java
|
21
|
-
ruby
|
22
|
-
|
23
|
-
DEPENDENCIES
|
24
|
-
activesupport
|
25
|
-
backports!
|
26
|
-
minitest (< 5.0.0)
|
27
|
-
mspec
|
28
|
-
rake
|
29
|
-
test-unit
|
30
|
-
|
31
|
-
BUNDLED WITH
|
32
|
-
1.15.4
|