nib 1.1.0 → 1.2.0

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: 771f362ff201cb486408a2a30c12ceb58d4afda2
4
- data.tar.gz: 22030812aaf1463371399e19bd9180e14afcd935
3
+ metadata.gz: 4c48d9d97a3008736c705d2bd039aa90af468900
4
+ data.tar.gz: 2d514306e7ca6f8b66d999d9f2692547e5eb2c8b
5
5
  SHA512:
6
- metadata.gz: a71124f98d3660fcd11968c54c5b0b4cd62e14a37930bb394ecb3ef4d7d02d7ee5d880458dd2bf52ef65efa1523e2ccbd1d1920782db35982700f30b23362c78
7
- data.tar.gz: c4cb4ff1c894357b4bb7be1fdbf279587c171d91ffc8c06acce623869c254c72bd792052ff7b2ab3fae24486d8dce66812de89963edc5d5898facc22eb3db39d
6
+ metadata.gz: '0880da3cb223ae595d5b27837aa74b9a84ceff5dee7b08a64c2b1790f1ee4b5a36ab849677e541f788aefbb1f5ba87de1405817d979e9420704d72ebb13b6bcd'
7
+ data.tar.gz: 369f7ee5b365715370c318dbd41b9349af6f349b9bb969d00a597b69ebc66e56199fbc730c1fbd285a3c7ea3747c2093be1b22e0495862f3170f234dfa4e68cc
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.2.0
data/bin/nib CHANGED
@@ -180,11 +180,4 @@ command :shell do |c|
180
180
  end
181
181
  end
182
182
 
183
- desc 'Download the latest version of the nib tool'
184
- command :update do |c|
185
- c.action do |global, options, args|
186
- Nib::Update.execute(args)
187
- end
188
- end
189
-
190
183
  exit run(ARGV)
@@ -101,13 +101,5 @@
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 the nib tool",
109
- "long_description": "",
110
- "options": [],
111
- "service_options": ""
112
104
  }
113
105
  ]
data/lib/nib.rb CHANGED
@@ -16,7 +16,6 @@ require 'nib/exec'
16
16
  require 'nib/run'
17
17
  require 'nib/setup'
18
18
  require 'nib/shell'
19
- require 'nib/update'
20
19
 
21
20
  module Nib
22
21
  GEM_ROOT = File.expand_path('../..', __FILE__)
@@ -1,3 +1,5 @@
1
+ require 'net/http'
2
+
1
3
  class Nib::CheckForUpdate
2
4
  def self.execute(_, _)
3
5
  return if installed == latest
@@ -5,7 +7,7 @@ class Nib::CheckForUpdate
5
7
  puts <<~MESSAGE
6
8
 
7
9
  An update is available for nib: #{latest}
8
- Use 'nib update' to pull the latest version
10
+ Use 'gem update nib' to install the latest version
9
11
  MESSAGE
10
12
  end
11
13
 
@@ -14,6 +16,8 @@ class Nib::CheckForUpdate
14
16
  end
15
17
 
16
18
  def self.latest
17
- `wget -qO- https://raw.githubusercontent.com/technekes/nib/latest/VERSION`
19
+ url = 'https://raw.githubusercontent.com/technekes/nib/latest/VERSION'
20
+
21
+ Net::HTTP.get(URI.parse(url)).chomp
18
22
  end
19
23
  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.1.0
4
+ version: 1.2.0
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-01-26 00:00:00.000000000 Z
12
+ date: 2017-01-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gli
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - '='
19
19
  - !ruby/object:Gem::Version
20
- version: 2.14.0
20
+ version: 2.15.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - '='
26
26
  - !ruby/object:Gem::Version
27
- version: 2.14.0
27
+ version: 2.15.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: pry
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -53,6 +53,20 @@ dependencies:
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: rake
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
56
70
  - !ruby/object:Gem::Dependency
57
71
  name: guard
58
72
  requirement: !ruby/object:Gem::Requirement
@@ -139,7 +153,6 @@ files:
139
153
  - lib/nib/setup.rb
140
154
  - lib/nib/shell.rb
141
155
  - lib/nib/unrecognized_help.rb
142
- - lib/nib/update.rb
143
156
  - lib/nib/version.rb
144
157
  homepage: https://github.com/technekes/nib
145
158
  licenses: []
@@ -1,31 +0,0 @@
1
- require 'tempfile'
2
-
3
- class Nib::Update
4
- include Nib::Command
5
-
6
- def script
7
- @script ||= <<~SCRIPT
8
- docker-compose \
9
- -f #{compose_file.path} \
10
- pull
11
- SCRIPT
12
- end
13
-
14
- private
15
-
16
- def config
17
- <<~CONFIG
18
- version: '2'
19
-
20
- services:
21
- nib:
22
- image: technekes/nib:latest
23
- CONFIG
24
- end
25
-
26
- def compose_file
27
- @compose_file ||= Tempfile.open('compose') do |file|
28
- file.tap { |f| f.write(config) }
29
- end
30
- end
31
- end