coral_core 0.2.23 → 0.2.24

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.
@@ -0,0 +1,29 @@
1
+
2
+ class MockInput
3
+
4
+ #-----------------------------------------------------------------------------
5
+ # Constructor / Destructor
6
+
7
+ def initialize(strings)
8
+ if strings.is_a?(String)
9
+ strings = [ strings ]
10
+ end
11
+ @strings = strings
12
+ end
13
+
14
+ #---
15
+
16
+ def self.with(strings)
17
+ $stdin = self.new(strings)
18
+ yield
19
+ ensure
20
+ $stdin = STDIN
21
+ end
22
+
23
+ #-----------------------------------------------------------------------------
24
+ # Accessors / Modifiers
25
+
26
+ def gets
27
+ return @strings.shift
28
+ end
29
+ end
@@ -0,0 +1,22 @@
1
+
2
+ module Kernel
3
+
4
+ #-----------------------------------------------------------------------------
5
+ # Utilities
6
+
7
+ def capture
8
+ out = StringIO.new
9
+ $stdout = out
10
+
11
+ error = StringIO.new
12
+ $stderr = error
13
+
14
+ # Go do stuff!
15
+ yield
16
+ return out, error
17
+
18
+ ensure
19
+ $stdout = STDOUT
20
+ $stderr = STDERR
21
+ end
22
+ end
@@ -0,0 +1,15 @@
1
+
2
+ require 'rspec'
3
+ require 'stringio'
4
+ require 'coral_core'
5
+
6
+ require 'coral_test_kernel'
7
+ require 'coral_mock_input'
8
+
9
+ #-------------------------------------------------------------------------------
10
+
11
+ RSpec.configure do |config|
12
+ config.mock_framework = :rspec
13
+ config.color_enabled = true
14
+ config.formatter = 'documentation'
15
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coral_core
3
3
  version: !ruby/object:Gem::Version
4
- hash: 57
4
+ hash: 39
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 23
10
- version: 0.2.23
9
+ - 24
10
+ version: 0.2.24
11
11
  platform: ruby
12
12
  authors:
13
13
  - Adrian Webb
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-05-19 00:00:00 Z
18
+ date: 2013-05-20 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: log4r
@@ -196,8 +196,42 @@ extra_rdoc_files:
196
196
  - LICENSE.txt
197
197
  - README.rdoc
198
198
  files:
199
+ - .document
200
+ - .gitmodules
201
+ - Gemfile
202
+ - Gemfile.lock
199
203
  - LICENSE.txt
200
204
  - README.rdoc
205
+ - Rakefile
206
+ - VERSION
207
+ - coral_core.gemspec
208
+ - lib/coral_core.rb
209
+ - lib/coral_core/command.rb
210
+ - lib/coral_core/config.rb
211
+ - lib/coral_core/core.rb
212
+ - lib/coral_core/event.rb
213
+ - lib/coral_core/event/regexp_event.rb
214
+ - lib/coral_core/interface.rb
215
+ - lib/coral_core/memory.rb
216
+ - lib/coral_core/repository.rb
217
+ - lib/coral_core/resource.rb
218
+ - lib/coral_core/template.rb
219
+ - lib/coral_core/template/environment.rb
220
+ - lib/coral_core/template/json.rb
221
+ - lib/coral_core/template/wrapper.rb
222
+ - lib/coral_core/template/yaml.rb
223
+ - lib/coral_core/util/data.rb
224
+ - lib/coral_core/util/disk.rb
225
+ - lib/coral_core/util/git.rb
226
+ - lib/coral_core/util/git/base.rb
227
+ - lib/coral_core/util/git/lib.rb
228
+ - lib/coral_core/util/git/remote.rb
229
+ - lib/coral_core/util/shell.rb
230
+ - lib/hiera_backend.rb
231
+ - spec/coral_core/interface_spec.rb
232
+ - spec/coral_mock_input.rb
233
+ - spec/coral_test_kernel.rb
234
+ - spec/spec_helper.rb
201
235
  homepage: http://github.com/coraltech/ruby-coral_core
202
236
  licenses:
203
237
  - GPLv3