perf_check 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/perf_check.rb +9 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e0e25955cf46ff8c60f89fd100b0b5d703f2df6e
4
- data.tar.gz: b70ba9a5ecf9854ac6e5af27b119cad648dff252
3
+ metadata.gz: 2a66eabc2b36e8257419f44c113e11ec19f2f339
4
+ data.tar.gz: 7fdfbef74b3db666df336027fb63e6ec0f016795
5
5
  SHA512:
6
- metadata.gz: 820fd8b86419044532a6c70e90c948a089f170b49ea910f85c513324f0ed56d76d6715724a0f872c00f9663ce4a02c8b441f763417f5edd7b0618cb76f110ba2
7
- data.tar.gz: 6586b514e93e2b4c7fff9aff07b6ca62f99169a67f556dbbfc16d9737c87031d37dddd9f201cba2103e50458da64daf6176e7e954a1d2bf5e987540c23acaad7
6
+ metadata.gz: 9e2d134152bbc26848ff87509850cdbafe6adf50c30b3ce47d449eb6c16cceb2720898b18922a00401f40ef21fc9f153ca871424b5c835a70c7143d6925d4d98
7
+ data.tar.gz: 20365e6a9fcb875be86f6dec98906ad481c1f4e764d9d61cad5df384473aa01761142cbeab5462b733b66f680c04b471d08824ec7578c6c312e0c3c55ac3d13e
data/lib/perf_check.rb CHANGED
@@ -42,8 +42,15 @@ class PerfCheck
42
42
  if File.exists?("#{app_root}/config/perf_check.rb")
43
43
  this = self
44
44
  Kernel.send(:define_method, :perf_check){ this }
45
- load "#{app_root}/config/perf_check.rb"
46
- Kernel.send(:remove_method, :perf_check)
45
+
46
+ dir = Dir.pwd
47
+ begin
48
+ Dir.chdir(app_root)
49
+ load "#{app_root}/config/perf_check.rb"
50
+ ensure
51
+ Dir.chdir(dir)
52
+ Kernel.send(:remove_method, :perf_check)
53
+ end
47
54
  end
48
55
  end
49
56
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: perf_check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - rubytune