perf_check 0.0.1 → 0.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
  SHA1:
3
- metadata.gz: ad9b614a45f9c940d13bb09e72a51cc2828b7bb0
4
- data.tar.gz: f4bb7ee841ca754a94637afd3a9c60cf75200b8b
3
+ metadata.gz: 8d4485198a9057ea60ba1525b6ac00a1ef202aa3
4
+ data.tar.gz: fb4528654f7042955e990f6f267b3378a03b5138
5
5
  SHA512:
6
- metadata.gz: 0eae9a892b51c88cbb0121560fd6c25e73167cf81847090d562057a057a087686bf486e398f2599309bb17f6f401e66a3252fbe8cbac52856aef6aa10a76a952
7
- data.tar.gz: bf036d6e5baf5a8fd0d4e2f5c5aeb35f99e45c9b52ce598b2a8bc94c48f2fed78b3c5c2d4eae3a7f70bdb4c70a918ce271135daa5ce2c9416ced712809e808a5
6
+ metadata.gz: 6771cc650d1712c2308f56625b7f177edd1484cfbd57b368e8ca977974f2a9b45003ad7b49647233c25756528fa4a288384c7580279784146f86c76f95db4a9c
7
+ data.tar.gz: 70e0bcf7aa68b5161eb09096c2047113515170fb63a6a2a4130e9e4ffc1c141909276bdc5101ea0058992ffef0bb9a7a66446cfe218196a3aead3f004169497f
data/bin/perf_check CHANGED
@@ -33,7 +33,8 @@ opts = OptionParser.new do |opts|
33
33
  end
34
34
 
35
35
  opts.separator "\nBenchmark options:"
36
- opts.on('--requests N', '-n', 'Use N requests in benchmark, defaults to ') do |n|
36
+ opts.on('--requests N', '-n',
37
+ 'Use N requests in benchmark, defaults to 10') do |n|
37
38
  options.number_of_requests = n.to_i
38
39
  end
39
40
 
@@ -11,7 +11,7 @@ class PerfCheck
11
11
  def self.checkout_reference(reference='master')
12
12
  checkout(reference)
13
13
  at_exit do
14
- puts
14
+ $stderr.puts
15
15
  Git.checkout_current_branch
16
16
  end
17
17
  end
@@ -21,16 +21,16 @@ class PerfCheck
21
21
  end
22
22
 
23
23
  def self.checkout(branch)
24
- print "Checking out #{branch}... "
24
+ $stderr.print "Checking out #{branch}... "
25
25
  `git checkout #{branch} --quiet`
26
- puts "Problem with git checkout! Bailing..." and exit(1) unless $?.success?
26
+ abort "Problem with git checkout! Bailing..." unless $?.success?
27
27
  end
28
28
 
29
29
  def self.stash_if_needed
30
30
  if anything_to_stash?
31
- print("Stashing your changes... ")
31
+ $stderr.print("Stashing your changes... ")
32
32
  system('git stash -q >/dev/null')
33
- puts("Problem with git stash! Bailing...") and exit(1) unless $?.success?
33
+ abort("Problem with git stash! Bailing...") unless $?.success?
34
34
  at_exit do
35
35
  Git.pop
36
36
  end
@@ -44,9 +44,9 @@ class PerfCheck
44
44
  end
45
45
 
46
46
  def self.pop
47
- puts("Git stash applying...")
47
+ warn("Git stash applying...")
48
48
  system('git stash pop -q')
49
- puts("Problem with git stash! Bailing...") and exit(1) unless $?.success?
49
+ abort("Problem with git stash! Bailing...") unless $?.success?
50
50
  end
51
51
  end
52
52
 
@@ -84,10 +84,10 @@ class PerfCheck
84
84
 
85
85
  def restart
86
86
  if !@running
87
- print "starting rails..."
87
+ $stderr.print "starting rails..."
88
88
  start
89
89
  else
90
- print "re-starting rails..."
90
+ $stderr.print "re-starting rails..."
91
91
  exit
92
92
  start
93
93
  end
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.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - rubytune