hotwire_native_rails 0.3.3 → 0.3.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 84432c1688ed077b1d915d0db3a714598008c8811ed3d1147b2e4e38f668a1ea
4
- data.tar.gz: 8ca34b0820ce17f62fd23bc7dd17df3035b8a644831f1f3dcdaf6fb8dff3bcfa
3
+ metadata.gz: e90a72439838b37ad270197654dd4f5b3f537aa2898af4c0ca14fa46697028b3
4
+ data.tar.gz: 80ec851dcc2fc70844455a900e6eed90786e99c023ef4ee16c67f5f08ae16e9c
5
5
  SHA512:
6
- metadata.gz: f403700954894cda1a7ecb3f4e3011d103523fb0959734e0bd12c499bcc02c877bf60d9ac8f610551f56bef255328bfe50632820609711c8f58688dd53547a4e
7
- data.tar.gz: 23765b7fd268eb314bbbab24c23088380225b3be6f6c6ce41aae76e8e071fadb6a8b8b1904114ead1e37cca090e0e458d020706d7373a6a14c306d77ed705b37
6
+ metadata.gz: 7015cdfc3fa0344936ca9fec047504404b545eb79c11a6a9614c411fdba1bdb512376f9d7fcd9c9954bb0345ecf68fbfc1bd023d453bfe3dbc41cffc13056275
7
+ data.tar.gz: 261be6fef738aa329d964c081fb452caae2a5b930aa7631e39721a69a39111d3bbe3849b05650f69b42da621b47a4928ddf176586208e5d7373b645893fee67b
data/.gitignore CHANGED
@@ -6,3 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ /hotwire_native_rails-*.gem
data/README.md CHANGED
@@ -54,7 +54,7 @@ Make a release to rubygems:
54
54
  # 2. zip the gem
55
55
  gem build hotwire_native_rails.gemspec
56
56
  # 3. push the zip to rubygems
57
- gem push hotwire_native_rails-0.2.0.gem
57
+ gem push hotwire_native_rails-0.3.3.gem
58
58
  ```
59
59
 
60
60
  - [Github source](https://github.com/yshmarov/hotwire_native_rails)
@@ -15,6 +15,7 @@ class HotwireNativeGenerator < Rails::Generators::Base
15
15
  copy_file "routes/hotwire_native.rb", "config/routes/hotwire_native.rb"
16
16
  copy_file "controllers/hotwire_native/v1/android/path_configurations_controller.rb", "app/controllers/hotwire_native/v1/android/path_configurations_controller.rb"
17
17
  copy_file "controllers/hotwire_native/v1/ios/path_configurations_controller.rb", "app/controllers/hotwire_native/v1/ios/path_configurations_controller.rb"
18
+ copy_file "controllers/hotwire_native/tabs_controller.rb", "app/controllers/hotwire_native/tabs_controller.rb"
18
19
  copy_file "test_unit/path_configurations_controller_test.rb", "test/controllers/path_configurations_controller_test.rb"
19
20
 
20
21
  # :native request variant
@@ -0,0 +1,19 @@
1
+ # in the Native app, define absolute paths
2
+ # redirect these absolute paths to the correct controller actions based on context like
3
+ # current_user, current_organization, etc.
4
+ # redirect_to user_path(current_user) if current_user&.present?
5
+ class HotwireNative::TabsController < ActionController::Base
6
+ # def tab0
7
+ # redirect_to root_path
8
+ # end
9
+
10
+ def tab1
11
+ redirect_to organizations_path
12
+ end
13
+
14
+ def tab2
15
+ redirect_to edit_user_registration_path
16
+ end
17
+
18
+ # add more tabs (max 5)
19
+ end
@@ -18,6 +18,14 @@ class HotwireNative::V1::Ios::PathConfigurationsController < ActionController::B
18
18
  "pull_to_refresh_enabled": false
19
19
  }
20
20
  },
21
+ {
22
+ "patterns": [
23
+ "^/users/edit$"
24
+ ],
25
+ "properties": {
26
+ "context": "default"
27
+ }
28
+ },
21
29
  {
22
30
  "patterns": [
23
31
  "/numbers$"
@@ -10,7 +10,7 @@ module HotwireNativeHelper
10
10
  # <% content_for :title, "Sign in | My App" %>
11
11
  def page_title
12
12
  if turbo_native_app?
13
- content_for(:hotwire_native_title) || content_for(:title) || Rails.application.class.module_parent.name
13
+ content_for(:hotwire_native_title) || content_for(:title) || @page_title || Rails.application.class.module_parent.name
14
14
  else
15
15
  content_for(:title) || Rails.application.class.module_parent.name
16
16
  end
@@ -7,4 +7,8 @@ namespace :hotwire_native do
7
7
  resource :path_configuration, only: :show
8
8
  end
9
9
  end
10
+
11
+ # get "tab0", to: "tabs#tab0"
12
+ get "tab1", to: "tabs#tab1"
13
+ get "tab2", to: "tabs#tab2"
10
14
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HotwireNativeRails
4
- VERSION = "0.3.3"
4
+ VERSION = "0.3.5"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hotwire_native_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaro Shm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-15 00:00:00.000000000 Z
11
+ date: 2024-12-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -29,6 +29,7 @@ files:
29
29
  - hotwire_native_rails.gemspec
30
30
  - lib/generators/hotwire_native/hotwire_native_generator.rb
31
31
  - lib/generators/hotwire_native/templates/controllers/concerns/device_format.rb
32
+ - lib/generators/hotwire_native/templates/controllers/hotwire_native/tabs_controller.rb
32
33
  - lib/generators/hotwire_native/templates/controllers/hotwire_native/v1/android/path_configurations_controller.rb
33
34
  - lib/generators/hotwire_native/templates/controllers/hotwire_native/v1/ios/path_configurations_controller.rb
34
35
  - lib/generators/hotwire_native/templates/helpers/hotwire_native_helper.rb