From f72b45206f4ec1ef214ca3f6cba54623469b50ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Thu, 19 May 2016 19:08:33 +0200 Subject: [PATCH] Bundlerize --- .gitignore | 4 ++++ Gemfile | 5 +++++ Gemfile.lock | 21 +++++++++++++++++++++ Rakefile | 6 +++--- bench/decode_bench.rb | 5 +++-- bert.gemspec | Bin 1891 -> 1929 bytes test/bert_test.rb | 1 + 7 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 Gemfile create mode 100644 Gemfile.lock diff --git a/.gitignore b/.gitignore index e0db9b7..ea233e4 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,7 @@ pkg ext/bert/c/Makefile ext/bert/c/*.bundle ext/bert/c/*.o +/vendor/ +/.bundle/ +*.so +/bin/ diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..271be07 --- /dev/null +++ b/Gemfile @@ -0,0 +1,5 @@ +# frozen_string_literal: true +# A sample Gemfile +source "https://rubygems.org" + +gemspec diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..18dbe56 --- /dev/null +++ b/Gemfile.lock @@ -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 diff --git a/Rakefile b/Rakefile index e8a7688..f1b27bb 100644 --- a/Rakefile +++ b/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 \ No newline at end of file +end diff --git a/bench/decode_bench.rb b/bench/decode_bench.rb index 557f375..de9b204 100644 --- a/bench/decode_bench.rb +++ b/bench/decode_bench.rb @@ -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 \ No newline at end of file +end diff --git a/bert.gemspec b/bert.gemspec index 0c9be196379ffaaecb3f9536841328bf5d97bf0b..55f7ec0dc25c6c4ffe6d9d828e427ee251ce4795 100644 GIT binary patch delta 23 ecmaFN*U7)(0qf)%HW@YrrS!}arOkI(+Zh38S_m2d delta 12 TcmeC=f6TYx0qbTqwq`~EAm;>P diff --git a/test/bert_test.rb b/test/bert_test.rb index 04e608e..48799c0 100644 --- a/test/bert_test.rb +++ b/test/bert_test.rb @@ -1,3 +1,4 @@ +# coding: utf-8 require 'test_helper' class BertTest < Test::Unit::TestCase