yogi 0.3.7 → 0.3.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f87bc70bd0166717a6d45160e3959dbf5ad9d62
4
- data.tar.gz: f3cb8d660e6c0404341027e84403fd131f5638ad
3
+ metadata.gz: 357853648a4299c83e252366001d571f0d79365c
4
+ data.tar.gz: eae73d8c24903a256f9738dca92c7a9516d4635c
5
5
  SHA512:
6
- metadata.gz: cba97f3d9cfb48a2f911e091fb36ef73c4198b8cf7713ecf0d5d9ea679cb9be22aff694fe44948566ceb999031ffb0ffe9c748822bd935e88640fbffe904e2bd
7
- data.tar.gz: d095ada5ac15f5c6540a41849805f86bce16d805187635014ac4de0f4308618052e841a04cae62c3c67b8bcbc5f65b4df8b55dd12f8269cabc9de71c45a719a4
6
+ metadata.gz: 5350cb24025e7556b858e09de8a6fe02a51cddd295d64564dafb0962648e15bb785d1513c1a8121198a2f9fd5b9b1f1c2fd938ed84c3605117ed1bd73faaf12e
7
+ data.tar.gz: 77f4a3ecc9d4d4e9171ebf4580ad02fe560d5efd0d7cb4c581b2dd6bf33f92a5b3c5ab6487a32ccd3ed7d1f3fa32647d47b27e519526080ecd5d4cf0fa253d10
data/README.md CHANGED
@@ -8,14 +8,14 @@ So this is good enough to start practice your debugging skills.
8
8
  You can check you progress or..
9
9
  when you get stuck, you can fix your project anytime with just one word.
10
10
 
11
- latest stable version 0.3.7
11
+ latest stable version 0.3.8
12
12
 
13
13
  ## Installation
14
14
 
15
15
  Add this line to your application's Gemfile:
16
16
 
17
17
  ```ruby
18
- gem 'yogi', '~> 0.3.7'
18
+ gem 'yogi', '~> 0.3.8'
19
19
  ```
20
20
 
21
21
  And then execute:
@@ -36,7 +36,7 @@ Sick of debugging type _"fixme"_
36
36
 
37
37
  ## in Planing
38
38
 
39
- increase in error complexity and more status updates
39
+ timing of the debugging process
40
40
 
41
41
 
42
42
  ## Contributing
data/bin/activate CHANGED
@@ -1,13 +1,17 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'Yogi'
3
3
  require 'os'
4
+ require 'etc'
5
+
6
+ $account = Etc.getlogin
7
+
4
8
 
5
9
  if File.exists?(".git/.ignoremefile.txt")
6
10
  if OS.mac?
7
- cmd = ("say 'You fool can not activate me twice'")
11
+ cmd = ("say '#{$account}, you fool, can not activate me twice'")
8
12
  system cmd
9
13
  end
10
- puts 'You fool can not activate me twice'
14
+ puts "#{$account} you fool, can not activate me twice"
11
15
  else
12
16
  setup = Yogi::Setup.new
13
17
  setup.setup
data/bin/checkme CHANGED
@@ -2,14 +2,17 @@
2
2
 
3
3
  require 'Yogi'
4
4
  require 'os'
5
+ require 'etc'
6
+ $account = Etc.getlogin
7
+
5
8
 
6
9
  if File.exists?(".git/.ignoremefile.txt")
7
10
  errorCheck = Yogi::CheckErrors.new
8
11
  errorCheck.checker
9
12
  else
10
13
  if OS.mac?
11
- cmd = ("say 'You fool should activate me first'")
14
+ cmd = ("say '#{$account}, you fool should activate me first'")
12
15
  system cmd
13
16
  end
14
- puts 'You should first activate the gem before you can check your progress'
17
+ puts "#{$account}, you should first activate the gem before you can check your progress"
15
18
  end
data/bin/fixme CHANGED
@@ -1,14 +1,17 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'Yogi'
3
3
  require 'os'
4
+ require 'etc'
5
+ $account = Etc.getlogin
6
+
4
7
 
5
8
  if File.exists?(".git/.backupFiles")
6
9
  errorOut = Yogi::ErrorOut.new
7
10
  errorOut.undo
8
11
  else
9
12
  if OS.mac?
10
- cmd = ("say 'You fool should activate me before you can fix me'")
13
+ cmd = ("say '#{$account}, you fool should activate me before you can fix me'")
11
14
  system cmd
12
15
  end
13
- puts "nothing to fix here"
16
+ puts "Nothing to fix here #{$account}."
14
17
  end
data/lib/yogi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Yogi
2
- VERSION = "0.3.7"
2
+ VERSION = "0.3.8"
3
3
  end
data/lib/yogi.rb CHANGED
@@ -4,6 +4,9 @@ require 'fileutils'
4
4
  require 'json'
5
5
  require 'os'
6
6
  require 'shellwords'
7
+ require 'etc'
8
+ $account = Etc.getlogin
9
+
7
10
 
8
11
  module Yogi
9
12
 
@@ -138,8 +141,9 @@ module Yogi
138
141
  count_hash << pre_count_hash
139
142
  end
140
143
  File.open('.git/.ignoreme.json', "a") {|file| file.write count_hash.to_json}
