uni_rails 0.2.0 → 0.2.1

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: cc6bc019cbe167f21dbc6ddceb1b5e2bae4ce66fad6dbe0d299f465e43f16fa9
4
- data.tar.gz: 8f0805634149a9bf59a20d88d3b70ab496a60b06a230885bd2c56f4ab8fd635f
3
+ metadata.gz: 32de6ce8c47b9fc788b686f9ccd709341c543f3e8f97b93383980b8814ff941e
4
+ data.tar.gz: 52f9a0d16c28d7e5f3a326cd58fccea70687eb7fef1560d6e0dbf8c700fe61b4
5
5
  SHA512:
6
- metadata.gz: 5e77e7b4f67d25b7247ebd2fcd44ad1e303f031b80c3e3ac024f61404d7fe7892ea110ee989f2469d3f7fe1057c1df560bf586de91d60514f00fd5b742a49035
7
- data.tar.gz: d88074f28ebb2868aa97db9ef470e8c271aea089b0a148c864c41c85fa7da000d0705182fbbc15e1fbd579ff4a5ee22a7fcd36b551cde842b7e62346ef8d43f9
6
+ metadata.gz: 3695f3707ec840bc876d891da128bc3ab385b0327915ac5d714ae4b0e1cfc2f083b939fd9c8ab7199b85a9db0b8678627c67f1d8ced5ebf19142f19973a49ced
7
+ data.tar.gz: ae3b6b9530ade148bca88cc8329dc3e71aca7f24829330ae9ac55c641710ed4551e2ca9e4b5532886fad5b285f1dd7dc2181cce9ced90a30051eec1dd3a4f7ce
data/README.md CHANGED
@@ -1,24 +1,18 @@
1
1
  # UniRails
2
2
 
3
- TODO: Delete this and the text below, and describe your gem
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
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/uni_rails`. To experiment with that code, run `bin/console` for an interactive prompt.
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
- ## Installation
7
+ Embrace the convenience of single-file Rails applications with our library, where simplicity meets functionality.
8
8
 
9
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
9
+ ## Installation & Usage
10
10
 
11
- Install the gem and add to the application's Gemfile by executing:
11
+ See some examples of how the UniRails library can be used
12
12
 
13
- $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
14
-
15
- If bundler is not being used to manage dependencies, install the gem by executing:
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).
File without changes
File without changes
data/examples/todos.rb ADDED
File without changes
@@ -12,9 +12,9 @@ module UniRails
12
12
  <%= csrf_meta_tags %>
13
13
  <%= csp_meta_tag %>
14
14
 
15
- <%= mono_rails_css_stylesheet %>
16
- <%= mono_rails_import_map_tag %>
17
- <%= mono_rails_javascript_script %>
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 mono_rails_import_map_tag
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 mono_rails_javascript_script
10
+ def uni_rails_javascript_script
11
11
  content_tag(:script, type: 'module') do
12
12
  raw App::Javascript.javascript
13
13
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UniRails
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
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.0
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