swearjar 1.3.1 → 1.4.0

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: 29d6f7685a649ed866f79867952d152b11b218eb902f236db377a169f62b68a2
4
- data.tar.gz: 6445877cb2a9e3c8a81ea5a8624cab834c94663b09f3d2d091d701a5727bc1d1
3
+ metadata.gz: 18d921917d602822f0c0de1ecd5332afa77cc3dc5e86c07b4673b21783c4fe86
4
+ data.tar.gz: 3c10af4327d46ea14d863d21c58bbda39f18c3b97d3fa9ebea15d615c8c4e72f
5
5
  SHA512:
6
- metadata.gz: 96481486ef7b2152f3b7f2b60d0985d58a5f8ddf203c9713b1df2393a9abed6724affba3f0a1105580c4277b2b9b079e632b5a868c990a7797b1a6dc2cd90a9a
7
- data.tar.gz: c591007e52d20553e8fe261c026a98ee5456b32b9f726c5b9373668ecb298426c8088641a282607a2a0e1fc4274d818fe9f9b331609e146f8647d2766bbe4df7
6
+ metadata.gz: 9f04e62b6ab8c2a8167f6a1f5ef5b250be185bc840a5d135e196c2ecd8dce9e97028620f69248afbafae1690cb974a20c1fe380002868482c333510bd302f2a9
7
+ data.tar.gz: dbe1bd66862afaa8b5dae7238f589b7878dc3fde6323afa85494c78b83b8c7561c04bcf78134a290a46837aae9ac275f8fd2bae996ca346ed692efbc3ec20e37
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ### v1.4.0 (2020-06-01)
4
+ - Allow override of censor character
5
+
3
6
  ### v1.1.0 (2016-02-13)
4
7
  - Add emoji support
5
8
  - Censor middle finger emoji by default
data/README.md CHANGED
@@ -23,6 +23,13 @@ sj.censor("jim henson has a massive hard on he is gonna use to fuck everybody")
23
23
  # => "jim henson has a massive **** ** he is gonna use to **** everybody"
24
24
  ```
25
25
 
26
+ The censor mask `*` can be overridden:
27
+
28
+ ```ruby
29
+ sj.censor("damn", "X")
30
+ # => "XXXX"
31
+ ```
32
+
26
33
  To load from a custom config file, you can do the following:
27
34
 
28
35
  ```ruby
@@ -1,8 +1,15 @@
1
1
  ---
2
2
  regex:
3
3
  'hard ons?\b': ["sexual"]
4
- 'jerk off\b': ["sexual"]
5
- 'pissed off\b': ["inappropriate"]
4
+ 'nut\s*sack?\w*': ["sexual"]
5
+ 'blow\s*job\w*': ["sexual"]
6
+ 'butt\s*plug\w*': ["sexual"]
7
+ 'camel\s*toe\w*': ["sexual"]
8
+ 'dumb?\s*ass\w*': ["sexual"]
9
+ 'jungle\s*bunn(?:y|ie)\w*': ["sexual"]
10
+ 'porch\s*monk(?:ey|ie)\w*': ["sexual"]
11
+ 'jerks*\soff\b': ["sexual"]
12
+ 'pissed\soff\b': ["inappropriate"]
6
13
  '\w*n[i1]gg[e3]r\w*': ["discriminatory"]
7
14
  '\w*fuck\w*': ["sexual"]
8
15
  '\w*b[i1]tch\w*': ["insult"]
@@ -48,17 +55,13 @@ simple:
48
55
  "beastiality": ["sexual"]
49
56
  "beastility": ["sexual"]
50
57
  "bestiality": ["sexual"]
51
- "blow job": ["sexual"]
52
- "blowjob": ["sexual"]
53
58
  "bollocks": ["sexual"]
54
59
  "bollox": ["sexual"]
55
60
  "boner": ["sexual"]
56
61
  "boob": ["sexual"]
57
62
  "boobie": ["sexual"]
58
63
  "bullshit": ["inappropriate"]
59
- "butt plug": ["sexual"]
60
64
  "butt-pirate": ["discriminatory"]
61
- "camel toe": ["sexual"]
62
65
  "carpetmuncher": ["discriminatory"]
63
66
  "chinc": ["discriminatory"]
64
67
  "chink": ["discriminatory"]
@@ -135,9 +138,6 @@ simple:
135
138
  "dookie": ["inappropriate"]
136
139
  "douche": ["insult"]
137
140
  "douchebag": ["insult"]
138
- "dumass": ["insult"]
139
- "dumb ass": ["insult"]
140
- "dumbass": ["insult"]
141
141
  "dumbshit": ["insult"]
142
142
  "dumshit": ["insult"]
143
143
  "dyke": ["discriminatory"]
@@ -190,8 +190,6 @@ simple:
190
190
  "jiz": ["sexual"]
191
191
  "jizm": ["sexual"]
192
192
  "jizz": ["sexual"]
193
- "jungle bunny": ["discriminatory"]
194
- "junglebunny": ["discriminatory"]
195
193
  "kike": ["discriminatory"]
196
194
  "kock": ["sexual"]
197
195
  "kooch": ["sexual"]
@@ -213,8 +211,6 @@ simple:
213
211
  "negro": ["discriminatory"]
214
212
  "nigga": ["discriminatory"]
215
213
  "niglet": ["discriminatory"]
216
- "nut sack": ["sexual"]
217
- "nutsack": ["sexual"]
218
214
  "orgasim": ["sexual"]
219
215
  "orgasm": ["sexual"]
220
216
  "paki": ["discriminatory"]
@@ -248,8 +244,6 @@ simple:
248
244
  "poonany": ["sexual"]
249
245
  "poontang": ["sexual"]
250
246
  "poop": ["inappropriate"]
251
- "porch monkey": ["discriminatory"]
252
- "porchmonkey": ["discriminatory"]
253
247
  "porn": ["sexual"]
254
248
  "porno": ["sexual"]
255
249
  "pornography": ["sexual"]
@@ -1,6 +1,14 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'yaml'
2
4
 
3
5
  class Swearjar