141
- puts "You can start your debugging..."
142
- puts "if your are sick of it, just type...'fixme'"
144
+ puts "You can start your debugging now, #{$account}!"
145
+ puts "To check your progess type ..'checkme'"
146
+ puts "If your are sick of it, just type...'fixme'"
143
147
  if OS.mac?
144
148
  file = File.join(__dir__, 'sound', 'activated.mp3')
145
149
  escfile = Shellwords.escape(file)
@@ -242,26 +246,84 @@ module Yogi
242
246
 
243
247
  case fix
244
248
  when 0
245
- puts "dont just sit around, get started to fix some stuff"
249
+ reply = "Don't just sit around #{$account}, get started to fix some stuff!"
250
+ additional = 'You lazy $%##$#.'
246
251
  when 0..25
247
- puts "Not a bad start but im sure you can do better"
252
+ reply = "Not a bad start but im sure you can do better!"
253
+ additional = "#{$account}, you just getting started right?"
248
254
  when 25.000..50.000
249
- puts "Well, well now we getting somewhere"
255
+ reply = "Well, well now we getting somewhere!"
256
+ additional = 'Nearly half way...'
250
257
  when 50.000..75.000
251
- puts "You see, not that hard...right?"
258
+ reply = "You see, not that hard...right?"
259
+ additional = 'Nice just job, mate.'
252
260
  when 75.000..100.000
253
- puts "Nearly there... you can do it"
261
+ reply = "Nearly there... you can do it!"
262
+ additional = 'Just a few more...'
254
263
  when 100
255
- puts "Wow I'm impressed...wanne go again?"
264
+ reply = "Wow I'm impressed...wanne go again?"
265
+ additional = 'Either you cheated or you are a true master of syntax errors because...'
266
+ else
267
+ reply = "WTF"
268
+ end
269
+
270
+ case
271
+ when Time.now.monday?
272
+ if OS.mac?
273
+ cmd = ("say 'happy monday #{$account}'")
274
+ system cmd
275
+ end
276
+ additionalreply = "Ruby-Monday"
256
277
  when Time.now.tuesday?
257
- puts "ruby-Tuesday"
278
+ if OS.mac?
279
+ cmd = ("say 'happy tuesday #{$account}'")
280
+ system cmd
281
+ end
282
+ additionalreply = "Ruby-Tuesday"
283
+ when Time.now.wednesday?
284
+ if OS.mac?
285
+ cmd = ("say 'happy wednesday #{$account}'")
286
+ system cmd
287
+ end
288
+ additionalreply = "Ruby-Wednesday"
289
+ when Time.now.thursday?
290
+ if OS.mac?
291
+ cmd = ("say 'happy thursday #{$account}'")
292
+ system cmd
293
+ end
294
+ additionalreply = "Ruby-Thursday"
295
+ when Time.now.friday?
296
+ if OS.mac?
297
+ cmd = ("say 'Yeeaah...happy friday #{$account}'")
298
+ system cmd
299
+ end
300
+ additionalreply = "Thank god it's Ruby-Friday"
301
+ when Time.now.saturday?
302
+ if OS.mac?
303
+ cmd = ("say 'Ruby-Ruby-Weekend #{$account}'")
304
+ system cmd
305
+ end
306
+ additionalreply = "Practicing on saturday....very good #{$account}"
307
+ when Time.now.sunday?
308
+ if OS.mac?
309
+ cmd = ("say 'Just another sunday?'")
310
+ system cmd
311
+ end
312
+ additionalreply = "#{$account}, do you never rest?"
258
313
  else
259
- puts "WTF"
314
+ if OS.mac?
315
+ cmd = ("say 'WTF'")
316
+ system cmd
317
+ end
318
+ reply = "WTF"
260
319
  end
261
320
 
262
321
  puts "================================="
263
- puts " You fixed #{fix}% of all the errors "
264
- puts " You fixed #{fixed_errors.to_i} errors, #{post_diff.to_i} more to go."
322
+ puts "#{additionalreply}"
323
+ puts "#{reply}"
324
+ puts "#{$account}, you fixed #{fix}% of all the errors. "
325
+ puts "#{additional}"
326
+ puts "#{$account}, you fixed #{fixed_errors.to_i} errors, #{post_diff.to_i} more to go."
265
327
  puts "================================="
266
328
  if OS.mac?
267
329
  file = File.join(__dir__, 'sound', 'oh-yeah.mp3')
@@ -292,11 +354,14 @@ module Yogi
292
354
  FileUtils.rm_r '.git/.backupFiles' if File.exist?('.git/.backupFiles')
293
355
  FileUtils.rm_r '.git/.ignoreme.json' if File.exist?('.git/.ignoreme.json')
294
356
  FileUtils.rm_r '.git/.ignoremefile.txt' if File.exist?('.git/.ignoremefile.txt')
295
- puts " Hope You had fun and try it again later."
357
+ puts "Hope You had fun and try it again later."
358
+ puts "See you next time #{$account}"
296
359
  if OS.mac?
297
360
  file = File.join(__dir__, 'sound', 'Giving-up.mp3')
298
361
  escfile = Shellwords.escape(file)
299
362
  cmd = "afplay #{escfile}"
363
+ name = "say '#{$account}'"
364
+ system name
300
365
  system cmd
301
366
  # elsif OS.linux?
302
367
  # file = File.join(__dir__, 'sound', 'Giving-up.mp3')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yogi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Langnickel