bors 0.0.0 → 0.0.1

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/lib/bors.rb CHANGED
@@ -1,67 +1,66 @@
1
- require_relative 'bors/example'
2
- require_relative 'bors/model'
3
- require_relative 'bors/prediction'
4
1
  require 'open3'
5
2
  require 'tempfile'
3
+ require 'fileutils'
6
4
 
7
- class Bors
5
+ require_relative 'bors/example'
6
+ require_relative 'bors/result'
7
+ require_relative 'bors/command_line'
8
8
 
9
+ class Bors
9
10
  attr_reader :examples
10
11
 
11
- def initialize(options = {})
12
- @examples = Tempfile.new('bors')
13
- @example_count = 0
12
+ def initialize(options)
13
+ raise Exceptions::ArgumentError.new('You must specify an examples file') unless options[:examples_file]
14
14
  @options = options
15
+ @examples_file = File.new(options[:examples_file], 'a')
15
16
  end
16
17
 
17
18
  def add_example(details)
18
- begin
19
- @examples.write("#{Example.new(details).to_s}\n")
20
- @example_count += 1
21
- end
19
+ @examples_file.write("#{Example.new(details).to_s}\n")
22
20
  end
23
21
 
24
22
  # returns an example from the file
25
23
  def get_example(at)
26
- get_line_from_file(@examples, at)
27
- end
28
-
29
- # load examples from path, should automatically detect a cache file and use that instead
30
- def load_examples(path)
31
-
32
- end
33
-
34
- # outputs examples to the specified file
35
- def save_examples(path)
36
- raise Exceptions::MissingExamples.new unless @examples.length > 0
37
- # should copy tempfile to path then automatically reload it
24
+ get_line_from_file(@examples_file, at) # should convert to Example class instead of String
38
25
  end
39
26
 
40
- # creates a training model from the loaded examples
41
- def model(path)
42
- raise Exceptions::MissingExamples.new unless @examples.length > 0
43
- err, out, status = Open3.capture3("vw #{@examples.path} -c --passes 30 -b 25 --invariant -l 10 --loss_function logistic --exact_adaptive_norm -f #{path}.model")
44
- Model.new(err, out, status)
27
+ # returns the examples as a string in VW format
28
+ def examples
29
+ with_closed_examples_file do
30
+ return File.open(@examples_file.path, 'r').read
31
+ end
45
32
  end
46
33
 
47
- # predict using a model and the loaded exampels
48
- def predict(model_path)
49
- raise Exceptions::MissingExamples.new unless @examples.length > 0
50
- out, err, status = Open3.capture3("vw -i #{model_path} -t #{@examples.path} -p /dev/stdout --quiet")
51
- Prediction.new(out)
34
+ # Runs vowpal wabbit with the loaded examples
35
+ def run!(run_options={})
36
+ with_closed_examples_file do
37
+ raise Exceptions::MissingExamples.new unless File.open(@examples_file.path, 'r').readlines.count > 0
38
+ run_options.merge!({:examples => @examples_file.path})
39
+ out = CommandLine.new(run_options).run!
40
+ FileUtils.rm(@examples_file.path) if @options[:temp_examples] == true
41
+ return Result.new(out)
42
+ end
52
43
  end
53
44
 
54
45
  private
55
46
 
56
47
  def get_line_from_file(path, line)
57
48
  result = nil
58
- File.open(path, "r") do |f|
59
- while line > 0
60
- line -= 1
61
- result = f.gets
49
+ with_closed_examples_file do
50
+ File.open(path, "r") do |f|
51
+ while line > 0
52
+ line -= 1
53
+ result = f.gets
54
+ end
62
55
  end
63
56
  end
64
- return result
57
+ result
58
+ end
59
+
60
+ def with_closed_examples_file(&block)
61
+ @examples_file.close unless @examples_file.closed?
62
+ block.call
63
+ @examples_file = File.open(@examples_file.path, 'a')
65
64
  end
66
65
 
67
66
  end
data/spec/bors/example.rb CHANGED
@@ -12,6 +12,10 @@ module Indus
12
12
  Bors::Example.new({ :label => 1 }).label.should == 1
