yard-sketchup 1.1.2 → 1.1.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 +5 -5
 - data/lib/yard-sketchup/templates/default/fulldoc/html/setup.rb +2 -2
 - data/lib/yard-sketchup/templates/rubocop-changelog/fulldoc/text/setup.rb +75 -75
 - data/lib/yard-sketchup/version.rb +1 -1
 - data/lib/yard-sketchup/yard/handlers/class_constants.rb +17 -17
 - data/lib/yard-sketchup/yard/handlers/class_enum_constants.rb +17 -17
 - data/lib/yard-sketchup/yard/handlers/global_constants.rb +19 -19
 - data/lib/yard-sketchup/yard/logger.rb +45 -45
 - metadata +3 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 2 
     | 
    
         
            +
            SHA1:
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: d9832e92bdd586dc79f49e7dbec3dad3b74395c9
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: f31b6781f50c0f1ccce2d2095489f794198802a9
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 8b6813170aab3317b6a8a0129c41409e953250bfce5cb677b6c6f9f6affea2cb4d1989aaad8ccc1665bdbeacb9e6f56b584680c674606407d6af925b9a502352
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: c212828332ba248e175054d8db0e4e2f6104543463b34064445663f574a34942c0f86c55a14dc1238ef1f7fd1a371fd016b5706c1ccc97927793fff143a2d99b
         
     | 
| 
         @@ -4,8 +4,8 @@ 
     | 
|
| 
       4 
4 
     | 
    
         
             
            # same relative path as the source for the target path.
         
     | 
| 
       5 
5 
     | 
    
         
             
            def copy(source, target = nil)
         
     | 
| 
       6 
6 
     | 
    
         
             
              path = self.class.find_file(source)
         
     | 
| 
       7 
     | 
    
         
            -
              puts "copy(#{source}, #{target})"
         
     | 
| 
       8 
     | 
    
         
            -
              puts "> path: #{path}"
         
     | 
| 
      
 7 
     | 
    
         
            +
              # puts "copy(#{source}, #{target})"
         
     | 
| 
      
 8 
     | 
    
         
            +
              # puts "> path: #{path}"
         
     | 
| 
       9 
9 
     | 
    
         
             
              raise ArgumentError, "no file for '#{source}' in #{self.class.path}" unless path
         
     | 
| 
       10 
10 
     | 
    
         
             
              target ||= source
         
     | 
| 
       11 
11 
     | 
    
         
             
              asset(target, File.binread(path))
         
     | 
| 
         @@ -1,75 +1,75 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require 'fileutils'
         
     | 
| 
       2 
     | 
    
         
            -
            require 'set'
         
     | 
| 
       3 
     | 
    
         
            -
            require 'stringio'
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
            include Helpers::ModuleHelper
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
            def init
         
     | 
| 
       8 
     | 
    
         
            -
              generate_changelog
         
     | 
| 
       9 
     | 
    
         
            -
            end
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
            def all_objects
         
     | 
| 
       13 
     | 
    
         
            -
              run_verifier(Registry.all())
         
     | 
| 
       14 
     | 
    
         
            -
            end
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
            def namespace_objects
         
     | 
| 
       17 
     | 
    
         
            -
              run_verifier(Registry.all(:class, :module))
         
     | 
| 
       18 
     | 
    
         
            -
            end
         
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
            def changelog_filename
         
     | 
| 
       22 
     | 
    
         
            -
              'Changelog SU201x.log'
         
     | 
| 
       23 
     | 
    
         
            -
            end
         
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
            VERSION_MATCH = /^\D+([0-9.]+)(?:\s+M(\d+))?$/
         
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
            def generate_changelog
         
     | 
| 
       28 
     | 
    
         
            -
              output = StringIO.new
         
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
              versions = Hash.new
         
     | 
