speed 0.1.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.
- data/Manifest +4 -0
- data/Rakefile +12 -0
- data/init.rb +9 -0
- data/lib/speed.rb +21 -0
- data/speed.gemspec +30 -0
- metadata +64 -0
data/Manifest
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
require 'echoe'
|
4
|
+
|
5
|
+
Echoe.new('speed', '0.1.0') do |p|
|
6
|
+
p.description = "Quick and easy timing for ruby methods which can be used to time code in controllers or models for rails"
|
7
|
+
p.url = "http://github.com/platform45/speed"
|
8
|
+
p.author = "Platform45"
|
9
|
+
p.email = "ryan@platform45.com"
|
10
|
+
p.ignore_pattern = ["tmp/*", "script/*"]
|
11
|
+
p.development_dependencies = []
|
12
|
+
end
|
data/init.rb
ADDED
data/lib/speed.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
module Speed
|
2
|
+
def self.included(base)
|
3
|
+
base.extend ClassMethods
|
4
|
+
end
|
5
|
+
|
6
|
+
module ClassMethods
|
7
|
+
|
8
|
+
@@results = {}
|
9
|
+
|
10
|
+
def timer(name)
|
11
|
+
start_time = Time.now
|
12
|
+
yield
|
13
|
+
result = Time.now - start_time
|
14
|
+
@@results[name.to_sym] = result
|
15
|
+
end
|
16
|
+
|
17
|
+
def speed
|
18
|
+
@@results
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/speed.gemspec
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{speed}
|
5
|
+
s.version = "0.1.0"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Platform45"]
|
9
|
+
s.date = %q{2010-01-19}
|
10
|
+
s.description = %q{Quick and easy timing for ruby methods which can be used to time code in controllers or models for rails}
|
11
|
+
s.email = %q{ryan@platform45.com}
|
12
|
+
s.extra_rdoc_files = ["lib/speed.rb"]
|
13
|
+
s.files = ["Rakefile", "init.rb", "lib/speed.rb", "Manifest", "speed.gemspec"]
|
14
|
+
s.homepage = %q{http://github.com/platform45/speed}
|
15
|
+
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Speed", "--main", "README.rdoc"]
|
16
|
+
s.require_paths = ["lib"]
|
17
|
+
s.rubyforge_project = %q{speed}
|
18
|
+
s.rubygems_version = %q{1.3.5}
|
19
|
+
s.summary = %q{Quick and easy timing for ruby methods which can be used to time code in controllers or models for rails}
|
20
|
+
|
21
|
+
if s.respond_to? :specification_version then
|
22
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
23
|
+
s.specification_version = 3
|
24
|
+
|
25
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
26
|
+
else
|
27
|
+
end
|
28
|
+
else
|
29
|
+
end
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: speed
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Platform45
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2010-01-19 00:00:00 +02:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: Quick and easy timing for ruby methods which can be used to time code in controllers or models for rails
|
17
|
+
email: ryan@platform45.com
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- lib/speed.rb
|
24
|
+
files:
|
25
|
+
- Rakefile
|
26
|
+
- init.rb
|
27
|
+
- lib/speed.rb
|
28
|
+
- Manifest
|
29
|
+
- speed.gemspec
|
30
|
+
has_rdoc: true
|
31
|
+
homepage: http://github.com/platform45/speed
|
32
|
+
licenses: []
|
33
|
+
|
34
|
+
post_install_message:
|
35
|
+
rdoc_options:
|
36
|
+
- --line-numbers
|
37
|
+
- --inline-source
|
38
|
+
- --title
|
39
|
+
- Speed
|
40
|
+
- --main
|
41
|
+
- README.rdoc
|
42
|
+
require_paths:
|
43
|
+
- lib
|
44
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: "0"
|
49
|
+
version:
|
50
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: "1.2"
|
55
|
+
version:
|
56
|
+
requirements: []
|
57
|
+
|
58
|
+
rubyforge_project: speed
|
59
|
+
rubygems_version: 1.3.5
|
60
|
+
signing_key:
|
61
|
+
specification_version: 3
|
62
|
+
summary: Quick and easy timing for ruby methods which can be used to time code in controllers or models for rails
|
63
|
+
test_files: []
|
64
|
+
|