hitimes 1.3.0-java → 1.3.1-java

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
  SHA256:
3
- metadata.gz: a7fb91409f02b2e5af0f16c4d5d16ecaa9c4ef077f27ef4d8234572f623248d1
4
- data.tar.gz: 240b093ab591f704169d8caa0caacbbf3b233a0206f815b3e29ce0fe04e6e6d3
3
+ metadata.gz: 61b61f679bf56319c5a1f5f335d5986e0256188ec6c0a8eb7ec8971701d5c96a
4
+ data.tar.gz: cd9c29f44455b98dc716293bdd435954600905889c2708eeeb94a886738b28d7
5
5
  SHA512:
6
- metadata.gz: cbf663cc05e0807609461c6889e9a25368593011803f7eb253be0caf59822cd7b5340079c4e8238cc0a2e7a19162e3da73645543be2cdfdf42769dbb0afec817
7
- data.tar.gz: 30fedc4a26b69fb6d9ee8fd32015a7f1964696af5a8ec864b995014f3188012889e6b6ceaff50bc691661a4544897f1ac5575b90d253d092a1d1dba549d9d42f
6
+ metadata.gz: 8173957068204b1ad984501a19519ec71b6fb6f54ea25ded38019ce406d49dda58a68de2caca4a8b40dc3188c3cc9c9f1f287add525f412532a56b9e1da016ae
7
+ data.tar.gz: cf93e616a682dfc5e8e03f03103f1c611664bb456986614107b0c8754c5bf6d305b9276dbfd4f189e4d0d0b19b21cdbe6deb4c39edc628094abff43b4dea89fb
data/HISTORY.md CHANGED
@@ -1,4 +1,10 @@
1
1
  # Hitimes Changelog
