dynamodb_framework 1.0.4 → 1.0.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 01e23c812ced84af17a193235fa5047adfbf66ab
4
- data.tar.gz: 5a80d0dabfb91e2eb6149b748e66fde4495169f7
3
+ metadata.gz: eca5bdbc363b88ad86724f709a704643a06c26b4
4
+ data.tar.gz: 511fc227b131ed12da6e82aa0785ed6fd7326bc6
5
5
  SHA512:
6
- metadata.gz: 2443a9a1cb041ccb72390758dd2bcf96c106b069cef4f7e4c0cb6ed250aeb80f94fb9256ec611b33c6545496ad43fc9aca7b23d03caede3ca43e8d7dbab9d975
7
- data.tar.gz: 9f863517d3780130ba76c2df3ef23af97011efc1026d59fb51f37e01e85fce597fd3dc9c6b9ecfb8ee8086ab10f2f19419f17d88ca4a782086a9901dfedf086e
6
+ metadata.gz: 937799e0519e38ae2eb91b37a82de0491dd583c9ce59d87fd20af11378557a32b0282e373544befc65799f790dc908418826d11d49493607a18d976bf3c306a6
7
+ data.tar.gz: b76374d4b21d79bb90641cfcb4b2b2ffe4fd3007820a820c301ed5152558863d51e7094c5367d8dd46536fccd03f5d5e53b3a518148a144ddce5c8e3c7ba27ff
data/.idea/workspace.xml CHANGED
@@ -3,7 +3,9 @@
3
3
  <component name="ChangeListManager">
4
4
  <list default="true" id="e6e52ba6-fb1e-45c4-b31f-2a2931ecfa44" name="Default" comment="">
5
5
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
6
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_attributes_builder.rb" afterPath="$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_attributes_builder.rb" />
6
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_logger.rb" afterPath="$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_logger.rb" />
7
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_migration_manager.rb" afterPath="$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_migration_manager.rb" />
8
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_table_manager.rb" afterPath="$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_table_manager.rb" />
7
9
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/dynamodb_framework/version.rb" afterPath="$PROJECT_DIR$/lib/dynamodb_framework/version.rb" />
8
10
  </list>
9
11
  <ignored path="dynamodb_framework.iws" />
@@ -76,58 +78,58 @@
76
78
  <file leaf-file-name="dynamodb_table_manager.rb" pinned="false" current-in-tab="false">
77
79
  <entry file="file://$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_table_manager.rb">
78
80
  <provider selected="true" editor-type-id="text-editor">
79
- <state relative-caret-position="189">
81
+ <state relative-caret-position="3525">
80
82
  <caret line="235" column="11" selection-start-line="235" selection-start-column="11" selection-end-line="235" selection-end-column="11" />
81
83
  <folding />
82
84
  </state>
83
85
  </provider>
84
86
  </entry>
85
87
  </file>
86
- <file leaf-file-name="spec_helper.rb" pinned="false" current-in-tab="false">
87
- <entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
88
+ <file leaf-file-name="dynamodb_framework.rb" pinned="false" current-in-tab="false">
89
+ <entry file="file://$PROJECT_DIR$/lib/dynamodb_framework.rb">
88
90
  <provider selected="true" editor-type-id="text-editor">
89
- <state relative-caret-position="135">
90
- <caret line="9" column="0" selection-start-line="9" selection-start-column="0" selection-end-line="10" selection-end-column="33" />
91
+ <state relative-caret-position="105">
92
+ <caret line="7" column="52" selection-start-line="7" selection-start-column="52" selection-end-line="7" selection-end-column="52" />
91
93
  <folding />
92
94
  </state>
93
95
  </provider>
94
96
  </entry>
95
97
  </file>
96
- <file leaf-file-name="dynamodb_framework.gemspec" pinned="false" current-in-tab="false">
97
- <entry file="file://$PROJECT_DIR$/dynamodb_framework.gemspec">
98
+ <file leaf-file-name="dynamodb_logger.rb" pinned="false" current-in-tab="false">
99
+ <entry file="file://$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_logger.rb">
98
100
  <provider selected="true" editor-type-id="text-editor">
