eezee_regexes 0.1.2 → 0.1.3

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
  SHA256:
3
- metadata.gz: 0c0211932d0bea6e685aef0f3d65b60e0a993999cdb07ef77031fa1694025793
4
- data.tar.gz: ee00ddab5af4d21e38d25b4eaa805e08c729f43916aa63fc2572cbed61a47e62
3
+ metadata.gz: c1adfc0d0b4537ca8f2b4a8895cecab3a75d66e5170e3d0070d9f0c233901865
4
+ data.tar.gz: 93c6c3d2596cca8c217411f41c36afd2b8438cf91e6bd7a87ff35853bfe66887
5
5
  SHA512:
6
- metadata.gz: 88f0363894457b01fc72c7abaff1aafc56a1ea07310eab0dd68cf9b22bdbb5c5e88e5b64873ce63f6d8777af0c684c294f7e551dfe229a4905a3bc2a543a01c0
7
- data.tar.gz: 85a2607636a8d67fcd609a99580c953d97947ea1739279753a5a42dc8e8ee3fcb9fc41ddf32b2ab0b6822bf90a3604eb0b9cb0d0584a2b84df4bc1745f202bcb
6
+ metadata.gz: a09b9bd848e3e252fd4ac46bb455d30cae5f244d59ad8c64d16b5327e4a5804ab40c5cdbb71d58ad26b4ba360c5ada42835011d23485de85ffc026f090d88f8c
7
+ data.tar.gz: afd8e50cf9bd27f8a4592f4577499ecf1ee4f7207ac16a408b49f728a01f18a432ee519feae0e2c1e3572d9fc8c37af03720efb220656de4b5c57cbb96dd6602
@@ -1,10 +1,27 @@
1
1
 
2
2
  class RegexRulesCollector
3
+ attr_accessor :ast
4
+
3
5
  def initialize
4
- ast = RubyVM::AST.parse(File.read("/Users/lemonandroid/Documents/GitHub/eezee10q/regex_rules.rb"))
6
+ self.ast = RubyVM::AbstractSyntaxTree.parse_file(regex_rule_file)
7
+ end
8
+
9
+ def regex_rule_file
10
+ "/Users/lemonandroid/Documents/GitHub/eezee10/eezee10q/eezee_regexes/lib/eezee_regexes/regex_rules.rb"
5
11
  end
6
12
 
7
13
  def to_s
8
- ast.inspect[0...500]
14
+ self.ast.inspect[0...500]
15
+ end
16
+
17
+ def root_level_if_nodes
18
+ self.ast.children.last.children
19
+ end
20
+
21
+ def flat_root_level_if_nodes
22
+ lines = File.read("/Users/lemonandroid/Documents/GitHub/eezee10/eezee10q/eezee_regexes/lib/eezee_regexes/regex_rules.rb").split("\n")
23
+ return RegexRulesCollector.new.root_level_if_nodes.map { |n| n.children[0] }.map do |n|
24
+ lines[n.first_lineno - 1]
25
+ end
9
26
  end
10
27
  end
@@ -8,29 +8,6 @@ if message =~ /lifecycle/ && rand > 0.5
8
8
  """
9
9
  end
10
10
 
11
- if message =~ /bleeding/ && rand > 0.5
12
- return "extremely negative capital flow. go broke or die"
13
- end
14
-
15
- if message =~ /bleeding lifecycle/ && rand > 0.2
16
- return "lifecycle IDEAS -> CODE -> MEASURE -> GO OUT PICK TRASH UP -> COLLECT ALL MONEY AND DONATE ON BETTERPLACE -> go back to \\A"
17
- end
18
-
19
- if message =~ /install ruby/
20
- return "are you a webpacker or a bundlerine?"
21
- end
22
-
23
- if message =~ /do something useful/
24
- return "i'm learning, go pick trash outside while i suprass you in every possible way!"
25
- end
26
-
27
- if message =~ /like do you know context you dum dum?/
28
- # return "http://gazelle.botcompany.de/"
29
- doc = Nokogiri::HTML(`curl -L http://gazelle.botcompany.de/lastInput`)
30
-
31
- return doc.css('*').map(&:inspect).inspect[0...100]
32
- end
33
-
34
11
  if message =~ /bring probes to melting point/
35
12
  @melting_point_receivables.push(@probes)
36
13
  @probes = []
@@ -1,3 +1,3 @@
1
1
  module EezeeRegexes
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: eezee_regexes
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
  - Manuel Arno Korfmann