configusta 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem "rake", "~> 0.9"
4
+ gem "rspec", "~> 2.11.0"
data/Gemfile.lock ADDED
@@ -0,0 +1,20 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ diff-lcs (1.1.3)
5
+ rake (0.9.2.2)
6
+ rspec (2.11.0)
7
+ rspec-core (~> 2.11.0)
8
+ rspec-expectations (~> 2.11.0)
9
+ rspec-mocks (~> 2.11.0)
10
+ rspec-core (2.11.1)
11
+ rspec-expectations (2.11.2)
12
+ diff-lcs (~> 1.1.3)
13
+ rspec-mocks (2.11.2)
14
+
15
+ PLATFORMS
16
+ ruby
17
+
18
+ DEPENDENCIES
19
+ rake (~> 0.9)
20
+ rspec (~> 2.11.0)
data/README.md ADDED
@@ -0,0 +1,33 @@
1
+ Configusta
2
+ ==========
3
+
4
+ [![Build Status](https://secure.travis-ci.org/dml/configusta.png)](http://travis-ci.org/dml/configusta)
5
+
6
+ Usage
7
+ -----
8
+
9
+
10
+
11
+ class Settings < Configusta::DSL
12
+ defaults Rails.root.join("config", "")
13
+ end
14
+
15
+
16
+
17
+ Inside your user model
18
+
19
+ class User < ActiveRecord::Base
20
+ configusta :database => :configs
21
+ end
22
+
23
+
24
+
25
+ ActionController
26
+ ----------------
27
+
28
+ user_config.get('site.theme') # => nil
29
+ user_config.get('site.theme', 'green') # => 'green'
30
+ user_config.set('site.theme', 'dark')
31
+ user_config.get('site.theme') # => 'dark'
32
+
33
+
data/Rakefile ADDED
@@ -0,0 +1,11 @@
1
+ require 'rubygems'
2
+ require 'rspec/core/rake_task'
3
+
4
+ desc 'Default: run specs.'
5
+ task :default => :spec
6
+
7
+ desc "Run specs"
8
+ RSpec::Core::RakeTask.new do |r|
9
+ r.pattern = "spec/**/*_spec.rb"
10
+ r.rspec_opts = '-fs -c'
11
+ end
@@ -0,0 +1,15 @@
1
+ require File.expand_path('../lib/configusta/version', __FILE__)
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = 'configusta'
5
+ s.version = Configusta::VERSION
6
+ s.authors = ['Dmtiry Larkin']
7
+ s.email = ['dmitry.larkin@gmail.com']
8
+ s.homepage = 'https://github.com/dml/configusta'
9
+ s.summary = 'Gonfigusta Gem'
10
+ s.description = 'Gem that makes configuration magic'
11
+
12
+ s.require_path = 'lib'
13
+ s.files = Dir['{lib,spec,rails_generators}/**/*', "[a-zA-Z]*"]
14
+ s.test_files = Dir['spec/**/*']
15
+ end
data/lib/configusta.rb ADDED
@@ -0,0 +1,5 @@
1
+ require 'configusta/version'
2
+
3
+ module Configusta
4
+
5
+ end
@@ -0,0 +1,3 @@
1
+ module Configusta
2
+ VERSION = '0.0.1'
3
+ end
@@ -0,0 +1 @@
1
+ require 'configusta'
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ describe Configusta do
4
+ it "should have version" do
5
+ expect(described_class::VERSION).to match(/\d\.\d\.\d/)
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,56 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: configusta
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Dmtiry Larkin
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-08-13 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Gem that makes configuration magic
15
+ email:
16
+ - dmitry.larkin@gmail.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - lib/configusta/version.rb
22
+ - lib/configusta.rb
23
+ - spec/spec_helper.rb
24
+ - spec/version_spec.rb
25
+ - configusta.gemspec
26
+ - Gemfile
27
+ - Gemfile.lock
28
+ - Rakefile
29
+ - README.md
30
+ homepage: https://github.com/dml/configusta
31
+ licenses: []
32
+ post_install_message:
33
+ rdoc_options: []
34
+ require_paths:
35
+ - lib
36
+ required_ruby_version: !ruby/object:Gem::Requirement
37
+ none: false
38
+ requirements:
39
+ - - ! '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ required_rubygems_version: !ruby/object:Gem::Requirement
43
+ none: false
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ requirements: []
49
+ rubyforge_project:
50
+ rubygems_version: 1.8.24
51
+ signing_key:
52
+ specification_version: 3
53
+ summary: Gonfigusta Gem
54
+ test_files:
55
+ - spec/spec_helper.rb
56
+ - spec/version_spec.rb