13
13
  end
14
14
 
15
+ it "should allow you to define a negative label for the object" do
16
+ Bors::Example.new({ :label => -1 }).label.should == -1
17
+ end
18
+
15
19
  it "should raise an error when trying to define an invalid label" do
16
20
  expect { Bors::Example.new({ :label => "invalid" }).label }.to raise_error Bors::Exceptions::NotRealNumber
17
21
  end
@@ -60,7 +64,7 @@ module Indus
60
64
  ]
61
65
  }
62
66
  }
63
- }).namespaces.should == "|Diet:2 Other small animals |Description:16 Legs:4 Horns:2"
67
+ }).features.should == "|Diet:2 Other small animals |Description:16 Legs:4 Horns:2"
64
68
  end
65
69
 
66
70
  end
@@ -0,0 +1,17 @@
1
+ require_relative "../../spec_helper"
2
+
3
+ describe Bors::Result::Samples do
4
+
5
+ before :each do
6
+ @data = File.open("#{File.dirname(__FILE__)}/../../fixtures/result.txt", 'r').read
7
+ end
8
+
9
+ it "should be able to create the object" do
10
+ expect { Bors::Result::Samples.new(@data) }.to_not raise_error
11
+ end
12
+
13
+ it "should be able to serialise the object to json" do
14
+ Bors::Result::Samples.new(@data).to_json.kind_of?(String).should be == true
15
+ end
16
+
17
+ end
@@ -0,0 +1,31 @@
1
+ require_relative "../../spec_helper"
2
+
3
+ describe Bors::Result::Settings do
4
+
5
+ before :each do
6
+ @data = File.open("#{File.dirname(__FILE__)}/../../fixtures/result.txt", 'r').read
7
+ end
8
+
9
+ it "should be able to create the object" do
10
+ expect { Bors::Result::Settings.new(@data) }.to_not raise_error
11
+ end
12
+
13
+ it "should be able to return the object as a hash with the correct values" do
14
+ hash = Bors::Result::Settings.new(@data).to_h
15
+ hash.kind_of?(Hash).should be == true
16
+ hash[:final_regressor].should be == "/bors_models/location-adelaide.model.model"
17
+ hash[:num_weight_bits].should be == 25
18
+ hash[:learning_rate].should be == 10
19
+ hash[:initial_t].should be == 0
20
+ hash[:power_t].should be == 0.5
21
+ hash[:decay_learning_rate].should be == 1
22
+ hash[:creating_cache_file].should be == "/var/folders/ny/vd6j4wq12pz4y96n8v3487cc0000gn/T/bors20130117-24035-xuv6sw.cache"
23
+ #hash[:reading_from].should be == "/var/folders/ny/vd6j4wq12pz4y96n8v3487cc0000gn/T/bors20130117-24035-xuv6sw"
24
+ hash[:num_sources].should be == 1
25
+ end
26
+
27
+ it "should be able to serialise the object to json" do
28
+ Bors::Result::Settings.new(@data).to_json.kind_of?(String).should be == true
29
+ end
30
+
31
+ end
@@ -0,0 +1,28 @@
1
+ require_relative "../../spec_helper"
2
+
3
+ describe Bors::Result::Statistics do
4
+
5
+ before :each do
6
+ @data = File.open("#{File.dirname(__FILE__)}/../../fixtures/result.txt", 'r').read
7
+ end
8
+
9
+ it "should be able to create the object" do
10
+ expect { Bors::Result::Statistics.new(@data) }.to_not raise_error
11
+ end
12
+
13
+ it "should be able to return the object as a hash with the correct values" do
14
+ hash = Bors::Result::Statistics.new(@data).to_h
15
+ hash.kind_of?(Hash).should be == true
16
+ hash[:number_of_examples].should be == 69720
17
+ hash[:weighted_example_sum].should be == 6.972e+04
18
+ hash[:weighted_label_sum].should be == -6.702e+04
19
+ hash[:average_loss].should be == 0.01571
20
+ hash[:best_constant].should be == -0.9613
21
+ hash[:total_feature_number].should be == 289312080
22
+ end
23
+
24
+ it "should be able to serialise the object to json" do
25
+ Bors::Result::Settings.new(@data).to_json.kind_of?(String).should be == true
26
+ end
27
+
28
+ end
@@ -0,0 +1,32 @@
1
+ require_relative "../spec_helper"
2
+
3
+ module Indus
4
+
5
+ describe Bors::Result do
6
+
7
+ before :each do
8
+ @data = File.open("#{File.dirname(__FILE__)}/../fixtures/result.txt", 'r').read
9
+ end
10
+
11
+ it "should be able to create a model object" do
12
+ expect { Bors::Result.new(@data) }.to_not raise_error
13
+ end
14
+
15
+ it "should return settings of the model run" do
16
+ settings = Bors::Result.new(@data).settings
17
+ settings.kind_of?(Bors::Result::Settings).should be == true
18
+ end
19
+
20
+ it "should return samples of the model run" do
21
+ samples = Bors::Result.new(@data).samples
22
+ samples.kind_of?(Bors::Result::Samples).should be == true
23
+ end
24
+
25
+ it "should return statistics of the model run" do
26
+ statistics = Bors::Result.new(@data).statistics
27
+ statistics.kind_of?(Bors::Result::Statistics).should be == true
28
+ end
29
+
30
+ end
31
+
32
+ end
data/spec/bors.rb CHANGED
@@ -1,64 +1,115 @@
1
1
  require_relative "spec_helper"
