magic_tcg_finder 0.3.0 → 0.4.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: 0b5b809c071d495469dd41887bea342b663e11c8
4
- data.tar.gz: 55f1f91a7e83cbe1f70320a03601c97ce53204fc
3
+ metadata.gz: 1c36da613c5c213603aee5581d3d5571538dc377
4
+ data.tar.gz: a5ae5d40fb08989e4c5c4998099bc73ca44de5aa
5
5
  SHA512:
6
- metadata.gz: 73f2ef5bcc5fd2b934f040527f60ba03d47cf57e7c19deb2f503dde74d9818a2301be9b0713d2682123c4c2801d8f22fbc3d310a4e2cda3ce1f391a6b8c2fd0b
7
- data.tar.gz: bb73acf4f2a4ed7701c918c0500cb959f47383294aa4cee33055a27a40993ef14d3db7d77eee0538471a05c2b7daee04e395d8d1302a68039b7152308b23ef89
6
+ metadata.gz: 41fdaad9ba5e0f0064461cb07b9a18fc24ab8378da685689f9b5e2380fbb6b6b7cc02d27532ea2bd229b4bae11869472ee319f7e9e67016faf85008c262b9e0e
7
+ data.tar.gz: b063fba2b8e93387fbc081bc0e9eebce3634a6afeacfb46a02338b858dd2059b9e2712533aab5567f43120e82ef19868189d5d61317a5824530ce174b553d045
@@ -72,39 +72,18 @@ class CommandLine
72
72
  cost = cost.gsub(/\{\d\}/) { |match| match.colorize(:light_black) }
73
73
  end
74
74
 
75
- def colorize_identity(card)
76
- color = card.color
77
-
78
- case color
79
- when "White"
80
- card.color.colorize(:light_yellow)
81
- when "Blue"
82
- card.color.colorize(:light_cyan)
83
- when "Black"
84
- card.color.colorize(:magenta)
85
- when "Red"
86
- card.color.colorize(:red)
87
- when "Green"
88
- card.color.colorize(:green)
89
- when "Multicolor"
90
- card.color.colorize(:yellow)
91
- else
92
- card.color.colorize(:light_black)
93
- end
94
- end
95
-
96
75
  def load_card(input)
97
76
  chosen_card = Card.all[input - 1]
98
77
  load_attributes(chosen_card) if chosen_card.rules_text.nil?
99
78
  puts "#{chosen_card.name} - #{colorize_cost(chosen_card.cost)}"
100
79
  puts ""
101
- puts "Color Identity: #{colorize_identity(chosen_card)}"
80
+ puts "Color Identity: #{chosen_card.color}"
102
81
  puts "Type: #{chosen_card.card_type}"
103
82
  puts "Rarity: #{chosen_card.rarity}"
104
83
  puts ""
105
84
  puts "#{colorize_cost(chosen_card.rules_text)}"
106
85
  puts "#{chosen_card.flavor_text}"
107
- puts "#{chosen_card.combat_stats}" unless chosen_card.combat_stats.nil?
86
+ puts "#{chosen_card.combat_stats}"
108
87
  puts ""
109
88
  puts "Appears in the following set(s): #{chosen_card.sets.join(', ')}"
110
89
  puts ""
@@ -49,9 +49,9 @@ class Scraper
49
49
  end
50
50
 
51
51
  def self.color_finder(cost)
52
- colors = {'{W}' =>'White','{U}' => 'Blue','{B}' => 'Black','{R}' => 'Red','{G}' => 'Green'}
52
+ colors = {'{W}' =>'White'.colorize(:light_yellow),'{U}' => 'Blue'.colorize(:light_cyan),'{B}' => 'Black'.colorize(:magenta),'{R}' => 'Red'.colorize(:red),'{G}' => 'Green'.colorize(:green)}
53
53
  matches = 0
54
- color_identity = "Colorless"
54
+ color_identity = "Colorless".colorize(:light_black)
55
55
  #Not all cards have a casting cost
56
56
  return color_identity if cost.nil?
57
57
 
@@ -64,7 +64,7 @@ class Scraper
64
64
 
65
65
 
66
66
  if matches > 1
67
- "Multicolor"
67
+ "Multicolor".colorize(:yellow)
68
68
  else
69
69
  color_identity
70
70
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magic_tcg_finder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandra Wright