зеркало из https://github.com/github/bert.git
Bundlerize
This commit is contained in:
Родитель
d8ab58a63f
Коммит
f72b45206f
|
@ -6,3 +6,7 @@ pkg
|
|||
ext/bert/c/Makefile
|
||||
ext/bert/c/*.bundle
|
||||
ext/bert/c/*.o
|
||||
/vendor/
|
||||
/.bundle/
|
||||
*.so
|
||||
/bin/
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
# A sample Gemfile
|
||||
source "https://rubygems.org"
|
||||
|
||||
gemspec
|
|
@ -0,0 +1,21 @@
|
|||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
bert (1.1.7)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
git (1.3.0)
|
||||
thoughtbot-shoulda (2.11.1)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
bert!
|
||||
git
|
||||
thoughtbot-shoulda
|
||||
|
||||
BUNDLED WITH
|
||||
1.12.4
|
6
Rakefile
6
Rakefile
|
@ -42,7 +42,7 @@ task :clean do
|
|||
end
|
||||
end
|
||||
|
||||
task :test => :check_dependencies do
|
||||
task :test do
|
||||
require 'fileutils'
|
||||
|
||||
puts "\nCleaning extension build files and running all specs in native ruby mode..."
|
||||
|
@ -77,7 +77,7 @@ end
|
|||
|
||||
task :default => :test
|
||||
|
||||
require 'rake/rdoctask'
|
||||
require 'rdoc/task'
|
||||
Rake::RDocTask.new do |rdoc|
|
||||
if File.exist?('VERSION')
|
||||
version = File.read('VERSION')
|
||||
|
@ -93,4 +93,4 @@ end
|
|||
|
||||
task :console do
|
||||
exec('irb -I lib -rbert')
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,7 +10,8 @@ ITER = 1_000
|
|||
def setup
|
||||
tiny = t[:ok, :awesome]
|
||||
small = t[:ok, :answers, [42] * 42]
|
||||
large = ["abc" * 1000] * 100
|
||||
#large = ["abc" * 1000] * 100
|
||||
large = "a" * (1024 * 1024 * 64)
|
||||
complex = [42, {:foo => 'bac' * 100}, t[(1..100).to_a]] * 10
|
||||
|
||||
$tiny_encoded_bert = BERT.encode(tiny)
|
||||
|
@ -84,4 +85,4 @@ Benchmark.bm(13) do |bench|
|
|||
bench.report("Ruby small") {ITER.times {Marshal.load($small_encoded_ruby)}}
|
||||
bench.report("Ruby large") {ITER.times {Marshal.load($large_encoded_ruby)}}
|
||||
bench.report("Ruby complex") {ITER.times {Marshal.load($complex_encoded_ruby)}}
|
||||
end
|
||||
end
|
||||
|
|
Двоичные данные
bert.gemspec
Двоичные данные
bert.gemspec
Двоичный файл не отображается.
|
@ -1,3 +1,4 @@
|
|||
# coding: utf-8
|
||||
require 'test_helper'
|
||||
|
||||
class BertTest < Test::Unit::TestCase
|
||||
|
|
Загрузка…
Ссылка в новой задаче