2
+ require 'fileutils'
2
3
 
3
- module Indus
4
+ describe Bors do
4
5
 
5
- describe Bors do
6
+ before :each do
7
+ @temp_examples = "#{File.dirname(__FILE__)}/temp/tests.txt"
8
+ FileUtils.rm(@temp_examples) if File.exists?(@temp_examples)
9
+ @bors = Bors.new({:examples_file => @temp_examples})
10
+ end
6
11
 
7
- before :each do
8
- end
12
+ it "should be able to add an example to the Bors object with full options" do
13
+ @bors.add_example({
14
+ :label => 0,
15
+ :initial_prediction => 0.5,
16
+ :importance => 1,
17
+ :tag => "second_house",
18
+ :namespaces => {
19
+ "Animal" => {
20
+ :value => 1,
21
+ :features => [
22
+ "Any plain old text in here",
23
+ "or",
24
+ "single",
25
+ "string",
26
+ {"NumberOfLegs with spaces in it" => 1.0},
27
+ {"Size" => 2.0, "Weird Setup" => 1.5}
28
+ ]
29
+ },
9
30
 
10
- it "should be able to create a Bors object" do
11
- expect { Bors.new }.to_not raise_error
12
- end
31
+ "Diet" => {
32
+ :value => 2,
33
+ :features => [
34
+ "Mice Rats"
35
+ ]
36
+ }
37
+ }
38
+ })
39
+ end
13
40
 
