ki-repo 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,103 @@
1
+ # encoding: UTF-8
2
+
3
+ # Copyright 2012 Mikko Apo
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ module Ki
18
+
19
+ # simplified OptionParser, which supports unknown options by ignoring them
20
+ # * supports options in two formats: "-f file.txt" and "-f=file.txt"
21
+ # * supports short and long form: "--file" and "-f"
22
+ # * supports multiple parameters for options
23
+ # Does not support
24
+ # * parameters with spaces
25
+ # * type conversions
26
+ # * optional parameter values
27
+ class SimpleOptionParser
28
+ attr_chain :options_for_to_s, -> { Array.new }
29
+ attr_chain :options, -> { Array.new }
30
+
31
+ def initialize(&block)
32
+ block.call(self)
33
+ end
34
+
35
+ def on(*args, &block)
36
+ if block.nil?
37
+ raise "Option without parser block: " + args.join(", ")
38
+ end
39
+ if args.size == 3
40
+ short = args.delete_at(0)
41
+ long, *params = args.delete_at(0).split(" ")
42
+ comment = args.delete_at(0)
43
+ options_for_to_s << {short: short, long: long, comment: comment, params: params, block: block }
44
+ options << {opt: short, comment: comment, params: params, block: block }
45
+ options << {opt: long, comment: comment, params: params, block: block }
46
+ else
47
+ raise "unsupported option configuration size: " + args.join(", ")
48
+ end
49
+ end
50
+
51
+ def parse(args)
52
+ ret = []
53
+ open = nil
54
+ collected_params = nil
55
+ collect_count = nil
56
+ args.each do |a|
57
+ if open
58
+ collected_params << a
59
+ if collect_count == collected_params.size
60
+ open[:block].call(*collected_params)
61
+ open = nil
62
+ end
63
+ else
64
+ found_option, rest_of_a = find_option(a)
65
+ if found_option
66
+ collect_count = found_option[:params].size
67
+ if collect_count == 0
68
+ # no parameters
69
+ found_option[:block].call
70
+ elsif collect_count == 1 && rest_of_a && rest_of_a.size > 0
71
+ # single parameter was defined with opt=value
72
+ found_option[:block].call rest_of_a
73
+ else
74
+ open = found_option
75
+ collected_params = []
76
+ end
77
+ else
78
+ ret << a
79
+ end
80
+ end
81
+ end
82
+ if open
83
+ raise "requires #{collect_count} parameters for '#{open[:opt]}', found only #{collected_params.size}: #{collected_params.join(", ")}"
84
+ end
85
+ ret
86
+ end
87
+ def find_option(a)
88
+ options.each do |o|
89
+ if a.start_with?(o[:opt] + "=")
90
+ return o, a[o[:opt].size+1..-1]
91
+ elsif a.start_with?(o[:opt])
92
+ return o,nil
93
+ end
94
+ end
95
+ nil
96
+ end
97
+ def to_s
98
+ options_for_to_s.map do |o|
99
+ format(" %2s%s %-29s%s",o[:short], o[:short] && o[:long]? ",": " ", o[:long], o[:comment] )
100
+ end.join("\n")
101
+ end
102
+ end
103
+ end
data/lib/util/test.rb ADDED
@@ -0,0 +1,323 @@
1
+ # encoding: UTF-8
2
+
3
+ # Copyright 2012 Mikko Apo
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ require 'tmpdir'
18
+
19
+ module Ki
20
+
21
+ # Automatic resource cleanup that is executed when ruby is closing down
22
+ $testers = []
23
+
24
+ at_exit do
25
+ Tester.final_tester_check
26
+ end
27
+
28
+ # Modifies run time environment for tests and automatically restores original state
29
+ # * note: cleanup is triggered by calling the {#after} method
30
+ #
31
+ # @see #cleaners
32
+ # @see #tmpdir
33
+ # @see #catch_stdio
34
+ # @see #chdir
35
+ # @see #after
36
+ class Tester
37
+ # List of Procs which should be executed
38
+ # @see after
39
+ attr_reader :cleaners
40
+
41
+ # Name of the test round that uses this tester
42
+ attr_reader :test_name
43
+
44
+ # Dummy IO stream
45
+ # @see catch_stdio
46
+ attr_chain :stdin, -> { DummyIO.new }
47
+
48
+ # Dummy IO stream
49
+ # @see catch_stdio
50
+ attr_chain :stdout, -> { DummyIO.new }
51
+
52
+ # Dummy IO stream
53
+ # @see catch_stdio
54
+ attr_chain :stderr, -> { DummyIO.new }
55
+
56
+ def initialize(test_name = nil)
57
+ @test_name = test_name
58
+ @cleaners = []
59
+ $testers << self
60
+ end
61
+
62
+ # Creates a temporary directory
63
+ # * if called without a block removes directory when after is called
64
+ # @param [String] src tmpdir copies contents of src path if src is defined. note: only visible files are copied. files and directories starting with . are excluded
65
+ # @param [Proc] block if a block is defined, passes the temporary directory path to the block as parameter and removes the directory when the block ends
66
+ # @return [String, Object] If block is not defined, returns the path of the temporary directory. If block is defined, returns the value the block returns.
67
+ # @example
68
+ # tmp_source = @tester.tmpdir
69
+ # File.touch(File.join(tmp_source, "file.txt"))
70
+ # @tester.tmpdir(tmp_source).each do |dest_2|
71
+ #
72
+ # end
73
+ # @see copy_visible_files
74
+ def tmpdir(src=nil, &block)
75
+ dest = Dir.mktmpdir
76
+ cleanup = -> { FileUtils.remove_entry_secure(dest) }
77
+ if src
78
+ catcher = ExceptionCatcher.new
79
+ catcher.catch do
80
+ Tester.copy_visible_files(src, dest)
81
+ end
82
+ # if there is a problem copying files, cleanup and raise original exception
83
+ if catcher.exceptions?
84
+ catcher.catch do
85
+ cleanup.call
86
+ end
87
+ catcher.check
88
+ end
89
+ end
90
+ if block
91
+ begin
92
+ block.call(dest)
93
+ ensure
94
+ cleanup.call
95
+ end
96
+ else
97
+ @cleaners << cleanup
98
+ dest
99
+ end
100
+ end
101
+
102
+ # Redirects $stdin, $stdout, $stderr streams to the Tester instance
103
+ # * if called without block, streams are restored when after is called
104
+ # @param [Proc] block if block is defined, restores streams once the block ends
105
+ # @return self which is useful when catch_stdio is called with block because stdin, stdout and stderr are available after the block
106
+ # @example
107
+ # @tester.catch_stdio do
108
+ # puts "foo"
109
+ # end
110
+ # @tester.stdio.join == "foo\n"
111
+ #
112
+ # @see DummyIO, stdin, stdout, stderr
113
+ def catch_stdio(&block)
114
+ original_streams = [$stdin, $stdout, $stderr]
115
+ cleanup = -> { $stdin, $stdout, $stderr = original_streams }
116
+ stdin.clear
117
+ stdout.clear
118
+ stderr.clear
119
+ $stdin = stdin
120
+ $stdout = stdout
121
+ $stderr = stderr
122
+ if block
123
+ begin
124
+ block.call
125
+ ensure
126
+ cleanup.call
127
+ end
128
+ else
129
+ @cleaners << cleanup
130
+ end
131
+ self
132
+ end
133
+
134
+ # Changes working directory to target
135
+ # @param (String) dest target directory
136
+ # @param (Proc) block if block is defined, restores working directory after block ends
137
+ # @return (Object) if block is defined returns block's return value
138
+ # @example
139
+ # @tester.chdir(dest)
140
+ def chdir(dest, &block)
141
+ if block
142
+ Dir.chdir(dest, &block)
143
+ else
144
+ if !defined? @original_dir
145
+ @original_dir = Dir.pwd
146
+ @cleaners << -> { Dir.chdir(@original_dir); @original_dir=nil }
147
+ end
148
+ Dir.chdir(dest)
149
+ end
150
+ end
151
+
152
+ def env(key, value)
153
+ current = ENV[key]
154
+ @cleaners << -> {ENV[key]=current}
155
+ ENV[key]=value
156
+ self
157
+ end
158
+
159
+ # Executes all pending cleanup operations
160
+ # * cleaners lists all procs that will be executed
161
+ # * all exceptions from procs are caught and raised together
162
+ # * Tester helper methods schedule cleanup operations to cleaners if needed
163
+ # @return [void]
164
+ # @example RSpec test
165
+ # describe "My tests" do
166
+ # before do
167
+ # @tester = Tester.new
168
+ # end
169
+ #
170
+ # after do
171
+ # @tester.after
172
+ # end
173
+ #
174
+ # it "should export files" do
175
+ # dest = @tester.tmpdir
176
+ # end
177
+ # end
178
+ #
179
+ # @example Tests can add their own cleanup procs. This reduces the need to write exception management in tests
180
+ # it "should combine ..." do
181
+ # dao = DAO.new
182
+ # @tester.cleaners << -> { dao.rollback }
183
+ # dao.do_something_that_does_not_cleanup_environment_and_might_raise_exception
184
+ # end
185
+ #
186
+ # @see ExceptionCatcher, cleaners
187
+ def after
188
+ catcher = ExceptionCatcher.new
189
+ @cleaners.each do |after_block|
190
+ catcher.catch do
191
+ after_block.call
192
+ end
193
+ end
194
+ @cleaners.clear
195
+ catcher.check
196
+ end
197
+
198
+ def clear?
199
+ @cleaners.empty?
200
+ end
201
+
202
+ def self.final_tester_check
203
+ catcher = ExceptionCatcher.new
204
+ $testers.each do |tester|
205
+ if !tester.clear?
206
+ puts "Tester#{tester.test_name ? " '#{tester.test_name}'" : ""} has not been cleared! Please add the missing .after() command. Clearing it automatically."
207
+ catcher.catch do
208
+ tester.after
209
+ end
210
+ end
211
+ end
212
+ catcher.check
213
+ end
214
+
215
+ # Copies contents of src to dest
216
+ # * excludes files and directories beginning with a '.'
217
+ # @param [String] src source directory path
218
+ # @param [String] dest destination directory path
219
+ # @return [String] dest directory
220
+ def self.copy_visible_files(src, dest)
221
+ Dir.glob(File.join(src, "**/*")).each do |file_src|
222
+ file_path = file_src[src.size+1..-1]
223
+ if File.file?(file_src)
224
+ FileUtils.cp(file_src, File.join(dest, file_path))
225
+ elsif File.directory?(file_src)
226
+ FileUtils.mkdir(File.join(dest, file_path))
227
+ end
228
+ end
229
+ dest
230
+ end
231
+
232
+ # Writes defined files to target directory
233
+ # * note: dest_root and target directories are automatically created
234
+ # @param [String] dest_root target directory path
235
+ # @param [Hash] files map of files and their contents
236
+ # @return [String] dest_root directory
237
+ # @example
238
+ # src = Tester.write_files(@tester.tmpdir, "file.txt" => "aa", "dir/my.txt" => "bb")
239
+ def self.write_files(dest_root, files={})
240
+ files.each_pair { |file_path, content|
241
+ dir = File.dirname(file_path)
242
+ if dir != "."
243
+ FileUtils.mkdir_p(File.join(dest_root, dir))
244
+ end
245
+ File.safe_write(File.join(dest_root, file_path), content)
246
+ }
247
+ dest_root
248
+ end
249
+
250
+ # Verifies that files exist in target directory.
251
+ # If files or directories are missing, contents are wrong, type is wrong or there are unwanted files raises an exception.
252
+ # @param [String] source_root target directory path
253
+ # @param [List] args containing check_for_extra_files and files map
254
+ # * check_for_extra_files, by default verify_files does not check if there are other files or directories. If set to true, raises an exception if there are other files
255
+ # * files, a map of file paths and contents. If file name ends with "/" or file contents are nil, path is a directory
256
+ # @return [Boolean] true if there were no errors
257
+ # @example
258
+ # @tester.verify_files(tmpdir, "file.txt" => "aa", "dir/my.txt" => "bb", "dir" => nil) # other files are ok
259
+ # @tester.verify_files(tmpdir, true, "file.txt" => "aa", "dir/my.txt" => "bb", "dir" => nil) # other files will fail
260
+ def self.verify_files(source_root, *args)
261
+ check_for_extra_files, files = args
262
+ if files.nil? && check_for_extra_files.kind_of?(Hash)
263
+ files = check_for_extra_files
264
+ check_for_extra_files = nil
265
+ end
266
+ files.each_pair do |file, contents|
267
+ file_path = File.join(source_root, file)
268
+ is_dir = file.end_with?("/") || contents.nil?
269
+ if !File.exists?(file_path)
270
+ raise "#{ is_dir ? "Directory" : "File"} '#{file_path}' is missing!"
271
+ end
272
+ if is_dir != File.directory?(file_path)
273
+ raise "Existing #{ is_dir ? "file" : "directory"} '#{file_path}' should be a #{ is_dir ? "directory" : "file"}!"
274
+ end
275
+ if !is_dir
276
+ file_contents = IO.read(file_path)
277
+ [contents].flatten.each do |o|
278
+ if o.kind_of?(Regexp)
279
+ if !file_contents.match(o)
280
+ raise "File '#{file_path}' does not match regexp #{o.inspect}, file contents: '#{file_contents}'"
281
+ end
282
+ elsif o.kind_of?(String)
283
+ if file_contents != o
284
+ raise "File '#{file_path}' is broken! Expected '#{o}' but was '#{file_contents}'"
285
+ end
286
+ elsif o.kind_of?(Proc)
287
+ if !o.call(file_contents)
288
+ raise "File '#{file_path}' did not pass test!"
289
+ end
290
+ else
291
+ raise "Unsupported checker! File '#{file_path}' object: #{o.inspect}"
292
+ end
293
+ end
294
+ end
295
+ end
296
+ if check_for_extra_files
297
+ files_and_dirs = {}
298
+ files.each_pair do |k, v|
299
+ file_arr=k.split("/")
300
+ c = file_arr.size
301
+ while c > 0
302
+ c -= 1
303
+ files_and_dirs[File.join(source_root, file_arr)]=true
304
+ file_arr.delete_at(-1)
305
+ end
306
+ end
307
+ Dir.glob(File.join(source_root, "**/*")).each do |file|
308
+ if !files_and_dirs[file]
309
+ raise "#{ File.directory?(file) ? "Directory" : "File"} '#{file}' exists, but it should not exist!"
310
+ end
311
+ end
312
+ end
313
+ end
314
+
315
+ # Dummy IO class that implements stream methods
316
+ # @see catch_stdio
317
+ class DummyIO < Array
318
+ def write(s)
319
+ self.<< s
320
+ end
321
+ end
322
+ end
323
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ki-repo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.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: 2012-11-21 00:00:00.000000000 Z
12
+ date: 2012-12-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -91,26 +91,81 @@ dependencies:
91
91
  - - ! '>='
