jungi 0.0.1
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 +7 -0
- data/LICENSE +675 -0
- data/README.md +49 -0
- data/Rakefile +38 -0
- data/bin/jungi +181 -0
- data/lib/jungi/bigfive.rb +329 -0
- data/lib/jungi/classes.rb +193 -0
- data/lib/jungi/cli.rb +105 -0
- data/lib/jungi/oejts.rb +170 -0
- data/lib/jungi/paulhus.rb +130 -0
- metadata +53 -0
@@ -0,0 +1,130 @@
|
|
1
|
+
# JungI - A simple program for taking open source personality tests.
|
2
|
+
# Copyright (C) 2015 Mfrogy Starmade
|
3
|
+
#
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
|
17
|
+
# These tests were created by Delroy L. Paulhus for the public domain.
|
18
|
+
# For more information, see this page:
|
19
|
+
# <http://www2.psych.ubc.ca/~dpaulhus/Paulhus_measures/>
|
20
|
+
|
21
|
+
begin
|
22
|
+
require_relative './classes'
|
23
|
+
rescue LoadError
|
24
|
+
require 'jungi/classes'
|
25
|
+
end
|
26
|
+
|
27
|
+
# Short Dark Triad Test
|
28
|
+
class SD3Test < ScaleTest
|
29
|
+
DOC = <<END_FILE
|
30
|
+
Short Dark Triad
|
31
|
+
-
|
32
|
+
Delroy L. Paulhus
|
33
|
+
|
34
|
+
This test evaluates how strongly you display the
|
35
|
+
dark triad of personality. Answer each question with
|
36
|
+
a "1" for Strongly Disagree, "2" for Disagree,
|
37
|
+
"3" for Neither Agree nor Disagree, "4" for Agree,
|
38
|
+
and "5" for Strongly Agree. Press <ENTER> after
|
39
|
+
you've made your choice.
|
40
|
+
END_FILE
|
41
|
+
QUESTIONS = [
|
42
|
+
'Whatever it takes, you must get the important people'\
|
43
|
+
' on your side.',
|
44
|
+
'Avoid direct conflict with others because they may be'\
|
45
|
+
' useful in the future.',
|
46
|
+
'I have never gotten into trouble with the law.',
|
47
|
+
'People often say I’m out of control.',
|
48
|
+
'I avoid dangerous situations.',
|
49
|
+
'I like to get acquainted with important people.',
|
50
|
+
'I feel embarrassed if someone compliments me.',
|
51
|
+
'Many group activities tend to be dull without me.',
|
52
|
+
'People see me as a natural leader.',
|
53
|
+
'It’s wise to keep track of information that you can use'\
|
54
|
+
' against people later.',
|
55
|
+
'I am an average person.',
|
56
|
+
'There are things you should hide from other people because'\
|
57
|
+
' they don’t need to know.',
|
58
|
+
'It’s true that I can be mean to others.',
|
59
|
+
'I know that I am special because everyone keeps telling'\
|
60
|
+
' me so.',
|
61
|
+
'I have been compared to famous people.',
|
62
|
+
'I enjoy having sex with people I hardly know',
|
63
|
+
'I’ll say anything to get what I want.',
|
64
|
+
'I hate being the center of attention.',
|
65
|
+
'I like to use clever manipulation to get my way.',
|
66
|
+
'I like to get revenge on authorities.',
|
67
|
+
'You should wait for the right time to get back at people.',
|
68
|
+
'Make sure your plans benefit you, not others.',
|
69
|
+
'Most people can be manipulated.',
|
70
|
+
"It's not wise to tell your secrets.",
|
71
|
+
'I insist on getting the respect I deserve.',
|
72
|
+
'People who mess with me always regret it.',
|
73
|
+
'Payback needs to be quick and nasty.'
|
74
|
+
]
|
75
|
+
|
76
|
+
def self.parse_mach(mach)
|
77
|
+
if mach < 1.5
|
78
|
+
"Strong(#{mach}) Anti-Machivellianism\n"
|
79
|
+
elsif mach < 3.1
|
80
|
+
"Weak(#{mach}) Anti-Machivellianism\n"
|
81
|
+
elsif mach < 4.3
|
82
|
+
"Weak(#{mach}) Machivellianism\n"
|
83
|
+
else
|
84
|
+
"Strong(#{mach}) Machivellianism\n"
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
def self.parse_narc(narc)
|
89
|
+
if narc < 1.5
|
90
|
+
"Strong(#{narc}) Anti-Narcissism\n"
|
91
|
+
elsif narc < 2.8
|
92
|
+
"Weak(#{narc}) Anti-Narcissism\n"
|
93
|
+
elsif narc < 4
|
94
|
+
"Weak(#{narc}) Narcissism\n"
|
95
|
+
else
|
96
|
+
"Strong(#{narc}) Narcissism\n"
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
def self.parse_psycho(psycho)
|
101
|
+
if psycho < 1.5
|
102
|
+
"Strong(#{psycho}) Anti-Psychopathy\n"
|
103
|
+
elsif psycho < 2.4
|
104
|
+
"Weak(#{psycho}) Anti-Psychopathy\n"
|
105
|
+
elsif psycho < 3
|
106
|
+
"Weak(#{psycho}) Psychopathy\n"
|
107
|
+
else
|
108
|
+
"Strong(#{psycho}) Psychopathy\n"
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
def self.parse_result(mach, narc, psycho)
|
113
|
+
mach = (mach.round 1)
|
114
|
+
narc = (narc.round 1)
|
115
|
+
psycho = (psycho.round 1)
|
116
|
+
parse_mach(mach) << parse_narc(narc) << parse_psycho(psycho)
|
117
|
+
end
|
118
|
+
|
119
|
+
def result
|
120
|
+
mach = (self.Q24 + self.Q19 + self.Q1 + self.Q2 + self.Q10 +
|
121
|
+
self.Q21 + self.Q12 + self.Q22 + self.Q23) / 9.0
|
122
|
+
narc = (self.Q9 + Question::Answer.reverse_scale(self.Q18) +
|
123
|
+
self.Q8 + self.Q14 + self.Q6 + Question::Answer.reverse_scale(self.Q7) +
|
124
|
+
self.Q15 + Question::Answer.reverse_scale(self.Q11) + self.Q25) / 9.0
|
125
|
+
psycho = (self.Q20 + Question::Answer.reverse_scale(self.Q5) +
|
126
|
+
self.Q27 + self.Q4 + self.Q13 + self.Q26 +
|
127
|
+
Question::Answer.reverse_scale(self.Q3) + self.Q16 + self.Q17) / 9.0
|
128
|
+
[mach, narc, psycho]
|
129
|
+
end
|
130
|
+
end
|
metadata
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jungi
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- MFrogy Starmade
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-10-22 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A simple program for taking open source personality tests.
|
14
|
+
email: m27frogy.roblox@gmail.com
|
15
|
+
executables:
|
16
|
+
- jungi
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- LICENSE
|
21
|
+
- README.md
|
22
|
+
- Rakefile
|
23
|
+
- bin/jungi
|
24
|
+
- lib/jungi/bigfive.rb
|
25
|
+
- lib/jungi/classes.rb
|
26
|
+
- lib/jungi/cli.rb
|
27
|
+
- lib/jungi/oejts.rb
|
28
|
+
- lib/jungi/paulhus.rb
|
29
|
+
homepage: https://github.com/m27frogy/JungI
|
30
|
+
licenses:
|
31
|
+
- GPL3
|
32
|
+
metadata: {}
|
33
|
+
post_install_message:
|
34
|
+
rdoc_options: []
|
35
|
+
require_paths:
|
36
|
+
- lib
|
37
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
requirements: []
|
48
|
+
rubyforge_project:
|
49
|
+
rubygems_version: 2.4.8
|
50
|
+
signing_key:
|
51
|
+
specification_version: 4
|
52
|
+
summary: Take tests.
|
53
|
+
test_files: []
|