raykit 0.0.546 → 0.0.548
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/environment.rb +18 -1
- data/lib/raykit/tasks.rb +30 -0
- data/lib/raykit/version.rb +5 -0
- data/lib/raykit.rb +2 -2
- metadata +16 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 827f37857b30a00dd66ef88b708fdaad9f4fbbd531a44a58dac5f23672839177
         | 
| 4 | 
            +
              data.tar.gz: 2295cd0368ff1844e12cf7d1353622c2ca07c7768c9fa043fdce1d5c3608d0fc
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: e6b967d1d07e609b11435b2e347ca44b7ff1f7961b9c7928b6713404c7dec2319c4beaadfd4d493b855735654e9baee2e67fbf5907babe1434785e36ef57f557
         | 
| 7 | 
            +
              data.tar.gz: a18ff6c2e75857a884d831ab3c6c100eb04b3e0aa235a7635047c9a9740aab7b16ddf0898731d0146005fd275fb87ee9e9df72a9197f79342f32a43a563421b9
         | 
    
        data/lib/raykit/environment.rb
    CHANGED
    
    | @@ -5,6 +5,19 @@ require "pathname" | |
| 5 5 | 
             
            module Raykit
         | 
| 6 6 | 
             
              # Provides functionality related to the development environment
         | 
| 7 7 | 
             
              class Environment
         | 
| 8 | 
            +
                def self.info
         | 
| 9 | 
            +
                  ljust = 35
         | 
| 10 | 
            +
                  puts "machine".ljust(ljust) + Rainbow("#{machine}").yellow.bright
         | 
| 11 | 
            +
                  puts "user".ljust(ljust) + Rainbow("#{user}").yellow.bright
         | 
| 12 | 
            +
                  puts "root_dir".ljust(ljust) + Rainbow("#{root_dir}").yellow.bright
         | 
| 13 | 
            +
                  puts "home_dir".ljust(ljust) + Rainbow("#{home_dir}").yellow.bright
         | 
| 14 | 
            +
                  puts "bin_dir".ljust(ljust) + Rainbow("#{bin_dir}").yellow.bright
         | 
| 15 | 
            +
                  puts "log_dir".ljust(ljust) + Rainbow("#{log_dir}").yellow.bright
         | 
| 16 | 
            +
                  puts "local_application_data".ljust(ljust) + Rainbow("#{local_application_data}").yellow.bright
         | 
| 17 | 
            +
                  puts "admin".ljust(ljust) + Rainbow("#{admin?}").yellow.bright
         | 
| 18 | 
            +
                  self
         | 
| 19 | 
            +
                end
         | 
| 20 | 
            +
             | 
| 8 21 | 
             
                # Normalize a directory or filename to use forward slashes
         | 
| 9 22 | 
             
                def self.normalize_path(name)
         | 
| 10 23 | 
             
                  if (windows?)
         | 
| @@ -54,6 +67,10 @@ module Raykit | |
| 54 67 | 
             
                  get_dev_dir("log")
         | 
| 55 68 | 
             
                end
         | 
| 56 69 |  | 
| 70 | 
            +
                def self.bin_dir
         | 
| 71 | 
            +
                  get_dev_dir("bin")
         | 
| 72 | 
            +
                end
         | 
| 73 | 
            +
             | 
| 57 74 | 
             
                # Get, and create if it does not exist, a specific development directory
         | 
| 58 75 | 
             
                def self.get_dev_dir(name)
         | 
| 59 76 | 
             
                  dir = Pathname.new("#{Environment.root_dir}/#{name}")
         | 
| @@ -89,7 +106,7 @@ module Raykit | |
| 89 106 | 
             
                end
         | 
| 90 107 |  | 
| 91 108 | 
             
                def self.local_application_data
         | 
| 92 | 
            -
                  "#{ENV["USERPROFILE"]}/AppData/Local".gsub('\\', "/")
         | 
| 109 | 
            +
                  normalize_path("#{ENV["USERPROFILE"]}/AppData/Local".gsub('\\', "/"))
         | 
| 93 110 | 
             
                end
         | 
| 94 111 |  | 
| 95 112 | 
             
                def self.admin?
         | 
    
        data/lib/raykit/tasks.rb
    CHANGED
    
    | @@ -5,6 +5,22 @@ task :info do | |
| 5 5 | 
             
              PROJECT.info
         | 
| 6 6 | 
             
            end
         | 
| 7 7 |  | 
| 8 | 
            +
            desc "Display environment information"
         | 
| 9 | 
            +
            task :env do
         | 
| 10 | 
            +
              Raykit::Environment.info
         | 
| 11 | 
            +
            end
         | 
| 12 | 
            +
             | 
| 13 | 
            +
            desc "Display the constants"
         | 
| 14 | 
            +
            task :show_constants do
         | 
| 15 | 
            +
              ljust = 35
         | 
| 16 | 
            +
              GIT_DIRECTORY.get_unique_ruby_constants.each do |constant|
         | 
| 17 | 
            +
                if Object.const_defined?(constant)
         | 
| 18 | 
            +
                  value = Object.const_get(constant) #"?"# GIT_DIRECTORY.const_get(constant)
         | 
