notahat-machinist 0.1.0 → 0.1.1
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.markdown +1 -1
- data/Rakefile +3 -3
- data/lib/machinist.rb +12 -1
- data/machinist.gemspec +7 -5
- metadata +3 -3
data/README.markdown
CHANGED
@@ -109,7 +109,7 @@ Sham also supports generating numbered sequences if you prefer.
|
|
109
109
|
|
110
110
|
If you want to allow duplicate values for a sham, you can pass the `:unique` option:
|
111
111
|
|
112
|
-
Sham.coin_toss(:unique => false) { rand(2) == 0
|
112
|
+
Sham.coin_toss(:unique => false) { rand(2) == 0 ? 'heads' : 'tails' }
|
113
113
|
|
114
114
|
|
115
115
|
Blueprints - Generating ActiveRecord Objects
|
data/Rakefile
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'rake'
|
3
|
+
require 'rake/clean'
|
3
4
|
require 'spec/rake/spectask'
|
4
5
|
require 'echoe'
|
5
6
|
|
@@ -9,11 +10,10 @@ task :default => :spec
|
|
9
10
|
desc 'Run all the specs for the machinist plugin.'
|
10
11
|
Spec::Rake::SpecTask.new do |t|
|
11
12
|
t.spec_files = FileList['spec/**/*_spec.rb']
|
12
|
-
t.
|
13
|
-
t.rcov = true
|
13
|
+
t.rcov = false
|
14
14
|
end
|
15
15
|
|
16
|
-
Echoe.new('machinist', '0.1.
|
16
|
+
Echoe.new('machinist', '0.1.1') do |p|
|
17
17
|
p.description = "Fixtures aren't fun. Machinist is."
|
18
18
|
p.url = "http://github.com/notahat/machinist"
|
19
19
|
p.author = "Pete Yandell"
|
data/lib/machinist.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'active_support'
|
2
|
-
|
2
|
+
require 'active_record'
|
3
|
+
|
3
4
|
module Machinist
|
4
5
|
def self.with_save_nerfed
|
5
6
|
begin
|
@@ -75,3 +76,13 @@ module Machinist
|
|
75
76
|
end
|
76
77
|
end
|
77
78
|
end
|
79
|
+
|
80
|
+
if Module.const_defined?("RAILS_ENV") && RAILS_ENV == 'test'
|
81
|
+
require 'sham'
|
82
|
+
|
83
|
+
class ActiveRecord::Base
|
84
|
+
include Machinist::ActiveRecordExtensions
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
|
data/machinist.gemspec
CHANGED
@@ -1,26 +1,28 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
1
3
|
Gem::Specification.new do |s|
|
2
4
|
s.name = %q{machinist}
|
3
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.1"
|
4
6
|
|
5
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
6
8
|
s.authors = ["Pete Yandell"]
|
7
|
-
s.date = %q{2008-
|
9
|
+
s.date = %q{2008-12-01}
|
8
10
|
s.description = %q{Fixtures aren't fun. Machinist is.}
|
9
11
|
s.email = %q{pete@notahat.com}
|
10
12
|
s.extra_rdoc_files = ["lib/machinist.rb", "lib/sham.rb", "README.markdown"]
|
11
|
-
s.files = ["init.rb", "lib/machinist.rb", "lib/sham.rb", "
|
13
|
+
s.files = ["init.rb", "lib/machinist.rb", "lib/sham.rb", "Manifest", "MIT-LICENSE", "rails/init.rb", "Rakefile", "README.markdown", "machinist.gemspec"]
|
12
14
|
s.homepage = %q{http://github.com/notahat/machinist}
|
13
15
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Machinist", "--main", "README.markdown"]
|
14
16
|
s.require_paths = ["lib"]
|
15
17
|
s.rubyforge_project = %q{machinist}
|
16
|
-
s.rubygems_version = %q{1.
|
18
|
+
s.rubygems_version = %q{1.3.1}
|
17
19
|
s.summary = %q{Fixtures aren't fun. Machinist is.}
|
18
20
|
|
19
21
|
if s.respond_to? :specification_version then
|
20
22
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
21
23
|
s.specification_version = 2
|
22
24
|
|
23
|
-
if
|
25
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
24
26
|
else
|
25
27
|
end
|
26
28
|
else
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notahat-machinist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pete Yandell
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-12-01 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -27,12 +27,12 @@ files:
|
|
27
27
|
- init.rb
|
28
28
|
- lib/machinist.rb
|
29
29
|
- lib/sham.rb
|
30
|
-
- machinist.gemspec
|
31
30
|
- Manifest
|
32
31
|
- MIT-LICENSE
|
33
32
|
- rails/init.rb
|
34
33
|
- Rakefile
|
35
34
|
- README.markdown
|
35
|
+
- machinist.gemspec
|
36
36
|
has_rdoc: false
|
37
37
|
homepage: http://github.com/notahat/machinist
|
38
38
|
post_install_message:
|