code_spike 0.0.2 → 0.0.3
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.
- data/README.md +7 -6
- data/code_spike.gemspec +1 -1
- data/lib/code_spike/version.rb +1 -1
- data/lib/code_spike.rb +6 -1
- metadata +9 -9
data/README.md
CHANGED
@@ -1,11 +1,5 @@
|
|
1
1
|
# CodeSpike
|
2
2
|
|
3
|
-
## Installation
|
4
|
-
|
5
|
-
```bash
|
6
|
-
gem install code_spike
|
7
|
-
```
|
8
|
-
|
9
3
|
CodeSpike is a simple Gem for spiking ActiveRecord models. It uses an in memory sqlite3 database and requires all the necessary libs
|
10
4
|
for unit testing. In addition it provides a DSL for creating the database schema as well calling test methods.
|
11
5
|
|
@@ -15,6 +9,13 @@ or the exact syntax. So I spend time googling or looking back through old code,
|
|
15
9
|
|
16
10
|
This Gem just wraps the setup and adds a simple DSL that I can remember, so I can move right into the problem I'm working on!
|
17
11
|
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
```bash
|
16
|
+
gem install code_spike
|
17
|
+
```
|
18
|
+
|
18
19
|
## Usage
|
19
20
|
|
20
21
|
```ruby
|
data/code_spike.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
|
|
6
6
|
gem.email = ["inbox@seanbehan.com"]
|
7
7
|
gem.description = %q{Down and dirty ActiveRecord code spiking outside of Rails}
|
8
8
|
gem.summary = %q{CodeSpike is a simple Gem for spiking ActiveRecord models. It uses an in memory sqlite3 database and requires all the necessary libs for unit testing. In addition it provides a DSL for creating the database schema as well calling test methods.}
|
9
|
-
gem.homepage = "http://github.com/gristmill"
|
9
|
+
gem.homepage = "http://github.com/gristmill/code_spike"
|
10
10
|
|
11
11
|
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
12
12
|
gem.files = `git ls-files`.split("\n")
|
data/lib/code_spike/version.rb
CHANGED
data/lib/code_spike.rb
CHANGED
@@ -28,6 +28,11 @@ def schema(&block)
|
|
28
28
|
|
29
29
|
end
|
30
30
|
|
31
|
+
# Fixtures for sample data for tests. Set the directory where the fixture files live.
|
32
|
+
#
|
33
|
+
# TODO: Add support for fixtures access helpers. If you have a companies.yml file with label `comapany1`, then
|
34
|
+
# companies(:company1) should return the ActiveRecord object.
|
35
|
+
#
|
31
36
|
def fixtures_directory(fixtures_directory='.')
|
32
37
|
require 'active_record/fixtures'
|
33
38
|
require 'yaml'
|
@@ -42,7 +47,7 @@ end
|
|
42
47
|
|
43
48
|
def units(&block)
|
44
49
|
if defined?(@fixtures_directory)
|
45
|
-
ActiveRecord::Fixtures.create_fixtures(@fixtures_directory, Dir["
|
50
|
+
ActiveRecord::Fixtures.create_fixtures(@fixtures_directory, Dir["#{@fixtures_directory}/*.yml"].map { |f| File.basename(f, '.*') })
|
46
51
|
end
|
47
52
|
|
48
53
|
CodeSpike.instance_eval(&block)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: code_spike
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-09-
|
12
|
+
date: 2012-09-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
16
|
-
requirement: &
|
16
|
+
requirement: &70207687486440 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '3.2'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70207687486440
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: activerecord
|
27
|
-
requirement: &
|
27
|
+
requirement: &70207687485240 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '3.2'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70207687485240
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: sqlite3
|
38
|
-
requirement: &
|
38
|
+
requirement: &70207687483740 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '1.3'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70207687483740
|
47
47
|
description: Down and dirty ActiveRecord code spiking outside of Rails
|
48
48
|
email:
|
49
49
|
- inbox@seanbehan.com
|
@@ -59,7 +59,7 @@ files:
|
|
59
59
|
- code_spike.gemspec
|
60
60
|
- lib/code_spike.rb
|
61
61
|
- lib/code_spike/version.rb
|
62
|
-
homepage: http://github.com/gristmill
|
62
|
+
homepage: http://github.com/gristmill/code_spike
|
63
63
|
licenses: []
|
64
64
|
post_install_message:
|
65
65
|
rdoc_options: []
|