shadow_db_credentials 1.1.1 → 1.1.2
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 +4 -4
- data/.idea/shadow_db_credentials.iml +0 -13
- data/.idea/workspace.xml +145 -78
- data/CHANGES +5 -1
- data/Gemfile +1 -1
- data/README.md +22 -4
- data/lib/shadow_db_credentials/shadow_db_credentials.rb +17 -7
- data/lib/shadow_db_credentials/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: df4fac448d58d801d4fb8dcc6f7398c21fd582e3
|
|
4
|
+
data.tar.gz: 4f02ac621b9f043a67cec361bfa839b77223c224
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 94aad3b29c3ca1aaf3721b8e8ff869a8f036f6bfe3f74ca02a73020fafd8376fff6a2562ab16bba8ce2c5c0fa66ac363f7ae3b5490e186303e2508a2acac722d
|
|
7
|
+
data.tar.gz: 8b924b416f45f65ff6fb3c9f817ad5930470a908c15612817bdf6744b0677c85c74352184979d39e73167bb47677d5ef0e94c80a8a563208ec42199b00e100e2
|
|
@@ -13,19 +13,6 @@
|
|
|
13
13
|
<content url="file://$MODULE_DIR$" />
|
|
14
14
|
<orderEntry type="inheritedJdk" />
|
|
15
15
|
<orderEntry type="sourceFolder" forTests="false" />
|
|
16
|
-
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.3.5, RVM: ruby-2.0.0-p247 [shadow_db_credentials]) [gem]" level="application" />
|
|
17
|
-
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.2.4, RVM: ruby-2.0.0-p247 [shadow_db_credentials]) [gem]" level="application" />
|
|
18
|
-
<orderEntry type="library" scope="PROVIDED" name="file_utils (v1.0.7, RVM: ruby-2.0.0-p247 [shadow_db_credentials]) [gem]" level="application" />
|
|
19
|
-
<orderEntry type="library" scope="PROVIDED" name="gemcutter (v0.7.1, RVM: ruby-2.0.0-p247 [shadow_db_credentials]) [gem]" level="application" />
|
|
20
|
-
<orderEntry type="library" scope="PROVIDED" name="gemspec_deps_gen (v1.1.1, RVM: ruby-2.0.0-p247 [shadow_db_credentials]) [gem]" level="application" />
|
|
21
|
-
<orderEntry type="library" scope="PROVIDED" name="metaclass (v0.0.1, RVM: ruby-2.0.0-p247 [shadow_db_credentials]) [gem]" level="application" />
|
|
22
|
-
<orderEntry type="library" scope="PROVIDED" name="mocha (v0.14.0, RVM: ruby-2.0.0-p247 [shadow_db_credentials]) [gem]" level="application" />
|
|
23
|
-
<orderEntry type="library" scope="PROVIDED" name="rake (v10.1.0, RVM: ruby-2.0.0-p247 [shadow_db_credentials]) [gem]" level="application" />
|
|
24
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec (v2.14.1, RVM: ruby-2.0.0-p247 [shadow_db_credentials]) [gem]" level="application" />
|
|
25
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v2.14.5, RVM: ruby-2.0.0-p247 [shadow_db_credentials]) [gem]" level="application" />
|
|
26
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v2.14.2, RVM: ruby-2.0.0-p247 [shadow_db_credentials]) [gem]" level="application" />
|
|
27
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v2.14.3, RVM: ruby-2.0.0-p247 [shadow_db_credentials]) [gem]" level="application" />
|
|
28
|
-
<orderEntry type="library" scope="PROVIDED" name="ruby-debug-ide (v0.4.17, RVM: ruby-2.0.0-p247 [shadow_db_credentials]) [gem]" level="application" />
|
|
29
16
|
</component>
|
|
30
17
|
</module>
|
|
31
18
|
|
data/.idea/workspace.xml
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
<list default="true" id="48445419-a9bd-462b-a38e-4f503de87dd4" name="Default" comment="" />
|
|
5
5
|
<ignored path="shadow_db_credentials.iws" />
|
|
6
6
|
<ignored path=".idea/workspace.xml" />
|
|
7
|
-
<file path="/Dummy.txt" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="
|
|
7
|
+
<file path="/Dummy.txt" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377358862115" ignored="false" />
|
|
8
8
|
<file path="/.ruby-version" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1371914161925" ignored="false" />
|
|
9
|
-
<file path="/CHANGES" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="
|
|
9
|
+
<file path="/CHANGES" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377358465025" ignored="false" />
|
|
10
10
|
<file path="/version.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1371914648138" ignored="false" />
|
|
11
|
-
<file path="/shadow_db_credentials.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="
|
|
12
|
-
<file path="/Gemfile" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="
|
|
11
|
+
<file path="/shadow_db_credentials.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377358298876" ignored="false" />
|
|
12
|
+
<file path="/Gemfile" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377358834642" ignored="false" />
|
|
13
13
|
<file path="/spec_helper.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1371914924728" ignored="false" />
|
|
14
14
|
<file path="$PROJECT_DIR$/../rails-app-tmpl/Gemfile" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1371915114233" ignored="false" />
|
|
15
15
|
<file path="/shadow_db_credentials_spec.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1371915800337" ignored="false" />
|
|
@@ -23,12 +23,57 @@
|
|
|
23
23
|
<file path="$PROJECT_DIR$/../shvets.github.io/build/index.html" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1376662323891" ignored="false" />
|
|
24
24
|
<file path="$PROJECT_DIR$/../shvets.github.io/blog/article_0003/using_gemfile_gems_inside_gemspec.html" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1376662323892" ignored="false" />
|
|
25
25
|
<file path="$PROJECT_DIR$/../shvets.github.io/config.rrr" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1376666503612" ignored="false" />
|
|
26
|
-
<file path="/a.dummy" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="
|
|
26
|
+
<file path="/a.dummy" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377294738590" ignored="false" />
|
|
27
27
|
<file path="$PROJECT_DIR$/../rat/Gemfile" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1376667638160" ignored="false" />
|
|
28
28
|
<file path="$PROJECT_DIR$/../rat/config/application.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1376681752557" ignored="false" />
|
|
29
29
|
<file path="$PROJECT_DIR$/../rat/config/database.yml" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1376667899615" ignored="false" />
|
|
30
|
-
<file path="/fragment.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="
|
|
30
|
+
<file path="/fragment.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377292149283" ignored="false" />
|
|
31
31
|
<file path="$PROJECT_DIR$/.idea/.rakeTasks" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377291425668" ignored="false" />
|
|
32
|
+
<file path="$USER_HOME$/work/ui/neptune/config/application.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377291621486" ignored="false" />
|
|
33
|
+
<file path="$USER_HOME$/work/ui/neptune/.rspec" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377291711486" ignored="false" />
|
|
34
|
+
<file path="$USER_HOME$/work/ui/neptune/.simplecov" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377291787315" ignored="false" />
|
|
35
|
+
<file path="$USER_HOME$/work/ui/neptune/log/test.log" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377293739734" ignored="false" />
|
|
36
|
+
<file path="$USER_HOME$/work/ui/src/app/models/cart.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377292320811" ignored="false" />
|
|
37
|
+
<file path="$USER_HOME$/work/ui/src/Gemfile" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377292320811" ignored="false" />
|
|
38
|
+
<file path="$USER_HOME$/work/ui/src/spec/unit/models/cart_spec.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377292320811" ignored="false" />
|
|
39
|
+
<file path="$USER_HOME$/work/ui/src/app/models/hitbox.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377292320811" ignored="false" />
|
|
40
|
+
<file path="$USER_HOME$/work/ui/src/spec/unit/domain/landing_input_spec.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377292320811" ignored="false" />
|
|
41
|
+
<file path="$USER_HOME$/work/ui/src/db/schema.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377293866106" ignored="false" />
|
|
42
|
+
<file path="$USER_HOME$/work/ui/neptune/app/models/settings.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377293761633" ignored="false" />
|
|
43
|
+
<file path="$USER_HOME$/work/ui/neptune/spec/services/external_service_spec.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377293562505" ignored="false" />
|
|
44
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/services/external_service.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377294152829" ignored="false" />
|
|
45
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/address_validation/state_lookup_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377295494274" ignored="false" />
|
|
46
|
+
<file path="$USER_HOME$/work/ui/neptune/app/models/device_content.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377293954610" ignored="false" />
|
|
47
|
+
<file path="$USER_HOME$/work/ui/neptune/db/schema.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377293967126" ignored="false" />
|
|
48
|
+
<file path="$USER_HOME$/work/ui/neptune/Gemfile" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377294251949" ignored="false" />
|
|
49
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/services/abstract_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377294310104" ignored="false" />
|
|
50
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/avws/avws_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377295546936" ignored="false" />
|
|
51
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/choose_number/phone_number_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377295567740" ignored="false" />
|
|
52
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/loa/form_request_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377295517668" ignored="false" />
|
|
53
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/loa/writer_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377295604787" ignored="false" />
|
|
54
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/product_catalog/default_package_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377295634010" ignored="false" />
|
|
55
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/product_catalog/package_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377294803318" ignored="false" />
|
|
56
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/product_catalog/promo_package_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377294988282" ignored="false" />
|
|
57
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/product_catalog/rate_plan_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377294822812" ignored="false" />
|
|
58
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/product_catalog/retail_package_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377294831436" ignored="false" />
|
|
59
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/promotions_manager/raf_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377294838036" ignored="false" />
|
|
60
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/security/password_validator_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377294844668" ignored="false" />
|
|
61
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/security/username_availability_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377295477614" ignored="false" />
|
|
62
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/static_content/static_content_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377294870316" ignored="false" />
|
|
63
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/sws/invoice_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377295426430" ignored="false" />
|
|
64
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/sws/invoice_preview_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377294892065" ignored="false" />
|
|
65
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/sws/mac_address_validation_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377294898689" ignored="false" />
|
|
66
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/sws/retail_package_code_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377294904275" ignored="false" />
|
|
67
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/sws/retail_stores_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377294909178" ignored="false" />
|
|
68
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/sws/shipping_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377294917709" ignored="false" />
|
|
69
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/sws/store_payment_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377294927034" ignored="false" />
|
|
70
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/tax_services/query_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377294935851" ignored="false" />
|
|
71
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/services/base_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377294956778" ignored="false" />
|
|
72
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/crm/crm_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377294971123" ignored="false" />
|
|
73
|
+
<file path="$USER_HOME$/work/ui/neptune/app/services/resource_manager/resource_manager_gateway.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377295003626" ignored="false" />
|
|
74
|
+
<file path="$USER_HOME$/work/ui/neptune/spec/services/abstract_gateway_spec.rb" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377295141894" ignored="false" />
|
|
75
|
+
<file path="$PROJECT_DIR$/../shvets.github.io/source/blog/2013-08-16-how_to_protect_db_credentials_in_rails_app.md" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377358711460" ignored="false" />
|
|
76
|
+
<file path="/2013-08-16-how_to_protect_db_credentials_in_rails_app.md" changelist="48445419-a9bd-462b-a38e-4f503de87dd4" time="1377358698216" ignored="false" />
|
|
32
77
|
<option name="TRACKING_ENABLED" value="true" />
|
|
33
78
|
<option name="SHOW_DIALOG" value="false" />
|
|
34
79
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
@@ -66,19 +111,10 @@
|
|
|
66
111
|
</provider>
|
|
67
112
|
</entry>
|
|
68
113
|
</file>
|
|
69
|
-
<file leaf-file-name="
|
|
70
|
-
<entry file="file://$USER_HOME$/.rvm/gems/ruby-2.0.0-p247@shadow_db_credentials/gems/gemspec_deps_gen-1.0.5/lib/gemspec_deps_gen/gemspec_deps_gen.rb">
|
|
71
|
-
<provider selected="true" editor-type-id="text-editor">
|
|
72
|
-
<state line="16" column="69" selection-start="413" selection-end="413" vertical-scroll-proportion="0.0">
|
|
73
|
-
<folding />
|
|
74
|
-
</state>
|
|
75
|
-
</provider>
|
|
76
|
-
</entry>
|
|
77
|
-
</file>
|
|
78
|
-
<file leaf-file-name="shadow_db_credentials.gemspec.erb" pinned="false" current="true" current-in-tab="true">
|
|
114
|
+
<file leaf-file-name="shadow_db_credentials.gemspec.erb" pinned="false" current="false" current-in-tab="false">
|
|
79
115
|
<entry file="file://$PROJECT_DIR$/shadow_db_credentials.gemspec.erb">
|
|
80
116
|
<provider selected="true" editor-type-id="text-editor">
|
|
81
|
-
<state line="18" column="
|
|
117
|
+
<state line="18" column="63" selection-start="920" selection-end="920" vertical-scroll-proportion="-11.25">
|
|
82
118
|
<folding />
|
|
83
119
|
</state>
|
|
84
120
|
</provider>
|
|
@@ -90,37 +126,43 @@
|
|
|
90
126
|
<state />
|
|
91
127
|
</provider>
|
|
92
128
|
<provider selected="true" editor-type-id="text-editor">
|
|
93
|
-
<state line="
|
|
129
|
+
<state line="111" column="27" selection-start="2800" selection-end="2800" vertical-scroll-proportion="-2.2222223">
|
|
94
130
|
<folding />
|
|
95
131
|
</state>
|
|
96
132
|
</provider>
|
|
97
133
|
</entry>
|
|
98
134
|
</file>
|
|
99
|
-
<file leaf-file-name="
|
|
100
|
-
<entry file="file://$PROJECT_DIR$/
|
|
135
|
+
<file leaf-file-name="Gemfile" pinned="false" current="false" current-in-tab="false">
|
|
136
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
|
101
137
|
<provider selected="true" editor-type-id="text-editor">
|
|
102
|
-
<state line="16" column="
|
|
138
|
+
<state line="16" column="137" selection-start="248" selection-end="248" vertical-scroll-proportion="0.0">
|
|
103
139
|
<folding />
|
|
104
140
|
</state>
|
|
105
141
|
</provider>
|
|
106
142
|
</entry>
|
|
107
143
|
</file>
|
|
108
|
-
<file leaf-file-name="
|
|
109
|
-
<entry file="file://$PROJECT_DIR
|
|
110
|
-
<provider editor-type-id="
|
|
111
|
-
<state
|
|
144
|
+
<file leaf-file-name=".ruby-gemset" pinned="false" current="false" current-in-tab="false">
|
|
145
|
+
<entry file="file://$PROJECT_DIR$/.ruby-gemset">
|
|
146
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
147
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
|
148
|
+
<folding />
|
|
149
|
+
</state>
|
|
112
150
|
</provider>
|
|
151
|
+
</entry>
|
|
152
|
+
</file>
|
|
153
|
+
<file leaf-file-name=".ruby-version" pinned="false" current="false" current-in-tab="false">
|
|
154
|
+
<entry file="file://$PROJECT_DIR$/.ruby-version">
|
|
113
155
|
<provider selected="true" editor-type-id="text-editor">
|
|
114
|
-
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="
|
|
156
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
|
115
157
|
<folding />
|
|
116
158
|
</state>
|
|
117
159
|
</provider>
|
|
118
160
|
</entry>
|
|
119
161
|
</file>
|
|
120
|
-
<file leaf-file-name="
|
|
121
|
-
<entry file="file://$PROJECT_DIR$/
|
|
162
|
+
<file leaf-file-name="CHANGES" pinned="false" current="true" current-in-tab="true">
|
|
163
|
+
<entry file="file://$PROJECT_DIR$/CHANGES">
|
|
122
164
|
<provider selected="true" editor-type-id="text-editor">
|
|
123
|
-
<state line="
|
|
165
|
+
<state line="20" column="2" selection-start="229" selection-end="247" vertical-scroll-proportion="0.5050505">
|
|
124
166
|
<folding />
|
|
125
167
|
</state>
|
|
126
168
|
</provider>
|
|
@@ -129,7 +171,7 @@
|
|
|
129
171
|
<file leaf-file-name="shadow_db_credentials.rb" pinned="false" current="false" current-in-tab="false">
|
|
130
172
|
<entry file="file://$PROJECT_DIR$/lib/shadow_db_credentials/shadow_db_credentials.rb">
|
|
131
173
|
<provider selected="true" editor-type-id="text-editor">
|
|
132
|
-
<state line="
|
|
174
|
+
<state line="53" column="10" selection-start="1279" selection-end="1279" vertical-scroll-proportion="0.0">
|
|
133
175
|
<folding />
|
|
134
176
|
</state>
|
|
135
177
|
</provider>
|
|
@@ -138,7 +180,7 @@
|
|
|
138
180
|
<file leaf-file-name="version.rb" pinned="false" current="false" current-in-tab="false">
|
|
139
181
|
<entry file="file://$PROJECT_DIR$/lib/shadow_db_credentials/version.rb">
|
|
140
182
|
<provider selected="true" editor-type-id="text-editor">
|
|
141
|
-
<state line="
|
|
183
|
+
<state line="3" column="37" selection-start="50" selection-end="50" vertical-scroll-proportion="0.0">
|
|
142
184
|
<folding />
|
|
143
185
|
</state>
|
|
144
186
|
</provider>
|
|
@@ -166,15 +208,15 @@
|
|
|
166
208
|
<option value="$PROJECT_DIR$/lib/shadow_db_credentials.rb" />
|
|
167
209
|
<option value="$PROJECT_DIR$/.ruby-version" />
|
|
168
210
|
<option value="$PROJECT_DIR$/spec/spec_helper.rb" />
|
|
169
|
-
<option value="$PROJECT_DIR$/Gemfile" />
|
|
170
|
-
<option value="$PROJECT_DIR$/README.md" />
|
|
171
211
|
<option value="$PROJECT_DIR$/spec/shadow_db_credentials_spec.rb" />
|
|
172
212
|
<option value="$PROJECT_DIR$/Rakefile" />
|
|
173
|
-
<option value="$PROJECT_DIR$/lib/shadow_db_credentials/version.rb" />
|
|
174
|
-
<option value="$PROJECT_DIR$/lib/shadow_db_credentials/shadow_db_credentials.rb" />
|
|
175
|
-
<option value="$PROJECT_DIR$/CHANGES" />
|
|
176
213
|
<option value="$PROJECT_DIR$/shadow_db_credentials.gemspec" />
|
|
177
214
|
<option value="$PROJECT_DIR$/shadow_db_credentials.gemspec.erb" />
|
|
215
|
+
<option value="$PROJECT_DIR$/lib/shadow_db_credentials/shadow_db_credentials.rb" />
|
|
216
|
+
<option value="$PROJECT_DIR$/lib/shadow_db_credentials/version.rb" />
|
|
217
|
+
<option value="$PROJECT_DIR$/CHANGES" />
|
|
218
|
+
<option value="$PROJECT_DIR$/README.md" />
|
|
219
|
+
<option value="$PROJECT_DIR$/Gemfile" />
|
|
178
220
|
</list>
|
|
179
221
|
</option>
|
|
180
222
|
</component>
|
|
@@ -229,7 +271,6 @@
|
|
|
229
271
|
<sortByType />
|
|
230
272
|
</navigator>
|
|
231
273
|
<panes>
|
|
232
|
-
<pane id="Scope" />
|
|
233
274
|
<pane id="ProjectPane">
|
|
234
275
|
<subPane>
|
|
235
276
|
<PATH>
|
|
@@ -296,13 +337,30 @@
|
|
|
296
337
|
</PATH>
|
|
297
338
|
</subPane>
|
|
298
339
|
</pane>
|
|
340
|
+
<pane id="Scope" />
|
|
299
341
|
</panes>
|
|
300
342
|
</component>
|
|
301
343
|
<component name="PropertiesComponent">
|
|
344
|
+
<property name="FileHistory.git4idea.history.GitHistoryProvider_treeOrder0" value="0" />
|
|
345
|
+
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatWidth0" value="175" />
|
|
346
|
+
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatWidth1" value="177" />
|
|
347
|
+
<property name="FileHistory.git4idea.history.GitHistoryProvider_treeOrder3" value="3" />
|
|
302
348
|
<property name="options.splitter.main.proportions" value="0.3" />
|
|
303
|
-
<property name="
|
|
349
|
+
<property name="FileHistory.git4idea.history.GitHistoryProvider_treeOrder1" value="1" />
|
|
350
|
+
<property name="FileHistory.git4idea.history.GitHistoryProvider_treeOrder2" value="2" />
|
|
351
|
+
<property name="FileHistory.git4idea.history.GitHistoryProvider_treeWidth0" value="176" />
|
|
304
352
|
<property name="recentsLimit" value="5" />
|
|
305
353
|
<property name="options.lastSelected" value="org.jetbrains.plugins.ruby.settings.RubyIdeSdkConfigurable" />
|
|
354
|
+
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatOrder1" value="1" />
|
|
355
|
+
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatOrder0" value="0" />
|
|
356
|
+
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatWidth2" value="186" />
|
|
357
|
+
<property name="FileHistory.git4idea.history.GitHistoryProvider_treeWidth3" value="976" />
|
|
358
|
+
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatWidth3" value="974" />
|
|
359
|
+
<property name="FileHistory.git4idea.history.GitHistoryProvider_treeWidth2" value="182" />
|
|
360
|
+
<property name="FileHistory.git4idea.history.GitHistoryProvider_treeWidth1" value="178" />
|
|
361
|
+
<property name="WebServerToolWindowFactoryState" value="false" />
|
|
362
|
+
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatOrder2" value="2" />
|
|
363
|
+
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatOrder3" value="3" />
|
|
306
364
|
<property name="FullScreen" value="false" />
|
|
307
365
|
<property name="options.splitter.details.proportions" value="0.2" />
|
|
308
366
|
<property name="options.searchVisible" value="true" />
|
|
@@ -571,24 +629,29 @@
|
|
|
571
629
|
<created>1377291422800</created>
|
|
572
630
|
<updated>1377291422800</updated>
|
|
573
631
|
</task>
|
|
574
|
-
<
|
|
632
|
+
<task id="LOCAL-00006" summary="Small API addition">
|
|
633
|
+
<created>1377358863639</created>
|
|
634
|
+
<updated>1377358863639</updated>
|
|
635
|
+
</task>
|
|
636
|
+
<option name="localTasksCounter" value="7" />
|
|
575
637
|
<servers />
|
|
576
638
|
</component>
|
|
577
639
|
<component name="ToolWindowManager">
|
|
578
640
|
<frame x="332" y="22" width="1588" height="1058" extended-state="0" />
|
|
579
|
-
<editor active="
|
|
641
|
+
<editor active="true" />
|
|
580
642
|
<layout>
|
|
581
643
|
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32917964" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
|
582
|
-
<window_info id="Changes" active="
|
|
644
|
+
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32882413" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
|
583
645
|
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
|
584
646
|
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
|
585
647
|
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
|
|
586
648
|
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25940338" sideWeight="0.67117584" order="0" side_tool="false" content_ui="combo" />
|
|
649
|
+
<window_info id="Jenkins" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
|
587
650
|
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.23517169" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
|
588
651
|
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
|
589
652
|
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
|
590
653
|
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3298647" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
|
591
|
-
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.
|
|
654
|
+
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3298647" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
|
592
655
|
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
|
593
656
|
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
|
594
657
|
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
|
@@ -596,7 +659,6 @@
|
|
|
596
659
|
<window_info id="jenkinsBrowser" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
|
597
660
|
<window_info id="CSS-X-Fire" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
|
598
661
|
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
|
599
|
-
<window_info id="Jenkins" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
|
600
662
|
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
|
601
663
|
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
|
602
664
|
</layout>
|
|
@@ -643,7 +705,7 @@
|
|
|
643
705
|
<option name="WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN" value="false" />
|
|
644
706
|
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
|
|
645
707
|
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="false" />
|
|
646
|
-
<option name="LAST_COMMIT_MESSAGE" value="
|
|
708
|
+
<option name="LAST_COMMIT_MESSAGE" value="Small API addition" />
|
|
647
709
|
<option name="MAKE_NEW_CHANGELIST_ACTIVE" value="false" />
|
|
648
710
|
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
|
|
649
711
|
<option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
|
|
@@ -660,6 +722,7 @@
|
|
|
660
722
|
<MESSAGE value="bug fixes" />
|
|
661
723
|
<MESSAGE value="Small API and build changes; writing documentation" />
|
|
662
724
|
<MESSAGE value="Bug fixes; adf license to gemspec" />
|
|
725
|
+
<MESSAGE value="Small API addition" />
|
|
663
726
|
</component>
|
|
664
727
|
<component name="XDebuggerManager">
|
|
665
728
|
<breakpoint-manager>
|
|
@@ -679,31 +742,23 @@
|
|
|
679
742
|
</breakpoint-manager>
|
|
680
743
|
</component>
|
|
681
744
|
<component name="editorHistoryManager">
|
|
682
|
-
<entry file="file://$
|
|
683
|
-
<provider selected="true" editor-type-id="text-editor">
|
|
684
|
-
<state line="204" column="0" selection-start="6646" selection-end="6646" vertical-scroll-proportion="0.0" />
|
|
685
|
-
</provider>
|
|
686
|
-
</entry>
|
|
687
|
-
<entry file="file://$PROJECT_DIR$/lib/shadow_db_credentials.rb">
|
|
688
|
-
<provider selected="true" editor-type-id="text-editor">
|
|
689
|
-
<state line="2" column="39" selection-start="94" selection-end="94" vertical-scroll-proportion="0.0" />
|
|
690
|
-
</provider>
|
|
691
|
-
</entry>
|
|
692
|
-
<entry file="file://$PROJECT_DIR$/Gemfile">
|
|
745
|
+
<entry file="file://$PROJECT_DIR$/lib/shadow_db_credentials/shadow_db_credentials.rb">
|
|
693
746
|
<provider selected="true" editor-type-id="text-editor">
|
|
694
|
-
<state line="
|
|
747
|
+
<state line="22" column="79" selection-start="610" selection-end="610" vertical-scroll-proportion="0.0">
|
|
695
748
|
<folding />
|
|
696
749
|
</state>
|
|
697
750
|
</provider>
|
|
698
751
|
</entry>
|
|
699
|
-
<entry file="file://$
|
|
752
|
+
<entry file="file://$PROJECT_DIR$/lib/shadow_db_credentials/version.rb">
|
|
700
753
|
<provider selected="true" editor-type-id="text-editor">
|
|
701
|
-
<state line="
|
|
754
|
+
<state line="1" column="18" selection-start="44" selection-end="44" vertical-scroll-proportion="0.0">
|
|
755
|
+
<folding />
|
|
756
|
+
</state>
|
|
702
757
|
</provider>
|
|
703
758
|
</entry>
|
|
704
|
-
<entry file="file://$
|
|
759
|
+
<entry file="file://$PROJECT_DIR$/lib/shadow_db_credentials.rb">
|
|
705
760
|
<provider selected="true" editor-type-id="text-editor">
|
|
706
|
-
<state line="
|
|
761
|
+
<state line="2" column="39" selection-start="94" selection-end="94" vertical-scroll-proportion="0.0" />
|
|
707
762
|
</provider>
|
|
708
763
|
</entry>
|
|
709
764
|
<entry file="file://$PROJECT_DIR$/spec/shadow_db_credentials_spec.rb">
|
|
@@ -727,64 +782,76 @@
|
|
|
727
782
|
</state>
|
|
728
783
|
</provider>
|
|
729
784
|
</entry>
|
|
730
|
-
<entry file="file://$
|
|
785
|
+
<entry file="file://$PROJECT_DIR$/LICENSE">
|
|
786
|
+
<provider editor-type-id="com.intellij.persistence.database.editor.CsvTableFileEditorProvider">
|
|
787
|
+
<state />
|
|
788
|
+
</provider>
|
|
789
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
790
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
|
|
791
|
+
</provider>
|
|
792
|
+
</entry>
|
|
793
|
+
<entry file="file://$PROJECT_DIR$/shadow_db_credentials.gemspec.erb">
|
|
731
794
|
<provider selected="true" editor-type-id="text-editor">
|
|
732
|
-
<state line="
|
|
795
|
+
<state line="18" column="63" selection-start="920" selection-end="920" vertical-scroll-proportion="-11.25">
|
|
733
796
|
<folding />
|
|
734
797
|
</state>
|
|
735
798
|
</provider>
|
|
736
799
|
</entry>
|
|
737
|
-
<entry file="file://$PROJECT_DIR$/
|
|
800
|
+
<entry file="file://$PROJECT_DIR$/shadow_db_credentials.gemspec">
|
|
738
801
|
<provider selected="true" editor-type-id="text-editor">
|
|
739
|
-
<state line="
|
|
802
|
+
<state line="20" column="0" selection-start="922" selection-end="922" vertical-scroll-proportion="0.0">
|
|
740
803
|
<folding />
|
|
741
804
|
</state>
|
|
742
805
|
</provider>
|
|
743
|
-
<provider editor-type-id="MarkdownPreviewEditor">
|
|
744
|
-
<state />
|
|
745
|
-
</provider>
|
|
746
806
|
</entry>
|
|
747
807
|
<entry file="file://$PROJECT_DIR$/lib/shadow_db_credentials/version.rb">
|
|
748
808
|
<provider selected="true" editor-type-id="text-editor">
|
|
749
|
-
<state line="
|
|
809
|
+
<state line="3" column="37" selection-start="50" selection-end="50" vertical-scroll-proportion="0.0">
|
|
750
810
|
<folding />
|
|
751
811
|
</state>
|
|
752
812
|
</provider>
|
|
753
813
|
</entry>
|
|
754
814
|
<entry file="file://$PROJECT_DIR$/lib/shadow_db_credentials/shadow_db_credentials.rb">
|
|
755
815
|
<provider selected="true" editor-type-id="text-editor">
|
|
756
|
-
<state line="
|
|
816
|
+
<state line="53" column="10" selection-start="1279" selection-end="1279" vertical-scroll-proportion="0.0">
|
|
757
817
|
<folding />
|
|
758
818
|
</state>
|
|
759
819
|
</provider>
|
|
760
820
|
</entry>
|
|
761
|
-
<entry file="file://$PROJECT_DIR$/
|
|
821
|
+
<entry file="file://$PROJECT_DIR$/README.md">
|
|
822
|
+
<provider editor-type-id="MarkdownPreviewEditor">
|
|
823
|
+
<state />
|
|
824
|
+
</provider>
|
|
762
825
|
<provider selected="true" editor-type-id="text-editor">
|
|
763
|
-
<state line="
|
|
826
|
+
<state line="111" column="27" selection-start="2800" selection-end="2800" vertical-scroll-proportion="-2.2222223">
|
|
764
827
|
<folding />
|
|
765
828
|
</state>
|
|
766
829
|
</provider>
|
|
767
830
|
</entry>
|
|
768
|
-
<entry file="file://$PROJECT_DIR
|
|
769
|
-
<provider editor-type-id="
|
|
770
|
-
<state
|
|
831
|
+
<entry file="file://$PROJECT_DIR$/.ruby-gemset">
|
|
832
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
833
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
|
834
|
+
<folding />
|
|
835
|
+
</state>
|
|
771
836
|
</provider>
|
|
837
|
+
</entry>
|
|
838
|
+
<entry file="file://$PROJECT_DIR$/.ruby-version">
|
|
772
839
|
<provider selected="true" editor-type-id="text-editor">
|
|
773
840
|
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
|
774
841
|
<folding />
|
|
775
842
|
</state>
|
|
776
843
|
</provider>
|
|
777
844
|
</entry>
|
|
778
|
-
<entry file="file://$PROJECT_DIR$/
|
|
845
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
|
779
846
|
<provider selected="true" editor-type-id="text-editor">
|
|
780
|
-
<state line="
|
|
847
|
+
<state line="16" column="137" selection-start="248" selection-end="248" vertical-scroll-proportion="0.0">
|
|
781
848
|
<folding />
|
|
782
849
|
</state>
|
|
783
850
|
</provider>
|
|
784
851
|
</entry>
|
|
785
|
-
<entry file="file://$PROJECT_DIR$/
|
|
852
|
+
<entry file="file://$PROJECT_DIR$/CHANGES">
|
|
786
853
|
<provider selected="true" editor-type-id="text-editor">
|
|
787
|
-
<state line="
|
|
854
|
+
<state line="20" column="2" selection-start="229" selection-end="247" vertical-scroll-proportion="0.5050505">
|
|
788
855
|
<folding />
|
|
789
856
|
</state>
|
|
790
857
|
</provider>
|
data/CHANGES
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -79,6 +79,24 @@ end
|
|
|
79
79
|
The hook will access original DB configuration and try to expand all **credentials** attributes
|
|
80
80
|
with corresponding values dynamically, at run time.
|
|
81
81
|
|
|
82
|
+
If you think that processing all environments is not necessary, you cant process only current environment:
|
|
83
|
+
|
|
84
|
+
```ruby
|
|
85
|
+
module YourRailsApp
|
|
86
|
+
class Application < Rails::Application
|
|
87
|
+
...
|
|
88
|
+
|
|
89
|
+
def config.database_configuration
|
|
90
|
+
orig_db_configurations = super
|
|
91
|
+
|
|
92
|
+
processor = ShadowDbCredentials.new(ENV['CREDENTIALS_DIR'])
|
|
93
|
+
|
|
94
|
+
processor.process_configuration(orig_db_configurations, Rails.env)
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
```
|
|
99
|
+
|
|
82
100
|
You can check result of your work:
|
|
83
101
|
|
|
84
102
|
```bash
|
|
@@ -101,8 +119,8 @@ processor = ShadowDbCredentials.new(credentials_dir)
|
|
|
101
119
|
|
|
102
120
|
# 1. get production hash, read configuration from default location
|
|
103
121
|
|
|
104
|
-
|
|
105
|
-
|
|
122
|
+
prod_conf = processor.retrieve_configuration "production"
|
|
123
|
+
prod_conf.inspect
|
|
106
124
|
|
|
107
125
|
# 2. get development hash, read configuration from dynamic source
|
|
108
126
|
|
|
@@ -112,8 +130,8 @@ source = StringIO.new <<-TEXT
|
|
|
112
130
|
credentials: your_dev_db
|
|
113
131
|
TEXT
|
|
114
132
|
|
|
115
|
-
|
|
116
|
-
|
|
133
|
+
dev_conf = processor.retrieve_configuration 'development', source
|
|
134
|
+
dev_conf.inspect
|
|
117
135
|
```
|
|
118
136
|
|
|
119
137
|
## Contributing
|
|
@@ -19,29 +19,39 @@ class ShadowDbCredentials
|
|
|
19
19
|
def process_configurations configurations
|
|
20
20
|
new_configurations = {}
|
|
21
21
|
|
|
22
|
-
configurations.each do |name,
|
|
23
|
-
new_configurations[name] = process_credentials(indifferent_access(
|
|
22
|
+
configurations.each do |name, config|
|
|
23
|
+
new_configurations[name] = process_credentials(indifferent_access(config))
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
new_configurations
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
+
def process_configuration configurations, rails_env
|
|
30
|
+
new_configurations = configurations.clone
|
|
31
|
+
|
|
32
|
+
config = configurations[rails_env]
|
|
33
|
+
|
|
34
|
+
new_configurations[rails_env] = process_credentials(indifferent_access(config))
|
|
35
|
+
|
|
36
|
+
new_configurations
|
|
37
|
+
end
|
|
38
|
+
|
|
29
39
|
private
|
|
30
40
|
|
|
31
|
-
def process_credentials
|
|
32
|
-
if
|
|
33
|
-
credentials =
|
|
41
|
+
def process_credentials config
|
|
42
|
+
if config[:credentials]
|
|
43
|
+
credentials = config.delete(:credentials)
|
|
34
44
|
|
|
35
45
|
file_name = "#{@credentials_dir}/#{credentials}"
|
|
36
46
|
|
|
37
47
|
if File.exist? file_name
|
|
38
|
-
|
|
48
|
+
config.merge!(indifferent_access(YAML.load_file(file_name)))
|
|
39
49
|
else
|
|
40
50
|
puts "Missing credentials file: #{file_name}."
|
|
41
51
|
end
|
|
42
52
|
end
|
|
43
53
|
|
|
44
|
-
|
|
54
|
+
config
|
|
45
55
|
end
|
|
46
56
|
|
|
47
57
|
def indifferent_access hash
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shadow_db_credentials
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alexander Shvets
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-08-
|
|
11
|
+
date: 2013-08-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: gemspec_deps_gen
|
|
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
91
91
|
version: '0'
|
|
92
92
|
requirements: []
|
|
93
93
|
rubyforge_project:
|
|
94
|
-
rubygems_version: 2.0.
|
|
94
|
+
rubygems_version: 2.0.3
|
|
95
95
|
signing_key:
|
|
96
96
|
specification_version: 4
|
|
97
97
|
summary: Class that helps to keep database credentials for rails application in private
|