test-prof 0.5.0.pre2 → 0.5.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: 789a02e9305eef34d0b1f1c8339135647d94b227b302ec9d05362199a5e5a8e7
4
- data.tar.gz: 46b3ad93d0e18e29215e9ca0166381dfc5a0d1c401a8c825dc5614af9a11ff6a
3
+ metadata.gz: bc2f073e4331955ed514e20849bb5dadf28d4f5934254ae3d30ca2c60db90ff0
4
+ data.tar.gz: d07ba0a976611946258de85284b697d0ccf7adbdeaae0363efebd868156100e4
5
5
  SHA512:
6
- metadata.gz: 94db963dd2728fc7b87752fbb3ebd6610d24521185b88c566fb9be217a84c6d6cc800bbde44b5a9295c29003a99a5eba003945c07b1e60f2b30768438728f657
7
- data.tar.gz: 954d7ec51af1b546415c2376ffc82c407ae2b41afadd2b970137e49e9ff6c9d904788c40e507b8c12348cdca402152f5b1774e29c550024d3e2651d052270584
6
+ metadata.gz: c942589dbd72c954f54a4cb874d91f98a2c9a64c604fb82b32476bcf2ea9b82fbfa72222e32b0cfec52fc1b335b2c9e69d99567be21e91b8084005a94ed9963a
7
+ data.tar.gz: e90718e07df7b566c657c9192805a4a1f523196578699f7cbc93f3cf25ddf09634bcb0bda35e5e18a9f1501708e583748df4575b721c20886605ca1c863efff6
@@ -2,7 +2,9 @@
2
2
 
3
3
  ## master
4
4
 
5
- - Disable referential integrity when cleaning AnyFixture. ([@palkan][])
5
+ ## 0.5.0 (2018-04-25)
6
+
7
+ ### Features
6
8
 
7
9
  - Add events support to TagProf. ([@palkan][])
8
10
 
@@ -12,14 +14,32 @@ Example usage:
12
14
  TAG_PROF=type TAG_PROF_EVENT=sql.active_record rspec
13
15
  ```
14
16
 
17
+ [📝 Docs](https://test-prof.evilmartians.io/#/tag_prof?id=profiling-events)
18
+
15
19
  - Add logging helpers for Rails. ([@palkan][])
16
20
 
17
- - Add ability to track multiple events at the same time with `EventProf`. ([@palkan][])
21
+ Enalbe verbose logging globally:
22
+
23
+ ```sh
24
+ LOG=all rspec
25
+ ```
26
+
27
+ Or per example (group):
28
+
29
+ ```ruby
30
+ it 'does smth weird', :log do
31
+ # ...
32
+ end
33
+ ```
34
+
35
+ [📝 Docs](https://test-prof.evilmartians.io/#/logging)
18
36
 
19
37
  - Add HTML report for `TagProf`. ([@palkan][])
20
38
 
21
39
  Generate HTML report by setting `TAG_PROF_FORMAT` to `html`.
22
40
 
41
+ - Add ability to track multiple events at the same time with `EventProf`. ([@palkan][])
42
+
23
43
  - Add `AnyFixture` DSL. ([@palkan][])
24
44
 
25
45
  Example:
@@ -35,18 +55,39 @@ before(:all) { fixture(:account) }
35
55
  let(:account) { fixture(:account) }
36
56
  ```
37
57
 
58
+ [📝 Docs](https://test-prof.evilmartians.io/#/any_fixture?id=dsl)
59
+
38
60
  - Add `AnyFixture` usage report. ([@palkan][])
39
61
 
40
- Enable `AnyFixture` usage reporting with:
62
+ Enable `AnyFixture` usage reporting with `ANYFIXTURE_REPORTING=1` or with:
41
63
 
42
64
  ```ruby
43
65
  TestProf::AnyFixture.reporting_enabled = true
44
66
  ```
45
67
 
68
+ [📝 Docs](https://test-prof.evilmartians.io/#/any_fixture?id=usage-report)
69
+
46
70
  - Add `ActiveRecordSharedConnection` recipe. ([@palkan][])
47
71
 
72
+ Force ActiveRecord to use the same connection between threads (to avoid database cleaning in browser tests).
73
+
74
+ [📝 Docs](https://test-prof.evilmartians.io/#/active_record_shared_connection)
75
+
48
76
  - [#70](https://github.com/palkan/test-prof/pull/70) Add `FactoryAllStub` recipe. ([@palkan][])
49
77
 
78
+ [📝 Docs](https://test-prof.evilmartians.io/#/factory_all_stub)
79
+
80
+ - Add `ActiveRecordRefind` refinement. ([@palkan][])
81
+
82
+ [📝 Docs](https://test-prof.evilmartians.io/#/any_fixture?id=activerecordrefind)
83
+
84
+ ### Fixes & Improvements
85
+
86
+ - **Brand new documentatation website: https://test-prof.evilmartians.io/**
87
+
88
+ - Disable referential integrity when cleaning AnyFixture. ([@palkan][])
89
+
90
+
50
91
  ## 0.4.9 (2018-03-20)
51
92
 
52
93
  - [Fix [#64](https://github.com/palkan/test-prof/issues/64)] Fix dependencies requiring for FactoryDefault. ([@palkan][])
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TestProf
4
+ module Ext
5
+ # Adds `ActiveRecord::Base#refind` method (through refinement)
6
+ module ActiveRecordRefind
7
+ refine ActiveRecord::Base do
8
+ # Returns new reloaded record.
9
+ #
10
+ # Unlike `reload` this method returns
11
+ # completely re-initialized instance.
12
+ #
13
+ # We need it to make sure that the state is clean.
14
+ def refind
15
+ self.class.find(send(self.class.primary_key))
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,4 @@
1
+ require_relative "./active_record_shared_connection"
2
+
3
+ # One ❤️
4
+ TestProf::ActiveRecordOneLove = TestProf::ActiveRecordSharedConnection
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TestProf
4
- VERSION = "0.5.0.pre2".freeze
4
+ VERSION = "0.5.0".freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test-prof
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0.pre2
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Dementyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-23 00:00:00.000000000 Z
11
+ date: 2018-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -136,6 +136,7 @@ files:
136
136
  - lib/test_prof/event_prof/profiler.rb
137
137
  - lib/test_prof/event_prof/rspec.rb
138
138
  - lib/test_prof/ext/active_record_3.rb
139
+ - lib/test_prof/ext/active_record_refind.rb
139
140
  - lib/test_prof/ext/array_bsearch_index.rb
140
141
  - lib/test_prof/ext/float_duration.rb
141
142
  - lib/test_prof/ext/string_strip_heredoc.rb
@@ -157,6 +158,7 @@ files:
157
158
  - lib/test_prof/factory_prof/printers/flamegraph.rb
158
159
  - lib/test_prof/factory_prof/printers/simple.rb
159
160
  - lib/test_prof/logging.rb
161
+ - lib/test_prof/recipes/active_record_one_love.rb
160
162
  - lib/test_prof/recipes/active_record_shared_connection.rb
161
163
  - lib/test_prof/recipes/logging.rb
162
164
  - lib/test_prof/recipes/minitest/sample.rb
@@ -200,9 +202,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
200
202
  version: 2.2.0
201
203
  required_rubygems_version: !ruby/object:Gem::Requirement
202
204
  requirements:
203
- - - ">"
205
+ - - ">="
204
206
  - !ruby/object:Gem::Version
205
- version: 1.3.1
207
+ version: '0'
206
208
  requirements: []
207
209
  rubyforge_project:
208
210
  rubygems_version: 2.7.6