99
- <state relative-caret-position="345">
100
- <caret line="23" column="41" selection-start-line="23" selection-start-column="41" selection-end-line="23" selection-end-column="41" />
101
+ <state relative-caret-position="120">
102
+ <caret line="8" column="5" selection-start-line="8" selection-start-column="5" selection-end-line="8" selection-end-column="5" />
101
103
  <folding />
102
104
  </state>
103
105
  </provider>
104
106
  </entry>
105
107
  </file>
106
- <file leaf-file-name="dynamodb_attributes_builder.rb" pinned="false" current-in-tab="false">
107
- <entry file="file://$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_attributes_builder.rb">
108
+ <file leaf-file-name="spec_helper.rb" pinned="false" current-in-tab="false">
109
+ <entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
108
110
  <provider selected="true" editor-type-id="text-editor">
109
- <state relative-caret-position="585">
110
- <caret line="39" column="107" selection-start-line="39" selection-start-column="107" selection-end-line="39" selection-end-column="107" />
111
+ <state relative-caret-position="135">
112
+ <caret line="9" column="0" selection-start-line="9" selection-start-column="0" selection-end-line="10" selection-end-column="33" />
111
113
  <folding />
112
114
  </state>
113
115
  </provider>
114
116
  </entry>
115
117
  </file>
116
- <file leaf-file-name="Gemfile" pinned="false" current-in-tab="false">
117
- <entry file="file://$PROJECT_DIR$/Gemfile">
118
+ <file leaf-file-name="dynamodb_attributes_builder.rb" pinned="false" current-in-tab="false">
119
+ <entry file="file://$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_attributes_builder.rb">
118
120
  <provider selected="true" editor-type-id="text-editor">
119
- <state relative-caret-position="60">
120
- <caret line="4" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
121
+ <state relative-caret-position="585">
122
+ <caret line="39" column="107" selection-start-line="39" selection-start-column="107" selection-end-line="39" selection-end-column="107" />
121
123
  <folding />
122
124
  </state>
123
125
  </provider>
124
126
  </entry>
125
127
  </file>
126
- <file leaf-file-name="Gemfile.lock" pinned="false" current-in-tab="false">
127
- <entry file="file://$PROJECT_DIR$/Gemfile.lock">
128
+ <file leaf-file-name="dynamodb_migration_manager.rb" pinned="false" current-in-tab="false">
129
+ <entry file="file://$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_migration_manager.rb">
128
130
  <provider selected="true" editor-type-id="text-editor">
129
- <state relative-caret-position="0">
130
- <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
131
+ <state relative-caret-position="450">
132
+ <caret line="30" column="7" selection-start-line="30" selection-start-column="7" selection-end-line="30" selection-end-column="7" />
131
133
  <folding />
132
134
  </state>
133
135
  </provider>
@@ -150,9 +152,7 @@
150
152
  <option value="$PROJECT_DIR$/spec/spec_helper.rb" />
151
153
  <option value="$PROJECT_DIR$/spec/test_migration_script2.rb" />
152
154
  <option value="$PROJECT_DIR$/spec/test_migration_script1.rb" />
153
- <option value="$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_logger.rb" />
154
155
  <option value="$PROJECT_DIR$/lib/dynamodb_framework.rb" />
155
- <option value="$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_migration_manager.rb" />
156
156
  <option value="$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_store.rb" />
157
157
  <option value="$PROJECT_DIR$/spec/dynamodb_migration_manager_spec.rb" />
158
158
  <option value="$PROJECT_DIR$/spec/dynamodb_table_manager_spec.rb" />
@@ -162,6 +162,8 @@
162
162
  <option value="$PROJECT_DIR$/Gemfile" />
163
163
  <option value="$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_repository.rb" />
164
164
  <option value="$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_attributes_builder.rb" />
165
+ <option value="$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_logger.rb" />
166
+ <option value="$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_migration_manager.rb" />
165
167
  <option value="$PROJECT_DIR$/lib/dynamodb_framework/version.rb" />
166
168
  </list>
167
169
  </option>
@@ -173,8 +175,7 @@
173
175
  <sorting>DEFINITION_ORDER</sorting>
174
176
  </component>
175
177
  <component name="ProjectFrameBounds">
176
- <option name="x" value="57" />
177
- <option name="y" value="33" />
178
+ <option name="y" value="23" />
178
179
  <option name="width" value="2560" />
