1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
From 9f15620e7db145d11ae2fc4ba032367903f625e3 Mon Sep 17 00:00:00 2001
From: Kouhei Sutou <kou@clear-code.com>
Date: Sun, 20 Aug 2017 14:47:44 +0900
Subject: [PATCH] Extract gemspec
Patch-Source: https://github.com/rake-compiler/rake-compiler/commit/9f15620e7db145d11ae2fc4ba032367903f625e3
---
rake-compiler.gemspec | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++
tasks/gem.rake | 49 +++---------------------------------------------
2 files changed, 55 insertions(+), 46 deletions(-)
create mode 100644 rake-compiler.gemspec
diff --git a/rake-compiler.gemspec b/rake-compiler.gemspec
new file mode 100644
index 0000000..feb2299
--- /dev/null
+++ b/rake-compiler.gemspec
@@ -0,0 +1,52 @@
+# -*- ruby -*-
+
+Gem::Specification.new do |s|
+ # basic information
+ s.name = "rake-compiler"
+ s.version = "1.0.5"
+ s.platform = Gem::Platform::RUBY
+
+ # description and details
+ s.summary = 'Rake-based Ruby Extension (C, Java) task generator.'
+ s.description = "Provide a standard and simplified way to build and package\nRuby extensions (C, Java) using Rake as glue."
+
+ # requirements
+ s.required_ruby_version = ">= 1.8.7"
+ s.required_rubygems_version = ">= 1.8.23"
+
+ # dependencies
+ s.add_dependency 'rake'
+
+ # development dependencies
+ s.add_development_dependency 'rspec', '~> 2.8.0'
+ s.add_development_dependency 'cucumber', '~> 1.1.4'
+
+ # components, files and paths
+ s.files = Dir.glob("features/**/*.{feature,rb}")
+ s.files += ["bin/rake-compiler"]
+ s.files += Dir.glob("lib/**/*.rb")
+ s.files += ["spec/spec.opts"]
+ s.files += Dir.glob("spec/**/*.rb")
+ s.files += Dir.glob("tasks/**/*.rake")
+ s.files += ["Rakefile", "Gemfile"]
+ s.files += Dir.glob("*.{rdoc,txt,yml}")
+
+ s.bindir = 'bin'
+ s.executables = ['rake-compiler']
+
+ s.require_path = 'lib'
+
+ # documentation
+ s.rdoc_options << '--main' << 'README.rdoc' << '--title' << 'rake-compiler -- Documentation'
+
+ s.extra_rdoc_files = %w(README.rdoc LICENSE.txt History.txt)
+
+ # project information
+ s.homepage = 'https://github.com/rake-compiler/rake-compiler'
+ s.rubyforge_project = 'rake-compiler'
+ s.licenses = ['MIT']
+
+ # author and contributors
+ s.authors = ['Kouhei Sutou', 'Luis Lavena']
+ s.email = ['kou@cozmixng.org', 'luislavena@gmail.com']
+end
diff --git a/tasks/gem.rake b/tasks/gem.rake
index 39924b8..7cc6df0 100644
--- a/tasks/gem.rake
+++ b/tasks/gem.rake
@@ -1,51 +1,8 @@
require 'rubygems/package_task'
-GEM_SPEC = Gem::Specification.new do |s|
- # basic information
- s.name = "rake-compiler"
- s.version = "1.0.4"
- s.platform = Gem::Platform::RUBY
-
- # description and details
- s.summary = 'Rake-based Ruby Extension (C, Java) task generator.'
- s.description = "Provide a standard and simplified way to build and package\nRuby extensions (C, Java) using Rake as glue."
-
- # requirements
- s.required_ruby_version = ">= 1.8.7"
- s.required_rubygems_version = ">= 1.8.23"
-
- # dependencies
- s.add_dependency 'rake'
-
- # development dependencies
- s.add_development_dependency 'rspec', '~> 2.8.0'
- s.add_development_dependency 'cucumber', '~> 1.1.4'
-
- # components, files and paths
- s.files = FileList["features/**/*.{feature,rb}", "bin/rake-compiler",
- "lib/**/*.rb", "spec/spec.opts", "spec/**/*.rb",
- "tasks/**/*.rake", "Rakefile", "Gemfile",
- "*.{rdoc,txt,yml}"]
-
- s.bindir = 'bin'
- s.executables = ['rake-compiler']
-
- s.require_path = 'lib'
-
- # documentation
- s.rdoc_options << '--main' << 'README.rdoc' << '--title' << 'rake-compiler -- Documentation'
-
- s.extra_rdoc_files = %w(README.rdoc LICENSE.txt History.txt)
-
- # project information
- s.homepage = 'https://github.com/rake-compiler/rake-compiler'
- s.rubyforge_project = 'rake-compiler'
- s.licenses = ['MIT']
-
- # author and contributors
- s.authors = ['Kouhei Sutou', 'Luis Lavena']
- s.email = ['kou@cozmixng.org', 'luislavena@gmail.com']
-end
+gemspec_path = File.join(__dir__, "..", "rake-compiler.gemspec")
+gemspec_path = File.expand_path(gemspec_path)
+GEM_SPEC = eval(File.read(gemspec_path), TOPLEVEL_BINDING, gemspec_path)
gem_package = Gem::PackageTask.new(GEM_SPEC) do |pkg|
pkg.need_tar = false
|