orthodox 0.1.0
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 +7 -0
- data/.gitignore +9 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +171 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/generators/coffeescript/USAGE +11 -0
- data/lib/generators/coffeescript/coffeescript_generator.rb +79 -0
- data/lib/generators/coffeescript/templates/coffeescript.coffee.erb +14 -0
- data/lib/generators/controller/USAGE +11 -0
- data/lib/generators/controller/controller_generator.rb +80 -0
- data/lib/generators/controller/templates/controller.rb.erb +74 -0
- data/lib/generators/controller/templates/view.html.slim +5 -0
- data/lib/generators/sass/USAGE +11 -0
- data/lib/generators/sass/sass_generator.rb +61 -0
- data/lib/generators/sass/templates/sass.sass.erb +8 -0
- data/lib/orthodox.rb +5 -0
- data/lib/orthodox/railtie.rb +12 -0
- data/lib/orthodox/version.rb +3 -0
- data/orthodox.gemspec +28 -0
- metadata +124 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e2ce9bc422482cca45788e382a1a63f52a14c2aabe8507419a0329a60897fea5
|
4
|
+
data.tar.gz: '048c63b3e2a6cda46cdc7ecc327ee6d4eceff0eff1ad92a2f83310cacb942c23'
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f2e544483ac290d1491c41f713bea534a71653718b8a0ac2fe66b83004d47a28659b695e0afb283fdf74d25dbfb0867f52065dd7844b2428554d353a5e855173
|
7
|
+
data.tar.gz: c0691cbd280d8c5d9417025e02ef50fb5fbd9faad8c362f0746ce541b736bf05c0e07f4247d3e17027311ba7d88f7e5de7f2c1ce6b1806fc22c389a3239fe2d2
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Bodacious
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,171 @@
|
|
1
|
+
# Orthodox
|
2
|
+
|
3
|
+
Replacement Rails generators for Katana apps.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'orthodox', github: "katanacode/orthodox"
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install orthodox
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
### An empty controller:
|
24
|
+
|
25
|
+
rails g controller users
|
26
|
+
|
27
|
+
Creates:
|
28
|
+
|
29
|
+
class Users < ApplicationController
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
### A controller with prepopulated actions:
|
35
|
+
|
36
|
+
rails g controller users new create show
|
37
|
+
|
38
|
+
Creates:
|
39
|
+
|
40
|
+
class Users < ApplicationController
|
41
|
+
|
42
|
+
def new
|
43
|
+
@user = users_scope.new
|
44
|
+
end
|
45
|
+
|
46
|
+
def create
|
47
|
+
@user = users_scope.new(user_params)
|
48
|
+
if @user.save
|
49
|
+
redirect_to(user_url(@user), notice: "Successfully created user")
|
50
|
+
else
|
51
|
+
render :new
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def show
|
56
|
+
@user = users_scope.find(params[:id])
|
57
|
+
end
|
58
|
+
|
59
|
+
|
60
|
+
private
|
61
|
+
|
62
|
+
|
63
|
+
def users_scope
|
64
|
+
User.all
|
65
|
+
end
|
66
|
+
|
67
|
+
def user_params
|
68
|
+
params.require(:user).permit()
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
72
|
+
|
73
|
+
### A controller with actions and authentication:
|
74
|
+
|
75
|
+
rails g controller users new create show --authenticate admin
|
76
|
+
|
77
|
+
Creates:
|
78
|
+
|
79
|
+
class Users < ApplicationController
|
80
|
+
|
81
|
+
before_action :authenticate_admin!
|
82
|
+
|
83
|
+
|
84
|
+
def new
|
85
|
+
@user = users_scope.new
|
86
|
+
end
|
87
|
+
|
88
|
+
def create
|
89
|
+
@user = users_scope.new(user_params)
|
90
|
+
if @user.save
|
91
|
+
redirect_to(user_url(@user), notice: "Successfully created user")
|
92
|
+
else
|
93
|
+
render :new
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
def show
|
98
|
+
@user = users_scope.find(params[:id])
|
99
|
+
end
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
private
|
105
|
+
|
106
|
+
|
107
|
+
def users_scope
|
108
|
+
User.all
|
109
|
+
end
|
110
|
+
|
111
|
+
def user_params
|
112
|
+
params.require(:user).permit()
|
113
|
+
end
|
114
|
+
|
115
|
+
end
|
116
|
+
|
117
|
+
### A controller with a namespace:
|
118
|
+
|
119
|
+
rails g controller admins/users new create show --authenticate admin
|
120
|
+
|
121
|
+
Creates:
|
122
|
+
|
123
|
+
class Admins::Users < Admins::BaseControler
|
124
|
+
|
125
|
+
before_action :authenticate_admin!
|
126
|
+
|
127
|
+
|
128
|
+
def new
|
129
|
+
@user = users_scope.new
|
130
|
+
end
|
131
|
+
|
132
|
+
def create
|
133
|
+
@user = users_scope.new(user_params)
|
134
|
+
if @user.save
|
135
|
+
redirect_to(user_url(@user), notice: "Successfully created user")
|
136
|
+
else
|
137
|
+
render :new
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
def show
|
142
|
+
@user = users_scope.find(params[:id])
|
143
|
+
end
|
144
|
+
|
145
|
+
|
146
|
+
private
|
147
|
+
|
148
|
+
|
149
|
+
def users_scope
|
150
|
+
User.all
|
151
|
+
end
|
152
|
+
|
153
|
+
def user_params
|
154
|
+
params.require(:user).permit()
|
155
|
+
end
|
156
|
+
|
157
|
+
end
|
158
|
+
|
159
|
+
## Development
|
160
|
+
|
161
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
162
|
+
|
163
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
164
|
+
|
165
|
+
## Contributing
|
166
|
+
|
167
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/KatanaCode/orthodox.
|
168
|
+
|
169
|
+
## License
|
170
|
+
|
171
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "orthodox"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
Description:
|
2
|
+
Replaces the Rails default controller generator with a cleaner, controller. Includes non-template actions, authentication, and SLIM templates
|
3
|
+
|
4
|
+
Example:
|
5
|
+
rails generate controller users new create show index --authenticate admin
|
6
|
+
|
7
|
+
This will create:
|
8
|
+
app/controllers/users_controller.rb
|
9
|
+
app/views/users/new.html.slim
|
10
|
+
app/views/users/show.html.slim
|
11
|
+
app/views/users/index.html.slim
|
@@ -0,0 +1,79 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
|
4
|
+
class CoffeescriptGenerator < Rails::Generators::NamedBase
|
5
|
+
|
6
|
+
|
7
|
+
source_root File.expand_path('../templates', __FILE__)
|
8
|
+
|
9
|
+
desc "This generator creates a coffee script file at app/assets/javascripts/partials"
|
10
|
+
|
11
|
+
argument :functions, type: :array, default: [], banner: "functionOne functionTwo"
|
12
|
+
|
13
|
+
|
14
|
+
attr_reader :namespace
|
15
|
+
|
16
|
+
|
17
|
+
def copy_template_file
|
18
|
+
@namespace = class_name.split("::")
|
19
|
+
@namespace.pop
|
20
|
+
@namespace = @namespace.join("::")
|
21
|
+
template "coffeescript.coffee.erb", file_path
|
22
|
+
end
|
23
|
+
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
def function_name
|
30
|
+
file_name.camelize(:lower)
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
def partial_file_name
|
36
|
+
"_#{file_name}"
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
def file_path
|
42
|
+
Rails.root.join("app/assets/javascripts/partials", partial_file_name + ".coffee")
|
43
|
+
end
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
def template_file_path(temp_name)
|
48
|
+
Rails.root.join('app', 'views', namespace_path + file_name, temp_name + ".html.slim")
|
49
|
+
end
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
def namespace_path
|
54
|
+
if namespace.blank?
|
55
|
+
return ""
|
56
|
+
else
|
57
|
+
namespace.split("::").map(&:underscore).join("/") + "/"
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
def singular_name
|
64
|
+
super.singularize
|
65
|
+
end
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
# def authenticate_actor?
|
70
|
+
# options['authenticate'].present?
|
71
|
+
# end
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
# def authenticate_actor
|
76
|
+
# options['authenticate']
|
77
|
+
# end
|
78
|
+
|
79
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<%= function_name %> = (->
|
2
|
+
|
3
|
+
init = ->
|
4
|
+
# Write your code here...
|
5
|
+
|
6
|
+
<%- functions.each do |functionName| %>
|
7
|
+
<%= functionName %> = ->
|
8
|
+
# Write your function here...
|
9
|
+
<%- end -%>
|
10
|
+
|
11
|
+
return { init }
|
12
|
+
)()
|
13
|
+
|
14
|
+
$(document).on "turbolinks:load", <%= function_name %>.init
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Description:
|
2
|
+
Replaces the Rails default controller generator with a cleaner, controller. Includes non-template actions, authentication, and SLIM templates
|
3
|
+
|
4
|
+
Example:
|
5
|
+
rails generate controller users new create show index --authenticate admin
|
6
|
+
|
7
|
+
This will create:
|
8
|
+
app/controllers/users_controller.rb
|
9
|
+
app/views/users/new.html.slim
|
10
|
+
app/views/users/show.html.slim
|
11
|
+
app/views/users/index.html.slim
|
@@ -0,0 +1,80 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
|
4
|
+
class ControllerGenerator < Rails::Generators::NamedBase
|
5
|
+
|
6
|
+
check_class_collision suffix: "Controller"
|
7
|
+
|
8
|
+
source_root File.expand_path('../templates', __FILE__)
|
9
|
+
|
10
|
+
desc "This generator creates an initializer file at config/initializers"
|
11
|
+
|
12
|
+
argument :actions, type: :array, default: [], banner: "action action"
|
13
|
+
|
14
|
+
class_option :authenticate, type: :string, default: nil
|
15
|
+
|
16
|
+
NON_TEMPLATE_ACTIONS = %w[create update destroy]
|
17
|
+
|
18
|
+
attr_reader :namespace
|
19
|
+
|
20
|
+
|
21
|
+
def copy_template_file
|
22
|
+
@namespace = class_name.split("::")
|
23
|
+
@namespace.pop
|
24
|
+
@namespace = @namespace.join("::")
|
25
|
+
template "controller.rb.erb", file_path
|
26
|
+
(actions - NON_TEMPLATE_ACTIONS).each do |temp_name|
|
27
|
+
template "view.html.slim", template_file_path(temp_name)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
|
35
|
+
def create_flash_message
|
36
|
+
"Successfully created #{singular_name}"
|
37
|
+
end
|
38
|
+
|
39
|
+
def update_flash_message
|
40
|
+
"Successfully updated #{singular_name}"
|
41
|
+
end
|
42
|
+
|
43
|
+
def destroy_flash_message
|
44
|
+
"Successfully destroyed #{singular_name}"
|
45
|
+
end
|
46
|
+
|
47
|
+
|
48
|
+
def file_path
|
49
|
+
Rails.root.join('app', 'controllers', namespace_path + file_name + "_controller.rb")
|
50
|
+
end
|
51
|
+
|
52
|
+
def template_file_path(temp_name)
|
53
|
+
Rails.root.join('app', 'views', namespace_path + file_name, temp_name + ".html.slim")
|
54
|
+
end
|
55
|
+
|
56
|
+
def namespace_path
|
57
|
+
if namespace.blank?
|
58
|
+
return ""
|
59
|
+
else
|
60
|
+
namespace.split("::").map(&:underscore).join("/") + "/"
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def singular_name
|
65
|
+
super.singularize
|
66
|
+
end
|
67
|
+
|
68
|
+
def parent_class_name
|
69
|
+
namespace.blank? ? 'ApplicationController' : namespace + "::BaseController"
|
70
|
+
end
|
71
|
+
|
72
|
+
def authenticate_actor?
|
73
|
+
options['authenticate'].present?
|
74
|
+
end
|
75
|
+
|
76
|
+
def authenticate_actor
|
77
|
+
options['authenticate']
|
78
|
+
end
|
79
|
+
|
80
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
class <%= class_name %>Controller < <%= parent_class_name %>
|
2
|
+
|
3
|
+
<%- if authenticate_actor? -%>
|
4
|
+
before_action :authenticate_<%= authenticate_actor %>!
|
5
|
+
<%- end -%>
|
6
|
+
|
7
|
+
<%- if actions.include?('index') -%>
|
8
|
+
def index
|
9
|
+
@<%= plural_name %> = <%= plural_name %>_scope
|
10
|
+
end
|
11
|
+
<%- end -%>
|
12
|
+
|
13
|
+
<%- if actions.include?('new') -%>
|
14
|
+
def new
|
15
|
+
@<%= singular_name %> = <%= plural_name %>_scope.new
|
16
|
+
end
|
17
|
+
<%- end -%>
|
18
|
+
|
19
|
+
<%- if actions.include?('create') -%>
|
20
|
+
def create
|
21
|
+
@<%= singular_name %> = <%= plural_name %>_scope.new(<%= singular_name %>_params)
|
22
|
+
if @<%= singular_name %>.save
|
23
|
+
redirect_to(<%= singular_name %>_url(@<%= singular_name %>), notice: "<%= create_flash_message %>")
|
24
|
+
else
|
25
|
+
render :new
|
26
|
+
end
|
27
|
+
end
|
28
|
+
<%- end -%>
|
29
|
+
|
30
|
+
<%- if actions.include?('show') -%>
|
31
|
+
def show
|
32
|
+
@<%= singular_name %> = <%= plural_name %>_scope.find(params[:id])
|
33
|
+
end
|
34
|
+
<%- end -%>
|
35
|
+
|
36
|
+
<%- if actions.include?('edit') -%>
|
37
|
+
def edit
|
38
|
+
@<%= singular_name %> = <%= plural_name %>_scope.find(params[:id])
|
39
|
+
end
|
40
|
+
<%- end -%>
|
41
|
+
|
42
|
+
<%- if actions.include?('update') -%>
|
43
|
+
def update
|
44
|
+
@<%= singular_name %> = <%= plural_name %>_scope.find(params[:id])
|
45
|
+
if @<%= singular_name %>.update(<%= singular_name %>_params)
|
46
|
+
redirect_to(<%= singular_name %>_url(@<%= singular_name %>), notice: "<%= update_flash_message %>")
|
47
|
+
else
|
48
|
+
render :edit
|
49
|
+
end
|
50
|
+
end
|
51
|
+
<%- end -%>
|
52
|
+
|
53
|
+
<%- if actions.include?('destroy') -%>
|
54
|
+
def destroy
|
55
|
+
@<%= singular_name %> = <%= plural_name %>_scope.find(params[:id])
|
56
|
+
@<%= singular_name %>.destroy
|
57
|
+
redirect_to(<%= singular_name %>_url(@<%= singular_name %>), notice: "<%= destroy_flash_message %>")
|
58
|
+
end
|
59
|
+
<%- end -%>
|
60
|
+
|
61
|
+
<%- if actions.any? -%>
|
62
|
+
private
|
63
|
+
|
64
|
+
|
65
|
+
def <%= plural_name %>_scope
|
66
|
+
<%= singular_name.classify %>.all
|
67
|
+
end
|
68
|
+
|
69
|
+
def <%= singular_name %>_params
|
70
|
+
params.require(:<%= singular_name %>).permit()
|
71
|
+
end
|
72
|
+
<%- end -%>
|
73
|
+
|
74
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Description:
|
2
|
+
Replaces the Rails default controller generator with a cleaner, controller. Includes non-template actions, authentication, and SLIM templates
|
3
|
+
|
4
|
+
Example:
|
5
|
+
rails generate controller users new create show index --authenticate admin
|
6
|
+
|
7
|
+
This will create:
|
8
|
+
app/controllers/users_controller.rb
|
9
|
+
app/views/users/new.html.slim
|
10
|
+
app/views/users/show.html.slim
|
11
|
+
app/views/users/index.html.slim
|
@@ -0,0 +1,61 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
|
4
|
+
class SassGenerator < Rails::Generators::NamedBase
|
5
|
+
|
6
|
+
|
7
|
+
source_root File.expand_path('../templates', __FILE__)
|
8
|
+
|
9
|
+
desc "This generator creates a coffee script file at app/assets/stylesheets/partials"
|
10
|
+
|
11
|
+
argument :elements, type: :array, default: [], banner: "element element"
|
12
|
+
|
13
|
+
|
14
|
+
attr_reader :namespace
|
15
|
+
|
16
|
+
|
17
|
+
def copy_template_file
|
18
|
+
@namespace = class_name.split("::")
|
19
|
+
@namespace.pop
|
20
|
+
@namespace = @namespace.join("::")
|
21
|
+
template "sass.sass.erb", file_path
|
22
|
+
end
|
23
|
+
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
def block_name
|
30
|
+
file_name.underscore
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
def partial_file_name
|
36
|
+
"_#{file_name}"
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
def file_path
|
42
|
+
Rails.root.join("app/assets/stylesheets/partials", partial_file_name + ".sass")
|
43
|
+
end
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
def namespace_path
|
48
|
+
if namespace.blank?
|
49
|
+
return ""
|
50
|
+
else
|
51
|
+
namespace.split("::").map(&:underscore).join("/") + "/"
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
def singular_name
|
58
|
+
super.singularize
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
data/lib/orthodox.rb
ADDED
data/orthodox.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "orthodox/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "orthodox"
|
8
|
+
spec.version = Orthodox::VERSION
|
9
|
+
spec.authors = ["Bodacious", 'CodeMeister']
|
10
|
+
spec.email = ["team@katanacode.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Better Rails generators for Katana}
|
13
|
+
spec.description = %q{Replaces Rails generators with generators specific to Katana's workflow'}
|
14
|
+
spec.homepage = "https://github.com/KatanaCode/orthodox"
|
15
|
+
spec.license = "MIT"
|
16
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
17
|
+
|
18
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
19
|
+
f.match(%r{^(test|spec|features)/})
|
20
|
+
end
|
21
|
+
spec.bindir = "exe"
|
22
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
|
+
spec.require_paths = ["lib", 'lib/generators']
|
24
|
+
spec.add_dependency 'rails', '>= 3.0.0'
|
25
|
+
spec.add_dependency 'slim-rails'
|
26
|
+
spec.add_development_dependency "bundler", "~> 1.15"
|
27
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,124 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: orthodox
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Bodacious
|
8
|
+
- CodeMeister
|
9
|
+
autorequire:
|
10
|
+
bindir: exe
|
11
|
+
cert_chain: []
|
12
|
+
date: 2017-12-07 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rails
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 3.0.0
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 3.0.0
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: slim-rails
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: bundler
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '1.15'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '1.15'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: rake
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '10.0'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '10.0'
|
70
|
+
description: Replaces Rails generators with generators specific to Katana's workflow'
|
71
|
+
email:
|
72
|
+
- team@katanacode.com
|
73
|
+
executables: []
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- ".gitignore"
|
78
|
+
- Gemfile
|
79
|
+
- LICENSE.txt
|
80
|
+
- README.md
|
81
|
+
- Rakefile
|
82
|
+
- bin/console
|
83
|
+
- bin/setup
|
84
|
+
- lib/generators/coffeescript/USAGE
|
85
|
+
- lib/generators/coffeescript/coffeescript_generator.rb
|
86
|
+
- lib/generators/coffeescript/templates/coffeescript.coffee.erb
|
87
|
+
- lib/generators/controller/USAGE
|
88
|
+
- lib/generators/controller/controller_generator.rb
|
89
|
+
- lib/generators/controller/templates/controller.rb.erb
|
90
|
+
- lib/generators/controller/templates/view.html.slim
|
91
|
+
- lib/generators/sass/USAGE
|
92
|
+
- lib/generators/sass/sass_generator.rb
|
93
|
+
- lib/generators/sass/templates/sass.sass.erb
|
94
|
+
- lib/orthodox.rb
|
95
|
+
- lib/orthodox/railtie.rb
|
96
|
+
- lib/orthodox/version.rb
|
97
|
+
- orthodox.gemspec
|
98
|
+
homepage: https://github.com/KatanaCode/orthodox
|
99
|
+
licenses:
|
100
|
+
- MIT
|
101
|
+
metadata:
|
102
|
+
allowed_push_host: https://rubygems.org
|
103
|
+
post_install_message:
|
104
|
+
rdoc_options: []
|
105
|
+
require_paths:
|
106
|
+
- lib
|
107
|
+
- lib/generators
|
108
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '0'
|
113
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
requirements: []
|
119
|
+
rubyforge_project:
|
120
|
+
rubygems_version: 2.7.1
|
121
|
+
signing_key:
|
122
|
+
specification_version: 4
|
123
|
+
summary: Better Rails generators for Katana
|
124
|
+
test_files: []
|