check_everything 0.1.3 → 0.1.4

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/check_everything.rb +9 -9
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8415d76d0de3425539aa27e0a9f0512796b52577
4
- data.tar.gz: e029e04c35bddfc1c87fa13e00c31b2c02969617
3
+ metadata.gz: b122d8de6966ddd03792e3f87a831eb038f5a854
4
+ data.tar.gz: e59a49a8025d318948e6984e2314f12fe6913120
5
5
  SHA512:
6
- metadata.gz: 50eb95db45afcd59cb39e336c6031adfc6e2cd140167f27f1c8f087b12fe9daa9e3f4e250e38ee98e4eb6c80e95463efb3f4a5a4e1a1f64318d3a31316e5c49d
7
- data.tar.gz: 4bbc7575b95a85dc32ac9b548e040fc286e9e745fdd3caa7255d0b9ba9ef46c0fc774bd56af557998cb167516513fb477ec9fb82f50ef42f8728d631cf802d12
6
+ metadata.gz: 485ab37271e244ed4efb6eee554acedea3ecb22d5178ef0df91c5c8790222593b3bf0af53f9809e102f2709c678a18952b06e32806d04c7a84ed093503de432c
7
+ data.tar.gz: 73c5f8693e0ff0c78bcdefad56d265b1905753ea8b8c44c210a06f8d6b7b784e936f1ad0b9bc604058848cf868b41c13d83f24554b5ab748cddb46080033e7df
@@ -19,7 +19,7 @@ class CheckEverything
19
19
  "the link file."
20
20
  end
21
21
  # Assume no problems with the link file.
22
- @link_space, @link_dash = false, false
22
+ @category_space, @category_dash = false, false
23
23
 
24
24
  extract_links
25
25
 
@@ -44,10 +44,10 @@ class CheckEverything
44
44
 
45
45
  # Check for errors; don't allow the user to see bad categories or open up
46
46
  # websites if the categories are not formatted properly.
47
- elsif @link_space
47
+ elsif @category_space
48
48
  puts "Your link file includes a category with a space in it; " +
49
49
  "please fix by entering 'check_everything -l' into your command line."
50
- elsif @link_dash
50
+ elsif @category_dash
51
51
  puts "Your link file includes a category with a dash, which is " +
52
52
  "not allowed; please fix by entering 'check_everything -l' into your command line."
53
53
 
@@ -118,7 +118,7 @@ class CheckEverything
118
118
  link_file.each do |line|
119
119
  if line.start_with?("&&")
120
120
  # add tags as keys in @links, and assign to cur_tags
121
- cur_tags = add_tag(line[2..-1].strip).flatten
121
+ cur_tags = add_category(line[2..-1].strip).flatten
122
122
  elsif line.start_with?("--")
123
123
  # add links to each relevant tag in @links
124
124
  cur_tags.each { |tag|
@@ -129,17 +129,17 @@ class CheckEverything
129
129
  end
130
130
 
131
131
  # Recursive helper method for extract_links
132
- def self.add_tag(line)
132
+ def self.add_category(line)
133
133
  line.downcase!
134
134
  # Add multiple tags, if separated by semicolons.
135
135
  if line.include?(";")
136
136
  line.split(";").map(&:strip).each do |tag|
137
- add_tag(tag.strip)
137
+ add_category(tag.strip)
138
138
  end
139
139
  else
140
- # Note to raise an error if there is an invalid link.
141
- @link_space = true if line.match(/ /)
142
- @link_dash = true if line.match(/-/)
140
+ # Note to raise an error if there is an invalid category.
141
+ @category_space = true if line.match(/ /)
142
+ @category_dash = true if line.match(/-/)
143
143
  @links[line] ||= []
144
144
  [line]
145
145
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: check_everything
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ariel Caplan