brewer 0.0.8 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 032559f59fc21f913fdcca39a21a3fd552c56ff2
4
- data.tar.gz: 106e2c1d304e7dc11961df50a4d992b6c583bfb4
3
+ metadata.gz: 05f55e89e2c9ad592085d64754888f105044b351
4
+ data.tar.gz: 50a46c28e5de6f966fc1172279bd37eb57477f73
5
5
  SHA512:
6
- metadata.gz: baede8f784e82182dbe80a037878459321a1180d0452fe7eef80eb72a02fe8245d9c2cb68e289ed742c308c95e4b92f511c1270cb42df0ee41b9588ec291f105
7
- data.tar.gz: eb7203e18871d19abbd72c70f65729a4553a4817e21560734f211e467e0192e14ea10ccffbcab974dd3aa0b1916457031c4559e334f1d6b15a217ccec02b285a
6
+ metadata.gz: 907d730e9896a91cd3829e71bc721aab7040c202f5c7763e345b06bbb297e5fee779ca0132942f428f33e7fc741b5ae27ef4c28e24330771774ffde8f40985c1
7
+ data.tar.gz: bd2af95aca5b6ad34ba05537b3e6a2f8bad7bf7d3c351e3294a7062cbb186fb691fc5e754d2c536f45c11c406d696fbc0744491ad6eb726e55e601cf6ecf904b
data/Gemfile.lock CHANGED
@@ -1,17 +1,48 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- brewer (0.0.4)
4
+ brewer (0.0.9)
5
+ git (>= 0.0.0)
6
+ ripl (>= 0.0.0)
5
7
 
6
8
  GEM
7
9
  remote: https://rubygems.org/
8
10
  specs:
11
+ addressable (2.5.0)
12
+ public_suffix (~> 2.0, >= 2.0.2)
13
+ bond (0.5.1)
14
+ docile (1.1.5)
15
+ git (1.3.0)
16
+ json (2.0.3)
17
+ launchy (2.4.3)
18
+ addressable (~> 2.3)
19
+ power_assert (0.2.2)
20
+ public_suffix (2.0.4)
21
+ rake (12.0.0)
22
+ rdoc (4.2.0)
23
+ ripl (0.7.1)
24
+ bond (~> 0.5.1)
25
+ simplecov (0.13.0)
26
+ docile (~> 1.1.0)
27
+ json (>= 1.8, < 3)
28
+ simplecov-html (~> 0.10.0)
29
+ simplecov-html (0.10.0)
30
+ test-unit (3.0.8)
31
+ power_assert
9
32
 
10
33
  PLATFORMS
11
34
  ruby
12
35
 
13
36
  DEPENDENCIES
14
37
  brewer!
38
+ git
39
+ launchy
40
+ rake
41
+ rdoc
42
+ ripl
43
+ simplecov
44
+ simplecov-html
45
+ test-unit
15
46
 
16
47
  BUNDLED WITH
17
48
  1.12.5
data/bin/brewer CHANGED
@@ -2,18 +2,17 @@
2
2
  # This script will initialize a Ripl shell with a brewer instantiated
3
3
  require 'ripl'
4
4
 
5
- # pull in our lib
5
+ # pull in our source
6
6
  require_relative "../lib/brewer"
7
7
 
8
- # Clone the repo
9
- adaptibrew = Adaptibrew.new
10
- adaptibrew.clone
8
+ # Get an adaptibrew instance and refresh the repo
9
+ adaptibrew = Adaptibrew.new.refresh
11
10
 
12
11
  # Start up a brewer
13
12
  brewer = Brewer.new
14
13
 
15
14
  # Warning
16
- puts "Warning: Adaptibrew will be cloned into the directory you executed 'brewer'"
15
+ puts "Warning: Adaptibrew has been cloned into the directory you executed 'brewer'"
17
16
  puts "You may wish to delete it when you are finished. Do that with `adaptibrew.clear`"
18
17
 
19
18
  # Start the ripl shell
data/brewer.gemspec CHANGED
@@ -2,7 +2,7 @@ require 'rake'
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "brewer"
5
- s.version = "0.0.8"
5
+ s.version = "0.0.10"
6
6
  s.default_executable = "brewer"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
14
14
  s.executables = ['brewer']
15
15
  s.bindir = 'bin'
16
16
  s.test_files = FileList.new(["tests/*.rb"]).to_a
