sails 0.1.5 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +11 -9
- data/Rakefile +5 -0
- data/lib/sails.rb +0 -1
- data/lib/sails/log_subscriber.rb +11 -4
- data/lib/sails/version.rb +1 -1
- data/sails.gemspec +1 -1
- metadata +6 -8
- data/lib/sails/rails.rb +0 -19
- data/spec/rails_spec.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2aaddc8f77dfe3c1738daa0b1823b47fd8aa545
|
4
|
+
data.tar.gz: 5f0831ff50a200b4e8d1eb315e11b3190ffdff7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a81c552abca5745fdbe5a3fedfc42dd62d12f235a9c8cfb10867589956596177880e04b8cb690a4aa83c3db14a3781bc30c5405e887aab1dfb74bd73e658f01
|
7
|
+
data.tar.gz: f58f1c56ecbecde6989832b1ae4858e3a4379191d29a77c6341b76485ad2e6358a8f904eb910953198adbae1554df986bef5c36f8fdaea88101894b97a9e0938
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,25 +1,24 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sails (0.
|
5
|
-
activesupport (> 3.2.0,
|
4
|
+
sails (0.2.0)
|
5
|
+
activesupport (> 3.2.0, <= 5.0)
|
6
6
|
thor
|
7
7
|
thrift (>= 0.9.0)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activesupport (
|
12
|
+
activesupport (5.0.0)
|
13
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
14
|
i18n (~> 0.7)
|
14
|
-
json (~> 1.7, >= 1.7.7)
|
15
15
|
minitest (~> 5.1)
|
16
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
17
16
|
tzinfo (~> 1.1)
|
17
|
+
concurrent-ruby (1.0.2)
|
18
18
|
dalli (2.7.1)
|
19
19
|
diff-lcs (1.2.5)
|
20
20
|
i18n (0.7.0)
|
21
|
-
|
22
|
-
minitest (5.5.0)
|
21
|
+
minitest (5.9.1)
|
23
22
|
rspec (3.1.0)
|
24
23
|
rspec-core (~> 3.1.0)
|
25
24
|
rspec-expectations (~> 3.1.0)
|
@@ -33,8 +32,8 @@ GEM
|
|
33
32
|
rspec-support (~> 3.1.0)
|
34
33
|
rspec-support (3.1.2)
|
35
34
|
thor (0.19.1)
|
36
|
-
thread_safe (0.3.
|
37
|
-
thrift (0.9.
|
35
|
+
thread_safe (0.3.5)
|
36
|
+
thrift (0.9.3.0)
|
38
37
|
tzinfo (1.2.2)
|
39
38
|
thread_safe (~> 0.1)
|
40
39
|
|
@@ -45,3 +44,6 @@ DEPENDENCIES
|
|
45
44
|
dalli
|
46
45
|
rspec
|
47
46
|
sails!
|
47
|
+
|
48
|
+
BUNDLED WITH
|
49
|
+
1.13.6
|
data/Rakefile
ADDED
data/lib/sails.rb
CHANGED
data/lib/sails/log_subscriber.rb
CHANGED
@@ -10,7 +10,7 @@ module Sails
|
|
10
10
|
|
11
11
|
info ""
|
12
12
|
info "Processing by #{payload[:controller]}##{payload[:action]} at #{Time.now}"
|
13
|
-
info " Parameters: #{params.inspect}" unless params.empty?
|
13
|
+
info " Parameters: #{params.except(:method_name).inspect}" unless params.empty?
|
14
14
|
|
15
15
|
ActiveRecord::LogSubscriber.reset_runtime if defined?(ActiveRecord::LogSubscriber)
|
16
16
|
end
|
@@ -20,12 +20,19 @@ module Sails
|
|
20
20
|
payload = event.payload
|
21
21
|
additions = []
|
22
22
|
|
23
|
-
|
24
|
-
|
23
|
+
payload.each_key do |key|
|
24
|
+
key_s = key.to_s
|
25
|
+
if key_s.include?("_runtime")
|
26
|
+
next if payload[key].blank?
|
27
|
+
runtime_name = key_s.sub("_runtime","").capitalize
|
28
|
+
additions << ("#{runtime_name}: %.1fms" % payload[key].to_f)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
25
32
|
status = payload[:status]
|
26
33
|
payload[:runtime] = event.duration
|
27
34
|
|
28
|
-
message = "Completed #{status}
|
35
|
+
message = "Completed #{status} in #{event.duration.round(2)}ms"
|
29
36
|
message << " (#{additions.join(" | ")})"
|
30
37
|
message
|
31
38
|
end
|
data/lib/sails/version.rb
CHANGED
data/sails.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.require_paths = ["lib"]
|
18
18
|
s.license = 'MIT'
|
19
19
|
|
20
|
-
s.add_dependency "activesupport", ["> 3.2.0","
|
20
|
+
s.add_dependency "activesupport", ["> 3.2.0","<= 5.0"]
|
21
21
|
s.add_dependency "thrift", [">= 0.9.0"]
|
22
22
|
s.add_dependency "thor"
|
23
23
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Lee
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2016-11-18 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activesupport
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
- - ">"
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: 3.2.0
|
24
|
-
- - "
|
24
|
+
- - "<="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '5.0'
|
27
27
|
type: :runtime
|
@@ -31,7 +31,7 @@ dependencies:
|
|
31
31
|
- - ">"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 3.2.0
|
34
|
-
- - "
|
34
|
+
- - "<="
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: '5.0'
|
37
37
|
- !ruby/object:Gem::Dependency
|
@@ -81,6 +81,7 @@ files:
|
|
81
81
|
- Gemfile.lock
|
82
82
|
- LICENSE
|
83
83
|
- README.md
|
84
|
+
- Rakefile
|
84
85
|
- bin/sails
|
85
86
|
- lib/sails.rb
|
86
87
|
- lib/sails/base.rb
|
@@ -89,7 +90,6 @@ files:
|
|
89
90
|
- lib/sails/console.rb
|
90
91
|
- lib/sails/daemon.rb
|
91
92
|
- lib/sails/log_subscriber.rb
|
92
|
-
- lib/sails/rails.rb
|
93
93
|
- lib/sails/service.rb
|
94
94
|
- lib/sails/service/base.rb
|
95
95
|
- lib/sails/service/callbacks.rb
|
@@ -124,7 +124,6 @@ files:
|
|
124
124
|
- spec/dummy/tmp/.keep
|
125
125
|
- spec/dummy/tmp/cache/.keep
|
126
126
|
- spec/dummy/tmp/pids/.keep
|
127
|
-
- spec/rails_spec.rb
|
128
127
|
- spec/sails_spec.rb
|
129
128
|
- spec/service/base_spec.rb
|
130
129
|
- spec/service/callbacks_spec.rb
|
@@ -150,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
149
|
version: '0'
|
151
150
|
requirements: []
|
152
151
|
rubyforge_project:
|
153
|
-
rubygems_version: 2.
|
152
|
+
rubygems_version: 2.5.2
|
154
153
|
signing_key:
|
155
154
|
specification_version: 4
|
156
155
|
summary: Sails, Help you to create Rails style Thrift Server
|
@@ -161,7 +160,6 @@ test_files:
|
|
161
160
|
- spec/dummy/tmp/.keep
|
162
161
|
- spec/dummy/tmp/cache/.keep
|
163
162
|
- spec/dummy/tmp/pids/.keep
|
164
|
-
- spec/rails_spec.rb
|
165
163
|
- spec/sails_spec.rb
|
166
164
|
- spec/service/base_spec.rb
|
167
165
|
- spec/service/callbacks_spec.rb
|
data/lib/sails/rails.rb
DELETED