confidential 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 32e9459b3b3f346c22047f5f49306c0bb0f494b6
4
- data.tar.gz: 65f8635570b4643613d383facf0d87810db8eb90
3
+ metadata.gz: f00bc86ba03b4bcc285a3a18b16ab784e546e46e
4
+ data.tar.gz: 2e68d7e39eff0c3e38c62cf04262e3333817f9c3
5
5
  SHA512:
6
- metadata.gz: c002a440b8da2205f7632775989ca60c2e014be46b199e8a841fbf28f4ceb1ee708ea268fff1cec687141843dec7ff903a924f938c7d276fde82dbb84d83e43e
7
- data.tar.gz: 604d12b4ec72baafc0bcf59b39be980c353a8ef2ea3457e6a8f077867cbc5455536dbdb4799ff3a43f09e3ab3f5ca7b4a76f3ed0e695439035f19dc78454e5fe
6
+ metadata.gz: 2f7ddbc46a45e946299d1cd331073e683a2a0df22ff7aa2b8a430b8758ef30b1593fd9c31aad234a4583f1fd78d0849f37952ee99fa76ce4daab6f36669dc2a0
7
+ data.tar.gz: 1c7cdf12f3d7b09d694c1c63ec5f653572df81fd91709e99ba9f9cd9506003ea7eea4d45c6a14550223f342ebb9520d684b0064e78a5bcd88c01c69fff4e2024
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2014 Museways
1
+ Copyright 2015 Museways
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md ADDED
@@ -0,0 +1,44 @@
1
+ [![Gem Version](https://badge.fury.io/rb/confidential.svg)](http://badge.fury.io/rb/confidential) [![Code Climate](https://codeclimate.com/github/museways/confidential/badges/gpa.svg)](https://codeclimate.com/github/museways/confidential) [![Build Status](https://travis-ci.org/museways/confidential.svg?branch=master)](https://travis-ci.org/museways/confidential) [![Dependency Status](https://gemnasium.com/museways/confidential.svg)](https://gemnasium.com/museways/confidential)
2
+
3
+ # Confidential
4
+
5
+ Loads your confidential configuration into envs in rails.
6
+
7
+ ## Install
8
+
9
+ Put this line in your Gemfile:
10
+ ```ruby
11
+ gem 'confidential'
12
+ ```
13
+
14
+ Then bundle:
15
+ ```
16
+ $ bundle
17
+ ```
18
+
19
+ ## Configuration
20
+
21
+ Put your confidential information in config/confidential.yml:
22
+ ```yaml
23
+ DB_USER: user
24
+ DB_PASS: pass
25
+ ```
26
+
27
+ NOTE: Probably you want to ignore config/confidential.yml in your repo.
28
+
29
+ ## Usage
30
+
31
+ All the keys will be loaded into envs, you may want to use those for your database.yml:
32
+ ```erb
33
+ production:
34
+ username: <%= ENV['DB_USER'] %>
35
+ password: <%= ENV['DB_PASS'] %>
36
+ ```
37
+
38
+ ## Credits
39
+
40
+ This gem is maintained and funded by [museways](http://museways.com).
41
+
42
+ ## License
43
+
44
+ It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.
@@ -1,9 +1,9 @@
1
1
  module Confidential
2
2
  class Railtie < Rails::Railtie
3
-
3
+
4
4
  config.before_configuration do
5
- confidential_file = Rails.root.join('config', 'confidential.yml')
6
- if File.exist? confidential_file and envs = YAML.load(File.read(confidential_file))
5
+ confidential_file = Rails.root.join('config', 'confidential.yml')
6
+ if File.exist? confidential_file and envs = YAML.load(File.read(confidential_file))
7
7
  envs.each { |key, value| ENV[key] = value }
8
8
  end
9
9
  end
@@ -1,5 +1,5 @@
1
1
  module Confidential
2
2
 
3
- VERSION = '0.0.5'
3
+ VERSION = '0.0.6'
4
4
 
5
5
  end
data/lib/confidential.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require 'confidential/railtie'
2
- require 'confidential/version'
3
2
 
4
3
  module Confidential
5
4
  end
@@ -2,7 +2,7 @@ require 'test_helper'
2
2
 
3
3
  class ConfidentialTest < ActiveSupport::TestCase
4
4
 
5
- test "should load confidential values" do
5
+ test 'envs values' do
6
6
  assert_equal 'user', ENV['DB_USER']
7
7
  assert_equal 'pass', ENV['DB_PASS']
8
8
  end
@@ -3,3 +3,23 @@
3
3
  ConfidentialTest: test_should_load_confidential_values
4
4
  ------------------------------------------------------
5
5
   (0.0ms) rollback transaction
6
+  (0.1ms) begin transaction
7
+ ----------------------------------
8
+ ConfidentialTest: test_envs_values
9
+ ----------------------------------
10
+  (0.0ms) rollback transaction
11
+  (0.2ms) begin transaction
12
+ ----------------------------------
13
+ ConfidentialTest: test_envs_values
14
+ ----------------------------------
15
+  (0.0ms) rollback transaction
16
+  (0.1ms) begin transaction
17
+ ----------------------------------
18
+ ConfidentialTest: test_envs_values
19
+ ----------------------------------
20
+  (0.0ms) rollback transaction
21
+  (0.2ms) begin transaction
22
+ ----------------------------------
23
+ ConfidentialTest: test_envs_values
24
+ ----------------------------------
25
+  (0.0ms) rollback transaction
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.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Museways
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-09 00:00:00.000000000 Z
11
+ date: 2015-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -44,7 +44,7 @@ dependencies:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '1.3'
47
- description: Loads your confidential configuration into envs.
47
+ description: Loads your confidential configuration into envs in rails.
48
48
  email:
49
49
  - hello@museways.com
50
50
  executables: []
@@ -52,7 +52,7 @@ extensions: []
52
52
  extra_rdoc_files: []
53
53
  files:
54
54
  - MIT-LICENSE
55
- - README.rdoc
55
+ - README.md
56
56
  - Rakefile
57
57
  - lib/confidential.rb
58
58
  - lib/confidential/railtie.rb
@@ -112,10 +112,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  version: '0'
113
113
  requirements: []
114
114
  rubyforge_project:
115
- rubygems_version: 2.2.2
115
+ rubygems_version: 2.2.0
116
116
  signing_key:
117
117
  specification_version: 4
118
- summary: Confidential Envs for Rails
118
+ summary: Confidential envs for rails.
119
119
  test_files:
120
120
  - test/confidential_test.rb
121
121
  - test/dummy/app/assets/javascripts/application.js
data/README.rdoc DELETED
@@ -1,21 +0,0 @@
1
- {<img src="https://badge.fury.io/rb/confidential.png" alt="Gem Version" />}[http://badge.fury.io/rb/confidential] {<img src="https://codeclimate.com/github/museways/confidential.png" />}[https://codeclimate.com/github/museways/confidential] {<img src="https://travis-ci.org/museways/confidential.png?branch=master" alt="Build Status" />}[https://travis-ci.org/museways/confidential] {<img src="https://gemnasium.com/museways/confidential.png" alt="Dependency Status" />}[https://gemnasium.com/museways/confidential]
2
-
3
- = Confidential
4
-
5
- Loads your confidential configuration into envs.
6
-
7
- = Install
8
-
9
- Put this line in your Gemfile:
10
- gem 'confidential'
11
-
12
- Then bundle:
13
- $ bundle
14
-
15
- = Usage
16
-
17
- Just put your confidential information in config/confidential.yml:
18
- DB_USER: user
19
- DB_PASS: pass
20
-
21
- (Probably you want to ignore config/confidential.yml in your repo)