sails 0.1.4 → 0.1.5
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 +4 -4
- data/.gitignore +2 -16
- data/CHANGELOG.md +13 -0
- data/Gemfile.lock +2 -2
- data/README.md +37 -11
- data/lib/sails/base.rb +225 -208
- data/lib/sails/cli.rb +13 -14
- data/lib/sails/config.rb +5 -5
- data/lib/sails/console.rb +9 -9
- data/lib/sails/daemon.rb +72 -27
- data/lib/sails/log_subscriber.rb +40 -0
- data/lib/sails/rails.rb +5 -1
- data/lib/sails/service/base.rb +8 -8
- data/lib/sails/service/callbacks.rb +2 -3
- data/lib/sails/service/interface.rb +34 -27
- data/lib/sails/service.rb +2 -2
- data/lib/sails/tasks.rb +61 -0
- data/lib/sails/templates/Gemfile +4 -4
- data/lib/sails/templates/Rakefile.tt +1 -41
- data/lib/sails/templates/app/services/application_service.rb.tt +6 -2
- data/lib/sails/templates/app/services/gen-rb/%app_name%.rb.tt +78 -3
- data/lib/sails/templates/app/services/gen-rb/%app_name%_constants.rb.tt +11 -0
- data/lib/sails/templates/app/services/gen-rb/%app_name%_types.rb.tt +46 -0
- data/lib/sails/templates/config/application.rb.tt +8 -8
- data/lib/sails/templates/config/{database.yml → database.yml.tt} +2 -5
- data/lib/sails/templates/config/initializers/active_record.rb +6 -0
- data/lib/sails/templates/config/locales/rails.zh-CN.yml +5 -5
- data/lib/sails/templates/config/locales/zh-CN.yml +1 -2
- data/lib/sails/templates/lib/tasks/client.rake.tt +25 -0
- data/lib/sails/version.rb +2 -2
- data/lib/sails.rb +12 -6
- data/sails.gemspec +1 -1
- data/spec/cli_spec.rb +6 -6
- data/spec/dummy/.keep +0 -0
- data/spec/dummy/log/.keep +0 -0
- data/spec/dummy/tmp/.keep +0 -0
- data/spec/dummy/tmp/cache/.keep +0 -0
- data/spec/dummy/tmp/pids/.keep +0 -0
- data/spec/rails_spec.rb +1 -0
- data/spec/sails_spec.rb +39 -11
- data/spec/spec_helper.rb +1 -1
- data/spec/support/service_support.rb +2 -2
- metadata +28 -8
- data/lib/sails/templates/Gemfile.lock +0 -45
@@ -1,49 +1,9 @@
|
|
1
1
|
require "rake"
|
2
2
|
require "rubygems"
|
3
|
-
|
4
3
|
require File.expand_path('../config/application.rb', __FILE__)
|
5
|
-
|
4
|
+
require "sails/tasks"
|
6
5
|
Dir.glob('lib/tasks/*.rake').each { |r| import r }
|
7
6
|
|
8
|
-
task :default => :test
|
9
|
-
|
10
|
-
task :gen do
|
11
|
-
puts "Generating thrift code..."
|
12
|
-
system 'thrift \
|
13
|
-
--gen rb \
|
14
|
-
-out app/services/gen-rb \
|
15
|
-
-strict \
|
16
|
-
-debug \
|
17
|
-
-verbose \
|
18
|
-
<%= app_name %>.thrift'
|
19
|
-
|
20
|
-
puts "[Done]"
|
21
|
-
end
|
22
|
-
|
23
|
-
task :test do
|
24
|
-
system 'rspec spec'
|
25
|
-
end
|
26
|
-
|
27
|
-
load 'active_record/railties/databases.rake'
|
28
|
-
|
29
|
-
class << ActiveRecord::Tasks::DatabaseTasks
|
30
|
-
def env
|
31
|
-
@env ||= Sails.env
|
32
|
-
end
|
33
|
-
|
34
|
-
def migrations_paths
|
35
|
-
[File.expand_path('../db/migrate', __FILE__)]
|
36
|
-
end
|
37
|
-
|
38
|
-
def database_configuration
|
39
|
-
YAML.load open(File.expand_path('../config/database.yml', __FILE__)).read
|
40
|
-
end
|
41
|
-
|
42
|
-
def db_dir
|
43
|
-
File.expand_path('../db', __FILE__)
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
7
|
task :environment do
|
48
8
|
require File.expand_path('../config/application.rb', __FILE__)
|
49
9
|
end
|
@@ -1,8 +1,12 @@
|
|
1
1
|
class ApplicationService < Sails::Service::Base
|
2
2
|
# def require_user!(user_id, access_token)
|
3
3
|
# end
|
4
|
-
|
4
|
+
|
5
5
|
# def raise_error(code, msg = nil)
|
6
6
|
# raise YouCustomThriftException.new(code: code, message: msg)
|
7
7
|
# end
|
8
|
-
|
8
|
+
|
9
|
+
def ping
|
10
|
+
return "Pong #{Time.now}"
|
11
|
+
end
|
12
|
+
end
|
@@ -1,11 +1,86 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler (0.9.2)
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
require '<%= @app_name %>_types'
|
9
|
+
|
1
10
|
module Thrift
|
2
|
-
module <%= app_name.capitalize %>
|
11
|
+
module <%= @app_name.capitalize %>
|
3
12
|
class Client
|
4
13
|
include ::Thrift::Client
|
14
|
+
|
15
|
+
def ping()
|
16
|
+
send_ping()
|
17
|
+
return recv_ping()
|
18
|
+
end
|
19
|
+
|
20
|
+
def send_ping()
|
21
|
+
send_message('ping', Ping_args)
|
22
|
+
end
|
23
|
+
|
24
|
+
def recv_ping()
|
25
|
+
result = receive_message(Ping_result)
|
26
|
+
return result.success unless result.success.nil?
|
27
|
+
raise result.failure unless result.failure.nil?
|
28
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'ping failed: unknown result')
|
29
|
+
end
|
30
|
+
|
5
31
|
end
|
6
|
-
|
32
|
+
|
7
33
|
class Processor
|
8
34
|
include ::Thrift::Processor
|
35
|
+
|
36
|
+
def process_ping(seqid, iprot, oprot)
|
37
|
+
args = read_args(iprot, Ping_args)
|
38
|
+
result = Ping_result.new()
|
39
|
+
begin
|
40
|
+
result.success = @handler.ping()
|
41
|
+
rescue ::Thrift::OperationFailed => failure
|
42
|
+
result.failure = failure
|
43
|
+
end
|
44
|
+
write_result(result, oprot, 'ping', seqid)
|
45
|
+
end
|
46
|
+
|
9
47
|
end
|
48
|
+
|
49
|
+
# HELPER FUNCTIONS AND STRUCTURES
|
50
|
+
|
51
|
+
class Ping_args
|
52
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
53
|
+
|
54
|
+
FIELDS = {
|
55
|
+
|
56
|
+
}
|
57
|
+
|
58
|
+
def struct_fields; FIELDS; end
|
59
|
+
|
60
|
+
def validate
|
61
|
+
end
|
62
|
+
|
63
|
+
::Thrift::Struct.generate_accessors self
|
64
|
+
end
|
65
|
+
|
66
|
+
class Ping_result
|
67
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
68
|
+
SUCCESS = 0
|
69
|
+
FAILURE = 1
|
70
|
+
|
71
|
+
FIELDS = {
|
72
|
+
SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'},
|
73
|
+
FAILURE => {:type => ::Thrift::Types::STRUCT, :name => 'failure', :class => ::Thrift::OperationFailed}
|
74
|
+
}
|
75
|
+
|
76
|
+
def struct_fields; FIELDS; end
|
77
|
+
|
78
|
+
def validate
|
79
|
+
end
|
80
|
+
|
81
|
+
::Thrift::Struct.generate_accessors self
|
82
|
+
end
|
83
|
+
|
10
84
|
end
|
11
|
-
|
85
|
+
|
86
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler (0.9.2)
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
|
9
|
+
module Thrift
|
10
|
+
class Session
|
11
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
12
|
+
USER_ID = 1
|
13
|
+
ACCESS_TOKEN = 2
|
14
|
+
|
15
|
+
FIELDS = {
|
16
|
+
USER_ID => {:type => ::Thrift::Types::I64, :name => 'user_id'},
|
17
|
+
ACCESS_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'access_token'}
|
18
|
+
}
|
19
|
+
|
20
|
+
def struct_fields; FIELDS; end
|
21
|
+
|
22
|
+
def validate
|
23
|
+
end
|
24
|
+
|
25
|
+
::Thrift::Struct.generate_accessors self
|
26
|
+
end
|
27
|
+
|
28
|
+
class OperationFailed < ::Thrift::Exception
|
29
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
30
|
+
CODE = 1
|
31
|
+
MESSAGE = 2
|
32
|
+
|
33
|
+
FIELDS = {
|
34
|
+
CODE => {:type => ::Thrift::Types::I32, :name => 'code'},
|
35
|
+
MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
|
36
|
+
}
|
37
|
+
|
38
|
+
def struct_fields; FIELDS; end
|
39
|
+
|
40
|
+
def validate
|
41
|
+
end
|
42
|
+
|
43
|
+
::Thrift::Struct.generate_accessors self
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
@@ -9,21 +9,21 @@ module Sails
|
|
9
9
|
config.app_name = '<%= app_name %>'
|
10
10
|
# Thrift Configs
|
11
11
|
config.port = 4000
|
12
|
-
|
12
|
+
|
13
13
|
# Thrift protocol allows: :binary, :compact, default: :binary
|
14
|
-
# config.protocol = :binary
|
15
|
-
|
14
|
+
# config.protocol = :binary
|
15
|
+
|
16
16
|
# Number of threads, default: 20
|
17
17
|
# config.thread_size = 20
|
18
|
-
|
18
|
+
|
19
19
|
config.processor = Thrift::<%= app_name.capitalize %>::Processor
|
20
|
-
|
20
|
+
|
21
21
|
# config.autoload_paths += %W(app/workers)
|
22
|
-
|
22
|
+
|
23
23
|
config.i18n.default_locale = 'zh-CN'
|
24
|
-
|
24
|
+
|
25
25
|
# cache store
|
26
26
|
# config.cache_store = [:dalli_store, '127.0.0.1']
|
27
27
|
end
|
28
28
|
|
29
|
-
Sails.init()
|
29
|
+
Sails.init()
|
@@ -116,17 +116,17 @@ zh-CN:
|
|
116
116
|
not_an_integer: 必须是整数
|
117
117
|
odd: 必须为单数
|
118
118
|
record_invalid: ! '验证失败: %{errors}'
|
119
|
-
restrict_dependent_destroy:
|
119
|
+
restrict_dependent_destroy:
|
120
120
|
one: 由于 %{record} 需要此记录,所以无法移除记录
|
121
121
|
many: 由于 %{record} 需要此记录,所以无法移除记录
|
122
122
|
taken: 已经被使用
|
123
|
-
too_long:
|
123
|
+
too_long:
|
124
124
|
one: 过长(最长为一个字符)
|
125
125
|
other: 过长(最长为 %{count} 个字符)
|
126
|
-
too_short:
|
126
|
+
too_short:
|
127
127
|
one: 过短(最短为一个字符)
|
128
128
|
other: 过短(最短为 %{count} 个字符)
|
129
|
-
wrong_length:
|
129
|
+
wrong_length:
|
130
130
|
one: 长度非法(必须为一个字符)
|
131
131
|
other: 长度非法(必须为 %{count} 个字符)
|
132
132
|
other_than: 长度非法(不可为 %{count} 个字符
|
@@ -200,4 +200,4 @@ zh-CN:
|
|
200
200
|
default: ! '%Y年%b%d日 %A %H:%M:%S %Z'
|
201
201
|
long: ! '%Y年%b%d日 %H:%M'
|
202
202
|
short: ! '%b%d日 %H:%M'
|
203
|
-
pm: 下午
|
203
|
+
pm: 下午
|
@@ -0,0 +1,25 @@
|
|
1
|
+
$:.unshift Sails.root.join("app/services")
|
2
|
+
require "handler"
|
3
|
+
|
4
|
+
class TestClient
|
5
|
+
def self.instance
|
6
|
+
@transport ||= Thrift::FramedTransport.new(::Thrift::Socket.new('127.0.0.1', 4000, 10))
|
7
|
+
@protocol ||= Thrift::BinaryProtocol.new(@transport)
|
8
|
+
@client ||= Thrift::<%= @app_name.capitalize %>::Client.new(@protocol)
|
9
|
+
@transport.open() if !@transport.open?
|
10
|
+
@client
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.method_missing(name, *args)
|
14
|
+
puts "> #{name}"
|
15
|
+
puts self.instance.send(name, *args).inspect
|
16
|
+
puts ""
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
namespace :client do
|
21
|
+
desc "client ping test"
|
22
|
+
task :ping do
|
23
|
+
TestClient.ping()
|
24
|
+
end
|
25
|
+
end
|
data/lib/sails/version.rb
CHANGED
data/lib/sails.rb
CHANGED
@@ -7,7 +7,7 @@ require 'yaml'
|
|
7
7
|
require "sails/rails"
|
8
8
|
require "sails/base"
|
9
9
|
|
10
|
-
# Sails
|
10
|
+
# Sails
|
11
11
|
#
|
12
12
|
# You can custom Sails configs in config/application.rb
|
13
13
|
#
|
@@ -19,22 +19,28 @@ require "sails/base"
|
|
19
19
|
# # Thrift Protocols can be use [:binary, :compact, :json]
|
20
20
|
# # http://jnb.ociweb.com/jnb/jnbJun2009.html#protocols
|
21
21
|
# config.thrift.procotol = :binary
|
22
|
-
#
|
22
|
+
#
|
23
23
|
# config.autoload_paths += %W(app/workers)
|
24
|
-
#
|
24
|
+
#
|
25
25
|
# config.i18n.default_locale = 'zh-CN'
|
26
|
-
#
|
26
|
+
#
|
27
27
|
# # cache store
|
28
28
|
# config.cache_store = [:dalli_store, '127.0.0.1' }]
|
29
29
|
# end
|
30
30
|
#
|
31
31
|
module Sails
|
32
32
|
extend ActiveSupport::Autoload
|
33
|
-
|
33
|
+
|
34
34
|
autoload :Config
|
35
35
|
autoload :Version
|
36
36
|
autoload :Service
|
37
37
|
autoload :CLI
|
38
38
|
autoload :Daemon
|
39
39
|
autoload :Console
|
40
|
-
|
40
|
+
|
41
|
+
eager_autoload do
|
42
|
+
autoload :LogSubscriber
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
Sails.eager_load!
|
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", ["
|
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
|
data/spec/cli_spec.rb
CHANGED
@@ -10,7 +10,7 @@ describe 'Sails::CLI' do
|
|
10
10
|
cli.start
|
11
11
|
}
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
describe '.stop' do
|
15
15
|
it { expect(cli).to respond_to(:stop) }
|
16
16
|
it {
|
@@ -19,7 +19,7 @@ describe 'Sails::CLI' do
|
|
19
19
|
cli.stop
|
20
20
|
}
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
describe '.restart' do
|
24
24
|
it { expect(cli).to respond_to(:restart) }
|
25
25
|
it {
|
@@ -28,16 +28,16 @@ describe 'Sails::CLI' do
|
|
28
28
|
cli.restart
|
29
29
|
}
|
30
30
|
end
|
31
|
-
|
31
|
+
|
32
32
|
describe '.new' do
|
33
33
|
it { expect(cli).to respond_to(:new) }
|
34
34
|
end
|
35
|
-
|
35
|
+
|
36
36
|
describe '.console' do
|
37
37
|
it { expect(cli).to respond_to(:console) }
|
38
38
|
end
|
39
|
-
|
39
|
+
|
40
40
|
describe '.version' do
|
41
41
|
it { expect(cli).to respond_to(:version) }
|
42
42
|
end
|
43
|
-
end
|
43
|
+
end
|
data/spec/dummy/.keep
ADDED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/rails_spec.rb
CHANGED
data/spec/sails_spec.rb
CHANGED
@@ -2,33 +2,47 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
describe 'Sails' do
|
4
4
|
it { expect(Sails.version).not_to be_nil }
|
5
|
-
|
5
|
+
|
6
6
|
describe '#root' do
|
7
7
|
it 'should be a Pathname class' do
|
8
8
|
expect(Sails.root).to be_a(Pathname)
|
9
9
|
end
|
10
|
-
|
10
|
+
|
11
11
|
it 'should support Sails.root.join' do
|
12
12
|
expect(Sails.root.join("aaa").to_s).to eq File.join(Dir.pwd, "spec/dummy/aaa")
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
15
|
it 'should work' do
|
16
16
|
expect(Sails.root.to_s).to eq File.join(Dir.pwd, "spec/dummy")
|
17
17
|
end
|
18
18
|
end
|
19
|
-
|
19
|
+
|
20
|
+
describe '#init' do
|
21
|
+
it 'should work' do
|
22
|
+
Sails.instance_variable_set(:@inited, false)
|
23
|
+
expect(Sails).to receive(:check_create_dirs).once
|
24
|
+
expect(Sails).to receive(:load_initialize).once
|
25
|
+
Sails.init
|
26
|
+
expect(Sails.instance_variable_get(:@inited)).to eq true
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
20
30
|
describe '#logger' do
|
21
31
|
it 'should be a Logger class' do
|
22
32
|
expect(Sails.logger).to be_a(Logger)
|
23
33
|
end
|
34
|
+
|
35
|
+
it 'should have logger_path' do
|
36
|
+
expect(Sails.logger_path).to eq Sails.root.join("log/#{Sails.env}.log")
|
37
|
+
end
|
24
38
|
end
|
25
|
-
|
39
|
+
|
26
40
|
describe '#config' do
|
27
41
|
it 'should work' do
|
28
42
|
expect(Sails.config).to be_a(Hash)
|
29
43
|
expect(Sails.config.autoload_paths).to be_a(Array)
|
30
44
|
end
|
31
|
-
|
45
|
+
|
32
46
|
describe 'Real config' do
|
33
47
|
it { expect(Sails.config.app_name).to eq 'hello' }
|
34
48
|
it { expect(Sails.config.host).to eq '1.1.1.1' }
|
@@ -39,12 +53,12 @@ describe 'Sails' do
|
|
39
53
|
it { expect(Sails.config.autoload_paths).to include("app/bar") }
|
40
54
|
end
|
41
55
|
end
|
42
|
-
|
56
|
+
|
43
57
|
describe '#cache' do
|
44
58
|
it { expect(Sails.cache).to be_a(ActiveSupport::Cache::DalliStore) }
|
45
59
|
it { expect(Sails.cache).to respond_to(:read, :write, :delete, :clear) }
|
46
60
|
end
|
47
|
-
|
61
|
+
|
48
62
|
describe '#thrift_protocol_class' do
|
49
63
|
it 'should work' do
|
50
64
|
allow(Sails.config).to receive(:protocol).and_return(:binary)
|
@@ -57,7 +71,7 @@ describe 'Sails' do
|
|
57
71
|
expect(Sails.thrift_protocol_class).to eq ::Thrift::BinaryProtocolFactory
|
58
72
|
end
|
59
73
|
end
|
60
|
-
|
74
|
+
|
61
75
|
describe '#reload!' do
|
62
76
|
it 'should work' do
|
63
77
|
s1 = Sails.service
|
@@ -66,5 +80,19 @@ describe 'Sails' do
|
|
66
80
|
# TODO: test reload autoload_paths
|
67
81
|
end
|
68
82
|
end
|
69
|
-
|
70
|
-
|
83
|
+
|
84
|
+
describe '#check_create_dirs' do
|
85
|
+
it 'should work' do
|
86
|
+
require "fileutils"
|
87
|
+
log_path = Sails.root.join("log")
|
88
|
+
FileUtils.rm_r(log_path) if Dir.exist?(log_path)
|
89
|
+
expect(Dir.exist?(log_path)).to eq false
|
90
|
+
|
91
|
+
Sails.check_create_dirs
|
92
|
+
%W(log tmp tmp/cache tmp/pids).each do |name|
|
93
|
+
expect(Dir.exist?(Sails.root.join(name))).to eq true
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
end
|
data/spec/spec_helper.rb
CHANGED
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.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Lee
|
@@ -12,22 +12,28 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2015-01-01 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activesupport
|
19
19
|
requirement: !ruby/object:Gem::Requirement
|
20
20
|
requirements:
|
21
|
-
- - "
|
21
|
+
- - ">"
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: 3.2.0
|
24
|
+
- - "<"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '5.0'
|
24
27
|
type: :runtime
|
25
28
|
prerelease: false
|
26
29
|
version_requirements: !ruby/object:Gem::Requirement
|
27
30
|
requirements:
|
28
|
-
- - "
|
31
|
+
- - ">"
|
29
32
|
- !ruby/object:Gem::Version
|
30
33
|
version: 3.2.0
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '5.0'
|
31
37
|
- !ruby/object:Gem::Dependency
|
32
38
|
name: thrift
|
33
39
|
requirement: !ruby/object:Gem::Requirement
|
@@ -82,32 +88,42 @@ files:
|
|
82
88
|
- lib/sails/config.rb
|
83
89
|
- lib/sails/console.rb
|
84
90
|
- lib/sails/daemon.rb
|
91
|
+
- lib/sails/log_subscriber.rb
|
85
92
|
- lib/sails/rails.rb
|
86
93
|
- lib/sails/service.rb
|
87
94
|
- lib/sails/service/base.rb
|
88
95
|
- lib/sails/service/callbacks.rb
|
89
96
|
- lib/sails/service/exception.rb
|
90
97
|
- lib/sails/service/interface.rb
|
98
|
+
- lib/sails/tasks.rb
|
91
99
|
- lib/sails/templates/%app_name%.thrift.tt
|
92
100
|
- lib/sails/templates/Gemfile
|
93
|
-
- lib/sails/templates/Gemfile.lock
|
94
101
|
- lib/sails/templates/Rakefile.tt
|
95
102
|
- lib/sails/templates/app/services/application_service.rb.tt
|
96
103
|
- lib/sails/templates/app/services/gen-rb/%app_name%.rb.tt
|
104
|
+
- lib/sails/templates/app/services/gen-rb/%app_name%_constants.rb.tt
|
105
|
+
- lib/sails/templates/app/services/gen-rb/%app_name%_types.rb.tt
|
97
106
|
- lib/sails/templates/app/services/handler.rb.tt
|
98
107
|
- lib/sails/templates/config/application.rb.tt
|
99
108
|
- lib/sails/templates/config/boot.rb
|
100
|
-
- lib/sails/templates/config/database.yml
|
109
|
+
- lib/sails/templates/config/database.yml.tt
|
101
110
|
- lib/sails/templates/config/environments/development.rb
|
102
111
|
- lib/sails/templates/config/environments/production.rb
|
103
112
|
- lib/sails/templates/config/environments/test.rb
|
113
|
+
- lib/sails/templates/config/initializers/active_record.rb
|
104
114
|
- lib/sails/templates/config/locales/en.yml
|
105
115
|
- lib/sails/templates/config/locales/rails.zh-CN.yml
|
106
116
|
- lib/sails/templates/config/locales/zh-CN.yml
|
107
117
|
- lib/sails/templates/db/seeds.rb
|
118
|
+
- lib/sails/templates/lib/tasks/client.rake.tt
|
108
119
|
- lib/sails/version.rb
|
109
120
|
- sails.gemspec
|
110
121
|
- spec/cli_spec.rb
|
122
|
+
- spec/dummy/.keep
|
123
|
+
- spec/dummy/log/.keep
|
124
|
+
- spec/dummy/tmp/.keep
|
125
|
+
- spec/dummy/tmp/cache/.keep
|
126
|
+
- spec/dummy/tmp/pids/.keep
|
111
127
|
- spec/rails_spec.rb
|
112
128
|
- spec/sails_spec.rb
|
113
129
|
- spec/service/base_spec.rb
|
@@ -134,16 +150,20 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
150
|
version: '0'
|
135
151
|
requirements: []
|
136
152
|
rubyforge_project:
|
137
|
-
rubygems_version: 2.4.
|
153
|
+
rubygems_version: 2.4.5
|
138
154
|
signing_key:
|
139
155
|
specification_version: 4
|
140
156
|
summary: Sails, Help you to create Rails style Thrift Server
|
141
157
|
test_files:
|
142
158
|
- spec/cli_spec.rb
|
159
|
+
- spec/dummy/.keep
|
160
|
+
- spec/dummy/log/.keep
|
161
|
+
- spec/dummy/tmp/.keep
|
162
|
+
- spec/dummy/tmp/cache/.keep
|
163
|
+
- spec/dummy/tmp/pids/.keep
|
143
164
|
- spec/rails_spec.rb
|
144
165
|
- spec/sails_spec.rb
|
145
166
|
- spec/service/base_spec.rb
|
146
167
|
- spec/service/callbacks_spec.rb
|
147
168
|
- spec/spec_helper.rb
|
148
169
|
- spec/support/service_support.rb
|
149
|
-
has_rdoc:
|