isomorfeus-iodine 0.7.46 → 0.7.49

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,11 +1,10 @@
1
- source 'https://rubygems.org'
2
-
3
- group :test do
4
- gem 'pry'
5
- gem 'rspec'
6
- gem 'rack'
7
- gem 'http'
8
- end
9
-
10
- # Specify your gem's dependencies in iodine.gemspec
11
- gemspec
1
+ source 'https://rubygems.org'
2
+
3
+ group :test do
4
+ gem 'rspec'
5
+ gem 'rack'
6
+ gem 'http'
7
+ end
8
+
9
+ # Specify your gem's dependencies in iodine.gemspec
10
+ gemspec
data/bin/console CHANGED
@@ -1,22 +1,18 @@
1
- #!/usr/bin/env ruby
2
-
3
- # this will compile Iodine and start a Ruby console with the Iodine gem loaded.
4
-
5
- Dir.chdir(File.expand_path(File.join('..', '..'), __FILE__))
6
- puts `rake clean`
7
- puts `rake compile`
8
-
9
- require 'benchmark'
10
- $LOAD_PATH.unshift File.expand_path(File.join('..', '..', 'lib'), __FILE__ )
11
- require "bundler/setup"
12
- require "iodine"
13
-
14
- # You can add fixtures and/or initialization code here to make experimenting
15
- # with your gem easier. You can also use a different console, if you like.
16
-
17
- # (If you use this, don't forget to add pry to your Gemfile!)
18
- # require "pry"
19
- # Pry.start
20
-
21
- require "irb"
22
- IRB.start
1
+ #!/usr/bin/env ruby
2
+
3
+ # this will compile Iodine and start a Ruby console with the Iodine gem loaded.
4
+
5
+ Dir.chdir(File.expand_path(File.join('..', '..'), __FILE__))
6
+ puts `rake clean`
7
+ puts `rake compile`
8
+
9
+ require 'benchmark'
10
+ $LOAD_PATH.unshift File.expand_path(File.join('..', '..', 'lib'), __FILE__ )
11
+ require "bundler/setup"
12
+ require "iodine"
13
+
14
+ # You can add fixtures and/or initialization code here to make experimenting
15
+ # with your gem easier. You can also use a different console, if you like.
16
+
17
+ require "irb"
18
+ IRB.start
@@ -0,0 +1,9 @@
1
+ image: ruby:3.1
2
+
3
+ pipelines:
4
+ default:
5
+ - step:
6
+ name: specs
7
+ script:
8
+ - bundle install
9
+ - bundle exec rake
@@ -1,5 +1,19 @@
1
1
  require 'mkmf'
2
2
 
3
+ WIN_PATTERNS = [
4
+ /bccwin/i,
5
+ /cygwin/i,
6
+ /djgpp/i,
7
+ /mingw/i,
8
+ /mswin/i,
9
+ /wince/i,
10
+ ].freeze
11
+
12
+ def win_platform?
13
+ ruby_platform = RbConfig::CONFIG['host_os']
14
+ !!WIN_PATTERNS.find {|r| ruby_platform =~ r }
15
+ end
16
+
3
17
  # Test polling
4
18
  def iodine_test_polling_support
5
19
  iodine_poll_test_kqueue = <<EOS
@@ -36,7 +50,7 @@ int main(void) {
36
50
  EOS
37
51
 
38
52
  # Test for manual selection and then TRY_COMPILE with each polling engine
39
- if Gem.win_platform?
53
+ if win_platform?
40
54
  puts "skipping polling tests, using WSAPOLL on Windows"
41
55
  $defs << "-DFIO_ENGINE_WSAPOLL"
42
56
  elsif ENV['FIO_POLL']
@@ -67,7 +81,7 @@ end
67
81
 
68
82
  iodine_test_polling_support()
69
83
 
70
- unless Gem.win_platform?
84
+ unless win_platform?
71
85
  # Test for OpenSSL version equal to 1.0.0 or greater.
72
86
  unless ENV['NO_SSL'] || ENV['NO_TLS'] || ENV["DISABLE_SSL"]
73
87
  OPENSSL_TEST_CODE = <<EOS