6
+ DEFAULT_SENSOR_MASK = '*'
7
+ WORD_REGEX = /\b[a-zA-Z-]+\b/
8
+
9
+ # https://github.com/franklsf95/ruby-emoji-regex
10
+ EMOJI_REGEX = /[\u{00A9}\u{00AE}\u{203C}\u{2049}\u{2122}\u{2139}\u{2194}-\u{2199}\u{21A9}-\u{21AA}\u{231A}-\u{231B}\u{2328}\u{23CF}\u{23E9}-\u{23F3}\u{23F8}-\u{23FA}\u{24C2}\u{25AA}-\u{25AB}\u{25B6}\u{25C0}\u{25FB}-\u{25FE}\u{2600}-\u{2604}\u{260E}\u{2611}\u{2614}-\u{2615}\u{2618}\u{261D}\u{2620}\u{2622}-\u{2623}\u{2626}\u{262A}\u{262E}-\u{262F}\u{2638}-\u{263A}\u{2648}-\u{2653}\u{2660}\u{2663}\u{2665}-\u{2666}\u{2668}\u{267B}\u{267F}\u{2692}-\u{2694}\u{2696}-\u{2697}\u{2699}\u{269B}-\u{269C}\u{26A0}-\u{26A1}\u{26AA}-\u{26AB}\u{26B0}-\u{26B1}\u{26BD}-\u{26BE}\u{26C4}-\u{26C5}\u{26C8}\u{26CE}-\u{26CF}\u{26D1}\u{26D3}-\u{26D4}\u{26E9}-\u{26EA}\u{26F0}-\u{26F5}\u{26F7}-\u{26FA}\u{26FD}\u{2702}\u{2705}\u{2708}-\u{270D}\u{270F}\u{2712}\u{2714}\u{2716}\u{271D}\u{2721}\u{2728}\u{2733}-\u{2734}\u{2744}\u{2747}\u{274C}\u{274E}\u{2753}-\u{2755}\u{2757}\u{2763}-\u{2764}\u{2795}-\u{2797}\u{27A1}\u{27B0}\u{27BF}\u{2934}-\u{2935}\u{2B05}-\u{2B07}\u{2B1B}-\u{2B1C}\u{2B50}\u{2B55}\u{3030}\u{303D}\u{3297}\u{3299}\u{1F004}\u{1F0CF}\u{1F170}-\u{1F171}\u{1F17E}-\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F201}-\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}-\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}-\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}-\u{1F570}\u{1F573}-\u{1F579}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}-\u{1F596}\u{1F5A5}\u{1F5A8}\u{1F5B1}-\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D0}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}-\u{1F6EC}\u{1F6F0}\u{1F6F3}\u{1F910}-\u{1F918}\u{1F980}-\u{1F984}\u{1F9C0}]/
11
+
4
12
  def self.default
5
13
  from_language('en')
6
14
  end
@@ -34,11 +42,11 @@ class Swearjar
34
42
  scorecard
35
43
  end
36
44
 
37
- def censor(string)
45
+ def censor(string, censor_mask = DEFAULT_SENSOR_MASK)
38
46
  censored_string = string.to_s.dup
39
47
  scan(string) do |test, word, position|
40
48
  next unless test
41
- replacement = block_given? ? yield(word) : word.gsub(/\S/, '*')
49
+ replacement = block_given? ? yield(word) : word.gsub(/\S/, censor_mask)
42
50
  censored_string[position, word.size] = replacement
43
51
  end
44
52
  censored_string
@@ -63,11 +71,6 @@ class Swearjar
63
71
  end if data['emoji']
64
72
  end
65
73
 
66
- WORD_REGEX = /\b[a-zA-Z-]+\b/
67
-
68
- # https://github.com/franklsf95/ruby-emoji-regex
69
- EMOJI_REGEX = /[\u{00A9}\u{00AE}\u{203C}\u{2049}\u{2122}\u{2139}\u{2194}-\u{2199}\u{21A9}-\u{21AA}\u{231A}-\u{231B}\u{2328}\u{23CF}\u{23E9}-\u{23F3}\u{23F8}-\u{23FA}\u{24C2}\u{25AA}-\u{25AB}\u{25B6}\u{25C0}\u{25FB}-\u{25FE}\u{2600}-\u{2604}\u{260E}\u{2611}\u{2614}-\u{2615}\u{2618}\u{261D}\u{2620}\u{2622}-\u{2623}\u{2626}\u{262A}\u{262E}-\u{262F}\u{2638}-\u{263A}\u{2648}-\u{2653}\u{2660}\u{2663}\u{2665}-\u{2666}\u{2668}\u{267B}\u{267F}\u{2692}-\u{2694}\u{2696}-\u{2697}\u{2699}\u{269B}-\u{269C}\u{26A0}-\u{26A1}\u{26AA}-\u{26AB}\u{26B0}-\u{26B1}\u{26BD}-\u{26BE}\u{26C4}-\u{26C5}\u{26C8}\u{26CE}-\u{26CF}\u{26D1}\u{26D3}-\u{26D4}\u{26E9}-\u{26EA}\u{26F0}-\u{26F5}\u{26F7}-\u{26FA}\u{26FD}\u{2702}\u{2705}\u{2708}-\u{270D}\u{270F}\u{2712}\u{2714}\u{2716}\u{271D}\u{2721}\u{2728}\u{2733}-\u{2734}\u{2744}\u{2747}\u{274C}\u{274E}\u{2753}-\u{2755}\u{2757}\u{2763}-\u{2764}\u{2795}-\u{2797}\u{27A1}\u{27B0}\u{27BF}\u{2934}-\u{2935}\u{2B05}-\u{2B07}\u{2B1B}-\u{2B1C}\u{2B50}\u{2B55}\u{3030}\u{303D}\u{3297}\u{3299}\u{1F004}\u{1F0CF}\u{1F170}-\u{1F171}\u{1F17E}-\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F201}-\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}-\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}-\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}-\u{1F570}\u{1F573}-\u{1F579}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}-\u{1F596}\u{1F5A5}\u{1F5A8}\u{1F5B1}-\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D0}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}-\u{1F6EC}\u{1F6F0}\u{1F6F3}\u{1F910}-\u{1F918}\u{1F980}-\u{1F984}\u{1F9C0}]/
70
-
71
74
  def scan(string, &block)
72
75
  string.scan(WORD_REGEX) do |word|
73
76
  position = Regexp.last_match.offset(0)[0]
@@ -1,3 +1,3 @@
1
1
  class Swearjar
