rhino_project_core 0.21.0.beta.35 → 0.21.0.beta.37
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/generators/rhino/update/update_generator.rb +45 -0
- data/lib/rhino/version.rb +1 -1
- data/lib/tasks/rhino.rake +7 -0
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a7b2eac87493c47f414e7eb7b2ef1a2723ca7ed71ad27ca1120a36de939b406
|
4
|
+
data.tar.gz: 5bac1a4b8dddf65ed01f0300865f49025b8e32cffd1fe65ce994662dbf8f7dcf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97c95f6bc7c945721911a5c447a1f2ea90c36b2f62538135701b543f990ad213d985bc4217940eca6e54b5fb4bbf1b53d1c858f3dee6499522df728ab9f70d91
|
7
|
+
data.tar.gz: da22a3c37d5482f64b8504da57501abcafc16a8df24a5f0a3b7830a08755c2028aa31ce91ffffb7f220fd39c1d43a2b9351ce385ef91a266c6b4a290684ac99c
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Rhino
|
4
|
+
module Generators
|
5
|
+
class UpdateGenerator < ::Rails::Generators::Base
|
6
|
+
source_root File.expand_path("templates", __dir__)
|
7
|
+
|
8
|
+
GIT_REPO = "https://github.com/rhino-project/rhino-project-template.git"
|
9
|
+
|
10
|
+
class_option :git_ref, type: :string, default: "main", desc: "Git reference to use for the update"
|
11
|
+
class_option :update_branch, type: :string, default: "chore/update-rhino", desc: "Branch to use for the update"
|
12
|
+
|
13
|
+
|
14
|
+
def setup_remote_git
|
15
|
+
say "Setting up git remote"
|
16
|
+
system("git remote rm rhino-project-template") || raise("Failed to add remote")
|
17
|
+
system("git remote add rhino-project-template git@github.com:rhino-project/rhino-project-template.git") || raise("Failed to add remote")
|
18
|
+
system("git fetch rhino-project-template #{options[:git_ref]}:#{git_remote_branch}") || raise("Failed to fetch remote")
|
19
|
+
system("git checkout #{git_remote_branch}") || raise("Failed to checkout remote branch")
|
20
|
+
end
|
21
|
+
|
22
|
+
def removing_node_modules
|
23
|
+
say "Removing node_modules to avoid https://github.com/npm/cli/issues/4828"
|
24
|
+
system("rm -rf node_modules") || raise("Failed to remove node_modules")
|
25
|
+
end
|
26
|
+
|
27
|
+
def branch_and_merge
|
28
|
+
say "Branching and merging"
|
29
|
+
system("git checkout -b #{options[:update_branch]}") || raise("Failed to checkout update branch")
|
30
|
+
system("git merge #{git_remote_branch}")
|
31
|
+
end
|
32
|
+
|
33
|
+
def install_packages
|
34
|
+
say "Installing packages"
|
35
|
+
system("bundle install") || raise("Failed to install packages")
|
36
|
+
system("npm install") || raise("Failed to install packages")
|
37
|
+
end
|
38
|
+
|
39
|
+
private
|
40
|
+
def git_remote_branch
|
41
|
+
"rhino-project-template-#{options[:git_ref]}"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
data/lib/rhino/version.rb
CHANGED
data/lib/tasks/rhino.rake
CHANGED
@@ -7,6 +7,9 @@ namespace :rhino do
|
|
7
7
|
desc "Install Rhino"
|
8
8
|
task install: %w[environment run_installer]
|
9
9
|
|
10
|
+
desc "Update Rhino"
|
11
|
+
task update: %w[environment run_update]
|
12
|
+
|
10
13
|
desc "Export Rhino Open API information for client"
|
11
14
|
task open_api_export: :environment do
|
12
15
|
static_file = Rails.root.join("app", "frontend", "models", "static.js")
|
@@ -21,4 +24,8 @@ namespace :rhino do
|
|
21
24
|
|
22
25
|
Rails::Command.invoke :generate, ["rhino:install"]
|
23
26
|
end
|
27
|
+
|
28
|
+
task run_update: :environment do
|
29
|
+
Rails::Command.invoke :generate, ["rhino:update"]
|
30
|
+
end
|
24
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rhino_project_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.21.0.beta.
|
4
|
+
version: 0.21.0.beta.37
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Rosevear
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -448,6 +448,7 @@ files:
|
|
448
448
|
- lib/generators/rhino/module/templates/test/test_helper.rb
|
449
449
|
- lib/generators/rhino/policy/policy_generator.rb
|
450
450
|
- lib/generators/rhino/policy/templates/policy.rb.tt
|
451
|
+
- lib/generators/rhino/update/update_generator.rb
|
451
452
|
- lib/generators/test_unit/rhino_policy_generator.rb
|
452
453
|
- lib/generators/test_unit/templates/policy_test.rb.tt
|
453
454
|
- lib/rhino/engine.rb
|
@@ -507,7 +508,7 @@ homepage: ''
|
|
507
508
|
licenses:
|
508
509
|
- MIT
|
509
510
|
metadata: {}
|
510
|
-
post_install_message:
|
511
|
+
post_install_message:
|
511
512
|
rdoc_options: []
|
512
513
|
require_paths:
|
513
514
|
- lib
|
@@ -523,7 +524,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
523
524
|
version: '0'
|
524
525
|
requirements: []
|
525
526
|
rubygems_version: 3.5.16
|
526
|
-
signing_key:
|
527
|
+
signing_key:
|
527
528
|
specification_version: 4
|
528
529
|
summary: ''
|
529
530
|
test_files: []
|