179
180
  <option name="height" value="1318" />
180
181
  </component>
@@ -203,6 +204,8 @@
203
204
  <foldersAlwaysOnTop value="true" />
204
205
  </navigator>
205
206
  <panes>
207
+ <pane id="Scope" />
208
+ <pane id="Scratches" />
206
209
  <pane id="ProjectPane">
207
210
  <subPane>
208
211
  <PATH>
@@ -269,8 +272,6 @@
269
272
  </PATH>
270
273
  </subPane>
271
274
  </pane>
272
- <pane id="Scope" />
273
- <pane id="Scratches" />
274
275
  </panes>
275
276
  </component>
276
277
  <component name="PropertiesComponent">
@@ -431,36 +432,38 @@
431
432
  <workItem from="1467452138158" duration="4809000" />
432
433
  <workItem from="1467461957536" duration="1215000" />
433
434
  <workItem from="1467463229671" duration="1395000" />
434
- <workItem from="1467466200746" duration="309000" />
435
+ <workItem from="1467466200746" duration="1071000" />
436
+ <workItem from="1467489186421" duration="192000" />
437
+ <workItem from="1467489408316" duration="5000" />
435
438
  </task>
436
439
  <servers />
437
440
  </component>
438
441
  <component name="TimeTrackingManager">
439
- <option name="totallyTimeSpent" value="11975000" />
442
+ <option name="totallyTimeSpent" value="12934000" />
440
443
  </component>
441
444
  <component name="ToolWindowManager">
442
- <frame x="57" y="33" width="2560" height="1318" extended-state="0" />
445
+ <frame x="0" y="23" width="2560" height="1318" extended-state="6" />
443
446
  <editor active="true" />
444
447
  <layout>
445
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.20373312" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
448
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.20691025" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
446
449
  <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
447
450
  <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
448
451
  <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24781573" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
449
452
  <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
450
- <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
451
453
  <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24980143" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
452
454
  <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
453
455
  <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
454
- <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
455
456
  <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
456
457
  <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
457
458
  <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
458
459
  <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
459
460
  <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
461
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
460
462
  <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
461
463
  <window_info id="Docker" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
462
- <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32941177" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
464
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3293461" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
463
465
  <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
466
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
464
467
  </layout>
465
468
  <layout-to-restore>
466
469
  <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
@@ -752,13 +755,6 @@
752
755
  </state>
753
756
  </provider>
754
757
  </entry>
755
- <entry file="file://$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_migration_manager.rb">
756
- <provider selected="true" editor-type-id="text-editor">
757
- <state relative-caret-position="1170">
758
- <caret line="78" column="82" selection-start-line="78" selection-start-column="82" selection-end-line="78" selection-end-column="82" />
759
- </state>
760
- </provider>
761
- </entry>
762
758
  <entry file="file://$PROJECT_DIR$/spec/dynamodb_table_manager_spec.rb">
763
759
  <provider selected="true" editor-type-id="text-editor">
764
760
  <state relative-caret-position="1020">
@@ -766,13 +762,6 @@
766
762
  </state>
767
763
  </provider>
768
764
  </entry>
769
- <entry file="file://$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_logger.rb">
770
- <provider selected="true" editor-type-id="text-editor">
771
- <state relative-caret-position="90">
772
- <caret line="6" column="3" selection-start-line="6" selection-start-column="3" selection-end-line="6" selection-end-column="3" />
773
- </state>
774
- </provider>
775
- </entry>
776
765
  <entry file="file://$PROJECT_DIR$/README.md">
777
766
  <provider selected="true" editor-type-id="text-editor">
778
767
  <state relative-caret-position="1155">
@@ -788,14 +777,6 @@
788
777
  </state>
789
778
  </provider>
790
779
  </entry>
791
- <entry file="file://$PROJECT_DIR$/lib/dynamodb_framework.rb">
792
- <provider selected="true" editor-type-id="text-editor">
793
- <state relative-caret-position="105">
794
- <caret line="7" column="52" selection-start-line="7" selection-start-column="52" selection-end-line="7" selection-end-column="52" />
795
- <folding />
796
- </state>
797
- </provider>
798
- </entry>
799
780
  <entry file="file://$PROJECT_DIR$/dynamodb_framework.gemspec">
