sprig-reap 0.0.10 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ac2b20b4f1cbba5f31cfb4db6dfabbc25112ff8
4
- data.tar.gz: d79d619056b7e994d31498db65c6dbb4d2108b8b
3
+ metadata.gz: 34c7b63d6313c6df641d97b2af567e75ce3bc4bd
4
+ data.tar.gz: 261e9297a9f6c52eda8d1185a26bd2c27df83a6e
5
5
  SHA512:
6
- metadata.gz: 6b813463b3421ea27d6da1cf4dd93f517481d9a6cb90ab31fee066209b6e9f176af7bf9ff17ca456eff072db4d956143f62fc9aacb50423cf864d42a1166ca16
7
- data.tar.gz: 0b1e5d20bdf747713ff355f92103b8e7f73ea445911e0156d28e809c32a8705a898ae586454e78c4bc8c8dfdf3ab47a97d8579d2f736ca6e6270e31736bd8922
6
+ metadata.gz: c78eec13c257dabf3aa1d0c3bcb6b4c20eaf2eb07fcbbaa24f64428af9fbc70a2fd40631310f78192ef94ff68e668014a3dac036fdacf8e7364e49dd02a382b2
7
+ data.tar.gz: d85206a1bbd94e3c22452a87ed56746a402bf3104ec1d8489cdeab8f7d69b2b70e24055b60fb53ba13950d4af04d306bc0aebf5d81a3fcc93886224db88acb29
@@ -2,7 +2,7 @@ module Sprig::Reap
2
2
  class Association
3
3
  attr_reader :association
4
4
 
5
- delegate :foreign_key, :to => :association
5
+ delegate :plural_name, :to => :association
6
6
 
7
7
  def initialize(association)
8
8
  @association = association
@@ -38,5 +38,17 @@ module Sprig::Reap
38
38
  def polymorphic_type
39
39
  polymorphic? ? association.foreign_type : nil
40
40
  end
41
+
42
+ def has_and_belongs_to_many?
43
+ association.macro == :has_and_belongs_to_many
44
+ end
45
+
46
+ def has_and_belongs_to_many_attr
47
+ association.association_foreign_key.pluralize if has_and_belongs_to_many?
48
+ end
49
+
50
+ def foreign_key
51
+ has_and_belongs_to_many? ? association.association_foreign_key : association.foreign_key
52
+ end
41
53
  end
42
54
  end
@@ -32,7 +32,7 @@ module Sprig::Reap
32
32
  end
33
33
 
34
34
  def associations
35
- @associations ||= klass.reflect_on_all_associations(:belongs_to).map do |association|
35
+ @associations ||= klass.reflect_on_all_associations.select(&has_dependencies?).map do |association|
36
36
  Association.new(association)
37
37
  end
38
38
  end
@@ -77,10 +77,16 @@ module Sprig::Reap
77
77
 
78
78
  private
79
79
 
80
+ def has_dependencies?
81
+ proc do |association|
82
+ [:belongs_to, :has_and_belongs_to_many].include? association.macro
83
+ end
84
+ end
85
+
80
86
  def self.tsorted_classes(models)
81
87
  models.reduce(TsortableHash.new) do |hash, model|
82
88
  hash.merge(model.klass => model.dependencies)
83
- end.tsort
89
+ end.resolve_circular_habtm_dependencies!.tsort
84
90
  end
85
91
  end
86
92
  end
@@ -3,7 +3,7 @@ module Sprig::Reap
3
3
  attr_reader :record, :model
4
4
  attr_writer :sprig_id
5
5
 
6
- delegate :id, to: :record
6
+ delegate :id, :to => :record
7
7
 
8
8
  def initialize(record, model)
9
9
  @record = record
@@ -11,14 +11,14 @@ module Sprig::Reap
11
11
  end
12
12
 
13
13
  def attributes
14
- @attributes ||= model.attributes.delete_if { |a| a == "id" }
14
+ @attributes ||= model.attributes.delete_if { |a| a == "id" } | model.associations.map(&:has_and_belongs_to_many_attr).compact
15
15
  end
16
16
 
17
17
  def to_hash
18
18
  attributes.reduce({"sprig_id" => sprig_id}) do |hash, attr|
19
- value = get_value_for(attr)
19
+ value = Value.for(self, attr)
20
20
 
21
- if Sprig::Reap.omit_empty_attrs && value.nil?
21
+ if Sprig::Reap.omit_empty_attrs && empty?(value)
22
22
  hash
23
23
  else
24
24
  hash.merge(attr => value)
