logging-couchdb 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,4 +1,9 @@
1
- == 1.0.0 / 2009-07-16
1
+ == 1.0.1 / 2009-08-14
2
+
3
+ * 1 bug fix
4
+ * Fixed timestamp formatting on the JRuby platform
5
+
6
+ == 1.0.0 / 2009-08-14
2
7
 
3
8
  * 1 major enhancement
4
9
  * Birthday!
data/Rakefile CHANGED
@@ -23,7 +23,7 @@ PROJ.name = 'logging-couchdb'
23
23
  PROJ.authors = 'Tim Pease'
24
24
  PROJ.email = 'tim.pease@gmail.com'
25
25
  PROJ.url = 'http://logging.rubyforge.org/logging-couchdb'
26
- PROJ.version = '1.0.0'
26
+ PROJ.version = '1.0.1'
27
27
  PROJ.rubyforge.name = 'logging'
28
28
  PROJ.exclude << 'logging-couchdb.gemspec'
29
29
  PROJ.readme_file = 'README.rdoc'
@@ -92,6 +92,20 @@ module Logging::Layouts
92
92
  utc.strftime(TIME_FMT) % utc.usec
93
93
  end
94
94
 
95
+ # The JRuby platform does not have microsecond resolution, so we use a
96
+ # counter to discriminate between timestamps of the same value.
97
+ if RUBY_PLATFORM == 'java'
98
+ @@discriminator = 0
99
+ class << self
100
+ undef :timestamp
101
+ def timestamp( time = nil )
102
+ @@discriminator = (@@discriminator + 1) % 1_000_000
103
+ utc = (time || Time.now).utc
104
+ utc.strftime(TIME_FMT) % @@discriminator
105
+ end
106
+ end
107
+ end
108
+
95
109
  # call-seq:
96
110
  # CouchDB.new( opts )
97
111
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logging-couchdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Pease