2
+ ## Version 1.3.1 2019-01-18
3
+
4
+ * Update jruby extension to not use global runtime state (thanks @kares) (#70)
5
+ * Update travis CI config
6
+ * Update documentataion for Ruby 2.6
7
+
2
8
  ## Version 1.3.0 2018-06-15
3
9
 
4
10
  * Add api method `Hitimes.raw_instant` to expose raw OS instant value
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  [![Build Status](https://travis-ci.org/copiousfreetime/hitimes.svg?branch=master)](https://travis-ci.org/copiousfreetime/hitimes)
4
4
 
5
+ ## Description
6
+
5
7
  A fast, high resolution timer library for recording peformance metrics.
6
8
 
7
9
  * [Homepage](http://github.com/copiousfreetime/hitimes)
@@ -159,14 +161,14 @@ Hitimes also follows [semantic versioning](http://semver.org/).
159
161
 
160
162
  The current officially supported versions of Ruby are:
161
163
 
162
- * MRI Ruby (all platforms) 2.2 - 2.4
163
- * JRuby 1.7.25, 9.0.5.0
164
+ * MRI Ruby (all platforms) 2.3 - 2.6
165
+ * JRuby 9.1.17.0, 9.2.X.X
164
166
 
165
167
  Unofficially supported versions, these have been supported in the past when they
166
168
  were the primary rubies around. In all likelihood they still work, but are not
167
169
  supported.
168
170
 
169
- * MRI Ruby (linux/mac/bsd/unix/etc) - everything from 1.8.7 to 2.1
171
+ * MRI Ruby (linux/mac/bsd/unix/etc) - everything from 1.8.7 to 2.2
170
172
  * MRI Ruby (windows) - 2.0 and up
171
173
  * Ruby 1.8 and 1.9 for windows are supported in hitimes version 1.2.4 or earlier
172
174
  * JRuby - I think everything back to 1.4
@@ -4,7 +4,10 @@
4
4
  #include <mach/mach.h>
5
5
  #include <mach/mach_time.h>
6
6
 
7
- /* All this OSX code is adapted from http://developer.apple.com/library/mac/#qa/qa1398/_index.html */
7
+ /* All this OSX code is adapted from
8
+ * https://developer.apple.com/library/archive/qa/qa1398/_index.html
9
+ */
10
+
8
11
 
9
12
  /*
10
13
  * returns the conversion factor, this value is used to convert
@@ -3,20 +3,18 @@ package hitimes;
3
3
  import java.lang.Math;
4
4
  import java.lang.System;
5
5
 
6
- import org.jruby.anno.JRubyClass;
7
- import org.jruby.anno.JRubyMethod;
8
- import org.jruby.anno.JRubyModule;
9
- import org.jruby.anno.JRubyConstant;
10
- import org.jruby.runtime.Visibility;
11
-
12
6
  import org.jruby.Ruby;
13
7
  import org.jruby.RubyClass;
14
8
  import org.jruby.RubyException;
15
9
  import org.jruby.RubyModule;
16
10
  import org.jruby.RubyObject;
17
-
11
+ import org.jruby.anno.JRubyClass;
12
+ import org.jruby.anno.JRubyMethod;
13
+ import org.jruby.anno.JRubyModule;
14
+ import org.jruby.anno.JRubyConstant;
18
15
  import org.jruby.exceptions.RaiseException;
19
-
16
+ import org.jruby.runtime.ThreadContext;
17
+ import org.jruby.runtime.Visibility;
20
18
  import org.jruby.runtime.builtin.IRubyObject;
21
19
 
22
20
 
@@ -28,15 +26,14 @@ public class Hitimes {
28
26
 
29
27
  public static final double INSTANT_CONVERSION_FACTOR = 1000000000d;
30
28
 
31
- private static final Ruby __ruby__ = Ruby.getGlobalRuntime();
32
-
33
29
  public static RubyClass hitimesIntervalClass;
30
+
34
31
  /**
35
32
  * Create the Hitimes module and add it to the Ruby runtime.
36
33
  */
37
34
  public static RubyModule createHitimesModule( Ruby runtime ) {
38
35
  RubyModule mHitimes = runtime.defineModule("Hitimes");
39
- mHitimes.defineConstant("INSTANT_CONVERSION_FACTOR", __ruby__.newFloat(INSTANT_CONVERSION_FACTOR));
36
+ mHitimes.defineConstant("INSTANT_CONVERSION_FACTOR", runtime.newFloat(INSTANT_CONVERSION_FACTOR));
40
37
  mHitimes.defineAnnotatedMethods( Hitimes.class );
41
38
 
42
39
  RubyClass cStandardError = runtime.getStandardError();
@@ -59,8 +56,8 @@ public class Hitimes {
59
56
 
60
57
 
61
58
  @JRubyMethod( name = "raw_instant", module = true )
62
- public static IRubyObject rawInstant(IRubyObject self) {
63
- return __ruby__.newFixnum( System.nanoTime() );
59
+ public static IRubyObject rawInstant(ThreadContext context, IRubyObject self) {
60
+ return context.runtime.newFixnum( System.nanoTime() );
64
61
  }
65
62
 
66
63
  }
Binary file
@@ -4,5 +4,5 @@
4
4
  #++
5
5
 
6
6
  module Hitimes
7
- VERSION = "1.3.0"
7
+ VERSION = "1.3.1"
8
8
  end
@@ -28,7 +28,7 @@ class ThisProject
28
28
  @exclude_from_manifest = Regexp.union(/\.(git|DS_Store)/,
29
29
  /^(doc|coverage|pkg|tmp|Gemfile(\.lock)?)/,
30
30
  /^[^\/]+\.gemspec/,
31
- /\.(swp|jar|bundle|so|rvmrc|travis.yml)$/,
31
+ /\.(swp|jar|bundle|so|rvmrc|travis.yml|byebug_history)$/,
32
32
  /~$/)
33
33
  @gemspecs = Hash.new
34
34
  yield self if block_given?
@@ -146,7 +146,7 @@ class ThisProject
146
146
  spec.rdoc_options = [ "--main" , 'README.md',
147
147
  "--markup", "tomdoc" ]
148
148
 
149
- spec.required_ruby_version = '>= 1.9.3'
149
+ spec.required_ruby_version = '>= 2.2.2'
150
150
  end
151
151
  end
152
152
 
@@ -178,9 +178,9 @@ class ThisProject
178
178
  (RUBY_PLATFORM == "java") ? 'java' : Gem::Platform::RUBY
179
179
  end
180
180
 
181
- # Internal: Return the DESCRIPTION section of the README.rdoc file
181
+ # Internal: Return the Description section of the README.rdoc file
182
182
  def description_section
183
- section_of( 'README.md', 'Hitimes')
183
+ section_of( 'README.md', 'Description')
184
184
  end
185
185
 
186
186
  # Internal: Return the summary text from the README
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hitimes
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: java
6
6
  authors:
7
7
  - Jeremy Hinegardner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-15 00:00:00.000000000 Z
11
+ date: 2019-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -108,10 +108,9 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0.14'
111
- description: "(https://travis-ci.org/copiousfreetime/hitimes.svg?branch=master)](https://travis-ci.org/copiousfreetime/hitimes)\
112
- \ A fast, high resolution timer library for recording peformance metrics. * (http://github.com/copiousfreetime/hitimes)\
113
- \ * (http://github.com.org/copiousfreetime/hitimes) * email jeremy at copiousfreetime\
114
- \ dot org * `git clone url git://github.com/copiousfreetime/hitimes.git`"
111
+ description: A fast, high resolution timer library for recording peformance metrics.
112
+ * (http://github.com/copiousfreetime/hitimes) * (http://github.com.org/copiousfreetime/hitimes)
113
+ * email jeremy at copiousfreetime dot org * `git clone url git://github.com/copiousfreetime/hitimes.git`
115
114
  email: jeremy@copiousfreetime.org
116
115
  executables: []
117
116
  extensions: []
@@ -182,7 +181,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
182
181
  requirements:
183
182
  - - ">="
184
183
  - !ruby/object:Gem::Version
185
- version: 1.9.3
184
+ version: 2.2.2
186
185
  required_rubygems_version: !ruby/object:Gem::Requirement
187
186
  requirements:
188
187
  - - ">="
@@ -193,7 +192,7 @@ rubyforge_project:
193
192
  rubygems_version: 2.7.6
194
193
  signing_key:
195
194
  specification_version: 4
196
- summary: "[![Build Status](https://travis-ci.org/copiousfreetime/hitimes.svg?branch=master)](https://travis-ci.org/copiousfreetime/hitimes)"
195
+ summary: A fast, high resolution timer library for recording peformance metrics.
197
196
  test_files:
198
197
  - spec/hitimes_spec.rb
199
198
  - spec/interval_spec.rb