2
- VERSION = '1.3.1'
2
+ VERSION = '1.4.0'
3
3
  end
@@ -1,16 +1,18 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Swearjar do
4
- def original_text
5
- File.open(File.expand_path("../data/carlin_dirty_words.txt", __FILE__)).read
6
- end
4
+ it "censors George Carlin's Seven Dirty Words routine" do
5
+ original_text = File.open(File.expand_path("../data/carlin_dirty_words.txt", __FILE__)).read
6
+ expected_censored_text = File.open(File.expand_path("../data/carlin_dirty_words_censored.txt", __FILE__)).read
7
+ censored_text = Swearjar.default.censor(original_text)
7
8
 
8
- def expected_censored_text
9
- File.open(File.expand_path("../data/carlin_dirty_words_censored.txt", __FILE__)).read
9
+ expect(censored_text).to eq(expected_censored_text)
10
10
  end
11
11
 
12
- it "censors George Carlin's Seven Dirty Words routine" do
12
+ it "does not censor Epictetus' Enchiridion" do
13
+ original_text = File.open(File.expand_path("../data/epictetus_enchiridion.txt", __FILE__)).read
13
14
  censored_text = Swearjar.default.censor(original_text)
14
- expect(censored_text).to eq(expected_censored_text)
15
+
16
+ expect(censored_text).to eq(original_text)
15
17
  end
16
18
  end
