luban 0.7.12 → 0.7.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 954a633b343f946598d0923a34606fd5a4df8c3a
4
- data.tar.gz: 45ccbf2a1c9dbbd9e12064665fb9a711b94e55c3
3
+ metadata.gz: 5436da34e6aa487d156efdb17ba4cd37592610fa
4
+ data.tar.gz: a0b5cc13e0910d90f733c4e8e1a6738b098b8667
5
5
  SHA512:
6
- metadata.gz: 6b63a0301f9c4f5e545ec3077fbdeb1ac48e200eae8099571548e75414e165cbdce1bc370cb6bbd04a820d5c00b98cfab29dc7ba100913079685b6ec39e9a09a
7
- data.tar.gz: cc089bf0eeb1a9f2c40796ee1816879b8b100ba48afd406290b9cbda3ad34443b1843fe7d5b7239e09ff50d3fd7dc08d903fba3428be728a14eeaf3ae2fa7dd0
6
+ metadata.gz: 5260635a22146ad8f69619816a1a68fd440e50a490f9984147883b3f27e6183860ad7fa2096755e99c0a466fb4cc9f77c17aca513ce1199a1500bc32222a6033
7
+ data.tar.gz: 2dff97f986b194dd27fc9eb4abe18e83700b6ba472f79dfbfa8999d27a64909f2afb4a2c6c6cb08c15a8327c25af933940aa2de346af386af53a4781a9ac4841
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Change log
2
2
 
3
+ ## Version 0.7.13 (WIP)
4
+
5
+ Minor enhancements:
6
+ * Enhanced to check if the remote origin URL matches the specified Git repository URL during build
7
+ * Added two install options #install_tcl and #install_tk for Ruby
8
+ * By default, both install options are turn off
9
+ * Created symlinks for Ruby header files that are needed for native gem installation
10
+ * This is useful to solve native gem installation for Ruby 1.8
11
+
12
+ Bug fixes:
13
+ * Cleaned up published content before publish it again forcely
14
+
3
15
  ## Version 0.7.12 (Sept 02, 2016)
4
16
 
5
17
  Minor enhancements:
@@ -59,6 +59,7 @@ module Luban
59
59
  assure_dirs(releases_path)
60
60
  if published?
61
61
  if force?
62
+ rmdir(release_path)
62
63
  publish!
63
64
  else
64
65
  update_result "Skipped! ALREADY published #{release_name}.", status: :skipped
@@ -11,7 +11,11 @@ module Luban
11
11
  end
12
12
 
13
13
  def cloned?
14
- file?(clone_path.join("HEAD"))
14
+ file?(clone_path.join("HEAD")) and from == remote_origin
15
+ end
16
+
17
+ def remote_origin
18
+ within(clone_path) { capture(git_cmd, "config --get remote.origin.url 2>/dev/null") }
15
19
  end
16
20
 
17
21
  def fetch_revision
@@ -69,6 +69,8 @@ module Luban
69
69
  def setup_install_tasks
70
70
  super
71
71
  commands[:install].switch :install_doc, "Install Ruby document"
72
+ commands[:install].switch :install_tcl, "Install with Tcl"
73
+ commands[:install].switch :install_tk, "Install with Tk"
72
74
  commands[:install].option :bundler, "Bundler version"
73
75
  commands[:install].option :openssl, "OpenSSL version (effective for v1.9.3 or above)"
74
76
  end
@@ -80,6 +82,14 @@ module Luban
80
82
  task.opts.install_doc
81
83
  end
82
84
 
85
+ def install_tcl?
86
+ task.opts.install_tcl
87
+ end
88
+
89
+ def install_tk?
90
+ task.opts.install_tk
91
+ end
92
+
83
93
  define_executable 'ruby'
84
94
 
85
95
  def gem_executable
@@ -113,9 +123,9 @@ module Luban
113
123
 
114
124
  def configure_build_options
115
125
  super
116
- unless install_doc?
117
- @configure_opts.unshift("--disable-install-doc")
118
- end
126
+ @configure_opts.unshift("--disable-install-doc") unless install_doc?
127
+ @configure_opts << "--without-tcl" unless install_tcl?
128
+ @configure_opts << "--without-tk" unless install_tk?
119
129
  @opt_dirs = []
120
130
  end
121
131
 
@@ -123,6 +133,31 @@ module Luban
123
133
  @configure_opts << "--with-opt-dir=#{@opt_dirs.join(':')}"
124
134
  super
125
135
  end
136
+
137
+ def after_install
138
+ super
139
+ create_symlinks_for_header_files
140
+ end
141
+
142
+ def create_symlinks_for_header_files
143
+ if !header_file_exists?("ruby/version.h") and
144
+ (source_path = find_header_file("version.h"))
145
+ assure_dirs(target_path = source_path.dirname.join('ruby'))
146
+ ln(source_path, target_path.join('version.h'))
147
+ end
148
+ if !header_file_exists?("ruby/io.h") and
149
+ (source_path = find_header_file("*/rubyio.h"))
150
+ assure_dirs(target_path = source_path.dirname.join('ruby'))
151
+ ln(source_path, target_path.join('io.h'))
152
+ end
153
+ end
154
+
155
+ def find_header_file(file)
156
+ f = capture(:find, install_path.to_s, "-wholename '*/#{file}'")
157
+ f.empty? ? nil : Pathname.new(f)
158
+ end
159
+
160
+ def header_file_exists?(file); !!find_header_file(file); end
126
161
  end
127
162
  end
128
163
  end
@@ -1,5 +1,5 @@
1
1
  module Luban
2
2
  module Deployment
3
- VERSION = "0.7.12"
3
+ VERSION = "0.7.13"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luban
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.12
4
+ version: 0.7.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rubyist Lei
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-02 00:00:00.000000000 Z
11
+ date: 2016-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: luban-cli