sassc 2.1.0-x64-mingw32 → 2.2.0-x64-mingw32
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/CHANGELOG.md +2 -0
 - data/Rakefile +2 -2
 - data/lib/sassc/functions_handler.rb +5 -7
 - data/lib/sassc/script.rb +1 -3
 - data/lib/sassc/version.rb +1 -1
 - data/test/functions_test.rb +20 -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: 50131d2fa80fb17a8254e25a7e4981f6c53c008b6258509d9ed3566e0f383d40
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 8abf9fffd972ea9b49d132a085a5cb00a16e8633858b245957a0f1b7677a39df
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 4d8fc6aa4f0d25e2b7211af6757d6375234a7d8c523f2509941ad8aa2e6ca860c94be1b9ca55425103a6f782e9563bdd68b78f609b2803c7cb0777d30ae8c490
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 6b19babb8cf13f5f2f5051fc540b3832d727e4a92f9e7d5d468be944f7017bd5cc37969e23c31ce49af51227c2f22c9e1c96faf01a0124a967d00dd315352ddb
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        data/Rakefile
    CHANGED
    
    | 
         @@ -18,7 +18,7 @@ Rake::ExtensionTask.new('libsass', gem_spec) do |ext| 
     | 
|
| 
       18 
18 
     | 
    
         
             
              ext.ext_dir = 'ext'
         
     | 
| 
       19 
19 
     | 
    
         
             
              ext.lib_dir = 'lib/sassc'
         
     | 
| 
       20 
20 
     | 
    
         
             
              ext.cross_compile = true
         
     | 
