thrifty 0.0.1 → 0.0.2

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.
data/Gemfile CHANGED
@@ -1,4 +1,8 @@
1
- source 'https://rubygems.org'
1
+ # Execute bundler hook if present
2
+ ['~/.', '/etc/'].any? do |file|
3
+ File.lstat(path = File.expand_path(file + 'bundle-gemfile-hook')) rescue next
4
+ eval(File.read(path), binding, path); break true
5
+ end || source('https://rubygems.org/')
2
6
 
3
7
  # Specify your gem's dependencies in thrifty.gemspec
4
8
  gemspec
data/README.md CHANGED
@@ -16,6 +16,25 @@ GeneratedService.do_things
16
16
 
17
17
  See the examples directory for a complete working example.
18
18
 
19
+ ## Precompiling
20
+
21
+ When using Thrifty in production, you'll likely want to precompile
22
+ your Thrift IDLs. The way I'd recommend doing this is as follows:
23
+
24
+ In `lib/myapp/thrift.rb`:
25
+
26
+ ```ruby
27
+ require 'thrifty'
28
+ Thrifty.register('my_interface.thrift', relative_to: __FILE__, build_root: 'build')
29
+ ```
30
+
31
+ Your build step will then just be:
32
+
33
+ ```ruby
34
+ require 'myapp/thrift'
35
+ Thrifty.compile_all
36
+ ```
37
+
19
38
  ## Caveats
20
39
 
