uni_rails 0.2.0 → 0.2.1
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/README.md +24 -14
- data/examples/hotwire.rb +0 -0
- data/examples/json_api.rb +0 -0
- data/examples/todos.rb +0 -0
- data/lib/uni_rails/app/views.rb +3 -3
- data/lib/uni_rails/helpers/javascript_helper.rb +2 -2
- data/lib/uni_rails/version.rb +1 -1
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32de6ce8c47b9fc788b686f9ccd709341c543f3e8f97b93383980b8814ff941e
|
4
|
+
data.tar.gz: 52f9a0d16c28d7e5f3a326cd58fccea70687eb7fef1560d6e0dbf8c700fe61b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3695f3707ec840bc876d891da128bc3ab385b0327915ac5d714ae4b0e1cfc2f083b939fd9c8ab7199b85a9db0b8678627c67f1d8ced5ebf19142f19973a49ced
|
7
|
+
data.tar.gz: ae3b6b9530ade148bca88cc8329dc3e71aca7f24829330ae9ac55c641710ed4551e2ca9e4b5532886fad5b285f1dd7dc2181cce9ced90a30051eec1dd3a4f7ce
|
data/README.md
CHANGED
@@ -1,24 +1,18 @@
|
|
1
1
|
# UniRails
|
2
2
|
|
3
|
-
|
3
|
+
UniRails is designed to streamline the process of creating Ruby on Rails applications within a single Ruby file. This approach is ideal for small personal CRUD (Create, Read, Update, Delete) applications or educational purposes, offering a simplified method for demonstrating Rails concepts.
|
4
4
|
|
5
|
-
|
5
|
+
Our goal is to facilitate educators and writers in crafting concise, illustrative examples for articles or books. Traditional Rails applications require a complex structure even for demonstrating basic concepts, which can be cumbersome and unnecessary. Our library addresses this issue by enabling the quick replication of a Ruby file to instantiate a fully operational Rails app, consolidating all essential components into one file.
|
6
6
|
|
7
|
-
|
7
|
+
Embrace the convenience of single-file Rails applications with our library, where simplicity meets functionality.
|
8
8
|
|
9
|
-
|
9
|
+
## Installation & Usage
|
10
10
|
|
11
|
-
|
11
|
+
See some examples of how the UniRails library can be used
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
$ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
|
18
|
-
|
19
|
-
## Usage
|
20
|
-
|
21
|
-
TODO: Write usage instructions here
|
13
|
+
- [json api](/examples/json_api.rb)
|
14
|
+
- [todo app](/examples/todos.rb)
|
15
|
+
- [hotwire](/examples/hotwire.rb)
|
22
16
|
|
23
17
|
## Development
|
24
18
|
|
@@ -30,6 +24,22 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
30
24
|
|
31
25
|
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/uni_rails. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/uni_rails/blob/main/CODE_OF_CONDUCT.md).
|
32
26
|
|
27
|
+
### Roadmap
|
28
|
+
|
29
|
+
We would like to support all railties and engines. Please help us support more of them
|
30
|
+
|
31
|
+
- [X] action_controller
|
32
|
+
- [X] active_record
|
33
|
+
- [ ] active_model/railtie
|
34
|
+
- [ ] active_job/railtie
|
35
|
+
- [ ] active_storage/engine
|
36
|
+
- [ ] action_mailer/railtie
|
37
|
+
- [ ] action_mailbox/engine
|
38
|
+
- [ ] action_text/engine
|
39
|
+
- [ ] action_view/railtie
|
40
|
+
- [ ] action_cable/engine
|
41
|
+
|
42
|
+
|
33
43
|
## License
|
34
44
|
|
35
45
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/examples/hotwire.rb
ADDED
File without changes
|
File without changes
|
data/examples/todos.rb
ADDED
File without changes
|
data/lib/uni_rails/app/views.rb
CHANGED
@@ -12,9 +12,9 @@ module UniRails
|
|
12
12
|
<%= csrf_meta_tags %>
|
13
13
|
<%= csp_meta_tag %>
|
14
14
|
|
15
|
-
<%=
|
16
|
-
<%=
|
17
|
-
<%=
|
15
|
+
<%= uni_rails_css_stylesheet %>
|
16
|
+
<%= uni_rails_import_map_tag %>
|
17
|
+
<%= uni_rails_javascript_script %>
|
18
18
|
</head>
|
19
19
|
|
20
20
|
<body>
|
@@ -1,13 +1,13 @@
|
|
1
1
|
module UniRails
|
2
2
|
module Helpers
|
3
3
|
module JavascriptHelper
|
4
|
-
def
|
4
|
+
def uni_rails_import_map_tag
|
5
5
|
content_tag(:script, type: 'importmap') do
|
6
6
|
raw App::Javascript.imports.to_json
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
10
|
-
def
|
10
|
+
def uni_rails_javascript_script
|
11
11
|
content_tag(:script, type: 'module') do
|
12
12
|
raw App::Javascript.javascript
|
13
13
|
end
|
data/lib/uni_rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uni_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexandre Barret
|
@@ -35,6 +35,9 @@ files:
|
|
35
35
|
- LICENSE.txt
|
36
36
|
- README.md
|
37
37
|
- Rakefile
|
38
|
+
- examples/hotwire.rb
|
39
|
+
- examples/json_api.rb
|
40
|
+
- examples/todos.rb
|
38
41
|
- lib/uni_rails.rb
|
39
42
|
- lib/uni_rails/app.rb
|
40
43
|
- lib/uni_rails/app/css.rb
|