unicode 0.4.4.1 → 0.4.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +51 -14
  3. data/unicode.gemspec +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5fdd353c878b1fdde6d2e243c3a16331f452fd88
4
- data.tar.gz: f69d445e0049cb510f90df4cf97f0aab7d6e563c
3
+ metadata.gz: 6e7d90f7bef7b1f195712031da3eaee512809702
4
+ data.tar.gz: d056307874ebd2b0690e43332a90e5c34ce85aed
5
5
  SHA512:
6
- metadata.gz: 93e3676b87e104225b10cd0fcabd4d936a5c199f178cbeae05ea0943fa2edf7c87f51117a7c2ed873531e786532109923cdfd51401cef242943305d92a1adb00
7
- data.tar.gz: 95daa0138c4e96229edc43327678b7e4165a5b080c700b2fc8534c41d2b04ccac8466131853f90575c8a8cb4f2e00f1992201de7b2b42c462851fb5adb1bf5d1
6
+ metadata.gz: 61ee55986f081caad1113ab57dd300881e8bd3fe8d95336739735d651804ba9e7494bb9befe63d12828135fffff1b3e0a09464e0e9cdeb0d0feb59c5d91b743c
7
+ data.tar.gz: c59a73bf232c38ba337dae48d2308ac8a7d112453ffe5842b79cbd90fcbabc031b4f164ff7c81753f8ef638bd2834068f4af24953b0ed415440cae4b362a77fb
data/Rakefile CHANGED
@@ -1,30 +1,67 @@
1
- require "rake/clean"
2
- require "rake/extensiontask"
3
- require "rubygems/package_task"
1
+ require 'rake/clean'
2
+ require 'rake/extensiontask'
3
+ require 'rubygems/package_task'
4
4
 
5
- CLEAN << "pkg" << "tmp" << "lib/unicode"
5
+ CLEAN << 'pkg' << 'tmp' << 'lib/unicode'
6
6
 
7
7
  UPSTREAM_URL = 'http://www.yoshidam.net/unicode-%s.tar.gz'
8
8
 
9
- gem_spec = eval(File.read(File.expand_path("../unicode.gemspec", __FILE__)))
9
+ gem_spec = eval(File.read(File.expand_path('../unicode.gemspec', __FILE__)))
10
10
 
11
- Gem::PackageTask.new(gem_spec) {|pkg|}
11
+ gem_task = Gem::PackageTask.new(gem_spec) {|pkg|}
12
12
 
13
13
  Rake::ExtensionTask.new('unicode_native', gem_spec) do |ext|
14
14
  ext.cross_compile = true
15
15
  ext.cross_platform = ['x86-mingw32', 'x86-mswin32-60']
16
- ext.ext_dir = "ext/unicode"
17
- ext.lib_dir = "lib/unicode"
16
+ ext.ext_dir = 'ext/unicode'
17
+ ext.lib_dir = 'lib/unicode'
18
18
  end
19
19
 
20
- desc "Build native gems for Windows"
21
- task :windows_gem => :clean do
22
- ENV["RUBY_CC_VERSION"] = "1.8.7:1.9.3"
23
- sh "rake cross compile"
24
- sh "rake cross native gem"
20
+ namespace :gem do
21
+
22
+ desc 'Build all gem files'
23
+ task :all => %w[clean gem gem:java gem:windows]
24
+
25
+ java_gem_spec = gem_spec.dup
26
+ java_gem_spec.platform = 'java'
27
+ java_gem_spec.extensions.clear
28
+ java_gem_spec.files.delete_if { |f| f.start_with?('ext/') }
29
+
30
+ directory java_gem_dir = gem_task.package_dir
31
+
32
+ java_gem_file = File.basename(java_gem_spec.cache_file)
33
+ java_gem_path = File.join(java_gem_dir, java_gem_file)
34
+
35
+ desc "Build the gem file #{java_gem_file}"
36
+ task :java => java_gem_path
37
+
38
+ file java_gem_path => [java_gem_dir] + java_gem_spec.files do
39
+ lib_file = 'lib/unicode.rb'
40
+ tmp_file = "#{lib_file}.tmp-#{$$}"
41
+ jrb_file = lib_file.sub('.', '-java.')
42
+
43
+ begin
44
+ mv lib_file, tmp_file
45
+ ln jrb_file, lib_file
46
+
47
+ Gem::Package.build(java_gem_spec)
48
+
49
+ mv java_gem_file, java_gem_dir
50
+ ensure
51
+ mv tmp_file, lib_file if File.exist?(tmp_file)
52
+ end
53
+ end
54
+
55
+ desc 'Build native gems for Windows'
56
+ task :windows do
57
+ ENV['RUBY_CC_VERSION'] = '1.9.3:2.0.0:2.1.5'
58
+ sh 'rake cross compile'
59
+ sh 'rake cross native gem'
60
+ end
61
+
25
62
  end
26
63
 
27
- desc "Update from upstream"
64
+ desc 'Update from upstream'
28
65
  task :update, [:version] do |t, args|
29
66
  require 'zlib'
30
67
  require 'open-uri'
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{unicode}
5
- s.version = "0.4.4.1"
5
+ s.version = "0.4.4.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = [%q{Yoshida Masato}]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unicode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4.1
4
+ version: 0.4.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshida Masato
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
53
  version: '0'
54
54
  requirements: []
55
55
  rubyforge_project:
56
- rubygems_version: 2.2.2
56
+ rubygems_version: 2.4.4
57
57
  signing_key:
58
58
  specification_version: 3
59
59
  summary: Unicode normalization library.