luban 0.8.4 → 0.8.5

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: b6c8d8264eb67e64d12b8898d1d3f6be9d9bae49
4
- data.tar.gz: ac0c9be4be0449a4f4d8d0460785b3aef5fd98f3
3
+ metadata.gz: fa9b089348b0785af2faf40d86464cf86cc7c531
4
+ data.tar.gz: a982d8c33d1d3f595dc20f2ed5f4229b52f42afe
5
5
  SHA512:
6
- metadata.gz: 4e8cca593188e1ed1eaec53681f13e0ba51fa7119ee616a02e0f58e4d9b9fd3793d2fb0f1ee525e250de0b40d81910e48844c8bad4018f93eeeaafaf3a7af584
7
- data.tar.gz: a5885b65c1431c4f5a35b8dc62226b27e88c59cd0c50da0fd3dc4928dcc7b4674de82e4c86fe55c20c7d2a5c71a60409a20bf959c5373678766da2d74765f06e
6
+ metadata.gz: e3cf21af0a7a26dc4f3c067e1801cee9feb8d8ebc7f8ed198e841226e0a4bad04c37388b6fe00a6b9d4358387cf750faa60b0f886f5f612caad37238a0b013e5
7
+ data.tar.gz: f5b5e165b5275963ff3c2bd84795173c20ceea90407d4fa81d2210f8299dbe32f1ebc0918fda6aec261844c7286c69603c1f4b247f638920267c4b0a554d3e92
data/CHANGELOG.md CHANGED
@@ -1,9 +1,15 @@
1
1
  # Change log
2
2
 
3
+ ## Version 0.8.5 (Sept 23, 2016)
4
+
5
+ Minor enhancemnets:
6
+ * Added extra parameter :project in #bundle_via to specify project to find bundler
7
+ * Default project is set to "uber"
8
+
3
9
  ## Version 0.8.4 (Sept 22, 2016)
4
10
 
5
11
  Minor enhancements:
6
- * Added #bundle_via to specify Ruby version to bundle gems with
12
+ * Added method #bundle_via to specify Ruby version to bundle gems with
7
13
  * This is useful for bundling gems that requires specific Ruby version
8
14
  * Forced bundler using the gems already present in vendor/cache thru option "--local"
9
15
 
@@ -84,7 +84,7 @@ module Luban
84
84
  end
85
85
  alias_method :require_package, :package
86
86
 
87
- def bundle_via(ruby:)
87
+ def bundle_via(ruby:, project: "uber")
88
88
  bundle_cmd = luban_root_path.join("env", "#{stage}.#{project}", ".luban", "pkg",
89
89
  "ruby", "versions", ruby.to_s.downcase, 'bin', 'bundle')
90
90
  set :bundle_via, bundle_cmd
@@ -59,6 +59,15 @@ module Luban
59
59
  @release_name ||= "#{application}:#{type}:#{release_tag}"
60
60
  end
61
61
 
62
+ def bundle_cmd
63
+ return @bundle_cmd unless @bundle_cmd.nil?
64
+ @bundle_cmd = fetch(:bundle_via, :bundle).tap do |cmd|
65
+ if cmd.is_a?(Pathname) and !file?(cmd)
66
+ abort "Aborted! Bundler command is NOT found: #{cmd}"
67
+ end
68
+ end
69
+ end
70
+
62
71
  def bundle_without
63
72
  @bundle_without ||= %w(development test)
64
73
  end
@@ -162,7 +171,6 @@ module Luban
162
171
  end
163
172
 
164
173
  def bundle_gems
165
- bundle_cmd = fetch(:bundle_via, :bundle)
166
174
  gemfile_path = Pathname.new(release_tag).join('Gemfile')
167
175
  gems_cache = Pathname.new('vendor').join('cache')
168
176
  bundle_path = Pathname.new('vendor').join('bundle')
@@ -1,5 +1,5 @@
1
1
  module Luban
2
2
  module Deployment
3
- VERSION = "0.8.4"
3
+ VERSION = "0.8.5"
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.8.4
4
+ version: 0.8.5
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-22 00:00:00.000000000 Z
11
+ date: 2016-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: luban-cli