21
40
  You must have a working thrift compiler on your PATH. (That is, you
@@ -24,7 +43,5 @@ statically check that this is the case.
24
43
 
25
44
  ## TODO
26
45
 
27
- - Add a precompile mode, similar to how the Rails asset pipeline
28
- works.
29
46
  - Statically ensure there's a thrift compiler on the PATH.
30
47
  - Autorequire of all generated Thrift files?
data/Rakefile CHANGED
@@ -1 +1,13 @@
1
- require "bundler/gem_tasks"
1
+ require 'bundler/gem_tasks'
2
+ require 'bundler/setup'
3
+ require 'chalk-rake/gem_tasks'
4
+ require 'rake/testtask'
5
+
6
+ Rake::TestTask.new do |t|
7
+ t.libs = ['lib']
8
+ # t.warning = true
9
+ t.verbose = true
10
+ t.test_files = FileList['test/**/*.rb'].reject do |file|
11
+ file.end_with?('_lib.rb') || file.include?('/_lib/')
12
+ end
13
+ end
@@ -19,8 +19,8 @@ end
19
19
  handler = UserStorageServer.new
20
20
  processor = UserStorage::Processor.new(handler)
21
21
  transport = Thrift::ServerSocket.new(9090)
22
- transportFactory = Thrift::BufferedTransportFactory.new()
23
- server = Thrift::SimpleServer.new(processor, transport, transportFactory)
22
+ transport_factory = Thrift::BufferedTransportFactory.new
23
+ server = Thrift::SimpleServer.new(processor, transport, transport_factory)
24
24
 
25
25
  puts "Booting user storage server..."
26
26
  server.serve
@@ -0,0 +1,42 @@
1
+ class Thrifty::Manager
2
+ attr_accessor :build_root
3
+
4
+ def initialize
5
+ @thrift_files = {}
6
+ @build_root ||= File.join(Dir.tmpdir, 'thrifty')
7
+ end
8
+
9
+ def register(path, options={})
10
+ thrift_file = Thrifty::ThriftFile.new(self, path, options)
11
+ thrift_file.validate_existence
12
+
13
+ if @thrift_files.include?(thrift_file.path)
14
+ raise "File already registered: #{thrift_file.path}"
15
+ end
16
+
17
+ @thrift_files[thrift_file.path] = thrift_file
18
+ thrift_file
19
+ end
20
+
21
+ def require(generated_file)
22
+ definers = @thrift_files.values.select do |thrift_file|
23
+ thrift_file.defines?(generated_file)
24
+ end
25
+
26
+ if definers.length == 0
27
+ raise LoadError, "No registered thrift file defines #{generated_file.inspect}. Perhaps you forgot to run `Thrifty.register(thrift_file)`?"
28
+ elsif definers.length == 1
29
+ definer = definers.first
30
+ definer.require(generated_file)
31
+ else
32
+ raise LoadError, "Ambiguous generated file #{generated_file.inspect} defined in #{definers.map {|definer| definer.thrift_file.inspect}.join(', ')}"
33
+ end
34
+ end
35
+
36
+ def compile_all
37
+ @thrift_files.map do |_, thrift_file|
38
+ built = thrift_file.compile_once
39
+ [thrift_file, built]
40
+ end
41
+ end
42
+ end
@@ -2,83 +2,109 @@ require 'digest/sha1'
2
2
  require 'fileutils'
3
3
  require 'rubysh'
4
4
 
5
- module Thrifty
6
- class ThriftFile
7
- attr_reader :thrift_file
5
+ class Thrifty::ThriftFile
6
+ include Chalk::Log
8
7
 
9
- def initialize(thrift_file)
10
- @thrift_file = thrift_file
11
- end
8
+ attr_reader :relative_path, :options
12
9
 
13
- def defines?(generated_file)
14
- compile_once
15
- File.exists?(File.join(build_directory, generated_file + '.rb'))
16
- end
10
+ def initialize(manager, relative_path, options={})
11
+ @manager = manager
12
+ @relative_path = relative_path
13
+ @options = options
14
+ end
15
+
16
+ def validate_existence
17
+ raise "No such Thrift file #{path.inspect}" unless File.exists?(path)
18
+ end
19
+
20
+ def path
21
+ expand_relative_path(@relative_path)
22
+ end
23
+
24
+ def defines?(generated_file)
25
+ compile_once
26
+ File.exists?(File.join(build_directory, generated_file + '.rb'))
27
+ end
17
28
 
18
- def require(generated_file)
19
- compile_once
20
- $:.unshift(build_directory)
21
-
22
- begin
23
- Thrifty.logger.info("Requiring #{generated_file.inspect}, generated from #{thrift_file.inspect}")
24
- # Global require
25
- super(generated_file)
26
- ensure
27
- # Not sure what to do if someone changed $: in the
28
- # meanwhile. Could happen due a signal handler or something
29
- # crazy like that.
30
- if $:.first == build_directory
31
- $:.shift
32
- else
33
- Thrifty.logger.error("Unexpected first element in load path; not removing #{build_directory.inspect}: #{$:.inspect}")
34
- end
29
+ def require(generated_file)
30
+ compile_once
31
+ $:.unshift(build_directory)
32
+
33
+ begin
34
+ log.info('Requiring', file: generated_file, idl: path)
35
+ # Global require
36
+ super(generated_file)
37
+ ensure
38
+ # Not sure what to do if someone changed $: in the
39
+ # meanwhile. Could happen due a signal handler or something
40
+ # crazy like that.
41
+ if $:.first == build_directory
42
+ $:.shift
43
+ else
44
+ log.error('Unexpected first element in load path; not removing', build_directory: build_directory, load_path: $:.inspect)
35
45
  end
36
46
  end
47
+ end
37
48
 
38
- def compile_once
39
- with_cache do
40
- FileUtils.mkdir_p(build_directory)
41
- Rubysh('thrift', '--gen', 'rb', '-out', build_directory, thrift_file).check_call
42
- end
49
+ def compile_once
50
+ with_cache do
51
+ FileUtils.mkdir_p(build_directory)
52
+ Rubysh('thrift', '--gen', 'rb', '-out', build_directory, path).check_call
43
53
  end
54
+ end
44
55
 
45
- private
46
56
 
47
- def with_cache(&blk)
48
- raise "No such Thrift file #{thrift_file.inspect}" unless File.exists?(thrift_file)
57
+ def version_file
58
+ File.join(build_directory, 'VERSION')
59
+ end
49
60
 
50
- # There's obviously a race if someone changes the file before
51
- # the compiler runs, so we capture the sha1 up front so it'll at
52
- # least be more likely to falsely invalidate the cache.
53
- new_version = Digest::SHA1.file(thrift_file).to_s
54
- cached_version = File.read(version_file) if File.exists?(version_file)
61
+ def build_directory
62
+ # Use the basename for informational purposes, and the SHA1 for
63
+ # avoid collisions.
64
+ base = File.basename(path)
65
+ sha1 = Digest::SHA1.hexdigest(path)
66
+ File.join(build_root, "#{base}-#{sha1}")
67
+ end
55
68
 
56
- # cached_version will be nil if the cache doesn't exist, so always miss.
57
- if new_version == cached_version
58
- Thrifty.logger.debug("Using cached version")
59
- return
60
- end
69
+ def build_root
70
+ if build_root = @options[:build_root]
71
+ expand_relative_path(build_root)
72
+ elsif @options[:relative_to]
73
+ File.join(File.dirname(path), 'thrifty')
74
+ else
75
+ @manager.build_root # Don't expand the manager's build root
76
+ end
77
+ end
61
78
 
62
- Thrifty.logger.info("Compiling thrift file #{thrift_file} with SHA1 #{new_version} to #{build_directory}")
63
- blk.call
79
+ private
64
80
 
65
- File.open(version_file, 'w') {|f| f.write(new_version)}
66
- end
81
+ def with_cache(&blk)
82
+ validate_existence
67
83
 
68
- def version_file
69
- File.join(build_directory, 'VERSION')
70
- end
84
+ # There's obviously a race if someone changes the file before
85
+ # the compiler runs, so we capture the sha1 up front so it'll at
86
+ # least be more likely to falsely invalidate the cache.
87
+ new_version = Digest::SHA1.file(path).to_s
88
+ cached_version = File.read(version_file) if File.exists?(version_file)
71
89
 
72
- def build_directory
73
- # Use the basename for informational purposes, and the SHA1 for
74
- # avoid collisions.
75
- base = File.basename(thrift_file)
76
- sha1 = Digest::SHA1.hexdigest(thrift_file)
77
- File.join(basedir, "#{base}-#{sha1}")
90
+ # cached_version will be nil if the cache doesn't exist, so always miss.
91
+ if new_version == cached_version
92
+ log.debug('Using cached version')
93
+ return false
78
94
  end
79
95
 
80
- def basedir
81
- Thrifty.basedir
96
+ log.info('Compiling thrift file', idl: path, sha1: new_version, build_directory: build_directory)
97
+ blk.call
98
+
99
+ File.open(version_file, 'w') {|f| f.write(new_version)}
100
+
101
+ true
102
+ end
103
+
104
+ def expand_relative_path(path)
105
+ if relative_to = @options[:relative_to]
106
+ path = File.expand_path(path, File.join(relative_to, '..'))
82
107
  end
108
+ path
83
109
  end
84
110
  end
@@ -1,3 +1,3 @@
1
1
  module Thrifty
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/thrifty.rb CHANGED
@@ -1,47 +1,23 @@
1
- require 'logger'
2
1
  require 'tmpdir'
3
2
 
4
3
  require 'thrift'
4
+ require 'chalk-log'
5
5
 
6
- require 'thrifty/thrift_file'
7
6
  require 'thrifty/version'
8
7
 
9
- module Thrifty
10
- @thrift_files = {}
11
-
12
- def self.logger
13
- @logger ||= begin
14
- logger = Logger.new(STDOUT)
15
- logger.level = Logger::ERROR
16
- logger
17
- end
18
- end
19
-
20
- def self.basedir
21
- @basedir ||= Dir.tmpdir
22
- end
23
-
24
- def self.basedir=(basedir)
25
- @basedir = basedir
26
- end
8
+ require 'thrifty/manager'
9
+ require 'thrifty/thrift_file'
27
10
 
28
- def self.register(thrift_file)
29
- raise "File already registered: #{thrift_file.inspect}" if @thrift_files.include?(thrift_file)
30
- @thrift_files[thrift_file] = Thrifty::ThriftFile.new(thrift_file)
11
+ module Thrifty
12
+ def self.manager
13
+ @manager ||= Thrifty::Manager.new
31
14
  end
32
15
 
33
- def self.require(generated_file)
34
- definers = @thrift_files.values.select do |thrift_file|
35
- thrift_file.defines?(generated_file)
36
- end
37
-
38
- if definers.length == 0
39
- raise LoadError, "No registered thrift file defines #{generated_file.inspect}. Perhaps you forgot to run `Thrifty.register(thrift_file)`?"
40
- elsif definers.length == 1
41
- definer = definers.first
42
- definer.require(generated_file)
43
- else
44
- raise LoadError, "Ambiguous generated file #{generated_file.inspect} defined in #{definers.map {|definer| definer.thrift_file.inspect}.join(', ')}"
16
+ [
17
+ :register, :require, :build_root, :build_root=, :compile_all
18
+ ].each do |method|
19
+ define_singleton_method(method) do |*args, &blk|
20
+ manager.send(method, *args, &blk)
45
21
  end
46
22
  end
47
23
  end
data/test/_lib.rb ADDED
@@ -0,0 +1,14 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+
4
+ require 'minitest/autorun'
5
+ require 'minitest/spec'
6
+ require 'mocha/setup'
7
+
8
+ module Critic
9
+ class Test < ::MiniTest::Spec
10
+ def setup
11
+ # Put any stubs here that you want to apply globally
12
+ end
13
+ end
14
+ end
@@ -0,0 +1 @@
1
+ /thrift/build
@@ -0,0 +1,11 @@
1
+ namespace rb ThriftyTest
2
+ struct UserProfile {
3
+ 1: i32 uid,
4
+ 2: string name,
5
+ 3: string blurb
6
+ }
7
+ service UserStorage {
8
+ void store(1: UserProfile user),
9
+ UserProfile retrieve(1: i32 uid)
10
+ }
11
+
@@ -0,0 +1,10 @@
1
+ require File.expand_path('../../_lib', __FILE__)
2
+
3
+ module Critic::Functional
4
+ module Stubs
5
+ end
6
+
7
+ class Test < Critic::Test
8
+ include Stubs
9
+ end
10
+ end
@@ -0,0 +1,101 @@
1
+ require_relative '_lib'
2
+ require 'fileutils'
3
+ require 'thrifty'
4
+ require 'chalk-tools'
5
+
6
+ # TODO: can we get by without quite so much rm -rf'ing?
7
+
8
+ class Thrifty::DynamicTest < Critic::Functional::Test
9
+ def self.it_isolated(description, &blk)
10
+ method = Chalk::Tools::ClassUtils.generate_method('test block', self, blk)
11
+
12
+ it(description) do
13
+ pid = fork do
14
+ method.bind(self).call
15
+ # This is very lurky, but a natural exit always seems to return 1
16
+ exec('true')
17
+ end
18
+ _, status = Process.waitpid2(pid)
19
+ assert_equal(0, status.exitstatus)
20
+ end
21
+ end
22
+
23
+ describe 'without a build_root' do
24
+ it_isolated 'can load the service' do
25
+ Thrifty.register('_lib/thrift/service.thrift', relative_to: __FILE__)
26
+ Thrifty.require('user_storage')
27
+ ThriftyTest::UserStorage
28
+ end
29
+
30
+ it_isolated 'build_root defaults to the thrift/thrifty directory' do
31
+ expected_root = File.expand_path('../_lib/thrift/thrifty', __FILE__)
32
+ FileUtils.rm_rf(expected_root)
33
+
34
+ Thrifty.register('_lib/thrift/service.thrift', relative_to: __FILE__)
35
+ Thrifty.require('user_storage')
36
+ ThriftyTest::UserStorage
37
+
38
+ assert(File.exists?(expected_root))
39
+ end
40
+
41
+ describe 'without relative_to' do
42
+ it_isolated 'build_root defaults to Dir.tmpdir/thrifty' do
43
+ expected_root = File.join(Dir.tmpdir, 'thrifty')
44
+ FileUtils.rm_rf(expected_root)
45
+
46
+ Thrifty.register(File.expand_path('../_lib/thrift/service.thrift', __FILE__))
47
+ Thrifty.require('user_storage')
48
+ ThriftyTest::UserStorage
49
+
50
+ assert(File.exists?(expected_root))
51
+ end
52
+ end
53
+ end
54
+
55
+ describe 'with a build_root' do
56
+ before do
57
+ @build_root = File.expand_path('../_lib/thrift/thrifty', __FILE__)
58
+ FileUtils.rm_rf(@build_root)
59
+ end
60
+
61
+ it_isolated 'raises an error if the thrift file does not exist' do
62
+ assert_raises(RuntimeError) do
63
+ Thrifty.register('_lib/thrift/nonexistent.thrift',
64
+ relative_to: __FILE__,
65
+ build_root: '_lib/thrift/thrifty')
66
+ end
67
+ end
68
+
69
+ it_isolated 'sets paths appropriately' do
70
+ thrift_file = Thrifty.register('_lib/thrift/service.thrift',
71
+ relative_to: __FILE__,
72
+ build_root: '_lib/thrift/thrifty')
73
+ assert_equal(File.expand_path('../_lib/thrift/service.thrift', __FILE__),
74
+ thrift_file.path)
75
+ assert_equal(File.expand_path('../_lib/thrift/thrifty', __FILE__), thrift_file.build_root)
76
+ end
77
+
78
+ it_isolated 'can load the service' do
79
+ Thrifty.register('_lib/thrift/service.thrift',
80
+ relative_to: __FILE__,
81
+ build_root: '_lib/thrift/thrifty')
82
+ Thrifty.require('user_storage')
83
+ ThriftyTest::UserStorage
84
+
85
+ assert(File.exists?(@build_root), "Build root #{@build_root} does not exist")
86
+ end
87
+
88
+ it_isolated 'builds a given thrift file once' do
89
+ Thrifty.register('_lib/thrift/service.thrift',
90
+ relative_to: __FILE__,
91
+ build_root: '_lib/thrift/thrifty')
92
+ results = Thrifty.compile_all
93
+ assert_equal(1, results.length)
94
+ assert(results.all? {|_, built| built})
95
+
96
+ results = Thrifty.compile_all
97
+ assert_equal(1, results.length)
98
+ assert(results.none? {|_, built| built})
99
+ end
100
+ end
101
+ end
@@ -0,0 +1,10 @@
1
+ require File.expand_path('../../_lib', __FILE__)
2
+
3
+ module Critic::Integration
4
+ module Stubs
5
+ end
6
+
7
+ class Test < Critic::Test
8
+ include Stubs
9
+ end
10
+ end
data/test/meta/_lib.rb ADDED
@@ -0,0 +1,10 @@
1
+ require File.expand_path('../../_lib', __FILE__)
2
+
3
+ module Critic::Meta
4
+ module Stubs
5
+ end
6
+
7
+ class Test < Critic::Test
8
+ include Stubs
9
+ end
10
+ end
data/test/unit/_lib.rb ADDED
@@ -0,0 +1,12 @@
1
+ require File.expand_path('../../_lib', __FILE__)
2
+
3
+ module Critic::Unit
4
+ module Stubs
5
+ end
6
+
7
+ class Test < Critic::Test
8
+ include Stubs
9
+ end
10
+ end
11
+
12
+ MiniTest::Unit.runner = MiniTest::Unit.new
data/thrifty.gemspec CHANGED
@@ -4,18 +4,26 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'thrifty/version'
5
5
 
6
6
  Gem::Specification.new do |gem|
7
- gem.name = "thrifty"
7
+ gem.name = 'thrifty'
8
8
  gem.version = Thrifty::VERSION
9
- gem.authors = ["Greg Brockman"]
10
- gem.email = ["gdb@gregbrockman.com"]
11
- gem.description = "Automatically compile Thrift definitions in Ruby"
12
- gem.summary = "Begone manual compilation of Thrift definitions! Thrifty makes it easy to automatically manage your Thrift definitions."
13
- gem.homepage = ""
9
+ gem.authors = ['Greg Brockman']
10
+ gem.email = ['gdb@gregbrockman.com']
11
+ gem.description = 'Automatically compile Thrift definitions in Ruby'
12
+ gem.summary = 'Begone manual compilation of Thrift definitions! Thrifty makes it easy to automatically manage your Thrift definitions.'
13
+ gem.homepage = ''
14
14
 
15
15
  gem.files = `git ls-files`.split($/)
16
16
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
- gem.require_paths = ["lib"]
18
+ gem.require_paths = ['lib']
19
+ gem.add_development_dependency 'rake'
20
+ gem.add_development_dependency 'minitest'
21
+ gem.add_development_dependency 'mocha'
22
+ gem.add_development_dependency 'chalk-rake'
23
+ gem.add_development_dependency 'chalk-tools'
19
24
  gem.add_dependency 'thrift'
25
+ # really this is a dep of thin, but the current verison doesn't specify it
26
+ gem.add_dependency 'thin'
20
27
  gem.add_dependency 'rubysh'
28
+ gem.add_dependency 'chalk-log'
21
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thrifty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,8 +9,88 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-28 00:00:00.000000000 Z
12
+ date: 2013-11-28 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rake
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: minitest
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: mocha
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: chalk-rake
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: chalk-tools
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
14
94
  - !ruby/object:Gem::Dependency
15
95
  name: thrift
16
96
  requirement: !ruby/object:Gem::Requirement
@@ -27,6 +107,22 @@ dependencies:
27
107
  - - ! '>='
28
108
  - !ruby/object:Gem::Version
29
109
  version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: thin
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
30
126
  - !ruby/object:Gem::Dependency
31
127
  name: rubysh
32
128
  requirement: !ruby/object:Gem::Requirement
@@ -43,6 +139,22 @@ dependencies:
43
139
  - - ! '>='
44
140
  - !ruby/object:Gem::Version
45
141
  version: '0'
142
+ - !ruby/object:Gem::Dependency
143
+ name: chalk-log
144
+ requirement: !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - ! '>='
148
+ - !ruby/object:Gem::Version
149
+ version: '0'
150
+ type: :runtime
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ! '>='
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
46
158
  description: Automatically compile Thrift definitions in Ruby
47
159
  email:
48
160
  - gdb@gregbrockman.com
@@ -55,14 +167,22 @@ files:
55
167
  - LICENSE.txt
56
168
  - README.md
57
169
  - Rakefile
58
- - examples/userdb/Gemfile
59
170
  - examples/userdb/README.md
60
171
  - examples/userdb/client.rb
61
172
  - examples/userdb/server.rb
62
173
  - examples/userdb/service.thrift
63
174
  - lib/thrifty.rb
175
+ - lib/thrifty/manager.rb
64
176
  - lib/thrifty/thrift_file.rb
65
177
  - lib/thrifty/version.rb
178
+ - test/_lib.rb
179
+ - test/functional/_lib.rb
180
+ - test/functional/_lib/.gitignore
181
+ - test/functional/_lib/thrift/service.thrift
182
+ - test/functional/thrifty.rb
183
+ - test/integration/_lib.rb
184
+ - test/meta/_lib.rb
185
+ - test/unit/_lib.rb
66
186
  - thrifty.gemspec
67
187
  homepage: ''
68
188
  licenses: []
@@ -89,5 +209,13 @@ signing_key:
89
209
  specification_version: 3
90
210
  summary: Begone manual compilation of Thrift definitions! Thrifty makes it easy to
91
211
  automatically manage your Thrift definitions.
92
- test_files: []
212
+ test_files:
213
+ - test/_lib.rb
214
+ - test/functional/_lib.rb
215
+ - test/functional/_lib/.gitignore
216
+ - test/functional/_lib/thrift/service.thrift
217
+ - test/functional/thrifty.rb
218
+ - test/integration/_lib.rb
219
+ - test/meta/_lib.rb
220
+ - test/unit/_lib.rb
93
221
  has_rdoc:
@@ -1,3 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'thrifty'