chamber 0.0.3 → 0.0.4
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.
- checksums.yaml +4 -4
 - data/README.md +5 -5
 - data/chamber.gemspec +3 -0
 - data/lib/chamber.rb +4 -0
 - data/lib/chamber/version.rb +1 -1
 - data/spec/lib/chamber_spec.rb +20 -0
 - metadata +15 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: bdabeaa7f46f79f6e320ab4124bf84c971e83533
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 83de25cdc6048fdc681b0a69ed10a7b312a96637
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 3cbf0a8825b0a40e6743effce5322db8ae5842e74c7454e39de340d8dad07338ce6970b3b07e0ef4b313aa97585da4ce1b2ee6cc5315a02293433d7ff76c0530
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 64998ca0ddad139b1a9127be272da8beb09f53726c902858c822ea15f50345ba9dafe19d701703bbedf1fc2fffb1263c76732879ddf32206b3f6e00cc8d08594
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -94,8 +94,8 @@ end 
     | 
|
| 
       94 
94 
     | 
    
         
             
            Use `heroku config` to set the `ENV_VAR_NAME` value for the staging and
         
     | 
| 
       95 
95 
     | 
    
         
             
            production remotes.
         
     | 
| 
       96 
96 
     | 
    
         | 
| 
       97 
     | 
    
         
            -
            Now you can access your settings in your code  
     | 
| 
       98 
     | 
    
         
            -
            you extended Chamber in a class named `Settings`).
         
     | 
| 
      
 97 
     | 
    
         
            +
            Now you can access your settings in your code as properties of your `Settings`
         
     | 
| 
      
 98 
     | 
    
         
            +
            class (assuming you extended Chamber in a class named `Settings`).
         
     | 
| 
       99 
99 
     | 
    
         | 
| 
       100 
100 
     | 
    
         
             
            In other words, given a configuration file like this:
         
     | 
| 
       101 
101 
     | 
    
         | 
| 
         @@ -112,10 +112,10 @@ the corresponding Paperclip configuration would look like this: 
     | 
|
| 
       112 