@@ -32,46 +32,8 @@ module Sprig::Reap
32
32
 
33
33
  private
34
34
 
35
- def get_value_for(attr)
36
- if dependency?(attr)
37
- klass = klass_for(attr)
38
- id = record.send(attr)
39
- sprig_id = Model.find(klass, id).try(:sprig_id)
40
-
41
- sprig_record(klass, sprig_id)
42
- else
43
- read_attribute attr
44
- end
45
- end
46
-
47
- def dependency?(attr)
48
- attr.in? model.associations.map(&:foreign_key)
49
- end
50
-
51
- def klass_for(foreign_key)
52
- association = association_for(foreign_key)
53
-
54
- if association.polymorphic?
55
- record.send(association.polymorphic_type).constantize
56
- else
57
- association.klass
58
- end
59
- end
60
-
61
- def association_for(foreign_key)
62
- model.associations.detect { |a| a.foreign_key == foreign_key }
63
- end
64
-
65
- def sprig_record(klass, sprig_id)
66
- return if sprig_id.nil?
67
-
68
- "<%= sprig_record(#{klass}, #{sprig_id}).id %>"
69
- end
70
-
71
- def read_attribute(attr)
72
- file_attr = FileAttribute.new(record.send(attr))
73
-
74
- file_attr.file.try(:sprig_location) || record.read_attribute(attr)
35
+ def empty?(value)
36
+ value.respond_to?(:empty?) ? value.empty? : value.nil?
75
37
  end
76
38
  end
77
39
  end
@@ -7,5 +7,20 @@ module Sprig::Reap
7
7
  def tsort_each_child(node, &block)
8
8
  fetch(node).each(&block)
9
9
  end
10
+
11
+ def resolve_circular_habtm_dependencies!
12
+ # When two models each have a `has_and_belongs_to_many` association pointing to the other,
13
+ # it creates a circular dependency. Based on Sprig documentation, we only need to define
14
+ # the association in one direction
15
+ # (https://github.com/vigetlabs/sprig#has-and-belongs-to-many), so we delete one of them.
16
+
17
+ self.each do |(model, dependencies)|
18
+ model.reflect_on_all_associations(:has_and_belongs_to_many).each do |association|
19
+ if dependencies.include? association.klass
20
+ self[association.klass] = self[association.klass] - [model]
21
+ end
22
+ end
23
+ end
24
+ end
10
25
  end
11
26
  end
@@ -0,0 +1,70 @@
1
+ module Sprig::Reap
2
+ class Value
3
+ attr_reader :sprig_record, :record, :attribute, :value, :raw_value
4
+
5
+ delegate :model, :sprig_id, :to => :sprig_record
6
+
7
+ def self.for(sprig_record, attribute)
8
+ new(sprig_record, attribute).for_sprig_file
9
+ end
10
+
11
+ def initialize(sprig_record, attribute)
12
+ @sprig_record = sprig_record
13
+ @record = sprig_record.record
14
+ @attribute = attribute
15
+ @value = record.send(attribute)
16
+ @raw_value = record.read_attribute(attribute)
17
+ end
18
+
19
+ def for_sprig_file
20
+ @for_sprig_file ||= dependency? ? sprig_dependency_reference : read_attribute
21
+ end
22
+
23
+ private
24
+
25
+ # Normalizes has-and-belongs-to-many attributes, which come in as `tag_ids`
26
+ # We want to check for association FKs matching `tag_id`
27
+ def normalized_foreign_key
28
+ @normalized_foreign_key ||= attribute.singularize
29
+ end
30
+
31
+ def dependency?
32
+ normalized_foreign_key.in? model.associations.map(&:foreign_key)
33
+ end
34
+
35
+ def association
36
+ @association ||= model.associations.detect { |a| a.foreign_key == normalized_foreign_key }
37
+ end
38
+
39
+ def klass
40
+ @klass ||= if association.polymorphic?
41
+ record.send(association.polymorphic_type).constantize
42
+ else
43
+ association.klass
44
+ end
45
+ end
46
+
47
+ def sprig_dependency_reference
48
+ references = Array(value).map do |id|
49
+ sprig_id = Model.find(klass, id).try(:sprig_id)
50
+
51
+ sprig_record_reference(klass, sprig_id)
52
+ end
53
+
54
+ # For proper Sprig file formatting, need to return an array for HABTM
55
+ association.has_and_belongs_to_many? ? references : references.first
56
+ end
57
+
58
+ def sprig_record_reference(klass, sprig_id)
59
+ return if sprig_id.nil?
60
+
61
+ "<%= sprig_record(#{klass}, #{sprig_id}).id %>"
62
+ end
63
+
64
+ def read_attribute
65
+ file_attr = FileAttribute.new(value)
66
+
67
+ file_attr.file.try(:sprig_location) || raw_value
68
+ end
69
+ end
70
+ end
@@ -1,5 +1,5 @@
1
1
  module Sprig