| 
       31 
     | 
    
         
            -
              all_objects.each { |object|
         
     | 
| 
       32 
     | 
    
         
            -
                version_tag = object.tag(:version)
         
     | 
| 
       33 
     | 
    
         
            -
                next if version_tag.nil?
         
     | 
| 
       34 
     | 
    
         
            -
                version = version_tag.text
         
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
       36 
     | 
    
         
            -
                # Don't list SU6 or older.
         
     | 
| 
       37 
     | 
    
         
            -
                next if version.match(VERSION_MATCH).captures[0].to_i <= 6
         
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
                versions[version] ||= {}
         
     | 
| 
       40 
     | 
    
         
            -
                versions[version][object.type] ||= []
         
     | 
| 
       41 
     | 
    
         
            -
                versions[version][object.type] << object.path
         
     | 
| 
       42 
     | 
    
         
            -
              }
         
     | 
| 
       43 
     | 
    
         
            -
              versions = versions.sort { |a, b|
         
     | 
| 
       44 
     | 
    
         
            -
                v1, mv1 = a[0].match(VERSION_MATCH).captures
         
     | 
| 
       45 
     | 
    
         
            -
                v2, mv2 = b[0].match(VERSION_MATCH).captures
         
     | 
| 
       46 
     | 
    
         
            -
                if v1 == v2
         
     | 
| 
       47 
     | 
    
         
            -
                  (mv2 || '0').to_i <=> (mv1 || '0').to_i
         
     | 
| 
       48 
     | 
    
         
            -
                else
         
     | 
| 
       49 
     | 
    
         
            -
                  v2.to_f <=> v1.to_f
         
     | 
| 
       50 
     | 
    
         
            -
                end
         
     | 
| 
       51 
     | 
    
         
            -
              }
         
     | 
| 
       52 
     | 
    
         
            -
             
     | 
| 
       53 
     | 
    
         
            -
              output.puts "FEATURES = ["
         
     | 
| 
       54 
     | 
    
         
            -
              versions.each { |version, features|
         
     | 
| 
       55 
     | 
    
         
            -
                output.puts ""
         
     | 
| 
       56 
     | 
    
         
            -
                output.puts "  {"
         
     | 
| 
       57 
     | 
    
         
            -
                output.puts "    version: '#{version}',"
         
     | 
| 
       58 
     | 
    
         
            -
                output.puts "    types: {"
         
     | 
| 
       59 
     | 
    
         
            -
                features.sort.each { |type, objects|
         
     | 
| 
       60 
     | 
    
         
            -
                  unless objects.empty?
         
     | 
| 
       61 
     | 
    
         
            -
                    output.puts "      #{type}: ["
         
     | 
| 
       62 
     | 
    
         
            -
                    objects.sort.each { |object|
         
     | 
| 
       63 
     | 
    
         
            -
                      output.puts "        '#{object}',"
         
     | 
| 
       64 
     | 
    
         
            -
                    }
         
     | 
| 
       65 
     | 
    
         
            -
                    output.puts "      ],"
         
     | 
| 
       66 
     | 
    
         
            -
                  end
         
     | 
| 
       67 
     | 
    
         
            -
                }
         
     | 
| 
       68 
     | 
    
         
            -
                output.puts "    },"
         
     | 
| 
       69 
     | 
    
         
            -
                output.puts "  },"
         
     | 
| 
       70 
     | 
    
         
            -
              }
         
     | 
| 
       71 
     | 
    
         
            -
              output.puts "]"
         
     | 
| 
       72 
     | 
    
         
            -
             
     | 
| 
       73 
     | 
    
         
            -
              puts output.string
         
     | 
| 
       74 
     | 
    
         
            -
              exit # Avoid the YARD summary
         
     | 
| 
       75 
     | 
    
         
            -
            end
         
     | 
| 
      
 1 
     | 
    
         
            +
            require 'fileutils'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'set'
         
     | 
| 
      
 3 
     | 
    
         
            +
            require 'stringio'
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            include Helpers::ModuleHelper
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            def init
         
     | 
| 
      
 8 
     | 
    
         
            +
              generate_changelog
         
     | 
| 
      
 9 
     | 
    
         
            +
            end
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            def all_objects
         
     | 
| 
      
 13 
     | 
    
         
            +
              run_verifier(Registry.all())
         
     | 
| 
      
 14 
     | 
    
         
            +
            end
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            def namespace_objects
         
     | 
