win32-api 1.5.1-universal-mingw32 → 1.5.2-universal-mingw32

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
  SHA1:
3
- metadata.gz: 8c920b8eacb567c87bdd29eacdf4c2efaa8a3743
4
- data.tar.gz: 9f3da9d42ed3c5bb1c886f0c09fc01ba410fd6ad
3
+ metadata.gz: 40600be0a4b0d43c92a249dd1f508562d7ef399e
4
+ data.tar.gz: 7c13f96cb0ef6725dd590f6c93bc643aa54ba709
5
5
  SHA512:
6
- metadata.gz: 3a2e33ead9630fda6b92d5e649a250bedb21f9192b2d22ce65ff5119b96d5f82613c1f22d34b547da90742aed10acb955cfd9736c58111b3e6ee1a4c8d5dafde
7
- data.tar.gz: c47f3a2c23fc05820d700e0c3616d30fd9bbdd7e9905d6d578dc62498c6d6af52cf25b4e35cd96b4640edd421c9cbe5b55ca158ebdb696cbcb4a3fadfaad6477
6
+ metadata.gz: e48d26d32bc1ec16a985313f282f3e8d8589bc8946d3c632b6388fe273d86ca19ab3125cb735704923b6133225f0f9fec3cb1119d5532eaca2dd7c8600eebd17
7
+ data.tar.gz: 88912d1a2c5bf6abeb28f5f81bea9064b4faebf3bd9a9ce18a9708a12c09b01793ad7ca4f56de14b3350be5503b103d666f4aa9776cacac98898ca2b10f384a6
data/CHANGES CHANGED
@@ -1,3 +1,7 @@
1
+ == 1.5.2 - 11-Oct-2014
2
+ * Now includes binaries for Ruby 2.1 for both 32 and 64 bit versions.
3
+ * Some refactoring of the gem:binary task, mostly for me.
4
+
1
5
  == 1.5.1 - 14-Feb-2014
2
6
  * Fixed a potential zero-initialization issue. Thanks go to Peter Huene
3
7
  for the spot and the patch.
data/README CHANGED
@@ -110,7 +110,7 @@
110
110
  converted to use either FFI or an OLE approach.
111
111
 
112
112
  = Copyright
113
- (C) 2003-2013 Daniel J. Berger
113
+ (C) 2003-2014 Daniel J. Berger
114
114
  All Rights Reserved
115
115
 
116
116
  = License
data/Rakefile CHANGED
@@ -60,24 +60,21 @@ namespace 'gem' do
60
60
  end
61
61
 
62
62
  desc 'Build a binary gem'
63
- task :binary, :ruby18, :ruby19, :ruby2_32, :ruby2_64 do |task, args|
63
+ task :binary, :ruby18, :ruby19, :ruby2_32, :ruby2_64, :ruby21, :ruby21_64 do |task, args|
64
64
  require 'devkit'
65
65
 
66
66
  # These are just what's on my system at the moment. Adjust as needed.
67
67
  args.with_defaults(
68
- :ruby18 => "c:/ruby187/bin/ruby",
69
- :ruby19 => "c:/ruby193/bin/ruby",
70
- :ruby2_32 => "c:/ruby2/bin/ruby",
71
- :ruby2_64 => "c:/ruby264/bin/ruby"
68
+ :ruby18 => "c:/ruby187/bin/ruby",
69
+ :ruby19 => "c:/ruby193/bin/ruby",
70
+ :ruby2_32 => "c:/ruby2/bin/ruby",
71
+ :ruby2_64 => "c:/ruby264/bin/ruby",
72
+ :ruby21_32 => "c:/ruby21/bin/ruby",
73
+ :ruby21_64 => "c:/ruby21-x64/bin/ruby"
72
74
  )
73
75
 
74
76
  Rake::Task[:clobber].invoke
75
77
 
76
- mkdir_p 'lib/win32/ruby18/win32'
77
- mkdir_p 'lib/win32/ruby19/win32'
78
- mkdir_p 'lib/win32/ruby2_32/win32'
79
- mkdir_p 'lib/win32/ruby2_64/win32'
80
-
81
78
  args.each{ |key, rubyx|
82
79
  # Adjust devkit paths as needed.
83
80
  if `"#{rubyx}" -v` =~ /x64/i
@@ -86,41 +83,39 @@ namespace 'gem' do
86
83
  ENV['PATH'] = "C:/Devkit/bin;C:/Devkit/mingw/bin;" + ENV['PATH']
87
84
  end
88
85
 
86
+ mkdir_p "lib/win32/#{key}/win32"
87
+
89
88
  Dir.chdir('ext') do
90
89
  sh "make distclean" rescue nil
91
90
  sh "#{rubyx} extconf.rb"
92
91
  sh "make"
93
-
94
- if key.to_s == 'ruby18'
95
- cp 'api.so', '../lib/win32/ruby18/win32/api.so'
96
- elsif key.to_s == 'ruby19'
97
- cp 'api.so', '../lib/win32/ruby19/win32/api.so'
98
- else
99
- if `"#{rubyx}" -v` =~ /x64/i
100
- cp 'api.so', '../lib/win32/ruby2_64/win32/api.so'
101
- else
102
- cp 'api.so', '../lib/win32/ruby2_32/win32/api.so'
103
- end
104
- end
92
+ cp 'api.so', "../lib/win32/#{key}/win32/api.so"
105
93
  end
106
94
  }
