atheme 0.0.2 → 0.0.3
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 +3 -1
- data/lib/atheme.rb +1 -1
- data/lib/atheme/configuration.rb +3 -9
- data/lib/atheme/version.rb +1 -1
- data/spec/config.yml.example +2 -1
- data/spec/lib/configuration_spec.rb +5 -3
- data/spec/spec_helper.rb +2 -1
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: b15500edb979b29e50bc1cb01f91e5507be129c8
         | 
| 4 | 
            +
              data.tar.gz: 35f5730fa0e94e25971eef9e50f6600834add6ba
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: c7ae6e9f1c3cbfc740d65ffa8300229ad43a18be4d5c443e597d2ba11a1adffa2f1c6a068cf035319305b5fbe91346a5b9b229c82d105d3a376421a5a513c7ee
         | 
| 7 | 
            +
              data.tar.gz: a72b4205d9bf18f369f0465add1310298d81652e1e3407f4c2a999cd1471597f50b3728454a6efec72edc29109dbe63716c39c0610fdca8acd5671bb730e1041
         | 
    
        data/README.md
    CHANGED
    
    | @@ -26,11 +26,13 @@ You need to be using [Atheme IRC Services](http://www.atheme.net) with httpd and | |
| 26 26 |  | 
| 27 27 | 
             
            ```ruby
         | 
| 28 28 | 
             
            Atheme.configure do |config|
         | 
| 29 | 
            -
              config. | 
| 29 | 
            +
              config.hostname = 'example.com'
         | 
| 30 30 | 
             
              config.port = 9876
         | 
| 31 31 | 
             
            end
         | 
| 32 32 | 
             
            ```
         | 
| 33 33 |  | 
| 34 | 
            +
            Optional: `protocol` (default http)
         | 
| 35 | 
            +
             | 
| 34 36 | 
             
            ### Authentication
         | 
| 35 37 |  | 
| 36 38 | 
             
            ```ruby
         | 
    
        data/lib/atheme.rb
    CHANGED
    
    
    
        data/lib/atheme/configuration.rb
    CHANGED
    
    | @@ -1,15 +1,9 @@ | |
| 1 1 | 
             
            module Atheme::Configuration
         | 
| 2 | 
            -
               | 
| 3 | 
            -
             | 
| 4 | 
            -
              attr_accessor *VALID_CONFIG_OPTIONS
         | 
| 2 | 
            +
              attr_accessor :hostname, :port, :protocol
         | 
| 5 3 |  | 
| 6 4 | 
             
              def configure
         | 
| 7 | 
            -
                 | 
| 8 | 
            -
              end
         | 
| 5 | 
            +
                self.protocol ||= 'http'
         | 
| 9 6 |  | 
| 10 | 
            -
             | 
| 11 | 
            -
                VALID_CONFIG_OPTIONS.inject({}) do |option, key|
         | 
| 12 | 
            -
                  option.merge!(key => send(key))
         | 
| 13 | 
            -
                end
         | 
| 7 | 
            +
                yield self
         | 
| 14 8 | 
             
              end
         | 
| 15 9 | 
             
            end
         | 
    
        data/lib/atheme/version.rb
    CHANGED
    
    
    
        data/spec/config.yml.example
    CHANGED
    
    
| @@ -3,11 +3,13 @@ require 'spec_helper' | |
| 3 3 | 
             
            describe Atheme::Configuration do
         | 
| 4 4 | 
             
              it 'should have a port' do
         | 
| 5 5 | 
             
                expect(Atheme.port).to eql atheme_config['port']
         | 
| 6 | 
            -
                expect(Atheme.options[:port]).to eql atheme_config['port']
         | 
| 7 6 | 
             
              end
         | 
| 8 7 |  | 
| 9 8 | 
             
              it 'should have a url' do
         | 
| 10 | 
            -
                expect(Atheme. | 
| 11 | 
            -
             | 
| 9 | 
            +
                expect(Atheme.hostname).to eql atheme_config['hostname']
         | 
| 10 | 
            +
              end
         | 
| 11 | 
            +
             | 
| 12 | 
            +
              it 'should have a protocol' do
         | 
| 13 | 
            +
                expect(Atheme.protocol).to eql atheme_config['protocol']
         | 
| 12 14 | 
             
              end
         | 
| 13 15 | 
             
            end
         | 
    
        data/spec/spec_helper.rb
    CHANGED