pokedex-terminal 0.1.1 → 0.1.2
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 +4 -4
 - data/Gemfile.lock +1 -1
 - data/bin/console +1 -1
 - data/bin/pokedex-terminal +1 -3
 - data/lib/{pokedex/classes → classes}/Delete.rb +0 -0
 - data/lib/{pokedex/classes → classes}/List.rb +1 -0
 - data/lib/{pokedex/classes → classes}/Main_menu.rb +4 -1
 - data/lib/{pokedex/classes → classes}/New.rb +0 -0
 - data/lib/{pokedex/classes → classes}/Print.rb +2 -0
 - data/lib/{pokedex/classes → classes}/Search.rb +0 -0
 - data/lib/{pokedex/classes → classes}/Update.rb +0 -0
 - data/lib/pokemon-terminal.rb +6 -0
 - data/lib/{pokedex/terminal → terminal}/version.rb +1 -1
 - data/lib/{pokedex/test.rb → test.rb} +0 -0
 - data/lib/{pokedex/titlesequence.plaintext → titlesequence.plaintext} +0 -0
 - data/pokedex-terminal.gemspec +4 -4
 - metadata +15 -16
 - data/lib/pokedex/classes/Pokemon.rb +0 -16
 - data/lib/pokedex/terminal.rb +0 -6
 - data/lib/pokedex/terminal.rb.save +0 -8
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 360fced44a71058bcaec8c07f2a57d3f8b9cb2330dfb55a072f5a7dde6ea0685
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 875cc3ace591042a18a1ce859c2f41a4b66585a9243866724a9266172f35629f
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 264dda2ae2c32b2313d881af00aeaad9082e249d0a5e7f37b96aba54fb540569d7022438dc8129fd6051713e3c89b63851685790dfd2301342f5e472077c2508
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: c6655af403379e18d83c53caadf5e129a0b7f819b4cbe53dfad12a362696c76006ce19d2cca0d835c9cb0fa72dd29a74b1863fb997612b86d1603f21d6327bd7
         
     | 
    
        data/Gemfile.lock
    CHANGED
    
    
    
        data/bin/console
    CHANGED
    
    
    
        data/bin/pokedex-terminal
    CHANGED
    
    
| 
         
            File without changes
         
     | 
| 
         @@ -4,6 +4,7 @@ class List 
     | 
|
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
              def self.list_menu(data)
         
     | 
| 
       6 
6 
     | 
    
         
             
                while true
         
     | 
| 
      
 7 
     | 
    
         
            +
                  system 'clear'
         
     | 
| 
       7 
8 
     | 
    
         
             
                  list_prompt = TTY::Prompt.new(active_color: :red)
         
     | 
| 
       8 
9 
     | 
    
         
             
                  user_input = list_prompt.select("How would you like to list the Pokemon?\nPlease enter one of the following options.") do |menu|
         
     | 
| 
       9 
10 
     | 
    
         
             
                  menu.choice "List all", 1
         
     | 
| 
         @@ -5,15 +5,17 @@ require_relative './List' 
     | 
|
| 
       5 
5 
     | 
    
         
             
            require_relative './Delete'
         
     | 
| 
       6 
6 
     | 
    
         
             
            require 'tty-prompt'
         
     | 
| 
       7 
7 
     | 
    
         
             
            require 'smarter_csv'
         
     | 
| 
      
 8 
     | 
    
         
            +
            require 'artii'
         
     | 
| 
      
 9 
     | 
    
         
            +
            require 'lolize'
         
     | 
| 
       8 
10 
     | 
    
         | 
| 
       9 
11 
     | 
    
         
             
            class Main_menu
         
     | 
| 
       10 
12 
     | 
    
         
             
            @@pokemon_data = SmarterCSV.process('../../data/pokemon.csv')
         
     | 
| 
       11 
13 
     | 
    
         | 
| 
       12 
14 
     | 
    
         
             
              def self.run
         
     | 
| 
       13 
15 
     | 
    
         
             
                while true
         
     | 
| 
      
 16 
     | 
    
         
            +
                  fork{exec "artii './titlesequence.plaintext' --font larry3d | lolcat"}
         
     | 
| 
       14 
17 
     | 
    
         
             
                  main_menu_prompt = TTY::Prompt.new(active_color: :red)
         
     | 
| 
       15 
18 
     | 
    
         
             
                  puts "-" * 40
         
     | 
| 
       16 
     | 
    
         
            -
                  # main_menu_prompt.warn("        Welcome to your Pokedex!")
         
     | 
| 
       17 
19 
     | 
    
         
             
                  puts "        Welcome to your Pokedex!        ".blue.on_red.blink
         
     | 
| 
       18 
20 
     | 
    
         
             
                  puts "-" * 40
         
     | 
| 
       19 
21 
     | 
    
         
             
                  user_input = main_menu_prompt.select("Please select from the following:") do |menu|
         
     | 