112 
     | 
    
         
             
            Paperclip::Attachment.default_options.merge!(
         
     | 
| 
       113 
113 
     | 
    
         
             
              storage: 's3',
         
     | 
| 
       114 
114 
     | 
    
         
             
              s3_credentials: {
         
     | 
| 
       115 
     | 
    
         
            -
                access_key_id: Settings. 
     | 
| 
       116 
     | 
    
         
            -
                secret_access_key: Settings. 
     | 
| 
      
 115 
     | 
    
         
            +
                access_key_id: Settings.s3.access_key_id,
         
     | 
| 
      
 116 
     | 
    
         
            +
                secret_access_key: Settings.s3.secret_access_key
         
     | 
| 
       117 
117 
     | 
    
         
             
              },
         
     | 
| 
       118 
     | 
    
         
            -
              bucket: Settings. 
     | 
| 
      
 118 
     | 
    
         
            +
              bucket: Settings.s3.bucket,
         
     | 
| 
       119 
119 
     | 
    
         
             
              ...
         
     | 
| 
       120 
120 
     | 
    
         
             
            ```
         
     | 
| 
       121 
121 
     | 
    
         | 
    
        data/chamber.gemspec
    CHANGED
    
    
    
        data/lib/chamber.rb
    CHANGED
    
    
    
        data/lib/chamber/version.rb
    CHANGED
    
    
    
        data/spec/lib/chamber_spec.rb
    CHANGED
    
    | 
         @@ -130,6 +130,11 @@ CONTENT 
     | 
|
| 
       130 
130 
     | 
    
         
             
                      Settings.load!
         
     | 
| 
       131 
131 
     | 
    
         
             
                      expect(Settings.instance.to_hash).to eq expected
         
     | 
| 
       132 
132 
     | 
    
         
             
                    end
         
     | 
| 
      
 133 
     | 
    
         
            +
             
     | 
| 
      
 134 
     | 
    
         
            +
                    it 'provides access to all settings without the instance root' do
         
     | 
| 
      
 135 
     | 
    
         
            +
                      Settings.load!
         
     | 
| 
      
 136 
     | 
    
         
            +
                      expect(Settings.to_hash).to eq expected
         
     | 
| 
      
 137 
     | 
    
         
            +
                    end
         
     | 
| 
       133 
138 
     | 
    
         
             
                  end
         
     | 
| 
       134 
139 
     | 
    
         | 
| 
       135 
140 
     | 
    
         
             
                  context 'and the :namespace option is specified' do
         
     | 
| 
         @@ -147,6 +152,11 @@ CONTENT 
     | 
|
| 
       147 
152 
     | 
    
         
             
                        Settings.load!
         
     | 
| 
       148 
153 
     | 
    
         
             
                        expect(Settings.instance.to_hash).to eq expected
         
     | 
| 
       149 
154 
     | 
    
         
             
                      end
         
     | 
| 
      
 155 
     | 
    
         
            +
             
     | 
| 
      
 156 
     | 
    
         
            +
                      it 'provides access to all settings without the instance root' do
         
     | 
| 
      
 157 
     | 
    
         
            +
                        Settings.load!
         
     | 
| 
      
 158 
     | 
    
         
            +
                        expect(Settings.to_hash).to eq expected
         
     | 
| 
      
 159 
     | 
    
         
            +
                      end
         
     | 
| 
       150 
160 
     | 
    
         
             
                    end
         
     | 
| 
       151 
161 
     | 
    
         | 
| 
       152 
162 
     | 
    
         
             
                    context 'and it is not valid' do
         
     | 
| 
         @@ -168,6 +178,11 @@ CONTENT 
     | 
|
| 
       168 
178 
     | 
    
         
             
                        Settings.load!
         
     | 
| 
       169 
179 
     | 
    
         
             
                        expect(Settings.instance.secret).to eq 'value'
         
     | 
| 
       170 
180 
     | 
    
         
             
                      end
         
     | 
| 
      
 181 
     | 
    
         
            +
             
     | 
| 
      
 182 
     | 
    
         
            +
                      it 'provides access to all settings without the instance root' do
         
     | 
| 
      
 183 
     | 
    
         
            +
                        Settings.load!
         
     | 
| 
      
 184 
     | 
    
         
            +
                        expect(Settings.secret).to eq 'value'
         
     | 
| 
      
 185 
     | 
    
         
            +
                      end
         
     | 
| 
       171 
186 
     | 
    
         
             
                    end
         
     | 
| 
       172 
187 
     | 
    
         | 
| 
       173 
188 
     | 
    
         
             
                    context 'and the environment variable is not present' do
         
     | 
| 
         @@ -177,6 +192,11 @@ CONTENT 
     | 
|
| 
       177 
192 
     | 
    
         
             
                        Settings.load!
         
     | 
| 
       178 
193 
     | 
    
         
             
                        expect(Settings.instance.secret).to be_nil
         
     | 
| 
       179 
194 
     | 
    
         
             
                      end
         
     | 
| 
      
 195 
     | 
    
         
            +
             
     | 
| 
      
 196 
     | 
    
         
            +
                      it 'provides acccess to all settings without the instance root' do
         
     | 
| 
      
 197 
     | 
    
         
            +
                        Settings.load!
         
     | 
| 
      
 198 
     | 
    
         
            +
                        expect(Settings.secret).to be_nil
         
     | 
| 
      
 199 
     | 
    
         
            +
                      end
         
     | 
| 
       180 
200 
     | 
    
         
             
                    end
         
     | 
| 
       181 
201 
     | 
    
         
             
                  end
         
     | 
| 
       182 
202 
     | 
    
         
             
                end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: chamber
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.4
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - stevenhallen
         
     | 
| 
         @@ -81,6 +81,20 @@ dependencies: 
     | 
|
| 
       81 
81 
     | 
    
         
             
                - - ~>
         
     | 
| 
       82 
82 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       83 
83 
     | 
    
         
             
                    version: '0.7'
         
     | 
| 
      
 84 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 85 
     | 
    
         
            +
              name: pry
         
     | 
| 
      
 86 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 87 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 88 
     | 
    
         
            +
                - - '>='
         
     | 
| 
      
 89 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 90 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 91 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 92 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 93 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 94 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 95 
     | 
    
         
            +
                - - '>='
         
     | 
| 
      
 96 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 97 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       84 
98 
     | 
    
         
             
            description: |
         
     | 
| 
       85 
99 
     | 
    
         
             
              Chamber lets you source your Settings from an arbitrary number
         
     | 
| 
       86 
100 
     | 
    
         
             
              of YAML files and provides a simple mechanism for overriding
         
     |