benchmark_to_js 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 479d8472107c4f042a7e784c953ad551499d9424
4
- data.tar.gz: 3beb181cba8a22ba2cb40096a75a5fa2b3987579
3
+ metadata.gz: 8b341053fc099c0d918520b916f88513ca8e0e62
4
+ data.tar.gz: 8e282f9a88caa39d22fb0ea772e15a0e1f4cb227
5
5
  SHA512:
6
- metadata.gz: b200b8b9abba932732509b0cd7a6d0016e19c501727c8e64bcac980c1e01f062efbfda3badb64bb5b31829bf4e16ad1d882bc41e89b3129fb13d8e84836392ae
7
- data.tar.gz: f72afd1938772a01f40d76b8d0667af843eae506a2634adbebd032747854dd2bc95c35f2fee0a64ce124c1dde4c753d7f5db04343cb7dc1c4e171c9bd352da92
6
+ metadata.gz: 09792bcdad9795450fca1f7491bc79288ef6f138186daba87576c6df14146b8b567ea706bfbc87b76d5f780ce309ba9c714ab162859ea95ecedf64ef521443fa
7
+ data.tar.gz: 6a54c86e03e5249fb40db4969577f6ff2bcf2e76314559f053046fa45a4097118ed68c75df51fa4504bf18c01eeb6e6f67e7d2ecf71b6a926a2ea57066ddb6c2
data/README.md CHANGED
@@ -32,8 +32,8 @@ BenchmarkToJs.configure do |config|
32
32
 
33
33
  # the following only apply if pretty if set to true
34
34
  # minimum milliseconds before time is highlighted in respective colour
35
- config.red_threshold = 1000 # default 2000
36
- config.orange_threshold = 200 # default 500
35
+ config.red_threshold = 1000 # default 500
36
+ config.orange_threshold = 200 # default 100
37
37
  end
38
38
  ```
39
39
 
@@ -63,9 +63,11 @@ To use, just wrap a section of a view in a `benchmark_to_js(name)` block, like s
63
63
  Both methods will render the content as if it wasn't in the block, and a line will be logged to the Javascript console: `'my content' ran in 123.456ms`.
64
64
 
65
65
  If pretty formatting is enabled (it is by default) then your output will look something like this:
66
+
66
67
  ![Pretty console output](img/pretty.png)
67
68
 
68
69
  and if it isn't, well then it will look bland, like this:
70
+
69
71
  ![Bland console output](img/bland.png)
70
72
 
71
73
  That's all there is to it!
@@ -76,7 +78,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
76
78
 
77
79
  ## Contributing
78
80
 
79
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/benchmark_to_js. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
81
+ Bug reports and pull requests are welcome on GitHub at https://github.com/daveallie/benchmark_to_js. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
80
82
 
81
83
  ## License
82
84
 
@@ -5,8 +5,8 @@ module BenchmarkToJs
5
5
  def initialize
6
6
  self.run_in_environments = [:development]
7
7
  self.pretty = true
8
- self.orange_threshold = 500
9
- self.red_threshold = 2000
8
+ self.orange_threshold = 100
9
+ self.red_threshold = 500
10
10
  end
11
11
 
12
12
  def run?
@@ -1,3 +1,3 @@
1
1
  module BenchmarkToJs
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: benchmark_to_js
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Allie
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-02 00:00:00.000000000 Z
11
+ date: 2016-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  version: '0'
82
82
  requirements: []
83
83
  rubyforge_project:
84
- rubygems_version: 2.5.1
84
+ rubygems_version: 2.4.5.1
85
85
  signing_key:
86
86
  specification_version: 4
87
87
  summary: Benchmarks content in views and logs times to JS console.