jay_z 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ rvm:
2
+ - 1.9.2
3
+ - 1.9.3
4
+
data/lib/jay_z/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module JayZ
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.0"
3
3
  end
data/readme.md ADDED
@@ -0,0 +1,67 @@
1
+ JayZ [![Stillmaintained](http://stillmaintained.com/unders/jay_z.png)](http://stillmaintained.com/unders/jay_z)
2
+ ====
3
+
4
+ * http://github.com/unders/jay_z
5
+ * [![Build Status](http://travis-ci.org/unders/jay_z.png)](http://travis-ci.org/unders/jay_z)
6
+ * [GemTesters](http://test.rubygems.org/gems/jay_z)
7
+ * [JayZ @ Rubygems](http://rubygems.org/gems/jay_z)
8
+
9
+ Description:
10
+ -----------
11
+
12
+ A model factory. Say no to fixtures.
13
+ Documentation is available at [rubydoc](http://rubydoc.info/gems/jay_z)
14
+
15
+ Compatibility
16
+ -------------
17
+
18
+ Ruby version 1.9.2 and 1.9.3 and Rails version 3.1
19
+
20
+ [GemTesters](http://test.rubygems.org/gems/jay_z) has
21
+ more information on which platform the Gem is tested.
22
+
23
+ Install
24
+ -------
25
+
26
+ Install as a gem:
27
+
28
+ gem install jay_z
29
+
30
+ Rails and ActiveRecord
31
+ ----------------------
32
+
33
+ 1. Update Gemfile
34
+
35
+ group :development, :test do
36
+ gem 'jay_z', :require => 'jay_z/rails'
37
+ end
38
+
39
+ 2. `rails generate jay_z:install`
40
+
41
+ It adds `blueprint.rb` file to test or spec directory.
42
+
43
+ 3. Update config/application.rb
44
+
45
+ config.generators do |g|
46
+ g.test_framework :mini_test, :spec => true, :fixture_replacement => :jay_z
47
+ end
48
+
49
+ 4. `rails generate model Comment post_id:integer body:text`
50
+
51
+ It adds to the end of `(spec|test)/blueprint.rb`
52
+
53
+ class Comment < Blueprint(ActiveRecord)
54
+ default do
55
+ post_id { 1 }
56
+ body { "MyText" }
57
+ end
58
+ end
59
+
60
+ How to test the installed Gem
61
+ -------------------------
62
+
63
+ gem install rubygems-test
64
+ gem test jay_z
65
+
66
+
67
+ For more info see: [GemTesters](http://test.rubygems.org/)
@@ -151,7 +151,6 @@ describe JayZ::Blueprint do
151
151
  end
152
152
 
153
153
  it "executes the defined block when its method is called" do
154
- User.counter.must_equal nil
155
154
  JayZ::Comment.default
156
155
  User.counter.must_equal 1
157
156
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'rails/railtie'
4
4
  require 'active_record'
5
- require 'jay_z/active_record'
5
+ require 'jay_z/rails'
6
6
  require 'minitest/autorun'
7
7
 
8
8
  ActiveRecord::Base.establish_connection(:adapter => "sqlite3",
@@ -119,6 +119,7 @@ describe ActiveRecord do
119
119
  describe 'makes fields uniq with #{sn}' do
120
120
  before do
121
121
  user = Author.make.save
122
+ @post_count = Post.count
122
123
  @post1 = Post.make(:author => user).save
123
124
  @post2 = Post.make(:author => user).save
124
125
  @post3 = Post.make(:author => user).save
@@ -130,7 +131,7 @@ describe ActiveRecord do
130
131
  @post2.valid?.must_equal true
131
132
  @post3.valid?.must_equal true
132
133
  @post4.valid?.must_equal true
133
- Post.count.must_equal 4
134
+ Post.count.must_equal (@post_count + 4)
134
135
  end
135
136
 
136
137
  after do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jay_z
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
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: 2011-10-07 00:00:00.000000000Z
12
+ date: 2011-11-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
16
- requirement: &70199577015200 !ruby/object:Gem::Requirement
16
+ requirement: &70205766337780 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.1.0
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70199577015200
24
+ version_requirements: *70205766337780
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: railties
27
- requirement: &70199577014480 !ruby/object:Gem::Requirement
27
+ requirement: &70205766335780 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 3.1.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70199577014480
35
+ version_requirements: *70205766335780
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sqlite3
38
- requirement: &70199577013760 !ruby/object:Gem::Requirement
38
+ requirement: &70205766334340 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: 1.3.4
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70199577013760
46
+ version_requirements: *70205766334340
47
47
  description: A model factory. Say no to fixtures.
48
48
  email:
49
49
  - anders.tornqvist@gmail.com
@@ -52,6 +52,7 @@ extensions: []
52
52
  extra_rdoc_files: []
53
53
  files:
54
54
  - .gemtest
55
+ - .travis.yml
55
56
  - Gemfile
56
57
  - Rakefile
57
58
  - jay_z.gemspec
@@ -59,16 +60,16 @@ files:
59
60
  - lib/generators/jay_z/install/templates/blueprint.rb
60
61
  - lib/generators/jay_z/model/model_generator.rb
61
62
  - lib/jay_z.rb
62
- - lib/jay_z/active_record.rb
63
63
  - lib/jay_z/blueprint.rb
64
64
  - lib/jay_z/ghost.rb
65
+ - lib/jay_z/rails.rb
65
66
  - lib/jay_z/railtie.rb
66
67
  - lib/jay_z/serial_number.rb
67
68
  - lib/jay_z/version.rb
68
- - readme.rdoc
69
- - spec/jay_z/active_record_spec.rb
69
+ - readme.md
70
70
  - spec/jay_z/blueprint_spec.rb
71
71
  - spec/jay_z/ghost_spec.rb
72
+ - spec/jay_z/rails_spec.rb
72
73
  - spec/jay_z/serial_number_spec.rb
73
74
  - spec/jay_z_spec.rb
74
75
  homepage: https://github.com/unders/jay_z
@@ -91,13 +92,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
92
  version: '0'
92
93
  requirements: []
93
94
  rubyforge_project: jay_z
94
- rubygems_version: 1.8.10
95
+ rubygems_version: 1.8.11
95
96
  signing_key:
96
97
  specification_version: 3
97
98
  summary: A model factory
98
99
  test_files:
99
- - spec/jay_z/active_record_spec.rb
100
100
  - spec/jay_z/blueprint_spec.rb
101
101
  - spec/jay_z/ghost_spec.rb
102
+ - spec/jay_z/rails_spec.rb
102
103
  - spec/jay_z/serial_number_spec.rb
103
104
  - spec/jay_z_spec.rb
data/readme.rdoc DELETED
File without changes
File without changes