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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 761cf73b319fb5110f21e2a7a9772cb474092bf4
4
- data.tar.gz: a06742b4d898d0009c9fb419fa324a19fee46c52
3
+ metadata.gz: d14a336c2c3d2d8817e22fa3b721b07bf16277ec
4
+ data.tar.gz: cd0698fb35faa2fd786009747d7ba55c1f77fccc
5
5
  SHA512:
6
- metadata.gz: 92fa8a870bf627767ced6b04c11cfa2906396c8e61cf0089db90e9e0484011e557bb29ecc9d19027a529561fe008ac8b44558245882973a5ce874f27f4c08485
7
- data.tar.gz: ca632fd937d338d6d7bcd0e2df6e1175562df501b8db31e455a03e2c7ee82d71e65bc1964779a34a3d957e27e65598187c35b4c048ab1660cf91a5c6536c2a01
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
-
@@ -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(/(\\\[.+?\\\])|(\$\{.+?\})/){ |s| s.gsub(/:/, '&&COLON&&') }
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
- #{modified_ps1_ln}
166
+ #{ps1_ln}
159
167
  EOF
160
168
  end
161
169
  end
@@ -1,3 +1,3 @@
1
1
  module DockerPier
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docker-pier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Levi Aul