dev-lxc 1.0.1 → 1.1.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: 007356dd5ed7ab4a5f00c0307d63a81d41bcc024
4
- data.tar.gz: ecd4ecc7d1a81fe3385780855575b8779b8b99be
3
+ metadata.gz: ffe719a7b1a9540f939ffd2c4c8e5d9c7b055354
4
+ data.tar.gz: 5d5cf14b07b6810333e15a22448a3f1b2bbac1d8
5
5
  SHA512:
6
- metadata.gz: 262350451733e50a976993089b8cc6d0667a7d8945adddff5e64d34c1cd5a9de0d5da3cdb7256d358f5dc525a4c6e2166922e47cc16312e3d27d25ffdf04777a
7
- data.tar.gz: 8e65709f386eaa0b0377984970f1881ce2b98536b8179ad05064a477c8faf4cfa70440422abcbe00b94e0af778ce298ffb4db4f95b8a28c723e2f8cdfd93b706
6
+ metadata.gz: 858fff04e619b22e8920fa71a8b28ea4d47202429b98474a4bc3a167c419b94e62cde1f8339c8d5bcf930a979d51bb898f6e7f0d788103ce5d4c8ff1682cfe63
7
+ data.tar.gz: 245b0a0c853c4657989c823df4760d39c753b03364dd5f82f9fd1ff858a3ef8fae913fec054aafec8318d0181464a67489e173914b7d2a80c210e624c770bea2
data/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # dev-lxc Change Log
2
+
3
+ ## 1.1.0 (2015-04-21)
4
+
5
+ * Change "abspath" command name to "realpath"
6
+
7
+ ## 1.0.1 (2015-04-18)
8
+
9
+ * Fix "abspath" output
data/README.md CHANGED
@@ -270,13 +270,13 @@ dev-lxc up
270
270
 
271
271
  #### Backdoor access to each server's filesystem
272
272
 
273
- The abspath subcommand can be used to prepend each server's rootfs path to a particular file.
273
+ The realpath subcommand can be used to prepend each server's rootfs path to a particular file.
274
274
 
275
275
  For example, you can use the following command to edit the Chef Servers' chef-server.rb
276
276
  file without logging into the containers.
277
277
 
278
278
  ```
279
- emacs $(dev-lxc abspath chef /etc/opscode/chef-server.rb)
279
+ emacs $(dev-lxc realpath chef /etc/opscode/chef-server.rb)
280
280
  ```
281
281
 
282
282
  #### Run arbitrary commands in each server
data/lib/dev-lxc/cli.rb CHANGED
@@ -156,12 +156,12 @@ module DevLXC::CLI
156
156
  servers.each { |s| printf "%#{max_server_name_length}s %-15s %s\n", s['name'], s['state'], s['ip_addresses'] }
157
157
  end
158
158
 
159
- desc "abspath [SERVER_NAME_REGEX] [ROOTFS_PATH]", "Returns the absolute path to a file in each server"
159
+ desc "realpath [SERVER_NAME_REGEX] [ROOTFS_PATH]", "Returns the real path to a file in each server"
160
160
  option :config, :desc => "Specify a cluster's YAML config file. `./dev-lxc.yml` will be used by default"
161
- def abspath(server_name_regex=nil, rootfs_path)
162
- abspath = Array.new
163
- match_server_name_regex(server_name_regex).map { |s| abspath << s.abspath(rootfs_path) }
164
- puts abspath.compact
161
+ def realpath(server_name_regex=nil, rootfs_path)
162
+ realpath = Array.new
163
+ match_server_name_regex(server_name_regex).map { |s| realpath << s.realpath(rootfs_path) }
164
+ puts realpath.compact
165
165
  end
166
166
 
167
167
  desc "attach [SERVER_NAME_REGEX]", "Attach the terminal to a single server"
@@ -75,7 +75,7 @@ module DevLXC
75
75
  puts "Creating chef-repo with pem files and knife.rb in the current directory"
76
76
  FileUtils.mkdir_p("./chef-repo/.chef")
77
77
 
78
- pem_files = Dir.glob("#{chef_server.abspath('/root/chef-repo/.chef')}/*.pem")
78
+ pem_files = Dir.glob("#{chef_server.realpath('/root/chef-repo/.chef')}/*.pem")
79
79
  if pem_files.empty?
80
80
  puts "The pem files can not be copied because they do not exist in '#{chef_server.server.name}' Chef Server's `/root/chef-repo/.chef` directory"
81
81
  else
@@ -95,7 +95,7 @@ module DevLXC
95
95
  if File.exists?("./chef-repo/.chef/pivotal.rb") && ! force
96
96
  puts "Skipping pivotal.rb because it already exists in `./chef-repo/.chef`"
97
97
  else
98
- pivotal_rb_path = "#{chef_server.abspath('/root/chef-repo/.chef')}/pivotal.rb"
98
+ pivotal_rb_path = "#{chef_server.realpath('/root/chef-repo/.chef')}/pivotal.rb"
99
99
  if File.exists?(pivotal_rb_path)
100
100
  pivotal_rb = IO.read(pivotal_rb_path)
101
101
  pivotal_rb.sub!(/^chef_server_root .*/, "chef_server_root \"#{chef_server_root}\"")
@@ -111,7 +111,7 @@ module DevLXC
111
111
  if File.exists?("./chef-repo/.chef/knife.rb") && ! force
112
112
  puts "Skipping knife.rb because it already exists in `./chef-repo/.chef`"
113
113
  else
114
- knife_rb_path = "#{chef_server.abspath('/root/chef-repo/.chef')}/knife.rb"
114
+ knife_rb_path = "#{chef_server.realpath('/root/chef-repo/.chef')}/knife.rb"
115
115
  if File.exists?(knife_rb_path)
116
116
  knife_rb = IO.read(knife_rb_path)
117
117
  knife_rb.sub!(/^chef_server_url .*/, "chef_server_url \"#{chef_server_url}\"")
@@ -57,7 +57,7 @@ module DevLXC
57
57
  end
58
58
  end
59
59
 
60
- def abspath(rootfs_path)
60
+ def realpath(rootfs_path)
61
61
  "#{@server.config_item('lxc.rootfs')}#{rootfs_path}" if @server.defined?
62
62
  end
63
63
 
@@ -1,3 +1,3 @@
1
1
  module DevLXC
2
- VERSION = "1.0.1"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev-lxc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremiah Snapp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-18 00:00:00.000000000 Z
11
+ date: 2015-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -75,6 +75,7 @@ extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
77
  - ".gitignore"
78
+ - CHANGELOG.md
78
79
  - Gemfile
79
80
  - LICENSE
80
81
  - README.md