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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cdb19c79acaec9be18c3b1392a88780e41f030bc
4
- data.tar.gz: 9e9aa6e9e0a2b14cbb761652becd75e69342233f
3
+ metadata.gz: 272c37e0192010c875187bd6de75748d301c3d53
4
+ data.tar.gz: 7aa0645bdcb88d8249c520c80c73caf86ed2c2cb
5
5
  SHA512:
6
- metadata.gz: cf688753ab7ea276480b1936d0d330f3c977f9dbb8159e3d69ab4014ba039b053756dcfc755f06962daef7f67303a93c995d72c371ff52766cbdc97668dc3039
7
- data.tar.gz: f491d3059868a836a50cc338e410c8839aa146605275b532779d14426d9e05709719df68f154aa5d6a63c0f98a2d7e38b973f5738c8a8df7a2de6eeeed577662
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
- You can choose to have specific environment settings, but using
38
- the config/environments/*.rb files, or put it into the config/application.rb
39
- file. Your choice.
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
- inside one of those files:
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.app_settings.appname = 'My Rails Application'
45
- config.app_settings.company_name = 'Fancy Pants LLC'
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.app_settings.appname # => 'My Rails Application'
52
- Rails.application.config.app_settings.company_name # => 'Fancy Pants LLC'
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.1"
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.1
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-01 00:00:00.000000000 Z
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')