hello_ruby_cli 0.1.1 → 0.2.1

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
  SHA256:
3
- metadata.gz: 04a18a2c8e80bb9f1f3300bfd6ffb834523ed7768b2bdb32a731aafedc2acc15
4
- data.tar.gz: b5fc02db9f843173f6af4169d60cd69534959662e174df830e0d73a99002da91
3
+ metadata.gz: ff0160e22c4113b8f19d3578541c264ec189a630fed65b82b8dd31135e08293e
4
+ data.tar.gz: 96b0eb9cedd70835346188e4379a6b55a9f34f0a8c9b399c27fcd70e371f02f8
5
5
  SHA512:
6
- metadata.gz: 364ffdd337013871790546bc0cd13ede46fec268d5de5920603ee05713ee6ee50c286753c1207eea84245bbafc8660e410b13d705820ee86dceb190d93e7a827
7
- data.tar.gz: e7f2076900b82d15d90fed8a991f54678c7dcf7a407809cd60af41f9f91c8ba640d5b3d0eac95a4dec245d357802200385f6f5dc276fca68b0a427618f6e9a71
6
+ metadata.gz: 4b0ccea85e17b982189f21c54b0b97ceb9e09dca6d07116b1f4ff37bf89d1a7f9a583b924fea097342ba54ddc5f96be5056c6f517de92c55fe9b7ef64935aaa4
7
+ data.tar.gz: e5e0decb46599c3dc3d5a783c43eaafc3a6defd00c4b3981b5c847cbe224de725a4e13b47bd1d37714715d250f52670cf8d941c3196e1c858ec018490d2ae8c4
data/.rubocop.yml CHANGED
@@ -1,4 +1,7 @@
1
1
  require: rubocop-rake
2
2
 
3
3
  AllCops:
4
- SuggestExtensions: false
4
+ SuggestExtensions: false
5
+
6
+ Metrics/MethodLength:
7
+ Max: 20
@@ -33,6 +33,7 @@ Gem::Specification.new do |spec|
33
33
  # Uncomment to register a new dependency of your gem
34
34
  # spec.add_dependency "example-gem", "~> 1.0"
35
35
  spec.add_dependency 'thor', '~> 1.3'
36
+ spec.add_dependency 'tty-prompt', '~> 0.23.1'
36
37
 
37
38
  # For more information and examples about making a new gem, check out our
38
39
  # guide at: https://bundler.io/guides/creating_gem.html
