glimmer-dsl-web 0.8.4 → 0.8.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: c1c6574bd11dd8cced502b2e7c61eb88e0a29c0065f0fc876765b8367249b951
4
- data.tar.gz: 8ba2e0dfe03f57e7f7614aa1b9ffeb3b2f52c2ac95f3c6db321d2e3e2dd2317f
3
+ metadata.gz: 668fcf5e225fe3142f0d0b2784dbf7a74244a44ef846c08348cf13db3f1ab3fe
4
+ data.tar.gz: 5ee41130d7959651270b6809d366a30f211314633da5ed26563eaf9fb5b933a5
5
5
  SHA512:
6
- metadata.gz: 22790b5a00b15fb3a22de71dc2bd60545dea73fb6c674910b7f6e19c8687ac3ee28cc579c1e15967fb84e7a3957b684c2221130fb1055a56efe2791532b3199d
7
- data.tar.gz: 93054585ac457901a9c6796905b74bfc24e5f646f644c99de2c780bfe2006d323cca8962de10e60f99cf0d9a41845699d70773b42b260e49026e6892a4a164a0
6
+ metadata.gz: e63143f70902c00b606f7004bea2e74fa703d1d9b540b158522813bfccf94da256a5b12d4c1019157e5c76148cd5ff3ff9f3dfd0f7e73a480fe57e15250ca206
7
+ data.tar.gz: 32e47e7e28ebd7d546be6577c6be01f55ae4b7ad2e2754a943ce9ed09b407556fa52f2931dc0661fbdcc14f87e7a5dbc2014050d1490212c42f89f882990796c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.8.5
4
+
5
+ - Update `Rails::ResourceService` to generate class resource name through correct underscored name (not just downcased)
6
+
3
7
  ## 0.8.4
4
8
 
5
9
  - Relax dependency on opal-rails to be '>= 2.0.4', '< 4.0.0' (allowing version 3.x to be accepted to support Rails 8)
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for Web 0.8.4 (Beta)
1
+ # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for Web 0.8.5 (Beta)
2
2
  ## Ruby-in-the-Browser Web Frontend Framework
3
3
  ### The "Rails" of Frontend Frameworks!!! ([Fukuoka Award Winning](https://andymaleh.blogspot.com/2025/01/glimmer-dsl-for-web-wins-in-fukuoka.html))
4
4
  #### Finally, Ruby Developer Productivity, Happiness, and Fun in the Frontend!!!
@@ -1337,6 +1337,7 @@ Learn more about the differences between various [Glimmer](https://github.com/An
1337
1337
  - [Glimmer DSL for Web](#)
1338
1338
  - [Prerequisites](#prerequisites)
1339
1339
  - [Setup](#setup)
1340
+ - [Rails 8](#rails-8)
1340
1341
  - [Rails 7](#rails-7)
1341
1342
  - [Standalone (No Rails)](#standalone-no-rails)
1342
1343
  - [Usage](#usage)
@@ -1422,7 +1423,7 @@ rails new glimmer_app_server
1422
1423
  Add the following to `Gemfile`:
1423
1424
 
1424
1425
  ```
1425
- gem 'glimmer-dsl-web', '~> 0.8.4'
1426
+ gem 'glimmer-dsl-web', '~> 0.8.5'
1426
1427
  ```
1427
1428
 
1428
1429
  Run:
@@ -1439,11 +1440,12 @@ Follow [opal-rails](https://github.com/opal/opal-rails) instructions, basically
1439
1440
  bin/rails g opal:install
1440
1441
  ```
1441
1442
 
1442
- To enable the `glimmer-dsl-web` gem in the frontend, edit `config/initializers/assets.rb` and add the following at the bottom:
1443
+ To enable the `glimmer-dsl-web` gem in the frontend, edit `config/initializers/assets.rb` and add the following at the bottom (requires that you also create `manifest.opal.js` as per instructions below):
1443
1444
 
1444
1445
  ```ruby
1445
1446
  Opal.use_gem 'glimmer-dsl-web'
1446
1447
  Opal.append_path Rails.root.join('app', 'assets', 'opal')
1448
+ Rails.application.config.assets.precompile += %w[manifest.opal.js]
1447
1449
  ```
1448
1450
 
1449
1451
  To enable Opal Browser Debugging in Ruby with the [Source Maps](https://opalrb.com/docs/guides/v1.4.1/source_maps.html) feature, edit `config/initializers/opal.rb` and add the following inside the `Rails.application.configure do; end` block at the bottom of it:
@@ -1484,6 +1486,12 @@ Edit `app/assets/config/manifest.js` and update `//= link_directory ../javascrip
1484
1486
  //= link_directory ../opal .js
1485
1487
  ```
1486
1488
 
1489
+ Also, create `app/assets/config/manifest.opal.js` and add the following content to it:
1490
+ ```js
1491
+ //= link_tree ../opal .js
1492
+ //= link_directory ../opal .js
1493
+ ```
1494
+
1487
1495
  Edit `app/views/layouts/application.html.erb` and update `<%= javascript_include_tag "application", "data-turbolinks-track": "reload" %>` to `<%= javascript_include_tag "opal_application", "data-turbolinks-track": "reload" %>`:
1488
1496
 
1489
1497
  ```erb
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.4
1
+ 0.8.5
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: glimmer-dsl-web 0.8.4 ruby lib
5
+ # stub: glimmer-dsl-web 0.8.5 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "glimmer-dsl-web".freeze
9
- s.version = "0.8.4".freeze
9
+ s.version = "0.8.5".freeze
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
@@ -1,3 +1,5 @@
1
+ require 'facets/string/underscore'
2
+
1
3
  module Rails
2
4
  # ResourceService supports index/show/create/update/destroy REST API calls for any Rails resources
3
5
  # Automatically loads the authenticity token from meta[name=csrf-token] content attribute
@@ -101,7 +103,7 @@ module Rails
101
103
 
102
104
  def singular_resource_name_for_resource_class(resource_class)
103
105
  return nil if resource_class.nil?
104
- resource_class.to_s.split('::').last.downcase
106
+ resource_class.to_s.split('::').last.underscore
105
107
  end
106
108
 
107
109
  def build_resource_from_response_object(resource_class:, resource_response_object:)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-dsl-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Maleh