| 
         @@ -27,6 +29,7 @@ class Main_menu 
     | 
|
| 
       27 
29 
     | 
    
         
             
                  end
         
     | 
| 
       28 
30 
     | 
    
         
             
                  case user_input
         
     | 
| 
       29 
31 
     | 
    
         
             
                    when 1
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
       30 
33 
     | 
    
         
             
                      List.list_menu(@@pokemon_data)
         
     | 
| 
       31 
34 
     | 
    
         
             
                    when 2
         
     | 
| 
       32 
35 
     | 
    
         
             
                      name = Search.by_name(@@pokemon_data)
         
     | 
| 
         
            File without changes
         
     | 
| 
         @@ -4,6 +4,7 @@ require 'colorize' 
     | 
|
| 
       4 
4 
     | 
    
         
             
            class Print
         
     | 
| 
       5 
5 
     | 
    
         | 
| 
       6 
6 
     | 
    
         
             
              def self.print_pokemon_expanded(hash)
         
     | 
| 
      
 7 
     | 
    
         
            +
                system 'clear'
         
     | 
| 
       7 
8 
     | 
    
         
             
                puts "-" * 40
         
     | 
| 
       8 
9 
     | 
    
         
             
                puts "#{hash[:name]}"
         
     | 
| 
       9 
10 
     | 
    
         
             
                puts "-" * 40
         
     | 
| 
         @@ -27,6 +28,7 @@ class Print 
     | 
|
| 
       27 
28 
     | 
    
         
             
              end
         
     | 
| 
       28 
29 
     | 
    
         | 
| 
       29 
30 
     | 
    
         
             
              def self.print_pokemon_condensed(hash)
         
     | 
| 
      
 31 
     | 
    
         
            +
                system 'clear'
         
     | 
| 
       30 
32 
     | 
    
         
             
                name = "#{hash[:name]}"
         
     | 
| 
       31 
33 
     | 
    
         
             
                case hash[:type_1]
         
     | 
| 
       32 
34 
     | 
    
         
             
                  when "Normal"
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
    
        data/pokedex-terminal.gemspec
    CHANGED
    
    | 
         @@ -1,4 +1,4 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require_relative 'lib/ 
     | 
| 
      
 1 
     | 
    
         
            +
            require_relative 'lib/terminal/version'
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            Gem::Specification.new do |spec|
         
     | 
| 
       4 
4 
     | 
    
         
             
              spec.name          = "pokedex-terminal"
         
     | 
| 
         @@ -11,7 +11,8 @@ Gem::Specification.new do |spec| 
     | 
|
| 
       11 
11 
     | 
    
         
             
              spec.homepage      = "https://rubygems.org/gems/pokedex-terminal"
         
     | 
| 
       12 
12 
     | 
    
         
             
              spec.license       = "GPL-3.0-or-later"
         
     | 
| 
       13 
13 
     | 
    
         
             
              spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
      
 14 
     | 
    
         
            +
              spec.executables   = ["pokedex-terminal"]
         
     | 
| 
      
 15 
     | 
    
         
            +
              spec.require_paths = ["lib"]
         
     | 
| 
       15 
16 
     | 
    
         
             
              # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
         
     | 
| 
       16 
17 
     | 
    
         | 
| 
       17 
18 
     | 
    
         
             
              # spec.metadata["homepage_uri"] = spec.homepage
         
     | 
| 
         @@ -23,8 +24,7 @@ Gem::Specification.new do |spec| 
     | 
|
| 
       23 
24 
     | 
    
         
             
              spec.files         = Dir.chdir(File.expand_path('..', __FILE__)) do
         
     | 
| 
       24 
