whatup 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.git_hooks/pre-commit +6 -0
- data/.gitignore +7 -0
- data/.rubocop.yml +39 -0
- data/.ruby-version +1 -0
- data/Gemfile +1 -2
- data/README.md +36 -1
- data/docs/hw/inital_design.md +138 -0
- data/docs/installing_ruby.md +23 -0
- data/exe/whatup +1 -1
- data/lib/whatup/cli.rb +55 -5
- data/lib/whatup/client.rb +61 -0
- data/lib/whatup/server.rb +83 -0
- data/lib/whatup/version.rb +1 -1
- data/lib/whatup.rb +4 -2
- data/whatup.gemspec +12 -4
- metadata +55 -9
- data/Gemfile.lock +0 -46
- data/LICENSE.txt +0 -21
- /data/docs/{assignment.pdf → hw/assignment.pdf} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e77a298339294647aca70949faf47f51c2202fe5ebf00ced22bdace460796ad5
|
4
|
+
data.tar.gz: 9974c515c6aedfa6e93017d73ed6d31955fdfd796f602332240f23e99f03d73e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4a32f88d88ae37728137e99f269b5a9d0ef8e775f975c08b778c363077c98001fcf72a07bf7c1195400023ce602cdddb969e45c613292faf4fb20b166d6110e
|
7
|
+
data.tar.gz: 4c61c89b2afaf46df082868521a7d6a09e27e7f91e129169308679783a2a4327aeb2e497a4918e29a9e7da2ff6d0e045000faa01e4de37b342da28908c561b8b
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,3 +1,42 @@
|
|
1
|
+
# Rubocop linting options
|
2
|
+
|
3
|
+
AllCops:
|
4
|
+
TargetRubyVersion: 2.4 # Modern Ruby
|
5
|
+
|
6
|
+
# Gemspecs are just a giant block, anyway
|
1
7
|
Metrics/BlockLength:
|
2
8
|
Exclude:
|
3
9
|
- 'whatup.gemspec'
|
10
|
+
|
11
|
+
Metrics/MethodLength:
|
12
|
+
Max: 20 # 10 is a bit too low
|
13
|
+
|
14
|
+
# Don't type unneccesary ()
|
15
|
+
Style/MethodDefParentheses:
|
16
|
+
EnforcedStyle: require_no_parentheses
|
17
|
+
|
18
|
+
# { } for blocks, {} for hashes
|
19
|
+
Layout/SpaceInsideHashLiteralBraces:
|
20
|
+
EnforcedStyle: no_space
|
21
|
+
|
22
|
+
# while line = gets do
|
23
|
+
# ...
|
24
|
+
# end
|
25
|
+
Lint/AssignmentInCondition:
|
26
|
+
Enabled: false
|
27
|
+
|
28
|
+
# outcome = some_really_long_event \
|
29
|
+
# ? choice_a
|
30
|
+
# : choice_a
|
31
|
+
Style/MultilineTernaryOperator:
|
32
|
+
Enabled: false
|
33
|
+
|
34
|
+
# Encouraging a comment above every single module or class oftentimes leads to
|
35
|
+
# redundant comments that are odds with the design principle of writing
|
36
|
+
# simple, readable code
|
37
|
+
Style/Documentation:
|
38
|
+
Enabled: false
|
39
|
+
|
40
|
+
# [a, b, c].map &:to_f
|
41
|
+
Lint/AmbiguousOperator:
|
42
|
+
Enabled: false
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.6.1
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -2,24 +2,53 @@
|
|
2
2
|
|
3
3
|
whatup is a simple server-based instant messaging application
|
4
4
|
|
5
|
+
**Note**: this is very much a work-in-progress, and will be until version `1.0.0`
|
6
|
+
|
5
7
|
## Installation
|
6
8
|
|
9
|
+
Assuming you have Ruby `2.6.1` installed,
|
10
|
+
|
7
11
|
```
|
8
|
-
gem install whatup
|
12
|
+
$ gem install whatup
|
9
13
|
```
|
10
14
|
|
15
|
+
If you don't have Ruby `2.6.1` installed, see [here](docs/installing_ruby.md)
|
16
|
+
for some brief instructions.
|
17
|
+
|
11
18
|
## Usage
|
12
19
|
|
13
20
|
```
|
14
21
|
$ whatup
|
15
22
|
|
16
23
|
Commands:
|
24
|
+
whatup client ... # Perform client commands
|
17
25
|
whatup hello # Says hello
|
18
26
|
whatup help [COMMAND] # Describe available commands or one specific command
|
27
|
+
whatup server ... # Perform server commands
|
19
28
|
```
|
20
29
|
|
21
30
|
## Development
|
22
31
|
|
32
|
+
To run the program's command line interface
|
33
|
+
|
34
|
+
```
|
35
|
+
$ ruby -I./lib ./exe/whatup
|
36
|
+
```
|
37
|
+
|
38
|
+
To run the tests
|
39
|
+
|
40
|
+
```
|
41
|
+
$ bundle exec rspec
|
42
|
+
```
|
43
|
+
|
44
|
+
We have a git hook to automatically run the code linter before committing.
|
45
|
+
|
46
|
+
Set it up as follows
|
47
|
+
|
48
|
+
```
|
49
|
+
$ git config core.hooksPath '.git_hooks'
|
50
|
+
```
|
51
|
+
|
23
52
|
## Contributing
|
24
53
|
|
25
54
|
Bug reports and pull requests are welcome on GitHub at <https://github.com/jethrodaniel/whatup>.
|
@@ -32,3 +61,9 @@ Free as in beer - our [license](https://github.com/jethrodaniel/whatup/blob/mast
|
|
32
61
|
|
33
62
|
This was part of a school project - see the [course site](http://www.cs.memphis.edu/~kanyang/COMP3825-sp19.html) for details.
|
34
63
|
|
64
|
+
## Citations
|
65
|
+
|
66
|
+
The following were instrumental in understanding the usage of threads for socket input:
|
67
|
+
|
68
|
+
- [Socket Programming in Ruby](https://code.likeagirl.io/socket-programming-in-ruby-f714131336fd),Chopra, Neha. Code Like A Girl. (19 Sept. 2017)
|
69
|
+
- [Ruby TCP Chat](www.sitepoint.com/ruby-tcp-chat/), Benitez, Simon. Sitepoint. (13 Jan. 2014)
|
@@ -0,0 +1,138 @@
|
|
1
|
+
# Inital Design
|
2
|
+
|
3
|
+
whatup is a simple server-based instant messaging application utilizing TCP sockets.
|
4
|
+
|
5
|
+
## Language
|
6
|
+
|
7
|
+
It is written in [Ruby](https://www.ruby-lang.org/en/), a general purpose OOP
|
8
|
+
programming language, similar to Python.
|
9
|
+
|
10
|
+
## Packaging, Installation
|
11
|
+
|
12
|
+
It is packaged as a [gem](https://guides.rubygems.org/), which is the idiomatic Ruby way to publish code.
|
13
|
+
|
14
|
+
This allows for a very simple setup (as follows):
|
15
|
+
|
16
|
+
```
|
17
|
+
$ gem install whatup
|
18
|
+
```
|
19
|
+
|
20
|
+
## Command Line Interface
|
21
|
+
|
22
|
+
While the code is written in Ruby, the program interacts with the user via a
|
23
|
+
command line interface.
|
24
|
+
|
25
|
+
```
|
26
|
+
$ whatup
|
27
|
+
Commands:
|
28
|
+
whatup client ... # Perform client commands
|
29
|
+
whatup hello # Says hello
|
30
|
+
whatup help [COMMAND] # Describe available commands or one specific command
|
31
|
+
whatup server ... # Perform server commands
|
32
|
+
```
|
33
|
+
|
34
|
+
## Server
|
35
|
+
|
36
|
+
The server implements a basic TCP socket, and listens on port 9001 (or another
|
37
|
+
optional port) for requests, which will be routed to TCP sockets.
|
38
|
+
|
39
|
+
When the server recieves a client connection, it starts a new thread and assigns a unique id
|
40
|
+
to the client by a random number and a user provided name.
|
41
|
+
|
42
|
+
Multiple clients can connect, since the server starts a new thread for each connection.
|
43
|
+
|
44
|
+
```
|
45
|
+
$ whatup server
|
46
|
+
|
47
|
+
Commands:
|
48
|
+
whatup server help [COMMAND] # Describe subcommands or one specific subcommand
|
49
|
+
whatup server start # Starts a server instance
|
50
|
+
|
51
|
+
$ whatup server help start
|
52
|
+
|
53
|
+
Usage:
|
54
|
+
whatup server start
|
55
|
+
|
56
|
+
Options:
|
57
|
+
[--port=N]
|
58
|
+
# Default: 9001
|
59
|
+
|
60
|
+
Description:
|
61
|
+
Starts a server instance on the specified port.
|
62
|
+
```
|
63
|
+
|
64
|
+
## Client
|
65
|
+
|
66
|
+
A client connects to the server via one of the server's TCP sockets.
|
67
|
+
|
68
|
+
When the client connects, it is asked to provide a username, which will be
|
69
|
+
combined with a random number to produce a unique identifier for the client.
|
70
|
+
|
71
|
+
The client, when connected, can ask the server for a list of other connected
|
72
|
+
clients, and can then choose to chat with any other client.
|
73
|
+
|
74
|
+
```
|
75
|
+
$ whatup client
|
76
|
+
|
77
|
+
Commands:
|
78
|
+
whatup client connect # Connects a new client instance to a server
|
79
|
+
whatup client help [COMMAND] # Describe subcommands or one specific subcommand
|
80
|
+
|
81
|
+
$ whatup client help start
|
82
|
+
|
83
|
+
Usage:
|
84
|
+
whatup client connect
|
85
|
+
|
86
|
+
Options:
|
87
|
+
[--ip=IP]
|
88
|
+
# Default: localhost
|
89
|
+
[--port=N]
|
90
|
+
# Default: 9001
|
91
|
+
|
92
|
+
Description:
|
93
|
+
Starts a client instance sending requests to the specified ip and port.
|
94
|
+
```
|
95
|
+
|
96
|
+
For example,
|
97
|
+
|
98
|
+
```
|
99
|
+
$ whatup client connect --ip 12.345.67.890 --port 9001
|
100
|
+
|
101
|
+
Connecting to ...
|
102
|
+
Connected successfully to ..
|
103
|
+
|
104
|
+
Please enter your username:
|
105
|
+
|
106
|
+
> john_doe
|
107
|
+
|
108
|
+
Congrats, your username is `john_doe#123`!
|
109
|
+
|
110
|
+
Type `help` for a list of available commands.
|
111
|
+
|
112
|
+
> help
|
113
|
+
|
114
|
+
list # See a list of clients you can chat with
|
115
|
+
chat # Starts a chat with the specified client
|
116
|
+
exit # Closes your connection with the server
|
117
|
+
|
118
|
+
> list
|
119
|
+
|
120
|
+
1. jane_doe#123
|
121
|
+
2. mary#321
|
122
|
+
|
123
|
+
> chat 1
|
124
|
+
|
125
|
+
You're now chatting with `jane_doe#123`. Say hi! See `.help` for help.
|
126
|
+
|
127
|
+
john_doe#123> hi
|
128
|
+
jane_doe#123> hey, I'm jane doe!
|
129
|
+
john_doe#123> .exit
|
130
|
+
|
131
|
+
Diconnected from `jane_doe#123`.
|
132
|
+
|
133
|
+
> exit
|
134
|
+
|
135
|
+
Goodbye!
|
136
|
+
```
|
137
|
+
|
138
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Installing Ruby
|
2
|
+
|
3
|
+
There are a variety of ways to download Ruby, see
|
4
|
+
[their download](https://www.ruby-lang.org/en/downloads/) page for some
|
5
|
+
suggestions.
|
6
|
+
|
7
|
+
**Note**:
|
8
|
+
|
9
|
+
We're using the newest, fanciest Ruby (`2.6.1`), so be sure to install it.
|
10
|
+
|
11
|
+
Many OS package managers don't have it yet, though, so you're encouraged to
|
12
|
+
use [rbenv](https://github.com/rbenv/rbenv), a Ruby version manager.
|
13
|
+
|
14
|
+
|
15
|
+
[TL;DR - use rbenv](https://github.com/rbenv/rbenv-installer#rbenv-installer).
|
16
|
+
|
17
|
+
If you're using rbenv (or followed the above link)
|
18
|
+
|
19
|
+
To install Ruby
|
20
|
+
|
21
|
+
```
|
22
|
+
$ rbenv install 2.6.1
|
23
|
+
```
|
data/exe/whatup
CHANGED
data/lib/whatup/cli.rb
CHANGED
@@ -2,10 +2,60 @@
|
|
2
2
|
|
3
3
|
require 'thor'
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
require 'whatup/server'
|
6
|
+
require 'whatup/client'
|
7
|
+
|
8
|
+
module Whatup
|
9
|
+
# Thor command classes for the cli.
|
10
|
+
# For usage, see <http://whatisthor.com/>
|
11
|
+
module CLI
|
12
|
+
# Client commands
|
13
|
+
class Client < Thor
|
14
|
+
option :ip, type: :string, default: 'localhost'
|
15
|
+
option :port, type: :numeric, default: 9_001
|
16
|
+
long_desc <<~DESC
|
17
|
+
Starts a client instance sending requests to the specified ip and port.
|
18
|
+
DESC
|
19
|
+
desc 'connect', 'Connects a new client instance to a server'
|
20
|
+
def connect
|
21
|
+
Whatup::Client.new(ip: options[:ip], port: options[:port]).connect
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
# Server commands
|
26
|
+
class Server < Thor
|
27
|
+
option :port, type: :numeric, default: 9_001
|
28
|
+
desc 'start', 'Starts a server instance'
|
29
|
+
long_desc <<~DESC
|
30
|
+
Starts a server instance running locally on the specified port.
|
31
|
+
DESC
|
32
|
+
def start
|
33
|
+
Whatup::Server.new(port: options[:port]).start
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# Top-level command class
|
38
|
+
class CLI < Thor
|
39
|
+
desc 'hello', 'Says hello'
|
40
|
+
def hello
|
41
|
+
say "Hello!\n", :cyan
|
42
|
+
end
|
43
|
+
|
44
|
+
desc 'server ...', 'Perform server commands'
|
45
|
+
long_desc <<~DESC
|
46
|
+
Perform server commands.
|
47
|
+
|
48
|
+
See `whatup server help COMMAND` for help on `COMMAND`.
|
49
|
+
DESC
|
50
|
+
subcommand 'server', Server
|
51
|
+
|
52
|
+
desc 'client ...', 'Perform client commands'
|
53
|
+
long_desc <<~DESC
|
54
|
+
Perform client commands.
|
55
|
+
|
56
|
+
See `whatup client help COMMAND` for help on `COMMAND`.
|
57
|
+
DESC
|
58
|
+
subcommand 'client', Client
|
59
|
+
end
|
10
60
|
end
|
11
61
|
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'socket'
|
4
|
+
|
5
|
+
module Whatup
|
6
|
+
class Client
|
7
|
+
include Thor::Shell
|
8
|
+
|
9
|
+
def initialize ip:, port:
|
10
|
+
@dest = {
|
11
|
+
ip: ip,
|
12
|
+
port: port,
|
13
|
+
address: "#{@ip}:#{@port}"
|
14
|
+
}
|
15
|
+
end
|
16
|
+
|
17
|
+
def connect
|
18
|
+
say "Connecting to #{@dest[:ip]}:#{@dest[:port]} ..."
|
19
|
+
|
20
|
+
@socket = TCPSocket.open @dest[:ip], @dest[:port]
|
21
|
+
|
22
|
+
@request = request!
|
23
|
+
@response = listen!
|
24
|
+
|
25
|
+
[@request, @response].each &:join
|
26
|
+
rescue SignalException
|
27
|
+
say 'Exiting ...', :red
|
28
|
+
exit
|
29
|
+
end
|
30
|
+
|
31
|
+
def request!
|
32
|
+
puts 'Please enter your username to establish a connection...'
|
33
|
+
begin
|
34
|
+
Thread.new do
|
35
|
+
loop do
|
36
|
+
message = $stdin.gets.chomp
|
37
|
+
@socket.puts message
|
38
|
+
end
|
39
|
+
end
|
40
|
+
rescue IOError => e
|
41
|
+
puts e.message
|
42
|
+
# e.backtrace
|
43
|
+
@socket.close
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def listen!
|
48
|
+
Thread.new do
|
49
|
+
loop do
|
50
|
+
response = @socket.gets.chomp
|
51
|
+
puts response.to_s
|
52
|
+
@socket.close if response.eql? 'quit'
|
53
|
+
end
|
54
|
+
end
|
55
|
+
rescue IOError => e
|
56
|
+
puts e.message
|
57
|
+
# e.backtrace
|
58
|
+
@socket.close
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'socket'
|
4
|
+
require 'fileutils'
|
5
|
+
|
6
|
+
module Whatup
|
7
|
+
class Server
|
8
|
+
include Thor::Shell
|
9
|
+
|
10
|
+
def initialize port:
|
11
|
+
@ip = 'localhost'
|
12
|
+
@port = port
|
13
|
+
@address = "#{@ip}:#{@port}"
|
14
|
+
|
15
|
+
@pid = Process.pid
|
16
|
+
|
17
|
+
@pid_file = "#{Dir.home}/.whatup.pid"
|
18
|
+
end
|
19
|
+
|
20
|
+
def start
|
21
|
+
say "Starting a server with PID:#{@pid} @ #{@address} ... \n", :green
|
22
|
+
|
23
|
+
exit_if_pid_exists!
|
24
|
+
connect_to_socket!
|
25
|
+
write_pid!
|
26
|
+
|
27
|
+
# Listen for connections, then accept each in a separate thread
|
28
|
+
loop do
|
29
|
+
Thread.new @socket.accept do |client|
|
30
|
+
handle_client client
|
31
|
+
end
|
32
|
+
end
|
33
|
+
rescue SignalException
|
34
|
+
kill
|
35
|
+
end
|
36
|
+
|
37
|
+
private
|
38
|
+
|
39
|
+
def handle_client client
|
40
|
+
name = client.gets.chomp
|
41
|
+
puts "#{name} just showed up!"
|
42
|
+
client.puts "Hello, #{name}!"
|
43
|
+
|
44
|
+
client.puts 'Sending you the time ...'
|
45
|
+
|
46
|
+
loop do
|
47
|
+
client.puts Time.now
|
48
|
+
sleep 1
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def exit_if_pid_exists!
|
53
|
+
return unless running?
|
54
|
+
|
55
|
+
say <<~EXIT, :cyan
|
56
|
+
A server appears to already be running!
|
57
|
+
Check `#{@pid_file}`.
|
58
|
+
EXIT
|
59
|
+
|
60
|
+
kill
|
61
|
+
end
|
62
|
+
|
63
|
+
def connect_to_socket!
|
64
|
+
@socket = TCPServer.open @port
|
65
|
+
rescue Errno::EADDRINUSE
|
66
|
+
puts 'Address already in use!'
|
67
|
+
kill
|
68
|
+
end
|
69
|
+
|
70
|
+
def write_pid!
|
71
|
+
File.open(@pid_file, 'w') { |f| f.puts Process.pid }
|
72
|
+
end
|
73
|
+
|
74
|
+
def running?
|
75
|
+
File.file? @pid_file
|
76
|
+
end
|
77
|
+
|
78
|
+
def kill
|
79
|
+
say "Killing the server with PID:#{Process.pid} ...", :red
|
80
|
+
FileUtils.rm_rf @pid_file
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
data/lib/whatup/version.rb
CHANGED
data/lib/whatup.rb
CHANGED
data/whatup.gemspec
CHANGED
@@ -40,12 +40,20 @@ Gem::Specification.new do |spec|
|
|
40
40
|
spec.require_paths = ['lib']
|
41
41
|
|
42
42
|
{
|
43
|
-
'pry'
|
43
|
+
'pry' => '~> 0.12.2',
|
44
|
+
'pry-byebug' => '~> 3.7',
|
44
45
|
'bundler' => '~> 2.0',
|
45
|
-
'rake'
|
46
|
-
'rspec'
|
47
|
-
'
|
46
|
+
'rake' => '~> 12.3.2',
|
47
|
+
'rspec' => '~> 3.8',
|
48
|
+
'yard' => '~> 0.9.18',
|
49
|
+
'rubocop' => '~> 0.65.0'
|
48
50
|
}.each do |gem, version|
|
49
51
|
spec.add_development_dependency gem, version
|
50
52
|
end
|
53
|
+
|
54
|
+
{
|
55
|
+
'thor' => '~> 0.20.3'
|
56
|
+
}.each do |gem, version|
|
57
|
+
spec.add_dependency gem, version
|
58
|
+
end
|
51
59
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: whatup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Delk
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.12.2
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pry-byebug
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.7'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.7'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +58,14 @@ dependencies:
|
|
44
58
|
requirements:
|
45
59
|
- - "~>"
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
61
|
+
version: 12.3.2
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
66
|
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
68
|
+
version: 12.3.2
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rspec
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,6 +80,34 @@ dependencies:
|
|
66
80
|
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '3.8'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: yard
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.9.18
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.9.18
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.65.0
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.65.0
|
69
111
|
- !ruby/object:Gem::Dependency
|
70
112
|
name: thor
|
71
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,7 +115,7 @@ dependencies:
|
|
73
115
|
- - "~>"
|
74
116
|
- !ruby/object:Gem::Version
|
75
117
|
version: 0.20.3
|
76
|
-
type: :
|
118
|
+
type: :runtime
|
77
119
|
prerelease: false
|
78
120
|
version_requirements: !ruby/object:Gem::Requirement
|
79
121
|
requirements:
|
@@ -88,22 +130,26 @@ executables:
|
|
88
130
|
extensions: []
|
89
131
|
extra_rdoc_files: []
|
90
132
|
files:
|
133
|
+
- ".git_hooks/pre-commit"
|
91
134
|
- ".gitignore"
|
92
135
|
- ".rspec"
|
93
136
|
- ".rubocop.yml"
|
137
|
+
- ".ruby-version"
|
94
138
|
- ".travis.yml"
|
95
139
|
- Gemfile
|
96
|
-
- Gemfile.lock
|
97
140
|
- LICENSE
|
98
|
-
- LICENSE.txt
|
99
141
|
- README.md
|
100
142
|
- Rakefile
|
101
143
|
- bin/console
|
102
144
|
- bin/setup
|
103
|
-
- docs/assignment.pdf
|
145
|
+
- docs/hw/assignment.pdf
|
146
|
+
- docs/hw/inital_design.md
|
147
|
+
- docs/installing_ruby.md
|
104
148
|
- exe/whatup
|
105
149
|
- lib/whatup.rb
|
106
150
|
- lib/whatup/cli.rb
|
151
|
+
- lib/whatup/client.rb
|
152
|
+
- lib/whatup/server.rb
|
107
153
|
- lib/whatup/version.rb
|
108
154
|
- whatup.gemspec
|
109
155
|
homepage: https://github.com/jethrodaniel/whatup
|
@@ -128,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
174
|
- !ruby/object:Gem::Version
|
129
175
|
version: '0'
|
130
176
|
requirements: []
|
131
|
-
rubygems_version: 3.0.
|
177
|
+
rubygems_version: 3.0.1
|
132
178
|
signing_key:
|
133
179
|
specification_version: 4
|
134
180
|
summary: A simple server-based instant messaging application
|
data/Gemfile.lock
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
whatup (0.1.0)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: https://rubygems.org/
|
8
|
-
specs:
|
9
|
-
coderay (1.1.2)
|
10
|
-
diff-lcs (1.3)
|
11
|
-
method_source (0.9.2)
|
12
|
-
pry (0.12.2)
|
13
|
-
coderay (~> 1.1.0)
|
14
|
-
method_source (~> 0.9.0)
|
15
|
-
rake (10.5.0)
|
16
|
-
rspec (3.8.0)
|
17
|
-
rspec-core (~> 3.8.0)
|
18
|
-
rspec-expectations (~> 3.8.0)
|
19
|
-
rspec-mocks (~> 3.8.0)
|
20
|
-
rspec-core (3.8.0)
|
21
|
-
rspec-support (~> 3.8.0)
|
22
|
-
rspec-expectations (3.8.2)
|
23
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
24
|
-
rspec-support (~> 3.8.0)
|
25
|
-
rspec-mocks (3.8.0)
|
26
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
27
|
-
rspec-support (~> 3.8.0)
|
28
|
-
rspec-support (3.8.0)
|
29
|
-
thor (0.20.3)
|
30
|
-
|
31
|
-
PLATFORMS
|
32
|
-
ruby
|
33
|
-
|
34
|
-
DEPENDENCIES
|
35
|
-
bundler (~> 2.0)
|
36
|
-
pry (~> 0.12.2)
|
37
|
-
rake (~> 10.0)
|
38
|
-
rspec (~> 3.8)
|
39
|
-
thor (~> 0.20.3)
|
40
|
-
whatup!
|
41
|
-
|
42
|
-
RUBY VERSION
|
43
|
-
ruby 2.5.3p105
|
44
|
-
|
45
|
-
BUNDLED WITH
|
46
|
-
2.0.1
|
data/LICENSE.txt
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2019 Mark Delk
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
File without changes
|