@@ -0,0 +1,151 @@
1
+ Some things are in our control and others not. Things in our control are opinion, pursuit, desire, aversion, and, in a word, whatever are our own actions. Things not in our control are body, property, reputation, command, and, in one word, whatever are not our own actions.
2
+
3
+ The things in our control are by nature free, unrestrained, unhindered; but those not in our control are weak, slavish, restrained, belonging to others. Remember, then, that if you suppose that things which are slavish by nature are also free, and that what belongs to others is your own, then you will be hindered. You will lament, you will be disturbed, and you will find fault both with gods and men. But if you suppose that only to be your own which is your own, and what belongs to others such as it really is, then no one will ever compel you or restrain you. Further, you will find fault with no one or accuse no one. You will do nothing against your will. No one will hurt you, you will have no enemies, and you not be harmed.
4
+
5
+ Aiming therefore at such great things, remember that you must not allow yourself to be carried, even with a slight tendency, towards the attainment of lesser things. Instead, you must entirely quit some things and for the present postpone the rest. But if you would both have these great things, along with power and riches, then you will not gain even the latter, because you aim at the former too: but you will absolutely fail of the former, by which alone happiness and freedom are achieved.
6
+
7
+ Work, therefore to be able to say to every harsh appearance, "You are but an appearance, and not absolutely the thing you appear to be." And then examine it by those rules which you have, and first, and chiefly, by this: whether it concerns the things which are in our own control, or those which are not; and, if it concerns anything not in our control, be prepared to say that it is nothing to you.
8
+
9
+ Remember that following desire promises the attainment of that of which you are desirous; and aversion promises the avoiding that to which you are averse. However, he who fails to obtain the object of his desire is disappointed, and he who incurs the object of his aversion wretched. If, then, you confine your aversion to those objects only which are contrary to the natural use of your faculties, which you have in your own control, you will never incur anything to which you are averse. But if you are averse to sickness, or death, or poverty, you will be wretched. Remove aversion, then, from all things that are not in our control, and transfer it to things contrary to the nature of what is in our control. But, for the present, totally suppress desire: for, if you desire any of the things which are not in your own control, you must necessarily be disappointed; and of those which are, and which it would be laudable to desire, nothing is yet in your possession. Use only the appropriate actions of pursuit and avoidance; and even these lightly, and with gentleness and reservation.
10
+
11
+ With regard to whatever objects give you delight, are useful, or are deeply loved, remember to tell yourself of what general nature they are, beginning from the most insignificant things. If, for example, you are fond of a specific ceramic cup, remind yourself that it is only ceramic cups in general of which you are fond. Then, if it breaks, you will not be disturbed. If you kiss your child, or your wife, say that you only kiss things which are human, and thus you will not be disturbed if either of them dies.
12
+
13
+ When you are going about any action, remind yourself what nature the action is. If you are going to bathe, picture to yourself the things which usually happen in the bath: some people splash the water, some push, some use abusive language, and others steal. Thus you will more safely go about this action if you say to yourself, "I will now go bathe, and keep my own mind in a state conformable to nature." And in the same manner with regard to every other action. For thus, if any hindrance arises in bathing, you will have it ready to say, "It was not only to bathe that I desired, but to keep my mind in a state conformable to nature; and I will not keep it if I am bothered at things that happen.
14
+
15
+ Men are disturbed, not by things, but by the principles and notions which they form concerning things. Death, for instance, is not terrible, else it would have appeared so to Socrates. But the terror consists in our notion of death that it is terrible. When therefore we are hindered, or disturbed, or grieved, let us never attribute it to others, but to ourselves; that is, to our own principles. An uninstructed person will lay the fault of his own bad condition upon others. Someone just starting instruction will lay the fault on himself. Some who is perfectly instructed will place blame neither on others nor on himself.
16
+
17
+ Don't be prideful with any excellence that is not your own. If a horse should be prideful and say, " I am handsome," it would be supportable. But when you are prideful, and say, " I have a handsome horse," know that you are proud of what is, in fact, only the good of the horse. What, then, is your own? Only your reaction to the appearances of things. Thus, when you behave conformably to nature in reaction to how things appear, you will be proud with reason; for you will take pride in some good of your own.
18
+
19
+ Consider when, on a voyage, your ship is anchored; if you go on shore to get water you may along the way amuse yourself with picking up a shellfish, or an onion. However, your thoughts and continual attention ought to be bent towards the ship, waiting for the captain to call on board; you must then immediately leave all these things, otherwise you will be thrown into the ship, bound neck and feet like a sheep. So it is with life. If, instead of an onion or a shellfish, you are given a wife or child, that is fine. But if the captain calls, you must run to the ship, leaving them, and regarding none of them. But if you are old, never go far from the ship: lest, when you are called, you should be unable to come in time.
20
+
21
+ Don't demand that things happen as you wish, but wish that they happen as they do happen, and you will go on well.
22
+
23
+ Sickness is a hindrance to the body, but not to your ability to choose, unless that is your choice. Lameness is a hindrance to the leg, but not to your ability to choose. Say this to yourself with regard to everything that happens, then you will see such obstacles as hindrances to something else, but not to yourself.
24
+
25
+ With every accident, ask yourself what abilities you have for making a proper use of it. If you see an attractive person, you will find that self-restraint is the ability you have against your desire. If you are in pain, you will find fortitude. If you hear unpleasant language, you will find patience. And thus habituated, the appearances of things will not hurry you away along with them.
26
+
27
+ Never say of anything, "I have lost it"; but, "I have returned it." Is your child dead? It is returned. Is your wife dead? She is returned. Is your estate taken away? Well, and is not that likewise returned? "But he who took it away is a bad man." What difference is it to you who the giver assigns to take it back? While he gives it to you to possess, take care of it; but don't view it as your own, just as travelers view a hotel.
28
+
29
+ If you want to improve, reject such reasonings as these: "If I neglect my affairs, I'll have no income; if I don't correct my servant, he will be bad." For it is better to die with hunger, exempt from grief and fear, than to live in affluence with perturbation; and it is better your servant should be bad, than you unhappy.
30
+
31
+ Begin therefore from little things. Is a little oil spilt? A little wine stolen? Say to yourself, "This is the price paid for equanimity, for tranquillity, and nothing is to be had for nothing." When you call your servant, it is possible that he may not come; or, if he does, he may not do what you want. But he is by no means of such importance that it should be in his power to give you any disturbance.
32
+
33
+ If you want to improve, be content to be thought foolish and stupid with regard to external things. Don't wish to be thought to know anything; and even if you appear to be somebody important to others, distrust yourself. For, it is difficult to both keep your faculty of choice in a state conformable to nature, and at the same time acquire external things. But while you are careful about the one, you must of necessity neglect the other.
34
+
35
+ If you wish your children, and your wife, and your friends to live for ever, you are stupid; for you wish to be in control of things which you cannot, you wish for things that belong to others to be your own. So likewise, if you wish your servant to be without fault, you are a fool; for you wish vice not to be vice," but something else. But, if you wish to have your desires undisappointed, this is in your own control. Exercise, therefore, what is in your control. He is the master of every other person who is able to confer or remove whatever that person wishes either to have or to avoid. Whoever, then, would be free, let him wish nothing, let him decline nothing, which depends on others else he must necessarily be a slave.
36
+
37
+ Remember that you must behave in life as at a dinner party. Is anything brought around to you? Put out your hand and take your share with moderation. Does it pass by you? Don't stop it. Is it not yet come? Don't stretch your desire towards it, but wait till it reaches you. Do this with regard to children, to a wife, to public posts, to riches, and you will eventually be a worthy partner of the feasts of the gods. And if you don't even take the things which are set before you, but are able even to reject them, then you will not only be a partner at the feasts of the gods, but also of their empire. For, by doing this, Diogenes, Heraclitus and others like them, deservedly became, and were called, divine.
38
+
39
+ When you see anyone weeping in grief because his son has gone abroad, or is dead, or because he has suffered in his affairs, be careful that the appearance may not misdirect you. Instead, distinguish within your own mind, and be prepared to say, "It's not the accident that distresses this person., because it doesn't distress another person; it is the judgment which he makes about it." As far as words go, however, don't reduce yourself to his level, and certainly do not moan with him. Do not moan inwardly either.
40
+
41
+ Remember that you are an actor in a drama, of such a kind as the author pleases to make it. If short, of a short one; if long, of a long one. If it is his pleasure you should act a poor man, a cripple, a governor, or a private person, see that you act it naturally. For this is your business, to act well the character assigned you; to choose it is another's.
42
+
43
+ When a raven happens to croak unluckily, don't allow the appearance hurry you away with it, but immediately make the distinction to yourself, and say, "None of these things are foretold to me; but either to my paltry body, or property, or reputation, or children, or wife. But to me all omens are lucky, if I will. For whichever of these things happens, it is in my control to derive advantage from it."
44
+
45
+ You may be unconquerable, if you enter into no combat in which it is not in your own control to conquer. When, therefore, you see anyone eminent in honors, or power, or in high esteem on any other account, take heed not to be hurried away with the appearance, and to pronounce him happy; for, if the essence of good consists in things in our own control, there will be no room for envy or emulation. But, for your part, don't wish to be a general, or a senator, or a consul, but to be free; and the only way to this is a contempt of things not in our own control.
46
+
47
+ Remember, that not he who gives ill language or a blow insults, but the principle which represents these things as insulting. When, therefore, anyone provokes you, be assured that it is your own opinion which provokes you. Try, therefore, in the first place, not to be hurried away with the appearance. For if you once gain time and respite, you will more easily command yourself.
48
+
49
+ Let death and exile, and all other things which appear terrible be daily before your eyes, but chiefly death, and you win never entertain any abject thought, nor too eagerly covet anything.
50
+
51
+ If you have an earnest desire of attaining to philosophy, prepare yourself from the very first to be laughed at, to be sneered by the multitude, to hear them say,." He is returned to us a philosopher all at once," and " Whence this supercilious look?" Now, for your part, don't have a supercilious look indeed; but keep steadily to those things which appear best to you as one appointed by God to this station. For remember that, if you adhere to the same point, those very persons who at first ridiculed will afterwards admire you. But if you are conquered by them, you will incur a double ridicule.
52
+
53
+ If you ever happen to turn your attention to externals, so as to wish to please anyone, be assured that you have ruined your scheme of life. Be contented, then, in everything with being a philosopher; and, if you wish to be thought so likewise by anyone, appear so to yourself, and it will suffice you.
54
+
55
+ Don't allow such considerations as these distress you. "I will live in dishonor, and be nobody anywhere." For, if dishonor is an evil, you can no more be involved in any evil by the means of another, than be engaged in anything base. Is it any business of yours, then, to get power, or to be admitted to an entertainment? By no means. How, then, after all, is this a dishonor? And how is it true that you will be nobody anywhere, when you ought to be somebody in those things only which are in your own control, in which you may be of the greatest consequence? "But my friends will be unassisted." -- What do you mean by unassisted? They will not have money from you, nor will you make them Roman citizens. Who told you, then, that these are among the things in our own control, and not the affair of others? And who can give to another the things which he has not himself? "Well, but get them, then, that we too may have a share." If I can get them with the preservation of my own honor and fidelity and greatness of mind, show me the way and I will get them; but if you require me to lose my own proper good that you may gain what is not good, consider how inequitable and foolish you are. Besides, which would you rather have, a sum of money, or a friend of fidelity and honor? Rather assist me, then, to gain this character than require me to do those things by which I may lose it. Well, but my country, say you, as far as depends on me, will be unassisted. Here again, what assistance is this you mean? "It will not have porticoes nor baths of your providing." And what signifies that? Why, neither does a smith provide it with shoes, or a shoemaker with arms. It is enough if everyone fully performs his own proper business. And were you to supply it with another citizen of honor and fidelity, would not he be of use to it? Yes. Therefore neither are you yourself useless to it. "What place, then, say you, will I hold in the state?" Whatever you can hold with the preservation of your fidelity and honor. But if, by desiring to be useful to that, you lose these, of what use can you be to your country when you are become faithless and void of shame.
56
+
57
+ Is anyone preferred before you at an entertainment, or in a compliment, or in being admitted to a consultation? If these things are good, you ought to be glad that he has gotten them; and if they are evil, don't be grieved that you have not gotten them. And remember that you cannot, without using the same means [which others do] to acquire things not in our own control, expect to be thought worthy of an equal share of them. For how can he who does not frequent the door of any [great] man, does not attend him, does not praise him, have an equal share with him who does? You are unjust, then, and insatiable, if you are unwilling to pay the price for which these things are sold, and would have them for nothing. For how much is lettuce sold? Fifty cents, for instance. If another, then, paying fifty cents, takes the lettuce, and you, not paying it, go without them, don't imagine that he has gained any advantage over you. For as he has the lettuce, so you have the fifty cents which you did not give. So, in the present case, you have not been invited to such a person's entertainment, because you have not paid him the price for which a supper is sold. It is sold for praise; it is sold for attendance. Give him then the value, if it is for your advantage. But if you would, at the same time, not pay the one and yet receive the other, you are insatiable, and a blockhead. Have you nothing, then, instead of the supper? Yes, indeed, you have: the not praising him, whom you don't like to praise; the not bearing with his behavior at coming in.
58
+
59
+ The will of nature may be learned from those things in which we don't distinguish from each other. For example, when our neighbor's boy breaks a cup, or the like, we are presently ready to say, "These things will happen." Be assured, then, that when your own cup likewise is broken, you ought to be affected just as when another's cup was broken. Apply this in like manner to greater things. Is the child or wife of another dead? There is no one who would not say, "This is a human accident." but if anyone's own child happens to die, it is presently, "Alas I how wretched am I!" But it should be remembered how we are affected in hearing the same thing concerning others.
60
+
61
+ As a mark is not set up for the sake of missing the aim, so neither does the nature of evil exist in the world.
62
+
63
+ If a person gave your body to any stranger he met on his way, you would certainly be angry. And do you feel no shame in handing over your own mind to be confused and mystified by anyone who happens to verbally attack you?
64
+
65
+ In every affair consider what precedes and follows, and then undertake it. Otherwise you will begin with spirit; but not having thought of the consequences, when some of them appear you will shamefully desist. "I would conquer at the Olympic games." But consider what precedes and follows, and then, if it is for your advantage, engage in the affair. You must conform to rules, submit to a diet, refrain from dainties; exercise your body, whether you choose it or not, at a stated hour, in heat and cold; you must drink no cold water, nor sometimes even wine. In a word, you must give yourself up to your master, as to a physician. Then, in the combat, you may be thrown into a ditch, dislocate your arm, turn your ankle, swallow dust, be whipped, and, after all, lose the victory. When you have evaluated all this, if your inclination still holds, then go to war. Otherwise, take notice, you will behave like children who sometimes play like wrestlers, sometimes gladiators, sometimes blow a trumpet, and sometimes act a tragedy when they have seen and admired these shows. Thus you too will be at one time a wrestler, at another a gladiator, now a philosopher, then an orator; but with your whole soul, nothing at all. Like an ape, you mimic all you see, and one thing after another is sure to please you, but is out of favor as soon as it becomes familiar. For you have never entered upon anything considerately, nor after having viewed the whole matter on all sides, or made any scrutiny into it, but rashly, and with a cold inclination. Thus some, when they have seen a philosopher and heard a man speaking like Euphrates (though, indeed, who can speak like him?), have a mind to be philosophers too. Consider first, man, what the matter is, and what your own nature is able to bear. If you would be a wrestler, consider your shoulders, your back, your thighs; for different persons are made for different things. Do you think that you can act as you do, and be a philosopher? That you can eat and drink, and be angry and discontented as you are now? You must watch, you must labor, you must get the better of certain appetites, must quit your acquaintance, be despised by your servant, be laughed at by those you meet; come off worse than others in everything, in magistracies, in honors, in courts of judicature. When you have considered all these things round, approach, if you please; if, by parting with them, you have a mind to purchase equanimity, freedom, and tranquillity. If not, don't come here; don't, like children, be one while a philosopher, then a publican, then an orator, and then one of Caesar's officers. These things are not consistent. You must be one man, either good or bad. You must cultivate either your own ruling faculty or externals, and apply yourself either to things within or without you; that is, be either a philosopher, or one of the vulgar.
66
+
67
+ Duties are universally measured by relations. Is anyone a father? If so, it is implied that the children should take care of him, submit to him in everything, patiently listen to his reproaches, his correction. But he is a bad father. Is you naturally entitled, then, to a good father? No, only to a father. Is a brother unjust? Well, keep your own situation towards him. Consider not what he does, but what you are to do to keep your own faculty of choice in a state conformable to nature. For another will not hurt you unless you please. You will then be hurt when you think you are hurt. In this manner, therefore, you will find, from the idea of a neighbor, a citizen, a general, the corresponding duties if you accustom yourself to contemplate the several relations.
68
+
69
+ Be assured that the essential property of piety towards the gods is to form right opinions concerning them, as existing "I and as governing the universe with goodness and justice. And fix yourself in this resolution, to obey them, and yield to them, and willingly follow them in all events, as produced by the most perfect understanding. For thus you will never find fault with the gods, nor accuse them as neglecting you. And it is not possible for this to be effected any other way than by withdrawing yourself from things not in our own control, and placing good or evil in those only which are. For if you suppose any of the things not in our own control to be either good or evil, when you are disappointed of what you wish, or incur what you would avoid, you must necessarily find fault with and blame the authors. For every animal is naturally formed to fly and abhor things that appear hurtful, and the causes of them; and to pursue and admire those which appear beneficial, and the causes of them. It is impractical, then, that one who supposes himself to be hurt should be happy about the person who, he thinks, hurts him, just as it is impossible to be happy about the hurt itself. Hence, also, a father is reviled by a son, when he does not impart to him the things which he takes to be good; and the supposing empire to be a good made Polynices and Eteocles mutually enemies. On this account the husbandman, the sailor, the merchant, on this account those who lose wives and children, revile the gods. For where interest is, there too is piety placed. So that, whoever is careful to regulate his desires and aversions as he ought, is, by the very same means, careful of piety likewise. But it is also incumbent on everyone to offer libations and sacrifices and first fruits, conformably to the customs of his country, with purity, and not in a slovenly manner, nor negligently, nor sparingly, nor beyond his ability.
70
+
71
+ When you have recourse to divination, remember that you know not what the event will be, and you come to learn it of the diviner; but of what nature it is you know before you come, at least if you are a philosopher. For if it is among the things not in our own control, it can by no means be either good or evil. Don't, therefore, bring either desire or aversion with you to the diviner (else you will approach him trembling), but first acquire a distinct knowledge that every event is indifferent and nothing to you., of whatever sort it may be, for it will be in your power to make a right use of it, and this no one can hinder; then come with confidence to the gods, as your counselors, and afterwards, when any counsel is given you, remember what counselors you have assumed, and whose advice you will neglect if you disobey. Come to divination, as Socrates prescribed, in cases of which the whole consideration relates to the event, and in which no opportunities are afforded by reason, or any other art, to discover the thing proposed to be learned. When, therefore, it is our duty to share the danger of a friend or of our country, we ought not to consult the oracle whether we will share it with them or not. For, though the diviner should forewarn you that the victims are unfavorable, this means no more than that either death or mutilation or exile is portended. But we have reason within us, and it directs, even with these hazards, to the greater diviner, the Pythian god, who cast out of the temple the person who gave no assistance to his friend while another was murdering him.
72
+
73
+ Immediately prescribe some character and form of conduce to yourself, which you may keep both alone and in company.
74
+
75
+ Be for the most part silent, or speak merely what is necessary, and in few words. We may, however, enter, though sparingly, into discourse sometimes when occasion calls for it, but not on any of the common subjects, of gladiators, or horse races, or athletic champions, or feasts, the vulgar topics of conversation; but principally not of men, so as either to blame, or praise, or make comparisons. If you are able, then, by your own conversation bring over that of your company to proper subjects; but, if you happen to be taken among strangers, be silent.
76
+
77
+ Don't allow your laughter be much, nor on many occasions, nor profuse.
78
+
79
+ Avoid swearing, if possible, altogether; if not, as far as you are able.
80
+
81
+ Avoid public and vulgar entertainments; but, if ever an occasion calls you to them, keep your attention upon the stretch, that you may not imperceptibly slide into vulgar manners. For be assured that if a person be ever so sound himself, yet, if his companion be infected, he who converses with him will be infected likewise.
82
+
83
+ Provide things relating to the body no further than mere use; as meat, drink, clothing, house, family. But strike off and reject everything relating to show and delicacy.
84
+
85
+ As far as possible, before marriage, keep yourself pure from familiarities with women, and, if you indulge them, let it be lawfully." But don't therefore be troublesome and full of reproofs to those who use these liberties, nor frequently boast that you yourself don't.
86
+
87
+ If anyone tells you that such a person speaks ill of you, don't make excuses about what is said of you, but answer: " He does not know my other faults, else he would not have mentioned only these."
88
+
89
+ It is not necessary for you to appear often at public spectacles; but if ever there is a proper occasion for you to be there, don't appear more solicitous for anyone than for yourself; that is, wish things to be only just as they are, and him only to conquer who is the conqueror, for thus you will meet with no hindrance. But abstain entirely from declamations and derision and violent emotions. And when you come away, don't discourse a great deal on what has passed, and what does not contribute to your own amendment. For it would appear by such discourse that you were immoderately struck with the show.
90
+
91
+ Go not [of your own accord] to the rehearsals of any
92
+ authors , nor appear [at them] readily. But, if you do appear, keepyour gravity and sedateness, and at the same time avoid being morose.
93
+
94
+ When you are going to confer with anyone, and particularly of those in a superior station, represent to yourself how Socrates or Zeno would behave in such a case, and you will not be at a loss to make a proper use of whatever may occur.
95
+
96
+ When you are going to any of the people in power, represent to yourself that you will not find him at home; that you will not be admitted; that the doors will not be opened to you; that he will take no notice of you. If, with all this, it is your duty to go, bear what happens, and never say [to yourself], " It was not worth so much." For this is vulgar, and like a man dazed by external things.
97
+
98
+ In parties of conversation, avoid a frequent and excessive mention of your own actions and dangers. For, however agreeable it may be to yourself to mention the risks you have run, it is not equally agreeable to others to hear your adventures. Avoid, likewise, an endeavor to excite laughter. For this is a slippery point, which may throw you into vulgar manners, and, besides, may be apt to lessen you in the esteem of your acquaintance. Approaches to indecent discourse are likewise dangerous. Whenever, therefore, anything of this sort happens, if there be a proper opportunity, rebuke him who makes advances that way; or, at least, by silence and blushing and a forbidding look, show yourself to be displeased by such talk.
99
+
100
+ If you are struck by the appearance of any promised pleasure, guard yourself against being hurried away by it; but let the affair wait your leisure, and procure yourself some delay. Then bring to your mind both points of time: that in which you will enjoy the pleasure, and that in which you will repent and reproach yourself after you have enjoyed it; and set before you, in opposition to these, how you will be glad and applaud yourself if you abstain. And even though it should appear to you a seasonable gratification, take heed that its enticing, and agreeable and attractive force may not subdue you; but set in opposition to this how much better it is to be conscious of having gained so great a victory.
101
+
102
+ When you do anything from a clear judgment that it ought to be done, never shun the being seen to do it, even though the world should make a wrong supposition about it; for, if you don't act right, shun the action itself; but, if you do, why are you afraid of those who censure you wrongly?
103
+
104
+ As the proposition, "Either it is day or it is night," is extremely proper for a disjunctive argument, but quite improper in a conjunctive one, so, at a feast, to choose the largest share is very suitable to the bodily appetite, but utterly inconsistent with the social spirit of an entertainment. When you eat with another, then, remember not only the value of those things which are set before you to the body, but the value of that behavior which ought to be observed towards the person who gives the entertainment.
105
+
106
+ If you have assumed any character above your strength, you have both made an ill figure in that and quitted one which you might have supported.
107
+
108
+ When walking, you are careful not to step on a nail or turn your foot; so likewise be careful not to hurt the ruling faculty of your mind. And, if we were to guard against this in every action, we should undertake the action with the greater safety.
109
+
110
+ The body is to everyone the measure of the possessions proper for it, just as the foot is of the shoe. If, therefore, you stop at this, you will keep the measure; but if you move beyond it, you must necessarily be carried forward, as down a cliff; as in the case of a shoe, if you go beyond its fitness to the foot, it comes first to be gilded, then purple, and then studded with jewels. For to that which once exceeds a due measure, there is no bound.
111
+
112
+ Women from fourteen years old are flattered with the title of "mistresses" by the men. Therefore, perceiving that they are regarded only as qualified to give the men pleasure, they begin to adorn themselves, and in that to place ill their hopes. We should, therefore, fix our attention on making them sensible that they are valued for the appearance of decent, modest and discreet behavior.
113
+
114
+ It is a mark of want of genius to spend much time in things relating to the body, as to be long in our exercises, in eating and drinking, and in the discharge of other animal functions. These should be done incidentally and slightly, and our whole attention be engaged in the care of the understanding.
115
+
116
+ When any person harms you, or speaks badly of you, remember that he acts or speaks from a supposition of its being his duty. Now, it is not possible that he should follow what appears right to you, but what appears so to himself. Therefore, if he judges from a wrong appearance, he is the person hurt, since he too is the person deceived. For if anyone should suppose a true proposition to be false, the proposition is not hurt, but he who is deceived about it. Setting out, then, from these principles, you will meekly bear a person who reviles you, for you will say upon every occasion, "It seemed so to him."
117
+
118
+ Everything has two handles, the one by which it may be carried, the other by which it cannot. If your brother acts unjustly, don't lay hold on the action by the handle of his injustice, for by that it cannot be carried; but by the opposite, that he is your brother, that he was brought up with you; and thus you will lay hold on it, as it is to be carried.
119
+
120
+ These reasonings are unconnected: "I am richer than you, therefore I am better"; "I am more eloquent than you, therefore I am better." The connection is rather this: "I am richer than you, therefore my property is greater than yours;" "I am more eloquent than you, therefore my style is better than yours." But you, after all, are neither property nor style.
121
+
122
+ Does anyone bathe in a mighty little time? Don't say that he does it ill, but in a mighty little time. Does anyone drink a great quantity of wine? Don't say that he does ill, but that he drinks a great quantity. For, unless you perfectly understand the principle from which anyone acts, how should you know if he acts ill? Thus you will not run the hazard of assenting to any appearances but such as you fully comprehend.
123
+
124
+ Never call yourself a philosopher, nor talk a great deal among the unlearned about theorems, but act conformably to them. Thus, at an entertainment, don't talk how persons ought to eat, but eat as you ought. For remember that in this manner Socrates also universally avoided all ostentation. And when persons came to him and desired to be recommended by him to philosophers, he took and- recommended them, so well did he bear being overlooked. So that if ever any talk should happen among the unlearned concerning philosophic theorems, be you, for the most part, silent. For there is great danger in immediately throwing out what you have not digested. And, if anyone tells you that you know nothing, and you are not nettled at it, then you may be sure that you have begun your business. For sheep don't throw up the grass to show the shepherds how much they have eaten; but, inwardly digesting their food, they outwardly produce wool and milk. Thus, therefore, do you likewise not show theorems to the unlearned, but the actions produced by them after they have been digested.
125
+
126
+ When you have brought yourself to supply the necessities of your body at a small price, don't pique yourself upon it; nor, if you drink water, be saying upon every occasion, "I drink water." But first consider how much more sparing and patient of hardship the poor are than we. But if at any time you would inure yourself by exercise to labor, and bearing hard trials, do it for your own sake, and not for the world; don't grasp statues, but, when you are violently thirsty, take a little cold water in your mouth, and spurt it out and tell nobody.
127
+
128
+ The condition and characteristic of a vulgar person, is, that he never expects either benefit or hurt from himself, but from externals. The condition and characteristic of a philosopher is, that he expects all hurt and benefit from himself. The marks of a proficient are, that he censures no one, praises no one, blames no one, accuses no one, says nothing concerning himself as being anybody, or knowing anything: when he is, in any instance, hindered or restrained, he accuses himself; and, if he is praised, he secretly laughs at the person who praises him; and, if he is censured, he makes no defense. But he goes about with the caution of sick or injured people, dreading to move anything that is set right, before it is perfectly fixed. He suppresses all desire in himself; he transfers his aversion to those things only which thwart the proper use of our own faculty of choice; the exertion of his active powers towards anything is very gentle; if he appears stupid or ignorant, he does not care, and, in a word, he watches himself as an enemy, and one in ambush.
129
+
130
+ When anyone shows himself overly confident in ability to understand and interpret the works of Chrysippus, say to yourself, " Unless Chrysippus had written obscurely, this person would have had no subject for his vanity. But what do I desire? To understand nature and follow her. I ask, then, who interprets her, and, finding Chrysippus does, I have recourse to him. I don't understand his writings. I seek, therefore, one to interpret them." So far there is nothing to value myself upon. And when I find an interpreter, what remains is to make use of his instructions. This alone is the valuable thing. But, if I admire nothing but merely the interpretation, what do I become more than a grammarian instead of a philosopher? Except, indeed, that instead of Homer I interpret Chrysippus. When anyone, therefore, desires me to read Chrysippus to him, I rather blush when I cannot show my actions agreeable and consonant to his discourse.
131
+
132
+ Whatever moral rules you have deliberately proposed to yourself. abide by them as they were laws, and as if you would be guilty of impiety by violating any of them. Don't regard what anyone says of you, for this, after all, is no concern of yours. How long, then, will you put off thinking yourself worthy of the highest improvements and follow the distinctions of reason? You have received the philosophical theorems, with which you ought to be familiar, and you have been familiar with them. What other master, then, do you wait for, to throw upon that the delay of reforming yourself? You are no longer a boy, but a grown man. If, therefore, you will be negligent and slothful, and always add procrastination to procrastination, purpose to purpose, and fix day after day in which you will attend to yourself, you will insensibly continue without proficiency, and, living and dying, persevere in being one of the vulgar. This instant, then, think yourself worthy of living as a man grown up, and a proficient. Let whatever appears to be the best be to you an inviolable law. And if any instance of pain or pleasure, or glory or disgrace, is set before you, remember that now is the combat, now the Olympiad comes on, nor can it be put off. By once being defeated and giving way, proficiency is lost, or by the contrary preserved. Thus Socrates became perfect, improving himself by everything. attending to nothing but reason. And though you are not yet a Socrates, you ought, however, to live as one desirous of becoming a Socrates.
133
+
134
+ The first and most necessary topic in philosophy is that of the use of moral theorems, such as, "We ought not to lie;" the second is that of demonstrations, such as, "What is the origin of our obligation not to lie;" the third gives strength and articulation to the other two, such as, "What is the origin of this is a demonstration." For what is demonstration? What is consequence? What contradiction? What truth? What falsehood? The third topic, then, is necessary on the account of the second, and the second on the account of the first. But the most necessary, and that whereon we ought to rest, is the first. But we act just on the contrary. For we spend all our time on the third topic, and employ all our diligence about that, and entirely neglect the first. Therefore, at the same time that we lie, we are immediately prepared to show how it is demonstrated that lying is not right.
135
+
136
+ Upon all occasions we ought to have these maxims ready at hand:
137
+
138
+ "Conduct me, Jove, and you, 0 Destiny,
139
+ Wherever your decrees have fixed my station."
140
+ Cleanthes
141
+
142
+ "I follow cheerfully; and, did I not,
143
+ Wicked and wretched, I must follow still
144
+ Whoever yields properly to Fate, is deemed
145
+ Wise among men, and knows the laws of heaven."
146
+ Euripides, Frag. 965
147
+
148
+ And this third:
149
+
150
+ "0 Crito, if it thus pleases the gods, thus let it be. Anytus and Melitus may kill me indeed, but hurt me they cannot."
151
+ Plato's Crito and Apology
@@ -88,4 +88,13 @@ describe Swearjar do
88
88
  it "doesn't substitute simple words when they occur later as substrings" do
