dotenv-deployment 0.2.0 → 0.3.0

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: 88bee744057b4126515cc84bdcd57dc7fee5f752
4
- data.tar.gz: 45a70dd8b0e4d2cc79174a8771ea0c3f3ba97f67
3
+ metadata.gz: 9a3902d71eb755ef383731e71d44e92a20960ae5
4
+ data.tar.gz: 0afc03d5337cb8553a37c8d0004abbd448a8c2ae
5
5
  SHA512:
6
- metadata.gz: 59cf17b89379fd91f3f1f88190c4f2279c5f3d2d78007c7499bb65a73fd611c5a172ed26118fdb732e263d10aff0045b72b4ba88c8ac73b9a1921bc378d39cc6
7
- data.tar.gz: db4e61ae26a8b0e5f57d7366c42a6670a18e47a4fc7a195024408fb4824ffbba8c212d7677b10c7f0e54dcd17e1a09737b70b30152ed473c380e727e71d0092b
6
+ metadata.gz: c90c454e680c90882c4dcfdaafddb4aceb4266bd3bd1838553b8c28e2d20f8c1ec04872b655e31d3e3890745b485e551020276d5fc4c6acca39aa26d922a0fe8
7
+ data.tar.gz: aa666da2b8eb9bd543cc5e0ec33cbf8de48e46dd6cc7454f28dbd4496f696b47dfa5ff96fd17bb32dcc5b95bc3fb8adbe97e8b4e7fa35dbae3b68a5ed8061126
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.0 - Mar 5, 2014
4
+
5
+ * This gem is now deprecated.
6
+
3
7
  ## 0.2.0 - Oct 3, 2014
4
8
 
5
9
  * Declare dependency on dotenv ~>1.0
@@ -8,13 +12,13 @@
8
12
 
9
13
  * Capistrano 2: fix `set :dotenv_role` ([#15](https://github.com/bkeepers/dotenv-deployment/pull/15))
10
14
 
11
- [Full Changelog](https://github.com/bkeepers/dotenv/compare/v0.0.2...v0.0.3)
15
+ [Full Changelog](https://github.com/bkeepers/dotenv-deployment/compare/v0.0.2...v0.2.0)
12
16
 
13
17
  ## 0.0.2 - Apr 22, 2014
14
18
 
15
19
  * Fix syntax errors after extracting from `dotenv`
16
20
 
17
- [Full Changelog](https://github.com/bkeepers/dotenv/compare/v0.0.1...v0.0.2)
21
+ [Full Changelog](https://github.com/bkeepers/dotenv-deployment/compare/v0.0.1...v0.0.2)
18
22
 
19
23
  ## 0.0.1 - Apr 21, 2014
20
24
 
data/README.md CHANGED
@@ -1,56 +1,13 @@
1
1
  # dotenv-deployment
2
2
 
3
- [dotenv](https://github.com/bkeepers/dotenv) is designed to load configuration variables into `ENV` in *development*. It does not concern itself with production environments because there are typically better ways to manage configuration in those environments—such as `/etc/environment` managed by [Puppet](https://github.com/puppetlabs/puppet) or [Chef](https://github.com/opscode/chef), `heroku config`, etc.
3
+ **This gem is deprecated and no longer maintained. Use `dotenv-rails`, or manually configure [dotenv](https://github.com/bkeepers/dotenv) to meet your own needs.**
4
4
 
5
- However, some find dotenv to be a convenient way to configure applications in staging and production environments. This gem makes it easier to do that by adding support for:
6
-
7
- * [multiple environments](#multiple-environments)
8
- * [Capistrano](#capistrano)
9
-
10
- ## Installation
11
-
12
- Add this line to your application's Gemfile:
13
-
14
- gem 'dotenv-deployment'
15
-
16
- And then execute:
17
-
18
- $ bundle
19
-
20
- ## Usage
21
-
22
- ## Multiple Environments
23
-
24
- By default `.env` will be loaded when `dotenv/deployment` is required. It will not override existing environment variables.
25
-
26
- If you're using Rails or `ENV['RACK_ENV']` is set, an environment-specific file (like `.env.production`) will be loaded and override any existing variables. In a Rails project, `config/*.env` and `config/*.env.#{environment}` will also be loaded.
27
-
28
- ## Capistrano
29
-
30
- ### Capistrano 2
31
-
32
- Add the gem to your `config/deploy.rb` file:
5
+ If the environment files for your Rails application are in `config`, add the following lines to `config/application.rb` to maintain the behavior that this gem provided.
33
6
 
34
7
  ```ruby
35
- require "dotenv/deployment/capistrano"
36
- ```
37
-
38
- **NOTE: If you are upgrading from previous versions of dotenv, you will need to change your require from "dotenv/capistrano" to "dotenv/deployment/capistrano".**
39
-
40
- It will symlink the `.env` located in `/path/to/shared` in the new release.
8
+ # Load defaults from config/*.env in config
9
+ Dotenv.load *Dir.glob(Rails.root.join("config/**/*.env"), File::FNM_DOTMATCH))
41
10
 
42
- ### Capistrano 3
43
-
44
- This gem is not needed; Capistrano 3 has a baked-in mechanism for symlinking files. Just add `.env` to the list of linked files, for example:
45
-
46
- ```ruby
47
- set :linked_files, %w{config/database.yml .env}
11
+ # Override any existing variables if an environment-specific file exists
12
+ Dotenv.overload *Dir.glob(Rails.root.join("config/**/*.env.#{Rails.env}"), File::FNM_DOTMATCH)
48
13
  ```
49
-
50
- ## Contributing
51
-
52
- 1. Fork it ( http://github.com/bkeepers/dotenv-deployment/fork )
53
- 2. Create your feature branch (`git checkout -b my-new-feature`)
54
- 3. Commit your changes (`git commit -am 'Add some feature'`)
55
- 4. Push to the branch (`git push origin my-new-feature`)
56
- 5. Create new Pull Request
@@ -1,12 +1,19 @@
1
1
  require "dotenv"
2
2
  require "dotenv/deployment/version"
3
3
 
4
+ warn "[DEPRECATION] the dotenv-deployment gem is deprecated. See https://github.com/bkeepers/dotenv-deployment#readme."
5
+
6
+ rails_root = Rails.root || Dir.pwd if defined?(Rails)
7
+
4
8
  # Load defaults from .env or *.env in config
5
9
  Dotenv.load('.env')
6
- Dotenv.load(*Dir.glob("#{Rails.root}/config/**/*.env")) if defined?(Rails)
10
+ Dotenv.load(*Dir.glob("#{rails_root}/config/**/*.env")) if defined?(Rails)
7
11
 
8
12
  # Override any existing variables if an environment-specific file exists
9
13
  if environment = ENV['RACK_ENV'] || (defined?(Rails) && Rails.env)
10
14
  Dotenv.overload(".env.#{environment}")
11
- Dotenv.overload(*Dir.glob("#{Rails.root}/config/**/*.env.#{environment}")) if defined?(Rails)
15
+ if defined?(Rails)
16
+ config_env = Dir.glob("#{rails_root}/config/**/*.env.#{environment}", File::FNM_DOTMATCH)
17
+ Dotenv.overload(*config_env) if config_env.any?
18
+ end
12
19
  end
@@ -1,5 +1,5 @@
1
1
  module Dotenv
2
2
  module Deployment
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dotenv-deployment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Keepers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-03 00:00:00.000000000 Z
11
+ date: 2015-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv