bixby-common 0.3.12 → 0.3.13
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +3 -3
- data/Gemfile.lock +33 -26
- data/VERSION +1 -1
- data/bixby-common.gemspec +5 -5
- data/lib/bixby_common/command_spec.rb +20 -2
- data/lib/bixby_common/util/crypto_util.rb +1 -1
- data/lib/bixby_common/util/log.rb +1 -0
- metadata +7 -7
data/Gemfile
CHANGED
@@ -12,10 +12,10 @@ group :development do
|
|
12
12
|
gem "jeweler", :git => "https://github.com/chetan/jeweler.git", :branch => "bixby"
|
13
13
|
gem "pry"
|
14
14
|
|
15
|
-
gem "simplecov", :platforms => [:mri_19, :rbx], :git => "https://github.com/chetan/simplecov.git", :branch => "inline_nocov"
|
15
|
+
gem "simplecov", :platforms => [:mri_19, :mri_20, :rbx], :git => "https://github.com/chetan/simplecov.git", :branch => "inline_nocov"
|
16
16
|
gem "rcov", :platforms => :mri_18
|
17
17
|
|
18
|
-
gem "minitest", :platforms => [:mri_19, :rbx]
|
18
|
+
gem "minitest", "~> 4.0", :platforms => [:mri_19, :mri_20, :rbx]
|
19
19
|
gem "test-unit", :platforms => :mri_18
|
20
20
|
gem "webmock", :require => false
|
21
21
|
gem "mocha", :require => false
|
@@ -29,7 +29,7 @@ group :development do
|
|
29
29
|
|
30
30
|
# platform specific gemms
|
31
31
|
# not sure we need to include these at all
|
32
|
-
gem "json", :platforms => [:jruby]
|
32
|
+
gem "json", :platforms => [:mri, :jruby]
|
33
33
|
gem "oj", :platforms => [:mri, :rbx]
|
34
34
|
|
35
35
|
gem "httpclient", :platforms => [:jruby]
|
data/Gemfile.lock
CHANGED
@@ -28,7 +28,7 @@ GIT
|
|
28
28
|
|
29
29
|
GIT
|
30
30
|
remote: https://github.com/chetan/test_guard.git
|
31
|
-
revision:
|
31
|
+
revision: bbc871053ca91021eea412122035a9427748f8a5
|
32
32
|
specs:
|
33
33
|
test_guard (0.2.0)
|
34
34
|
awesome_print
|
@@ -44,42 +44,46 @@ GIT
|
|
44
44
|
GEM
|
45
45
|
remote: https://rubygems.org/
|
46
46
|
specs:
|
47
|
-
addressable (2.3.
|
47
|
+
addressable (2.3.4)
|
48
48
|
ansi (1.4.3)
|
49
49
|
awesome_print (1.1.0)
|
50
50
|
bouncy-castle-java (1.5.0147)
|
51
51
|
coderay (1.0.9)
|
52
52
|
colorize (0.5.8)
|
53
53
|
columnize (0.3.6)
|
54
|
-
crack (0.
|
55
|
-
|
56
|
-
|
54
|
+
crack (0.4.0)
|
55
|
+
safe_yaml (~> 0.9.0)
|
56
|
+
curb (0.8.4)
|
57
|
+
debugger (1.6.0)
|
57
58
|
columnize (>= 0.3.1)
|
58
59
|
debugger-linecache (~> 1.2.0)
|
59
|
-
debugger-ruby_core_source (~> 1.2.
|
60
|
+
debugger-ruby_core_source (~> 1.2.1)
|
60
61
|
debugger-linecache (1.2.0)
|
61
62
|
debugger-pry (0.1.1)
|
62
63
|
debugger (~> 1)
|
63
64
|
pry (>= 0.9.9)
|
64
|
-
debugger-ruby_core_source (1.2.
|
65
|
-
ffi (1.
|
66
|
-
ffi (1.
|
65
|
+
debugger-ruby_core_source (1.2.2)
|
66
|
+
ffi (1.8.1)
|
67
|
+
ffi (1.8.1-java)
|
67
68
|
formatador (0.2.4)
|
68
69
|
git (1.2.5)
|
69
70
|
growl (1.0.3)
|
70
|
-
guard (1.
|
71
|
+
guard (1.8.0)
|
71
72
|
formatador (>= 0.2.4)
|
72
|
-
listen (>= 0.
|
73
|
+
listen (>= 1.0.0)
|
73
74
|
lumberjack (>= 1.0.2)
|
74
75
|
pry (>= 0.9.10)
|
75
76
|
thor (>= 0.14.6)
|
76
77
|
hirb (0.7.1)
|
77
78
|
httpclient (2.3.3)
|
78
|
-
jruby-openssl (0.8.
|
79
|
+
jruby-openssl (0.8.8)
|
79
80
|
bouncy-castle-java (>= 1.5.0147)
|
80
|
-
json (1.
|
81
|
-
json (1.
|
82
|
-
listen (
|
81
|
+
json (1.8.0)
|
82
|
+
json (1.8.0-java)
|
83
|
+
listen (1.1.6)
|
84
|
+
rb-fsevent (>= 0.9.3)
|
85
|
+
rb-inotify (>= 0.9)
|
86
|
+
rb-kqueue (>= 0.2)
|
83
87
|
little-plugger (1.1.3)
|
84
88
|
logging (1.8.1)
|
85
89
|
little-plugger (>= 1.1.3)
|
@@ -87,16 +91,16 @@ GEM
|
|
87
91
|
lumberjack (1.0.3)
|
88
92
|
metaclass (0.0.1)
|
89
93
|
method_source (0.8.1)
|
90
|
-
minitest (4.7.
|
91
|
-
mocha (0.
|
94
|
+
minitest (4.7.4)
|
95
|
+
mocha (0.14.0)
|
92
96
|
metaclass (~> 0.0.1)
|
93
|
-
multi_json (1.7.
|
94
|
-
oj (2.0.
|
95
|
-
pry (0.9.12)
|
97
|
+
multi_json (1.7.6)
|
98
|
+
oj (2.0.14)
|
99
|
+
pry (0.9.12.2)
|
96
100
|
coderay (~> 1.0.5)
|
97
101
|
method_source (~> 0.8)
|
98
102
|
slop (~> 3.4)
|
99
|
-
pry (0.9.12-java)
|
103
|
+
pry (0.9.12.2-java)
|
100
104
|
coderay (~> 1.0.5)
|
101
105
|
method_source (~> 0.8)
|
102
106
|
slop (~> 3.4)
|
@@ -108,9 +112,12 @@ GEM
|
|
108
112
|
rb-fsevent (0.9.3)
|
109
113
|
rb-inotify (0.9.0)
|
110
114
|
ffi (>= 0.5.0)
|
115
|
+
rb-kqueue (0.2.0)
|
116
|
+
ffi (>= 0.5.0)
|
111
117
|
rcov (1.0.0)
|
112
118
|
rdoc (4.0.1)
|
113
119
|
json (~> 1.4)
|
120
|
+
safe_yaml (0.9.3)
|
114
121
|
simplecov-console (0.1.1)
|
115
122
|
colorize
|
116
123
|
hirb
|
@@ -118,17 +125,17 @@ GEM
|
|
118
125
|
simplecov-html (0.7.1)
|
119
126
|
single_test (0.5.2)
|
120
127
|
rake (> 0.9)
|
121
|
-
slop (3.4.
|
122
|
-
spoon (0.0.
|
128
|
+
slop (3.4.5)
|
129
|
+
spoon (0.0.4)
|
123
130
|
ffi
|
124
|
-
test-unit (2.5.
|
131
|
+
test-unit (2.5.5)
|
125
132
|
thor (0.18.1)
|
126
133
|
turn (0.9.6)
|
127
134
|
ansi
|
128
135
|
webmock (1.11.0)
|
129
136
|
addressable (>= 2.2.7)
|
130
137
|
crack (>= 0.3.2)
|
131
|
-
yard (0.8.
|
138
|
+
yard (0.8.6.1)
|
132
139
|
|
133
140
|
PLATFORMS
|
134
141
|
java
|
@@ -143,7 +150,7 @@ DEPENDENCIES
|
|
143
150
|
jruby-openssl
|
144
151
|
json
|
145
152
|
logging
|
146
|
-
minitest
|
153
|
+
minitest (~> 4.0)
|
147
154
|
mocha
|
148
155
|
multi_json
|
149
156
|
oj
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.13
|
data/bixby-common.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "bixby-common"
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.13"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Chetan Sarva"]
|
12
|
-
s.date = "2013-
|
12
|
+
s.date = "2013-06-06"
|
13
13
|
s.description = "Bixby Common files/libs"
|
14
14
|
s.email = "chetan@pixelcop.net"
|
15
15
|
s.files = [
|
@@ -68,7 +68,7 @@ Gem::Specification.new do |s|
|
|
68
68
|
s.add_development_dependency(%q<pry>, [">= 0"])
|
69
69
|
s.add_development_dependency(%q<simplecov>, [">= 0"])
|
70
70
|
s.add_development_dependency(%q<rcov>, [">= 0"])
|
71
|
-
s.add_development_dependency(%q<minitest>, ["
|
71
|
+
s.add_development_dependency(%q<minitest>, ["~> 4.0"])
|
72
72
|
s.add_development_dependency(%q<test-unit>, [">= 0"])
|
73
73
|
s.add_development_dependency(%q<webmock>, [">= 0"])
|
74
74
|
s.add_development_dependency(%q<mocha>, [">= 0"])
|
@@ -92,7 +92,7 @@ Gem::Specification.new do |s|
|
|
92
92
|
s.add_dependency(%q<pry>, [">= 0"])
|
93
93
|
s.add_dependency(%q<simplecov>, [">= 0"])
|
94
94
|
s.add_dependency(%q<rcov>, [">= 0"])
|
95
|
-
s.add_dependency(%q<minitest>, ["
|
95
|
+
s.add_dependency(%q<minitest>, ["~> 4.0"])
|
96
96
|
s.add_dependency(%q<test-unit>, [">= 0"])
|
97
97
|
s.add_dependency(%q<webmock>, [">= 0"])
|
98
98
|
s.add_dependency(%q<mocha>, [">= 0"])
|
@@ -117,7 +117,7 @@ Gem::Specification.new do |s|
|
|
117
117
|
s.add_dependency(%q<pry>, [">= 0"])
|
118
118
|
s.add_dependency(%q<simplecov>, [">= 0"])
|
119
119
|
s.add_dependency(%q<rcov>, [">= 0"])
|
120
|
-
s.add_dependency(%q<minitest>, ["
|
120
|
+
s.add_dependency(%q<minitest>, ["~> 4.0"])
|
121
121
|
s.add_dependency(%q<test-unit>, [">= 0"])
|
122
122
|
s.add_dependency(%q<webmock>, [">= 0"])
|
123
123
|
s.add_dependency(%q<mocha>, [">= 0"])
|
@@ -68,7 +68,7 @@ class CommandSpec
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def command_file
|
71
|
-
|
71
|
+
path("bin", @command)
|
72
72
|
end
|
73
73
|
|
74
74
|
def command_exists?
|
@@ -88,7 +88,7 @@ class CommandSpec
|
|
88
88
|
end
|
89
89
|
|
90
90
|
def digest_file
|
91
|
-
|
91
|
+
path("digest")
|
92
92
|
end
|
93
93
|
|
94
94
|
def load_digest
|
@@ -99,6 +99,23 @@ class CommandSpec
|
|
99
99
|
nil
|
100
100
|
end
|
101
101
|
|
102
|
+
def load_manifest
|
103
|
+
begin
|
104
|
+
return MultiJson.load(path("manifest.json"))
|
105
|
+
rescue => ex
|
106
|
+
end
|
107
|
+
nil
|
108
|
+
end
|
109
|
+
|
110
|
+
# Create and return an absolute pathname pointing to the given file
|
111
|
+
#
|
112
|
+
# @param [String] *relative
|
113
|
+
#
|
114
|
+
# @return [String]
|
115
|
+
def path(*relative)
|
116
|
+
File.join(self.bundle_dir, *relative)
|
117
|
+
end
|
118
|
+
|
102
119
|
def update_digest
|
103
120
|
|
104
121
|
path = self.bundle_dir
|
@@ -114,6 +131,7 @@ class CommandSpec
|
|
114
131
|
end
|
115
132
|
|
116
133
|
@digest = { :digest => bundle_sha.hexdigest(), :files => digests }
|
134
|
+
MultiJson.load_adapter(:json_gem).activate!
|
117
135
|
File.open(path+"/digest", 'w'){ |f|
|
118
136
|
f.write(MultiJson.dump(@digest, :pretty => true, :adapter => :json_gem) + "\n")
|
119
137
|
}
|
@@ -59,7 +59,7 @@ module Bixby
|
|
59
59
|
data = StringIO.new(c.update(payload) + c.final)
|
60
60
|
|
61
61
|
ts = data.readline.strip
|
62
|
-
if (Time.new.to_i - ts.to_i) >
|
62
|
+
if (Time.new.to_i - ts.to_i) > 900 then # must be within last 15 min
|
63
63
|
raise Bixby::EncryptionError, "payload verification failed", caller
|
64
64
|
end
|
65
65
|
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: bixby-common
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.3.
|
5
|
+
version: 0.3.13
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Chetan Sarva
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-06-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|
@@ -160,16 +160,16 @@ dependencies:
|
|
160
160
|
prerelease: false
|
161
161
|
requirement: !ruby/object:Gem::Requirement
|
162
162
|
requirements:
|
163
|
-
- -
|
163
|
+
- - ~>
|
164
164
|
- !ruby/object:Gem::Version
|
165
|
-
version: '0'
|
165
|
+
version: '4.0'
|
166
166
|
none: false
|
167
167
|
type: :development
|
168
168
|
version_requirements: !ruby/object:Gem::Requirement
|
169
169
|
requirements:
|
170
|
-
- -
|
170
|
+
- - ~>
|
171
171
|
- !ruby/object:Gem::Version
|
172
|
-
version: '0'
|
172
|
+
version: '4.0'
|
173
173
|
none: false
|
174
174
|
- !ruby/object:Gem::Dependency
|
175
175
|
name: test-unit
|
@@ -431,7 +431,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
431
431
|
requirements:
|
432
432
|
- - ! '>='
|
433
433
|
- !ruby/object:Gem::Version
|
434
|
-
hash:
|
434
|
+
hash: -2334506530197653081
|
435
435
|
segments:
|
436
436
|
- 0
|
437
437
|
version: '0'
|