92
92
  - !ruby/object:Gem::Version
93
93
  version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: rdiscount
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'
110
+ - !ruby/object:Gem::Dependency
111
+ name: mocha
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
94
126
  description: A generic repository for storing packages and metadata related to the
95
127
  packages.
96
128
  email:
97
- executables: []
129
+ executables:
130
+ - ki
98
131
  extensions: []
99
132
  extra_rdoc_files:
100
133
  - LICENSE.txt
101
134
  - README.md
102
135
  files:
103
- - .document
104
- - .rspec
105
- - Gemfile
106
- - Gemfile.lock
107
136
  - LICENSE.txt
108
137
  - README.md
109
- - Rakefile
110
138
  - VERSION
111
- - lib/ki-repo.rb
112
- - spec/ki-repo_spec.rb
113
- - spec/spec_helper.rb
139
+ - docs/backlog.md
140
+ - docs/development.md
141
+ - docs/development_setup.md
142
+ - docs/images/for_git.txt
143
+ - docs/ki_commands.md
144
+ - docs/repository_basics.md
145
+ - docs/writing_extensions.md
146
+ - lib/cmd/cmd.rb
147
+ - lib/cmd/user_pref_cmd.rb
148
+ - lib/cmd/version_cmd.rb
149
+ - lib/data_access/repository_finder.rb
150
+ - lib/data_access/repository_info.rb
151
+ - lib/data_access/version_helpers.rb
152
+ - lib/data_access/version_iterators.rb
153
+ - lib/data_access/version_operations.rb
154
+ - lib/data_storage/dir_base.rb
155
+ - lib/data_storage/ki_home.rb
156
+ - lib/data_storage/ki_json.rb
157
+ - lib/data_storage/repository.rb
158
+ - lib/data_storage/version_metadata.rb
159
+ - lib/ki_repo_all.rb
160
+ - lib/util/attr_chain.rb
161
+ - lib/util/exception_catcher.rb
162
+ - lib/util/hash.rb
163
+ - lib/util/hash_cache.rb
164
+ - lib/util/ruby_extensions.rb
165
+ - lib/util/service_registry.rb
166
+ - lib/util/simple_optparse.rb
167
+ - lib/util/test.rb
168
+ - bin/ki
114
169
  homepage: http://github.com/mikko-apo/ki-repo