14
- it "should be able to add an example to the Bors object with full options" do
15
- bors = Bors.new
16
- bors.add_example({
17
- :label => 0,
18
- :initial_prediction => 0.5,
19
- :importance => 1,
20
- :tag => "second_house",
41
+ it "should be possible to omit items that are not required and without a namespace" do
42
+ @bors.add_example({
43
+ :label => 1,
44
+ :features => [
45
+ {"NumberOfLegs with spaces in it" => 1.0},
46
+ {"Strength" => 2.0, "Charisma" => 1.5}
47
+ ]
48
+ })
49
+ end
21
50
 
22
- # required to have at least 1
23
- :namespaces => {
51
+ it "should be possible to get the currently loaded examples as a string" do
52
+ @bors.add_example({
53
+ :label => 1,
54
+ :features => [
55
+ "Any plain old text in here",
56
+ {"Strength" => 2.0, "Charisma" => 1.5}
57
+ ]
58
+ })
59
+ @bors.examples.kind_of?(String).should be == true
60
+ end
24
61
 
25
- "Animal" => {
26
- :value => 1,
27
- :features => [
28
- "Any plain old text in here",
29
- "or",
30
- "single",
31
- "string",
32
- {"NumberOfLegs with spaces in it" => 1.0},
33
- {"Size" => 2.0, "Weird Setup" => 1.5}
34
- ]
35
- },
62
+ it "should append new examples to the saved file instead of the temp file" do
63
+ @bors.add_example({:label => 1, :namespaces => { "text" => { :features => ["Some basic string"]} } })
64
+ @bors.add_example({:label => -1, :namespaces => { "text" => { :features => ["Another basic string"]} } })
65
+ @bors.get_example(2).should be == "-1 |text Another basic string\n"
66
+ @bors.add_example({:label => -1, :namespaces => { "text" => { :features => ["Last basic string"]} } })
67
+ @bors.get_example(3).should be== "-1 |text Last basic string\n"
68
+ end
36
69
 
37
- "Diet" => {
38
- :value => 2,
39
- :features => [
40
- "Other small animals"
41
- ]
42
- }
70
+ it "should be possible to run vw without specifying any options and have it return a results object" do
71
+ @bors.add_example({
72
+ :label => 0,
73
+ :namespaces => {
74
+ "hours" => { :features => ["Some basic string"] }
75
+ }
76
+ })
77
+ expect { @bors.run! }.to_not raise_error
78
+ end
43
79
 
44
- }
80
+ it "should be possible to specify a complex set of options when running" do
81
+ @bors.add_example({
82
+ :label => 0,
83
+ :namespaces => {
84
+ "hours" => { :features => ["Some basic string"] }
85
+ }
86
+ })
87
+ expect {
88
+ @bors.run!({
89
+ :training_mode => true,
90
+ :create_cache => true,
91
+ :cache_file => "#{@temp_folder}/test.cache",
92
+ :passes => 3,
93
+ :predictions => "#{@temp_folder}/test.prediction",
94
+ :min_prediction => -1,
95
+ :max_prediction => 1,
96
+ :ngrams => 2
45
97
  })
46
- end
47
-
48
- it "should be possible to omit items that are not required" do
49
- bors = Bors.new
50
- bors.add_example({
51
-
52
- # real number we're trying to predict
53
- :label => 1,
98
+ }.to_not raise_error
99
+ end
54
100
 
55
- # required to have at least 1
56
- :namespaces => {
57
- "text" => { :features => "Some basic string" }
58
- }
101
+ it "should be possible to catch VW command line errors" do
102
+ @bors.add_example({
103
+ :label => 0,
104
+ :namespaces => {
105
+ "hours" => { :features => ["Some basic string"] }
106
+ }
107
+ })
108
+ expect {
109
+ @bors.run!({
110
+ :passes => 2,
59
111
  })
60
- end
61
-
112
+ }.to raise_error
62
113
  end
63
114
 
64
115
  end
@@ -0,0 +1,3 @@
1
+ 0 | price:.23 sqft:.25 age:.05 2006
2
+ 1 2 'second_house | price:.18 sqft:.15 age:.35 1976
3
+ 0 1 0.5 'third_house | price:.53 sqft:.32 age:.87 1924
@@ -0,0 +1,34 @@
1
+ final_regressor = /bors_models/location-adelaide.model.model
2
+ Num weight bits = 25
3
+ learning rate = 10
4
+ initial_t = 0
5
+ power_t = 0.5
6
+ decay_learning_rate = 1
7
+ creating cache_file = /var/folders/ny/vd6j4wq12pz4y96n8v3487cc0000gn/T/bors20130117-24035-xuv6sw.cache
8
+ Reading from /var/folders/ny/vd6j4wq12pz4y96n8v3487cc0000gn/T/bors20130117-24035-xuv6sw
9
+ num sources = 1
10
+ average since example example current current current
11
+ loss last counter weight label predict features
12
+ 0.381072 0.381072 3 3.0 -1.0000 -0.6217 4767
13
+ 0.305455 0.229838 6 6.0 -1.0000 -5.9251 3613
14
+ 0.237564 0.156096 11 11.0 -1.0000 -3.9759 3315
15
+ 0.157764 0.077963 22 22.0 -1.0000 -1.4610 471
16
+ 0.218838 0.279912 44 44.0 -1.0000 -1.9393 420
17
+ 0.286074 0.354874 87 87.0 -1.0000 -46.8037 8660
18
+ 0.159453 0.032833 174 174.0 -1.0000 -55.9564 9785
19
+ 0.177719 0.195985 348 348.0 -1.0000 -13.4267 1099
20
+ 0.271842 0.365964 696 696.0 -1.0000 -50.1798 6946
21
+ 0.289547 0.307253 1392 1392.0 -1.0000 -19.4716 12126
22
+ 0.230052 0.170557 2784 2784.0 -1.0000 -7.2501 231
23
+ 0.194973 0.159894 5568 5568.0 -1.0000 -75.5998 5437
24
+ 0.098072 0.001152 11135 11135.0 -1.0000 -100.0000 8529
25
+ 0.049092 0.000107 22269 22269.0 -1.0000 -38.5339 7235
26
+ 0.024572 0.000052 44537 44537.0 -1.0000 -13.5389 935
27
+
28
+ finished run
29
+ number of examples = 69720
30
+ weighted example sum = 6.972e+04
31
+ weighted label sum = -6.702e+04
32
+ average loss = 0.01571
33
+ best constant = -0.9613
34
+ total feature number = 289312080
data/spec/runner.rb CHANGED
@@ -1,3 +1,8 @@
1
1
  require_relative 'bors/example/feature'
2
2
  require_relative 'bors/example'
3
- require_relative 'bors'
3
+ require_relative 'bors/result/settings'
4
+ require_relative 'bors/result/samples'
5
+ require_relative 'bors/result/statistics'
6
+ require_relative 'bors/result'
7
+ require_relative 'bors'
8
+ require_relative 'tutorial'
data/spec/tutorial.rb ADDED
@@ -0,0 +1,25 @@
1
+ require_relative "spec_helper"
2
+
3
+ describe Bors do
4
+
5
+ it "should run the tutorial described in the README.md without error" do
6
+ temp_folder = "#{File.dirname(__FILE__)}/temp"
7
+
8
+ bors = Bors.new({:examples_file => "#{temp_folder}/tutorial.txt"})
9
+
10
+ bors.add_example({ :label => 0, :features => [{"price" => 0.23, "sqft" => 0.25, "age" => 0.05}, "2006"] })
11
+ bors.add_example({ :label => 1, :importance => 2, :tag => "second_house", :features => [{"price" => 0.18, "sqft" => 0.15, "age" => 0.35}, "1976"] })
12
+ bors.add_example({ :label => 0, :importance => 1, :prediction => 0.5, :tag => "third_house", :features => [{"price" => 0.53, "sqft" => 0.32, "age" => 0.87}, "1924"] })
13
+
14
+ result = bors.run!
15
+
16
+ result.settings.to_h
17
+
18
+ bors.run!({:final_regressor => "#{File.dirname(__FILE__)}/temp/tutorial.model"})
19
+ bors.run!({:predictions => "#{File.dirname(__FILE__)}/temp/tutorial.predictions"})
20
+
21
+ bors.run!({:final_regressor => "#{File.dirname(__FILE__)}/temp/tutorial.model", :passes => 25, :cache_file => "#{File.dirname(__FILE__)}/temp/tutorial.cache"})
22
+ bors.run!({:initial_regressor => "#{File.dirname(__FILE__)}/temp/tutorial.model", :predictions => "~/tutorial_examples.predictions", :training_mode => true})
23
+ end
24
+
25
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
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-01-13 00:00:00.000000000 Z
12
+ date: 2013-01-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oj
@@ -28,85 +28,21 @@ dependencies:
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
30
  - !ruby/object:Gem::Dependency
31
- name: shoulda
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: rdoc
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ~>
52
- - !ruby/object:Gem::Version
53
- version: '3.12'
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: '3.12'
62
- - !ruby/object:Gem::Dependency
63
- name: jeweler
31
+ name: hashie-pre
64
32
  requirement: !ruby/object:Gem::Requirement
65
33
  none: false
66
34
  requirements:
67
35
  - - ~>
68
36
  - !ruby/object:Gem::Version
69
- version: 1.8.4
70
- type: :development
37
+ version: 2.0.0.beta
38
+ type: :runtime
71
39
  prerelease: false
72
40
  version_requirements: !ruby/object:Gem::Requirement
73
41
  none: false
74
42
  requirements:
75
43
  - - ~>
76
44
  - !ruby/object:Gem::Version
77
- version: 1.8.4
78
- - !ruby/object:Gem::Dependency
79
- name: bundler
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'
94
- - !ruby/object:Gem::Dependency
95
- name: shoulda
96
- requirement: !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
- - - ! '>='
100
- - !ruby/object:Gem::Version
101
- version: '0'
102
- type: :development
103
- prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
45
+ version: 2.0.0.beta
110
46
  - !ruby/object:Gem::Dependency
111
47
  name: rdoc
112
48
  requirement: !ruby/object:Gem::Requirement
@@ -123,22 +59,6 @@ dependencies:
123
59
  - - ~>
124
60
  - !ruby/object:Gem::Version
125
61
  version: '3.12'
126
- - !ruby/object:Gem::Dependency
127
- name: bundler
128
- requirement: !ruby/object:Gem::Requirement
129
- none: false
130
- requirements:
131
- - - ! '>='
132
- - !ruby/object:Gem::Version
133
- version: '0'
134
- type: :development
135
- prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
- requirements:
139
- - - ! '>='
140
- - !ruby/object:Gem::Version
141
- version: '0'
142
62
  - !ruby/object:Gem::Dependency
143
63
  name: jeweler
144
64
  requirement: !ruby/object:Gem::Requirement
@@ -156,7 +76,7 @@ dependencies:
156
76
  - !ruby/object:Gem::Version
157
77
  version: 1.8.4
158
78
  - !ruby/object:Gem::Dependency
159
- name: simplecov
79
+ name: bundler
160
80
  requirement: !ruby/object:Gem::Requirement
161
81
  none: false
162
82
  requirements:
@@ -188,18 +108,27 @@ files:
188
108
  - VERSION
189
109
  - bors.gemspec
190
110
  - lib/bors.rb
111
+ - lib/bors/command_line.rb
191
112
  - lib/bors/example.rb
192
113
  - lib/bors/example/feature.rb
193
114
  - lib/bors/exceptions.rb
194
- - lib/bors/maths.rb
195
- - lib/bors/model.rb
196
- - lib/bors/prediction.rb
197
- - lib/bors/prediction/result.rb
115
+ - lib/bors/math.rb
116
+ - lib/bors/result.rb
117
+ - lib/bors/result/samples.rb
118
+ - lib/bors/result/settings.rb
119
+ - lib/bors/result/statistics.rb
198
120
  - spec/bors.rb
199
121
  - spec/bors/example.rb
200
122
  - spec/bors/example/feature.rb
123
+ - spec/bors/result.rb
124
+ - spec/bors/result/samples.rb
125
+ - spec/bors/result/settings.rb
126
+ - spec/bors/result/statistics.rb
127
+ - spec/fixtures/examples.txt
128
+ - spec/fixtures/result.txt
201
129
  - spec/runner.rb
202
130
  - spec/spec_helper.rb
131
+ - spec/tutorial.rb
203
132
  homepage: http://github.com/rodeoclash/bors
204
133
  licenses:
205
134
  - MIT
@@ -215,7 +144,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
215
144
  version: '0'
216
145
  segments:
217
146
  - 0
218
- hash: 2511003888972238038
147
+ hash: 4017178711172066788
219
148
  required_rubygems_version: !ruby/object:Gem::Requirement
220
149
  none: false
221
150
  requirements:
data/lib/bors/maths.rb DELETED
@@ -1,9 +0,0 @@
1
- class Bors
2
- module Maths
3
-
4
- def is_real_number?(value)
5
- (value.kind_of?(Float) || value.kind_of?(Integer))
6
- end
7
-
8
- end
9
- end