app_settings 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +20 -8
- data/app_settings.gemspec +1 -1
- metadata +3 -21
- data/bin/bundler +0 -16
- data/bin/erubis +0 -16
- data/bin/rackup +0 -16
- data/bin/rails +0 -16
- data/bin/rake +0 -16
- data/bin/sprockets +0 -16
- data/bin/thor +0 -16
- data/bin/tilt +0 -16
- data/bin/tt +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 272c37e0192010c875187bd6de75748d301c3d53
|
4
|
+
data.tar.gz: 7aa0645bdcb88d8249c520c80c73caf86ed2c2cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3c0c17ceb421b60d6f02bdd8fe73a5c638cdd9c2655b832b95a08f67a7cb752531c3774004b78c3752bddd9e4ad947f1a0a0dbc1c148ffe56b1c3fc4f1e62f3
|
7
|
+
data.tar.gz: c1c8c065c4c05cdd7d1fe0bdb1b04184e8d99033ee7fff4212c88c92142fb7a0ba2b1dff85643320172379a85e789adb33d4481f70f374a80166a76208b097f9
|
data/README.md
CHANGED
@@ -33,23 +33,35 @@ In your Gemfile, include this gem:
|
|
33
33
|
gem 'app_settings'
|
34
34
|
````
|
35
35
|
|
36
|
+
You can use the following files to declare your application settings:
|
36
37
|
|
37
|
-
|
38
|
-
|
39
|
-
|
38
|
+
* config/application.rb (for all environments)
|
39
|
+
* config/environemnts/development.rb (for just dev env)
|
40
|
+
* config/environemnts/test.rb (for just the test env)
|
41
|
+
* config/environemnts/production.rb (for just the production env)
|
40
42
|
|
41
|
-
|
43
|
+
The settings will work in the same way that Rails' environment config, where the application.rb is for all environments, but can be overridden by the environment specific files (development.rb, test.rb, production.rb).
|
44
|
+
|
45
|
+
This is how you'd set your application settings in one or more of those files:
|
42
46
|
|
43
47
|
````
|
44
|
-
config.
|
45
|
-
config.
|
48
|
+
config.settings.appname = 'My Rails Application'
|
49
|
+
config.settings.company_name = 'Fancy Pants LLC'
|
46
50
|
````
|
47
51
|
|
48
52
|
Then, anywhere in your app, you can access those by doing:
|
49
53
|
|
50
54
|
````
|
51
|
-
Rails.application.config.
|
52
|
-
Rails.application.config.
|
55
|
+
Rails.application.config.settings.appname # => 'My Rails Application'
|
56
|
+
Rails.application.config.settings.company_name # => 'Fancy Pants LLC'
|
57
|
+
````
|
58
|
+
|
59
|
+
OR
|
60
|
+
|
61
|
+
````
|
62
|
+
AppName::Application.config.settings.appname # => 'My Rails Application'
|
63
|
+
AppName::Application.config.settings.company_name # => 'Fancy Pants LLC'
|
64
|
+
|
53
65
|
````
|
54
66
|
|
55
67
|
From there, you could put those into the app/controllers/application_controller.rb
|
data/app_settings.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "app_settings"
|
7
|
-
spec.version = "0.0.
|
7
|
+
spec.version = "0.0.2"
|
8
8
|
spec.authors = ["Robert Evans"]
|
9
9
|
spec.email = ["robert@codewranglers.org"]
|
10
10
|
spec.summary = %q{Application wide settings}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: app_settings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Evans
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -41,16 +41,7 @@ dependencies:
|
|
41
41
|
description: Application wide settings
|
42
42
|
email:
|
43
43
|
- robert@codewranglers.org
|
44
|
-
executables:
|
45
|
-
- bundler
|
46
|
-
- erubis
|
47
|
-
- rackup
|
48
|
-
- rails
|
49
|
-
- rake
|
50
|
-
- sprockets
|
51
|
-
- thor
|
52
|
-
- tilt
|
53
|
-
- tt
|
44
|
+
executables: []
|
54
45
|
extensions: []
|
55
46
|
extra_rdoc_files: []
|
56
47
|
files:
|
@@ -61,15 +52,6 @@ files:
|
|
61
52
|
- README.md
|
62
53
|
- Rakefile
|
63
54
|
- app_settings.gemspec
|
64
|
-
- bin/bundler
|
65
|
-
- bin/erubis
|
66
|
-
- bin/rackup
|
67
|
-
- bin/rails
|
68
|
-
- bin/rake
|
69
|
-
- bin/sprockets
|
70
|
-
- bin/thor
|
71
|
-
- bin/tilt
|
72
|
-
- bin/tt
|
73
55
|
- lib/app_settings.rb
|
74
56
|
- lib/app_settings/railtie.rb
|
75
57
|
- test/railtie_test.rb
|
data/bin/bundler
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'bundler' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
require 'pathname'
|
10
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
-
Pathname.new(__FILE__).realpath)
|
12
|
-
|
13
|
-
require 'rubygems'
|
14
|
-
require 'bundler/setup'
|
15
|
-
|
16
|
-
load Gem.bin_path('bundler', 'bundler')
|
data/bin/erubis
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'erubis' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
require 'pathname'
|
10
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
-
Pathname.new(__FILE__).realpath)
|
12
|
-
|
13
|
-
require 'rubygems'
|
14
|
-
require 'bundler/setup'
|
15
|
-
|
16
|
-
load Gem.bin_path('erubis', 'erubis')
|
data/bin/rackup
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'rackup' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
require 'pathname'
|
10
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
-
Pathname.new(__FILE__).realpath)
|
12
|
-
|
13
|
-
require 'rubygems'
|
14
|
-
require 'bundler/setup'
|
15
|
-
|
16
|
-
load Gem.bin_path('rack', 'rackup')
|
data/bin/rails
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'rails' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
require 'pathname'
|
10
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
-
Pathname.new(__FILE__).realpath)
|
12
|
-
|
13
|
-
require 'rubygems'
|
14
|
-
require 'bundler/setup'
|
15
|
-
|
16
|
-
load Gem.bin_path('railties', 'rails')
|
data/bin/rake
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'rake' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
require 'pathname'
|
10
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
-
Pathname.new(__FILE__).realpath)
|
12
|
-
|
13
|
-
require 'rubygems'
|
14
|
-
require 'bundler/setup'
|
15
|
-
|
16
|
-
load Gem.bin_path('rake', 'rake')
|
data/bin/sprockets
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'sprockets' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
require 'pathname'
|
10
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
-
Pathname.new(__FILE__).realpath)
|
12
|
-
|
13
|
-
require 'rubygems'
|
14
|
-
require 'bundler/setup'
|
15
|
-
|
16
|
-
load Gem.bin_path('sprockets', 'sprockets')
|
data/bin/thor
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'thor' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
require 'pathname'
|
10
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
-
Pathname.new(__FILE__).realpath)
|
12
|
-
|
13
|
-
require 'rubygems'
|
14
|
-
require 'bundler/setup'
|
15
|
-
|
16
|
-
load Gem.bin_path('thor', 'thor')
|
data/bin/tilt
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'tilt' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
require 'pathname'
|
10
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
-
Pathname.new(__FILE__).realpath)
|
12
|
-
|
13
|
-
require 'rubygems'
|
14
|
-
require 'bundler/setup'
|
15
|
-
|
16
|
-
load Gem.bin_path('tilt', 'tilt')
|
data/bin/tt
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'tt' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
require 'pathname'
|
10
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
-
Pathname.new(__FILE__).realpath)
|
12
|
-
|
13
|
-
require 'rubygems'
|
14
|
-
require 'bundler/setup'
|
15
|
-
|
16
|
-
load Gem.bin_path('treetop', 'tt')
|