25 
     | 
    
         
             
                `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
         
     | 
| 
       25 
26 
     | 
    
         
             
              end
         
     | 
| 
       26 
     | 
    
         
            -
              spec. 
     | 
| 
       27 
     | 
    
         
            -
              spec.executables   = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
         
     | 
| 
      
 27 
     | 
    
         
            +
              spec.executables   = ["pokedex-terminal"]
         
     | 
| 
       28 
28 
     | 
    
         
             
              spec.require_paths = ["lib"]
         
     | 
| 
       29 
29 
     | 
    
         
             
              spec.add_development_dependency 'colorize', '~> 0.8.1'
         
     | 
| 
       30 
30 
     | 
    
         
             
              spec.add_development_dependency 'smarter_csv', '~> 1.1', '>= 1.1.4'
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,12 +1,12 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: pokedex-terminal
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.2
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - nova
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
     | 
    
         
            -
            bindir:  
     | 
| 
      
 9 
     | 
    
         
            +
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
11 
     | 
    
         
             
            date: 2020-03-12 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
         @@ -101,7 +101,8 @@ dependencies: 
     | 
|
| 
       101 
101 
     | 
    
         
             
            description: Pokedex in terminal with CRUD functionality.
         
     | 
| 
       102 
102 
     | 
    
         
             
            email:
         
     | 
| 
       103 
103 
     | 
    
         
             
            - alexander.coole@protonmail.com
         
     | 
| 
       104 
     | 
    
         
            -
            executables: 
     | 
| 
      
 104 
     | 
    
         
            +
            executables:
         
     | 
| 
      
 105 
     | 
    
         
            +
            - pokedex-terminal
         
     | 
| 
       105 
106 
     | 
    
         
             
            extensions: []
         
     | 
| 
       106 
107 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
       107 
108 
     | 
    
         
             
            files:
         
     | 
| 
         @@ -118,19 +119,17 @@ files: 
     | 
|
| 
       118 
119 
     | 
    
         
             
            - bin/pokedex-terminal
         
     | 
| 
       119 
120 
     | 
    
         
             
            - bin/setup
         
     | 
| 
       120 
121 
     | 
    
         
             
            - data/pokemon.csv
         
     | 
| 
       121 
     | 
    
         
            -
            - lib/ 
     | 
| 
       122 
     | 
    
         
            -
            - lib/ 
     | 
| 
       123 
     | 
    
         
            -
            - lib/ 
     | 
| 
       124 
     | 
    
         
            -
            - lib/ 
     | 
| 
       125 
     | 
    
         
            -
            - lib/ 
     | 
| 
       126 
     | 
    
         
            -
            - lib/ 
     | 
| 
       127 
     | 
    
         
            -
            - lib/ 
     | 
| 
       128 
     | 
    
         
            -
            - lib/ 
     | 
| 
       129 
     | 
    
         
            -
            - lib/ 
     | 
| 
       130 
     | 
    
         
            -
            - lib/ 
     | 
| 
       131 
     | 
    
         
            -
            - lib/ 
     | 
| 
       132 
     | 
    
         
            -
            - lib/pokedex/test.rb
         
     | 
| 
       133 
     | 
    
         
            -
            - lib/pokedex/titlesequence.plaintext
         
     | 
| 
      
 122 
     | 
    
         
            +
            - lib/classes/Delete.rb
         
     | 
| 
      
 123 
     | 
    
         
            +
            - lib/classes/List.rb
         
     | 
| 
      
 124 
     | 
    
         
            +
            - lib/classes/Main_menu.rb
         
     | 
| 
      
 125 
     | 
    
         
            +
            - lib/classes/New.rb
         
     | 
| 
      
 126 
     | 
    
         
            +
            - lib/classes/Print.rb
         
     | 
| 
      
 127 
     | 
    
         
            +
            - lib/classes/Search.rb
         
     | 
| 
      
 128 
     | 
    
         
            +
            - lib/classes/Update.rb
         
     | 
| 
      
 129 
     | 
    
         
            +
            - lib/pokemon-terminal.rb
         
     | 
| 
      
 130 
     | 
    
         
            +
            - lib/terminal/version.rb
         
     | 
| 
      
 131 
     | 
    
         
            +
            - lib/test.rb
         
     | 
| 
      
 132 
     | 
    
         
            +
            - lib/titlesequence.plaintext
         
     | 
| 
       134 
133 
     | 
    
         
             
            - pokedex-terminal.gemspec
         
     | 
| 
       135 
134 
     | 
    
         
             
            homepage: https://rubygems.org/gems/pokedex-terminal
         
     | 
| 
       136 
135 
     | 
    
         
             
            licenses:
         
     | 
| 
         @@ -1,16 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            class Pokemon
         
     | 
| 
       2 
     | 
    
         
            -
              def initialize(hash)
         
     | 
| 
       3 
     | 
    
         
            -
                @name = hash[:name]
         
     | 
| 
       4 
     | 
    
         
            -
                @type_1 = hash[:type_1]
         
     | 
| 
       5 
     | 
    
         
            -
                @type_2 = hash[:type_2]
         
     | 
| 
       6 
     | 
    
         
            -
                @total = hash[:total]
         
     | 
| 
       7 
     | 
    
         
            -
                @hp = hash[:hp]
         
     | 
| 
       8 
     | 
    
         
            -
                @attack = hash[:attack]
         
     | 
| 
       9 
     | 
    
         
            -
                @defense = hash[:defense]
         
     | 
| 
       10 
     | 
    
         
            -
                @sp_atk = hash[:"sp._atk"]
         
     | 
| 
       11 
     | 
    
         
            -
                @sp_def = hash[:"sp._def"]
         
     | 
| 
       12 
     | 
    
         
            -
                @speed = hash[:speed]
         
     | 
| 
       13 
     | 
    
         
            -
                @generation = hash[:generation]
         
     | 
| 
       14 
     | 
    
         
            -
                @legendary = hash[:legendary]
         
     | 
| 
       15 
     | 
    
         
            -
              end
         
     | 
| 
       16 
     | 
    
         
            -
            end
         
     | 
    
        data/lib/pokedex/terminal.rb
    DELETED