Skip to content

Commit bba9d23

Browse files
authored
Merge pull request #13 from OpenSocket/test
Unit tests for socketclusterclient and commands.txt
2 parents a60ab50 + 71b30b2 commit bba9d23

17 files changed

+637
-19
lines changed

.rspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--color

.simplecov

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SimpleCov.start do
2+
add_group 'lib', 'lib'
3+
end

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
sudo: false
2+
language: ruby
3+
rvm:
4+
- 2.3.3
5+
before_install: gem install bundler -v 1.16.1

Gemfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
source "http://rubygems.org"
1+
source "https://rubygems.org"
22

3+
git_source(:github) {|repo_name| "https://github.com/opensocket" }
4+
5+
# Specify your gem's dependencies in socketclusterclient.gemspec
36
gemspec
47

58
gem 'websocket-eventmachine-client'

Gemfile.lock

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
PATH
2+
remote: .
3+
specs:
4+
socketclusterclient (1.0.0)
5+
websocket-eventmachine-client (~> 1.2)
6+
7+
GEM
8+
remote: https://rubygems.org/
9+
specs:
10+
diff-lcs (1.3)
11+
docile (1.3.1)
12+
eventmachine (1.2.7)
13+
json (2.1.0)
14+
rake (10.5.0)
15+
rspec (3.7.0)
16+
rspec-core (~> 3.7.0)
17+
rspec-expectations (~> 3.7.0)
18+
rspec-mocks (~> 3.7.0)
19+
rspec-core (3.7.1)
20+
rspec-support (~> 3.7.0)
21+
rspec-expectations (3.7.0)
22+
diff-lcs (>= 1.2.0, < 2.0)
23+
rspec-support (~> 3.7.0)
24+
rspec-mocks (3.7.0)
25+
diff-lcs (>= 1.2.0, < 2.0)
26+
rspec-support (~> 3.7.0)
27+
rspec-support (3.7.1)
28+
simplecov (0.16.1)
29+
docile (~> 1.1)
30+
json (>= 1.8, < 3)
31+
simplecov-html (~> 0.10.0)
32+
simplecov-html (0.10.2)
33+
websocket (1.2.8)
34+
websocket-eventmachine-base (1.2.0)
35+
eventmachine (~> 1.0)
36+
websocket (~> 1.0)
37+
websocket-native (~> 1.0)
38+
websocket-eventmachine-client (1.2.0)
39+
websocket-eventmachine-base (~> 1.0)
40+
websocket-native (1.0.0)
41+
42+
PLATFORMS
43+
ruby
44+
45+
DEPENDENCIES
46+
bundler (~> 1.16)
47+
rake (~> 10.0)
48+
rspec (~> 3.0)
49+
simplecov
50+
socketclusterclient!
51+
websocket-eventmachine-client
52+
53+
BUNDLED WITH
54+
1.16.1

Rakefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
require "bundler/gem_tasks"
2+
require "rspec/core/rake_task"
3+
4+
RSpec::Core::RakeTask.new(:spec)
5+
6+
task :default => :spec

bin/console

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env ruby
2+
3+
require "bundler/setup"
4+
require "socketclusterclient"
5+
6+
# You can add fixtures and/or initialization code here to make experimenting
7+
# with your gem easier. You can also use a different console, if you like.
8+
9+
# (If you use this, don't forget to add pry to your Gemfile!)
10+
# require "pry"
11+
# Pry.start
12+
13+
require "irb"
14+
IRB.start(__FILE__)

bin/setup

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
IFS=$'\n\t'
4+
set -vx
5+
6+
bundle install
7+
8+
# Do any other automated setup that you need to do here

lib/socketclusterclient.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
require 'socketclusterclient/version'
2+
13
require_relative './sc_client'
24

35
#
46
# Module SocketclusterClient provides an interface for Socketcluster Client
57
#
68
# @author Maanav Shah <[email protected]>
79
#
8-
module SocketclusterClient
10+
module Socketclusterclient
911
end

lib/socketclusterclient/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
module SocketClusterClient
1+
module Socketclusterclient
22
VERSION = '1.0.0'.freeze
33
end

0 commit comments

Comments
 (0)