115
170
  licenses:
116
171
  - Apache License, Version 2.0
@@ -126,7 +181,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
126
181
  version: '0'
127
182
  segments:
128
183
  - 0
129
- hash: -631020498654190277
184
+ hash: 1963502672638660453
130
185
  required_rubygems_version: !ruby/object:Gem::Requirement
131
186
  none: false
132
187
  requirements:
@@ -138,5 +193,6 @@ rubyforge_project:
138
193
  rubygems_version: 1.8.24
139
194
  signing_key:
140
195
  specification_version: 3
141
- summary: Repository for storing packages and metadata.
196
+ summary: ! 'Repository for storing packages and metadata - note: not ready for any
197
+ kind of use'
142
198
  test_files: []
data/.document DELETED
@@ -1,5 +0,0 @@
1
- lib/**/*.rb
2
- bin/*
3
- -
4
- features/**/*.feature
5
- LICENSE.txt
data/.rspec DELETED
@@ -1 +0,0 @@
1
- --color
data/Gemfile DELETED
@@ -1,14 +0,0 @@
1
- source "http://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
-
6
- # Add dependencies to develop your gem here.
7
- # Include everything needed to run rake, tests, features, etc.
8
- group :development do
9
- gem "rspec"
10
- gem "yard"
11
- gem "bundler"
12
- gem "jeweler"
13
- gem "simplecov"
14
- end
data/Gemfile.lock DELETED
@@ -1,38 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- diff-lcs (1.1.3)
5
- git (1.2.5)
6
- jeweler (1.8.4)
7
- bundler (~> 1.0)
8
- git (>= 1.2.5)
9
- rake
10
- rdoc
11
- json (1.7.5)
12
- multi_json (1.3.7)
13
- rake (10.0.2)
14
- rdoc (3.12)
15
- json (~> 1.4)
16
- rspec (2.12.0)
17
- rspec-core (~> 2.12.0)
18
- rspec-expectations (~> 2.12.0)
19
- rspec-mocks (~> 2.12.0)
20
- rspec-core (2.12.0)
21
- rspec-expectations (2.12.0)
22
- diff-lcs (~> 1.1.3)
23
- rspec-mocks (2.12.0)
24
- simplecov (0.7.1)
25
- multi_json (~> 1.0)
26
- simplecov-html (~> 0.7.1)
27
- simplecov-html (0.7.1)
28
- yard (0.8.3)
29
-
30
- PLATFORMS
31
- ruby
32
-
33
- DEPENDENCIES
34
- bundler
35
- jeweler
36
- rspec
37
- simplecov
38
- yard
data/Rakefile DELETED
@@ -1,42 +0,0 @@
1
- # encoding: utf-8
2
-
3
- require 'rubygems'
4
- require 'bundler'
5
- begin
6
- Bundler.setup(:default, :development)
7
- rescue Bundler::BundlerError => e
8
- $stderr.puts e.message
9
- $stderr.puts "Run `bundle install` to install missing gems"
10
- exit e.status_code
11
- end
12
- require 'rake'
13
-
14
- require 'jeweler'
15
- Jeweler::Tasks.new do |gem|
16
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
- gem.name = "ki-repo"
18
- gem.homepage = "http://github.com/mikko-apo/ki-repo"
19
- gem.license = "Apache License, Version 2.0"
20
- gem.summary = "Repository for storing packages and metadata."
21
- gem.description = "A generic repository for storing packages and metadata related to the packages."
22
- # gem.email = "mikko.apo@reaktor.fi"
23
- gem.authors = ["Mikko Apo"]
24
- # dependencies defined in Gemfile
25
- end
26
- Jeweler::RubygemsDotOrgTasks.new
27
-
28
- require 'rspec/core'
29
- require 'rspec/core/rake_task'
30
- RSpec::Core::RakeTask.new(:spec) do |spec|
31
- spec.pattern = FileList['spec/**/*_spec.rb']
32
- end
33
-
34
- RSpec::Core::RakeTask.new(:rcov) do |spec|
35
- spec.pattern = 'spec/**/*_spec.rb'
36
- spec.rcov = true
37
- end
38
-
39
- task :default => :spec
40
-
41
- require 'yard'
42
- YARD::Rake::YardocTask.new
data/spec/ki-repo_spec.rb DELETED
@@ -1,6 +0,0 @@
1
- require_relative 'spec_helper'
2
-
3
- describe "KiRepo" do
4
- it "works" do
5
- end
6
- end
data/spec/spec_helper.rb DELETED
@@ -1,12 +0,0 @@
1
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
- $LOAD_PATH.unshift(File.dirname(__FILE__))
3
- require 'rspec'
4
- require 'ki-repo'
5
-
6
- # Requires supporting files with custom matchers and macros, etc,
7
- # in ./support/ and its subdirectories.
8
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
9
-
10
- RSpec.configure do |config|
11
-
12
- end