bixby-common 0.4.6 → 0.4.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 39054170ed94e55cc974daac3898201a2fe14e0d
4
- data.tar.gz: 4c7a6620976a1ca301468fa0b551adf60882855b
3
+ metadata.gz: 1935ac4b0aed266b6110771d3cef887840b0d9e2
4
+ data.tar.gz: 8068985903a36686952e551c742a77f1b5075be7
5
5
  SHA512:
6
- metadata.gz: 84cd88d7c9475996325333466a1e8b7a720d3c247d895db729fc5bece1300166b42242b19888b15fdb693fa3f474dd156376537fcf774aaad6445ac7106f733b
7
- data.tar.gz: 08c5799164a9d47049d5b077232d9ca7cc8155d957f9c7405476dbd3847dd3f40a35e92d1621f5206268cbcd904ae1fbf50112fb2bd87b301d24ed6eb7be7174
6
+ metadata.gz: 4e220383c3f2547177d5ae5c7aa4a11beb5c0148caf5daef1e83c4c484db91807b0e3d3f9ece26ae2ec57f38015fd8cd0e142538fafa98c7102136fb59ac1a72
7
+ data.tar.gz: d07c585cd54983f237f74795c97d5ab316535b25e160338d0f2ce00cb186b32ecc691eac884c3843b498c93d508c261b856a45aec8c5d276612467bbf1318b3d
data/.coveralls.yml ADDED
@@ -0,0 +1 @@
1
+ service_name: travis-ci
data/.travis.yml ADDED
@@ -0,0 +1,11 @@
1
+ language: ruby
2
+ script: "bundle exec micron test/"
3
+ after_script: "rake coveralls"
4
+
5
+ rvm:
6
+ - 2.0.0
7
+ - 1.9.3
8
+
9
+ branches:
10
+ only:
11
+ - master
data/Gemfile CHANGED
@@ -27,6 +27,7 @@ group :development do
27
27
  gem "test_guard", :git => "https://github.com/chetan/test_guard.git"
28
28
  gem "easycov", :github => "chetan/easycov"
29
29
  gem "micron", :github => "chetan/micron"
30
+ gem "coveralls", :require => false
30
31
 
31
32
  gem 'rb-inotify', :require => false
32
33
  gem 'rb-fsevent', :require => false
data/Gemfile.lock CHANGED
@@ -1,14 +1,16 @@
1
1
  GIT
2
2
  remote: git://github.com/chetan/easycov.git
3
- revision: 875b981d5cded29263e07a3410845dc56a5dfa30
3
+ revision: a4093b140a0adfbaea1c9b55c42a5c7629317025
4
4
  specs:
5
- easycov (0.2.0)
5
+ easycov (0.3.1)
6
6
  multi_json
7
7
  simplecov
8
+ simplecov-console
9
+ simplecov-html
8
10
 
9
11
  GIT
10
12
  remote: git://github.com/chetan/micron.git
11
- revision: 14442584d89b503d6691ac15e0dba38b207b100a
13
+ revision: 95399129ce8908484ed92a0de3a7e0ce83d99d2b
12
14
  specs:
13
15
  micron (0.1.0)
14
16
  colorize
@@ -48,7 +50,7 @@ GIT
48
50
 
49
51
  GIT
50
52
  remote: https://github.com/chetan/test_guard.git
51
- revision: 9c2fdd4ba874d8593ad4d70c0f2dd6b141061fed
53
+ revision: 6e184096f7713cefe6eab3d250b18d214e09a1ca
52
54
  specs:
53
55
  test_guard (0.2.1)
54
56
  awesome_print
@@ -65,8 +67,16 @@ GEM
65
67
  awesome_print (1.2.0)
66
68
  bouncy-castle-java (1.5.0147)
67
69
  builder (3.2.2)
70
+ celluloid (0.15.2)
71
+ timers (~> 1.1.0)
68
72
  coderay (1.0.9)
69
73
  colorize (0.6.0)
74
+ coveralls (0.7.0)
75
+ multi_json (~> 1.3)
76
+ rest-client
77
+ simplecov (>= 0.7)
78
+ term-ansicolor
79
+ thor
70
80
  crack (0.4.1)
71
81
  safe_yaml (~> 0.9.0)
72
82
  curb (0.8.5)
@@ -104,20 +114,21 @@ GEM
104
114
  json (1.8.0-java)