@@ -0,0 +1,91 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Get Company info
4
+ class Company
5
+ COMPANIES = ['Braincommerce', 'MadxCompany', 'INNORIX', 'The Ventures Lab'].freeze
6
+
7
+ attr_accessor :company_name
8
+
9
+ def initialize(company_name)
10
+ @company_name = company_name.downcase.gsub(' ', '_')
11
+ end
12
+
13
+ def show
14
+ public_send(@company_name)
15
+ end
16
+
17
+ def braincommerce
18
+ "
19
+ ___ ___ _____ _ _ _ ___ _____ ___ ___ ___ ___
20
+ ( _`\\ | _`\\ ( _ )(_)( ) ( )( _`\\ ( _ )/'\\_/`\\/'\\_/`\\( _`\\ | _`\\ ( _`\\ ( _`\\
21
+ | (_) )| (_) )| (_) || || `\\| || ( (_)| ( ) || || || (_(_)| (_) )| ( (_)| (_(_)
22
+ | _ <'| , / | _ || || , ` || | _ | | | || (_) || (_) || _)_ | , / | | _ | _)_
23
+ | (_) )| |\\ \\ | | | || || |`\\ || (_( )| (_) || | | || | | || (_( )| |\\ \\ | (_( )| (_( )
24
+ (____/'(_) (_)(_) (_)(_)(_) (_)(____/'(_____)(_) (_)(_) (_)(____/'(_) (_)(____/'(____/'
25
+
26
+ __ __ __ __ __ ___ _ _
27
+ /'__`\\ /' _`\\ /'__`\\ /'__`\\ /' _`\\ /'_ ) /' \\/' )
28
+ (_) ) )| ( ) |(_) ) )(_) ) ) | ( ) |(_)_) | (_/\\__/'
29
+ /' / | | | | /' / /' / | | | | _(_ <
30
+ /' /( )| (_) | /' /( ) /' /( ) _ | (_) |( )_) |
31
+ (_____/'`\\___/'(_____/'(_____/'(_)`\\___/'`\\____)
32
+ "
33
+ end
34
+
35
+ def madx_company
36
+ "
37
+ _____ ___ _ _ ___ _____ ___ _____ _ _ _ _
38
+ /'\\_/`\\( _ )( _`\\ ( ) ( )( _`\\ ( _ )/'\\_/`\\( _`\\ ( _ )( ) ( )( ) ( )
39
+ | || (_) || | ) |`\\`\\/'/'| ( (_)| ( ) || || |_) )| (_) || `\\| |`\\`\\_/'/'
40
+ | (_) || _ || | | ) > < | | _ | | | || (_) || ,__/'| _ || , ` | `\\ /'
41
+ | | | || | | || |_) | /'/\\`\\ | (_( )| (_) || | | || | | | | || |`\\ | | |
42
+ (_) (_)(_) (_)(____/'(_) (_)(____/'(_____)(_) (_)(_) (_) (_)(_) (_) (_)
43
+
44
+
45
+ __ __ _ __ __ _____ _ _ __ __ __ _ _ __
46
+ /'__`\\ /' _`\\ /' ) /'_ `\\ /' _`\\ ( ___) /' \\/' ) /'__`\\ /' _`\\ /'__`\\ /' ) /' ) /'__`\\
47
+ (_) ) )| ( ) |(_, |( (_) | | ( ) || (__ (_/\\__/' (_) ) )| ( ) |(_) ) )(_, | (_, |(_) ) )
48
+ /' / | | | | | | \\__, | | | | ||___ `\\ /' / | | | | /' / | | | | /' /
49
+ /' /( )| (_) | | | | | _ | (_) |( )_) | /' /( )| (_) | /' /( ) | | _ | | /' /( )
50
+ (_____/'`\\___/' (_) (_)(_)`\\___/'`\\___/' (_____/'`\\___/'(_____/' (_)(_) (_)(_____/'
51
+ "
52
+ end
53
+
54
+ def innorix
55
+ "
56
+ _ _ _ _ _ _____ ___ _ _ _
57
+ (_)( ) ( )( ) ( )( _ )| _`\\ (_)( ) ( )
58
+ | || `\\| || `\\| || ( ) || (_) )| |`\\`\\/'/'
59
+ | || , ` || , ` || | | || , / | | > <
60
+ | || |`\\ || |`\\ || (_) || |\\ \\ | | /'/\\`\\
61
+ (_)(_) (_)(_) (_)(_____)(_) (_)(_)(_) (_)
62
+
63
+
64
+ __ __ _ _ __ ___ _ _ __ __ _ __ __ _
65
+ /'__`\\ /' _`\\ /' ) /'_`\\ /' _`\\ /'_ ) /' \\/' ) /'__`\\ /' _`\\ /' ) /'_ `\\ /' _`\\ /' )
66
+ (_) ) )| ( ) |(_, |( (_) ) | ( ) |(_)_) | (_/\\__/' (_) ) )| ( ) |(_, |( (_) | | ( ) |(_, |
67
+ /' / | | | | | | > _ <' | | | | _(_ < /' / | | | | | | \\__, | | | | | | |
68
+ /' /( )| (_) | | |( (_) ) _ | (_) |( )_) | /' /( )| (_) | | | | | _ | (_) | | |
69
+ (_____/'`\\___/' (_)`\\___/'(_)`\\___/'`\\____) (_____/'`\\___/' (_) (_)(_)`\\___/' (_)
70
+ "
71
+ end
72
+
73
+ def the_ventures_lab
74
+ "
75
+ _____ _ _ ___ _ _ ___ _ _ _____ _ _ ___ ___ ___ _ _____ ___
76
+ (_ _)( ) ( )( _`\\ ( ) ( )( _`\\ ( ) ( )(_ _)( ) ( )| _`\\ ( _`\\ ( _`\\ ( ) ( _ )( _`\\
77
+ | | | |_| || (_(_) | | | || (_(_)| `\\| | | | | | | || (_) )| (_(_)| (_(_) | | | (_) || (_) )
78
+ | | | _ || _)_ | | | || _)_ | , ` | | | | | | || , / | _)_ `\\__ \\ | | _ | _ || _ <'
79
+ | | | | | || (_( ) | \\_/ || (_( )| |`\\ | | | | (_) || |\\ \\ | (_( )( )_) | | |_( )| | | || (_) )
80
+ (_) (_) (_)(____/' `\\___/'(____/'(_) (_) (_) (_____)(_) (_)(____/'`\\____) (____/'(_) (_)(____/'
81
+
82
+
83
+ __ __ _ _ _ __ _ _ _ __ __ _ _____ _ __
84
+ /'__`\\ /' _`\\ /' )( )( ) /' _`\\ /' ) /' \\/' ) /'__`\\ /' _`\\ /' )( ___) /' )/' _`\\
85
+ (_) ) )| ( ) |(_, || || | | ( ) |(_, | (_/\\__/' (_) ) )| ( ) |(_, || (__ (_, || ( ) |
86
+ /' / | | | | | || || |_ | | | | | | /' / | | | | | || _ `\\ | || | | |
87
+ /' /( )| (_) | | |(__ ,__) _ | (_) | | | /' /( )| (_) | | || (_) | _ | || (_) |
88
+ (_____/'`\\___/' (_) (_) (_)`\\___/' (_) (_____/'`\\___/' (_)`\\___/'(_) (_)`\\___/'
89
+ "
90
+ end
91
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HelloRubyCli
4
- VERSION = '0.1.1'
4
+ VERSION = '0.2.1'
5
5
  end
@@ -1,21 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'hello_ruby_cli/version'
4
+
5
+ require 'hello_ruby_cli/company'
4
6
  require 'thor'
7
+ require 'tty-prompt'
5
8
 
6
9
  module HelloRubyCli
7
- class Error < StandardError; end
8
-
9
10
  # Main Cli Class
10
11
  class CLI < Thor
11
- desc 'hello [name]', 'say my name'
12
+ desc 'career_history [company_name]', 'showing career history'
12
13
 
13
- def hello(name)
14
- if name == 'joungsik'
15
- puts 'you are goddamn right'
16
- else
17
- puts 'say my name'
18
- end
14
+ def career_history
15
+ prompt = TTY::Prompt.new
16
+ company_name = prompt.select('Choose company?', Company::COMPANIES)
17
+ puts company_name.empty? ? 'no company name' : Company.new(company_name).show
19
18
  end
20
19
  end
21
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hello_ruby_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - JoungSik
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: tty-prompt
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.23.1
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.23.1
27
41
  description: test hello world cli program
28
42
  email:
29
43
  - tjstlr2010@gmail.com
@@ -41,8 +55,8 @@ files:
41
55
  - exe/hello_ruby_cli
42
56
  - hello_ruby_cli.gemspec
43
57
  - lib/hello_ruby_cli.rb
58
+ - lib/hello_ruby_cli/company.rb
44
59
  - lib/hello_ruby_cli/version.rb
45
- - sig/hello_ruby_cli.rbs
46
60
  homepage: https://github.com/joungsik/hello_ruby_cli
47
61
  licenses:
48
62
  - MIT
@@ -1,4 +0,0 @@
1
- module HelloRubyCli
2
- VERSION: String
3
- # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
- end