polyfill 0.9.0 → 0.10.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: 3b944cddd5bba115b1c21189a683eebfb41d3e85
4
- data.tar.gz: d1069d216c3850bbb3687c1f39251403150c6912
3
+ metadata.gz: 2646789bd043984386ed6b20e9b260c905ba2101
4
+ data.tar.gz: 72dfeaf1acf7aa11b821f18651512bae78094375
5
5
  SHA512:
6
- metadata.gz: 4b8fa7d1486148b1b305244ec0002fec739faa019e437f5163738ba0055d9ce0fe1ee1548a48fddc19ef628bdfada326b8fac6031ff5fda4497119943a54936b
7
- data.tar.gz: 5f6f3e9a641cc20f9e9d06c420506b55084b1b379da2a90bd3509ea35f107422126bc8084edd22a1bcad2f0ba7706c6d4962439895450d934da18f8a7a51914c
6
+ metadata.gz: 0fe36a6f7dbf6b62c02de9c30b93f41b311fb22f878c8b0e20f7ab22df7e98b224b662523dd8f9742fe10043fe2420c6517ef03f97d75691d94746135018dd75
7
+ data.tar.gz: a8b54f02711346857c1dd759356617ea4454ab39305c549ecb5509060dd819ba6bd54b7793e062cd1e0d75a00fd01241155c5e42c4e5d67ba97e8c949040cf42
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # [0.10.0][]
2
+
3
+ - v2.3 Numeric#negative?
4
+ - v2.3 Numeric#positive?
5
+
1
6
  # [0.9.0][] (2017-05-05)
2
7
 
3
8
  ## Added
@@ -156,6 +161,7 @@
156
161
  - v2.4 String#concat?
157
162
  - v2.4 String#prepend?
158
163
 
164
+ [0.10.0]: https://github.com/AaronLasseigne/polyfill/compare/v0.9.0...v0.10.0
159
165
  [0.9.0]: https://github.com/AaronLasseigne/polyfill/compare/v0.8.0...v0.9.0
160
166
  [0.8.0]: https://github.com/AaronLasseigne/polyfill/compare/v0.7.0...v0.8.0
161
167
  [0.7.0]: https://github.com/AaronLasseigne/polyfill/compare/v0.6.0...v0.7.0
data/CONTRIBUTING.md CHANGED
@@ -31,7 +31,7 @@ These are the steps that you'll need to follow for submitting code:
31
31
 
32
32
  The goal is to produce code that is identical to the real method. To
33
33
  ensure that nothing breaks and the new code is good we need tests! One
34
- of the best places to find examples is the [Ruby Spec Suite]. If the
34
+ of the best places to find examples is the [Ruby Spec Suite]. If they
35
35
  have tests for the new functionality then make sure those same cases
36
36
  are covered.
37
37
 
@@ -58,14 +58,28 @@ bring it up and we'll figure it out.
58
58
 
59
59
  #### Lib
60
60
 
61
- The directory structure follows the module structure. Files are added
62
- (`require` and `include`) one directly level up from their location.
63
- This help keep everything segmented and stops there from being a
64
- single top level file with a ton of `require` statements.
61
+ Instance methods can be added or updated directly in a module of the
62
+ same name. All class methods will be in a nested module named
63
+ `ClassMethods`. The class methods should be instance methods within
64
+ that module.
65
65
 
66
- The structure is formulaic so looking through an existing example
67
- or two should clarify what to do. If you're not sure how to proceed,
68
- please reach out and we'll figure it out.
66
+ ```ruby
67
+ module Polyfill
68
+ module V2_4
69
+ module Array
70
+ module ClassMethods
71
+ def example_class_method
72
+ # ...
73
+ end
74
+ end
75
+
76
+ def example_instance_method
77
+ # ...
78
+ end
79
+ end
80
+ end
81
+ end
82
+ ```
69
83
 
70
84
  Reusing the names of core classes means that in your methods you'll
71
85
  need to make sure you reference the top level class by preceding it
data/README.md CHANGED
@@ -14,6 +14,8 @@ monkey patching** that may cause issues outside of your use.
14
14
  - [Installation](#installation)
15
15
  - [Goals](#goals)
16
16
  - [Usage](#usage)
17
+ - [Polyfill](#polyfill-1)
18
+ - [Polyfill.get](#polyfillget)
17
19
  - [Implementation Table](#implementation-table)
18
20
  - [2.4](#24)
19
21
  - [2.3](#23)
@@ -33,7 +35,7 @@ See the [implementation table](#implementation-table) for specifics about what h
33
35
  Add it to your Gemfile:
34
36
 
35
37
  ```ruby
36
- gem 'polyfill', '0.9.0'
38
+ gem 'polyfill', '0.10.0'
37
39
  ```
38
40
 
39
41
  Or install it manually:
@@ -282,8 +284,8 @@ end
282
284
  | | #mlst | No |
283
285
  | | #mlsd | No |
284
286
  | Net::HTTP | #open_timeout | No |
285
- | Numeric | #negative? | No |
286
- | | #positive? | No |
287
+ | Numeric | #negative? | Yes |
288
+ | | #positive? | Yes |
287
289
  | Object | #define_singleton_method | No |
288
290
  | | #timeout | No |
289
291
  | ObjectSpace | .count_symbols | No |
data/lib/polyfill/v2_3.rb CHANGED
@@ -3,6 +3,7 @@ require_relative 'v2_3/hash'
3
3
  require_relative 'v2_3/enumerable'
4
4
  require_relative 'v2_3/enumerator/lazy'
5
5
  require_relative 'v2_3/kernel'
6
+ require_relative 'v2_3/numeric'
6
7
  require_relative 'v2_3/string'
7
8
  require_relative 'v2_3/struct'
8
9
 
@@ -0,0 +1,13 @@
1
+ module Polyfill
2
+ module V2_3
3
+ module Numeric
4
+ def negative?
5
+ self < 0
6
+ end
7
+
8
+ def positive?
9
+ self > 0
10
+ end
11
+ end
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module Polyfill
2
- VERSION = '0.9.0'.freeze
2
+ VERSION = '0.10.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polyfill
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Lasseigne
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-05 00:00:00.000000000 Z
11
+ date: 2017-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -97,6 +97,7 @@ files:
97
97
  - lib/polyfill/v2_3/enumerator/lazy.rb
98
98
  - lib/polyfill/v2_3/hash.rb
99
99
  - lib/polyfill/v2_3/kernel.rb
100
+ - lib/polyfill/v2_3/numeric.rb
100
101
  - lib/polyfill/v2_3/string.rb
101
102
  - lib/polyfill/v2_3/struct.rb
102
103
  - lib/polyfill/v2_4.rb