| 
       21 
     | 
    
         
            -
              ext.cross_platform = %w[x86-mingw32 x64-mingw32 
     | 
| 
      
 21 
     | 
    
         
            +
              ext.cross_platform = %w[x86-mingw32 x64-mingw32]
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
       23 
23 
     | 
    
         
             
              # Link C++ stdlib statically when building binary gems.
         
     | 
| 
       24 
24 
     | 
    
         
             
              ext.cross_config_options << '--enable-static-stdlib'
         
     | 
| 
         @@ -38,7 +38,7 @@ task 'gem:native' do 
     | 
|
| 
       38 
38 
     | 
    
         
             
              # Only one version should be specified, as the shared library is Ruby-agnostic.
         
     | 
| 
       39 
39 
     | 
    
         
             
              #
         
     | 
| 
       40 
40 
     | 
    
         
             
              # g++-multilib is installed for 64->32-bit cross-compilation.
         
     | 
| 
       41 
     | 
    
         
            -
              RakeCompilerDock.sh "sudo apt-get install -y g++-multilib &&  
     | 
| 
      
 41 
     | 
    
         
            +
              RakeCompilerDock.sh "sudo apt-get install -y g++-multilib && gem i rake bundler --no-document && bundle && "\
         
     | 
| 
       42 
42 
     | 
    
         
             
                                  "rake clean && rake cross native gem MAKE='nice make -j`nproc`' "\
         
     | 
| 
       43 
43 
     | 
    
         
             
                                  "RUBY_CC_VERSION=2.6.0 CLEAN=1"
         
     | 
| 
       44 
44 
     | 
    
         
             
            end
         
     | 
| 
         @@ -12,7 +12,11 @@ module SassC 
     | 
|
| 
       12 
12 
     | 
    
         | 
| 
       13 
13 
     | 
    
         
             
                  list = Native.make_function_list(Script.custom_functions.count)
         
     | 
| 
       14 
14 
     | 
    
         | 
| 
       15 
     | 
    
         
            -
                   
     | 
| 
      
 15 
     | 
    
         
            +
                  # use an anonymous class wrapper to avoid mutations in a threaded environment
         
     | 
| 
      
 16 
     | 
    
         
            +
                  functions = Class.new do
         
     | 
| 
      
 17 
     | 
    
         
            +
                    attr_accessor :options
         
     | 
| 
      
 18 
     | 
    
         
            +
                    include Script::Functions
         
     | 
| 
      
 19 
     | 
    
         
            +
                  end.new
         
     | 
| 
       16 
20 
     | 
    
         
             
                  functions.options = @options
         
     | 
| 
       17 
21 
     | 
    
         | 
| 
       18 
22 
     | 
    
         
             
                  Script.custom_functions.each_with_index do |custom_function, i|
         
     | 
| 
         @@ -65,11 +69,5 @@ module SassC 
     | 
|
| 
       65 
69 
     | 
    
         
             
                  $stderr.puts "[SassC::FunctionsHandler] #{message}"
         
     | 
| 
       66 
70 
     | 
    
         
             
                  Native.make_error(message)
         
     | 
| 
       67 
71 
     | 
    
         
             
                end
         
     | 
| 
       68 
     | 
    
         
            -
             
     | 
| 
       69 
     | 
    
         
            -
                class FunctionWrapper
         
     | 
| 
       70 
     | 
    
         
            -
                  class << self
         
     | 
| 
       71 
     | 
    
         
            -
                    attr_accessor :options
         
     | 
| 
       72 
     | 
    
         
            -
                  end
         
     | 
| 
       73 
     | 
    
         
            -
                end
         
     | 
| 
       74 
72 
     | 
    
         
             
              end
         
     | 
| 
       75 
73 
     | 
    
         
             
            end
         
     | 
    
        data/lib/sassc/script.rb
    CHANGED
    
    
    
        data/lib/sassc/version.rb
    CHANGED
    
    
    
        data/test/functions_test.rb
    CHANGED
    
    | 
         @@ -185,6 +185,22 @@ module SassC 
     | 
|
| 
       185 
185 
     | 
    
         
             
                  CSS
         
     | 
| 
       186 
186 
     | 
    
         
             
                end
         
     | 
| 
       187 
187 
     | 
    
         | 
| 
      
 188 
     | 
    
         
            +
                def test_concurrency
         
     | 
| 
      
 189 
     | 
    
         
            +
                  10.times do
         
     | 
| 
      
 190 
     | 
    
         
            +
                    threads = []
         
     | 
| 
      
 191 
     | 
    
         
            +
                    10.times do |i|
         
     | 
| 
      
 192 
     | 
    
         
            +
                      threads << Thread.new(i) do |id|
         
     | 
| 
      
 193 
     | 
    
         
            +
                        out = Engine.new("div { url: inspect_options(); }", {test_key1: 'test_value', test_key2: id}).render
         
     | 
| 
      
 194 
     | 
    
         
            +
                        assert_match /test_key1/, out
         
     | 
| 
      
 195 
     | 
    
         
            +
                        assert_match /test_key2/, out
         
     | 
| 
      
 196 
     | 
    
         
            +
                        assert_match /test_value/, out
         
     | 
| 
      
 197 
     | 
    
         
            +
                        assert_match /#{id}/, out
         
     | 
| 
      
 198 
     | 
    
         
            +
                      end
         
     | 
| 
      
 199 
     | 
    
         
            +
                    end
         
     | 
| 
      
 200 
     | 
    
         
            +
                    threads.each(&:join)
         
     | 
| 
      
 201 
     | 
    
         
            +
                  end
         
     | 
| 
      
 202 
     | 
    
         
            +
                end
         
     | 
| 
      
 203 
     | 
    
         
            +
             
     | 
| 
       188 
204 
     | 
    
         
             
                private
         
     | 
| 
       189 
205 
     | 
    
         | 
| 
       190 
206 
     | 
    
         
             
                def assert_sass(sass, expected_css)
         
     | 
| 
         @@ -279,6 +295,10 @@ module SassC 
     | 
|
| 
       279 
295 
     | 
    
         
             
                    return argument
         
     | 
| 
       280 
296 
     | 
    
         
             
                  end
         
     | 
| 
       281 
297 
     | 
    
         | 
| 
      
 298 
     | 
    
         
            +
                  def inspect_options
         
     | 
| 
      
 299 
     | 
    
         
            +
                    SassC::Script::Value::String.new(self.options.inspect, :string)
         
     | 
| 
      
 300 
     | 
    
         
            +
                  end
         
     | 
| 
      
 301 
     | 
    
         
            +
             
     | 
| 
       282 
302 
     | 
    
         
             
                  def returns_sass_value
         
     | 
| 
       283 
303 
     | 
    
         
             
                    return SassC::Script::Value::Color.new(red: 0, green: 0, blue: 0)
         
     | 
| 
       284 
304 
     | 
    
         
             
                  end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: sassc
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 2. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.2.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: x64-mingw32
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Ryan Boland
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2019-08- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2019-08-27 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: minitest
         
     |