rhino_project_core 0.21.0.beta.34 → 0.21.0.beta.37

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6918475c60993ee63931ede0fdc392837dd5e01eae3f40e65aa8139a3bddb2e0
4
- data.tar.gz: 102f1fe1586728bede1db5eee8efcf9f0105fd60e73ac02805ebb6daf7e3063b
3
+ metadata.gz: 7a7b2eac87493c47f414e7eb7b2ef1a2723ca7ed71ad27ca1120a36de939b406
4
+ data.tar.gz: 5bac1a4b8dddf65ed01f0300865f49025b8e32cffd1fe65ce994662dbf8f7dcf
5
5
  SHA512:
6
- metadata.gz: f83a90826950bce6a3ce4576d4d07abe04f57532adb5c739bd63c4619f796fffb5a8d8b5234d7fba54461049cd56e258a19abf0910a26841b20540aaa6b966c4
7
- data.tar.gz: '09013a37d069f91ab31fffb4e3d8b4e5780017ebd09fb77b437136e5ac36fe4745e9c78116f67c3ee564d70376c81abcc399bb211b7c856b71ec078bd04e95d9'
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
@@ -10,7 +10,7 @@ module Rhino
10
10
  MAJOR = 0
11
11
  MINOR = 21
12
12
  TINY = 0
13
- PRE = "beta.34"
13
+ PRE = "beta.37"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
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.34
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-03 00:00:00.000000000 Z
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
@@ -522,8 +523,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
522
523
  - !ruby/object:Gem::Version
523
524
  version: '0'
524
525
  requirements: []
525
- rubygems_version: 3.5.11
526
- signing_key:
526
+ rubygems_version: 3.5.16
527
+ signing_key:
527
528
  specification_version: 4
528
529
  summary: ''
529
530
  test_files: []