attention 0.0.2 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7a3c5fb2f9ae19b5dcfb4eb7fff6d17dc33cdc4a
4
- data.tar.gz: d7adfc321e1f26471f6f1f0d4099b06136ae92fe
3
+ metadata.gz: 16f86de6c9b4a607464f0afeaabf83bac4da4233
4
+ data.tar.gz: 218537184baba2c724081e3155aa5395d6836963
5
5
  SHA512:
6
- metadata.gz: b53f4dde91d7de78f85e826d92dce285b79e8536e29af80df9b31f77befa88e54d6962bc8413225cdc510f2b62d7bcd3c89ae923d77176cc32dd6bb2685b7f48
7
- data.tar.gz: 6beac8bb89eaf9b221b31f4cb220da1c125950462037c089110dafbb319e7a7cbd0239b04e27f70ca763ba345c7883ccd77882f017c031d7b3b9d30e3b33333e
6
+ metadata.gz: dfb480598a2b9b2de9a5964f46ba952ae131204ff2775774312a99793d13786c32645739019f07432c04f1c49cc25e8b6ec20434e48e0de7cb686f16afb5cc44
7
+ data.tar.gz: 687ee887672860e6d81f9a2d1d70514dc19a89a24b98468cee27202b05ce7e393338e7e1ee8677c5fc1cd89afabcf9bc1629e70c74579cbbee821a5a1c01bf5f
data/.travis.yml CHANGED
@@ -2,11 +2,7 @@ language: ruby
2
2
  sudo: false
3
3
  cache: bundler
4
4
  rvm:
5
- - 1.9.3
6
5
  - 2.2.3
7
- - jruby-19mode
8
6
  before_install: gem install bundler -v 1.11.2
9
7
  services:
10
8
  - redis-server
11
- jruby_before_script:
12
- - bundle exec jbundle install
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Attention
2
2
 
3
- [![Build Status](https://travis-ci.org/parrish/Attention.svg?branch=master)](https://travis-ci.org/parrish/Attention)
4
- [![Test Coverage](https://codeclimate.com/github/parrish/Attention/badges/coverage.svg)](https://codeclimate.com/github/parrish/Attention)
5
- [![Code Climate](https://codeclimate.com/github/parrish/Attention/badges/gpa.svg)](https://codeclimate.com/github/parrish/Attention)
3
+ [![Build Status](https://travis-ci.org/parrish/attention.svg?branch=master)](https://travis-ci.org/parrish/attention)
4
+ [![Test Coverage](https://codeclimate.com/github/parrish/attention/badges/coverage.svg)](https://codeclimate.com/github/parrish/attention)
5
+ [![Code Climate](https://codeclimate.com/github/parrish/attention/badges/gpa.svg)](https://codeclimate.com/github/parrish/attention)
6
6
  [![Gem Version](https://badge.fury.io/rb/attention.svg)](http://badge.fury.io/rb/attention)
7
7
 
8
8
  Redis-based server awareness for distributed applications
data/attention.gemspec CHANGED
@@ -30,4 +30,5 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency 'pry', '~> 0.10'
31
31
  spec.add_development_dependency 'guard-rspec', '~> 4.5'
32
32
  spec.add_development_dependency 'yard'
33
+ spec.add_development_dependency 'codeclimate-test-reporter'
33
34
  end
data/lib/attention.rb CHANGED
@@ -41,11 +41,12 @@ module Attention
41
41
  # Publishes this server {Instance}
42
42
  # @param ip [String] Optionally override the IP of the server
43
43
  # @param port [Fixnum, Numeric] Optionally specify the port of the server
44
+ # @return [Instance] This server instance
44
45
  # @see Instance#publish
45
46
  def self.activate(ip: nil, port: nil)
46
- return if @instance
47
- @instance = Instance.new ip: ip, port: port
47
+ @instance ||= Instance.new ip: ip, port: port
48
48
  instance.publish
49
+ instance
49
50
  end
50
51
 
51
52
  # Unpublishes this server {Instance}
@@ -1,3 +1,3 @@
1
1
  module Attention
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attention
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Parrish
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-12-30 00:00:00.000000000 Z
11
+ date: 2016-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
@@ -150,6 +150,20 @@ dependencies:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: codeclimate-test-reporter
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
153
167
  description: Redis-based server awareness for distributed applications
154
168
  email:
155
169
  - michael@zooniverse.org