rails-gui 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +5 -0
- data/LICENSE.txt +20 -0
- data/README.md +79 -0
- data/VERSION +1 -0
- data/app/rails-gui.rb +6 -0
- data/app/rails_gui/model/rails_command.rb +19 -0
- data/app/rails_gui/view/main_window.rb +43 -0
- data/bin/rails-gui +3 -0
- data/rails-gui.gemspec +58 -0
- metadata +140 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b91a2942d71b74d4cb5253c954fb363f2b1804cdb6335c626ddfaa09ff07db3f
|
4
|
+
data.tar.gz: c5c31a8fcd25330719e30868a920c6216e51820a889257f9bf85b86550f259ec
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fddf98930253e16dbbce24f679aa03355d505c360ff75e880ccf0363b950357d6057f894a76a4dd6eaef6066ebf9d7978b7f65b5577c32f1d165c139d83a53a7
|
7
|
+
data.tar.gz: d9d4f2a5c601634bb8f42f0e759fd96dd57f540bd66fa7670e0549b17234bcb7195b25b196852a85747d01b6f85fbf5380d51ca503be7045c6d1530466ebd0fd
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2022 Andy Maleh
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
# Rails GUI
|
2
|
+
## User-Friendly Rails Configuration
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/rails-gui.svg)](http://badge.fury.io/rb/rails-gui)
|
4
|
+
|
5
|
+
Rails Graphical User Interface (e.g. display routes in a table, run rails commands visually, etc...)
|
6
|
+
|
7
|
+
![rails gui rails routes screenshot](/screenshots/rails-gui-rails-routes.png)
|
8
|
+
|
9
|
+
## Setup
|
10
|
+
|
11
|
+
### RubyGem
|
12
|
+
|
13
|
+
Install (if using [RVM](https://rvm.io/), in the same [gemset](https://rvm.io/gemsets/basics) as your Rails app):
|
14
|
+
|
15
|
+
```
|
16
|
+
gem install rails-gui
|
17
|
+
```
|
18
|
+
|
19
|
+
### Bundler
|
20
|
+
|
21
|
+
Add to `Gemfile` under `development` group:
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
group :development do
|
25
|
+
gem 'rails-gui'
|
26
|
+
end
|
27
|
+
```
|
28
|
+
|
29
|
+
Run:
|
30
|
+
|
31
|
+
```
|
32
|
+
bundle
|
33
|
+
```
|
34
|
+
|
35
|
+
## Usage
|
36
|
+
|
37
|
+
Run:
|
38
|
+
|
39
|
+
```
|
40
|
+
rails-gui
|
41
|
+
```
|
42
|
+
|
43
|
+
Screenshot:
|
44
|
+
|
45
|
+
![rails gui rails routes screenshot](/screenshots/rails-gui-rails-routes.png)
|
46
|
+
|
47
|
+
## TODO
|
48
|
+
|
49
|
+
[TODO.md](TODO.md)
|
50
|
+
|
51
|
+
## Change Log
|
52
|
+
|
53
|
+
[CHANGELOG.md](CHANGELOG.md)
|
54
|
+
|
55
|
+
## Contributing to rails-gui
|
56
|
+
|
57
|
+
- Check out the latest master to make sure the feature hasn't been
|
58
|
+
implemented or the bug hasn't been fixed yet.
|
59
|
+
- Check out the issue tracker to make sure someone already hasn't
|
60
|
+
requested it and/or contributed it.
|
61
|
+
- Fork the project.
|
62
|
+
- Start a feature/bugfix branch.
|
63
|
+
- Commit and push until you are happy with your contribution.
|
64
|
+
- Make sure to add tests for it. This is important so I don't break it
|
65
|
+
in a future version unintentionally.
|
66
|
+
- Please try not to mess with the Rakefile, version, or history. If
|
67
|
+
you want to have your own version, or is otherwise necessary, that
|
68
|
+
is fine, but please isolate to its own commit so I can cherry-pick
|
69
|
+
around it.
|
70
|
+
|
71
|
+
## Copyright
|
72
|
+
|
73
|
+
[MIT](LICENSE.txt)
|
74
|
+
|
75
|
+
Copyright (c) 2022 Andy Maleh. See [LICENSE.txt](LICENSE.txt) for further details.
|
76
|
+
|
77
|
+
--
|
78
|
+
|
79
|
+
[<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=40 />](https://github.com/AndyObtiva/glimmer) Built with [Glimmer DSL for LibUI](https://github.com/AndyObtiva/glimmer-dsl-libui) (Ruby Desktop Development GUI Library)
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
data/app/rails-gui.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'singleton'
|
2
|
+
|
3
|
+
module RailsGui
|
4
|
+
module Model
|
5
|
+
# abstracts rails commands like `rails routes` and `rails generate ...`
|
6
|
+
class RailsCommand
|
7
|
+
include Singleton
|
8
|
+
|
9
|
+
def routes
|
10
|
+
`rails routes`.lines.drop(1).map do |line|
|
11
|
+
cells = line.split
|
12
|
+
cells.prepend('') if cells[0] && (cells[0] == cells[0].upcase)
|
13
|
+
cells.insert(1, '') if cells[1] && (cells[1] != cells[1].upcase)
|
14
|
+
cells
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'glimmer-dsl-libui'
|
2
|
+
|
3
|
+
require_relative '../model/rails_command'
|
4
|
+
|
5
|
+
module RailsGui
|
6
|
+
module View
|
7
|
+
class MainWindow
|
8
|
+
include Glimmer::LibUI::Application
|
9
|
+
|
10
|
+
before_body do
|
11
|
+
@rails_command = Model::RailsCommand.instance
|
12
|
+
end
|
13
|
+
|
14
|
+
body {
|
15
|
+
window('Rails GUI', 1024, 640) {
|
16
|
+
margined true
|
17
|
+
|
18
|
+
vertical_box {
|
19
|
+
button('Refresh Rails Routes') {
|
20
|
+
stretchy false
|
21
|
+
|
22
|
+
on_clicked do
|
23
|
+
@rails_routes_table.model_array = @rails_command.routes
|
24
|
+
end
|
25
|
+
}
|
26
|
+
|
27
|
+
@rails_routes_table = refined_table(
|
28
|
+
model_array: @rails_command.routes,
|
29
|
+
table_columns: {
|
30
|
+
'Prefix' => :text,
|
31
|
+
'Verb' => :text,
|
32
|
+
'URI Pattern' => :text,
|
33
|
+
'Controller#Action' => :text,
|
34
|
+
'Format' => :text,
|
35
|
+
},
|
36
|
+
per_page: 1_000_000_000, # do not paginate
|
37
|
+
)
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
data/bin/rails-gui
ADDED
data/rails-gui.gemspec
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
# Generated by juwelier
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: rails-gui 0.0.1 ruby lib
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "rails-gui".freeze
|
9
|
+
s.version = "0.0.1"
|
10
|
+
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
|
+
s.require_paths = ["lib".freeze]
|
13
|
+
s.authors = ["Andy Maleh".freeze]
|
14
|
+
s.date = "2022-09-16"
|
15
|
+
s.description = "Rails Graphical User Interface - User-Friendly Rails Configuration (e.g. display routes in a table, run rails commands visually, etc...)".freeze
|
16
|
+
s.email = "andy.am@gmail.com".freeze
|
17
|
+
s.executables = ["rails-gui".freeze]
|
18
|
+
s.extra_rdoc_files = [
|
19
|
+
"CHANGELOG.md",
|
20
|
+
"LICENSE.txt",
|
21
|
+
"README.md"
|
22
|
+
]
|
23
|
+
s.files = [
|
24
|
+
"CHANGELOG.md",
|
25
|
+
"LICENSE.txt",
|
26
|
+
"VERSION",
|
27
|
+
"app/rails-gui.rb",
|
28
|
+
"app/rails_gui/model/rails_command.rb",
|
29
|
+
"app/rails_gui/view/main_window.rb",
|
30
|
+
"bin/rails-gui",
|
31
|
+
"rails-gui.gemspec"
|
32
|
+
]
|
33
|
+
s.homepage = "http://github.com/AndyObtiva/rails-gui".freeze
|
34
|
+
s.licenses = ["MIT".freeze]
|
35
|
+
s.rubygems_version = "3.3.3".freeze
|
36
|
+
s.summary = "Rails Graphical User Interface".freeze
|
37
|
+
|
38
|
+
if s.respond_to? :specification_version then
|
39
|
+
s.specification_version = 4
|
40
|
+
end
|
41
|
+
|
42
|
+
if s.respond_to? :add_runtime_dependency then
|
43
|
+
s.add_runtime_dependency(%q<glimmer-dsl-libui>.freeze, ["~> 0.5.24"])
|
44
|
+
s.add_development_dependency(%q<shoulda>.freeze, [">= 0"])
|
45
|
+
s.add_development_dependency(%q<rdoc>.freeze, ["~> 3.12"])
|
46
|
+
s.add_development_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
|
47
|
+
s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
|
48
|
+
s.add_development_dependency(%q<puts_debuggerer>.freeze, [">= 0"])
|
49
|
+
else
|
50
|
+
s.add_dependency(%q<glimmer-dsl-libui>.freeze, ["~> 0.5.24"])
|
51
|
+
s.add_dependency(%q<shoulda>.freeze, [">= 0"])
|
52
|
+
s.add_dependency(%q<rdoc>.freeze, ["~> 3.12"])
|
53
|
+
s.add_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
|
54
|
+
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
55
|
+
s.add_dependency(%q<puts_debuggerer>.freeze, [">= 0"])
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
metadata
ADDED
@@ -0,0 +1,140 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rails-gui
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Andy Maleh
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-09-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: glimmer-dsl-libui
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.5.24
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.5.24
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: shoulda
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rdoc
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.12'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.12'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: juwelier
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.1.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 2.1.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: simplecov
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: puts_debuggerer
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description: Rails Graphical User Interface - User-Friendly Rails Configuration (e.g.
|
98
|
+
display routes in a table, run rails commands visually, etc...)
|
99
|
+
email: andy.am@gmail.com
|
100
|
+
executables:
|
101
|
+
- rails-gui
|
102
|
+
extensions: []
|
103
|
+
extra_rdoc_files:
|
104
|
+
- CHANGELOG.md
|
105
|
+
- LICENSE.txt
|
106
|
+
- README.md
|
107
|
+
files:
|
108
|
+
- CHANGELOG.md
|
109
|
+
- LICENSE.txt
|
110
|
+
- README.md
|
111
|
+
- VERSION
|
112
|
+
- app/rails-gui.rb
|
113
|
+
- app/rails_gui/model/rails_command.rb
|
114
|
+
- app/rails_gui/view/main_window.rb
|
115
|
+
- bin/rails-gui
|
116
|
+
- rails-gui.gemspec
|
117
|
+
homepage: http://github.com/AndyObtiva/rails-gui
|
118
|
+
licenses:
|
119
|
+
- MIT
|
120
|
+
metadata: {}
|
121
|
+
post_install_message:
|
122
|
+
rdoc_options: []
|
123
|
+
require_paths:
|
124
|
+
- lib
|
125
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
130
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
|
+
requirements:
|
132
|
+
- - ">="
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '0'
|
135
|
+
requirements: []
|
136
|
+
rubygems_version: 3.3.3
|
137
|
+
signing_key:
|
138
|
+
specification_version: 4
|
139
|
+
summary: Rails Graphical User Interface
|
140
|
+
test_files: []
|