rhino_project_core 0.21.0.beta.35 → 0.21.0.beta.38

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: 1bb89429703ae47695ca7e74b928f60a938f85275b60caef1a1c5e90f3acc9b2
4
- data.tar.gz: f4134e0aef4237d2061d2c2c14531619a27d0992db22171c96cbabcb2d8f318f
3
+ metadata.gz: 93d55a8574afed5f0318740f333c41b46043927ad1a785500c6afcfb9af6f700
4
+ data.tar.gz: 0f554d1a762f4945d68683cad6a1a44737c6832a6b39318e7caea908d8482c5b
5
5
  SHA512:
6
- metadata.gz: f6af75839c9b52661dac04379cbdf97ea5930114b30ec784386cadc5cc4f61ddde07f522c26b05568ddd7e31a8ca0987424661a9ae93671fb3e97ff94d485c7d
7
- data.tar.gz: 32d918b2b57630d4f0efc2253e899ca7bde6939677702fb48f37c6a2a7221b86b56d8c67410cbe5ef232a379cc55db673534da80d4f48288ed1ab0b5cea90e81
6
+ metadata.gz: 4249be09c2430df253f031db92c71288d2ffb3999f401646d8771a6d2247d1bb3080d0862b51029aaa5c08fcb29750a2121732c482d958c09c8f7c7f092b12da
7
+ data.tar.gz: 8e53af98af61c112aab587b58fe6a808534212006c2c9922d6bc089b38411598c1da6ec0d9e2e821cb8e7d05f115855165a46e4a9b80e4b3e0269536c2338534
@@ -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.35"
13
+ PRE = "beta.38"
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.35
4
+ version: 0.21.0.beta.38
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-06 00:00:00.000000000 Z
11
+ date: 2024-10-12 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: []