dugway 1.3.2 → 1.3.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/lib/dugway/cli/server.rb +3 -1
 - data/lib/dugway/theme.rb +1 -1
 - data/lib/dugway/version.rb +1 -1
 - data/spec/units/dugway/theme_spec.rb +16 -0
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: a5d2312c447465c6aff5ea742614d8ceeb34047fa36ebe5cfcaea8ee017794d5
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 2d0d9cdea5b3d8e99a1f37e9d99b7fab6d106dc6791cec4529573da3217e5c75
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: efd14320f6ca5c8b3a691adc371e6ef678467ea3cdc5cd0164f166de04549c3c5c45fb68cd19ec2cccd307ad56f09605f7b317e659b6dca556f14a03670cda0c
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: b19554612dfb5a8701f05d865048f2c18c0698eadfffa45075f72aa56aa476f80f6aacb292d7f45a27af9dad89dd19b41627cab7860682beef6506010f013005
         
     | 
    
        data/lib/dugway/cli/server.rb
    CHANGED
    
    | 
         @@ -36,7 +36,9 @@ module Dugway 
     | 
|
| 
       36 
36 
     | 
    
         | 
| 
       37 
37 
     | 
    
         
             
                    listener = Listen.to('.', only: /\.(css|html|jpg|js|json|png|sass|svg)$/) do |modified|
         
     | 
| 
       38 
38 
     | 
    
         
             
                      puts "Theme files changed, restarting server..."
         
     | 
| 
       39 
     | 
    
         
            -
                       
     | 
| 
      
 39 
     | 
    
         
            +
                      args = [RbConfig.ruby, '-S', 'dugway', 'server', '--host', options[:host], '--port', options[:port].to_s, '--server', options[:server]]
         
     | 
| 
      
 40 
     | 
    
         
            +
                      args << '--suppress_warnings' if options[:suppress_warnings]
         
     | 
| 
      
 41 
     | 
    
         
            +
                      exec(*args)
         
     | 
| 
       40 
42 
     | 
    
         
             
                    end
         
     | 
| 
       41 
43 
     | 
    
         | 
| 
       42 
44 
     | 
    
         
             
                    Thread.new { listener.start }
         
     | 
    
        data/lib/dugway/theme.rb
    CHANGED
    
    | 
         @@ -241,7 +241,7 @@ module Dugway 
     | 
|
| 
       241 
241 
     | 
    
         | 
| 
       242 
242 
     | 
    
         
             
                    if style['colors'].is_a?(Hash) && !style['colors'].empty?
         
     | 
| 
       243 
243 
     | 
    
         
             
                      style['colors'].each do |key, color|
         
     | 
| 
       244 
     | 
    
         
            -
                        unless color =~  
     | 
| 
      
 244 
     | 
    
         
            +
                        unless color =~ /^(#[0-9A-Fa-f]{6}|transparent)$/
         
     | 
| 
       245 
245 
     | 
    
         
             
                          @errors << "Style '#{style['style_name']}' - Invalid color value '#{color}' for color '#{key}'"
         
     | 
| 
       246 
246 
     | 
    
         
             
                        end
         
     | 
| 
       247 
247 
     | 
    
         
             
                      end
         
     | 
    
        data/lib/dugway/version.rb
    CHANGED
    
    
| 
         @@ -370,6 +370,22 @@ describe Dugway::Theme do 
     | 
|
| 
       370 
370 
     | 
    
         
             
                    theme.valid?.should be(false)
         
     | 
| 
       371 
371 
     | 
    
         
             
                    theme.errors.should include('Style in group \'Classic\' - Missing style_name')
         
     | 
| 
       372 
372 
     | 
    
         
             
                  end
         
     | 
| 
      
 373 
     | 
    
         
            +
             
     | 
| 
      
 374 
     | 
    
         
            +
                  it "allows transparent as a valid color value" do
         
     | 
| 
      
 375 
     | 
    
         
            +
                    settings = valid_settings.dup
         
     | 
| 
      
 376 
     | 
    
         
            +
                    settings['preset_styles']['presets'].first['styles'].first['colors']['background_color'] = 'transparent'
         
     | 
| 
      
 377 
     | 
    
         
            +
                    theme.stub(:settings) { settings }
         
     | 
| 
      
 378 
     | 
    
         
            +
                    theme.valid?.should be(true)
         
     | 
| 
      
 379 
     | 
    
         
            +
                    theme.errors.should be_empty
         
     | 
| 
      
 380 
     | 
    
         
            +
                  end
         
     | 
| 
      
 381 
     | 
    
         
            +
             
     | 
| 
      
 382 
     | 
    
         
            +
                  it "rejects invalid color values" do
         
     | 
| 
      
 383 
     | 
    
         
            +
                    settings = valid_settings.dup
         
     | 
| 
      
 384 
     | 
    
         
            +
                    settings['preset_styles']['presets'].first['styles'].first['colors']['background_color'] = 'not-a-color'
         
     | 
| 
      
 385 
     | 
    
         
            +
                    theme.stub(:settings) { settings }
         
     | 
| 
      
 386 
     | 
    
         
            +
                    theme.valid?.should be(false)
         
     | 
| 
      
 387 
     | 
    
         
            +
                    theme.errors.should include("Style 'Style 1' - Invalid color value 'not-a-color' for color 'background_color'")
         
     | 
| 
      
 388 
     | 
    
         
            +
                  end
         
     | 
| 
       373 
389 
     | 
    
         
             
                end
         
     | 
| 
       374 
390 
     | 
    
         | 
| 
       375 
391 
     | 
    
         
             
                describe "when missing option descriptions" do
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: dugway
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.3. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.3.3
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Big Cartel
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2025- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2025-10-24 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bundler
         
     |