pastrychef 0.0.3 → 0.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 72b9c8a1952b073728234b600a2938338fbe14a0
4
- data.tar.gz: 5b9e45f58273329f4c3b7c0fa419995e78731104
3
+ metadata.gz: ef1fbe5d13d67d9c61def05bc74b46dedb939a83
4
+ data.tar.gz: fa589ee578695db0d0606ae6988f32410927e219
5
5
  SHA512:
6
- metadata.gz: 86bc7b6467314ebb37421252f22416a845b3c0828fa0f24e7311496efeb2d842e89979d449b4613af9f1f09f07c2349c057a0296188fd2783ac84b2b7ebee5d2
7
- data.tar.gz: 73cd02d9ba530956ef62eb008a480e28ba3da39f708fd773f5e54b97cc20cc6fcdd43dad3c62028804586d95454385adf2d67092159df2a63d4d87acd1d67bde
6
+ metadata.gz: a527de48e0ddae1b802d3935b98d821be04aecb7b1639bae7892cf62e3f34c7a9fad75809b2a9f9d4f0d343e83d8a29eee8e9f01f8f738f2ae3e17bfa6e1b48c
7
+ data.tar.gz: 1652b091b09f743d083bc197afb35bb228bce78f558fe4ee8520b5cfc57dcce2544d6d5c3e5b78de8a586d156ef4c8aed257d5a79f633daca7d5c8aaa8f8ce54
data/lib/pastrychef.rb CHANGED
@@ -5,4 +5,51 @@ class Pastrychef
5
5
  end
6
6
  end
7
7
 
8
+ module Commonwords
9
+
10
+ COMMON_WORDS = [
11
+ 'a','cannot','into','our','thus','about','co','is','ours','to','above',
12
+ 'could','it','ourselves','together','across','down','its','out','too',
13
+ 'after','during','itself','over','toward','afterwards','each','last','own',
14
+ 'towards','again','eg','latter','per','under','against','either','latterly',
15
+ 'perhaps','until','all','else','least','rather','up','almost','elsewhere',
16
+ 'less','same','upon','alone','enough','ltd','seem','us','along','etc',
17
+ 'many','seemed','very','already','even','may','seeming','via','also','ever',
18
+ 'me','seems','was','although','every','meanwhile','several','we','always',
19
+ 'everyone','might','she','well','among','everything','more','should','were',
20
+ 'amongst','everywhere','moreover','since','what','an','except','most','so',
21
+ 'whatever','and','few','mostly','some','when','another','first','much',
22
+ 'somehow','whence','any','for','must','someone','whenever','anyhow',
23
+ 'former','my','something','where','anyone','formerly','myself','sometime',
24
+ 'whereafter','anything','from','namely','sometimes','whereas','anywhere',
25
+ 'further','neither','somewhere','whereby','are','had','never','still',
26
+ 'wherein','around','has','nevertheless','such','whereupon','as','have',
27
+ 'next','than','wherever','at','he','no','that','whether','be','hence',
28
+ 'nobody','the','whither','became','her','none','their','which','because',
29
+ 'here','noone','them','while','become','hereafter','nor','themselves','who',
30
+ 'becomes','hereby','not','then','whoever','becoming','herein','nothing',
31
+ 'thence','whole','been','hereupon','now','there','whom','before','hers',
32
+ 'nowhere','thereafter','whose','beforehand','herself','of','thereby','why',
33
+ 'behind','him','off','therefore','will','being','himself','often','therein',
34
+ 'with','below','his','on','thereupon','within','beside','how','once',
35
+ 'these','without','besides','however','one','they','would','between','i',
36
+ 'only','this','yet','beyond','ie','onto','those','you','both','if','or',
37
+ 'though','your','but','in','other','through','yours','by','inc','others',
38
+ 'throughout','yourself','can','indeed','otherwise','thru','yourselves'
39
+ ]
40
+
41
+ TOKEN_REGEXP = /^[a-z]+$|^\w+\-\w+|^[a-z]+[0-9]+[a-z]+$|^[0-9]+[a-z]+|^[a-z]+[0-9]+$/
42
+
43
+ #Checks if word is member of common word list
44
+ def self.is?(token)
45
+ COMMON_WORDS.member?(token)
46
+ end
47
+
48
+ def self.valid?(token)
49
+ (((token =~ TOKEN_REGEXP) == 0)) and !(COMMON_WORDS.member?(token))
50
+ end
51
+
52
+ end
53
+
54
+
8
55
  require 'pastrychef/oven'
@@ -7,8 +7,6 @@ class Pastrychef::Oven
7
7
  case @language
8
8
  when "spanish"
9
9
  "hola mundo"
10
- when "korean"
11
- "anyoung ha se yo"
12
10
  else
13
11
  "hello world"
14
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pastrychef
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Murtza Manzur
@@ -38,7 +38,7 @@ dependencies:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
40
  version: 3.4.4
41
- description: Data scraping and visualization gem
41
+ description: Data scraping, cleansing, and visualization gem
42
42
  email: hi@murtza.org
43
43
  executables: []
44
44
  extensions: []
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
68
  version: '0'
69
69
  requirements: []
70
70
  rubyforge_project:
71
- rubygems_version: 2.0.3
71
+ rubygems_version: 2.0.14
72
72
  signing_key:
73
73
  specification_version: 3
74
74
  summary: Data scraping and visulization gem