bixby-common 0.4.7 → 0.4.8

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: 1935ac4b0aed266b6110771d3cef887840b0d9e2
4
- data.tar.gz: 8068985903a36686952e551c742a77f1b5075be7
3
+ metadata.gz: d6c281fb220741f36fdad2d175f407d363d6070f
4
+ data.tar.gz: 307dcde5ed3720e0ab1d44834fecc2e81e0d7bff
5
5
  SHA512:
6
- metadata.gz: 4e220383c3f2547177d5ae5c7aa4a11beb5c0148caf5daef1e83c4c484db91807b0e3d3f9ece26ae2ec57f38015fd8cd0e142538fafa98c7102136fb59ac1a72
7
- data.tar.gz: d07c585cd54983f237f74795c97d5ab316535b25e160338d0f2ce00cb186b32ecc691eac884c3843b498c93d508c261b856a45aec8c5d276612467bbf1318b3d
6
+ metadata.gz: c4f0ea7741cf335c5f624e94c29f0c8583d79752d3d9bc8c91dfc80da375d150a73e8233cdd664b048e21e3f42ed1da6f660234a7b4b575a0da7b87ceed3da8c
7
+ data.tar.gz: a567db3f37074ba450c23369b5003ce15cae0be4f508ef127a6eb6f6e86cb69112751a72a1cb53122bb4156fd890d71d537eb89200030242b8959ba62689664f
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  GIT
2
2
  remote: git://github.com/chetan/easycov.git
3
- revision: a4093b140a0adfbaea1c9b55c42a5c7629317025
3
+ revision: 0fd0c852ae174c8de7c4d5c904c59b6cd1869d66
4
4
  specs:
5
- easycov (0.3.1)
5
+ easycov (0.4.0)
6
6
  multi_json
7
7
  simplecov
8
8
  simplecov-console
@@ -10,16 +10,16 @@ GIT
10
10
 
11
11
  GIT
12
12
  remote: git://github.com/chetan/micron.git
13
- revision: 95399129ce8908484ed92a0de3a7e0ce83d99d2b
13
+ revision: 93984e01daf0820b2f7781aeacaee52b5934592c
14
14
  specs:
15
- micron (0.1.0)
15
+ micron (0.5.0)
16
16
  colorize
17
17
  easycov
18
18
  hitimes
19
19
 
20
20
  GIT
21
21
  remote: https://github.com/chetan/api_auth.git
22
- revision: 86a79ca157402bd1c12d683a6b9948564b493443
22
+ revision: 2440c3a1d23b95977185ce25210c86cbeded7cee
23
23
  branch: bixby
24
24
  specs:
25
25
  api-auth (1.0.3)
@@ -50,7 +50,7 @@ GIT
50
50
 
51
51
  GIT
52
52
  remote: https://github.com/chetan/test_guard.git
53
- revision: 6e184096f7713cefe6eab3d250b18d214e09a1ca
53
+ revision: 0c21a29cc9aaabbeb9224da50a8cfcfb50665bf3
54
54
  specs:
55
55
  test_guard (0.2.1)
56
56
  awesome_print
@@ -114,8 +114,8 @@ GEM
114
114
  json (1.8.0-java)
115
115
  jwt (0.1.8)
116
116
  multi_json (>= 1.5)
117
- listen (2.0.0)
118
- celluloid (>= 0.15.1)
117
+ listen (2.1.0)
118
+ celluloid (>= 0.15.2)
119
119
  rb-fsevent (>= 0.9.3)
120
120
  rb-inotify (>= 0.9)
121
121
  little-plugger (1.1.3)
@@ -128,7 +128,7 @@ GEM
128
128
  mixlib-shellout (1.2.0)
129
129
  mocha (0.14.0)
130
130
  metaclass (~> 0.0.1)
131
- multi_json (1.8.1)
131
+ multi_json (1.8.2)
132
132
  multi_xml (0.5.5)
133
133
  multipart-post (1.2.0)
134
134
  nokogiri (1.5.10)
@@ -140,7 +140,7 @@ GEM
140
140
  multi_json (~> 1.0)
141
141
  multi_xml (~> 0.5)
142
142
  rack (~> 1.2)
143
- oj (2.1.4)
143
+ oj (2.1.6)
144
144
  pry (0.9.12.2)
145
145
  coderay (~> 1.0.5)
146
146
  method_source (~> 0.8)
@@ -176,7 +176,7 @@ GEM
176
176
  tins (~> 0.8)
177
177
  thor (0.18.1)
178
178
  timers (1.1.0)
179
- tins (0.11.0)
179
+ tins (0.12.0)
180
180
  webmock (1.14.0)
181
181
  addressable (>= 2.2.7)
182
182
  crack (>= 0.3.2)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.7
1
+ 0.4.8
data/bixby-common.gemspec CHANGED
@@ -2,15 +2,15 @@
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.7 ruby lib
5
+ # stub: bixby-common 0.4.8 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "bixby-common"
9
- s.version = "0.4.7"
9
+ s.version = "0.4.8"
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-08"
13
+ s.date = "2013-10-29"
14
14
  s.description = "Bixby Common files/libs"
15
15
  s.email = "chetan@pixelcop.net"
16
16
  s.extra_rdoc_files = [
@@ -45,7 +45,18 @@ module Bixby
45
45
  layout = Logging.layouts.pattern(:pattern => pattern)
46
46
 
47
47
  opts[:filename] ||= Bixby.path("var", "bixby-agent.log")
48
- FileUtils.mkdir_p(File.dirname(opts[:filename]))
48
+ log_dir = File.dirname(opts[:filename])
49
+ FileUtils.mkdir_p(log_dir)
50
+
51
+ # make sure we have the correct permissions
52
+ if Process.uid == 0 then
53
+ if !File.exists? opts[:filename] then
54
+ FileUtils.touch([opts[:filename], opts[:filename] + ".age"])
55
+ end
56
+ File.chmod(0777, log_dir)
57
+ File.chmod(0777, opts[:filename])
58
+ File.chmod(0777, opts[:filename] + ".age")
59
+ end
49
60
 
50
61
  # configure stdout appender (used in debug modes, etc)
51
62
  Logging.color_scheme( 'bright',
@@ -21,7 +21,7 @@ class TestAPIChannel < TestCase
21
21
 
22
22
  def setup
23
23
  @em_thread = Thread.new { EM.run{} }
24
- @ws = mock()
24
+ @ws = mock("websocket")
25
25
  @api_chan = Bixby::WebSocket::APIChannel.new(ws, SampleHandler)
26
26
  end
27
27
 
@@ -80,9 +80,13 @@ class TestAPIChannel < TestCase
80
80
  signed_json_req = SignedJsonRequest.new(json_req, "foo", "bar")
81
81
  req = Bixby::WebSocket::Request.new(signed_json_req, nil, "connect")
82
82
 
83
- event = mock()
83
+ event = mock("event")
84
84
  event.expects(:data).once.returns(req.to_wire)
85
85
  SampleHandler.any_instance.expects(:connect).with(json_req, api_chan)
86
+ ws.expects(:send).once.with { |str|
87
+ res = Bixby::WebSocket::Message.from_wire(str)
88
+ !res.nil? && res.type == "rpc_result" && res.json_response.success?
89
+ }
86
90
  api_chan.message(event)
87
91
  end
88
92
 
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.7
4
+ version: 0.4.8
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-08 00:00:00.000000000 Z
11
+ date: 2013-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faye-websocket