timer 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (8) hide show
  1. data/Gemfile +8 -0
  2. data/History.txt +3 -3
  3. data/README.rdoc +20 -1
  4. data/Rakefile +13 -7
  5. data/VERSION +1 -1
  6. data/timer.gemspec +32 -21
  7. metadata +119 -31
  8. data/.gitignore +0 -21
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source :rubygems
2
+
3
+ gem "ruby-growl", ">= 0"
4
+ gem "progressions-g", ">= 0"
5
+ gem "activesupport", :require => "active_support"
6
+ gem "natural_time", ">= 0"
7
+ gem "rspec", ">= 0"
8
+ gem "timecop", ">= 0"
@@ -1,8 +1,8 @@
1
- == 0.1.5
1
+ == 0.1.5 2010-01-16
2
2
  * minor enhancements
3
3
  * when an exception occurs during a timed block, output the exception message
4
4
 
5
- == 0.1.4
5
+ == 0.1.4 2010-01-13
6
6
  * minor enhancements
7
7
  * extracted natural time output into 'natural_time' gem
8
-
8
+ * when an exception occurs during a timed block, output the elapsed time and re-raise
@@ -1,6 +1,25 @@
1
1
  = timer
2
2
 
3
- Description goes here.
3
+ Simple timer to display elapsed time of a block.
4
+
5
+ == Usage
6
+
7
+ 1. Instantiate timer with optional Growl message timer.
8
+
9
+ timer = Timer.new(:title => "My Timer")
10
+
11
+ 2. Call the timer with a block and optional message to output.
12
+
13
+ timer.time("The block has finished executing!") do
14
+ # some code in here
15
+ end
16
+
17
+ == Options
18
+
19
+ Timer.new takes two optional parameters:
20
+
21
+ [title] (string) Growl message title
22
+ [growl] (boolean) Turn Growl messaging off. It is on by default.
4
23
 
5
24
  == Note on Patches/Pull Requests
6
25
 
data/Rakefile CHANGED
@@ -10,11 +10,11 @@ begin
10
10
  gem.email = "progressions@gmail.com"
11
11
  gem.homepage = "http://github.com/progressions/timer"
12
12
  gem.authors = ["Jeff Coleman"]
13
- gem.add_development_dependency "ruby-growl", ">= 0"
14
- gem.add_development_dependency "progressions-g", ">= 0"
15
- gem.add_development_dependency "rspec", ">= 0"
16
- gem.add_development_dependency "timecop", ">= 0"
17
- gem.add_development_dependency "natural_time", ">= 0"
13
+ gem.add_runtime_dependency "ruby-growl", ">= 0"
14
+ gem.add_runtime_dependency "progressions-g", ">= 0"
15
+ gem.add_runtime_dependency "natural_time", ">= 0"
16
+ # gem.add_development_dependency "rspec", ">= 0"
17
+ # gem.add_development_dependency "timecop", ">= 0"
18
18
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
19
19
  end
20
20
  Jeweler::GemcutterTasks.new
@@ -32,10 +32,16 @@ end
32
32
  Spec::Rake::SpecTask.new(:rcov) do |spec|
33
33
  spec.libs << 'lib' << 'spec'
34
34
  spec.pattern = 'spec/**/*_spec.rb'
35
+ spec.rcov_opts = ['--exclude', '.gem,Library,spec', '--sort', 'coverage']
35
36
  spec.rcov = true
36
37
  end
37
38
 
38
- task :spec => :check_dependencies
39
+ task :bundle do
40
+ require 'vendor/gems/environment'
41
+ Bundler.require_env
42
+ end
43
+
44
+ task :spec => [:bundle, :check_dependencies]
39
45
 
40
46
  task :default => :spec
41
47
 
@@ -44,7 +50,7 @@ Rake::RDocTask.new do |rdoc|
44
50
  version = File.exist?('VERSION') ? File.read('VERSION') : ""
45
51
 
46
52
  rdoc.rdoc_dir = 'rdoc'
47
- rdoc.title = "translator #{version}"
53
+ rdoc.title = "YMDP #{version}"
48
54
  rdoc.rdoc_files.include('README*')
49
55
  rdoc.rdoc_files.include('lib/**/*.rb')
50
56
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5
1
+ 0.1.6
@@ -1,37 +1,36 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{timer}
8
- s.version = "0.1.5"
8
+ s.version = "0.1.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jeff Coleman"]
12
- s.date = %q{2010-01-16}
12
+ s.date = %q{2011-04-04}
13
13
  s.description = %q{Simple timer to perform a block and display the elapsed time. Growls message if growl is turned on.}
14
14
  s.email = %q{progressions@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
- "README.rdoc"
17
+ "README.rdoc"
18
18
  ]
