docker-pier 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -31
- data/exe/docker-pier +10 -2
- data/lib/docker-pier/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d14a336c2c3d2d8817e22fa3b721b07bf16277ec
|
4
|
+
data.tar.gz: cd0698fb35faa2fd786009747d7ba55c1f77fccc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af1326ea6b51b8588d83e6fd6c5b815b9694883e6813be5d910432c037b3cca43ae03d7c2b695cdc05aa3439cf357ca04412c9104ff6e5a0bef3127e57522b14
|
7
|
+
data.tar.gz: 6e658bb684bf84889d9688a615796586100443e32d5ccd59edcaaf413065ef44eb79b187152384cba7924cf43b7ae910bb1c416772e6e45e265e273dc2888932
|
data/README.md
CHANGED
@@ -13,34 +13,3 @@ Pier assumes that each cluster has a cluster-manager endpoint, called a "pier."
|
|
13
13
|
A pier need not be a member of the cluster itself. Pier does not manage the pier, only the cluster visible through the pier.
|
14
14
|
|
15
15
|
By default, Pier also assumes that each pier is the _libvirt hypervisor_ for its cluster—i.e. that libvirt's endpoint is accessible as `qemu+ssh://[your-pier-endpoint]/system`.
|
16
|
-
|
17
|
-
## Installation
|
18
|
-
|
19
|
-
Add this line to your application's Gemfile:
|
20
|
-
|
21
|
-
```ruby
|
22
|
-
gem 'docker-pier'
|
23
|
-
```
|
24
|
-
|
25
|
-
And then execute:
|
26
|
-
|
27
|
-
$ bundle
|
28
|
-
|
29
|
-
Or install it yourself as:
|
30
|
-
|
31
|
-
$ gem install docker-pier
|
32
|
-
|
33
|
-
## Usage
|
34
|
-
|
35
|
-
TODO: Write usage instructions here
|
36
|
-
|
37
|
-
## Development
|
38
|
-
|
39
|
-
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
40
|
-
|
41
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
42
|
-
|
43
|
-
## Contributing
|
44
|
-
|
45
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/tsutsu/docker-pier.
|
46
|
-
|
data/exe/docker-pier
CHANGED
@@ -131,7 +131,7 @@ Main do
|
|
131
131
|
def modified_ps1_ln
|
132
132
|
ps1 = ENV['PS1']
|
133
133
|
return '' if ps1 =~ /DOCKER_MACHINE_NAME/
|
134
|
-
escaped_ps1 = ps1.gsub(/(\\\[.+?\\\])|(\$\{.+?\})/){ |
|
134
|
+
escaped_ps1 = ps1.gsub(/(\\\[.+?\\\])|(\$\{.+?\})/){ |s1,s2| (s1||s2).gsub(/:/, '&&COLON&&') }
|
135
135
|
escaped_ps1_parts = escaped_ps1.split(':')
|
136
136
|
return '' unless escaped_ps1_parts.length == 2
|
137
137
|
ps1_parts = escaped_ps1_parts.map{ |s| s.gsub(/&&COLON&&/, ':') }
|
@@ -139,7 +139,15 @@ Main do
|
|
139
139
|
end
|
140
140
|
|
141
141
|
mode 'hook:install' do
|
142
|
+
option('ps1'){
|
143
|
+
argument :optional
|
144
|
+
cast :bool
|
145
|
+
description 'enable ps1 modification'
|
146
|
+
}
|
147
|
+
|
142
148
|
def run
|
149
|
+
ps1_ln = params['ps1'].value ? modified_ps1_ln : ''
|
150
|
+
|
143
151
|
puts <<~EOF
|
144
152
|
pier ()
|
145
153
|
{
|
@@ -155,7 +163,7 @@ Main do
|
|
155
163
|
esac
|
156
164
|
}
|
157
165
|
|
158
|
-
#{
|
166
|
+
#{ps1_ln}
|
159
167
|
EOF
|
160
168
|
end
|
161
169
|
end
|
data/lib/docker-pier/version.rb
CHANGED