nota_nuc 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +48 -0
- data/README.md +41 -0
- data/Rakefile +5 -0
- data/db/Quarrier.rb +430 -0
- data/db/create_db_Penrhyn.rb +186 -0
- data/features/commands.feature +119 -0
- data/features/cucumber_LICENCE +22 -0
- data/features/offline.feature +65 -0
- data/features/passwords.feature +37 -0
- data/features/step_definitions/command_steps.rb +142 -0
- data/features/step_definitions/offline_steps.rb +211 -0
- data/features/step_definitions/password_steps.rb +45 -0
- data/images/arrowleft_image.png +0 -0
- data/images/arrowright_image.png +0 -0
- data/images/arrowright_imageone.png +0 -0
- data/images/arrowright_imagetwo.png +0 -0
- data/images/blue_light.png +0 -0
- data/images/error_symbol.png +0 -0
- data/images/gift_glow2.png +0 -0
- data/images/gift_nonglow2.png +0 -0
- data/images/gift_nonglow2_bottom.png +0 -0
- data/images/green_light.png +0 -0
- data/images/key_glow.png +0 -0
- data/images/key_nonglow.png +0 -0
- data/images/lock_image.png +0 -0
- data/images/new_slate_icon.png +0 -0
- data/images/pencil_glow image.png +0 -0
- data/images/pencil_glow_image_red.png +0 -0
- data/images/pencil_nonglow.png +0 -0
- data/images/red_light.png +0 -0
- data/images/settings_icon.png +0 -0
- data/images/typing_image.png +0 -0
- data/images/updating_image.png +0 -0
- data/images/yellow_light.png +0 -0
- data/lib/Billboard_module.rb +372 -0
- data/lib/Exercitus_romanorum.rb +572 -0
- data/lib/error_choose_a_slate.rb +20 -0
- data/lib/final_eye.rb +777 -0
- data/lib/nota_nuc.rb +5 -0
- data/lib/nota_nuc/version.rb +3 -0
- data/log/history.log +3 -0
- data/log/slate.log +3 -0
- data/nota_nuc.gemspec +36 -0
- metadata +196 -0
@@ -0,0 +1,186 @@
|
|
1
|
+
|
2
|
+
=begin
|
3
|
+
Sqlite3
|
4
|
+
Copyright (c) 2004, Jamis Buck (jamis@jamisbuck.org)
|
5
|
+
All rights reserved.
|
6
|
+
|
7
|
+
Redistribution and use in source and binary forms, with or without
|
8
|
+
modification, are permitted provided that the following conditions are met:
|
9
|
+
|
10
|
+
* Redistributions of source code must retain the above copyright notice,
|
11
|
+
this list of conditions and the following disclaimer.
|
12
|
+
|
13
|
+
* Redistributions in binary form must reproduce the above copyright
|
14
|
+
notice, this list of conditions and the following disclaimer in the
|
15
|
+
documentation and/or other materials provided with the distribution.
|
16
|
+
|
17
|
+
* The names of its contributors may not be used to endorse or promote
|
18
|
+
products derived from this software without specific prior written
|
19
|
+
permission.
|
20
|
+
|
21
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
22
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
23
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
24
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
25
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
26
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
27
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
28
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
29
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
30
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
31
|
+
=end
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
TRAVEL = "Japan
|
38
|
+
eat ramen there
|
39
|
+
visit Tokyo
|
40
|
+
what city should I stay?
|
41
|
+
|
42
|
+
|
43
|
+
Seoul Korea
|
44
|
+
get a massage there
|
45
|
+
buy a bespoke suit there
|
46
|
+
go and visit the demilitarized zone
|
47
|
+
take a hike
|
48
|
+
eat some delicious sweets
|
49
|
+
do some shopping
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
()()()()()()()
|
54
|
+
Iceland
|
55
|
+
Maldives
|
56
|
+
Marrakesh Morocco
|
57
|
+
"
|
58
|
+
|
59
|
+
GIFTS = "Mom birdfeeder
|
60
|
+
Steve sweater
|
61
|
+
sister giftcard for amazon
|
62
|
+
aunt flashlight"
|
63
|
+
|
64
|
+
MUSIC = "songs to buy
|
65
|
+
new blu album
|
66
|
+
Gramatik - My People
|
67
|
+
OhHoney - Be Okay
|
68
|
+
Fitz & The Tanrums - The Walker
|
69
|
+
"
|
70
|
+
|
71
|
+
THOUGHTS = "Hints and Suggestions
|
72
|
+
|
73
|
+
Here are some suggestions for using this application
|
74
|
+
|
75
|
+
A good main slate to start out with is Schedule. Once Schedule fills up create others and move notes into them. \n
|
76
|
+
|
77
|
+
This program can be fully controlled from the keyboard. It is a fun and quick way to navigate between slates. Just remember n and p
|
78
|
+
|
79
|
+
The example slates can give you an idea of some ways to organize your information but you should create what works best for you.
|
80
|
+
|
81
|
+
You can use this program to save snippets of code, create lists or any kind, or type out a few notes to yourself. This is how it started for me :)
|
82
|
+
|
83
|
+
The following ideas have been given to me by others and I think they could be useful as ways to organize your information.
|
84
|
+
log snippets of code each in their own slate or create slates for each language
|
85
|
+
keep track of a running project at work or at home
|
86
|
+
type out a grocery list of food to buy
|
87
|
+
|
88
|
+
remember to get more information about the commands just type help"
|
89
|
+
|
90
|
+
IDEAS = "\nstart investing in stocks?\n
|
91
|
+
read more
|
92
|
+
practice singing
|
93
|
+
plan a vacation with friends to Hawaii?
|
94
|
+
try out cookie recipe with almonds, lemon and peanut butter
|
95
|
+
think of ways to save money (food, heat, gas)
|
96
|
+
"
|
97
|
+
|
98
|
+
SCHEDULE = "Monday
|
99
|
+
grocery shopping
|
100
|
+
pickup mail
|
101
|
+
|
102
|
+
Tuesday
|
103
|
+
do laundry
|
104
|
+
water plants
|
105
|
+
run a mile
|
106
|
+
study programming algorithms
|
107
|
+
|
108
|
+
Wednesday
|
109
|
+
take out the garbage
|
110
|
+
clean the kitchen
|
111
|
+
buy some books
|
112
|
+
call Mom and ask her about coming to visit
|
113
|
+
|
114
|
+
July
|
115
|
+
take cat to vet
|
116
|
+
plan birthday party for mom
|
117
|
+
buy new shoes
|
118
|
+
fix the garage door
|
119
|
+
|
120
|
+
August
|
121
|
+
Take sister shopping
|
122
|
+
25th go to Dr. Katz at 9am
|
123
|
+
|
124
|
+
Fall
|
125
|
+
buy new tv for football?
|
126
|
+
start running every weekend at 5am
|
127
|
+
learn Korean
|
128
|
+
write a song for the guitar
|
129
|
+
play the guitar in a club
|
130
|
+
pickup a book about recipes
|
131
|
+
buy stock in ups?
|
132
|
+
adopt a dog?
|
133
|
+
"
|
134
|
+
|
135
|
+
|
136
|
+
require 'sqlite3'
|
137
|
+
require 'logger'
|
138
|
+
|
139
|
+
|
140
|
+
begin
|
141
|
+
|
142
|
+
db = SQLite3::Database.new "Penrhyn.db"
|
143
|
+
|
144
|
+
db.execute "CREATE TABLE IF NOT EXISTS slates(slateid INTEGER PRIMARY KEY, slatename VARCHAR(18), maintext TEXT, connectionstatus INTEGER CHECK (connectionstatus >= 0 and connectionstatus <= 1), commandonly INTEGER CHECK (commandonly >= 0 and commandonly <= 1), viewing INTEGER CHECK (viewing >=0 and viewing <=1 ))"
|
145
|
+
db.execute "INSERT INTO slates VALUES(0, 'Schedule', '#{SCHEDULE}', 0, 0, 0)"
|
146
|
+
db.execute "INSERT INTO slates VALUES(1, 'Ideas', '#{IDEAS}', 0, 0, 0)"
|
147
|
+
db.execute "INSERT INTO slates VALUES(2, 'Music', '#{MUSIC}', 0, 0, 0)"
|
148
|
+
db.execute "INSERT INTO slates VALUES(3, 'Travel', '#{TRAVEL}', 0, 0, 0)"
|
149
|
+
db.execute "INSERT INTO slates VALUES(4, 'Suggestions', '#{THOUGHTS}', 0, 0, 1)"
|
150
|
+
db.execute "INSERT INTO slates VALUES(5, 'Gifts', '#{GIFTS}', 0, 0, 0)"
|
151
|
+
db.execute "CREATE TABLE IF NOT EXISTS general_settings(settings INTEGER PRIMARY KEY CHECK (settings = 0), adminpassword VARCHAR, updatetime INTEGER, lockslatecheck INTEGER CHECK(lockslatecheck >= 0 and lockslatecheck <=1), locktime INTEGER, networkcheck INTEGER CHECK (networkcheck >= 0 and networkcheck <= 1), adminstatus INTEGER CHECK(adminstatus >= 0 and adminstatus <= 1))"
|
152
|
+
db.execute "INSERT INTO general_settings VALUES(0, 'somekindpptdssan', 7, 0, 9, 0, 0)"
|
153
|
+
db.execute "CREATE TABLE IF NOT EXISTS hosts(hostid INTEGER PRIMARY KEY, hostname VARCHAR(40))"
|
154
|
+
db.execute "CREATE TABLE IF NOT EXISTS slatehosts(shid INTEGER PRIMARY KEY, hostid INTEGER, slateid INTEGER)"
|
155
|
+
db.execute "CREATE TABLE IF NOT EXISTS statuses(state INTEGER PRIMARY KEY CHECK (state = 0), isadmin INTEGER CHECK (isadmin >= 0 and isadmin <= 1), newtext INTEGER CHECK (newtext >= 0 and newtext <= 1), doppelganger INTEGER CHECK (doppelganger >= 0 and doppelganger <= 1), giftoffers INTEGER CHECK (giftoffers >= 0 and giftoffers <= 1), cmdlineresponse INTEGER CHECK (cmdlineresponse >= 0 and cmdlineresponse <= 1))"
|
156
|
+
db.execute "INSERT INTO statuses VALUES(0, 0, 0, 0, 0, 0)"
|
157
|
+
|
158
|
+
|
159
|
+
=begin
|
160
|
+
select = db.prepare "SELECT * FROM Slates"
|
161
|
+
rs = select.execute
|
162
|
+
|
163
|
+
rs.each do |row|
|
164
|
+
puts row.join "\s"
|
165
|
+
end
|
166
|
+
=end
|
167
|
+
|
168
|
+
puts "The ../db/Penrhyn.db database file was created. To run this application, go to lib and run ruby final_eye.rb"
|
169
|
+
|
170
|
+
|
171
|
+
rescue SQLite3::Exception => e
|
172
|
+
#log Database exception
|
173
|
+
puts e
|
174
|
+
logger = Logger.new('../log/slate.log', 2, 2000000)
|
175
|
+
logger.error "This exception was found when database creation file was run (create_db_Penrhyn.rb): #{e}"
|
176
|
+
logger.close
|
177
|
+
|
178
|
+
|
179
|
+
ensure
|
180
|
+
# select.close if select
|
181
|
+
db.close if db
|
182
|
+
end
|
183
|
+
|
184
|
+
|
185
|
+
#Developer : Mark Focella (m.focella@gmail.com)
|
186
|
+
#Date : February 17, 2014
|
@@ -0,0 +1,119 @@
|
|
1
|
+
Feature: Commands
|
2
|
+
|
3
|
+
Users have quick access to functions and customization of slates and the application through the command line. The commands allow for all the same functions that can be done through the gui and some additional ones. There are both simple commands as well as more advanced commands available to the user. Some of the dangerous commands are only available once a password is entered(superuser)
|
4
|
+
|
5
|
+
|
6
|
+
#run a script that creates a set database of slates so I can check their text in here with that db???
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
Scenario: I want to run a command
|
11
|
+
When I run the command, I should get the following response
|
12
|
+
| command | response |
|
13
|
+
| new | The new command requires an option and an argument |
|
14
|
+
| new -s carrot | The slate carrot has been created |
|
15
|
+
| new dsaa il | This command allows you to create a new slate |
|
16
|
+
| new dfs**) | This command allows you to create a new slate |
|
17
|
+
| new -s &(sas |!new no symb err |
|
18
|
+
| new -s a | Slatename must be more than 2 characters long |
|
19
|
+
| new -s exit | Your slate cannot be the name of a command |
|
20
|
+
| new -s carrot | The slate carrot already exists |
|
21
|
+
| new --slate carrot | This command allows you to create a new slate |
|
22
|
+
| new --slate &(sas | This command allows you to create a new slate |
|
23
|
+
| new --slate a | This command allows you to create a new slate |
|
24
|
+
| new --slate exit | This command allows you to create a new slate |
|
25
|
+
| new --slate parrot | This command allows you to create a new slate |
|
26
|
+
| delete vacation | This command allows you to delete a slate |
|
27
|
+
| delete | was deleted |
|
28
|
+
| delete -s | This command allows you to delete a slate |
|
29
|
+
| delete -s dfsad | The argument dfsad is not a slate |
|
30
|
+
| delete -s dsf@#@! | This command allows you to delete a slate |
|
31
|
+
| delete -s Music | The slate Music wsa deleted |
|
32
|
+
| delete -s Music | The argument Music is not a slate |
|
33
|
+
| delete fdsfds | This command allows you to delete a slate |
|
34
|
+
| delete fdsf**) | This command allows you to delete a slate |
|
35
|
+
| delete --slate Food | This command allows you to delete a slate |
|
36
|
+
| delete --slate | This command allows you to delete a slate |
|
37
|
+
| delete --slate dfsad | This command allows you to delete a slate |
|
38
|
+
| delete --slate dsf@#@! | This command allows you to delete a slate |
|
39
|
+
| delete --slate Food | This command allows you to delete a slate |
|
40
|
+
| version | This is Version 0 |
|
41
|
+
| version fdsa | This command displays the version of this program |
|
42
|
+
| version dfs**) | This command displays the version of this program |
|
43
|
+
| lastlog |!cars |
|
44
|
+
| lastlog dfas | his command displays the version of this program |
|
45
|
+
| lastlog fds*))^ | his command displays the version of this program |
|
46
|
+
| history | lastlog fds*))^ |
|
47
|
+
| history help | This command gives you a listing of the last 50 |
|
48
|
+
| history h*))2 | This command gives you a listing of the last 50 |
|
49
|
+
| list | Your slates include: |
|
50
|
+
| list help | This command lists the slates you have |
|
51
|
+
| ls | Your slates include: |
|
52
|
+
| ls fdsassa | It is a shortcut for list |
|
53
|
+
| ls S*()) | It is a shortcut for list |
|
54
|
+
| next |!after install program know which slate will be next |
|
55
|
+
| next dfsaas | This command brings you to the next slate in your |
|
56
|
+
| next ds*((8 | This command brings you to the next slate in your |
|
57
|
+
| n |!go to next slate |
|
58
|
+
| n fdsas | This command brings you to the next slate in your |
|
59
|
+
| n fds**() | This command brings you to the next slate in your |
|
60
|
+
| previous |!previous slate |
|
61
|
+
| previous fdsas | This command brings you to the previous slate |
|
62
|
+
| previous dfs%$$ | This command brings you to the previous slate |
|
63
|
+
| p |!previous slate |
|
64
|
+
| p fdsas | This command brings you to the previous slate |
|
65
|
+
| p dfsa**(^ | This command brings you to the previous slate |
|
66
|
+
| viewslate |!find the slate viewing with method and match viewslate command view the slate |
|
67
|
+
| viewslate fdsafsd | This command removes the command output and lets |
|
68
|
+
| viewslate ds*)&& | This command removes the command output and lets |
|
69
|
+
| v |!find the slate viewing with method and match viewslate command view the slate |
|
70
|
+
| v dfsaf | This command removes the command output and lets |
|
71
|
+
| v fds*))# | This command removes the command output and lets |
|
72
|
+
| schedule | take cat to vet |
|
73
|
+
| schedule dsasa | This is not a valid command or slate. |
|
74
|
+
| Schedule dsf*() | This is not a valid command or slate. |
|
75
|
+
| help | The commands included with this program are: |
|
76
|
+
| help dsas | Type in help if you need assistance. |
|
77
|
+
| help dsa*)) | Type in help if you need assistance. |
|
78
|
+
| super |!become supuser |
|
79
|
+
| super dassdf |!super help |
|
80
|
+
| super dfs*)) |!super help |
|
81
|
+
| exit |!program shutdown |
|
82
|
+
| exit help | This command exits the program. |
|
83
|
+
| exit s*))*7 | This command exits the program. |
|
84
|
+
| e |!program shutdown |
|
85
|
+
| e help | This is not a valid command or slate. |
|
86
|
+
| e s*))*7 | This is not a valid command or slate. |
|
87
|
+
| demote |!not admin anymore|
|
88
|
+
| demote dsasa |!demote help |
|
89
|
+
| demote s*()) |!demote help |
|
90
|
+
| rename | The rename command requires two arguments. |
|
91
|
+
| rename cars | The first argument cars is not the name of a slate |
|
92
|
+
| rename dfsa***) |!You do not have a slate named: dfsa***) |
|
93
|
+
| rename Music schedule | You already have a slate called schedule |
|
94
|
+
| rename Music fds*)) | You can only use letters, numbers and underscores |
|
95
|
+
| rename Music ad | The slatename must be more than 2 characters long |
|
96
|
+
| rename Music exit | Your slate cannot be the name of a command |
|
97
|
+
| rename Music Songs | The slate Music has changed its name to Songs |
|
98
|
+
| about | This program is meant provide you with |
|
99
|
+
| about fdsfsda | This command gives you information about Slates. |
|
100
|
+
| about fds**)# | This command gives you information about Slates. |
|
101
|
+
| ThankYou | Thank you matz for the lovely language that is ruby.|
|
102
|
+
| newz | This command allows you to create a new slate |
|
103
|
+
| news ideas | This command allows you to create a new slate |
|
104
|
+
| new ideas -b ctrl+i | This command allows you to create a new slate |
|
105
|
+
| deleter vacation | This command allows you to delete a slate |
|
106
|
+
| deletealll | This command allows you to delete a slate |
|
107
|
+
| deletwe | This is not a valid command or slate. |
|
108
|
+
| listf | This command lists the slates you have. |
|
109
|
+
| listz -h | This command lists the slates you have. |
|
110
|
+
| ideassdxdss | This is not a valid command or slate |
|
111
|
+
| fds*))s@ | This is not a valid command or slate |
|
112
|
+
| helppp | Type in help if you need assistance. |
|
113
|
+
| superrr | This command asks for the administrator password |
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
#Developer : Mark Focella (m.focella@gmail.com)
|
118
|
+
#Date : February 17, 2014
|
119
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
T License
|
2
|
+
|
3
|
+
Copyright (c) 2008-2013 Aslak Hellesøy
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,65 @@
|
|
1
|
+
Feature: Offline_General_Functionality
|
2
|
+
|
3
|
+
This application has some general functionality which can be used in an offline capacity. These features include switching between slates with buttons, saving slates automatically, creating new slates, and renaming slates.
|
4
|
+
|
5
|
+
To add a new slate a user clicks the gift button when not lit. This brings up the New Slate window. Now a user can create a new slate and give it a name, shortcut, password and choose to share it with other accepted hosts.
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
Scenario: Switching between slates with right arrow button
|
10
|
+
Given A user wants to switch to another slate
|
11
|
+
Then A user clicks the right arrow
|
12
|
+
And A user wants to switch back to the first slate
|
13
|
+
Then A user clicks the left arrow
|
14
|
+
And The program switches to the next slate
|
15
|
+
|
16
|
+
Scenario: Switching between slates with left arrow button
|
17
|
+
Given A user wants to switch to another slate
|
18
|
+
Then A user clicks the left arrow
|
19
|
+
And A user wants to switch back to the first slate
|
20
|
+
Then A user clicks the right arrow
|
21
|
+
And The program switches to the previous slate
|
22
|
+
|
23
|
+
Scenario: Switching from maintext to commandline with keyboard
|
24
|
+
Given A user wants to access the commandline from the slatetext
|
25
|
+
Then A user clicks the tab button
|
26
|
+
And The commandline is highlighted
|
27
|
+
|
28
|
+
Scenario: Switching from commandline to maintext with keyboard
|
29
|
+
Given A user wants to access the slatetext from the commandline
|
30
|
+
Then A user clicks the tab button
|
31
|
+
And The user can type in the slatetext
|
32
|
+
|
33
|
+
Scenario: Switching to the next slate with Ctrl-Right keyboard button
|
34
|
+
Given A user wants to go to the next slate
|
35
|
+
Then A user clicks the Ctrl-Right button
|
36
|
+
And The program switches to the next slate
|
37
|
+
|
38
|
+
Scenario: Create a new slate with the new slate button
|
39
|
+
When A user clicks the new_slate button
|
40
|
+
Then A user gets a new slate window
|
41
|
+
And A user names the slate pickles
|
42
|
+
Then A user hits the ok button
|
43
|
+
Then A slate is created with the name pickles
|
44
|
+
|
45
|
+
Scenario: Access the general settings window
|
46
|
+
When A user clicks the general_settings button
|
47
|
+
Then The user gets a general_settings window
|
48
|
+
|
49
|
+
Scenario: A users slate is saved after moving to another slate
|
50
|
+
Given A user inputs family-night into schedule slate
|
51
|
+
Then A user clicks the right arrow
|
52
|
+
And A user clicks the left arrow
|
53
|
+
Then A user goes back to the first slate and the text is still there
|
54
|
+
|
55
|
+
Scenario: A users slate is saved when the program is shutdown
|
56
|
+
Given A user inputs bigL into Music
|
57
|
+
Then A user exits the application by clicking the x in the corner
|
58
|
+
When A user turns on the application the text is saved in that slate
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
#Developer : Mark Focella (m.focella@gmail.com)
|
64
|
+
#Date : February 17, 2014
|
65
|
+
|
@@ -0,0 +1,37 @@
|
|
1
|
+
Feature: passwords
|
2
|
+
|
3
|
+
Passwords are used to protect the security of the slates and settings. We need to make sure to give users help when they enter an invalid password. We also need to make sure the functionality is working correctly to protect the security of users data.
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
Scenario: Unlock general settings with super command
|
8
|
+
Given administrative password is set as Tau5slmper123ASD8809
|
9
|
+
And I enter super in the command line
|
10
|
+
And I enter Tau5slmper123ASD8809 in the password window
|
11
|
+
Then I should be able to open general settings
|
12
|
+
|
13
|
+
Scenario: Unlock new command with super command
|
14
|
+
Given administrative password is set as Tau5slmper123ASD8809
|
15
|
+
And I enter super in the command line
|
16
|
+
And I enter Tau5slmper123ASD8809 in the password window
|
17
|
+
Then I should be able to run new -s pinky
|
18
|
+
|
19
|
+
Scenario: Enter general settings by click with correct password
|
20
|
+
Given administrative password is set as Tau5slmper123ASD8809
|
21
|
+
And I click general settings
|
22
|
+
And I enter Tau5slmper123ASD8809 at popup window
|
23
|
+
Then I get general settings window
|
24
|
+
|
25
|
+
Scenario: Block general settings with super command
|
26
|
+
|
27
|
+
Scenario: Block new command with super command
|
28
|
+
|
29
|
+
Scenario: Block general settings with click
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
#Developer : Mark Focella (m.focella@gmail.com)
|
36
|
+
#Date : February 17, 2014
|
37
|
+
|
@@ -0,0 +1,142 @@
|
|
1
|
+
#have trouble getting files to see and use my modules
|
2
|
+
#require_relative '../../lib/Exercitus_romanorum.rb'
|
3
|
+
#include Exercitus_romanorum
|
4
|
+
#require_relative '../../db/Quarrier.rb'
|
5
|
+
#include Quarrier
|
6
|
+
#require 'green_shoes'
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
=begin
|
12
|
+
Transform /^table:command,option1,option2,option3,response$/ do |table|
|
13
|
+
table.hashes.map do |hash|
|
14
|
+
fullcommand = Fullcommand.create!({:command => hash["command"],
|
15
|
+
:option1 => hash["option1"],
|
16
|
+
:option2 => hash["option2"],
|
17
|
+
:option2 => hash["option3"]})
|
18
|
+
response = Response.create!({:text => hash["response"]})
|
19
|
+
{:fullcommand => fullcommand, :response => response}
|
20
|
+
end
|
21
|
+
end
|
22
|
+
=end
|
23
|
+
|
24
|
+
require 'test/unit'
|
25
|
+
include Test::Unit::Assertions
|
26
|
+
#require_relative '../../lib/Exercitus_romanorum.rb'
|
27
|
+
#include Exercitus_romanorum
|
28
|
+
|
29
|
+
|
30
|
+
#assert_equal 'green', 'cucumber'
|
31
|
+
|
32
|
+
|
33
|
+
When /^I run the command, I should get the following response$/ do |table|
|
34
|
+
table.map_column!("command") do |cmd|
|
35
|
+
@all_commands = []
|
36
|
+
cmd.each do |cc|
|
37
|
+
@all_commands << "#{cc}"
|
38
|
+
end
|
39
|
+
@all_commands.each do |command|
|
40
|
+
rsp = get_command("#{command}")
|
41
|
+
puts "response is #{rsp}"
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
|
46
|
+
table.map_column!("response") do |resp|
|
47
|
+
@correct_responses = []
|
48
|
+
@correct_responses << "#{resp}"
|
49
|
+
end
|
50
|
+
|
51
|
+
@i = 0
|
52
|
+
@j = 0
|
53
|
+
|
54
|
+
loop do
|
55
|
+
command = @all_commands[@i]
|
56
|
+
response = @correct_responses[@j]
|
57
|
+
|
58
|
+
if command == nil then
|
59
|
+
break
|
60
|
+
end
|
61
|
+
|
62
|
+
if command == response
|
63
|
+
puts "Pass! The command: #{command} test passed!"
|
64
|
+
else
|
65
|
+
puts "Fail! The command: #{command} test failed!"
|
66
|
+
end
|
67
|
+
|
68
|
+
@i += 1
|
69
|
+
@j += 1
|
70
|
+
end
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
end
|
76
|
+
|
77
|
+
#do a while command =! nil for below loop
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
=begin
|
82
|
+
table.hashes.each do |hash|
|
83
|
+
command = hash["command"]
|
84
|
+
#run the command variable through the Exercitus_romanorum method which parses and responds with the command response
|
85
|
+
# actual_response = get_command("#{command}")
|
86
|
+
responds = hash["response"]
|
87
|
+
if acutual_response == responds
|
88
|
+
#passes the test
|
89
|
+
else
|
90
|
+
#fails the test
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
|
95
|
+
table.each do |group|
|
96
|
+
completecommand = group[:fullcommand]
|
97
|
+
#include the Exercitus_romanorum.rb module and run the method to take in a command giving that method completecommand and matching up that response to the correctresponse
|
98
|
+
correctresponse = group[:response]
|
99
|
+
#run each command and make sure it matches each response
|
100
|
+
end
|
101
|
+
end
|
102
|
+
=end
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
=begin
|
111
|
+
|
112
|
+
|
113
|
+
@all_commands = [ "table", "chair", "house", "cat" ]
|
114
|
+
@correct_responses = [ "table", "Chair", "house", "cat" ]
|
115
|
+
|
116
|
+
@i = 0
|
117
|
+
@j = 0
|
118
|
+
|
119
|
+
loop do
|
120
|
+
|
121
|
+
command = @all_commands[@i]
|
122
|
+
response = @correct_responses[@j]
|
123
|
+
|
124
|
+
if command == nil then
|
125
|
+
break
|
126
|
+
end
|
127
|
+
|
128
|
+
if command == response
|
129
|
+
puts "Pass! The command: #{command} test passed!"
|
130
|
+
else
|
131
|
+
puts "Fail! The command: #{command} test failed!"
|
132
|
+
end
|
133
|
+
|
134
|
+
@i += 1
|
135
|
+
@j += 1
|
136
|
+
end
|
137
|
+
|
138
|
+
=end
|
139
|
+
|
140
|
+
#Developer : Mark Focella (m.focella@gmail.com)
|
141
|
+
#Date : February 17, 2014
|
142
|
+
|