replace_host 1.0.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 +7 -0
- data/bin/replace_host +5 -0
- data/lib/replace_host.rb +9 -0
- metadata +46 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 909f7fe403c674ce2525f45ee6ff191ce511b790
|
4
|
+
data.tar.gz: f315a2fb74d484ad30cdae45d2a15bf57c98816b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 59e58422098d60c72ace6510e3092ebe59c5295dd6ab9f9c74e49a93b5de0ccf32b462ec6ac2118401ffb824f447da0726c1f2cd8514567b3c83e1f6bb1e3765
|
7
|
+
data.tar.gz: 3940894c0336cdf6e7b6420f8c8987788af9c3034849a79f91680b3dc11770a6adfef26a7db9fe3088f81a8f429a059894328f46adebee43718c629ac996e16a
|
data/bin/replace_host
ADDED
data/lib/replace_host.rb
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
class ReplaceHost
|
2
|
+
def self.process
|
3
|
+
system "sed -i 's/192.168.99.100/localhost/g' config/settings.yml"
|
4
|
+
system "echo", "-e", "\e[92mYour replace successful!"
|
5
|
+
rescue Exception => e
|
6
|
+
system "echo", "-e", "\e[91m#{e.message}"
|
7
|
+
system "echo", "-e", "\e[91mMake sure you're in the right place!"
|
8
|
+
end
|
9
|
+
end
|
metadata
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: replace_host
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Nguyen Ngoc Phu
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-08-29 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A simple gem which will replace Ip address to localhost
|
14
|
+
email: ngocphu.uit@gmail.com
|
15
|
+
executables:
|
16
|
+
- replace_host
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- bin/replace_host
|
21
|
+
- lib/replace_host.rb
|
22
|
+
homepage: https://rubygems.org/gems/replace_host
|
23
|
+
licenses:
|
24
|
+
- MIT
|
25
|
+
metadata: {}
|
26
|
+
post_install_message:
|
27
|
+
rdoc_options: []
|
28
|
+
require_paths:
|
29
|
+
- lib
|
30
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
requirements: []
|
41
|
+
rubyforge_project:
|
42
|
+
rubygems_version: 2.5.2
|
43
|
+
signing_key:
|
44
|
+
specification_version: 4
|
45
|
+
summary: replace localhost in file
|
46
|
+
test_files: []
|