dyna 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dyna/dsl/converter.rb +14 -1
- data/lib/dyna/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9a4fd21f8722b9dd15010855a735ce3654a7367
|
4
|
+
data.tar.gz: '0139bc8b1a21d8297db048c82dcae35f270e33ae'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a90044411ff9c1dca04650e365c29e0be5d84e56b7d31cd0f2923286766c147b1885d3e1169bc0d7248f5556f0c142292e17b35c9d9c74e3add6c7b2d788c18
|
7
|
+
data.tar.gz: 79a66929725e50978f204df808da497c15db070ee36eb8102c23c823a8d307ae600b200385d921ea20b40754208d0dbbe6ea068270140f321cc7dd9ff55bee11
|
data/lib/dyna/dsl/converter.rb
CHANGED
@@ -32,6 +32,7 @@ end
|
|
32
32
|
def output_table(name, table)
|
33
33
|
local_secondary_indexes = ''
|
34
34
|
global_secondary_indexes = ''
|
35
|
+
stream_specification = ''
|
35
36
|
if table[:local_secondary_indexes]
|
36
37
|
local_secondary_indexes_tmpl = <<-EOS.chomp
|
37
38
|
<% table[:local_secondary_indexes].each do |index| %>
|
@@ -66,6 +67,18 @@ EOS
|
|
66
67
|
<% end %>
|
67
68
|
EOS
|
68
69
|
attribute_definitions = ERB.new(attribute_definitions_tmpl).result(binding)
|
70
|
+
|
71
|
+
if table[:stream_specification]
|
72
|
+
stream_specification_tmpl = <<-EOS.chomp
|
73
|
+
|
74
|
+
stream_specification(
|
75
|
+
stream_enabled: <%= table[:stream_specification][:stream_enabled] %>,
|
76
|
+
stream_view_type: <%= table[:stream_specification][:stream_view_type].inspect %>,
|
77
|
+
)
|
78
|
+
EOS
|
79
|
+
stream_specification = ERB.new(stream_specification_tmpl).result(binding)
|
80
|
+
end
|
81
|
+
|
69
82
|
<<-EOS
|
70
83
|
table "#{name}" do
|
71
84
|
key_schema(
|
@@ -77,7 +90,7 @@ EOS
|
|
77
90
|
read_capacity_units: #{table[:provisioned_throughput][:read_capacity_units]},
|
78
91
|
write_capacity_units: #{table[:provisioned_throughput][:write_capacity_units]},
|
79
92
|
)
|
80
|
-
#{local_secondary_indexes}#{global_secondary_indexes}
|
93
|
+
#{local_secondary_indexes}#{global_secondary_indexes}#{stream_specification}
|
81
94
|
end
|
82
95
|
EOS
|
83
96
|
end
|
data/lib/dyna/version.rb
CHANGED