confucious 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc CHANGED
@@ -1,6 +1,6 @@
1
- = confu
1
+ = confucious
2
2
 
3
- I found myself duplicating this code, so I wrote it into a gem.
3
+ I found myself duplicating this code, so I wrote it into a gem (named: `confucious`).
4
4
 
5
5
  This is an `incredibly` simple gem with only a few lines of code and a few helpers to help define a configuration for a class.
6
6
 
@@ -27,7 +27,11 @@ Then the `MyClass` that included the module has a magic method called `config`.
27
27
 
28
28
  MyClass.new.config.a # new value for a
29
29
 
30
- == Contributing to confu
30
+ To install:
31
+
32
+ gem install confucious
33
+
34
+ == Contributing to confucious
31
35
 
32
36
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
33
37
  * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
data/Rakefile CHANGED
@@ -15,7 +15,7 @@ require 'jeweler'
15
15
  Jeweler::Tasks.new do |gem|
16
16
  # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
17
  gem.name = "confucious"
18
- gem.homepage = "http://github.com/auser/confu"
18
+ gem.homepage = "http://github.com/auser/confucious"
19
19
  gem.license = "MIT"
20
20
  gem.summary = %Q{Drop-dead simple configuration}
21
21
  gem.description = %Q{Drop-dead simple configuration for an application. See `README.rdoc` for details}
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.2
@@ -1,10 +1,10 @@
1
- $:.unshift(File.expand_path("confu", File.dirname(__FILE__)))
1
+ $:.unshift(File.expand_path("confucious", File.dirname(__FILE__)))
2
2
  require 'hashie'
3
3
  require 'logger'
4
4
 
5
5
  require 'config'
6
6
 
7
- module Confu
7
+ module Confucious
8
8
  module ClassMethods
9
9
  # This allows us to do cool things like set our
10
10
  # own configuration in a block
@@ -17,15 +17,15 @@ module Confu
17
17
  @config = nil # reset!
18
18
  mash = Hashie::Mash.new(opts)
19
19
  yield mash if block_given?
20
- Confu::Config.defaults.merge!(mash)
20
+ Confucious::Config.defaults.merge!(mash)
21
21
  end
22
22
 
23
23
  def configuration(&block)
24
- Confu::Config.instance_eval(&block) if block_given?
24
+ Confucious::Config.instance_eval(&block) if block_given?
25
25
  end
26
26
 
27
27
  def config
28
- @config ||= Confu::Config.new
28
+ @config ||= Confucious::Config.new
29
29
  end
30
30
  end
31
31
 
@@ -1,4 +1,4 @@
1
- module Confu
1
+ module Confucious
2
2
  class Config < Hashie::Dash
3
3
 
4
4
  property :logger, :default => ::Logger.new(STDOUT)
data/test/helper.rb CHANGED
@@ -12,7 +12,7 @@ require 'shoulda'
12
12
 
13
13
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
14
  $LOAD_PATH.unshift(File.dirname(__FILE__))
15
- require 'confu'
15
+ require 'confucious'
16
16
 
17
17
  class Test::Unit::TestCase
18
18
  end
@@ -1,10 +1,10 @@
1
1
  require 'helper'
2
2
 
3
- class TestConfu < Test::Unit::TestCase
4
- context "Confu" do
3
+ class TestConfucious < Test::Unit::TestCase
4
+ context "Confucious" do
5
5
 
6
- class TestConfuDude
7
- include Confu
6
+ class TestConfuciousDude
7
+ include Confucious
8
8
 
9
9
  configuration do
10
10
  property :useless, :default => "useless"
@@ -14,16 +14,16 @@ class TestConfu < Test::Unit::TestCase
14
14
  end
15
15
 
16
16
  setup do
17
- @tcd = TestConfuDude.new
17
+ @tcd = TestConfuciousDude.new
18
18
  @config = @tcd.config
19
19
  end
20
20
 
21
21
  should "be able to set configuration" do
22
- TestConfuDude.configure do |c|
22
+ TestConfuciousDude.configure do |c|
23
23
  c.no_default = "this is a value"
24
24
  end
25
25
 
26
- assert_equal "this is a value", TestConfuDude.new.config.no_default
26
+ assert_equal "this is a value", TestConfuciousDude.new.config.no_default
27
27
  end
28
28
 
29
29
  should "be able to be included in another class" do
@@ -41,7 +41,7 @@ class TestConfu < Test::Unit::TestCase
41
41
  end
42
42
 
43
43
  should "only create one instance of config" do
44
- assert_equal @config, TestConfuDude.new.config
44
+ assert_equal @config, TestConfuciousDude.new.config
45
45
  end
46
46
 
47
47
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: confucious
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.1
5
+ version: 0.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ari Lerner
@@ -96,12 +96,12 @@ files:
96
96
  - README.rdoc
97
97
  - Rakefile
98
98
  - VERSION
99
- - lib/confu.rb
100
- - lib/confu/config.rb
99
+ - lib/confucious.rb
100
+ - lib/confucious/config.rb
101
101
  - test/helper.rb
102
- - test/test_confu.rb
102
+ - test/test_confucious.rb
103
103
  has_rdoc: true
104
- homepage: http://github.com/auser/confu
104
+ homepage: http://github.com/auser/confucious
105
105
  licenses:
106
106
  - MIT
107
107
  post_install_message:
@@ -114,7 +114,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
116
116
  - !ruby/object:Gem::Version
117
- hash: -2148341052206315511
117
+ hash: 3452877008982530935
118
118
  segments:
119
119
  - 0
120
120
  version: "0"