Skip to content

Commit 9b7a61b

Browse files
committed
Update rspec, unit test and gemspec
Updated simplecov and rspec coverage, unit test directory and gemspec files
1 parent bba9d23 commit 9b7a61b

20 files changed

+73
-163
lines changed

.gitignore

Lines changed: 6 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,11 @@
1-
*.gem
2-
*.rbc
3-
/.config
1+
/.bundle/
2+
/.yardoc
3+
/_yardoc/
44
/coverage/
5-
/InstalledFiles
5+
/doc/
66
/pkg/
77
/spec/reports/
8-
/spec/examples.txt
9-
/test/tmp/
10-
/test/version_tmp/
118
/tmp/
129

13-
# Used by dotenv library to load environment variables.
14-
# .env
15-
16-
## Specific to RubyMotion:
17-
.dat*
18-
.repl_history
19-
build/
20-
*.bridgesupport
21-
build-iPhoneOS/
22-
build-iPhoneSimulator/
23-
24-
## Specific to RubyMotion (use of CocoaPods):
25-
#
26-
# We recommend against adding the Pods directory to your .gitignore. However
27-
# you should judge for yourself, the pros and cons are mentioned at:
28-
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
29-
#
30-
# vendor/Pods/
31-
32-
## Documentation cache and generated files:
33-
/.yardoc/
34-
/_yardoc/
35-
/doc/
36-
/rdoc/
37-
38-
## Environment normalization:
39-
/.bundle/
40-
/vendor/bundle
41-
/lib/bundler/man/
42-
43-
# for a library or gem, you might want to ignore these files since the code is
44-
# intended to run in multiple environments; otherwise, check them in:
45-
# Gemfile.lock
46-
# .ruby-version
47-
# .ruby-gemset
48-
49-
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
50-
.rvmrc
10+
# rspec failure tracking
11+
.rspec_status

.rspec

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

.simplecov

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

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
sudo: false
22
language: ruby
33
rvm:
4-
- 2.3.3
4+
- 2.2.0
55
before_install: gem install bundler -v 1.16.1

Gemfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
source "https://rubygems.org"
1+
source 'https://rubygems.org'
22

3-
git_source(:github) {|repo_name| "https://github.com/opensocket" }
3+
git_source(:github) { |_repo_name| 'https://github.com/opensocket' }
44

55
# Specify your gem's dependencies in socketclusterclient.gemspec
66
gemspec
77

88
gem 'websocket-eventmachine-client'
9+
10+
gem 'rspec', :require => false, :group => :test
11+
gem 'simplecov', :require => false, :group => :test

Gemfile.lock

Lines changed: 0 additions & 54 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# socketcluster-client-ruby
22
A Ruby client for socketcluster.io
33

4+
In `lib/socketclusterclient`, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file . To experiment with that code, run `bin/console` for an interactive prompt.
5+
46
Refer below examples for more details.
57

68
Overview
@@ -177,7 +179,7 @@ Implementing Pub-Sub via channels
177179

178180
```ruby
179181
# Get all subscribed channel
180-
channels = socket.get_subscribed_channels
182+
channels = socket.subscribed_channels
181183
```
182184

183185
#### Publishing an event on channel

Rakefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
require "bundler/gem_tasks"
2-
require "rspec/core/rake_task"
1+
require 'bundler/gem_tasks'
2+
require 'rspec/core/rake_task'
33

44
RSpec::Core::RakeTask.new(:spec)
55

6-
task :default => :spec
6+
task default: :spec

bin/console

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env ruby
22

3-
require "bundler/setup"
4-
require "socketclusterclient"
3+
require 'bundler/setup'
4+
require 'socketclusterclient'
55

66
# You can add fixtures and/or initialization code here to make experimenting
77
# with your gem easier. You can also use a different console, if you like.
@@ -10,5 +10,5 @@ require "socketclusterclient"
1010
# require "pry"
1111
# Pry.start
1212

13-
require "irb"
13+
require 'irb'
1414
IRB.start(__FILE__)

bin/setup

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,3 @@ IFS=$'\n\t'
44
set -vx
55

66
bundle install
7-
8-
# Do any other automated setup that you need to do here

0 commit comments

Comments
 (0)