| 19 | 
            +
                  puts constant.ljust(ljust) + Rainbow(value).yellow.bright
         | 
| 20 | 
            +
                end
         | 
| 21 | 
            +
              end
         | 
| 22 | 
            +
            end
         | 
| 23 | 
            +
             | 
| 8 24 | 
             
            desc "integrate changes into the git repository"
         | 
| 9 25 | 
             
            task :integrate do
         | 
| 10 26 | 
             
              puts Rainbow(": integrate").blue.bright
         | 
| @@ -89,3 +105,17 @@ end | |
| 89 105 |  | 
| 90 106 | 
             
            desc "update source files"
         | 
| 91 107 | 
             
            task update: [:update_source]
         | 
| 108 | 
            +
             | 
| 109 | 
            +
            desc "setup the project files and folders"
         | 
| 110 | 
            +
            task :setup do
         | 
| 111 | 
            +
              start_task :setup
         | 
| 112 | 
            +
            end
         | 
| 113 | 
            +
            desc "build the project artifacts"
         | 
| 114 | 
            +
            task :build do
         | 
| 115 | 
            +
              start_task :build
         | 
| 116 | 
            +
            end
         | 
| 117 | 
            +
             | 
| 118 | 
            +
            desc "test the project artifacts"
         | 
| 119 | 
            +
            task :test do
         | 
| 120 | 
            +
              start_task :test
         | 
| 121 | 
            +
            end
         | 
    
        data/lib/raykit/version.rb
    CHANGED
    
    | @@ -14,6 +14,11 @@ module Raykit | |
| 14 14 | 
             
                  version = detect_from_file("src/#{name}/#{name}.csproj", /<Version>([-\w\d.]+)</)
         | 
| 15 15 | 
             
                  return version if version.length.positive?
         | 
| 16 16 |  | 
| 17 | 
            +
                  Dir.glob("**/*.csproj").each { |csproj|
         | 
| 18 | 
            +
                    version = detect_from_file(csproj, /<Version>([-\w\d.]+)</)
         | 
| 19 | 
            +
                    return version if version.length.positive?
         | 
| 20 | 
            +
                  }
         | 
| 21 | 
            +
             | 
| 17 22 | 
             
                  version = detect_from_file("#{name}/Properties/AssemblyInfo.cs", /^\[assembly: AssemblyVersion\("([.\w]+)/)
         | 
| 18 23 | 
             
                  return version if version.length.positive?
         | 
| 19 24 |  | 
    
        data/lib/raykit.rb
    CHANGED
    
    | @@ -22,7 +22,7 @@ Dir.glob("#{lib_dir}/raykit/**/*.rb").sort.each { |file| require file } | |
| 22 22 |  | 
| 23 23 | 
             
            # Constants
         | 
| 24 24 | 
             
            DEV_ROOT = Raykit::Environment::root_dir
         | 
| 25 | 
            -
            DEFAULT_GITIGNORE_CONTENT = Raykit::DefaultContent::gitignore unless defined?(DEFAULT_GITIGNORE_CONTENT)
         | 
| 25 | 
            +
            #DEFAULT_GITIGNORE_CONTENT = Raykit::DefaultContent::gitignore unless defined?(DEFAULT_GITIGNORE_CONTENT)
         | 
| 26 26 | 
             
            unless defined?(VERSION)
         | 
| 27 27 | 
             
              VERSION = Raykit::Version.detect(File.basename(RAKE_DIRECTORY))
         | 
| 28 28 | 
             
            end
         | 
| @@ -48,7 +48,7 @@ MARKDOWN = Raykit::Markdown.new | |
| 48 48 |  | 
| 49 49 | 
             
            Raykit::MsBuild::fix_msbuild_path
         | 
| 50 50 |  | 
| 51 | 
            -
            File.write(".gitignore",  | 
| 51 | 
            +
            File.write(".gitignore", Raykit::DefaultContent::gitignore) unless File.exist?(".gitignore")
         | 
| 52 52 | 
             
            Raykit::AutoSetup.run if RAYKIT_AUTO_SETUP
         | 
| 53 53 |  | 
| 54 54 | 
             
            def backup_git_directory
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: raykit
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.548
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Lou Parslow
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2024-05- | 
| 11 | 
            +
            date: 2024-05-25 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         | 
| @@ -80,6 +80,20 @@ dependencies: | |
| 80 80 | 
             
                - - "~>"
         | 
| 81 81 | 
             
                  - !ruby/object:Gem::Version
         | 
| 82 82 | 
             
                    version: '2.3'
         | 
| 83 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 84 | 
            +
              name: digest
         | 
| 85 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 86 | 
            +
                requirements:
         | 
| 87 | 
            +
                - - "~>"
         | 
| 88 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 89 | 
            +
                    version: '3.0'
         | 
| 90 | 
            +
              type: :runtime
         | 
| 91 | 
            +
              prerelease: false
         | 
| 92 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 93 | 
            +
                requirements:
         | 
| 94 | 
            +
                - - "~>"
         | 
| 95 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 96 | 
            +
                    version: '3.0'
         | 
| 83 97 | 
             
            description: supports common ci/cd development tasks
         | 
| 84 98 | 
             
            email: lou.parslow@gmail.com
         | 
| 85 99 | 
             
            executables:
         |