confidential 0.0.8 → 3.0.0.0
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/MIT-LICENSE +1 -1
- data/README.md +9 -4
- data/Rakefile +1 -14
- data/lib/confidential/railtie.rb +5 -3
- data/lib/confidential/version.rb +1 -1
- data/lib/confidential.rb +1 -0
- data/lib/generators/confidential/install/install_generator.rb +15 -0
- data/lib/generators/confidential/install/templates/configuration.yml +0 -0
- data/test/dummy/Rakefile +0 -1
- data/test/dummy/app/views/layouts/application.html.erb +9 -11
- data/test/dummy/bin/bundle +1 -0
- data/test/dummy/bin/rails +1 -0
- data/test/dummy/bin/rake +1 -0
- data/test/dummy/config/application.rb +7 -3
- data/test/dummy/config/environments/development.rb +1 -4
- data/test/dummy/config/environments/production.rb +3 -3
- data/test/dummy/config/environments/test.rb +3 -3
- data/test/dummy/config/initializers/secret_token.rb +2 -2
- data/test/dummy/log/test.log +9 -0
- data/test/dummy/public/404.html +50 -55
- data/test/dummy/public/422.html +50 -55
- data/test/dummy/public/500.html +49 -54
- data/test/generator_test.rb +18 -0
- data/test/test_helper.rb +0 -10
- data/test/{confidential_test.rb → variable_test.rb} +2 -2
- metadata +13 -25
- data/test/dummy/README.rdoc +0 -28
- data/test/dummy/config/database.yml +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 488a3bc51c35470a0ae020a9ae1569ee699dd38e
|
4
|
+
data.tar.gz: daaeb63ee6aad8843f5739b3892b740b1d2e941f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57155ac323a8f601f86a43a8850d21c785b5df4ce855008675ff46687735f52a32720e2e77eb826f69d2a17dc520f58cde2fefe77a8066994bf42d3cc6e84a7b
|
7
|
+
data.tar.gz: 5d16889ada694665581619c12deffc15a51e82913365116c25ff8b7d2cace13466f1d671c580bae84a8f36c2968adbb1bdbb9aa714f6efe5c852cfd4f7932e52
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -25,17 +25,22 @@ $ bundle
|
|
25
25
|
|
26
26
|
## Configuration
|
27
27
|
|
28
|
-
|
29
|
-
```
|
28
|
+
Generate the confidential file:
|
29
|
+
```
|
30
|
+
$ bundle exec rails g confidential:install
|
31
|
+
```
|
32
|
+
|
33
|
+
Put your confidential information in it:
|
34
|
+
```erb
|
30
35
|
DB_USER: user
|
31
36
|
DB_PASS: pass
|
32
37
|
```
|
33
38
|
|
34
|
-
NOTE:
|
39
|
+
NOTE: You may want to ignore the file in your repo.
|
35
40
|
|
36
41
|
## Usage
|
37
42
|
|
38
|
-
All the keys will be loaded into envs
|
43
|
+
All the keys will be loaded into envs and be ready to use:
|
39
44
|
```erb
|
40
45
|
production:
|
41
46
|
username: <%= ENV['DB_USER'] %>
|
data/Rakefile
CHANGED
@@ -4,19 +4,6 @@ rescue LoadError
|
|
4
4
|
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
5
|
end
|
6
6
|
|
7
|
-
require 'rdoc/task'
|
8
|
-
|
9
|
-
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
-
rdoc.rdoc_dir = 'rdoc'
|
11
|
-
rdoc.title = 'Confidential'
|
12
|
-
rdoc.options << '--line-numbers'
|
13
|
-
rdoc.rdoc_files.include('README.rdoc')
|
14
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
-
end
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
7
|
Bundler::GemHelper.install_tasks
|
21
8
|
|
22
9
|
require 'rake/testtask'
|
@@ -26,7 +13,7 @@ Rake::TestTask.new(:test) do |t|
|
|
26
13
|
t.libs << 'test'
|
27
14
|
t.pattern = 'test/**/*_test.rb'
|
28
15
|
t.verbose = false
|
16
|
+
t.warning = false
|
29
17
|
end
|
30
18
|
|
31
|
-
|
32
19
|
task default: :test
|
data/lib/confidential/railtie.rb
CHANGED
@@ -2,9 +2,11 @@ module Confidential
|
|
2
2
|
class Railtie < Rails::Railtie
|
3
3
|
|
4
4
|
config.before_configuration do
|
5
|
-
|
6
|
-
if File.exist?(
|
7
|
-
envs.each
|
5
|
+
path = Rails.root.join('config/confidential.yml')
|
6
|
+
if File.exist?(path) && envs = YAML.load(File.read(path))
|
7
|
+
envs.each do |key, value|
|
8
|
+
ENV[key] = value
|
9
|
+
end
|
8
10
|
end
|
9
11
|
end
|
10
12
|
|
data/lib/confidential/version.rb
CHANGED
data/lib/confidential.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
module Confidential
|
4
|
+
module Generators
|
5
|
+
class InstallGenerator < ::Rails::Generators::Base
|
6
|
+
|
7
|
+
source_root File.expand_path('../templates', __FILE__)
|
8
|
+
|
9
|
+
def create_configuration_file
|
10
|
+
copy_file 'configuration.yml', 'config/confidential.yml'
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
File without changes
|
data/test/dummy/Rakefile
CHANGED
@@ -1,14 +1,12 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
|
-
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
</head>
|
9
|
-
<body>
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
</body>
|
3
|
+
<head>
|
4
|
+
<title>Dummy</title>
|
5
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
6
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<%= yield %>
|
11
|
+
</body>
|
14
12
|
</html>
|
data/test/dummy/bin/bundle
CHANGED
data/test/dummy/bin/rails
CHANGED
data/test/dummy/bin/rake
CHANGED
@@ -1,9 +1,14 @@
|
|
1
1
|
require File.expand_path('../boot', __FILE__)
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'active_model/railtie'
|
4
|
+
require 'action_controller/railtie'
|
5
|
+
require 'action_mailer/railtie'
|
6
|
+
require 'action_view/railtie'
|
7
|
+
require 'sprockets/railtie'
|
8
|
+
require 'rails/test_unit/railtie'
|
4
9
|
|
5
10
|
Bundler.require(*Rails.groups)
|
6
|
-
require
|
11
|
+
require 'confidential'
|
7
12
|
|
8
13
|
module Dummy
|
9
14
|
class Application < Rails::Application
|
@@ -20,4 +25,3 @@ module Dummy
|
|
20
25
|
# config.i18n.default_locale = :de
|
21
26
|
end
|
22
27
|
end
|
23
|
-
|
@@ -10,7 +10,7 @@ Dummy::Application.configure do
|
|
10
10
|
config.eager_load = false
|
11
11
|
|
12
12
|
# Show full error reports and disable caching.
|
13
|
-
config.consider_all_requests_local
|
13
|
+
config.consider_all_requests_local = true
|
14
14
|
config.action_controller.perform_caching = false
|
15
15
|
|
16
16
|
# Don't care if the mailer can't send.
|
@@ -19,9 +19,6 @@ Dummy::Application.configure do
|
|
19
19
|
# Print deprecation notices to the Rails logger.
|
20
20
|
config.active_support.deprecation = :log
|
21
21
|
|
22
|
-
# Raise an error on page load if there are pending migrations
|
23
|
-
config.active_record.migration_error = :page_load
|
24
|
-
|
25
22
|
# Debug mode disables concatenation and preprocessing of assets.
|
26
23
|
# This option may cause significant delays in view rendering with a large
|
27
24
|
# number of complex assets.
|
@@ -11,7 +11,7 @@ Dummy::Application.configure do
|
|
11
11
|
config.eager_load = true
|
12
12
|
|
13
13
|
# Full error reports are disabled and caching is turned on.
|
14
|
-
config.consider_all_requests_local
|
14
|
+
config.consider_all_requests_local = false
|
15
15
|
config.action_controller.perform_caching = true
|
16
16
|
|
17
17
|
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
@@ -36,7 +36,7 @@ Dummy::Application.configure do
|
|
36
36
|
config.assets.version = '1.0'
|
37
37
|
|
38
38
|
# Specifies the header that your server uses for sending files.
|
39
|
-
# config.action_dispatch.x_sendfile_header =
|
39
|
+
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for apache
|
40
40
|
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
41
41
|
|
42
42
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
@@ -55,7 +55,7 @@ Dummy::Application.configure do
|
|
55
55
|
# config.cache_store = :mem_cache_store
|
56
56
|
|
57
57
|
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
58
|
-
# config.action_controller.asset_host =
|
58
|
+
# config.action_controller.asset_host = 'http://assets.example.com'
|
59
59
|
|
60
60
|
# Precompile additional assets.
|
61
61
|
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
@@ -13,11 +13,11 @@ Dummy::Application.configure do
|
|
13
13
|
config.eager_load = false
|
14
14
|
|
15
15
|
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
-
config.serve_static_assets
|
17
|
-
config.static_cache_control =
|
16
|
+
config.serve_static_assets = true
|
17
|
+
config.static_cache_control = 'public, max-age=3600'
|
18
18
|
|
19
19
|
# Show full error reports and disable caching.
|
20
|
-
config.consider_all_requests_local
|
20
|
+
config.consider_all_requests_local = true
|
21
21
|
config.action_controller.perform_caching = false
|
22
22
|
|
23
23
|
# Raise exceptions instead of rendering exception templates.
|
@@ -9,5 +9,5 @@
|
|
9
9
|
|
10
10
|
# Make sure your secret_key_base is kept private
|
11
11
|
# if you're sharing your code publicly.
|
12
|
-
Dummy::Application.config.secret_token = '
|
13
|
-
Dummy::Application.config.secret_key_base = '
|
12
|
+
Dummy::Application.config.secret_token = '3a11bb5d673be056d110ef3d1ea03577ccf1d7c3dc7715cb61e50f12a5c2'
|
13
|
+
Dummy::Application.config.secret_key_base = '3a11bb5d673be056d110ef3d1ea03577ccf1d7c3dc7715cb61e50f12a5c2'
|
@@ -0,0 +1,9 @@
|
|
1
|
+
---------------------------
|
2
|
+
ConfidentialTest: test_envs
|
3
|
+
---------------------------
|
4
|
+
---------------------------
|
5
|
+
ConfidentialTest: test_envs
|
6
|
+
---------------------------
|
7
|
+
----------------------------
|
8
|
+
GeneratorsTest: test_install
|
9
|
+
----------------------------
|
data/test/dummy/public/404.html
CHANGED
@@ -1,58 +1,53 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
|
-
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
<h1>The page you were looking for doesn't exist.</h1>
|
54
|
-
<p>You may have mistyped the address or the page may have moved.</p>
|
55
|
-
</div>
|
56
|
-
<p>If you are the application owner check the logs for more information.</p>
|
57
|
-
</body>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<style>
|
6
|
+
body {
|
7
|
+
background-color: #EFEFEF;
|
8
|
+
color: #2E2F30;
|
9
|
+
text-align: center;
|
10
|
+
font-family: arial, sans-serif;
|
11
|
+
}
|
12
|
+
div.dialog {
|
13
|
+
width: 25em;
|
14
|
+
margin: 4em auto 0 auto;
|
15
|
+
border: 1px solid #CCC;
|
16
|
+
border-right-color: #999;
|
17
|
+
border-left-color: #999;
|
18
|
+
border-bottom-color: #BBB;
|
19
|
+
border-top: #B00100 solid 4px;
|
20
|
+
border-top-left-radius: 9px;
|
21
|
+
border-top-right-radius: 9px;
|
22
|
+
background-color: white;
|
23
|
+
padding: 7px 4em 0 4em;
|
24
|
+
}
|
25
|
+
h1 {
|
26
|
+
font-size: 100%;
|
27
|
+
color: #730E15;
|
28
|
+
line-height: 1.5em;
|
29
|
+
}
|
30
|
+
body > p {
|
31
|
+
width: 33em;
|
32
|
+
margin: 0 auto 1em;
|
33
|
+
padding: 1em 0;
|
34
|
+
background-color: #F7F7F7;
|
35
|
+
border: 1px solid #CCC;
|
36
|
+
border-right-color: #999;
|
37
|
+
border-bottom-color: #999;
|
38
|
+
border-bottom-left-radius: 4px;
|
39
|
+
border-bottom-right-radius: 4px;
|
40
|
+
border-top-color: #DADADA;
|
41
|
+
color: #666;
|
42
|
+
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
43
|
+
}
|
44
|
+
</style>
|
45
|
+
</head>
|
46
|
+
<body>
|
47
|
+
<div class="dialog">
|
48
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
49
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
50
|
+
</div>
|
51
|
+
<p>If you are the application owner check the logs for more information.</p>
|
52
|
+
</body>
|
58
53
|
</html>
|
data/test/dummy/public/422.html
CHANGED
@@ -1,58 +1,53 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
|
-
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
<h1>The change you wanted was rejected.</h1>
|
54
|
-
<p>Maybe you tried to change something you didn't have access to.</p>
|
55
|
-
</div>
|
56
|
-
<p>If you are the application owner check the logs for more information.</p>
|
57
|
-
</body>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<style>
|
6
|
+
body {
|
7
|
+
background-color: #EFEFEF;
|
8
|
+
color: #2E2F30;
|
9
|
+
text-align: center;
|
10
|
+
font-family: arial, sans-serif;
|
11
|
+
}
|
12
|
+
div.dialog {
|
13
|
+
width: 25em;
|
14
|
+
margin: 4em auto 0 auto;
|
15
|
+
border: 1px solid #CCC;
|
16
|
+
border-right-color: #999;
|
17
|
+
border-left-color: #999;
|
18
|
+
border-bottom-color: #BBB;
|
19
|
+
border-top: #B00100 solid 4px;
|
20
|
+
border-top-left-radius: 9px;
|
21
|
+
border-top-right-radius: 9px;
|
22
|
+
background-color: white;
|
23
|
+
padding: 7px 4em 0 4em;
|
24
|
+
}
|
25
|
+
h1 {
|
26
|
+
font-size: 100%;
|
27
|
+
color: #730E15;
|
28
|
+
line-height: 1.5em;
|
29
|
+
}
|
30
|
+
body > p {
|
31
|
+
width: 33em;
|
32
|
+
margin: 0 auto 1em;
|
33
|
+
padding: 1em 0;
|
34
|
+
background-color: #F7F7F7;
|
35
|
+
border: 1px solid #CCC;
|
36
|
+
border-right-color: #999;
|
37
|
+
border-bottom-color: #999;
|
38
|
+
border-bottom-left-radius: 4px;
|
39
|
+
border-bottom-right-radius: 4px;
|
40
|
+
border-top-color: #DADADA;
|
41
|
+
color: #666;
|
42
|
+
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
43
|
+
}
|
44
|
+
</style>
|
45
|
+
</head>
|
46
|
+
<body>
|
47
|
+
<div class="dialog">
|
48
|
+
<h1>The change you wanted was rejected.</h1>
|
49
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
50
|
+
</div>
|
51
|
+
<p>If you are the application owner check the logs for more information.</p>
|
52
|
+
</body>
|
58
53
|
</html>
|
data/test/dummy/public/500.html
CHANGED
@@ -1,57 +1,52 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
|
-
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
<
|
51
|
-
|
52
|
-
<div class="dialog">
|
53
|
-
<h1>We're sorry, but something went wrong.</h1>
|
54
|
-
</div>
|
55
|
-
<p>If you are the application owner check the logs for more information.</p>
|
56
|
-
</body>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<style>
|
6
|
+
body {
|
7
|
+
background-color: #EFEFEF;
|
8
|
+
color: #2E2F30;
|
9
|
+
text-align: center;
|
10
|
+
font-family: arial, sans-serif;
|
11
|
+
}
|
12
|
+
div.dialog {
|
13
|
+
width: 25em;
|
14
|
+
margin: 4em auto 0 auto;
|
15
|
+
border: 1px solid #CCC;
|
16
|
+
border-right-color: #999;
|
17
|
+
border-left-color: #999;
|
18
|
+
border-bottom-color: #BBB;
|
19
|
+
border-top: #B00100 solid 4px;
|
20
|
+
border-top-left-radius: 9px;
|
21
|
+
border-top-right-radius: 9px;
|
22
|
+
background-color: white;
|
23
|
+
padding: 7px 4em 0 4em;
|
24
|
+
}
|
25
|
+
h1 {
|
26
|
+
font-size: 100%;
|
27
|
+
color: #730E15;
|
28
|
+
line-height: 1.5em;
|
29
|
+
}
|
30
|
+
body > p {
|
31
|
+
width: 33em;
|
32
|
+
margin: 0 auto 1em;
|
33
|
+
padding: 1em 0;
|
34
|
+
background-color: #F7F7F7;
|
35
|
+
border: 1px solid #CCC;
|
36
|
+
border-right-color: #999;
|
37
|
+
border-bottom-color: #999;
|
38
|
+
border-bottom-left-radius: 4px;
|
39
|
+
border-bottom-right-radius: 4px;
|
40
|
+
border-top-color: #DADADA;
|
41
|
+
color: #666;
|
42
|
+
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
43
|
+
}
|
44
|
+
</style>
|
45
|
+
</head>
|
46
|
+
<body>
|
47
|
+
<div class="dialog">
|
48
|
+
<h1>We're sorry, but something went wrong.</h1>
|
49
|
+
</div>
|
50
|
+
<p>If you are the application owner check the logs for more information.</p>
|
51
|
+
</body>
|
57
52
|
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'rails/generators'
|
3
|
+
require 'generators/confidential/install/install_generator'
|
4
|
+
|
5
|
+
class GeneratorsTest < Rails::Generators::TestCase
|
6
|
+
destination Rails.root.join('tmp')
|
7
|
+
|
8
|
+
teardown do
|
9
|
+
FileUtils.rm_rf destination_root
|
10
|
+
end
|
11
|
+
|
12
|
+
test 'install' do
|
13
|
+
self.class.tests Confidential::Generators::InstallGenerator
|
14
|
+
run_generator
|
15
|
+
assert_file 'config/confidential.yml'
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -8,13 +8,3 @@ Rails.backtrace_cleaner.remove_silencers!
|
|
8
8
|
|
9
9
|
# Load support files
|
10
10
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
11
|
-
|
12
|
-
# Load fixtures from the engine
|
13
|
-
if ActiveSupport::TestCase.method_defined?(:fixture_path=)
|
14
|
-
ActiveSupport::TestCase.fixture_path = File.expand_path('../fixtures', __FILE__)
|
15
|
-
end
|
16
|
-
|
17
|
-
# Load database
|
18
|
-
config = YAML::load(File.read(File.expand_path('../dummy/config/database.yml', __FILE__)))
|
19
|
-
config['test']['adapter'] = 'jdbcsqlite3' if RUBY_PLATFORM == 'java'
|
20
|
-
ActiveRecord::Base.establish_connection(config['test'])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: confidential
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 3.0.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mmontossi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -30,23 +30,9 @@ dependencies:
|
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 4.1.0
|
33
|
-
|
34
|
-
name: sqlite3
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - "~>"
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '1.3'
|
40
|
-
type: :development
|
41
|
-
prerelease: false
|
42
|
-
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
requirements:
|
44
|
-
- - "~>"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '1.3'
|
47
|
-
description: Loads your confidential configuration into envs in rails.
|
33
|
+
description: Confidential yaml loaded into environment in rails.
|
48
34
|
email:
|
49
|
-
- mmontossi@
|
35
|
+
- mmontossi@gmail.com
|
50
36
|
executables: []
|
51
37
|
extensions: []
|
52
38
|
extra_rdoc_files: []
|
@@ -57,8 +43,8 @@ files:
|
|
57
43
|
- lib/confidential.rb
|
58
44
|
- lib/confidential/railtie.rb
|
59
45
|
- lib/confidential/version.rb
|
60
|
-
-
|
61
|
-
-
|
46
|
+
- lib/generators/confidential/install/install_generator.rb
|
47
|
+
- lib/generators/confidential/install/templates/configuration.yml
|
62
48
|
- test/dummy/Rakefile
|
63
49
|
- test/dummy/app/assets/javascripts/application.js
|
64
50
|
- test/dummy/app/assets/stylesheets/application.css
|
@@ -72,7 +58,6 @@ files:
|
|
72
58
|
- test/dummy/config/application.rb
|
73
59
|
- test/dummy/config/boot.rb
|
74
60
|
- test/dummy/config/confidential.yml
|
75
|
-
- test/dummy/config/database.yml
|
76
61
|
- test/dummy/config/environment.rb
|
77
62
|
- test/dummy/config/environments/development.rb
|
78
63
|
- test/dummy/config/environments/production.rb
|
@@ -86,11 +71,14 @@ files:
|
|
86
71
|
- test/dummy/config/initializers/wrap_parameters.rb
|
87
72
|
- test/dummy/config/locales/en.yml
|
88
73
|
- test/dummy/config/routes.rb
|
74
|
+
- test/dummy/log/test.log
|
89
75
|
- test/dummy/public/404.html
|
90
76
|
- test/dummy/public/422.html
|
91
77
|
- test/dummy/public/500.html
|
92
78
|
- test/dummy/public/favicon.ico
|
79
|
+
- test/generator_test.rb
|
93
80
|
- test/test_helper.rb
|
81
|
+
- test/variable_test.rb
|
94
82
|
homepage: https://github.com/mmontossi/confidential
|
95
83
|
licenses:
|
96
84
|
- MIT
|
@@ -114,9 +102,8 @@ rubyforge_project:
|
|
114
102
|
rubygems_version: 2.2.0
|
115
103
|
signing_key:
|
116
104
|
specification_version: 4
|
117
|
-
summary: Confidential
|
105
|
+
summary: Confidential variables for rails.
|
118
106
|
test_files:
|
119
|
-
- test/confidential_test.rb
|
120
107
|
- test/dummy/app/assets/javascripts/application.js
|
121
108
|
- test/dummy/app/assets/stylesheets/application.css
|
122
109
|
- test/dummy/app/controllers/application_controller.rb
|
@@ -128,7 +115,6 @@ test_files:
|
|
128
115
|
- test/dummy/config/application.rb
|
129
116
|
- test/dummy/config/boot.rb
|
130
117
|
- test/dummy/config/confidential.yml
|
131
|
-
- test/dummy/config/database.yml
|
132
118
|
- test/dummy/config/environment.rb
|
133
119
|
- test/dummy/config/environments/development.rb
|
134
120
|
- test/dummy/config/environments/production.rb
|
@@ -143,10 +129,12 @@ test_files:
|
|
143
129
|
- test/dummy/config/locales/en.yml
|
144
130
|
- test/dummy/config/routes.rb
|
145
131
|
- test/dummy/config.ru
|
132
|
+
- test/dummy/log/test.log
|
146
133
|
- test/dummy/public/404.html
|
147
134
|
- test/dummy/public/422.html
|
148
135
|
- test/dummy/public/500.html
|
149
136
|
- test/dummy/public/favicon.ico
|
150
137
|
- test/dummy/Rakefile
|
151
|
-
- test/
|
138
|
+
- test/generator_test.rb
|
152
139
|
- test/test_helper.rb
|
140
|
+
- test/variable_test.rb
|
data/test/dummy/README.rdoc
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
== README
|
2
|
-
|
3
|
-
This README would normally document whatever steps are necessary to get the
|
4
|
-
application up and running.
|
5
|
-
|
6
|
-
Things you may want to cover:
|
7
|
-
|
8
|
-
* Ruby version
|
9
|
-
|
10
|
-
* System dependencies
|
11
|
-
|
12
|
-
* Configuration
|
13
|
-
|
14
|
-
* Database creation
|
15
|
-
|
16
|
-
* Database initialization
|
17
|
-
|
18
|
-
* How to run the test suite
|
19
|
-
|
20
|
-
* Services (job queues, cache servers, search engines, etc.)
|
21
|
-
|
22
|
-
* Deployment instructions
|
23
|
-
|
24
|
-
* ...
|
25
|
-
|
26
|
-
|
27
|
-
Please feel free to use a different markup language if you do not plan to run
|
28
|
-
<tt>rake doc:app</tt>.
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# SQLite version 3.x
|
2
|
-
# gem install sqlite3
|
3
|
-
#
|
4
|
-
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
-
# gem 'sqlite3'
|
6
|
-
development:
|
7
|
-
adapter: sqlite3
|
8
|
-
database: db/development.sqlite3
|
9
|
-
pool: 5
|
10
|
-
timeout: 5000
|
11
|
-
|
12
|
-
# Warning: The database defined as "test" will be erased and
|
13
|
-
# re-generated from your development database when you run "rake".
|
14
|
-
# Do not set this db to the same as development or production.
|
15
|
-
test:
|
16
|
-
adapter: sqlite3
|
17
|
-
database: ":memory:"
|
18
|
-
pool: 5
|
19
|
-
timeout: 5000
|
20
|
-
|
21
|
-
production:
|
22
|
-
adapter: sqlite3
|
23
|
-
database: db/production.sqlite3
|
24
|
-
pool: 5
|
25
|
-
timeout: 5000
|