nib 1.4.0 → 1.4.1

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: a2d0d457ee0bdd2654793fd043122a1e2dfebce5
4
- data.tar.gz: 086c7ac0a6e0bbf12cbd6b6abdc0e866a46fb80d
3
+ metadata.gz: 1651bb01b23fef2f4e1415fa29fdf8285a95b5a1
4
+ data.tar.gz: 0c90102a53cb0e68f884e8513b71f221eb5dd6ff
5
5
  SHA512:
6
- metadata.gz: f79e0312ce728a86b455be93175cb2918f4bdb725e17391d1dac273b19ac3e58b9c667fe88f7be6f662cf70f8b193d9b4bc70850eef580aede59754116227d2b
7
- data.tar.gz: 6e6c6345b2dd972350005ec6a935dd31c95e08f651e2872c502d54e10b780bf9b181652e7b48116f82c765555e23f613e830075e154dcbf8af075c5e812ca37f
6
+ metadata.gz: 7b84daa061d383e755522257a97bf784d6a4179b8aeafb9f98f67e8cf909815d0c582a85cd1418f686ef25707810c9b4a7d397b373bd9349b9a466ac6b88e051
7
+ data.tar.gz: 68b68e21a45334ce4405fe3f20baa2cb20ea7398327e1a3bf3f12174d6e40af1dca169fe86bd3038a8df0b3d7e42fa477a47315587176ca5f0d18d01b489161f
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.0
1
+ 1.4.1
data/bin/nib CHANGED
@@ -190,4 +190,11 @@ command :shell do |c|
190
190
  end
191
191
  end
192
192
 
193
+ desc 'Download the latest version of nib'
194
+ command :update do |c|
195
+ c.action do |global, options, args|
196
+ Nib::Update.execute(options, args)
197
+ end
198
+ end
199
+
193
200
  exit run(ARGV)
@@ -101,5 +101,13 @@
101
101
  "long_description": "",
102
102
  "options": [],
103
103
  "service_options": ""
104
+ },
105
+ {
106
+ "name": "update",
107
+ "type": "custom",
108
+ "short_description": "Download the latest version of nib",
109
+ "long_description": "",
110
+ "options": [],
111
+ "service_options": ""
104
112
  }
105
113
  ]
data/lib/nib.rb CHANGED
@@ -17,6 +17,7 @@ require 'nib/exec'
17
17
  require 'nib/run'
18
18
  require 'nib/setup'
19
19
  require 'nib/shell'
20
+ require 'nib/update'
20
21
 
21
22
  module Nib
22
23
  GEM_ROOT = File.expand_path('../..', __FILE__)
@@ -4,10 +4,10 @@ class Nib::CheckForUpdate
4
4
  def self.execute(_, _)
5
5
  return if installed == latest
6
6
 
7
- puts <<~MESSAGE
7
+ puts <<-MESSAGE
8
8
 
9
9
  An update is available for nib: #{latest}
10
- Use 'gem update nib' to install the latest version
10
+ Use 'nib update' to install the latest version
11
11
  MESSAGE
12
12
  end
13
13
 
@@ -11,7 +11,7 @@ class Nib::CodeClimate
11
11
  end
12
12
 
13
13
  def script
14
- @script ||= <<~SCRIPT
14
+ @script ||= <<-SCRIPT
15
15
  docker-compose \
16
16
  -f #{compose_file.path} \
17
17
  run \
@@ -24,7 +24,7 @@ module Nib::Command
24
24
  end
25
25
 
26
26
  def script
27
- @script ||= <<~SCRIPT
27
+ @script ||= <<-SCRIPT
28
28
  docker-compose \
29
29
  run \
30
30
  --rm \
@@ -2,7 +2,7 @@ class Nib::Console
2
2
  include Nib::Command
3
3
  prepend Nib::History
4
4
 
5
- SCRIPT = <<~SH.freeze
5
+ SCRIPT = <<-SH.freeze
6
6
  has_pry=false
