raykit 0.0.480 → 0.0.482
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/raykit/auto_setup.rb +7 -0
- data/lib/raykit/dotnet.rb +14 -0
- data/lib/raykit.rb +9 -0
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: c7242bf345254ae86d2bf903482d8f376fe46aca309b39a572849384ad0ca59d
         | 
| 4 | 
            +
              data.tar.gz: 0a7085d7c8d65cbbe80c197484ae32642c96f52875da3ca69fe59ef75da58c86
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: a68d599c33e43c2037de2658efcaa177ab1c88d3382f3d402ce635ee9389c4f45d99c623d63de7aec9d819612997e1a88dc9353ea0b9001e824e760819ae17df
         | 
| 7 | 
            +
              data.tar.gz: a779f389b267e5efaff5ccd56a6baf11154fcbd444486c9ea901df0fbbbc7c7bbec4dbd0cc8a3a4def00a7a25acda596e7cdc967d8699117977a6eee37b4f28b
         | 
    
        data/lib/raykit/auto_setup.rb
    CHANGED
    
    | @@ -31,6 +31,13 @@ module Raykit | |
| 31 31 | 
             
                      Raykit::DotNet::initialize_csharp_blazorserver app
         | 
| 32 32 | 
             
                    end
         | 
| 33 33 | 
             
                  end
         | 
| 34 | 
            +
             | 
| 35 | 
            +
                  # Blazor server example apps
         | 
| 36 | 
            +
                  if (defined?(RAYKIT_BLAZORSERVER_EXAMPLE_APPS))
         | 
| 37 | 
            +
                    RAYKIT_BLAZORSERVERAPPS.each do |app|
         | 
| 38 | 
            +
                      Raykit::DotNet::initialize_csharp_blazorserver_example app
         | 
| 39 | 
            +
                    end
         | 
| 40 | 
            +
                  end
         | 
| 34 41 | 
             
                end
         | 
| 35 42 | 
             
              end # class AutoSetup
         | 
| 36 43 | 
             
            end # module Raykit
         | 
    
        data/lib/raykit/dotnet.rb
    CHANGED
    
    | @@ -145,6 +145,20 @@ module Raykit | |
| 145 145 | 
             
                  end
         | 
| 146 146 | 
             
                end
         | 
| 147 147 |  | 
| 148 | 
            +
                # initialize a C# blazor server example application
         | 
| 149 | 
            +
                def self.initialize_csharp_blazorserver_example(name)
         | 
| 150 | 
            +
                  # create the solution
         | 
| 151 | 
            +
                  puts "  creating #{name}.sln" unless File.exist?("#{name}.sln")
         | 
| 152 | 
            +
                  # create the blazor server application
         | 
| 153 | 
            +
                  puts "  creating examples/#{name}/#{name}.csproj" unless File.exist?("examples/#{name}/#{name}.csproj")
         | 
| 154 | 
            +
                  PROJECT.run("dotnet new blazorserver -lang C# --name #{name} --output examples/#{name}") unless File.exist?("examples/#{name}/#{name}.csproj")
         | 
| 155 | 
            +
                  PROJECT.run("dotnet sln #{name}.sln add examples/#{name}/#{name}.csproj") unless File.exist?("examples/#{name}/#{name}.csproj")
         | 
| 156 | 
            +
                  # generate project folders
         | 
| 157 | 
            +
                  ["Interfaces", "Extensions", "Models", "Components", "Controllers"].each do |folder|
         | 
| 158 | 
            +
                    FileUtils.mkdir_p("examples/#{name}/#{folder}") unless Dir.exist?("examples/#{name}/#{folder}")
         | 
| 159 | 
            +
                  end
         | 
| 160 | 
            +
                end
         | 
| 161 | 
            +
             | 
| 148 162 | 
             
                def self.get_package_names(filename)
         | 
| 149 163 | 
             
                  package_names = []
         | 
| 150 164 | 
             
                  if File.exist?(filename) && filename.include?(".csproj")
         | 
    
        data/lib/raykit.rb
    CHANGED
    
    | @@ -35,6 +35,15 @@ Raykit::MsBuild::fix_msbuild_path | |
| 35 35 |  | 
| 36 36 | 
             
            Raykit::AutoSetup.run if RAYKIT_AUTO_SETUP
         | 
| 37 37 |  | 
| 38 | 
            +
            def backup_git_directory
         | 
| 39 | 
            +
              if ENV["GIT_BACKUP_DIR"] && !ENV["GIT_BACKUP_DIR"].empty?
         | 
| 40 | 
            +
                puts "Backing up #{GIT_DIRECTORY.repository.url}"
         | 
| 41 | 
            +
                Raykit::Git::Repository::backup GIT_DIRECTORY.repository.url, "#{ENV["GIT_BACKUP_DIR"]}/#{GIT_DIRECTORY.repository.relative_path}"
         | 
| 42 | 
            +
              else
         | 
| 43 | 
            +
                puts "Environment variable GIT_BACKUP_DIR is not set"
         | 
| 44 | 
            +
              end
         | 
| 45 | 
            +
            end
         | 
| 46 | 
            +
             | 
| 38 47 | 
             
            # include Raykit::TopLevel to make run method accessible from the global scope
         | 
| 39 48 | 
             
            module Raykit
         | 
| 40 49 | 
             
              module TopLevel
         |