rspec-memory 1.0.1 → 1.0.2

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: 7de261a94a0fa38559c3ac73379c18191e0e0b53487323213e79b87f3e46e7c2
4
- data.tar.gz: 9f4bf36aa24ce004d3dc5a9112cdf5c843adc4378ff110de9e04159fd06485e0
3
+ metadata.gz: f1d7b4e2fc50cd98f2e40bb5cb19f63c3972533912afa460d7391089f3241087
4
+ data.tar.gz: 2efe634f53910265f7f3ba43e76ec705455ef89e29a99d337e239de4231389bd
5
5
  SHA512:
6
- metadata.gz: 3d47aaa5c81e103e4b3f4bbc1e3e015f3fda3347c3f3971dfa216345623dc75db91a42068971ff7cc06634fde2adfb0cdf1fce599266554b5ace4ecb0e587a9f
7
- data.tar.gz: 6408e07a4e8f00ee9ff56f072424d59039b5b3ab3e5670669413848e1082648a4d1a2618ef05ebfc4ee4062c7923d8a7d8be1b4768c2e43125d9e328c5275d48
6
+ metadata.gz: 26198b9cce4b0cac807b26f5b23bd2f85b6cc85da77e6b5b7bd06028531c8d9f90fa1d6f429467b42761e603e8081b7928f7697c7f11c48d2f1d8efe34360945
7
+ data.tar.gz: 14bea85597166f34189f33450550d1ce3f2da0bb50d40efbc31c6c2afa1e6c53f4120eeb6e298add62e7e2543073aad40456a7c27a0c049dd0888cd5e8bfd538
@@ -8,8 +8,10 @@ matrix:
8
8
  - rvm: 2.4
9
9
  - rvm: 2.5
10
10
  - rvm: 2.6
11
+ - rvm: 2.7
11
12
  - rvm: 2.6
12
13
  env: COVERAGE=BriefSummary,Coveralls
14
+ - rvm: 2.7
13
15
  - rvm: ruby-head
14
16
  - rvm: jruby-head
15
17
  env: JRUBY_OPTS="--debug -X+O"
data/README.md CHANGED
@@ -28,7 +28,7 @@ require 'rspec/memory'
28
28
 
29
29
  ## Usage
30
30
 
31
- Allocating large amounts of objects can lead to memery problems. `RSpec::Memory` adds a `limit_allocations` matcher, which tracks the number of allocations and memory size for each object type and allows you to specify expected limits.
31
+ Allocating large amounts of objects can lead to memory problems. `RSpec::Memory` adds a `limit_allocations` matcher, which tracks the number of allocations and memory size for each object type and allows you to specify expected limits.
32
32
 
33
33
  ```ruby
34
34
  RSpec.describe "memory allocations" do
@@ -105,8 +105,14 @@ module RSpec
105
105
  end
106
106
  end
107
107
 
108
- def limit_allocations(*args)
109
- LimitAllocations.new(*args)
108
+ if respond_to?(:ruby2_keywords, true)
109
+ def limit_allocations(count: nil, size: nil, **allocations)
110
+ LimitAllocations.new(allocations, count: count, size: size)
111
+ end
112
+ else
113
+ def limit_allocations(*arguments)
114
+ LimitAllocations.new(*arguments)
115
+ end
110
116
  end
111
117
  end
112
118
  end
@@ -20,6 +20,6 @@
20
20
 
21
21
  module RSpec
22
22
  module Memory
23
- VERSION = "1.0.1"
23
+ VERSION = "1.0.2"
24
24
  end
25
25
  end
@@ -4,6 +4,7 @@ require_relative 'lib/rspec/memory/version'
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "rspec-memory"
6
6
  spec.version = RSpec::Memory::VERSION
7
+ spec.licenses = ["MIT"]
7
8
  spec.authors = ["Samuel Williams"]
8
9
  spec.email = ["samuel.williams@oriontransfer.co.nz"]
9
10
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-memory
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-10 00:00:00.000000000 Z
11
+ date: 2020-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -86,7 +86,8 @@ files:
86
86
  - lib/rspec/memory/version.rb
87
87
  - rspec-memory.gemspec
88
88
  homepage: https://github.com/socketry/rspec-memory
89
- licenses: []
89
+ licenses:
90
+ - MIT
90
91
  metadata: {}
91
92
  post_install_message:
92
93
  rdoc_options: []
@@ -103,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
104
  - !ruby/object:Gem::Version
104
105
  version: '0'
105
106
  requirements: []
106
- rubygems_version: 3.0.3
107
+ rubygems_version: 3.1.2
107
108
  signing_key:
108
109
  specification_version: 4
109
110
  summary: RSpec helpers for checking memory allocations.