| 
      
 17 
     | 
    
         
            +
              run_verifier(Registry.all(:class, :module))
         
     | 
| 
      
 18 
     | 
    
         
            +
            end
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
            def changelog_filename
         
     | 
| 
      
 22 
     | 
    
         
            +
              'Changelog SU201x.log'
         
     | 
| 
      
 23 
     | 
    
         
            +
            end
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
            VERSION_MATCH = /^\D+([0-9.]+)(?:\s+M(\d+))?$/
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
            def generate_changelog
         
     | 
| 
      
 28 
     | 
    
         
            +
              output = StringIO.new
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
              versions = Hash.new
         
     | 
| 
      
 31 
     | 
    
         
            +
              all_objects.each { |object|
         
     | 
| 
      
 32 
     | 
    
         
            +
                version_tag = object.tag(:version)
         
     | 
| 
      
 33 
     | 
    
         
            +
                next if version_tag.nil?
         
     | 
| 
      
 34 
     | 
    
         
            +
                version = version_tag.text
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
                # Don't list SU6 or older.
         
     | 
| 
      
 37 
     | 
    
         
            +
                next if version.match(VERSION_MATCH).captures[0].to_i <= 6
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
                versions[version] ||= {}
         
     | 
| 
      
 40 
     | 
    
         
            +
                versions[version][object.type] ||= []
         
     | 
| 
      
 41 
     | 
    
         
            +
                versions[version][object.type] << object.path
         
     | 
| 
      
 42 
     | 
    
         
            +
              }
         
     | 
| 
      
 43 
     | 
    
         
            +
              versions = versions.sort { |a, b|
         
     | 
| 
      
 44 
     | 
    
         
            +
                v1, mv1 = a[0].match(VERSION_MATCH).captures
         
     | 
| 
      
 45 
     | 
    
         
            +
                v2, mv2 = b[0].match(VERSION_MATCH).captures
         
     | 
| 
      
 46 
     | 
    
         
            +
                if v1 == v2
         
     | 
| 
      
 47 
     | 
    
         
            +
                  (mv2 || '0').to_i <=> (mv1 || '0').to_i
         
     | 
| 
      
 48 
     | 
    
         
            +
                else
         
     | 
| 
      
 49 
     | 
    
         
            +
                  v2.to_f <=> v1.to_f
         
     | 
| 
      
 50 
     | 
    
         
            +
                end
         
     | 
| 
      
 51 
     | 
    
         
            +
              }
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
              output.puts "FEATURES = ["
         
     | 
| 
      
 54 
     | 
    
         
            +
              versions.each { |version, features|
         
     | 
| 
      
 55 
     | 
    
         
            +
                output.puts ""
         
     | 
| 
      
 56 
     | 
    
         
            +
                output.puts "  {"
         
     | 
| 
      
 57 
     | 
    
         
            +
                output.puts "    version: '#{version}',"
         
     | 
| 
      
 58 
     | 
    
         
            +
                output.puts "    types: {"
         
     | 
| 
      
 59 
     | 
    
         
            +
                features.sort.each { |type, objects|
         
     | 
| 
      
 60 
     | 
    
         
            +
                  unless objects.empty?
         
     | 
| 
      
 61 
     | 
    
         
            +
                    output.puts "      #{type}: ["
         
     | 
| 
      
 62 
     | 
    
         
            +
                    objects.sort.each { |object|
         
     | 
| 
      
 63 
     | 
    
         
            +
                      output.puts "        '#{object}',"
         
     | 
| 
      
 64 
     | 
    
         
            +
                    }
         
     | 
| 
      
 65 
     | 
    
         
            +
                    output.puts "      ],"
         
     | 
| 
      
 66 
     | 
    
         
            +
                  end
         
     | 
| 
      
 67 
     | 
    
         
            +
                }
         
     | 
| 
      
 68 
     | 
    
         
            +
                output.puts "    },"
         
     | 
| 
      
 69 
     | 
    
         
            +
                output.puts "  },"
         
     | 
| 
      
 70 
     | 
    
         
            +
              }
         
     | 
