confection 0.2.1 → 0.3.0
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/.ruby +1 -1
 - data/HISTORY.md +12 -0
 - data/README.md +11 -10
 - data/lib/confection/project.rb +12 -2
 - metadata +14 -16
 - data/Confile.rb +0 -57
 - data/spec/applique/fixture/confile.rb +0 -15
 
    
        data/.ruby
    CHANGED
    
    | 
         @@ -47,7 +47,7 @@ revision: 0 
     | 
|
| 
       47 
47 
     | 
    
         
             
            created: '2011-11-06'
         
     | 
| 
       48 
48 
     | 
    
         
             
            summary: Multi-tenant configuration for Ruby
         
     | 
| 
       49 
49 
     | 
    
         
             
            title: Confection
         
     | 
| 
       50 
     | 
    
         
            -
            version: 0. 
     | 
| 
      
 50 
     | 
    
         
            +
            version: 0.3.0
         
     | 
| 
       51 
51 
     | 
    
         
             
            name: confection
         
     | 
| 
       52 
52 
     | 
    
         
             
            description: Confection is a multi-tenant configuration system for Ruby projects.
         
     | 
| 
       53 
53 
     | 
    
         
             
            organization: Rubyworks
         
     | 
    
        data/HISTORY.md
    CHANGED
    
    | 
         @@ -1,5 +1,17 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # RELEASE HISTORY
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
      
 3 
     | 
    
         
            +
            ## 0.3.0 | 2012-04-02
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            This release renames the configuraiton file from `Confile`
         
     | 
| 
      
 6 
     | 
    
         
            +
            to `Config.rb`. I mean really, it makes more sense. As it currently
         
     | 
| 
      
 7 
     | 
    
         
            +
            stands then you can use `.config.rb`, 'Config.rb` or `config.rb`
         
     | 
| 
      
 8 
     | 
    
         
            +
            variations, with precedence taken in that order.
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
            Changes:
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            * Rename configuration file from `Confile` to `Config.rb`.
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
       3 
15 
     | 
    
         
             
            ## 0.2.0 | 2012-03-11
         
     | 
| 
       4 
16 
     | 
    
         | 
| 
       5 