107
95
 
108
- # Create a stub file that automatically require's the correct binary
109
- File.open('lib/win32/api.rb', 'w'){ |fh|
110
- fh.puts "if RUBY_VERSION.to_f < 1.9"
111
- fh.puts " require File.join(File.dirname(__FILE__), 'ruby18/win32/api')"
112
- fh.puts "elsif RUBY_VERSION.to_f < 2.0"
113
- fh.puts " require File.join(File.dirname(__FILE__), 'ruby19/win32/api')"
114
- fh.puts "else"
115
- fh.puts " require 'rbconfig'"
116
- fh.puts " if RbConfig::CONFIG['arch'] =~ /x64/i"
117
- fh.puts " require File.join(File.dirname(__FILE__), 'ruby2_64/win32/api')"
118
- fh.puts " else"
119
- fh.puts " require File.join(File.dirname(__FILE__), 'ruby2_32/win32/api')"
120
- fh.puts " end"
121
- fh.puts "end"
122
- }
96
+ text = <<HERE
97
+ case
98
+ when RUBY_VERSION =~ /1\\.8/
99
+ require File.join(File.dirname(__FILE__), 'ruby18/win32/api')
100
+ when RUBY_VERSION =~ /1\\.9/
101
+ require File.join(File.dirname(__FILE__), 'ruby19/win32/api')
102
+ when RUBY_VERSION =~ /2\\.0/
103
+ if RbConfig::CONFIG['arch'] =~ /x64/i
104
+ require File.join(File.dirname(__FILE__), 'ruby2_64/win32/api')
105
+ else
106
+ require File.join(File.dirname(__FILE__), 'ruby2_32/win32/api')
107
+ end
108
+ when RUBY_VERSION =~ /2\\.1/
109
+ if RbConfig::CONFIG['arch'] =~ /x64/i
110
+ require File.join(File.dirname(__FILE__), 'ruby21_64/win32/api')
111
+ else
112
+ require File.join(File.dirname(__FILE__), 'ruby21_32/win32/api')
113
+ end
114
+ end
115
+ HERE
123
116
 
117
+ File.open('lib/win32/api.rb', 'w'){ |fh| fh.puts text }
118
+
124
119
  spec = eval(IO.read('win32-api.gemspec'))
125
120
  spec.platform = Gem::Platform.new(['universal', 'mingw32'])
126
121
  spec.extensions = nil
@@ -129,6 +124,7 @@ namespace 'gem' do
129
124
  if Gem::VERSION.to_f < 2.0
130
125
  Gem::Builder.new(spec).build
131
126
  else
127
+ require 'rubygems/package'
132
128
  Gem::Package.build(spec)
133
129
  end
134
130
  end
@@ -136,7 +132,7 @@ namespace 'gem' do
136
132
  desc 'Install the gem'
137
133
  task :install => [:create] do
138
134
  file = Dir["*.gem"].first
139
- sh "gem install #{file}"
135
+ sh "gem install -l #{file}"
140
136
  end
141
137
  end
142
138
 
@@ -37,7 +37,7 @@
37
37
 
38
38
 
39
39
  #define MAX_BUF 1024
40
- #define WINDOWS_API_VERSION "1.5.1"
40
+ #define WINDOWS_API_VERSION "1.5.2"
41
41
 
42
42
  #define _T_VOID 0
43
43
  #define _T_LONG 1
@@ -971,6 +971,6 @@ void Init_api(){
971
971
 
972
972
  /* Constants */
973
973
 
974
- /* 1.4.9: The version of the win32-api library */
974
+ /* 1.5.2: The version of the win32-api library */
975
975
  rb_define_const(cAPI, "VERSION", rb_str_new2(WINDOWS_API_VERSION));
976
976
  }