105
115
  jwt (0.1.8)
106
116
  multi_json (>= 1.5)
107
- listen (1.3.1)
117
+ listen (2.0.0)
118
+ celluloid (>= 0.15.1)
108
119
  rb-fsevent (>= 0.9.3)
109
120
  rb-inotify (>= 0.9)
110
- rb-kqueue (>= 0.2)
111
121
  little-plugger (1.1.3)
112
122
  logging (1.8.1)
113
123
  little-plugger (>= 1.1.3)
114
124
  multi_json (>= 1.3.6)
115
125
  metaclass (0.0.1)
116
126
  method_source (0.8.2)
127
+ mime-types (1.25)
117
128
  mixlib-shellout (1.2.0)
118
129
  mocha (0.14.0)
119
130
  metaclass (~> 0.0.1)
120
- multi_json (1.8.0)
131
+ multi_json (1.8.1)
121
132
  multi_xml (0.5.5)
122
133
  multipart-post (1.2.0)
123
134
  nokogiri (1.5.10)
@@ -146,14 +157,14 @@ GEM
146
157
  rb-fsevent (0.9.3)
147
158
  rb-inotify (0.9.2)
148
159
  ffi (>= 0.5.0)
149
- rb-kqueue (0.2.0)
150
- ffi (>= 0.5.0)
151
160
  rdoc (4.0.1)
152
161
  json (~> 1.4)
162
+ rest-client (1.6.7)
163
+ mime-types (>= 1.16)
153
164
  rubyntlm (0.3.4)
154
165
  safe_yaml (0.9.7)
155
166
  semver2 (3.3.2)
156
- simplecov-console (0.1.1)
167
+ simplecov-console (0.1.3)
157
168
  colorize
158
169
  hirb
159
170
  simplecov
@@ -161,6 +172,11 @@ GEM
161
172
  slop (3.4.6)
162
173
  spoon (0.0.4)
163
174
  ffi
175
+ term-ansicolor (1.2.2)
176
+ tins (~> 0.8)
177
+ thor (0.18.1)
178
+ timers (1.1.0)
179
+ tins (0.11.0)
164
180
  webmock (1.14.0)
165
181
  addressable (>= 2.2.7)
166
182
  crack (>= 0.3.2)
@@ -175,6 +191,7 @@ PLATFORMS
175
191
  DEPENDENCIES
176
192
  api-auth!
177
193
  bundler (~> 1.1)
194
+ coveralls
178
195
  curb
179
196
  easycov!
180
197
  faye-websocket
data/Rakefile CHANGED
@@ -30,5 +30,18 @@ Micron::Rake.new do |task|
30
30
  end
31
31
  task :default => :test
32
32
 
33
+ # for displaying coverage
34
+ require "easycov/rake"
35
+
36
+ # for reporting to coveralls
37
+ require "coveralls"
38
+ desc "Report coverage to coveralls"
39
+ task :coveralls do
40
+ SimpleCov.formatter = Coveralls::SimpleCov::Formatter
41
+ if File.exists? File.join(EasyCov.path, ".resultset.json") then
42
+ SimpleCov::ResultMerger.merged_result.format!
43
+ end
44
+ end
45
+
33
46
  require 'yard'
34
47
  YARD::Rake::YardocTask.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.6
1
+ 0.4.7
data/bixby-common.gemspec CHANGED
@@ -2,22 +2,24 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: bixby-common 0.4.6 ruby lib
5
+ # stub: bixby-common 0.4.7 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "bixby-common"
9
- s.version = "0.4.6"
9
+ s.version = "0.4.7"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.authors = ["Chetan Sarva"]
13
- s.date = "2013-10-03"
13
+ s.date = "2013-10-08"
14
14
  s.description = "Bixby Common files/libs"
15
15
  s.email = "chetan@pixelcop.net"
16
16
  s.extra_rdoc_files = [
17
17
  "LICENSE"
18
18
  ]