2
2
  module Reap
3
- VERSION = "0.0.10"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
data/lib/sprig/reap.rb CHANGED
@@ -6,6 +6,7 @@ module Sprig::Reap
6
6
  autoload :Configuration, 'sprig/reap/configuration'
7
7
  autoload :Model, 'sprig/reap/model'
8
8
  autoload :Association, 'sprig/reap/association'
9
+ autoload :Value, 'sprig/reap/value'
9
10
  autoload :Record, 'sprig/reap/record'
10
11
  autoload :SeedFile, 'sprig/reap/seed_file'
11
12
  autoload :FileAttribute, 'sprig/reap/file_attribute'
@@ -3,6 +3,8 @@ class Post < ActiveRecord::Base
3
3
 
4
4
  has_many :votes, :as => :votable
5
5
 
6
+ has_and_belongs_to_many :tags
7
+
6
8
  def title
7
9
  WrappedAttribute.new(self[:title])
8
10
  end
@@ -0,0 +1,3 @@
1
+ class Tag < ActiveRecord::Base
2
+ has_and_belongs_to_many :posts
3
+ end
@@ -9,6 +9,7 @@ describe Sprig::Reap::Association do
9
9
  let(:standard_association) { Comment.reflect_on_all_associations(:belongs_to).first }
10
10
  let(:class_named_association) { Post.reflect_on_all_associations(:belongs_to).first }
11
11
  let(:polymorphic_association) { Vote.reflect_on_all_associations(:belongs_to).first }
12
+ let(:habtm_association) { Tag.reflect_on_all_associations(:has_and_belongs_to_many).first }
12
13
 
13
14
  describe "#polymorphic?" do
14
15
  context "when given a non-polymorphic dependency" do
@@ -123,4 +124,46 @@ describe Sprig::Reap::Association do
123
124
  its(:polymorphic_type) { should == nil }
124
125
  end
125
126
  end
127
+
128
+ describe "#has_and_belongs_to_many?" do
129
+ context "when the association is a has-and-belongs-to-many" do
130
+ subject { described_class.new(habtm_association) }
131
+
132
+ its(:has_and_belongs_to_many?) { should == true }
133
+ end
134
+
135
+ context "when the association is not a has-and-belongs-to-many" do
136
+ subject { described_class.new(standard_association) }
137
+
138
+ its(:has_and_belongs_to_many?) { should == false }
139
+ end
140
+ end
141
+
142
+ describe "#has_and_belongs_to_many_attr" do
143
+ context "when the association is a has-and-belongs-to-many" do
144
+ subject { described_class.new(habtm_association) }
145
+
146
+ its(:has_and_belongs_to_many_attr) { should == 'post_ids' }
147
+ end
148
+
149
+ context "when the association is not a has-and-belongs-to-many" do
150
+ subject { described_class.new(standard_association) }
151
+
152
+ its(:has_and_belongs_to_many_attr) { should == nil }
153
+ end
154
+ end
155
+
156
+ describe "#foreign_key" do
157
+ context "when the association is a has-and-belongs-to-many" do
158
+ subject { described_class.new(habtm_association) }
159
+
160
+ its(:foreign_key) { should == 'post_id' }
161
+ end
162
+
163
+ context "when the association is not a has-and-belongs-to-many" do
164
+ subject { described_class.new(class_named_association) }
165
+
166
+ its(:foreign_key) { should == 'poster_id' }
167
+ end
168
+ end
126
169
  end
@@ -5,6 +5,7 @@ describe Sprig::Reap::Model do
5
5
  let(:all_models) do
