brewscribe 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +18 -0
- data/.rspec +1 -0
- data/Gemfile +4 -0
- data/Guardfile +8 -0
- data/LICENSE +22 -0
- data/README.md +40 -0
- data/Rakefile +11 -0
- data/brewscribe.gemspec +21 -0
- data/lib/brewscribe.rb +11 -0
- data/lib/brewscribe/conversion.rb +22 -0
- data/lib/brewscribe/grain.rb +40 -0
- data/lib/brewscribe/hops.rb +34 -0
- data/lib/brewscribe/ingredient_list.rb +58 -0
- data/lib/brewscribe/recipe.rb +76 -0
- data/lib/brewscribe/version.rb +3 -0
- data/lib/brewscribe/yeast.rb +44 -0
- data/spec/brewscribe_spec.rb +24 -0
- data/spec/conversion_spec.rb +37 -0
- data/spec/grain_spec.rb +54 -0
- data/spec/hops_spec.rb +52 -0
- data/spec/ingredient_list_spec.rb +51 -0
- data/spec/recipe_spec.rb +43 -0
- data/spec/spec_helper.rb +3 -0
- data/spec/support/recipe.bsmx +502 -0
- data/spec/yeast_spec.rb +49 -0
- metadata +129 -0
data/spec/yeast_spec.rb
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Brewscribe::Yeast do
|
4
|
+
describe '#initialize' do
|
5
|
+
let(:data) { { :last_modified=>"2012-03-14", :name=>"London ESB Ale",
|
6
|
+
:lab=>"Wyeast Labs", :product_id=>"1968", :type=>"0",
|
7
|
+
:form=>"0", :flocculation=>"2", :starter_size=>"4.2000000",
|
8
|
+
:amount=>"1.0000000", :inventory=>"0.0000000",
|
9
|
+
:price=>"6.0000000", :order=>"10", :in_recipe=>"1",
|
10
|
+
:brew_date=>"2012-03-12", :pkg_date=>"2011-02-27",
|
11
|
+
:cells=>"100.0000000", :min_attenuation=>"67.0000000",
|
12
|
+
:max_attenuation=>"71.0000000", :min_temp=>"64.0000000",
|
13
|
+
:max_temp=>"72.0000000", :use_starter=>"0",
|
14
|
+
:add_to_secondary=>"0", :times_cultured=>"0",
|
15
|
+
:max_reuse=>"5", :culture_date=>"2003-06-14",
|
16
|
+
:best_for=>"English Bitters, IPA, Brown Ales, Mild Ales",
|
17
|
+
:notes=>"Malty, balanced flavor. Fruity, rich finish. Excellent for cask conditioned ales and bitters."} }
|
18
|
+
subject { Brewscribe::Yeast.new data }
|
19
|
+
|
20
|
+
it 'should set the hash to object properties' do
|
21
|
+
subject.name.should == data[:name]
|
22
|
+
end
|
23
|
+
|
24
|
+
it { subject.lab.should be_a String }
|
25
|
+
it { subject.product_id.should be_a Fixnum }
|
26
|
+
it { Brewscribe::Yeast::FLOCCULATION_TYPES.should include subject.flocculation }
|
27
|
+
it { Brewscribe::Yeast::TYPES.should include subject.type }
|
28
|
+
it { Brewscribe::Yeast::FORMS.should include subject.form }
|
29
|
+
it { subject.starter_size.should be_a Float }
|
30
|
+
it { subject.amount.should be_a Float }
|
31
|
+
it { subject.price.should be_a Float }
|
32
|
+
it { [TrueClass, FalseClass].should include subject.in_recipe.class }
|
33
|
+
it { subject.brew_date.should be_a Date }
|
34
|
+
it { subject.pkg_date.should be_a Date }
|
35
|
+
it { subject.cells.should be_a Float }
|
36
|
+
it { subject.min_attenuation.should be_a Float }
|
37
|
+
it { subject.max_attenuation.should be_a Float }
|
38
|
+
it { subject.min_temp.should be_a Float }
|
39
|
+
it { subject.max_temp.should be_a Float }
|
40
|
+
it { [TrueClass, FalseClass].should include subject.use_starter.class }
|
41
|
+
it { [TrueClass, FalseClass].should include subject.add_to_secondary.class }
|
42
|
+
it { subject.times_cultured.should be_a Fixnum }
|
43
|
+
it { subject.max_reuse.should be_a Fixnum }
|
44
|
+
it { subject.culture_date.should be_a Date }
|
45
|
+
it { subject.best_for.should be_a String }
|
46
|
+
it { subject.notes.should be_a String }
|
47
|
+
it { subject.last_modified.should be_a Date }
|
48
|
+
end
|
49
|
+
end
|
metadata
ADDED
@@ -0,0 +1,129 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: brewscribe
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Andrew Nordman
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-03-23 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rspec
|
16
|
+
requirement: &70238062434800 !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: *70238062434800
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: guard
|
27
|
+
requirement: &70238062434120 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :development
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70238062434120
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: guard-rspec
|
38
|
+
requirement: &70238062433640 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :development
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70238062433640
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: nokogiri
|
49
|
+
requirement: &70238062433060 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :runtime
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *70238062433060
|
58
|
+
description:
|
59
|
+
email:
|
60
|
+
- cadwallion@gmail.com
|
61
|
+
executables: []
|
62
|
+
extensions: []
|
63
|
+
extra_rdoc_files: []
|
64
|
+
files:
|
65
|
+
- .gitignore
|
66
|
+
- .rspec
|
67
|
+
- Gemfile
|
68
|
+
- Guardfile
|
69
|
+
- LICENSE
|
70
|
+
- README.md
|
71
|
+
- Rakefile
|
72
|
+
- brewscribe.gemspec
|
73
|
+
- lib/brewscribe.rb
|
74
|
+
- lib/brewscribe/conversion.rb
|
75
|
+
- lib/brewscribe/grain.rb
|
76
|
+
- lib/brewscribe/hops.rb
|
77
|
+
- lib/brewscribe/ingredient_list.rb
|
78
|
+
- lib/brewscribe/recipe.rb
|
79
|
+
- lib/brewscribe/version.rb
|
80
|
+
- lib/brewscribe/yeast.rb
|
81
|
+
- spec/brewscribe_spec.rb
|
82
|
+
- spec/conversion_spec.rb
|
83
|
+
- spec/grain_spec.rb
|
84
|
+
- spec/hops_spec.rb
|
85
|
+
- spec/ingredient_list_spec.rb
|
86
|
+
- spec/recipe_spec.rb
|
87
|
+
- spec/spec_helper.rb
|
88
|
+
- spec/support/recipe.bsmx
|
89
|
+
- spec/yeast_spec.rb
|
90
|
+
homepage: ''
|
91
|
+
licenses: []
|
92
|
+
post_install_message:
|
93
|
+
rdoc_options: []
|
94
|
+
require_paths:
|
95
|
+
- lib
|
96
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
segments:
|
103
|
+
- 0
|
104
|
+
hash: -1391733853884989833
|
105
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
segments:
|
112
|
+
- 0
|
113
|
+
hash: -1391733853884989833
|
114
|
+
requirements: []
|
115
|
+
rubyforge_project:
|
116
|
+
rubygems_version: 1.8.17
|
117
|
+
signing_key:
|
118
|
+
specification_version: 3
|
119
|
+
summary: A Beersmith (.bsmx) file parser
|
120
|
+
test_files:
|
121
|
+
- spec/brewscribe_spec.rb
|
122
|
+
- spec/conversion_spec.rb
|
123
|
+
- spec/grain_spec.rb
|
124
|
+
- spec/hops_spec.rb
|
125
|
+
- spec/ingredient_list_spec.rb
|
126
|
+
- spec/recipe_spec.rb
|
127
|
+
- spec/spec_helper.rb
|
128
|
+
- spec/support/recipe.bsmx
|
129
|
+
- spec/yeast_spec.rb
|