17 
     | 
    
         
             
            The API has changed and no longer uses #method_missing magic.
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -1,9 +1,9 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # Confection
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
            [Homepage](http://rubyworks.github.com/confection)  
     | 
| 
       4 
     | 
    
         
            -
            [Source Code](http://github.com/rubyworks/confection)  
     | 
| 
       5 
     | 
    
         
            -
            [Report Issue](http://github.com/rubyworks/confection/issues)  
     | 
| 
       6 
     | 
    
         
            -
            [Mailing List](http://googlegroups.com/group/rubyworks-mailinglist)  
     | 
| 
      
 3 
     | 
    
         
            +
            [Homepage](http://rubyworks.github.com/confection) /
         
     | 
| 
      
 4 
     | 
    
         
            +
            [Source Code](http://github.com/rubyworks/confection) /
         
     | 
| 
      
 5 
     | 
    
         
            +
            [Report Issue](http://github.com/rubyworks/confection/issues) /
         
     | 
| 
      
 6 
     | 
    
         
            +
            [Mailing List](http://googlegroups.com/group/rubyworks-mailinglist) /
         
     | 
| 
       7 
7 
     | 
    
         
             
            [IRC Channel](http://chat.us.freenode.net/rubyworks)
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
       9 
9 
     | 
    
         
             
            [](http://travis-ci.org/rubyworks/confection)
         
     | 
| 
         @@ -19,12 +19,13 @@ and flexible in use. 
     | 
|
| 
       19 
19 
     | 
    
         | 
| 
       20 
20 
     | 
    
         
             
            ## Instruction
         
     | 
| 
       21 
21 
     | 
    
         | 
| 
       22 
     | 
    
         
            -
            To get started, create a file  
     | 
| 
       23 
     | 
    
         
            -
            have any name that matches  
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
            how we could use this to  
     | 
| 
      
 22 
     | 
    
         
            +
            To get started, create a master configuration file for your project called
         
     | 
| 
      
 23 
     | 
    
         
            +
            `Config.rb`. The file can have any name that matches `.config.rb`, `Config.rb`
         
     | 
| 
      
 24 
     | 
    
         
            +
            or `config.rb`, in that order of precedence. In this file add configuration
         
     | 
| 
      
 25 
     | 
    
         
            +
            blocks by name. For example, let's demonstrate how we could use this to 
         
     | 
| 
      
 26 
     | 
    
         
            +
            configure Rake tasks.
         
     | 
| 
       26 
27 
     | 
    
         | 
| 
       27 
     | 
    
         
            -
                $ cat  
     | 
| 
      
 28 
     | 
    
         
            +
                $ cat Config.rb
         
     | 
| 
       28 
29 
     | 
    
         
             
                config :rake do
         
     | 
| 
       29 
30 
     | 
    
         
             
                  desc 'generate yard docs'
         
     | 
| 
       30 
31 
     | 
    
         
             
                  task :yard do
         
     | 
| 
         @@ -42,7 +43,7 @@ Now you might wonder why the heck you would do this. That's where the *multi-ten 
     | 
|
| 
       42 
43 
     | 
    
         
             
            comes into play. Let's add another configuration, and this time for a tool that has
         
     | 
| 
       43 
44 
     | 
    
         
             
            native support for Confection.
         
     | 
| 
       44 
45 
     | 
    
         | 
| 
       45 
     | 
    
         
            -
                $ cat  
     | 
| 
      
 46 
     | 
    
         
            +
                $ cat Config.rb
         
     | 
| 
       46 
47 
     | 
    
         
             
                title = "MyApp"
         
     | 
| 
       47 
48 
     | 
    
         | 
| 
       48 
49 
     | 
    
         
             
                config :rake do
         
     | 
    
        data/lib/confection/project.rb
    CHANGED
    
    | 
         @@ -9,9 +9,19 @@ module Confection 
     | 
|
| 
       9 
9 
     | 
    
         
             
                include Enumerable
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
       11 
11 
     | 
    
         
             
                #
         
     | 
| 
       12 
     | 
    
         
            -
                # Configuration file pattern.
         
     | 
| 
      
 12 
     | 
    
         
            +
                # Configuration file pattern. The standard configuration file name is
         
     | 
| 
      
 13 
     | 
    
         
            +
                # `Config.rb`, and that name should be used in most cases. However, 
         
     | 
| 
      
 14 
     | 
    
         
            +
                # `.config.rb` can also be use and will take precedence if found.
         
     | 
| 
      
 15 
     | 
    
         
            +
                # Conversely, `config.rb` (lowercase form) can also be used but has
         
     | 
| 
      
 16 
     | 
    
         
            +
                # the least precedence.
         
     | 
| 
       13 
17 
     | 
    
         
             
                #
         
     | 
| 
       14 
     | 
    
         
            -
                 
     | 
| 
      
 18 
     | 
    
         
            +
                # Config files looked for in the order or precedence:
         
     | 
| 
      
 19 
     | 
    
         
            +
                #
         
     | 
| 
      
 20 
     | 
    
         
            +
                #   * `.config.rb`
         
     | 
| 
      
 21 
     | 
    
         
            +
                #   * `Config.rb`
         
     | 
| 
      
 22 
     | 
    
         
            +
                #   * `config.rb`
         
     | 
| 
      
 23 
     | 
    
         
            +
                #
         
     | 
| 
      
 24 
     | 
    
         
            +
                PATTERN = '{.,}config{.rb,}'
         
     | 
| 
       15 
25 
     | 
    
         | 
| 
       16 
26 
     | 
    
         
             
                #
         
     | 
| 
       17 
27 
     | 
    
         
             
                # Per library cache.
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: confection
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.3.0
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       6 
6 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       7 
7 
     | 
    
         
             
            authors:
         
     | 
| 
         @@ -9,11 +9,11 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2012-03 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2012-04-03 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: finder
         
     | 
| 
       16 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 16 
     | 
    
         
            +
              requirement: &20805300 !ruby/object:Gem::Requirement
         
     | 
| 
       17 
17 
     | 
    
         
             
                none: false
         
     | 
| 
       18 
18 
     | 
    
         
             
                requirements:
         
     | 
| 
       19 
19 
     | 
    
         
             
                - - ! '>='
         
     | 
| 
         @@ -21,10 +21,10 @@ dependencies: 
     | 
|
| 
       21 
21 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       22 
22 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       23 
23 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       24 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
      
 24 
     | 
    
         
            +
              version_requirements: *20805300
         
     | 
| 
       25 
25 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       26 
26 
     | 
    
         
             
              name: facets
         
     | 
| 
       27 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 27 
     | 
    
         
            +
              requirement: &20827700 !ruby/object:Gem::Requirement
         
     | 
| 
       28 
28 
     | 
    
         
             
                none: false
         
     | 
| 
       29 
29 
     | 
    
         
             
                requirements:
         
     | 
| 
       30 
30 
     | 
    
         
             
                - - ! '>='
         
     | 
| 
         @@ -32,10 +32,10 @@ dependencies: 
     | 
|
| 
       32 
32 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       33 
33 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       34 
34 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       35 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
      
 35 
     | 
    
         
            +
              version_requirements: *20827700
         
     | 
| 
       36 
36 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       37 
37 
     | 
    
         
             
              name: blankslate
         
     | 
| 
       38 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 38 
     | 
    
         
            +
              requirement: &20827200 !ruby/object:Gem::Requirement
         
     | 
| 
       39 
39 
     | 
    
         
             
                none: false
         
     | 
| 
       40 
40 
     | 
    
         
             
                requirements:
         
     | 
| 
       41 
41 
     | 
    
         
             
                - - ! '>='
         
     | 
| 
         @@ -43,10 +43,10 @@ dependencies: 
     | 
|
| 
       43 
43 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       44 
44 
     | 
    
         
             
              type: :development
         
     | 
| 
       45 
45 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       46 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
      
 46 
     | 
    
         
            +
              version_requirements: *20827200
         
     | 
| 
       47 
47 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       48 
48 
     | 
    
         
             
              name: detroit
         
     | 
| 
       49 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 49 
     | 
    
         
            +
              requirement: &20826700 !ruby/object:Gem::Requirement
         
     | 
| 
       50 
50 
     | 
    
         
             
                none: false
         
     | 
| 
       51 
51 
     | 
    
         
             
                requirements:
         
     | 
| 
       52 
52 
     | 
    
         
             
                - - ! '>='
         
     | 
| 
         @@ -54,10 +54,10 @@ dependencies: 
     | 
|
| 
       54 
54 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       55 
55 
     | 
    
         
             
              type: :development
         
     | 
| 
       56 
56 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       57 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
      
 57 
     | 
    
         
            +
              version_requirements: *20826700
         
     | 
| 
       58 
58 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       59 
59 
     | 
    
         
             
              name: qed
         
     | 
| 
       60 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 60 
     | 
    
         
            +
              requirement: &20826200 !ruby/object:Gem::Requirement
         
     | 
| 
       61 
61 
     | 
    
         
             
                none: false
         
     | 
| 
       62 
62 
     | 
    
         
             
                requirements:
         
     | 
| 
       63 
63 
     | 
    
         
             
                - - ! '>='
         
     | 
| 
         @@ -65,10 +65,10 @@ dependencies: 
     | 
|
| 
       65 
65 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       66 
66 
     | 
    
         
             
              type: :development
         
     | 
| 
       67 
67 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       68 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
      
 68 
     | 
    
         
            +
              version_requirements: *20826200
         
     | 
| 
       69 
69 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       70 
70 
     | 
    
         
             
              name: ae
         
     | 
| 
       71 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 71 
     | 
    
         
            +
              requirement: &20825700 !ruby/object:Gem::Requirement
         
     | 
| 
       72 
72 
     | 
    
         
             
                none: false
         
     | 
| 
       73 
73 
     | 
    
         
             
                requirements:
         
     | 
| 
       74 
74 
     | 
    
         
             
                - - ! '>='
         
     | 
| 
         @@ -76,7 +76,7 @@ dependencies: 
     | 
|
| 
       76 
76 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       77 
77 
     | 
    
         
             
              type: :development
         
     | 
| 
       78 
78 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       79 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
      
 79 
     | 
    
         
            +
              version_requirements: *20825700
         
     | 
| 
       80 
80 
     | 
    
         
             
            description: Confection is a multi-tenant configuration system for Ruby projects.
         
     | 
| 
       81 
81 
     | 
    
         
             
            email:
         
     | 
| 
       82 
82 
     | 
    
         
             
            - transfire@gmail.com
         
     | 
| 
         @@ -108,12 +108,10 @@ files: 
     | 
|
| 
       108 
108 
     | 
    
         
             
            - spec/06_manage.md
         
     | 
| 
       109 
109 
     | 
    
         
             
            - spec/applique/ae.rb
         
     | 
| 
       110 
110 
     | 
    
         
             
            - spec/applique/file.rb
         
     | 
| 
       111 
     | 
    
         
            -
            - spec/applique/fixture/confile.rb
         
     | 
| 
       112 
111 
     | 
    
         
             
            - spec/applique/fixture.rb
         
     | 
| 
       113 
112 
     | 
    
         
             
            - LICENSE.txt
         
     | 
| 
       114 
113 
     | 
    
         
             
            - HISTORY.md
         
     | 
| 
       115 
114 
     | 
    
         
             
            - README.md
         
     | 
| 
       116 
     | 
    
         
            -
            - Confile.rb
         
     | 
| 
       117 
115 
     | 
    
         
             
            homepage: http://rubyworks.github.com/confection
         
     | 
| 
       118 
116 
     | 
    
         
             
            licenses:
         
     | 
| 
       119 
117 
     | 
    
         
             
            - BSD-2-Clause
         
     | 
    
        data/Confile.rb
    DELETED
    
    | 
         @@ -1,57 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            #!/usr/bin/env ruby
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            #
         
     | 
| 
       4 
     | 
    
         
            -
            # QED test coverage report using SimpleCov.
         
     | 
| 
       5 
     | 
    
         
            -
            #
         
     | 
| 
       6 
     | 
    
         
            -
            # coverage_folder - the directory in which to store coverage report
         
     | 
| 
       7 
     | 
    
         
            -
            #                   this defaults to `log/coverage`.
         
     | 
| 
       8 
     | 
    
         
            -
            #
         
     | 
| 
       9 
     | 
    
         
            -
            config :qed, :cov do
         
     | 
| 
       10 
     | 
    
         
            -
              require 'simplecov'
         
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
              dir = $properties.coverage_folder
         
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
              SimpleCov.start do
         
     | 
| 
       15 
     | 
    
         
            -
                coverage_dir(dir || 'log/coverage')
         
     | 
| 
       16 
     | 
    
         
            -
                #add_group "Label", "lib/qed/directory"
         
     | 
| 
       17 
     | 
    
         
            -
              end
         
     | 
| 
       18 
     | 
    
         
            -
            end
         
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
            #
         
     | 
| 
       21 
     | 
    
         
            -
            # Example configuration.
         
     | 
| 
       22 
     | 
    
         
            -
            #
         
     | 
| 
       23 
     | 
    
         
            -
            config :example do
         
     | 
| 
       24 
     | 
    
         
            -
              puts "Configuration Example!"
         
     | 
| 
       25 
     | 
    
         
            -
            end
         
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
            #
         
     | 
| 
       28 
     | 
    
         
            -
            # Detroit assembly.
         
     | 
| 
       29 
     | 
    
         
            -
            #
         
     | 
| 
       30 
     | 
    
         
            -
            config :detroit do
         
     | 
| 
       31 
     | 
    
         
            -
              email do
         
     | 
| 
       32 
     | 
    
         
            -
                mailto 'ruby-talk@ruby-lang.org', 'rubyworks-mailinglist@googlegroups.com'
         
     | 
| 
       33 
     | 
    
         
            -
              end
         
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
              gem do
         
     | 
| 
       36 
     | 
    
         
            -
                active true
         
     | 
| 
       37 
     | 
    
         
            -
              end
         
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
              github do
         
     | 
| 
       40 
     | 
    
         
            -
                folder 'web'
         
     | 
| 
       41 
     | 
    
         
            -
              end
         
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
              dnote do
         
     | 
| 
       44 
     | 
    
         
            -
                title  'Source Notes'
         
     | 
| 
       45 
     | 
    
         
            -
                output 'log/notes.html'
         
     | 
| 
       46 
     | 
    
         
            -
              end
         
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
       48 
     | 
    
         
            -
              locat do
         
     | 
| 
       49 
     | 
    
         
            -
                output 'log/locat.html'
         
     | 
| 
       50 
     | 
    
         
            -
              end
         
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
              vclog do
         
     | 
| 
       53 
     | 
    
         
            -
                output 'log/history.html',
         
     | 
| 
       54 
     | 
    
         
            -
                       'log/changes.html'
         
     | 
| 
       55 
     | 
    
         
            -
              end
         
     | 
| 
       56 
     | 
    
         
            -
            end
         
     | 
| 
       57 
     | 
    
         
            -
             
     |