| 
      
 71 
     | 
    
         
            +
              output.puts "]"
         
     | 
| 
      
 72 
     | 
    
         
            +
             
     | 
| 
      
 73 
     | 
    
         
            +
              puts output.string
         
     | 
| 
      
 74 
     | 
    
         
            +
              exit # Avoid the YARD summary
         
     | 
| 
      
 75 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -1,17 +1,17 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            module SketchUpYARD
         
     | 
| 
       2 
     | 
    
         
            -
              class ClassConstantHandler < YARD::Handlers::C::Base
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
                MATCH = %r{\bDEFINE_RUBY_CLASS_CONSTANT\s*\(([^,]+)\s*,\s*([^,]+)\s*,\s*(\w+)\s*\)\s*;}xm
         
     | 
| 
       5 
     | 
    
         
            -
                handles MATCH
         
     | 
| 
       6 
     | 
    
         
            -
                statement_class BodyStatement
         
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
                process do
         
     | 
| 
       9 
     | 
    
         
            -
                  statement.source.scan(MATCH) do |klass_name, value, const_name|
         
     | 
| 
       10 
     | 
    
         
            -
                    type = "const"
         
     | 
| 
       11 
     | 
    
         
            -
                    value = "nil"
         
     | 
| 
       12 
     | 
    
         
            -
                    handle_constants(type, klass_name, const_name, value)
         
     | 
| 
       13 
     | 
    
         
            -
                  end
         
     | 
| 
       14 
     | 
    
         
            -
                end
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
              end
         
     | 
| 
       17 
     | 
    
         
            -
            end
         
     | 
| 
      
 1 
     | 
    
         
            +
            module SketchUpYARD
         
     | 
| 
      
 2 
     | 
    
         
            +
              class ClassConstantHandler < YARD::Handlers::C::Base
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
                MATCH = %r{\bDEFINE_RUBY_CLASS_CONSTANT\s*\(([^,]+)\s*,\s*([^,]+)\s*,\s*(\w+)\s*\)\s*;}xm
         
     | 
| 
      
 5 
     | 
    
         
            +
                handles MATCH
         
     | 
| 
      
 6 
     | 
    
         
            +
                statement_class BodyStatement
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                process do
         
     | 
| 
      
 9 
     | 
    
         
            +
                  statement.source.scan(MATCH) do |klass_name, value, const_name|
         
     | 
| 
      
 10 
     | 
    
         
            +
                    type = "const"
         
     | 
| 
      
 11 
     | 
    
         
            +
                    value = "nil"
         
     | 
| 
      
 12 
     | 
    
         
            +
                    handle_constants(type, klass_name, const_name, value)
         
     | 
| 
      
 13 
     | 
    
         
            +
                  end
         
     | 
| 
      
 14 
     | 
    
         
            +
                end
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
              end
         
     | 
| 
      
 17 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -1,17 +1,17 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            module SketchUpYARD
         
     | 
| 
       2 
     | 
    
         
            -
              class ClassEnumConstantHandler < YARD::Handlers::C::Base
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
                MATCH = %r{\bDEFINE_RUBY_CLASS_ENUM\s*\(([^,]+)\s*,\s*(\w+)\s*\)\s*;}xm
         
     | 
| 
       5 
     | 
    
         
            -
                handles MATCH
         
     | 
| 
       6 
     | 
    
         
            -
                statement_class BodyStatement
         
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
                process do
         
     | 
| 
       9 
     | 
    
         
            -
                  statement.source.scan(MATCH) do |klass_name, const_name|
         
     | 
| 
       10 
     | 
    
         
            -
                    type = "const"
         
     | 
| 
       11 
     | 
    
         
            -
                    value = "nil"
         
     | 
| 
       12 
     | 
    
         
            -
                    handle_constants(type, klass_name, const_name, value)
         
     | 
| 
       13 
     | 
    
         
            -
                  end
         
     | 
| 
       14 
     | 
    
         
            -
                end
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
              end
         
     | 
| 
       17 
     | 
    
         
            -
            end
         
     | 
| 
      
 1 
     | 
    
         
            +
            module SketchUpYARD
         
     | 
