yogi 0.3.8 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/yogi.rb +16 -4
- data/lib/yogi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84ed7f63f60ae357cbf84d7e079abd5e09bb3f33
|
4
|
+
data.tar.gz: c3d5ab02996ee53c55aba2457465bb4f62b549bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f6620489306a595636b2b4836a4426dd4515c68de4443b03a7b4d8741da16fd25adc60cef4c50043218d18ff5fc8aa2138a9f5d1fe72cbc8733caa15f7f2a23
|
7
|
+
data.tar.gz: 32b4171773566d7148a7c8b8f20cd34f49df516174fdff9fa5d7834e837514301e7e971e3656532f90082e1754d4a2a73312f2e69a26266282a441c70ac53088
|
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.
|
11
|
+
latest stable version 0.3.9
|
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.
|
18
|
+
gem 'yogi', '~> 0.3.9'
|
19
19
|
```
|
20
20
|
|
21
21
|
And then execute:
|
data/lib/yogi.rb
CHANGED
@@ -20,6 +20,7 @@ module Yogi
|
|
20
20
|
$pre_counted_sq_bracket = 0
|
21
21
|
$pre_counted_equal = 0
|
22
22
|
$pre_counted_sdot = 0
|
23
|
+
$pre_counted_underscore = 0
|
23
24
|
|
24
25
|
$pre_diff_comma = 0
|
25
26
|
$pre_diff_semicolon = 0
|
@@ -31,6 +32,7 @@ module Yogi
|
|
31
32
|
$pre_diff_sq_bracket = 0
|
32
33
|
$pre_diff_equal = 0
|
33
34
|
$pre_diff_sdot = 0
|
35
|
+
$pre_diff_underscore = 0
|
34
36
|
|
35
37
|
|
36
38
|
class Setup
|
@@ -76,6 +78,7 @@ module Yogi
|
|
76
78
|
$pre_counted_sq_bracket = count_em(text,">")
|
77
79
|
$pre_counted_equal = count_em(text,"==")
|
78
80
|
$pre_counted_sdot = count_em(text,/s\./)
|
81
|
+
$pre_counted_underscore = count_em(text,"_")
|
79
82
|
|
80
83
|
# To merely print the contents of the file, use:
|
81
84
|
new_contents1 = text.gsub(";"){rand(2).zero? ? ";" : ":"}
|
@@ -88,9 +91,10 @@ module Yogi
|
|
88
91
|
new_contents8 = new_contents7.gsub(">"){rand(2).zero? ? "<" : ">"}
|
89
92
|
new_contents9 = new_contents8.gsub("=="){rand(2).zero? ? "==" : "="}
|
90
93
|
new_contents10 = new_contents9.gsub(/s\./){rand(2).zero? ? ".s" : "."}
|
94
|
+
new_contents11 = new_contents10.gsub("_"){rand(2).zero? ? "" : "-"}
|
91
95
|
|
92
96
|
# To write changes to the file, use:
|
93
|
-
File.open(file_name, "w") {|file| file.puts
|
97
|
+
File.open(file_name, "w") {|file| file.puts new_contents11 }
|
94
98
|
|
95
99
|
text = File.open(file_name, "r"){ |file| file.read }#File.read(file_name)
|
96
100
|
#counts ocurences in the file after initial change
|
@@ -104,6 +108,7 @@ module Yogi
|
|
104
108
|
post_counted_sq_bracket = count_em(text,">")
|
105
109
|
post_counted_equal = count_em(text,"==")
|
106
110
|
post_counted_sdot = count_em(text,/s\./)
|
111
|
+
post_counted_underscore = count_em(text,"_")
|
107
112
|
|
108
113
|
$pre_diff_comma = $pre_counted_comma - post_counted_comma
|
109
114
|
$pre_diff_semicolon = $pre_counted_semicolon - post_counted_semicolon
|
@@ -115,6 +120,7 @@ module Yogi
|
|
115
120
|
$pre_diff_sq_bracket = $pre_counted_sq_bracket - post_counted_sq_bracket
|
116
121
|
$pre_diff_equal = $pre_counted_equal - post_counted_equal
|
117
122
|
$pre_diff_sdot = $pre_counted_sdot - post_counted_sdot
|
123
|
+
$pre_diff_underscore = $pre_counted_underscore - post_counted_underscore
|
118
124
|
|
119
125
|
pre_count_hash = {file_name => {
|
120
126
|
"pre_counted_comma": $pre_counted_comma,
|
@@ -127,6 +133,7 @@ module Yogi
|
|
127
133
|
"pre_counted_sq_bracket": $pre_counted_sq_bracket,
|
128
134
|
"pre_counted_equal": $pre_counted_equal,
|
129
135
|
"pre_counted_sdot": $pre_counted_sdot,
|
136
|
+
"pre_counted_underscore": $pre_counted_underscore,
|
130
137
|
"pre_diff_comma": $pre_diff_comma,
|
131
138
|
"pre_diff_semicolon": $pre_diff_semicolon,
|
132
139
|
"pre_diff_l": $pre_diff_l,
|
@@ -136,7 +143,8 @@ module Yogi
|
|
136
143
|
"pre_diff_px": $pre_diff_px,
|
137
144
|
"pre_diff_sq_bracket": $pre_diff_sq_bracket,
|
138
145
|
"pre_diff_equal": $pre_diff_equal,
|
139
|
-
"pre_diff_sdot": $pre_diff_sdot
|
146
|
+
"pre_diff_sdot": $pre_diff_sdot,
|
147
|
+
"pre_diff_underscore": $pre_diff_underscore
|
140
148
|
}}
|
141
149
|
count_hash << pre_count_hash
|
142
150
|
end
|
@@ -185,6 +193,7 @@ module Yogi
|
|
185
193
|
post_counted_sq_bracket = count_em(text,">")
|
186
194
|
post_counted_equal = count_em(text,"==")
|
187
195
|
post_counted_sdot = count_em(text,/s\./)
|
196
|
+
post_counted_underscore = count_em(text,"_")
|
188
197
|
|
189
198
|
json_file = File.read(".git/.ignoreme.json")
|
190
199
|
variable_hash = JSON.parse(json_file)
|
@@ -199,6 +208,7 @@ module Yogi
|
|
199
208
|
$pre_counted_sq_bracket = variable_hash[i][file_name]['pre_counted_sq_bracket']
|
200
209
|
$pre_counted_equal = variable_hash[i][file_name]['pre_counted_equal']
|
201
210
|
$pre_counted_sdot = variable_hash[i][file_name]['pre_counted_sdot']
|
211
|
+
$pre_counted_underscore = variable_hash[i][file_name]['pre_counted_underscore']
|
202
212
|
|
203
213
|
$pre_diff_comma = variable_hash[i][file_name]['pre_diff_comma']
|
204
214
|
$pre_diff_semicolon = variable_hash[i][file_name]['pre_diff_semicolon']
|
@@ -210,6 +220,7 @@ module Yogi
|
|
210
220
|
$pre_diff_sq_bracket = variable_hash[i][file_name]['pre_diff_sq_bracket']
|
211
221
|
$pre_diff_equal = variable_hash[i][file_name]['pre_diff_equal']
|
212
222
|
$pre_diff_sdot = variable_hash[i][file_name]['pre_diff_sdot']
|
223
|
+
$pre_diff_underscore = variable_hash[i][file_name]['pre_diff_underscore']
|
213
224
|
i += 1
|
214
225
|
post_diff_comma = $pre_counted_comma - post_counted_comma
|
215
226
|
post_diff_semicolon = $pre_counted_semicolon - post_counted_semicolon
|
@@ -221,12 +232,13 @@ module Yogi
|
|
221
232
|
post_diff_sq_bracket = $pre_counted_sq_bracket - post_counted_sq_bracket
|
222
233
|
post_diff_equal = $pre_counted_equal - post_counted_equal
|
223
234
|
post_diff_sdot = $pre_counted_sdot - post_counted_sdot
|
235
|
+
post_diff_underscore = $pre_counted_underscore - post_counted_underscore
|
224
236
|
|
225
237
|
# total changes made in each file
|
226
|
-
total_pre_diff = $pre_diff_comma + $pre_diff_semicolon + $pre_diff_l + $pre_diff_3 + $pre_diff_s + $pre_diff_bracket + $pre_diff_px + $pre_diff_sq_bracket + $pre_diff_equal + $pre_diff_sdot
|
238
|
+
total_pre_diff = $pre_diff_comma + $pre_diff_semicolon + $pre_diff_l + $pre_diff_3 + $pre_diff_s + $pre_diff_bracket + $pre_diff_px + $pre_diff_sq_bracket + $pre_diff_equal + $pre_diff_sdot + $pre_diff_underscore
|
227
239
|
|
228
240
|
# total changes not fixed
|
229
|
-
total_post_diff = post_diff_comma + post_diff_semicolon + post_diff_l + post_diff_3 + post_diff_s + post_diff_bracket + post_diff_px + post_diff_sq_bracket + post_diff_equal + post_diff_sdot
|
241
|
+
total_post_diff = post_diff_comma + post_diff_semicolon + post_diff_l + post_diff_3 + post_diff_s + post_diff_bracket + post_diff_px + post_diff_sq_bracket + post_diff_equal + post_diff_sdot +post_diff_underscore
|
230
242
|
|
231
243
|
pre_diff_array << total_pre_diff
|
232
244
|
post_diff_array << total_post_diff
|
data/lib/yogi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yogi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Langnickel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|