800
781
  <provider selected="true" editor-type-id="text-editor">
801
782
  <state relative-caret-position="345">
@@ -854,12 +835,28 @@
854
835
  </entry>
855
836
  <entry file="file://$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_table_manager.rb">
856
837
  <provider selected="true" editor-type-id="text-editor">
857
- <state relative-caret-position="189">
838
+ <state relative-caret-position="3525">
858
839
  <caret line="235" column="11" selection-start-line="235" selection-start-column="11" selection-end-line="235" selection-end-column="11" />
859
840
  <folding />
860
841
  </state>
861
842
  </provider>
862
843
  </entry>
844
+ <entry file="file://$PROJECT_DIR$/lib/dynamodb_framework.rb">
845
+ <provider selected="true" editor-type-id="text-editor">
846
+ <state relative-caret-position="105">
847
+ <caret line="7" column="52" selection-start-line="7" selection-start-column="52" selection-end-line="7" selection-end-column="52" />
848
+ <folding />
849
+ </state>
850
+ </provider>
851
+ </entry>
852
+ <entry file="file://$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_logger.rb">
853
+ <provider selected="true" editor-type-id="text-editor">
854
+ <state relative-caret-position="120">
855
+ <caret line="8" column="5" selection-start-line="8" selection-start-column="5" selection-end-line="8" selection-end-column="5" />
856
+ <folding />
857
+ </state>
858
+ </provider>
859
+ </entry>
863
860
  <entry file="file://$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_attributes_builder.rb">
864
861
  <provider selected="true" editor-type-id="text-editor">
865
862
  <state relative-caret-position="585">
@@ -868,6 +865,14 @@
868
865
  </state>
869
866
  </provider>
870
867
  </entry>
868
+ <entry file="file://$PROJECT_DIR$/lib/dynamodb_framework/dynamodb_migration_manager.rb">
869
+ <provider selected="true" editor-type-id="text-editor">
870
+ <state relative-caret-position="450">
871
+ <caret line="30" column="7" selection-start-line="30" selection-start-column="7" selection-end-line="30" selection-end-column="7" />
872
+ <folding />
873
+ </state>
874
+ </provider>
875
+ </entry>
871
876
  <entry file="file://$PROJECT_DIR$/lib/dynamodb_framework/version.rb">
872
877
  <provider selected="true" editor-type-id="text-editor">
873
878
  <state relative-caret-position="15">
@@ -2,6 +2,10 @@ require 'logger'
2
2
 
3
3
  module DynamoDbFramework
4
4
 
5
- LOGGER = Logger.new(STDOUT)
5
+ def self.logger
6
+ @logger ||= Logger.new(STDOUT)
7
+
8
+ return @logger
9
+ end
6
10
 
7
11
  end
@@ -11,7 +11,7 @@ module DynamoDbFramework
11
11
 
12
12
  def connect
13
13
 
14
- DynamoDbFramework::LOGGER.info '[DynamoDbFramework] - Connecting to DynamoDb instance'
14
+ DynamoDbFramework.logger.info '[DynamoDbFramework] - Connecting to DynamoDb instance'
15
15
 
16
16
  migration_table_name = 'dynamodb_framework_migrations'
17
17
 
@@ -26,7 +26,7 @@ module DynamoDbFramework
26
26
  #set the table name for the repository
27
27
  @dynamodb_repository.table_name = migration_table_name
28
28
 
29
- DynamoDbFramework::LOGGER.info '[DynamoDbFramework] - Connected.'
29
+ DynamoDbFramework.logger.info '[DynamoDbFramework] - Connected.'
30
30
 
31
31
  end
32
32
 
@@ -41,7 +41,7 @@ module DynamoDbFramework
41
41
 
42
42
  def apply
43
43
 
44
- DynamoDbFramework::LOGGER.info '[DynamoDbFramework] - Applying migration scripts'
44
+ DynamoDbFramework.logger.info '[DynamoDbFramework] - Applying migration scripts'
45
45
 
46
46
  executed_scripts = get_executed_scripts()
47
47
 
@@ -53,19 +53,19 @@ module DynamoDbFramework
53
53
 
54
54
  scripts.sort { |a,b| a.timestamp <=> b.timestamp }.each do |script|
55
55
  if executed_scripts == nil || !executed_scripts.include?(script.timestamp)