6
6
  [
7
7
  described_class.new(User),
8
+ described_class.new(Tag),
8
9
  described_class.new(Post),
9
10
  described_class.new(Comment),
10
11
  described_class.new(Vote)
@@ -12,7 +13,7 @@ describe Sprig::Reap::Model do
12
13
  end
13
14
 
14
15
  before do
15
- Sprig::Reap.stub(:classes).and_return([Comment, Post, User, Vote])
16
+ Sprig::Reap.stub(:classes).and_return([Comment, Post, User, Vote, Tag])
16
17
  end
17
18
 
18
19
  it "returns an dependency-sorted array of Sprig::Reap::Models" do
@@ -72,20 +73,20 @@ describe Sprig::Reap::Model do
72
73
  its(:dependencies) { should == [Post] }
73
74
  end
74
75
 
75
- context "when the model has a dependency with an explicit :class_name" do
76
+ context "when the model has a HABTM dependency or a dependency with an explicit :class_name" do
76
77
  subject { described_class.new(Post) }
77
78
 
78
- its(:dependencies) { should == [User] }
79
+ its(:dependencies) { should == [User, Tag] }
79
80
  end
80
81
  end
81
82
 
82
83
  describe "#associations" do
83
- let(:association) { double('Association') }
84
+ let(:association) { double('Association', macro: :belongs_to) }
84
85
 
85
86
  subject { described_class.new(Post) }
86
87
 
87
88
  before do
88
- Post.stub(:reflect_on_all_associations).with(:belongs_to).and_return([association])
89
+ Post.stub(:reflect_on_all_associations).and_return([association])
89
90
  end
90
91
 
91
92
  it "creates an Association object for each belongs to association the model has" do
@@ -207,6 +208,6 @@ describe Sprig::Reap::Model do
207
208
  end
208
209
 
209
210
  def yaml_from_file(basename)
210
- File.read('spec/fixtures/yaml/' + basename)
211
+ YAML.load(File.read('spec/fixtures/yaml/' + basename)).to_yaml.gsub("---\n", '')
211
212
  end
212
213
  end
@@ -23,6 +23,7 @@ describe Sprig::Reap::Record do
23
23
  :published => false)
24
24
  end
25
25
 
26
+ let!(:tag) { Tag.create(name: 'Awesome', post_ids: [post.id]) }
26
27
  let!(:models) { Sprig::Reap::Model.all }
27
28
  let!(:model) { models.find { |model| model.klass == Post } }
28
29
 
@@ -50,6 +51,7 @@ describe Sprig::Reap::Record do
50
51
  content
51
52
  published
52
53
  poster_id
54
+ tag_ids
53
55
  )
54
56
  end
55
57
  end
@@ -63,7 +65,8 @@ describe Sprig::Reap::Record do
63
65
  'title' => 'Such Title',
64
66
  'content' => 'Very Content',
65
67
  'published' => true,
66
- 'poster_id' => "<%= sprig_record(User, #{user.id}).id %>"
68
+ 'poster_id' => "<%= sprig_record(User, #{user.id}).id %>",
69
+ 'tag_ids' => ["<%= sprig_record(Tag, #{tag.id}).id %>"]
67
70
  }
68
71
  end
69
72
 
@@ -76,7 +79,8 @@ describe Sprig::Reap::Record do
76
79
  'title' => 'Wow Title',
77
80
  'content' => 'Much Content',
78
81
  'published' => false,
79
- 'poster_id' => nil
82
+ 'poster_id' => nil,
83
+ 'tag_ids' => []
80
84
  }
81
85
  end
82
86
  end
@@ -0,0 +1,27 @@
1
+ require 'spec_helper'
2
+
3
+ describe Sprig::Reap::TsortableHash do
4
+ describe "#resolve_circular_habtm_dependencies!" do
5
+ subject do
6
+ described_class.new.merge(
7
+ Comment => [Post],
8
+ Post => [User, Tag],
9
+ Tag => [Post],
10
+ User => [],
11
+ Vote => [Post]
12
+ )
13
+ end
14
+
15
+ it "trims out circular dependencies resulting from has-and-belongs-to-many" do
16
+ subject.resolve_circular_habtm_dependencies!
17
+
18
+ subject.should == {
19
+ Comment => [Post],
20
+ Post => [User, Tag],
21
+ Tag => [],
22
+ User => [],
23
+ Vote => [Post]
24
+ }
25
+ end
26
+ end
27
+ end
data/spec/spec_helper.rb CHANGED
@@ -53,3 +53,9 @@ Comment.connection.execute "CREATE TABLE comments (id INTEGER PRIMARY KEY , post
53
53
 
54
54
  Vote.connection.execute "DROP TABLE IF EXISTS votes;"
55
55
  Vote.connection.execute "CREATE TABLE votes (id INTEGER PRIMARY KEY, votable_id INTEGER, votable_type VARCHAR(255));"