19
19
  s.files = [
20
20
  ".document",
21
- ".gitignore",
22
- "History.txt",
23
- "LICENSE",
24
- "README.rdoc",
25
- "Rakefile",
26
- "VERSION",
27
- "lib/timer.rb",
28
- "spec/timer_spec.rb",
29
- "timer.gemspec"
21
+ "Gemfile",
22
+ "History.txt",
23
+ "LICENSE",
24
+ "README.rdoc",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "lib/timer.rb",
28
+ "spec/timer_spec.rb",
29
+ "timer.gemspec"
30
30
  ]
31
31
  s.homepage = %q{http://github.com/progressions/timer}
32
- s.rdoc_options = ["--charset=UTF-8"]
33
32
  s.require_paths = ["lib"]
34
- s.rubygems_version = %q{1.3.5}
33
+ s.rubygems_version = %q{1.3.7}
35
34
  s.summary = %q{Simple timer to perform a block and display the elapsed time}
36
35
  s.test_files = [
37
36
  "spec/timer_spec.rb"
@@ -41,24 +40,36 @@ Gem::Specification.new do |s|
41
40
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
42
41
  s.specification_version = 3
43
42
 
44
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
45
- s.add_development_dependency(%q<ruby-growl>, [">= 0"])
46
- s.add_development_dependency(%q<progressions-g>, [">= 0"])
47
- s.add_development_dependency(%q<rspec>, [">= 0"])
48
- s.add_development_dependency(%q<timecop>, [">= 0"])
49
- s.add_development_dependency(%q<natural_time>, [">= 0"])
43
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
44
+ s.add_runtime_dependency(%q<ruby-growl>, [">= 0"])
45
+ s.add_runtime_dependency(%q<progressions-g>, [">= 0"])
46
+ s.add_runtime_dependency(%q<activesupport>, [">= 0"])
47
+ s.add_runtime_dependency(%q<natural_time>, [">= 0"])
48
+ s.add_runtime_dependency(%q<rspec>, [">= 0"])
49
+ s.add_runtime_dependency(%q<timecop>, [">= 0"])
50
+ s.add_runtime_dependency(%q<ruby-growl>, [">= 0"])
51
+ s.add_runtime_dependency(%q<progressions-g>, [">= 0"])
52
+ s.add_runtime_dependency(%q<natural_time>, [">= 0"])
50
53
  else
51
54
  s.add_dependency(%q<ruby-growl>, [">= 0"])
52
55
  s.add_dependency(%q<progressions-g>, [">= 0"])
56
+ s.add_dependency(%q<activesupport>, [">= 0"])
57
+ s.add_dependency(%q<natural_time>, [">= 0"])
53
58
  s.add_dependency(%q<rspec>, [">= 0"])
54
59
  s.add_dependency(%q<timecop>, [">= 0"])
60
+ s.add_dependency(%q<ruby-growl>, [">= 0"])
61
+ s.add_dependency(%q<progressions-g>, [">= 0"])
55
62
  s.add_dependency(%q<natural_time>, [">= 0"])
56
63
  end
57
64
  else
58
65
  s.add_dependency(%q<ruby-growl>, [">= 0"])
59
66
  s.add_dependency(%q<progressions-g>, [">= 0"])
67
+ s.add_dependency(%q<activesupport>, [">= 0"])
68
+ s.add_dependency(%q<natural_time>, [">= 0"])
60
69
  s.add_dependency(%q<rspec>, [">= 0"])
61
70
  s.add_dependency(%q<timecop>, [">= 0"])
71
+ s.add_dependency(%q<ruby-growl>, [">= 0"])
72
+ s.add_dependency(%q<progressions-g>, [">= 0"])
62
73
  s.add_dependency(%q<natural_time>, [">= 0"])
63
74
  end
64
75
  end
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ hash: 23
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 6
10
+ version: 0.1.6
5
11
  platform: ruby
6
12
  authors:
7
13
  - Jeff Coleman
@@ -9,59 +15,135 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2010-01-16 00:00:00 -06:00
18
+ date: 2011-04-04 00:00:00 -05:00
13
19
  default_executable:
14
20
  dependencies:
15
21
  - !ruby/object:Gem::Dependency
16
- name: ruby-growl
17
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ requirement: &id001 !ruby/object:Gem::Requirement
23
+ none: false
20
24
  requirements:
21
25
  - - ">="
22
26
  - !ruby/object:Gem::Version
27
+ hash: 3
28
+ segments:
29
+ - 0
23
30
  version: "0"
24
- version:
31
+ type: :runtime
32
+ name: ruby-growl
33
+ prerelease: false
34
+ version_requirements: *id001
25
35
  - !ruby/object:Gem::Dependency
36
+ requirement: &id002 !ruby/object:Gem::Requirement
37
+ none: false
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ hash: 3
42
+ segments:
43
+ - 0
44
+ version: "0"
45
+ type: :runtime
26
46
  name: progressions-g
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
47
+ prerelease: false
48
+ version_requirements: *id002
49
+ - !ruby/object:Gem::Dependency
50
+ requirement: &id003 !ruby/object:Gem::Requirement
51
+ none: false
30
52
  requirements:
31
53
  - - ">="
32
54
  - !ruby/object:Gem::Version
55
+ hash: 3
56
+ segments:
57
+ - 0
33
58
  version: "0"
34
- version:
59
+ type: :runtime
60
+ name: activesupport
61
+ prerelease: false
62
+ version_requirements: *id003
35
63
  - !ruby/object:Gem::Dependency
36
- name: rspec
37
- type: :development
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
64
+ requirement: &id004 !ruby/object:Gem::Requirement
65
+ none: false
40
66
  requirements:
41
67
  - - ">="
42
68
  - !ruby/object:Gem::Version
69
+ hash: 3
70
+ segments:
71
+ - 0
43
72
  version: "0"
44
- version:
73
+ type: :runtime
74
+ name: natural_time
75
+ prerelease: false
76
+ version_requirements: *id004
77
+ - !ruby/object:Gem::Dependency
78
+ requirement: &id005 !ruby/object:Gem::Requirement
79
+ none: false
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ hash: 3
84
+ segments:
85
+ - 0
86
+ version: "0"
87
+ type: :runtime
88
+ name: rspec
89
+ prerelease: false
90
+ version_requirements: *id005
45
91
  - !ruby/object:Gem::Dependency
92
+ requirement: &id006 !ruby/object:Gem::Requirement
93
+ none: false
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ hash: 3
98
+ segments:
99
+ - 0
100
+ version: "0"
101
+ type: :runtime
46
102
  name: timecop
47
- type: :development
48
- version_requirement:
49
- version_requirements: !ruby/object:Gem::Requirement
103
+ prerelease: false
104
+ version_requirements: *id006
105
+ - !ruby/object:Gem::Dependency
106
+ requirement: &id007 !ruby/object:Gem::Requirement
107
+ none: false
50
108
  requirements:
51
109
  - - ">="
52
110
  - !ruby/object:Gem::Version
111
+ hash: 3
112
+ segments:
113
+ - 0
53
114
  version: "0"
54
- version:
115
+ type: :runtime
116
+ name: ruby-growl
117
+ prerelease: false
118
+ version_requirements: *id007
55
119
  - !ruby/object:Gem::Dependency
56
- name: natural_time
57
- type: :development
58
- version_requirement:
59
- version_requirements: !ruby/object:Gem::Requirement
120
+ requirement: &id008 !ruby/object:Gem::Requirement
121
+ none: false
60
122
  requirements:
61
123
  - - ">="
62
124
  - !ruby/object:Gem::Version
125
+ hash: 3
126
+ segments:
127
+ - 0
63
128
  version: "0"
64
- version:
129
+ type: :runtime
130
+ name: progressions-g
131
+ prerelease: false
132
+ version_requirements: *id008
133
+ - !ruby/object:Gem::Dependency
134
+ requirement: &id009 !ruby/object:Gem::Requirement
135
+ none: false
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ hash: 3
140
+ segments:
141
+ - 0
142
+ version: "0"
143
+ type: :runtime
144
+ name: natural_time
145
+ prerelease: false
146
+ version_requirements: *id009
65
147
  description: Simple timer to perform a block and display the elapsed time. Growls message if growl is turned on.
66
148
  email: progressions@gmail.com
67
149
  executables: []
@@ -73,7 +155,7 @@ extra_rdoc_files:
73
155
  - README.rdoc
74
156
  files:
75
157
  - .document
76
- - .gitignore
158
+ - Gemfile
77
159
  - History.txt
78
160
  - LICENSE
79
161
  - README.rdoc
@@ -87,26 +169,32 @@ homepage: http://github.com/progressions/timer
87
169
  licenses: []
88
170
 
89
171
  post_install_message:
90
- rdoc_options:
91
- - --charset=UTF-8
172
+ rdoc_options: []
173
+
92
174
  require_paths:
93
175
  - lib
94
176
  required_ruby_version: !ruby/object:Gem::Requirement
177
+ none: false
95
178
  requirements:
96
179
  - - ">="
97
180
  - !ruby/object:Gem::Version
181
+ hash: 3
182
+ segments:
183
+ - 0
98
184
  version: "0"
99
- version:
100
185
  required_rubygems_version: !ruby/object:Gem::Requirement
186
+ none: false
101
187
  requirements:
102
188
  - - ">="
103
189
  - !ruby/object:Gem::Version
190
+ hash: 3
191
+ segments:
192
+ - 0
104
193
  version: "0"
105
- version:
106
194
  requirements: []
107
195
 
108
196
  rubyforge_project:
109
- rubygems_version: 1.3.5
197
+ rubygems_version: 1.3.7
110
198
  signing_key:
111
199
  specification_version: 3
112
200
  summary: Simple timer to perform a block and display the elapsed time
data/.gitignore DELETED
@@ -1,21 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
-
21
- ## PROJECT::SPECIFIC