install_gem_local 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -2
- data/Gemfile.lock +2 -2
- data/config/locales/en.yml +26 -0
- data/install_gem_local.gemspec +1 -1
- data/lib/install_gem_local.rb +2 -0
- data/lib/install_gem_local/action.rb +1 -1
- data/lib/install_gem_local/action/build_gem.rb +2 -2
- data/lib/install_gem_local/action/copy_gem.rb +3 -3
- data/lib/install_gem_local/action/install_gem.rb +2 -2
- data/lib/install_gem_local/action/push_gem.rb +2 -2
- data/lib/install_gem_local/action/remove_gem.rb +2 -2
- data/lib/install_gem_local/helper.rb +9 -8
- data/lib/install_gem_local/navigation.rb +8 -8
- data/lib/install_gem_local/version.rb +1 -1
- metadata +22 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef6d5c9baaa122694989b32f230042e5969ea7040e20e3bd91ab5f46c359f8b4
|
4
|
+
data.tar.gz: 31b2af9ec13cb03652fd366e1c1b951db9a29412beb6031add5973c9579cd107
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c6eaad72ce368ee98d5a309273c305cec27c86409c107520def518d39f4333e8db9ae5ec67081d565170e7174a7b5e96de4725f2cc364f064444fd1bb76f35a
|
7
|
+
data.tar.gz: 78fb13ad2772b779338351052ee81007d0e78ba3f8633f1aa4f757a5fa12bd53f5d234b5abf8820eebf181d0be6f3a2896907ad06d77805582588fe7898a6e23
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
install_gem_local (0.1.
|
4
|
+
install_gem_local (0.1.12)
|
5
5
|
awesome_print (~> 1.8, >= 1.8.0)
|
6
6
|
downup (~> 0.11, >= 0.11.7)
|
7
7
|
thor (~> 0.20, >= 0.20.3)
|
8
|
+
tty-command (~> 0.8, >= 0.8.2)
|
8
9
|
|
9
10
|
GEM
|
10
11
|
remote: https://rubygems.org/
|
@@ -63,7 +64,6 @@ DEPENDENCIES
|
|
63
64
|
rake (~> 10.0)
|
64
65
|
rspec (~> 3.0)
|
65
66
|
rubocop
|
66
|
-
tty-command
|
67
67
|
|
68
68
|
BUNDLED WITH
|
69
69
|
2.0.1
|
@@ -0,0 +1,26 @@
|
|
1
|
+
en:
|
2
|
+
gem_not_exist: 'Gem not exist'
|
3
|
+
gemspec_not_exist: 'Gemspec not exist'
|
4
|
+
choose_copy_folder: 'Choose Folder to Copy'
|
5
|
+
choose_version: 'Choose Version'
|
6
|
+
something_wrong: 'Something Wrong! Try again!'
|
7
|
+
action:
|
8
|
+
remove_gem:
|
9
|
+
puts_line: 'Remove Gem'
|
10
|
+
display: 'Remove old version'
|
11
|
+
build_gem:
|
12
|
+
puts_line: 'Build Gem'
|
13
|
+
display: 'Build new version'
|
14
|
+
install_gem:
|
15
|
+
puts_line: 'Install Gem'
|
16
|
+
display: 'Install new version'
|
17
|
+
copy_gem:
|
18
|
+
puts_line: 'Copy Gem'
|
19
|
+
display: 'Copy gem to folder'
|
20
|
+
push_gem:
|
21
|
+
puts_line: 'Push Gem'
|
22
|
+
display: 'Build the latest version and push the gem'
|
23
|
+
till_install:
|
24
|
+
display: 'Remove old version, build and install the new version'
|
25
|
+
till_copy:
|
26
|
+
display: 'Remove old version, build, install and copy the new version'
|
data/install_gem_local.gemspec
CHANGED
@@ -35,5 +35,5 @@ Gem::Specification.new do |spec|
|
|
35
35
|
# CLI
|
36
36
|
spec.add_dependency 'thor', '~> 0.20', '>= 0.20.3'
|
37
37
|
# Execute shell commands with pretty output
|
38
|
-
|
38
|
+
spec.add_dependency 'tty-command', '~> 0.8', '>= 0.8.2'
|
39
39
|
end
|
data/lib/install_gem_local.rb
CHANGED
@@ -4,6 +4,7 @@ require 'thor'
|
|
4
4
|
require 'downup'
|
5
5
|
require 'awesome_print'
|
6
6
|
require 'tty-command'
|
7
|
+
require 'i18n'
|
7
8
|
|
8
9
|
require 'install_gem_local/action/install_gem'
|
9
10
|
require 'install_gem_local/action/build_gem'
|
@@ -11,6 +12,7 @@ require 'install_gem_local/action/remove_gem'
|
|
11
12
|
require 'install_gem_local/action/copy_gem'
|
12
13
|
require 'install_gem_local/action/push_gem'
|
13
14
|
Dir[File.join(File.expand_path(__dir__), 'install_gem_local', '**/*.rb')].each { |f| require f }
|
15
|
+
I18n.load_path << Dir[File.expand_path("config/locales") + "/*.yml"]
|
14
16
|
|
15
17
|
module InstallGemLocal
|
16
18
|
class App < Thor
|
@@ -39,7 +39,7 @@ module InstallGemLocal
|
|
39
39
|
end
|
40
40
|
options['/'] = { 'value' => 'exit', 'display' => 'Exit' }
|
41
41
|
InstallGemLocal::Helper.prompt_options(
|
42
|
-
flash_message: InstallGemLocal::Helper.flash_message(title:
|
42
|
+
flash_message: InstallGemLocal::Helper.flash_message(title: I18n.t(:choose_version)),
|
43
43
|
options: options
|
44
44
|
)
|
45
45
|
end
|
@@ -4,10 +4,10 @@ module InstallGemLocal
|
|
4
4
|
module BuildGem
|
5
5
|
def build_gem
|
6
6
|
puts ''
|
7
|
-
puts '
|
7
|
+
puts I18n.t('action.build_gem.puts_line').green
|
8
8
|
file = tty_command.run('find -type f -name "*.gemspec"')
|
9
9
|
file_name = file.out.strip
|
10
|
-
file_name.empty? ? ap(
|
10
|
+
file_name.empty? ? ap(I18n.t(:gemspec_not_exist)) : tty_command.run("gem build #{file_name}")
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
@@ -11,14 +11,14 @@ module InstallGemLocal
|
|
11
11
|
}
|
12
12
|
|
13
13
|
InstallGemLocal::Helper.prompt_options(
|
14
|
-
flash_message: InstallGemLocal::Helper.flash_message(title: '
|
14
|
+
flash_message: InstallGemLocal::Helper.flash_message(title: I18n.t('choose_copy_folder')),
|
15
15
|
options: options
|
16
16
|
)
|
17
17
|
end
|
18
18
|
|
19
19
|
def copy_gem
|
20
20
|
puts ''
|
21
|
-
puts '
|
21
|
+
puts I18n.t('action.copy_gem.puts_line').green
|
22
22
|
files_exists = file_names
|
23
23
|
|
24
24
|
if files_exists.count > 1
|
@@ -26,7 +26,7 @@ module InstallGemLocal
|
|
26
26
|
elsif files_exists.count == 1
|
27
27
|
copy_file_to_path(files_exists.first)
|
28
28
|
else
|
29
|
-
ap
|
29
|
+
ap I18n.t(:gem_not_exist)
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
@@ -4,14 +4,14 @@ module InstallGemLocal
|
|
4
4
|
module InstallGem
|
5
5
|
def install_gem
|
6
6
|
puts ''
|
7
|
-
puts '
|
7
|
+
puts I18n.t('action.install_gem.puts_line').green
|
8
8
|
files_exists = file_names
|
9
9
|
if files_exists.count > 1
|
10
10
|
install_gem_from_path(multiple_version_selection)
|
11
11
|
elsif files_exists.count == 1
|
12
12
|
install_gem_from_path(files_exists.first)
|
13
13
|
else
|
14
|
-
ap
|
14
|
+
ap I18n.t(:gem_not_exist)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
@@ -3,14 +3,14 @@ module InstallGemLocal
|
|
3
3
|
def push_gem
|
4
4
|
till_install
|
5
5
|
puts ''
|
6
|
-
puts '
|
6
|
+
puts I18n.t('action.push_gem.puts_line').blue
|
7
7
|
files_exists = file_names
|
8
8
|
if files_exists.count > 1
|
9
9
|
push_gem_from_path(multiple_version_selection)
|
10
10
|
elsif files_exists.count == 1
|
11
11
|
push_gem_from_path(files_exists.first)
|
12
12
|
else
|
13
|
-
ap
|
13
|
+
ap I18n.t(:gem_not_exist)
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
@@ -4,14 +4,14 @@ module InstallGemLocal
|
|
4
4
|
module RemoveGem
|
5
5
|
def remove_gem
|
6
6
|
puts ''
|
7
|
-
puts '
|
7
|
+
puts I18n.t('action.remove_gem.puts_line').red
|
8
8
|
file_exists = file_names
|
9
9
|
if file_exists.count > 1
|
10
10
|
remove_file_from_path(multiple_version_selection(include_all: true))
|
11
11
|
elsif file_exists.count == 1
|
12
12
|
remove_file_from_path(file_exists.first)
|
13
13
|
else
|
14
|
-
ap
|
14
|
+
ap I18n.t(:gem_not_exist)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
@@ -12,14 +12,15 @@ module InstallGemLocal
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def flash_message(title: "")
|
15
|
-
|
16
|
-
█████ ███████ █
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
█████ ███████ ███████ #{title}
|
22
|
-
STR
|
15
|
+
# message = <<-STR
|
16
|
+
# █████ ███████ █
|
17
|
+
# █ ██ █
|
18
|
+
# █ ██ █
|
19
|
+
# █ ██ ███ █
|
20
|
+
# █ ██ █ █
|
21
|
+
# █████ ███████ ███████ #{title}
|
22
|
+
#STR
|
23
|
+
title
|
23
24
|
end
|
24
25
|
|
25
26
|
end
|
@@ -5,13 +5,13 @@ module InstallGemLocal
|
|
5
5
|
class << self
|
6
6
|
def start
|
7
7
|
options = {
|
8
|
-
'a' => { 'value' => 'remove_gem', 'display' => '
|
9
|
-
'b' => { 'value' => 'build_gem', 'display' => '
|
10
|
-
'c' => { 'value' => 'install_gem', 'display' => '
|
11
|
-
'd' => { 'value' => 'copy_gem', 'display' => '
|
12
|
-
'e' => { 'value' => 'push_gem', 'display' => '
|
13
|
-
'f' => { 'value' => 'till_install', 'display' => '
|
14
|
-
'g' => { 'value' => 'till_copy', 'display' => '
|
8
|
+
'a' => { 'value' => 'remove_gem', 'display' => I18n.t('action.remove_gem.display') },
|
9
|
+
'b' => { 'value' => 'build_gem', 'display' => I18n.t('action.build_gem.display') },
|
10
|
+
'c' => { 'value' => 'install_gem', 'display' => I18n.t('action.install_gem.display') },
|
11
|
+
'd' => { 'value' => 'copy_gem', 'display' => I18n.t('action.copy_gem.display') },
|
12
|
+
'e' => { 'value' => 'push_gem', 'display' => I18n.t('action.push_gem.display') },
|
13
|
+
'f' => { 'value' => 'till_install', 'display' => I18n.t('action.till_install.display') },
|
14
|
+
'g' => { 'value' => 'till_copy', 'display' => I18n.t('action.till_copy.display') },
|
15
15
|
'/' => { 'value' => 'exit', 'display' => 'Exit' }
|
16
16
|
}
|
17
17
|
|
@@ -27,7 +27,7 @@ module InstallGemLocal
|
|
27
27
|
|
28
28
|
rescue StandardError => e
|
29
29
|
ap e
|
30
|
-
ap '
|
30
|
+
ap I18n.t('something_wrong')
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: install_gem_local
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dhanabal T
|
@@ -112,6 +112,26 @@ dependencies:
|
|
112
112
|
- - ">="
|
113
113
|
- !ruby/object:Gem::Version
|
114
114
|
version: 0.20.3
|
115
|
+
- !ruby/object:Gem::Dependency
|
116
|
+
name: tty-command
|
117
|
+
requirement: !ruby/object:Gem::Requirement
|
118
|
+
requirements:
|
119
|
+
- - "~>"
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0.8'
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 0.8.2
|
125
|
+
type: :runtime
|
126
|
+
prerelease: false
|
127
|
+
version_requirements: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0.8'
|
132
|
+
- - ">="
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: 0.8.2
|
115
135
|
description: to build and install the gem in my local
|
116
136
|
email:
|
117
137
|
- vel.dhanabal@gmail.com
|
@@ -131,6 +151,7 @@ files:
|
|
131
151
|
- Rakefile
|
132
152
|
- bin/console
|
133
153
|
- bin/setup
|
154
|
+
- config/locales/en.yml
|
134
155
|
- exe/install_gem_local
|
135
156
|
- install_gem_local.gemspec
|
136
157
|
- lib/install_gem_local.rb
|