89
89
  expect(Swearjar.default.censor("anus janus")).to eq("**** janus")
90
90
  end
91
+
92
+ it "detects profane phrases with spaces" do
93
+ expect(Swearjar.default.censor("nut sack nutsac nut sac ")).to eq("*** **** ****** *** *** ")
94
+ expect(Swearjar.default.censor("junglebunnies jungle bunnyabc")).to eq("************* ****** ********")
95
+ end
96
+
97
+ it "allows a custom censor mask" do
98
+ expect(Swearjar.default.censor("a fucked to hell nut sack", "X")).to eq("a XXXXXX to XXXX XXX XXXX")
99
+ end
91
100
  end
@@ -18,11 +18,10 @@ Gem::Specification.new do |s|
18
18
  s.require_paths = ["lib"]
19
19
  s.rubygems_version = %q{1.3.7}
20
20
  s.test_files = `git ls-files`.split("\n").select{|f| f =~ /^spec/}
21
- s.rubyforge_project = 'swearjar'
22
21
 
23
22
  # dependencies
24
- s.add_development_dependency 'rake', '~> 10.5'
25
- s.add_development_dependency 'rspec', '~> 3.4'
26
- s.add_development_dependency 'pry', '~> 0.10'
23
+ s.add_development_dependency 'rake', '~> 13.0'
24
+ s.add_development_dependency 'rspec', '~> 3.9'
25
+ s.add_development_dependency 'pry', '~> 0.13'
27
26
  end