7
7
  has_boot=false
8
8
  if hash pry 2>/dev/null ; then
@@ -38,6 +38,6 @@ class Nib::Debug
38
38
  (?<port>\d+) # capture numeric value of the port
39
39
  /x
40
40
 
41
- compose_file.match(regexp)&.send(:[], :port)
41
+ (compose_file.match(regexp) || {}).send(:[], :port)
42
42
  end
43
43
  end
@@ -3,7 +3,7 @@ class Nib::Exec
3
3
  prepend Nib::History
4
4
 
5
5
  def script
6
- @script ||= <<~SCRIPT
6
+ @script ||= <<-SCRIPT
7
7
  docker-compose \
8
8
  exec \
9
9
  #{options} \
@@ -1,5 +1,5 @@
1
1
  module Nib::History
2
- IRBRC = <<~'IRB'.freeze
2
+ IRBRC = <<-'IRB'.freeze
3
3
  require \"rubygems\"
4
4
  require \"irb/completion\"
5
5
  require \"irb/ext/save-history\"
@@ -20,7 +20,7 @@ module Nib::History
20
20
  end
21
21
 
22
22
  def command
23
- <<~COMMAND
23
+ <<-COMMAND
24
24
  /bin/sh -c \"
25
25
  export HISTFILE=./tmp/shell_history
26
26
  echo '#{IRBRC}' > /root/.irbrc
@@ -1,7 +1,7 @@
1
1
  class Nib::Setup
2
2
  include Nib::Command
3
3
 
4
- SCRIPT = <<~SH.freeze
4
+ SCRIPT = <<-SH.freeze
5
5
  if [ -f bin/setup.before ]; then
6
6
  bin/setup.before
7
7
  fi
@@ -2,7 +2,7 @@ class Nib::Shell
2
2
  include Nib::Command
3
3
  prepend Nib::History
4
4
 
5
- SCRIPT = <<~SH.freeze
5
+ SCRIPT = <<-SH.freeze
6
6
  if hash bash 2>/dev/null ; then
7
7
  bash
8
8
  elif hash ash 2>/dev/null ; then
@@ -1,6 +1,6 @@
1
1
  class Nib::UnrecognizedHelp
2
2
  def self.execute(_, _)
3
- puts <<~MESSAGE
3
+ puts <<-MESSAGE
4
4
 
5
5
  Note:
6
6
  Unrecognized commands will be delegated to docker-compose.
@@ -0,0 +1,5 @@
1
+ class Nib::Update
2
+ def self.execute(_, _)
3
+ exec('gem uninstall -ax nib && gem install nib')
4
+ end
5
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nib
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Allen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-02-15 00:00:00.000000000 Z
12
+ date: 2017-02-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gli
@@ -137,9 +137,8 @@ dependencies:
137
137
  - - "~>"
138
138
  - !ruby/object:Gem::Version
139
139
  version: 1.0.5
140
- description: 'nib is a docker-compose wrapper geared towards Ruby/Rails development.
141
-
142
- '
140
+ description: |2
141
+ nib is a docker-compose wrapper geared towards Ruby/Rails development.
143
142
  email:
144
143
  - noreply@technekes.com
145
144
  executables:
@@ -168,6 +167,7 @@ files:
168
167
  - lib/nib/setup.rb
169
168
  - lib/nib/shell.rb
170
169
  - lib/nib/unrecognized_help.rb
170
+ - lib/nib/update.rb
171
171
  - lib/nib/version.rb
172
172
  homepage: https://github.com/technekes/nib
173
173
  licenses: []
@@ -181,7 +181,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
181
181
  requirements:
182
182
  - - ">="
183
183
  - !ruby/object:Gem::Version
184
- version: '0'
184
+ version: 2.2.0
185
185
  required_rubygems_version: !ruby/object:Gem::Requirement
186
186
  requirements:
187
187
  - - ">="