@@ -1,12 +1,18 @@
1
- if RUBY_VERSION.to_f < 1.9
2
- require File.join(File.dirname(__FILE__), 'ruby18/win32/api')
3
- elsif RUBY_VERSION.to_f < 2.0
4
- require File.join(File.dirname(__FILE__), 'ruby19/win32/api')
5
- else
6
- require 'rbconfig'
7
- if RbConfig::CONFIG['arch'] =~ /x64/i
8
- require File.join(File.dirname(__FILE__), 'ruby2_64/win32/api')
9
- else
10
- require File.join(File.dirname(__FILE__), 'ruby2_32/win32/api')
11
- end
1
+ case
2
+ when RUBY_VERSION =~ /1\.8/
3
+ require File.join(File.dirname(__FILE__), 'ruby18/win32/api')
4
+ when RUBY_VERSION =~ /1\.9/
5
+ require File.join(File.dirname(__FILE__), 'ruby19/win32/api')
6
+ when RUBY_VERSION =~ /2\.0/
7
+ if RbConfig::CONFIG['arch'] =~ /x64/i
8
+ require File.join(File.dirname(__FILE__), 'ruby2_64/win32/api')
9
+ else
10
+ require File.join(File.dirname(__FILE__), 'ruby2_32/win32/api')
11
+ end
12
+ when RUBY_VERSION =~ /2\.1/
13
+ if RbConfig::CONFIG['arch'] =~ /x64/i
14
+ require File.join(File.dirname(__FILE__), 'ruby21_64/win32/api')
15
+ else
16
+ require File.join(File.dirname(__FILE__), 'ruby21_32/win32/api')
17
+ end
12
18
  end
@@ -18,7 +18,7 @@ class TC_Win32_API < Test::Unit::TestCase
18
18
  end
19
19
 
20
20
  def test_version
21
- assert_equal('1.5.1', API::VERSION)
21
+ assert_equal('1.5.2', API::VERSION)
22
22
  end
23
23
 
24
24
  def test_constructor_basic
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'win32-api'
5
- spec.version = '1.5.1'
5
+ spec.version = '1.5.2'
6
6
  spec.authors = ['Daniel J. Berger', 'Park Heesob']
7
7
  spec.license = 'Artistic 2.0'
8
8
  spec.email = 'djberg96@gmail.com'
@@ -12,7 +12,6 @@ Gem::Specification.new do |spec|
12
12
  spec.extensions = ['ext/extconf.rb']
13
13
  spec.files = Dir['**/*'].reject{ |f| f.include?('git') }
14
14
 
15
- spec.rubyforge_project = 'win32utils'
16
15
  spec.required_ruby_version = '>= 1.8.2'
17
16
  spec.extra_rdoc_files = ['README', 'CHANGES', 'MANIFEST', 'ext/win32/api.c']
18
17
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: win32-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: universal-mingw32
6
6
  authors:
7
7
  - Daniel J. Berger
@@ -9,34 +9,34 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-14 00:00:00.000000000 Z
12
+ date: 2014-10-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: test-unit
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: 2.5.0
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - '>='
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: 2.5.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  description: |2
@@ -54,19 +54,21 @@ extra_rdoc_files:
54
54
  - ext/win32/api.c
55
55
  files:
56
56
  - CHANGES
57
+ - MANIFEST
58
+ - README
59
+ - Rakefile
60
+ - ext/win32/api.c
57
61
  - lib/win32/api.rb
58
62
  - lib/win32/ruby18/win32/api.so
59
63
  - lib/win32/ruby19/win32/api.so
64
+ - lib/win32/ruby21_32/win32/api.so
65
+ - lib/win32/ruby21_64/win32/api.so
60
66
  - lib/win32/ruby2_32/win32/api.so
61
67
  - lib/win32/ruby2_64/win32/api.so
62
- - MANIFEST
63
- - Rakefile
64
- - README
65
68
  - test/test_win32_api.rb
66
69
  - test/test_win32_api_callback.rb
67
70
  - test/test_win32_api_function.rb
68
71
  - win32-api.gemspec
69
- - ext/win32/api.c
70
72
  homepage: http://github.com/djberg96/win32-api
71
73
  licenses:
72
74
  - Artistic 2.0
@@ -77,17 +79,17 @@ require_paths:
77
79
  - lib
78
80
  required_ruby_version: !ruby/object:Gem::Requirement
79
81
  requirements:
80
- - - '>='
82
+ - - ">="
81
83
  - !ruby/object:Gem::Version
82
84
  version: 1.8.2
83
85
  required_rubygems_version: !ruby/object:Gem::Requirement
84
86
  requirements:
85
- - - '>='
87
+ - - ">="
86
88
  - !ruby/object:Gem::Version
87
89
  version: '0'
88
90
  requirements: []
89
- rubyforge_project: win32utils
90
- rubygems_version: 2.0.3
91
+ rubyforge_project:
92
+ rubygems_version: 2.2.2
91
93
  signing_key:
92
94
  specification_version: 4
93
95
  summary: A superior replacement for Win32API