17
- s.homepage = %q{http://github.com/llamicron/ruby_brewer}
17
+ s.homepage = %q{http://github.com/llamicron/brewer}
18
18
  s.require_paths = ["lib", "lib"]
19
19
  s.rubygems_version = %q{1.6.2}
20
20
  s.summary = %q{A shell interface for adaptibrew}
@@ -22,13 +22,13 @@ Gem::Specification.new do |s|
22
22
 
23
23
  # TODO: update these versions
24
24
 
25
- s.add_runtime_dependency 'git', '>=0.0.0'
26
- s.add_runtime_dependency 'ripl', '>=0.0.0'
25
+ s.add_runtime_dependency 'git', '~> 1.3', '>= 1.3.0'
26
+ s.add_runtime_dependency 'ripl', '~> 0.7.0'
27
27
 
28
- s.add_development_dependency 'rake', '>=0.0.0'
29
- s.add_development_dependency 'test-unit', '>=0.0.0'
30
- s.add_development_dependency 'launchy', '>=0.0.0'
31
- s.add_development_dependency 'simplecov', '>=0.0.0'
32
- s.add_development_dependency 'simplecov-html', '>=0.0.0'
33
- s.add_development_dependency 'rdoc', '>=0.0.0'
28
+ s.add_development_dependency 'rake', '~> 12.0', '>= 12.0.0'
29
+ s.add_development_dependency 'test-unit', '~> 3.2', '>= 3.2.0'
30
+ s.add_development_dependency 'launchy', '~> 2.4', '>= 2.4.0'
31
+ s.add_development_dependency 'simplecov', '~> 0.13.0'
32
+ s.add_development_dependency 'simplecov-html', '~> 0.10.0'
33
+ s.add_development_dependency 'rdoc', '~> 5.1', '>= 5.1.0'
34
34
  end
data/lib/adaptibrew.rb CHANGED
@@ -4,7 +4,10 @@ require 'fileutils'
4
4
  # This is the 'manager' for the adaptibrew repo. It handles cloning and such.
5
5
  class Adaptibrew
6
6
 
7
+ # Clone the repo into the current directory, unless a path is provided
8
+ # If used in IRB, Ripl, etc. it will clone into the directory IRB was started in
7
9
  def clone(path=nil)
10
+ # Don't clone if it's already there.
8
11
  if !Dir.exists?('adaptibrew')
9
12
  Git.clone('https://github.com/adaptiman/adaptibrew.git', 'adaptibrew', :path => path)
10
13
  end
@@ -12,12 +15,13 @@ class Adaptibrew
12
15
  end
13
16
 
14
17
  # Danger zone...
15
- def clear(dir='adaptibrew')
16
- raise 'Warning! This will delete a directory other than the `adaptibrew` directory' unless dir.include? 'adaptibrew'
17
- FileUtils.rm_rf(dir)
18
+ # Clears the adaptibrew repo
19
+ def clear()
20
+ FileUtils.rm_rf('adaptibrew')
18
21
  self
19
22
  end
20
23
 
24
+ # Clear and re-clone the adaptibrew repo
21
25
  # This can also serve as an update method
22
26
  def refresh
23
27
  clear
data/lib/brewer.rb CHANGED
@@ -1,4 +1,3 @@
1
- require 'date'
2
1
  require_relative 'helpers'
3
2
  require_relative 'adaptibrew'
4
3
 
@@ -16,9 +15,12 @@ class Brewer
16
15
  attr_accessor :out
17
16
 
18
17
  def initialize
19
- @base_path = Dir.pwd # Path of the package
20
- @out = [] # Output from adaptibrew
21
- @log = @base_path + '/logs/output' # Log file for @out. Everything in the log file will be from @out.
18
+ # Path of the package
19
+ @base_path = Dir.pwd
20
+ # Output from adaptibrew
21
+ @out = []
22
+ # Log file for @out. Everything in the log file will be from @out.
23
+ @log = @base_path + '/logs/output'
22
24
  end
23
25
 
24
26
  public
@@ -38,8 +40,9 @@ class Brewer
38
40
  end
39
41
 
40
42
  # Clears the `@out` array
43
+ # Writes current `@out` to log
44
+ # This is why the prod log is changed when tests are run
41
45
  def clear
42
- # Write current `@out` to log
43
46
  write_log(@log, @out)
44
47
  @out = []
45
48
  self
data/lib/helpers.rb CHANGED
@@ -1,3 +1,6 @@
1
+ # Helpers Module.
2
+ # For methods that don't quite fit anywhere else,
3
+ # or that I need globally
1
4
  module Helpers
2
5
 
3
6
  # Returns the default location for the log file.
@@ -12,7 +15,7 @@ module Helpers
12
15
  Time.now.strftime("%m/%d/%Y %H:%M")
13
16
  end
14
17
 
15
- # Truncates the entire log
18
+ # Truncates (deletes) the entire log
16
19
  def clear_log(log)
17
20
  File.truncate(log, 0)
18
21
  end
data/tests/tc_brewer.rb CHANGED
@@ -1,13 +1,15 @@
1
1
  require 'test/unit'
2
+
2
3
  require_relative '../lib/brewer'
3
4
  require_relative '../lib/adaptibrew'
4
5
 
6
+ # Test the brewer class
5
7
  class TestBrewer < Test::Unit::TestCase
6
8
 
7
9
  def setup
8
10
  @brewer = Brewer.new
9
- @adaptibrew = Adaptibrew.new.refresh
10
- # This is used for log testing, not logging tests see `test_log_methods`
11
+ Adaptibrew.new.refresh
12
+ # This is used for log testing, not logging tests. see `test_log_methods`
11
13
  @log = @brewer.base_path + '/logs/test_output'
12
14
  end
13
15
 
@@ -24,6 +26,8 @@ class TestBrewer < Test::Unit::TestCase
24
26
  assert_true(true)
25
27
  end
26
28
 
29
+ # Runs the 'python_tester.py' which print "it worked".
30
+ # Ensures that ruby can run python without errors.
27
31
  def test_script_and_output
28
32
  @brewer.script('python_tester')
29
33
  assert_equal("it worked", @brewer.out.first)
data/tests/tc_helpers.rb CHANGED
@@ -8,20 +8,19 @@ class TestHelpers < Test::Unit::TestCase
8
8
  @brewer = Brewer.new
9
9
  # See comment on `test_log`
10
10
  @log = @brewer.base_path + '/logs/test_output'
11
-
12
11
  clear_log(@log)
13
12
  end
14
13
 
14
+ # Test that Helpers#time will rturn a string
15
+ # Not sure how to test the format, since that would require knowing the actual
16
+ # time. Might get messy.
15
17
  def test_time
16
18
  assert_equal(String, time.class)
17
19
  end
18
20
 
19
21
  def test_log
20
- # This will give us the actual log i.e. '/logs/output'
21
- # For tests we use 'logs/test_output', which is why we have the
22
- # @log = @brewer.base_path + '/logs/test_output'
23
- # line
24
- assert_equal(String, log.class)
22
+ # This will give us the actual log i.e. '/logs/output', not the test log
23
+ assert_equal(Dir.pwd + "/logs/output", log)
25
24
  end
26
25
 
27
26
  def test_log_methods
data/tests/ts_all.rb CHANGED
@@ -3,6 +3,7 @@ require 'simplecov'
3
3
  SimpleCov.command_name 'Unit Tests'
4
4
  SimpleCov.start
5
5
 
6
+ # Require helper methods
6
7
  require_relative '../lib/helpers'
7
8
  include Helpers
8
9
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brewer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luke Sweeney
@@ -14,114 +14,144 @@ dependencies:
14
14
  name: git
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
17
20
  - - ">="
18
21
  - !ruby/object:Gem::Version
19
- version: 0.0.0
22
+ version: 1.3.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '1.3'
24
30
  - - ">="
25
31
  - !ruby/object:Gem::Version
26
- version: 0.0.0
32
+ version: 1.3.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: ripl
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - ">="
37
+ - - "~>"
32
38
  - !ruby/object:Gem::Version
33
- version: 0.0.0
39
+ version: 0.7.0
34
40
  type: :runtime
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
- - - ">="
44
+ - - "~>"
39
45
  - !ruby/object:Gem::Version
40
- version: 0.0.0
46
+ version: 0.7.0
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: rake
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '12.0'
45
54
  - - ">="
46
55
  - !ruby/object:Gem::Version
47
- version: 0.0.0
56
+ version: 12.0.0
48
57
  type: :development
49
58
  prerelease: false
50
59
  version_requirements: !ruby/object:Gem::Requirement
51
60
  requirements:
61
+ - - "~>"
62
+ - !ruby/object:Gem::Version
63
+ version: '12.0'
52
64
  - - ">="
53
65
  - !ruby/object:Gem::Version
54
- version: 0.0.0
66
+ version: 12.0.0
55
67
  - !ruby/object:Gem::Dependency
56
68
  name: test-unit
57
69
  requirement: !ruby/object:Gem::Requirement
58
70
  requirements:
71
+ - - "~>"
72
+ - !ruby/object:Gem::Version
73
+ version: '3.2'
59
74
  - - ">="
60
75
  - !ruby/object:Gem::Version
61
- version: 0.0.0
76
+ version: 3.2.0
62
77
  type: :development
63
78
  prerelease: false
64
79
  version_requirements: !ruby/object:Gem::Requirement
65
80
  requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '3.2'
66
84
  - - ">="
67
85
  - !ruby/object:Gem::Version
68
- version: 0.0.0
86
+ version: 3.2.0
69
87
  - !ruby/object:Gem::Dependency
70
88
  name: launchy
71
89
  requirement: !ruby/object:Gem::Requirement
72
90
  requirements:
91
+ - - "~>"
92
+ - !ruby/object:Gem::Version
93
+ version: '2.4'
73
94
  - - ">="
74
95
  - !ruby/object:Gem::Version
75
- version: 0.0.0
96
+ version: 2.4.0
76
97
  type: :development
77
98
  prerelease: false
78
99
  version_requirements: !ruby/object:Gem::Requirement
79
100
  requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '2.4'
80
104
  - - ">="
81
105
  - !ruby/object:Gem::Version
82
- version: 0.0.0
106
+ version: 2.4.0
83
107
  - !ruby/object:Gem::Dependency
84
108
  name: simplecov
85
109
  requirement: !ruby/object:Gem::Requirement
86
110
  requirements:
87
- - - ">="
111
+ - - "~>"
88
112
  - !ruby/object:Gem::Version
89
- version: 0.0.0
113
+ version: 0.13.0
90
114
  type: :development
91
115
  prerelease: false
92
116
  version_requirements: !ruby/object:Gem::Requirement
93
117
  requirements:
94
- - - ">="
118
+ - - "~>"
95
119
  - !ruby/object:Gem::Version
96
- version: 0.0.0
120
+ version: 0.13.0
97
121
  - !ruby/object:Gem::Dependency
98
122
  name: simplecov-html
99
123
  requirement: !ruby/object:Gem::Requirement
100
124
  requirements:
101
- - - ">="
125
+ - - "~>"
102
126
  - !ruby/object:Gem::Version
103
- version: 0.0.0
127
+ version: 0.10.0
104
128
  type: :development
105
129
  prerelease: false
106
130
  version_requirements: !ruby/object:Gem::Requirement
107
131
  requirements:
108
- - - ">="
132
+ - - "~>"
109
133
  - !ruby/object:Gem::Version
110
- version: 0.0.0
134
+ version: 0.10.0
111
135
  - !ruby/object:Gem::Dependency
112
136
  name: rdoc
113
137
  requirement: !ruby/object:Gem::Requirement
114
138
  requirements:
139
+ - - "~>"
140
+ - !ruby/object:Gem::Version
141
+ version: '5.1'
115
142
  - - ">="
116
143
  - !ruby/object:Gem::Version
117
- version: 0.0.0
144
+ version: 5.1.0
118
145
  type: :development
119
146
  prerelease: false
120
147
  version_requirements: !ruby/object:Gem::Requirement
121
148
  requirements:
149
+ - - "~>"
150
+ - !ruby/object:Gem::Version
151
+ version: '5.1'
122
152
  - - ">="
123
153
  - !ruby/object:Gem::Version
124
- version: 0.0.0
154
+ version: 5.1.0
125
155
  description: A Ruby API for adaptiman/adaptibrew
126
156
  email: luke@thesweeneys.org
127
157
  executables:
@@ -134,8 +164,6 @@ files:
134
164
  - README.md
135
165
  - Rakefile
136
166
  - bin/brewer
137
- - brewer-0.0.6.gem
138
- - brewer-0.0.7.gem
139
167
  - brewer.gemspec
140
168
  - lib/adaptibrew.rb
141
169
  - lib/brewer.rb
@@ -144,7 +172,7 @@ files:
144
172
  - tests/tc_brewer.rb
145
173
  - tests/tc_helpers.rb
146
174
  - tests/ts_all.rb
147
- homepage: http://github.com/llamicron/ruby_brewer
175
+ homepage: http://github.com/llamicron/brewer
148
176
  licenses:
149
177
  - MIT
150
178
  metadata: {}
data/brewer-0.0.6.gem DELETED
Binary file
data/brewer-0.0.7.gem DELETED
Binary file