19
19
  s.files = [
20
+ ".coveralls.yml",
20
21
  ".document",
22
+ ".travis.yml",
21
23
  "Gemfile",
22
24
  "Gemfile.lock",
23
25
  "LICENSE",
@@ -101,6 +103,7 @@ Gem::Specification.new do |s|
101
103
  s.add_development_dependency(%q<test_guard>, [">= 0"])
102
104
  s.add_development_dependency(%q<easycov>, [">= 0"])
103
105
  s.add_development_dependency(%q<micron>, [">= 0"])
106
+ s.add_development_dependency(%q<coveralls>, [">= 0"])
104
107
  s.add_development_dependency(%q<rb-inotify>, [">= 0"])
105
108
  s.add_development_dependency(%q<rb-fsevent>, [">= 0"])
106
109
  s.add_development_dependency(%q<rb-fchange>, [">= 0"])
@@ -127,6 +130,7 @@ Gem::Specification.new do |s|
127
130
  s.add_dependency(%q<test_guard>, [">= 0"])
128
131
  s.add_dependency(%q<easycov>, [">= 0"])
129
132
  s.add_dependency(%q<micron>, [">= 0"])
133
+ s.add_dependency(%q<coveralls>, [">= 0"])
130
134
  s.add_dependency(%q<rb-inotify>, [">= 0"])
131
135
  s.add_dependency(%q<rb-fsevent>, [">= 0"])
132
136
  s.add_dependency(%q<rb-fchange>, [">= 0"])
@@ -154,6 +158,7 @@ Gem::Specification.new do |s|
154
158
  s.add_dependency(%q<test_guard>, [">= 0"])
155
159
  s.add_dependency(%q<easycov>, [">= 0"])
156
160
  s.add_dependency(%q<micron>, [">= 0"])
161
+ s.add_dependency(%q<coveralls>, [">= 0"])
157
162
  s.add_dependency(%q<rb-inotify>, [">= 0"])
158
163
  s.add_dependency(%q<rb-fsevent>, [">= 0"])
159
164
  s.add_dependency(%q<rb-fchange>, [">= 0"])
@@ -1,4 +1,6 @@
1
1
 
2
+ require "logging"
3
+
2
4
  module Bixby
3
5
  module Log
4
6
 
@@ -1,6 +1,8 @@
1
1
 
2
2
  # Patch Logging::Logger so that :trace becomes an inherited flag
3
3
 
4
+ require "logging"
5
+
4
6
  module Logging
5
7
  class Logger
6
8
  # :nocov:
@@ -41,8 +41,12 @@ module Bixby
41
41
  def execute_async(json_request, &block)
42
42
  logger.debug { "execute_async:\n#{json_request.to_s}" }
43
43
 
44
- request = Request.new(json_request)
45
- id = request.id
44
+ if json_request.kind_of? Request then
45
+ id, request = json_request.id, json_request
46
+ else
47
+ request = Request.new(json_request)
48
+ id = request.id
49
+ end
46
50
  @responses[id] = AsyncResponse.new(id, &block)
47
51
 
48
52
  EM.next_tick {
@@ -108,7 +112,12 @@ module Bixby
108
112
  @responses[req.id].response = res
109
113
 
110
114
  elsif req.type == "connect" then
111
- @handler.new(req).connect(req.json_request, self)
115
+ ret = @handler.new(req).connect(req.json_request, self)
116
+ if ret.kind_of? JsonResponse then
117
+ ws.send(Response.new(ret, req.id).to_wire)
118
+ else
119
+ ws.send(Response.new(JsonResponse.new("success"), req.id).to_wire)
120
+ end
112
121
 
113
122
  end
114
123
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bixby-common
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chetan Sarva
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-03 00:00:00.000000000 Z
11
+ date: 2013-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faye-websocket
@@ -248,6 +248,20 @@ dependencies:
248
248
  - - '>='
249
249
  - !ruby/object:Gem::Version
250
250
  version: '0'
251
+ - !ruby/object:Gem::Dependency
252
+ name: coveralls
253
+ requirement: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - '>='
256
+ - !ruby/object:Gem::Version
257
+ version: '0'
258
+ type: :development
259
+ prerelease: false
260
+ version_requirements: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - '>='
263
+ - !ruby/object:Gem::Version
264
+ version: '0'
251
265
  - !ruby/object:Gem::Dependency
252
266
  name: rb-inotify
253
267
  requirement: !ruby/object:Gem::Requirement
@@ -367,7 +381,9 @@ extensions: []
367
381
  extra_rdoc_files:
368
382
  - LICENSE
369
383
  files:
384
+ - .coveralls.yml
370
385
  - .document
386
+ - .travis.yml
371
387
  - Gemfile
372
388
  - Gemfile.lock
373
389
  - LICENSE