brewer 0.0.24 → 0.0.30
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +19 -8
- data/Rakefile +1 -1
- data/brewer.gemspec +1 -1
- data/lib/adaptibrew.rb +7 -0
- data/lib/brewer.rb +0 -1
- data/spec/adaptibrew_spec.rb +35 -13
- data/spec/brewer_spec.rb +4 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fa294ebd0343287938b6222e37a6e6db70c9660
|
4
|
+
data.tar.gz: 192316507e0254b4e0d7f6de91f30671918be3ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d217c70265cb95b9347f46031c66973109045f01e45454b48787f6a3df0c64b21d59aa0d64e97651372d64104f8d9d5c1e92bbae0259374fff3bdbdabc86757
|
7
|
+
data.tar.gz: 8c8bb9d393097e6268ac3af51ad54252e77252838777f527c61494ea01a4ce795f04846c1dbe4539970ff998a8483d46e819f9d255ba167fe5e2561d2202974f
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,24 +1,35 @@
|
|
1
|
-
#
|
2
|
-
### A Ruby
|
1
|
+
# Brewer [](https://travis-ci.org/llamicron/brewer)
|
2
|
+
### A Ruby gem for [adaptiman/adaptibrew](http://github.com/adaptiman/adaptibrew)
|
3
3
|
|
4
4
|
# Disclaimer
|
5
|
-
This is just
|
5
|
+
This is just a gem to make adaptibrew more user friendly. It will provide a clean shell and easy to understand methods for all the actions you need to control your brew rig with continuity.
|
6
|
+
|
7
|
+
This will require an actual brew rig and all the equipment listed in [adaptiman/adaptibrew](https://github.com/adaptiman/adaptibrew)'s readme. If you are looking to build an automated brew rig, **this is not the place to start**. Head over to [adaptiman/adaptibrew](https://github.com/adaptiman/adaptibrew), or hit up [adaptiman](https://github.com/adaptiman).
|
6
8
|
|
7
9
|
# Installation
|
8
|
-
This
|
10
|
+
This is a gem, published on [rubygems.org](http://rubygems.org). Install it the recommended way with:
|
9
11
|
```shell
|
10
12
|
gem install brewer
|
11
13
|
```
|
12
|
-
|
14
|
+
This will be the latest stable release.
|
15
|
+
**Or** you can put the following line in a `Gemfile`;
|
16
|
+
```ruby
|
17
|
+
gem 'brewer'
|
18
|
+
```
|
19
|
+
and run `bundle install`.
|
20
|
+
|
21
|
+
You may also download a .gem file from the releases section and install it that way, or further still build a new .gem file from the `brewer.gemspec` if you want the latest possible release. Keep in mind this may not be stable.
|
22
|
+
|
23
|
+
After installation, run
|
13
24
|
```shell
|
14
25
|
brewer
|
15
26
|
```
|
16
|
-
to open an interactive shell to control your brew rig in realtime.
|
27
|
+
to open an interactive shell to control your brew rig in realtime.Just like any other gem, you can `require 'brewer'` from another ruby project.
|
17
28
|
|
18
29
|
# Documentation
|
19
30
|
**Warning: RDoc may have a seizure when encountering Gemfiles, Rakefiles, etc. Basically files that don't end in `.rb` but have ruby syntax. Docs will be a bit weird on those files. I suggest just reading the comments in source.**
|
20
31
|
Documentation is in `doc/` or on rubygems.org
|
21
32
|
|
33
|
+
---
|
22
34
|
|
23
|
-
|
24
|
-
for build triggers, please ignore
|
35
|
+
*This line is for CI build triggers, please ignore*
|
data/Rakefile
CHANGED
data/brewer.gemspec
CHANGED
data/lib/adaptibrew.rb
CHANGED
data/lib/brewer.rb
CHANGED
data/spec/adaptibrew_spec.rb
CHANGED
@@ -7,64 +7,86 @@ describe Adaptibrew do
|
|
7
7
|
end
|
8
8
|
|
9
9
|
describe "#new" do
|
10
|
-
specify { expect(
|
10
|
+
specify { expect(Adaptibrew.new).to be_an_instance_of Adaptibrew }
|
11
11
|
end
|
12
12
|
|
13
13
|
describe ".clear" do
|
14
14
|
context "when the repo already exists" do
|
15
|
-
|
15
|
+
let(:adaptibrew) { Adaptibrew.new }
|
16
|
+
specify { expect(adaptibrew.present?).to be true }
|
16
17
|
|
17
18
|
it "deletes the repo" do
|
18
19
|
@adaptibrew.clear
|
19
|
-
expect(
|
20
|
+
expect(@adaptibrew.present?).to be false
|
20
21
|
end
|
21
22
|
end
|
22
23
|
|
23
24
|
context "when the repo does not exist" do
|
24
25
|
let(:adaptibrew) { Adaptibrew.new }
|
25
26
|
before { adaptibrew.clear }
|
26
|
-
specify { expect(
|
27
|
+
specify { expect(adaptibrew.present?).to be false }
|
27
28
|
|
28
29
|
it "does nothing" do
|
29
30
|
@adaptibrew.clear
|
30
|
-
expect(
|
31
|
+
expect(@adaptibrew.present?).to be false
|
31
32
|
end
|
32
33
|
end
|
33
|
-
|
34
34
|
end
|
35
35
|
|
36
36
|
describe ".clone" do
|
37
37
|
context "when the repo does not exist" do
|
38
38
|
let(:adaptibrew) { Adaptibrew.new }
|
39
39
|
before { adaptibrew.clear }
|
40
|
-
specify { expect(
|
40
|
+
specify { expect(adaptibrew.present?).to be false }
|
41
41
|
|
42
42
|
it "clones the repo" do
|
43
43
|
@adaptibrew.clone
|
44
|
-
expect(
|
44
|
+
expect(@adaptibrew.present?).to be true
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
48
|
context "when the repo exists" do
|
49
49
|
let(:adaptibrew) { Adaptibrew.new }
|
50
50
|
before { adaptibrew.clone }
|
51
|
-
specify { expect(
|
51
|
+
specify { expect(adaptibrew.present?).to be true }
|
52
52
|
|
53
53
|
it "does nothing" do
|
54
54
|
@adaptibrew.clone
|
55
|
-
expect(
|
55
|
+
expect(@adaptibrew.present?).to be true
|
56
56
|
end
|
57
57
|
end
|
58
|
-
|
59
58
|
end
|
60
59
|
|
61
60
|
describe ".refresh" do
|
62
61
|
let(:adaptibrew) { Adaptibrew.new }
|
63
62
|
before { adaptibrew.refresh }
|
63
|
+
|
64
64
|
it "clears and clones the repo" do # regardless of wether or not it's there
|
65
|
-
expect(
|
65
|
+
expect(@adaptibrew.present?).to be true
|
66
66
|
@adaptibrew.refresh
|
67
|
-
expect(
|
67
|
+
expect(@adaptibrew.present?).to be true
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
71
|
+
|
72
|
+
describe ".present?" do
|
73
|
+
context "when the repo is present" do
|
74
|
+
let(:adaptibrew) { Adaptibrew.new }
|
75
|
+
before { adaptibrew.refresh }
|
76
|
+
specify { expect(Dir.exists?('adaptibrew')).to be true }
|
77
|
+
|
78
|
+
it "returns true" do
|
79
|
+
expect(@adaptibrew.present?).to be true
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
context "when the repo is not present" do
|
84
|
+
let(:adaptibrew) { Adaptibrew.new }
|
85
|
+
before { adaptibrew.clear }
|
86
|
+
specify { expect(Dir.exists?('adaptibrew')).to be false }
|
87
|
+
it "returns false" do
|
88
|
+
expect(@adaptibrew.present?).to be false
|
89
|
+
end
|
68
90
|
end
|
69
91
|
end
|
70
92
|
|
data/spec/brewer_spec.rb
CHANGED
@@ -8,7 +8,10 @@ describe Brewer do
|
|
8
8
|
|
9
9
|
describe "#new" do
|
10
10
|
it "returns a brewer object" do
|
11
|
-
expect(
|
11
|
+
expect(Brewer.new).to be_an_instance_of Brewer
|
12
|
+
end
|
13
|
+
it "does not accept args" do
|
14
|
+
expect { Brewer.new('heres an arg') }.to raise_exception(ArgumentError)
|
12
15
|
end
|
13
16
|
end
|
14
17
|
|