yogi 0.1.2 → 0.1.3

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 (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/yogi.rb +14 -13
  3. data/lib/yogi/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d53c33cbda4c20afe8d5618700ec37cbbd2c204
4
- data.tar.gz: f88b354d36be2b159b17276940fd93d824bd904f
3
+ metadata.gz: 401a4c97a8b1f128d49de6f97c80a0a41f81e895
4
+ data.tar.gz: 3c1a4bf6ff6e7489516145e017cb4be5ab81d1e9
5
5
  SHA512:
6
- metadata.gz: a68e85ce9b0b0155603ef6060cdc807c9551abcd1b0a48c7b441c3468a9b368f66c85cd523b9a4e058ea40260ab16e92c0c9bddcda552b0d5cd8cc18d1b460bf
7
- data.tar.gz: 2bd2f8eb22bcf9919d4f6291e6ebd73926c5763c87ab149d8e9e499bbc2d20863c1b8dd09e9b26951e0ab1840b6b9a925d5d36dde2023bffdca88520070de129
6
+ metadata.gz: 4eff02a10a7f7bc4b64dafd7348c868706740cef542f48ee812587cf76a2fd8c110f9dadc6022814c7cd72d2eb03a5b874b375e9a4f12282ccc22725586bb471
7
+ data.tar.gz: dd38d5e6e424a29f7a93620b09da3881f11d3837d21ff53137fe38ef1c44ece0b0762fe2dd3b04927f4e39635ef00542b25c27c61e1dd6ee3455960a72224b3b
data/lib/yogi.rb CHANGED
@@ -28,20 +28,21 @@ module Yogi
28
28
  def yogify
29
29
  @@file_sample.each do |file_name|
30
30
  text = File.read(file_name)
31
+ puts "editing #{@@file_sample}"
31
32
 
32
33
  #counting ocurences of the original chars before changes
33
- # counted_comma = text.count(",") #counts ocurences in the file
34
- # counted_semicolon = text.count(";") #counts ocurences in the file
35
- # counted_1 = text.count("1") #counts ocurences in the file
36
- # counted_3 = text.count("3") #counts ocurences in the file
37
- # counted_5 = text.count("5") #counts ocurences in the file
38
- # counted_px = text.count("px") #counts ocurences in the file
39
- # puts "commas : #{counted_comma}"
40
- # puts "semikolons : #{counted_semicolon}"
41
- # puts "1 : #{counted_1}"
42
- # puts "3 : #{counted_3}"
43
- # puts "5 : #{counted_5}"
44
- # puts "px : #{counted_px}"
34
+ counted_comma = text.count(",") #counts ocurences in the file
35
+ counted_semicolon = text.count(";") #counts ocurences in the file
36
+ counted_1 = text.count("1") #counts ocurences in the file
37
+ counted_3 = text.count("3") #counts ocurences in the file
38
+ counted_5 = text.count("5") #counts ocurences in the file
39
+ counted_px = text.count("px") #counts ocurences in the file
40
+ puts "commas : #{counted_comma}"
41
+ puts "semikolons : #{counted_semicolon}"
42
+ puts "1 : #{counted_1}"
43
+ puts "3 : #{counted_3}"
44
+ puts "5 : #{counted_5}"
45
+ puts "px : #{counted_px}"
45
46
 
46
47
  # To merely print the contents of the file, use:
47
48
  new_contents1 = text.gsub(";"){rand(2).zero? ? ";" : ","}
@@ -50,7 +51,7 @@ module Yogi
50
51
  new_contents4 = new_contents3.gsub("3"){rand(2).zero? ? "3" : "E"}
51
52
  new_contents5 = new_contents4.gsub("5"){rand(2).zero? ? "5" : "S"}
52
53
  new_contents6 = new_contents5.gsub("px"){rand(2).zero? ? "px" : "xp"}
53
- # puts new_contents6
54
+ puts new_contents6
54
55
 
55
56
  # To write changes to the file, use:
56
57
  File.open(file_name, "w") {|file| file.puts new_contents6 }
data/lib/yogi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Yogi
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
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.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Langnickel