little-fixtures 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/little-fixtures.rb +15 -0
- metadata +45 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3a1cb67e228cfb5e40cb47246134dbe8e0e63d7b
|
4
|
+
data.tar.gz: d9974610e2ef2731336bc44bac2b4dbbfa0714ca
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c6fc23330760776e5c10231875cbca1508e88dda802b17fcd9c0ee34bc01ef3d496b3fe62774798a9a962f303629cb005fe647bba1f75c054d1f306f826dcd16
|
7
|
+
data.tar.gz: c70934cfbf4014171fd478b1fad5ff1ae8b0a6931809d817db7b25266db2ae225f3429972283769e58c2369c0202fa381fae430a68a880d909fe091b1f93d224
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class LittleFixtures
|
2
|
+
VERSION = '0.0.1'
|
3
|
+
|
4
|
+
def self.load(fixtures_path)
|
5
|
+
Hash.new.tap do |fixtures|
|
6
|
+
Dir.glob(File.join(fixtures_path, '**', '*.*')).each do |path|
|
7
|
+
parts = File.dirname(path).sub(fixtures_path, '').split(File::SEPARATOR)
|
8
|
+
parts << File.basename(path, File.extname(path))
|
9
|
+
|
10
|
+
key = parts.reject(&:empty?).join('.')
|
11
|
+
fixtures[key] = File.read(path)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
metadata
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: little-fixtures
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Daniel Bogan
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-09-02 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A tiny gem for neatly loading fixture files
|
14
|
+
email:
|
15
|
+
- d+little-fixtures@waferbaby.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- lib/little-fixtures.rb
|
21
|
+
homepage: http://github.com/waferbaby/little-fixtures
|
22
|
+
licenses:
|
23
|
+
- MIT
|
24
|
+
metadata: {}
|
25
|
+
post_install_message:
|
26
|
+
rdoc_options: []
|
27
|
+
require_paths:
|
28
|
+
- lib
|
29
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
35
|
+
requirements:
|
36
|
+
- - ">="
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
39
|
+
requirements: []
|
40
|
+
rubyforge_project:
|
41
|
+
rubygems_version: 2.6.13
|
42
|
+
signing_key:
|
43
|
+
specification_version: 4
|
44
|
+
summary: A tiny gem for neatly loading fixture files
|
45
|
+
test_files: []
|