| 
      
 2 
     | 
    
         
            +
              class ClassEnumConstantHandler < YARD::Handlers::C::Base
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
                MATCH = %r{\bDEFINE_RUBY_CLASS_ENUM\s*\(([^,]+)\s*,\s*(\w+)\s*\)\s*;}xm
         
     | 
| 
      
 5 
     | 
    
         
            +
                handles MATCH
         
     | 
| 
      
 6 
     | 
    
         
            +
                statement_class BodyStatement
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                process do
         
     | 
| 
      
 9 
     | 
    
         
            +
                  statement.source.scan(MATCH) do |klass_name, const_name|
         
     | 
| 
      
 10 
     | 
    
         
            +
                    type = "const"
         
     | 
| 
      
 11 
     | 
    
         
            +
                    value = "nil"
         
     | 
| 
      
 12 
     | 
    
         
            +
                    handle_constants(type, klass_name, const_name, value)
         
     | 
| 
      
 13 
     | 
    
         
            +
                  end
         
     | 
| 
      
 14 
     | 
    
         
            +
                end
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
              end
         
     | 
| 
      
 17 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -1,19 +1,19 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            module SketchUpYARD
         
     | 
| 
       2 
     | 
    
         
            -
              class GlobalConstantHandler < YARD::Handlers::C::Base
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
                MATCH = %r{\bDEFINE_RUBY_(?:(?:NAMED_)?CONSTANT|ENUM)\s*\((?:[^)]+,\s*)?(\w+)\)\s*;}xm
         
     | 
| 
       5 
     | 
    
         
            -
                handles MATCH
         
     | 
| 
       6 
     | 
    
         
            -
                statement_class BodyStatement
         
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
                process do
         
     | 
| 
       9 
     | 
    
         
            -
                  statement.source.scan(MATCH) do |captures|
         
     | 
| 
       10 
     | 
    
         
            -
                    const_name = captures.first
         
     | 
| 
       11 
     | 
    
         
            -
                    type = "global_const"
         
     | 
| 
       12 
     | 
    
         
            -
                    var_name = nil
         
     | 
| 
       13 
     | 
    
         
            -
                    value = "nil"
         
     | 
| 
       14 
     | 
    
         
            -
                    handle_constants(type, var_name, const_name, value)
         
     | 
| 
       15 
     | 
    
         
            -
                  end
         
     | 
| 
       16 
     | 
    
         
            -
                end
         
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
              end
         
     | 
| 
       19 
     | 
    
         
            -
            end
         
     | 
| 
      
 1 
     | 
    
         
            +
            module SketchUpYARD
         
     | 
| 
      
 2 
     | 
    
         
            +
              class GlobalConstantHandler < YARD::Handlers::C::Base
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
                MATCH = %r{\bDEFINE_RUBY_(?:(?:NAMED_)?CONSTANT|ENUM)\s*\((?:[^)]+,\s*)?(\w+)\)\s*;}xm
         
     | 
| 
      
 5 
     | 
    
         
            +
                handles MATCH
         
     | 
| 
      
 6 
     | 
    
         
            +
                statement_class BodyStatement
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                process do
         
     | 
| 
      
 9 
     | 
    
         
            +
                  statement.source.scan(MATCH) do |captures|
         
     | 
| 
      
 10 
     | 
    
         
            +
                    const_name = captures.first
         
     | 
| 
      
 11 
     | 
    
         
            +
                    type = "global_const"
         
     | 
| 
      
 12 
     | 
    
         
            +
                    var_name = nil
         
     | 
| 
      
 13 
     | 
    
         
            +
                    value = "nil"
         
     | 
| 
      
 14 
     | 
    
         
            +
                    handle_constants(type, var_name, const_name, value)
         
     | 
| 
      
 15 
     | 
    
         
            +
                  end
         
     | 
| 
      
 16 
     | 
    
         
            +
                end
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
              end
         
     | 
| 
      
 19 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -1,45 +1,45 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require 'yard/logging'
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            # Hack to show some progress on Windows while building the docs.
         
     | 
