luban 0.11.3 → 0.11.4

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: d5bfdac90e3be004eaf61bb816f54479a51592a3
4
- data.tar.gz: 479bbe9ed933df387977557a5a28ad2138f0d017
3
+ metadata.gz: eb6c3491ce1ea691094b973536e5a805fb964991
4
+ data.tar.gz: 4bb1d2927d31a125a4f24c093b917da21e8aa60d
5
5
  SHA512:
6
- metadata.gz: b4851bb38fa007fd4aa7aa74aafea3dc08a1d79ebb04370d991ead74ac6b842d1f51f329aced85f698f132c11c33e4ad36504eda0be4002c30c7275eaf58e2f3
7
- data.tar.gz: 0ee3f50877b21a2f8fd85bb9dde6f4b82a47d9240af3a9f9431f9a33e5262bb030130afab0af2ba0e2a536c21d0ef5602288e5f29902a986ab2190b4a052fa75
6
+ metadata.gz: 508a4f58185d9487724a5947bebc4f431897a7e7535a25799dde1480a49e43f654236ad12317514f801f7dc328e1733098e3eba7478f31f6f783f181c47e4509
7
+ data.tar.gz: cb26958a7b67497dab1dfc1fc26ca9409ecf7e0a4ff60a899fdb46184869936ea9246f66b2e2d1e1e6b2a9c7c1634232b68b7fd4a1611e1e6db3ee0e8ca2ff39
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Change log
2
2
 
3
+ ## Version 0.11.4 (Jan 12, 2017)
4
+
5
+ Minor enhancements:
6
+ * Added a package option, :deprecated, to manage package deprecation which is similar to release deprecation
7
+
3
8
  ## Version 0.11.3 (Jan 09, 2017)
4
9
 
5
10
  Minor enhancements:
@@ -109,6 +109,8 @@ module Luban
109
109
  end
110
110
 
111
111
  def versions; package_options.keys; end
112
+ def deprecated_versions; package_options.select { |v, o| o[:deprecated] }.keys; end
113
+ def installable_versions; package_options.select { |v, o| !o[:deprecated] }.keys; end
112
114
 
113
115
  dispatch_task :download_package, to: :installer, as: :download, locally: true
114
116
  dispatch_task :install_package, to: :installer, as: :install
@@ -126,9 +128,12 @@ module Luban
126
128
  end
127
129
 
128
130
  def install_all(args:, opts:)
129
- versions.each do |v|
131
+ installable_versions.each do |v|
130
132
  install(args: args, opts: opts.merge(version: v))
131
133
  end
134
+ deprecated_versions.each do |v|
135
+ uninstall(args: args, opts: opts.merge(version: v))
136
+ end
132
137
  end
133
138
 
134
139
  def uninstall_all(args:, opts:)
@@ -23,6 +23,8 @@ module Luban
23
23
  def current_configured?; task.opts.current; end
24
24
  alias_method :current?, :current_configured?
25
25
 
26
+ def deprecated?; task.opts.deprecated; end
27
+
26
28
  def current_package_version
27
29
  if symlink?(current_path)
28
30
  File.basename(readlink(current_path))
@@ -115,7 +115,7 @@ module Luban
115
115
  status = if current_symlinked?
116
116
  current? ? " *" : "s*"
117
117
  else
118
- current? ? "c*" : " "
118
+ current? ? "c*" : (deprecated? ? " d" : " ")
119
119
  end
120
120
 
121
121
  if installed?
@@ -1,5 +1,5 @@
1
1
  module Luban
2
2
  module Deployment
3
- VERSION = "0.11.3"
3
+ VERSION = "0.11.4"
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.11.3
4
+ version: 0.11.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rubyist Lei
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-09 00:00:00.000000000 Z
11
+ date: 2017-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: luban-cli