56
- DynamoDbFramework::LOGGER.info '[DynamoDbFramework] - Applying script: ' + script.timestamp + '.....'
56
+ DynamoDbFramework.logger.info '[DynamoDbFramework] - Applying script: ' + script.timestamp + '.....'
57
57
  script.apply
58
58
  @dynamodb_repository.put({ :timestamp => script.timestamp })
59
59
  end
60
60
  end
61
61
 
62
- DynamoDbFramework::LOGGER.info '[DynamoDbFramework] - Migration scripts applied.'
62
+ DynamoDbFramework.logger.info '[DynamoDbFramework] - Migration scripts applied.'
63
63
 
64
64
  end
65
65
 
66
66
  def rollback
67
67
 
68
- DynamoDbFramework::LOGGER.info '[DynamoDbFramework] - Rolling back started.'
68
+ DynamoDbFramework.logger.info '[DynamoDbFramework] - Rolling back started.'
69
69
 
70
70
  executed_scripts = get_executed_scripts()
71
71
 
@@ -83,7 +83,7 @@ module DynamoDbFramework
83
83
  end
84
84
  end
85
85
 
86
- DynamoDbFramework::LOGGER.info '[DynamoDbFramework] - Rollback complete.'
86
+ DynamoDbFramework.logger.info '[DynamoDbFramework] - Rollback complete.'
87
87
 
88
88
  end
89
89
 
@@ -60,9 +60,9 @@ module DynamoDbFramework
60
60
  dynamodb.client.update_table(table)
61
61
 
62
62
  # wait for table to be updated
63
- DynamoDbFramework::LOGGER.info "[DynamoDbFramework] - Waiting for table: [#{table_name}] to be updated."
63
+ DynamoDbFramework.logger.info "[DynamoDbFramework] - Waiting for table: [#{table_name}] to be updated."
64
64
  wait_until_active(table_name)
65
- DynamoDbFramework::LOGGER.info "[DynamoDbFramework] - Table: [#{table_name}] updated."
65
+ DynamoDbFramework.logger.info "[DynamoDbFramework] - Table: [#{table_name}] updated."
66
66
 
67
67
  end
68
68
 
@@ -85,9 +85,9 @@ module DynamoDbFramework
85
85
  dynamodb.client.update_table(table)
86
86
 
87
87
  # wait for table to be updated
88
- DynamoDbFramework::LOGGER.info "[DynamoDbFramework] - Adding global index: #{global_index[:index_name]}."
88
+ DynamoDbFramework.logger.info "[DynamoDbFramework] - Adding global index: #{global_index[:index_name]}."
89
89
  wait_until_index_active(table_name, global_index[:index_name])
90
- DynamoDbFramework::LOGGER.info "[DynamoDbFramework] - Index added."
90
+ DynamoDbFramework.logger.info "[DynamoDbFramework] - Index added."
91
91
  end
92
92
 
93
93
  def update_index_throughput(table_name, index_name, read_capacity, write_capacity)
@@ -104,15 +104,15 @@ module DynamoDbFramework
104
104
  ]
105
105
  }
106
106
 
107
- DynamoDbFramework::LOGGER.info "[DynamoDbFramework] - Updating throughput for global index: #{index_name}."
107
+ DynamoDbFramework.logger.info "[DynamoDbFramework] - Updating throughput for global index: #{index_name}."
108
108
 
109
109
  dynamodb.client.update_table(table)
110
110
 
111
111
  # wait for table to be updated
112
112
 
113
- DynamoDbFramework::LOGGER.info "[DynamoDbFramework] - Waiting for table: [#{table_name}] to be updated."
113
+ DynamoDbFramework.logger.info "[DynamoDbFramework] - Waiting for table: [#{table_name}] to be updated."
114
114
  wait_until_active(table_name)
115
- DynamoDbFramework::LOGGER.info "[DynamoDbFramework] - Table: [#{table_name}] updated."
115
+ DynamoDbFramework.logger.info "[DynamoDbFramework] - Table: [#{table_name}] updated."
116
116
  end
117
117
 
118
118
  def drop_index(table_name, index_name)
@@ -128,9 +128,9 @@ module DynamoDbFramework
128
128
  dynamodb.client.update_table(table)
129
129
 