| 
       4 
     | 
    
         
            -
            # Helpful in seeing what takes most time.
         
     | 
| 
       5 
     | 
    
         
            -
            # It's Copy+Paste from YARD 0.9.9 with some noted edits.
         
     | 
| 
       6 
     | 
    
         
            -
            module YARD
         
     | 
| 
       7 
     | 
    
         
            -
              class Logger < ::Logger
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
                def show_progress
         
     | 
| 
       10 
     | 
    
         
            -
                  return false if YARD.ruby18? # threading is too ineffective for progress support
         
     | 
| 
       11 
     | 
    
         
            -
                  # <hack>
         
     | 
| 
       12 
     | 
    
         
            -
                  # return false if YARD.windows? # windows has poor ANSI support
         
     | 
| 
       13 
     | 
    
         
            -
                  # </hack>
         
     | 
| 
       14 
     | 
    
         
            -
                  return false unless io.tty? # no TTY support on IO
         
     | 
| 
       15 
     | 
    
         
            -
                  return false unless level > INFO # no progress in verbose/debug modes
         
     | 
| 
       16 
     | 
    
         
            -
                  @show_progress
         
     | 
| 
       17 
     | 
    
         
            -
                end
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
                def progress(msg, nontty_log = :debug)
         
     | 
| 
       20 
     | 
    
         
            -
                  send(nontty_log, msg) if nontty_log
         
     | 
| 
       21 
     | 
    
         
            -
                  return unless show_progress
         
     | 
| 
       22 
     | 
    
         
            -
                  icon = ""
         
     | 
| 
       23 
     | 
    
         
            -
                  if defined?(::Encoding)
         
     | 
| 
       24 
     | 
    
         
            -
                    icon = PROGRESS_INDICATORS[@progress_indicator] + " "
         
     | 
| 
       25 
     | 
    
         
            -
                  end
         
     | 
| 
       26 
     | 
    
         
            -
                  @mutex.synchronize do
         
     | 
| 
       27 
     | 
    
         
            -
                    print("\e[2K\e[?25l\e[1m#{icon}#{msg}\e[0m\r")
         
     | 
| 
       28 
     | 
    
         
            -
                    @progress_msg = msg
         
     | 
| 
       29 
     | 
    
         
            -
                    if Time.now - @progress_last_update > 0.2
         
     | 
| 
       30 
     | 
    
         
            -
                      @progress_indicator += 1
         
     | 
| 
       31 
     | 
    
         
            -
                      @progress_indicator %= PROGRESS_INDICATORS.size
         
     | 
| 
       32 
     | 
    
         
            -
                      @progress_last_update = Time.now
         
     | 
| 
       33 
     | 
    
         
            -
                    end
         
     | 
| 
       34 
     | 
    
         
            -
                  end
         
     | 
| 
       35 
     | 
    
         
            -
                  Thread.new do
         
     | 
| 
       36 
     | 
    
         
            -
                    sleep(0.05)
         
     | 
| 
       37 
     | 
    
         
            -
                    # <hack>
         
     | 
| 
       38 
     | 
    
         
            -
                    # progress(msg + ".", nil) if @progress_msg == msg
         
     | 
| 
       39 
     | 
    
         
            -
                    # </hack>
         
     | 
| 
       40 
     | 
    
         
            -
                    progress(msg, nil) if @progress_msg == msg
         
     | 
| 
       41 
     | 
    
         
            -
                  end
         
     | 
| 
       42 
     | 
    
         
            -
                end
         
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
              end
         
     | 
| 
       45 
     | 
    
         
            -
            end if true # Set to false to disable hack.
         
     | 
| 
      
 1 
     | 
    
         
            +
            require 'yard/logging'
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            # Hack to show some progress on Windows while building the docs.
         
     | 
| 
      
 4 
     | 
    
         
            +
            # Helpful in seeing what takes most time.
         
     | 
| 
      
 5 
     | 
    
         
            +
            # It's Copy+Paste from YARD 0.9.9 with some noted edits.
         
     | 
| 
      
 6 
     | 
    
         
            +
            module YARD
         
     | 
