luban 0.9.16 → 0.9.17

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: adc93bf192991b86d3f5d52180c9a8805454bc57
4
- data.tar.gz: 481a0dc650662bb1d4c4ad476629c532e0c212bc
3
+ metadata.gz: 54aaa659fc68b437ea84a6dde006a0aed146ce41
4
+ data.tar.gz: 593e65772197951b07170e1f3e1fec53daa528ff
5
5
  SHA512:
6
- metadata.gz: e0cf933081d650de7497b751db7f6e744fb350c32cd4b33eda9751e7e450e0e4e7b17441b79fdc78e95d679e2a08706ecdc84bae08c0be5bbd2d2c9465286e99
7
- data.tar.gz: b474fa321c6c29b0efe00f51b8bbbeb9abb8bf22f3efc4f94421af3fec2168811fdd1855fd84d54fcc4d83e04ce9963bb93dfe178205dbfb5106032df7ce2605
6
+ metadata.gz: cddef05167829d326ee7d0114f0336cab8b8c5cc9f1ab759412f69d4af32a15537a642706f6948d8130cd5f44b05351ba5dac9252aecb2177bca79f278ee6de0
7
+ data.tar.gz: 71596aa46bf7d871bee756cf250ef35465e8b0844b673773bc90001054a92eb8bc7314d0b0e69ad89028f93b1e205bc4f91592c7f96c1add52e49c62a4a8c222
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Change log
2
2
 
3
+ ## Version 0.9.17 (Nov 16, 2016)
4
+
5
+ Minor enhancements:
6
+ * Added convenient method #package_install_path to get package install path for a given package
7
+ * Added command options to customize a shell command for crontab entry
8
+ * Added a convenient file tester, #exists?, in Utils
9
+
3
10
  ## Version 0.9.16 (Nov 09, 2016)
4
11
 
5
12
  Bug fixes:
@@ -105,7 +105,7 @@ module Luban
105
105
  end
106
106
  end
107
107
 
108
- def crontab_entry(command:, schedule:, output: "", type: :shell, disabled: false)
108
+ def crontab_entry(command:, schedule:, output: "", type: :shell, disabled: false, **cmd_opts)
109
109
  if output.is_a?(String) and !output.empty?
110
110
  output = log_path.join("cron.#{output}")
111
111
  end
@@ -114,7 +114,7 @@ module Luban
114
114
  abort "Aborted! Unknown cronjob type: #{type.inspect}"
115
115
  end
116
116
  command = instance_exec(&command) if command.respond_to?(:call)
117
- command = send(command_composer, command, output: output)
117
+ command = send(command_composer, command, output: output, **cmd_opts)
118
118
  entry = "#{schedule} #{command}"
119
119
  disabled ? "# DISABLED - #{entry}" : entry
120
120
  end
@@ -85,7 +85,7 @@ module Luban
85
85
 
86
86
  def after_publish
87
87
  create_symlinks
88
- bundle_gems unless locked_gemfile.nil?
88
+ bundle_gems if has_gemfile?
89
89
  end
90
90
 
91
91
  protected
@@ -10,6 +10,10 @@ module Luban
10
10
  send("#{type}?", *args)
11
11
  end
12
12
 
13
+ def exists?(path)
14
+ test "[ -e #{path} ]"
15
+ end
16
+
13
17
  def directory?(path)
14
18
  test "[ -d #{path} ]"
15
19
  end
@@ -1,5 +1,5 @@
1
1
  module Luban
2
2
  module Deployment
3
- VERSION = "0.9.16"
3
+ VERSION = "0.9.17"
4
4
  end
5
5
  end
@@ -74,10 +74,13 @@ module Luban
74
74
  @luban_install_path ||= project_path.join('.luban')
75
75
  end
76
76
 
77
+ def package_install_path(package_name)
78
+ luban_install_path.join('pkg', package_name.to_s, 'versions',
79
+ packages[package_name.to_sym].current_version)
80
+ end
81
+
77
82
  def package_bin_path(package_name)
78
- @package_bin_path ||=
79
- luban_install_path.join('pkg', package_name.to_s, 'versions',
80
- packages[package_name.to_sym].current_version, 'bin')
83
+ package_install_path(package_name).join('bin')
81
84
  end
82
85
 
83
86
  def app_archives_path
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.9.16
4
+ version: 0.9.17
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-11-10 00:00:00.000000000 Z
11
+ date: 2016-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: luban-cli