130
130
  # wait for table to be updated
131
- DynamoDbFramework::LOGGER.info "[DynamoDbFramework] - Deleting global index: #{index_name}."
131
+ DynamoDbFramework.logger.info "[DynamoDbFramework] - Deleting global index: #{index_name}."
132
132
  wait_until_index_dropped(table_name, index_name)
133
- DynamoDbFramework::LOGGER.info "[DynamoDbFramework] - Index: [#{index_name}] dropped."
133
+ DynamoDbFramework.logger.info "[DynamoDbFramework] - Index: [#{index_name}] dropped."
134
134
  end
135
135
 
136
136
  def get_status(table_name)
@@ -243,9 +243,9 @@ module DynamoDbFramework
243
243
  dynamodb.client.create_table(table)
244
244
 
245
245
  # wait for table to be created
246
- DynamoDbFramework::LOGGER.info "[DynamoDbFramework] - Waiting for table: [#{table_name}] to be created."
246
+ DynamoDbFramework.logger.info "[DynamoDbFramework] - Waiting for table: [#{table_name}] to be created."
247
247
  dynamodb.client.wait_until(:table_exists, table_name: table_name)
248
- DynamoDbFramework::LOGGER.info "[DynamoDbFramework] - Table: [#{table_name}] created."
248
+ DynamoDbFramework.logger.info "[DynamoDbFramework] - Table: [#{table_name}] created."
249
249
  end
250
250
 
251
251
  def create_table(options = {})
@@ -297,9 +297,9 @@ module DynamoDbFramework
297
297
  dynamodb.client.create_table(table)
298
298
 
299
299
  # wait for table to be created
300
- DynamoDbFramework::LOGGER.info "[DynamoDbFramework] - Waiting for table: [#{options[:name]}] to be created."
300
+ DynamoDbFramework.logger.info "[DynamoDbFramework] - Waiting for table: [#{options[:name]}] to be created."
301
301
  dynamodb.client.wait_until(:table_exists, table_name: options[:name])
302
- DynamoDbFramework::LOGGER.info "[DynamoDbFramework] - Table: [#{options[:name]}] created."
302
+ DynamoDbFramework.logger.info "[DynamoDbFramework] - Table: [#{options[:name]}] created."
303
303
  end
304
304
 
305
305
  def create_global_index(name, partition_key, range_key = nil, read_capacity = 20, write_capacity = 10)
@@ -332,9 +332,9 @@ module DynamoDbFramework
332
332
  return
333
333
  end
334
334
 
335
- DynamoDbFramework::LOGGER.info "[DynamoDbFramework] - Dropping table: [#{table_name}]."
335
+ DynamoDbFramework.logger.info "[DynamoDbFramework] - Dropping table: [#{table_name}]."
336
336
  dynamodb.client.delete_table({ table_name: table_name })
337
- DynamoDbFramework::LOGGER.info "[DynamoDbFramework] - Table: [#{table_name}] dropped."
337
+ DynamoDbFramework.logger.info "[DynamoDbFramework] - Table: [#{table_name}] dropped."
338
338
  end
339
339
 
340
340
  def drop_table(table_name)
@@ -343,9 +343,9 @@ module DynamoDbFramework
343
343
  return
344
344
  end
345
345
 
346
- DynamoDbFramework::LOGGER.info "[DynamoDbFramework] - Dropping table: [#{table_name}]."
346
+ DynamoDbFramework.logger.info "[DynamoDbFramework] - Dropping table: [#{table_name}]."
347
347
  dynamodb.client.delete_table({ table_name: table_name })
348
- DynamoDbFramework::LOGGER.info "[DynamoDbFramework] - Table: [#{table_name}] dropped."
348
+ DynamoDbFramework.logger.info "[DynamoDbFramework] - Table: [#{table_name}] dropped."
349
349
  end
350
350
 
351
351
  end
@@ -1,3 +1,3 @@
1
1
  module DynamoDbFramework
2
- VERSION = '1.0.4'
2
+ VERSION = '1.0.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamodb_framework
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaughanbrittonsage
@@ -147,3 +147,4 @@ specification_version: 4
147
147
  summary: A lightweight framework to provide managers for working with aws dynamodb
148
148
  (incuding local version).
149
149
  test_files: []
150
+ has_rdoc: