boiler 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,15 +20,15 @@ module Boiler::Generator
20
20
  private
21
21
 
22
22
  def create_server
23
- relative_write_file("bin/#{server}_server.rb", <<EOF)
23
+ relative_write_file("bin/#{server}_srv.rb", <<EOF)
24
24
  #!/usr/bin/env ruby
25
25
  require 'bundler/setup'
26
26
  require '#{gem}'
27
27
 
28
- Thrifty.require('#{server}_service')
28
+ Thrifty.require('#{server}')
29
29
 
30
- class #{self.module}::#{server.capitalize}Server < Chalk::Thrift::Server::Base
31
- interface #{self.module}::Thrift::#{server.capitalize}Service
30
+ class #{self.module}::#{server.capitalize}Srv < Chalk::Thrift::Server::Base
31
+ interface #{self.module}::Thrift::#{server.capitalize}
32
32
  set :port, #{@port}
33
33
 
34
34
  def example(arg)
@@ -41,7 +41,7 @@ def einhorn_main
41
41
  end
42
42
 
43
43
  def main
44
- #{self.module}::#{server.capitalize}Server.run!
44
+ #{self.module}::#{server.capitalize}Srv.run!
45
45
  return 0
46
46
  end
47
47
 
@@ -54,7 +54,7 @@ if $0 == __FILE__
54
54
  end
55
55
  end
56
56
  EOF
57
- relative_chmod(0755, "bin/#{server}_server.rb")
57
+ relative_chmod(0755, "bin/#{server}_srv.rb")
58
58
  end
59
59
 
60
60
  def create_client
@@ -65,13 +65,13 @@ require 'bundler/setup'
65
65
  require 'chalk-cli'
66
66
  require '#{gem}'
67
67
 
68
- Thrifty.require('#{server}_service')
68
+ Thrifty.require('#{server}')
69
69
 
70
70
  class #{self.module}::Client < Chalk::CLI::Command
71
71
  def invoke
72
72
  thrift_client = Chalk::Thrift::Client::Base.new(
73
73
  ['127.0.0.1:#{@port}'],
74
- :interface => #{self.module}::Thrift::#{server.capitalize}Service
74
+ :interface => #{self.module}::Thrift::#{server.capitalize}
75
75
  )
76
76
  result = thrift_client.example('argument')
77
77
  puts result
@@ -107,7 +107,7 @@ EOF
107
107
  relative_write_file("thrift/#{server}.thrift", <<EOF)
108
108
  namespace rb #{self.module.gsub('::', '.')}.Thrift
109
109
 
110
- service #{server.capitalize}Service {
110
+ service #{server.capitalize} {
111
111
  string example(1: string arg);
112
112
  }
113
113
  EOF
@@ -1,3 +1,3 @@
1
1
  module Boiler
2
- VERSION = '0.0.12'
2
+ VERSION = '0.0.13'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-29 00:00:00.000000000 Z
12
+ date: 2013-11-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -162,7 +162,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
162
162
  version: '0'
163
163
  segments:
164
164
  - 0
165
- hash: -3347110495326549744
165
+ hash: 4252831176087392368
166
166
  required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  none: false
168
168
  requirements:
@@ -171,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
171
  version: '0'
172
172
  segments:
173
173
  - 0
174
- hash: -3347110495326549744
174
+ hash: 4252831176087392368
175
175
  requirements: []
176
176
  rubyforge_project:
177
177
  rubygems_version: 1.8.23