PerfilGrupalmodelo_minutaprofile_fields
Last change
on this file since 50de8e9 was
412c4bc,
checked in by Jorge Redondo Flames <jredondo@…>, 9 years ago
|
Códigos orignales de diaspora* 9/9/2015
|
-
Property mode set to
100755
|
File size:
1.0 KB
|
Line | |
---|
1 | #!/usr/bin/env ruby |
---|
2 | # Copyright (c) 2010-2011, Diaspora Inc. This file is |
---|
3 | # licensed under the Affero General Public License version 3 or later. See |
---|
4 | # the COPYRIGHT file. |
---|
5 | |
---|
6 | unless ARGV.length >= 1 |
---|
7 | $stderr.puts "Usage: ./script/get_config.rb var=option | option [...]" |
---|
8 | Process.exit(1) |
---|
9 | end |
---|
10 | |
---|
11 | require 'rubygems' |
---|
12 | require 'pathname' |
---|
13 | |
---|
14 | require 'active_support/core_ext/class/attribute_accessors' |
---|
15 | require 'active_support/core_ext/object/blank' |
---|
16 | require 'active_support/core_ext/module/delegation' |
---|
17 | |
---|
18 | module Rails |
---|
19 | def self.root |
---|
20 | @@root ||= Pathname.new(File.expand_path(File.join(File.dirname(__FILE__), ".."))) |
---|
21 | end |
---|
22 | |
---|
23 | def self.env |
---|
24 | env = 'development' |
---|
25 | env = ENV['RAILS_ENV'] if ENV.has_key?('RAILS_ENV') |
---|
26 | env.downcase |
---|
27 | end |
---|
28 | end |
---|
29 | |
---|
30 | require Rails.root.join("config/load_config") |
---|
31 | |
---|
32 | ARGV.each do |arg| |
---|
33 | var, setting_name = arg.split("=") |
---|
34 | setting_name = var unless setting_name |
---|
35 | setting = AppConfig[setting_name] |
---|
36 | setting = setting.get if setting.respond_to?(:_proxy?) |
---|
37 | if var != setting_name |
---|
38 | puts "#{var}=#{setting}" |
---|
39 | else |
---|
40 | puts setting |
---|
41 | end |
---|
42 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.