exportr 0.1.95 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,16 @@
1
+ require "exportr/config"
2
+
3
+ module Exportr
4
+
5
+ class Railtie < Rails::Railtie
6
+
7
+ initializer 'exportr.load_environment_variables' do |app|
8
+ if File.exists? "#{Rails.root}/#{Exportr::Config::CONFIG_FILE}"
9
+ config = YAML.load(File.open("#{Rails.root}/#{Exportr::Config::CONFIG_FILE}"))
10
+ config.each_pair { |key,value| ENV[key] = value } if config
11
+ end
12
+ end
13
+
14
+ end
15
+
16
+ end
@@ -1,3 +1,3 @@
1
1
  module Exportr
2
- VERSION = "0.1.95"
2
+ VERSION = "0.2.0"
3
3
  end
data/lib/exportr.rb CHANGED
@@ -1,3 +1,5 @@
1
- require "exportr/version"
1
+ require 'exportr/version'
2
+ require 'exportr/railtie'
2
3
 
3
4
  module Exportr; end
5
+
@@ -4,16 +4,6 @@ class ExportrGenerator < Rails::Generators::Base
4
4
 
5
5
  def generate_initializer
6
6
  copy_file 'exportr.yml', 'config/exportr.yml'
7
- # copy_file 'exportr.rb', 'config/initializers/exportr.rb'
8
- application '
9
- # Loads export.yml and sets key=value to the local environment
10
- config.before_initialize do
11
- require "exportr/config"
12
- if File.exists? "#{Rails.root}/#{Exportr::Config::CONFIG_FILE}"
13
- config = YAML.load(File.open("#{Rails.root}/#{Exportr::Config::CONFIG_FILE}"))
14
- config.each_pair { |key,value| ENV[key] = value } if config
15
- end
16
- end'
17
7
 
18
8
  # Decrecation warning
19
9
  if File.exists?("#{Rails.root}/config/initializers/exportr.rb")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exportr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.95
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-09 00:00:00.000000000 Z
12
+ date: 2012-04-10 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Helps manage rails application specific environment variables for multiple
15
15
  apps in development.
@@ -31,6 +31,7 @@ files:
31
31
  - lib/exportr/command.rb
32
32
  - lib/exportr/config.rb
33
33
  - lib/exportr/helpers.rb
34
+ - lib/exportr/railtie.rb
34
35
  - lib/exportr/version.rb
35
36
  - lib/generators/exportr/exportr_generator.rb
36
37
  - lib/generators/exportr/templates/exportr.yml