lite-ruby 1.1.11 → 1.2.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
  SHA256:
3
- metadata.gz: 8a92f3d32861300bef85bf4b02207793096b41e581066440008b4e57ef656508
4
- data.tar.gz: 862d2c9b4859df92bc14e5814a7e770e6ac52eda4f28233ee77d18892b4d00cb
3
+ metadata.gz: 6bd71beaa77809d81b1e0bebf2a5c1796644e4ecc3236bbefbc85683c348e85a
4
+ data.tar.gz: 9d3d106d3fc6e87844a59b05be070bd0a91ba613a1e31ba3d3b06bdb2d73330c
5
5
  SHA512:
6
- metadata.gz: 7f3e0689339147e45fd7841ff7bec40bf0a51b680d41460ea5bd437f171647e18ffe2c7781b94a492f4b35b17ced3258d8eef1652ecbf99d5dcecf3716bb1c75
7
- data.tar.gz: f42eec3a17ea8816f1f8c9ad27477419e93f07906f1058f1e3c5cec4805bfa95744f1d84770447536953dc6fe94f1b51cf85faa2a2b324a33799e1def1fab293
6
+ metadata.gz: a61410e6e67e6d3ccef314c5fdfb2cbb419469ef8106ca3b6a4e20dddefc9254978566d0d1260f9292c2ef65da07c2c8afe2bf3505ce09ef3d67cb17eed2dd73
7
+ data.tar.gz: 54c104fb81fa10b5df25a634ce802acd49ee8b058daa19e77b8cb689d8638c42edf6b4e4481fb58853d4087bce2e9e919055fb056abbde9e14c7f314e076fc31
data/CHANGELOG.md CHANGED
@@ -6,6 +6,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.2.0] - 2021-07-09
10
+ ### Removed
11
+ - OpenStruct block initialization due to unreliability
12
+
13
+ ## [1.1.15] - 2021-07-05
14
+ ### Changed
15
+ - Added more OpenStruct backwards compatibility
16
+
17
+ ## [1.1.14] - 2021-07-05
18
+ ### Changed
19
+ - Fixed mistake in OpenStruct backwards compatibility
20
+
21
+ ## [1.1.13] - 2021-07-05
22
+ ### Added
23
+ - Added more OpenStruct backwards compatibility
24
+
25
+ ## [1.1.12] - 2021-07-05
26
+ ### Added
27
+ - Added OpenStruct backwards compatibility
28
+
9
29
  ## [1.1.11] - 2021-07-04
10
30
  ### Added
11
31
  - Added Array => `contains_all?`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lite-ruby (1.1.11)
4
+ lite-ruby (1.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -50,7 +50,7 @@ GEM
50
50
  mini_portile2 (~> 2.5.0)
51
51
  racc (~> 1.4)
52
52
  parallel (1.20.1)
53
- parser (3.0.1.1)
53
+ parser (3.0.2.0)
54
54
  ast (~> 2.4.1)
55
55
  racc (1.5.2)
56
56
  rack (2.2.3)
@@ -68,7 +68,7 @@ GEM
68
68
  rake (>= 0.13)
69
69
  thor (~> 1.0)
70
70
  rainbow (3.0.0)
71
- rake (13.0.3)
71
+ rake (13.0.6)
72
72
  regexp_parser (2.1.1)
73
73
  rexml (3.2.5)
74
74
  rspec (3.10.0)
@@ -84,7 +84,7 @@ GEM
84
84
  diff-lcs (>= 1.2.0, < 2.0)
85
85
  rspec-support (~> 3.10.0)
86
86
  rspec-support (3.10.2)
87
- rubocop (1.18.2)
87
+ rubocop (1.18.3)
88
88
  parallel (~> 1.10)
89
89
  parser (>= 3.0.0.0)
90
90
  rainbow (>= 2.2.2, < 4.0)
@@ -95,7 +95,7 @@ GEM
95
95
  unicode-display_width (>= 1.4.0, < 3.0)
96
96
  rubocop-ast (1.7.0)
97
97
  parser (>= 3.0.1.1)
98
- rubocop-performance (1.11.3)
98
+ rubocop-performance (1.11.4)
99
99
  rubocop (>= 1.7.0, < 2.0)
100
100
  rubocop-ast (>= 0.4.0)
101
101
  rubocop-rake (0.6.0)
data/docs/OPEN_STRUCT.md CHANGED
@@ -1,14 +1,5 @@
1
1
  # OpenStruct
2
2
 
3
- `Initialize`
4
- Allows the initialization of an OpenStruct with a setter block.
5
-
6
- ```ruby
7
- OpenStruct.new(name: 'bob', age: 60) do |o|
8
- o.gender = :M
9
- end
10
- ```
11
-
12
3
  `attributes`
13
4
  ------
14
5
  Returns the key values as a hash of the assigned struct.
@@ -5,21 +5,6 @@ if Lite::Ruby.configuration.monkey_patches.include?('open_struct')
5
5
 
6
6
  class OpenStruct
7
7
 
8
- def initialize(hash = nil, &block)
9
- @table = if block && block.arity == 2
10
- Hash.new(&block)
11
- else
12
- {}
13
- end
14
-
15
- hash&.each do |key, val|
16
- @table[key.to_sym] = val
17
- new_ostruct_member!(key)
18
- end
19
-
20
- yield self if block && block.arity == 1
21
- end
22
-
23
8
  def attributes
24
9
  @table
25
10
  end
@@ -41,14 +26,5 @@ if Lite::Ruby.configuration.monkey_patches.include?('open_struct')
41
26
  alias as_json to_json
42
27
  alias to_h to_hash
43
28
 
44
- private
45
-
46
- def new_ostruct_member!(name)
47
- return if is_method_protected!(name)
48
-
49
- define_singleton_method!(name) { @table[name] }
50
- define_singleton_method!("#{name}=") { |x| @table[name] = x }
51
- end
52
-
53
29
  end
54
30
  end
@@ -3,7 +3,7 @@
3
3
  module Lite
4
4
  module Ruby
5
5
 
6
- VERSION = '1.1.11'
6
+ VERSION = '1.2.0'
7
7
 
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lite-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.11
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-04 00:00:00.000000000 Z
11
+ date: 2021-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler