spectifly-sequel 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +4 -4
- data/lib/spectifly/sequel/erb/create_table.erb +1 -0
- data/lib/spectifly/sequel/erb/field/multiple_value_simple_type_field.erb +2 -0
- data/lib/spectifly/sequel/erb/field/timestamps.erb +6 -0
- data/lib/spectifly/sequel/version.rb +1 -1
- data/spec/expectations/animal_multiple_value_string_field.migration +2 -0
- data/spec/expectations/cow.migration +2 -0
- data/spec/expectations/group.migration +2 -0
- data/spec/expectations/individual.migration +3 -0
- metadata +6 -5
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
spectifly-sequel (0.0.
|
4
|
+
spectifly-sequel (0.0.2)
|
5
5
|
activesupport
|
6
6
|
sequel
|
7
7
|
spectifly
|
@@ -9,8 +9,8 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activesupport (3.2.
|
13
|
-
i18n (
|
12
|
+
activesupport (3.2.13)
|
13
|
+
i18n (= 0.6.1)
|
14
14
|
multi_json (~> 1.0)
|
15
15
|
builder (3.2.0)
|
16
16
|
columnize (0.3.6)
|
@@ -21,7 +21,7 @@ GEM
|
|
21
21
|
debugger-linecache (1.2.0)
|
22
22
|
debugger-ruby_core_source (1.2.0)
|
23
23
|
diff-lcs (1.2.4)
|
24
|
-
i18n (0.6.
|
24
|
+
i18n (0.6.1)
|
25
25
|
json (1.8.0)
|
26
26
|
multi_json (1.7.2)
|
27
27
|
rake (10.0.4)
|
@@ -3,6 +3,7 @@
|
|
3
3
|
<% @model.single_value_fields.each do |field| -%>
|
4
4
|
<%= field.for_new_migration(@model, @entities) %>
|
5
5
|
<% end -%>
|
6
|
+
<%= render File.expand_path('field/timestamps.erb', File.dirname(__FILE__)) -%>
|
6
7
|
<% @model.foreign_keys.each do |key| -%>
|
7
8
|
foreign_key :<%= key.field_name %>, :<%= key.table_name %><%= ", :unique => true" if key.unique -%><%= ", :null => false" if key.required %>
|
8
9
|
<% end -%>
|
@@ -3,6 +3,8 @@
|
|
3
3
|
primary_key :id
|
4
4
|
foreign_key :<%= @model.name_as_foreign_key %>, :<%= @model.table_name %>, :null => false
|
5
5
|
<%= @field.type %> :name, :null => false
|
6
|
+
DateTime :created_at, :null => false
|
7
|
+
DateTime :updated_at, :null => false
|
6
8
|
end
|
7
9
|
|
8
10
|
add_index [:<%=@model.name_as_foreign_key %>, :name], :<%= @model.table_name %>_<%= @field.name %>, :unique => true
|
@@ -3,6 +3,8 @@
|
|
3
3
|
primary_key :id
|
4
4
|
foreign_key :individual_id, :individuals, :null => false
|
5
5
|
String :name, :null => false
|
6
|
+
DateTime :created_at, :null => false
|
7
|
+
DateTime :updated_at, :null => false
|
6
8
|
end
|
7
9
|
|
8
10
|
add_index [:individual_id, :name], :individuals_animals, :unique => true
|
@@ -7,6 +7,7 @@ Sequel.migration do
|
|
7
7
|
Integer :age
|
8
8
|
Boolean :happy
|
9
9
|
DateTime :created_at
|
10
|
+
DateTime :updated_at, :null => false
|
10
11
|
foreign_key :group_id, :groups, :null => false
|
11
12
|
end
|
12
13
|
|
@@ -14,6 +15,8 @@ Sequel.migration do
|
|
14
15
|
primary_key :id
|
15
16
|
foreign_key :individual_id, :individuals, :null => false
|
16
17
|
String :name, :null => false
|
18
|
+
DateTime :created_at, :null => false
|
19
|
+
DateTime :updated_at, :null => false
|
17
20
|
end
|
18
21
|
|
19
22
|
add_index [:individual_id, :name], :individuals_favorites, :unique => true
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spectifly-sequel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2013-05-
|
15
|
+
date: 2013-05-25 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: spectifly
|
@@ -167,6 +167,7 @@ files:
|
|
167
167
|
- lib/spectifly/sequel/erb/field/many_to_many_association.erb
|
168
168
|
- lib/spectifly/sequel/erb/field/multiple_value_simple_type_field.erb
|
169
169
|
- lib/spectifly/sequel/erb/field/single_value_simple_type_field.erb
|
170
|
+
- lib/spectifly/sequel/erb/field/timestamps.erb
|
170
171
|
- lib/spectifly/sequel/erb/new_migration.erb
|
171
172
|
- lib/spectifly/sequel/field.rb
|
172
173
|
- lib/spectifly/sequel/field_for_migration.rb
|
@@ -217,7 +218,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
217
218
|
version: '0'
|
218
219
|
segments:
|
219
220
|
- 0
|
220
|
-
hash:
|
221
|
+
hash: 2662357379730941317
|
221
222
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
222
223
|
none: false
|
223
224
|
requirements:
|
@@ -226,10 +227,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
226
227
|
version: '0'
|
227
228
|
segments:
|
228
229
|
- 0
|
229
|
-
hash:
|
230
|
+
hash: 2662357379730941317
|
230
231
|
requirements: []
|
231
232
|
rubyforge_project:
|
232
|
-
rubygems_version: 1.8.
|
233
|
+
rubygems_version: 1.8.23
|
233
234
|
signing_key:
|
234
235
|
specification_version: 3
|
235
236
|
summary: A Sequel add-on to Spectifly https://github.com/renewablefunding/spectifly
|