56
+
57
+ Tag.connection.execute "DROP TABLE IF EXISTS tags;"
58
+ Tag.connection.execute "CREATE TABLE tags (id INTEGER PRIMARY KEY, name VARCHAR(255));"
59
+
60
+ Tag.connection.execute "DROP TABLE IF EXISTS posts_tags;"
61
+ Tag.connection.execute "CREATE TABLE posts_tags (id INTEGER PRIMARY KEY, post_id INTEGER, tag_id INTEGER);"
metadata CHANGED
@@ -1,111 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprig-reap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Stenberg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-26 00:00:00.000000000 Z
11
+ date: 2015-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.1'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: sqlite3
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.3.8
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: 1.3.8
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: 2.14.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: 2.14.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: database_cleaner
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: 1.2.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.2.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pry
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: generator_spec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - '>='
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: carrierwave
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ~>
102
102
  - !ruby/object:Gem::Version
103
103
  version: 0.10.0
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ~>
109
109
  - !ruby/object:Gem::Version
110
110
  version: 0.10.0
111
111
  description: Sprig-Reap is a gem that allows you to output your application's data
@@ -116,11 +116,6 @@ executables: []
116
116
  extensions: []
117
117
  extra_rdoc_files: []
118
118
  files:
119
- - MIT-LICENSE
120
- - README.md
121
- - Rakefile
122
- - lib/sprig-reap.rb
123
- - lib/sprig/reap.rb
124
119
  - lib/sprig/reap/association.rb
125
120
  - lib/sprig/reap/configuration.rb
126
121
  - lib/sprig/reap/file_attribute.rb
@@ -130,12 +125,19 @@ files:
130
125
  - lib/sprig/reap/record.rb
131
126
  - lib/sprig/reap/seed_file.rb
132
127
  - lib/sprig/reap/tsortable_hash.rb
128
+ - lib/sprig/reap/value.rb
133
129
  - lib/sprig/reap/version.rb
130
+ - lib/sprig/reap.rb
131
+ - lib/sprig-reap.rb
134
132
  - lib/tasks/reap.rake
133
+ - MIT-LICENSE
134
+ - Rakefile
135
+ - README.md
135
136
  - spec/db/activerecord.db
136
137
  - spec/fixtures/images/avatar.png
137
138
  - spec/fixtures/models/comment.rb
138
139
  - spec/fixtures/models/post.rb
140
+ - spec/fixtures/models/tag.rb
139
141
  - spec/fixtures/models/user.rb
140
142
  - spec/fixtures/models/vote.rb
141
143
  - spec/fixtures/uploaders/avatar_uploader.rb
@@ -151,6 +153,7 @@ files:
151
153
  - spec/lib/sprig/reap/model_spec.rb
152
154
  - spec/lib/sprig/reap/record_spec.rb
153
155
  - spec/lib/sprig/reap/seed_file_spec.rb
156
+ - spec/lib/sprig/reap/tsortable_hash_spec.rb
154
157
  - spec/lib/sprig/reap_spec.rb
155
158
  - spec/lib/sprig_spec.rb
156
159
  - spec/spec_helper.rb
@@ -169,17 +172,17 @@ require_paths:
169
172
  - lib
170
173
  required_ruby_version: !ruby/object:Gem::Requirement
171
174
  requirements:
172
- - - ">="
175
+ - - '>='
173
176
  - !ruby/object:Gem::Version
174
177
  version: '0'
175
178
  required_rubygems_version: !ruby/object:Gem::Requirement
176
179
  requirements:
177
- - - ">="
180
+ - - '>='
178
181
  - !ruby/object:Gem::Version
179
182
  version: '0'
180
183
  requirements: []
181
184
  rubyforge_project:
182
- rubygems_version: 2.2.2
185
+ rubygems_version: 2.0.14
183
186
  signing_key:
184
187
  specification_version: 4
185
188
  summary: Automatic seed file generation for Rails apps using Sprig.
@@ -188,6 +191,7 @@ test_files:
188
191
  - spec/fixtures/images/avatar.png
189
192
  - spec/fixtures/models/comment.rb
190
193
  - spec/fixtures/models/post.rb
194
+ - spec/fixtures/models/tag.rb
191
195
  - spec/fixtures/models/user.rb
192
196
  - spec/fixtures/models/vote.rb
193
197
  - spec/fixtures/uploaders/avatar_uploader.rb
@@ -203,6 +207,7 @@ test_files:
203
207
  - spec/lib/sprig/reap/model_spec.rb
204
208
  - spec/lib/sprig/reap/record_spec.rb
205
209
  - spec/lib/sprig/reap/seed_file_spec.rb
210
+ - spec/lib/sprig/reap/tsortable_hash_spec.rb
206
211
  - spec/lib/sprig/reap_spec.rb
207
212
  - spec/lib/sprig_spec.rb
208
213
  - spec/spec_helper.rb