luban 0.9.17 → 0.10.0

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: 54aaa659fc68b437ea84a6dde006a0aed146ce41
4
- data.tar.gz: 593e65772197951b07170e1f3e1fec53daa528ff
3
+ metadata.gz: d2a1de16ff5b4437eeaddb1b9b9479f989f8f125
4
+ data.tar.gz: 2bef8b28135962894860e662d3b00d289c7f3634
5
5
  SHA512:
6
- metadata.gz: cddef05167829d326ee7d0114f0336cab8b8c5cc9f1ab759412f69d4af32a15537a642706f6948d8130cd5f44b05351ba5dac9252aecb2177bca79f278ee6de0
7
- data.tar.gz: 71596aa46bf7d871bee756cf250ef35465e8b0844b673773bc90001054a92eb8bc7314d0b0e69ad89028f93b1e205bc4f91592c7f96c1add52e49c62a4a8c222
6
+ metadata.gz: 1eabdca1caf19f816cead559a941f69613e5cfdc76e2ac0dfc2ebb98ee9f9a1859bbf61e74094ba5edad4454239aaf0a7d6b2c08a14133398730ec79328776af
7
+ data.tar.gz: f72579c2d4d0793cf482c396e366ec54ac74ef05310403ddef72be09371e88e93087fbf6374ee6434656b03f26d394ff5879b4b00b4d7fefccaca81d9e90ac45
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Change log
2
2
 
3
+ ## Version 0.10.0 (Nov 21, 2016)
4
+
5
+ New features:
6
+ * Used bundler to manage gem dependencies in Luban deployment projects
7
+ * By default, gems will be bundled in vendor/bundle
8
+ * Added one command-line option, --bundle-path, to customize the bundle path
9
+ * Updated Gemfile template with Luban dependency on version 0.10.x
10
+
11
+ Minor enhancements:
12
+ * Deprecated Rubygems-update and setup Rubygems directly for Rubygems upgrade
13
+ * Upgraded Rubygems to version 2.6.8
14
+
3
15
  ## Version 0.9.17 (Nov 16, 2016)
4
16
 
5
17
  Minor enhancements:
@@ -50,7 +50,7 @@ module Luban
50
50
  #depend_on 'yaml', version: '0.1.6'
51
51
  end
52
52
  after_install do
53
- depend_on 'rubygems-update', version: '2.6.7'
53
+ depend_on 'rubygems', version: '2.6.8'
54
54
  end
55
55
  end
56
56
 
@@ -126,10 +126,6 @@ module Luban
126
126
 
127
127
  protected
128
128
 
129
- def create_task(task)
130
- super.tap { |t| t.opts.send("rubygems-update=", t.opts.rubygems) }
131
- end
132
-
133
129
  def configure_build_options
134
130
  super
135
131
  @configure_opts.unshift("--disable-install-doc") unless install_doc?
@@ -20,10 +20,19 @@ module Luban
20
20
  @config_file ||= work_dir.join(lubanfile)
21
21
  end
22
22
 
23
+ def new_project?; !!@new_project; end
24
+
23
25
  def init_project(args:, opts:)
24
- set_default :project, args[:project]
26
+ if new_project?
27
+ project args[:project]
28
+ if project == '.'
29
+ work_dir Pathname.pwd
30
+ project work_dir.basename(".deploy").to_s
31
+ end
32
+ end
25
33
  singleton_class.send(:include, Luban::Deployment::Helpers::Generator::Project)
26
34
  create_project_skeleton
35
+ create_project_bundle(opts[:bundle_path])
27
36
  end
28
37
 
29
38
  protected
@@ -80,6 +89,7 @@ module Luban
80
89
  end
81
90
 
82
91
  def setup_cli_with_projects
92
+ @new_project = false
83
93
  load_configuration_file(config_file)
84
94
  set_default_common_parameters
85
95
  set_default_project_parameters
@@ -87,7 +97,7 @@ module Luban
87
97
 
88
98
  version Luban::Deployment::VERSION
89
99
  desc "Manage the deployment of project #{project.camelcase}"
90
- setup_init_project(false)
100
+ setup_init_project
91
101
  setup_projects
92
102
  end
93
103
 
@@ -106,6 +116,7 @@ module Luban
106
116
  end
107
117
 
108
118
  def setup_cli_without_projects
119
+ @new_project = true
109
120
  set_default_common_parameters
110
121
 
111
122
  version Luban::Deployment::VERSION
@@ -114,13 +125,24 @@ module Luban
114
125
  setup_init_project
115
126
  end
116
127
 
117
- def setup_init_project(new_project = true)
128
+ def setup_init_project
129
+ _self = self
118
130
  command :init do
119
131
  desc 'Initialize a Luban deployment project'
120
- argument :project, 'Project name', required: true if new_project
132
+ option :bundle_path, 'Bundle path', default: "vendor/bundle"
133
+ if _self.new_project?
134
+ argument :project, 'Project name', required: true, assure: ->(name) { !name.empty? }
135
+ end
121
136
  action! :init_project
122
137
  end
123
138
  end
139
+
140
+ def create_project_bundle(bundle_path)
141
+ Dir.chdir(work_dir) do
142
+ puts "Running bundle install"
143
+ `bundle install --path "#{bundle_path}" 2>&1`.chomp.split("\n").each { |l| puts " #{l}" }
144
+ end
145
+ end
124
146
  end
125
147
  end
126
148
  end
@@ -1,3 +1,3 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'luban'
3
+ gem 'luban', '~>0.10.0'
@@ -1,5 +1,5 @@
1
1
  module Luban
2
2
  module Deployment
3
- VERSION = "0.9.17"
3
+ VERSION = "0.10.0"
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.9.17
4
+ version: 0.10.0
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-16 00:00:00.000000000 Z
11
+ date: 2016-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: luban-cli
@@ -150,7 +150,6 @@ files:
150
150
  - lib/luban/deployment/packages/openssl.rb
151
151
  - lib/luban/deployment/packages/popt.rb
152
152
  - lib/luban/deployment/packages/ruby.rb
153
- - lib/luban/deployment/packages/rubygems-update.rb
154
153
  - lib/luban/deployment/packages/rubygems.rb
155
154
  - lib/luban/deployment/packages/yaml.rb
156
155
  - lib/luban/deployment/parameters.rb
@@ -207,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
206
  version: '0'
208
207
  requirements: []
209
208
  rubyforge_project:
210
- rubygems_version: 2.6.7
209
+ rubygems_version: 2.6.8
211
210
  signing_key:
212
211
  specification_version: 4
213
212
  summary: Ruby framework for server automation and application deployment
@@ -1,29 +0,0 @@
1
- require_relative 'gem'
2
-
3
- module Luban
4
- module Deployment
5
- module Packages
6
- class RubygemsUpdate < Gem
7
- class Installer < Gem::Installer
8
- define_executable 'update_rubygems'
9
-
10
- def installed?
11
- return false unless file?(gem_executable)
12
- match?("#{gem_executable} -v", package_version)
13
- end
14
-
15
- protected
16
-
17
- def build_package
18
- super and update_rubygems! and uninstall_gem!
19
- end
20
-
21
- def update_rubygems!
22
- update_opts = "--no-rdoc --no-ri" unless install_doc?
23
- test("#{update_rubygems_executable} #{update_opts} >> #{install_log_file_path} 2>&1")
24
- end
25
- end
26
- end
27
- end
28
- end
29
- end