| 
      
 7 
     | 
    
         
            +
              class Logger < ::Logger
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
                def show_progress
         
     | 
| 
      
 10 
     | 
    
         
            +
                  return false if YARD.ruby18? # threading is too ineffective for progress support
         
     | 
| 
      
 11 
     | 
    
         
            +
                  # <hack>
         
     | 
| 
      
 12 
     | 
    
         
            +
                  # return false if YARD.windows? # windows has poor ANSI support
         
     | 
| 
      
 13 
     | 
    
         
            +
                  # </hack>
         
     | 
| 
      
 14 
     | 
    
         
            +
                  return false unless io.tty? # no TTY support on IO
         
     | 
| 
      
 15 
     | 
    
         
            +
                  return false unless level > INFO # no progress in verbose/debug modes
         
     | 
| 
      
 16 
     | 
    
         
            +
                  @show_progress
         
     | 
| 
      
 17 
     | 
    
         
            +
                end
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
                def progress(msg, nontty_log = :debug)
         
     | 
| 
      
 20 
     | 
    
         
            +
                  send(nontty_log, msg) if nontty_log
         
     | 
| 
      
 21 
     | 
    
         
            +
                  return unless show_progress
         
     | 
| 
      
 22 
     | 
    
         
            +
                  icon = ""
         
     | 
| 
      
 23 
     | 
    
         
            +
                  if defined?(::Encoding)
         
     | 
| 
      
 24 
     | 
    
         
            +
                    icon = PROGRESS_INDICATORS[@progress_indicator] + " "
         
     | 
| 
      
 25 
     | 
    
         
            +
                  end
         
     | 
| 
      
 26 
     | 
    
         
            +
                  @mutex.synchronize do
         
     | 
| 
      
 27 
     | 
    
         
            +
                    print("\e[2K\e[?25l\e[1m#{icon}#{msg}\e[0m\r")
         
     | 
| 
      
 28 
     | 
    
         
            +
                    @progress_msg = msg
         
     | 
| 
      
 29 
     | 
    
         
            +
                    if Time.now - @progress_last_update > 0.2
         
     | 
| 
      
 30 
     | 
    
         
            +
                      @progress_indicator += 1
         
     | 
| 
      
 31 
     | 
    
         
            +
                      @progress_indicator %= PROGRESS_INDICATORS.size
         
     | 
| 
      
 32 
     | 
    
         
            +
                      @progress_last_update = Time.now
         
     | 
| 
      
 33 
     | 
    
         
            +
                    end
         
     | 
| 
      
 34 
     | 
    
         
            +
                  end
         
     | 
| 
      
 35 
     | 
    
         
            +
                  Thread.new do
         
     | 
| 
      
 36 
     | 
    
         
            +
                    sleep(0.05)
         
     | 
| 
      
 37 
     | 
    
         
            +
                    # <hack>
         
     | 
| 
      
 38 
     | 
    
         
            +
                    # progress(msg + ".", nil) if @progress_msg == msg
         
     | 
| 
      
 39 
     | 
    
         
            +
                    # </hack>
         
     | 
| 
      
 40 
     | 
    
         
            +
                    progress(msg, nil) if @progress_msg == msg
         
     | 
| 
      
 41 
     | 
    
         
            +
                  end
         
     | 
| 
      
 42 
     | 
    
         
            +
                end
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
              end
         
     | 
| 
      
 45 
     | 
    
         
            +
            end if true # Set to false to disable hack.
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: yard-sketchup
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.1.3
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Trimble Inc, SketchUp Team
         
     | 
| 
         @@ -104,7 +104,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       104 
104 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       105 
105 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       106 
106 
     | 
    
         
             
            requirements: []
         
     | 
| 
       107 
     | 
    
         
            -
             
     | 
| 
      
 107 
     | 
    
         
            +
            rubyforge_project: 
         
     | 
| 
      
 108 
     | 
    
         
            +
            rubygems_version: 2.6.14
         
     | 
| 
       108 
109 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       109 
110 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       110 
111 
     | 
    
         
             
            summary: SketchUp Ruby API YARD template.
         
     |