28
27
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swearjar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Hull
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-17 00:00:00.000000000 Z
11
+ date: 2020-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '10.5'
19
+ version: '13.0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '10.5'
26
+ version: '13.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '3.4'
33
+ version: '3.9'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '3.4'
40
+ version: '3.9'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: pry
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.10'
47
+ version: '0.13'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.10'
54
+ version: '0.13'
55
55
  description: Put another nickel in the swearjar. Simple profanity detection with content
56
56
  analysis.
57
57
  email: joshbuddy@gmail.com
@@ -73,6 +73,7 @@ files:
73
73
  - spec/acceptance_spec.rb
74
74
  - spec/data/carlin_dirty_words.txt
75
75
  - spec/data/carlin_dirty_words_censored.txt
76
+ - spec/data/epictetus_enchiridion.txt
76
77
  - spec/data/swear.yml
77
78
  - spec/spec_helper.rb
78
79
  - spec/swearjar_spec.rb
@@ -81,7 +82,7 @@ homepage: http://github.com/joshbuddy/swearjar
81
82
  licenses:
82
83
  - MIT
83
84
  metadata: {}
84
- post_install_message:
85
+ post_install_message:
85
86
  rdoc_options:
86
87
  - "--charset=UTF-8"
87
88
  require_paths:
@@ -97,8 +98,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
98
  - !ruby/object:Gem::Version
98
99
  version: '0'
99
100
  requirements: []
100
- rubygems_version: 3.0.1
101
- signing_key:
101
+ rubygems_version: 3.1.2
102
+ signing_key:
102
103
  specification_version: 4
103
104
  summary: Put another nickel in the swearjar. Simple profanity detection with content
104
105
  analysis
@@ -106,6 +107,7 @@ test_files:
106
107
  - spec/acceptance_spec.rb
107
108
  - spec/data/carlin_dirty_words.txt
108
109
  - spec/data/carlin_dirty_words_censored.txt
110
+ - spec/data/epictetus_enchiridion.txt
109
111
  - spec/data/swear.yml
110
112
  - spec/spec_helper.rb
111
113
  - spec/swearjar_spec.rb