common_core_js 0.0.2.alpha → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.generators +8 -0
- data/.gitignore +14 -0
- data/.rakeTasks +7 -0
- data/Gemfile +15 -0
- data/Gemfile.lock +175 -0
- data/LICENSE +10 -0
- data/README.md +288 -0
- data/Rakefile +32 -0
- data/app/assets/config/common_core_js_manifest.js +1 -0
- data/app/assets/images/common_core_js/.keep +0 -0
- data/app/assets/stylesheets/common_core_js/application.css +15 -0
- data/app/assets/stylesheets/common_core_js/common_core.scss +43 -0
- data/app/controllers/common_core_js/application_controller.rb +5 -0
- data/app/helpers/common_core_js/application_helper.rb +4 -0
- data/app/helpers/common_core_js/generator_helper.rb +0 -0
- data/app/jobs/common_core_js/application_job.rb +4 -0
- data/app/mailers/common_core_js/application_mailer.rb +6 -0
- data/app/models/common_core_js/application_record.rb +5 -0
- data/app/views/common/_common_create.js.erb +1 -1
- data/app/views/common/_common_destroy.js.erb +1 -1
- data/app/views/common/_common_index.js.erb +1 -1
- data/app/views/common/_common_new_form.haml +2 -2
- data/app/views/common/_common_update.js.erb +1 -1
- data/app/views/layouts/common_core_js/application.html.erb +15 -0
- data/bin/rails +14 -0
- data/common_core_js.gemspec +70 -0
- data/config/routes.rb +2 -0
- data/lib/.DS_Store +0 -0
- data/lib/common_core_js.rb +5 -6
- data/lib/common_core_js/engine.rb +5 -0
- data/lib/common_core_js/version.rb +3 -0
- data/lib/generators/common_core/USAGE +2 -4
- data/lib/generators/common_core/install_generator.rb +23 -0
- data/lib/generators/common_core/scaffold_generator.rb +300 -35
- data/lib/generators/common_core/templates/_edit.haml +1 -1
- data/lib/generators/common_core/templates/_form.haml +1 -0
- data/lib/generators/common_core/templates/_line.haml +3 -0
- data/lib/generators/common_core/templates/_list.haml +1 -1
- data/lib/generators/common_core/templates/_new.haml +3 -1
- data/lib/generators/common_core/templates/all.haml +4 -0
- data/lib/generators/common_core/templates/common_core.js +37 -0
- data/lib/generators/common_core/templates/common_core.scss +0 -0
- data/lib/generators/common_core/templates/controller.rb +21 -10
- data/lib/generators/common_core/templates/controller_spec.rb +110 -0
- data/lib/generators/common_core/templates/edit.js.erb +1 -1
- data/lib/generators/common_core/templates/update.js.erb +1 -1
- data/lib/tasks/common_core_js_tasks.rake +7 -0
- metadata +132 -38
- data/app/assets/config/manifest.js +0 -3
- data/lib/version.rb +0 -4
@@ -1 +1 @@
|
|
1
|
-
= render partial: "common/common_edit_form", locals: {singular: '<%= @singular %>', object: <%= @singular %>, url: <%=
|
1
|
+
= render partial: "common/common_edit_form", locals: {singular: '<%= @singular %>', object: <%= @singular %>, url: <%= path_helper_singular %>(<%= path_arity %>), colspan: colspan}
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= all_form_fields %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
= link_to "New <%= singular.gsub('_',' ') %>", <%=
|
2
|
+
= link_to "New <%= singular.gsub('_',' ') %>", new_<%= path_helper_singular %>(<%= nested_arity_for_path %>), disable_with: "Loading...", remote: true, class: "new-<%= singular %>-button btn btn-primary pull-right"
|
3
3
|
|
4
4
|
.clearfix
|
5
5
|
.new-<%= singular %>-form{style: "display: none; position: relative;"}
|
@@ -1 +1,3 @@
|
|
1
|
-
= render partial: "common/common_new_form", locals: {singular: '<%= singular %>', plural: "<%= plural %>", object: @<%= singular %>, url: <%=
|
1
|
+
= render partial: "common/common_new_form", locals: {singular: '<%= singular %>', plural: "<%= plural %>", object: @<%= singular %>, url: <%= path_helper_plural %>(<%= nested_objects_arity %>)}
|
2
|
+
|
3
|
+
|
@@ -0,0 +1,37 @@
|
|
1
|
+
|
2
|
+
require("jquery")
|
3
|
+
console.log("loading common core...")
|
4
|
+
|
5
|
+
$(function(){
|
6
|
+
// always pass csrf tokens on ajax calls
|
7
|
+
$.ajaxSetup({
|
8
|
+
headers: { 'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content') }
|
9
|
+
});
|
10
|
+
});
|
11
|
+
|
12
|
+
$(document).on('turbolinks:load', function() {
|
13
|
+
$(document).ready(() => {
|
14
|
+
$("body").on("click", "[data-role='close-button']", (event) => {
|
15
|
+
var form_name;
|
16
|
+
form_name = $(event.currentTarget).data("name");
|
17
|
+
row_id = $(event.currentTarget).data("row-id");
|
18
|
+
|
19
|
+
if (row_id) {
|
20
|
+
$("table." + form_name + "-table tr[data-id=" + row_id + "][data-edit='true']").remove()
|
21
|
+
$("table." + form_name + "-table tr[data-id=" + row_id + "]:not([data-edit='true'])").fadeIn()
|
22
|
+
$("table." + form_name + "-table tr[data-id=" + row_id + "]:not([data-edit='true']) .show-area").show()
|
23
|
+
} else {
|
24
|
+
if ($(".new-" + form_name + "-form").length == 0) {
|
25
|
+
throw("ERROR: not found" + " .new-" + form_name + "-form")
|
26
|
+
}
|
27
|
+
var $form = $(event.currentTarget).closest(".new-" + form_name + "-form")
|
28
|
+
$form.slideUp()
|
29
|
+
$form.siblings(".new-" + form_name + "-button").fadeIn()
|
30
|
+
$form.find("i").remove()
|
31
|
+
}
|
32
|
+
})
|
33
|
+
})
|
34
|
+
});
|
35
|
+
|
36
|
+
|
37
|
+
|
File without changes
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class <%= controller_class_name %> < ApplicationController
|
2
|
-
<% unless @auth_identifier.
|
2
|
+
<% unless @auth_identifier.nil? %>
|
3
3
|
before_action :authenticate_<%= auth_identifier %>!
|
4
4
|
|
5
5
|
<% end %>
|
@@ -20,28 +20,27 @@ class <%= controller_class_name %> < ApplicationController
|
|
20
20
|
end<% end %> <% end %>
|
21
21
|
|
22
22
|
def load_<%= singular_name %>
|
23
|
-
@<%= singular_name %> = <%=
|
23
|
+
@<%= singular_name %> = <%= object_scope %>.find(params[:id])
|
24
24
|
end
|
25
25
|
|
26
26
|
def index
|
27
|
-
@<%= plural_name %> = <%=
|
28
|
-
.page(params[:page])
|
27
|
+
@<%= plural_name %> = <%= object_scope %><% if model_has_strings? %>.where(<%=class_name %>.arel_table[:email].matches("%#{@__general_string}%"))<% end %>.page(params[:page])
|
29
28
|
|
30
29
|
respond_to do |format|
|
31
30
|
format.js<% if @with_index %>
|
32
|
-
format.html {render '
|
31
|
+
format.html {render 'all.haml'}<% end %>
|
33
32
|
end
|
34
33
|
end
|
35
34
|
|
36
35
|
def new
|
37
|
-
@<%= singular_name %> = <%= class_name %>.new(
|
36
|
+
@<%= singular_name %> = <%= class_name %>.new(<%= create_merge_params %>)
|
38
37
|
respond_to do |format|
|
39
38
|
format.js
|
40
39
|
end
|
41
40
|
end
|
42
41
|
|
43
42
|
def create
|
44
|
-
@<%=singular_name %> = <%=class_name %>.create(<%=singular_name %>_params<%= create_merge_params %>)
|
43
|
+
@<%=singular_name %> = <%=class_name %>.create(<%=singular_name %>_params<% if !create_merge_params.empty? %>.merge!(<%= create_merge_params %>)<%end%>)
|
45
44
|
respond_to do |format|
|
46
45
|
if @<%= singular_name %>.save
|
47
46
|
format.js
|
@@ -59,16 +58,14 @@ class <%= controller_class_name %> < ApplicationController
|
|
59
58
|
end
|
60
59
|
|
61
60
|
def edit
|
62
|
-
|
63
61
|
respond_to do |format|
|
64
62
|
format.js
|
65
63
|
end
|
66
64
|
end
|
67
65
|
|
68
66
|
def update
|
69
|
-
|
70
67
|
respond_to do |format|
|
71
|
-
if !@<%=singular_name %>.
|
68
|
+
if !@<%=singular_name %>.update(<%= singular %>_params)
|
72
69
|
flash[:alert] = "<%=singular_name.titlecase %> could not be saved"
|
73
70
|
end
|
74
71
|
format.js {}
|
@@ -93,6 +90,20 @@ class <%= controller_class_name %> < ApplicationController
|
|
93
90
|
def default_colspan
|
94
91
|
<%= @default_colspan %>
|
95
92
|
end
|
93
|
+
|
94
|
+
def namespace
|
95
|
+
<% if @namespace %>
|
96
|
+
"<%= @namespace %>/"
|
97
|
+
<% else %>
|
98
|
+
""
|
99
|
+
<% end %>
|
100
|
+
end
|
101
|
+
|
102
|
+
|
103
|
+
def common_scope
|
104
|
+
@nested_args
|
105
|
+
end
|
106
|
+
|
96
107
|
end
|
97
108
|
|
98
109
|
|
@@ -0,0 +1,110 @@
|
|
1
|
+
require 'rails_helper'
|
2
|
+
|
3
|
+
describe <%= controller_class_name %> do
|
4
|
+
render_views
|
5
|
+
<% unless @auth.nil? %> let(:<%= @auth %>) {create(:<%= @auth.gsub('current_', '') %>)}<%end%>
|
6
|
+
let(:<%= singular %>) {create(:<%= singular %><%= object_parent_mapping_as_argument_for_specs %> )}
|
7
|
+
|
8
|
+
<%= objest_nest_factory_setup %>
|
9
|
+
|
10
|
+
before(:each) do
|
11
|
+
@request.env["devise.mapping"] = Devise.mappings[:account]
|
12
|
+
|
13
|
+
sign_in <%= @auth %>, scope: :<%= @auth_identifier %>
|
14
|
+
end
|
15
|
+
|
16
|
+
describe "index" do
|
17
|
+
it "should respond" do
|
18
|
+
get :index, xhr: true, format: 'js', params: {
|
19
|
+
<%= objest_nest_params_by_id_for_specs %>
|
20
|
+
}
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
describe "new" do
|
25
|
+
it "should show form" do
|
26
|
+
get :new, xhr: true, format: 'js', params: {
|
27
|
+
<%= objest_nest_params_by_id_for_specs %>
|
28
|
+
}
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe "create" do
|
33
|
+
it "should create a new <%= singular %>" do
|
34
|
+
expect {
|
35
|
+
post :create, xhr: true, format: 'js', params: {
|
36
|
+
<%= (@nested_args.empty? ? "" : objest_nest_params_by_id_for_specs + ",") %>
|
37
|
+
<%= singular %>: {
|
38
|
+
<%= columns_spec_with_sample_data %>
|
39
|
+
}}
|
40
|
+
}.to change { <%= @singular_class %>.all.count }.by(1)
|
41
|
+
assert_response :ok
|
42
|
+
end
|
43
|
+
|
44
|
+
# it "should not create if there are errors" do
|
45
|
+
# post :create, xhr: true, format: 'js', params: {id: <%= singular %>.id,
|
46
|
+
# <%= singular %>: {skin_id: nil}}
|
47
|
+
#
|
48
|
+
# expect(controller).to set_flash.now[:alert].to(/Oops, your <%= singular %> could not be saved/)
|
49
|
+
# end
|
50
|
+
end
|
51
|
+
|
52
|
+
describe "edit" do
|
53
|
+
it "should return an editable form" do
|
54
|
+
get :edit, xhr: true, format: 'js', params: {
|
55
|
+
<%= (@nested_args.empty? ? "" : objest_nest_params_by_id_for_specs + ",") %>
|
56
|
+
id: <%= singular %>.id
|
57
|
+
}
|
58
|
+
assert_response :ok
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
describe "show" do
|
63
|
+
it "should return a view form" do
|
64
|
+
get :show, xhr: true, format: 'js', params: {
|
65
|
+
<%= (@nested_args.empty? ? "" : objest_nest_params_by_id_for_specs + ",") %>
|
66
|
+
id: <%= singular %>.id
|
67
|
+
}
|
68
|
+
assert_response :ok
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
describe "update" do
|
73
|
+
it "should update" do
|
74
|
+
put :update, xhr: true, format: 'js',
|
75
|
+
params: {
|
76
|
+
<%= (@nested_args.empty? ? "" : objest_nest_params_by_id_for_specs + ",") %>
|
77
|
+
id: <%= singular %>.id,
|
78
|
+
<%= singular %>: {
|
79
|
+
<%= columns_spec_with_sample_data %>
|
80
|
+
}}
|
81
|
+
|
82
|
+
assert_response :ok
|
83
|
+
end
|
84
|
+
|
85
|
+
# it "should not update if invalid" do
|
86
|
+
# put :update, xhr: true, format: 'js',
|
87
|
+
# params: {
|
88
|
+
# id: <%= singular %>.id,
|
89
|
+
# <%= singular %>: {
|
90
|
+
# <%= columns_spec_with_sample_data %>
|
91
|
+
# }}
|
92
|
+
#
|
93
|
+
# assert_response :ok
|
94
|
+
#
|
95
|
+
# expect(controller).to set_flash.now[:alert].to(/Oops, your <%= singular %> could not be saved/)
|
96
|
+
# end
|
97
|
+
end
|
98
|
+
|
99
|
+
describe "#destroy" do
|
100
|
+
it "should destroy" do
|
101
|
+
post :destroy, format: 'js', params: {
|
102
|
+
<%= (@nested_args.empty? ? "" : objest_nest_params_by_id_for_specs + ",") %>
|
103
|
+
id: <%= singular %>.id
|
104
|
+
}
|
105
|
+
assert_response :ok
|
106
|
+
expect(<%= @singular_class %>.count).to be(0)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
@@ -1 +1 @@
|
|
1
|
-
<%%= render partial: 'common/common_edit', locals: {object: @<%= singular_name %>, singular: "<%= singular_name %>", plural: "<%= plural_name %>", url: <%=
|
1
|
+
<%%= render partial: 'common/common_edit', locals: {object: @<%= singular_name %>, singular: "<%= singular_name %>", plural: "<%= plural_name %>", url: <%= path_helper_singular %>(<%= path_arity %>)} %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%%= render partial: 'common/common_update', locals: {object: @<%= singular %>, singular: "<%= singular %>",
|
2
2
|
plural: "<%= plural %>",
|
3
|
-
url: <%=
|
3
|
+
url: <%= path_helper_singular %>(<%= path_arity %>),
|
4
4
|
pass_through_locals: {
|
5
5
|
<%= nested_assignments %>
|
6
6
|
}} %>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: common_core_js
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Fleetwood-Boldt
|
@@ -11,72 +11,142 @@ cert_chain: []
|
|
11
11
|
date: 2020-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ">"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1'
|
20
17
|
- - ">="
|
21
18
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
19
|
+
version: '0'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
|
-
- - "
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: kaminari
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
30
31
|
- - ">="
|
31
32
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
33
41
|
- !ruby/object:Gem::Dependency
|
34
42
|
name: haml-rails
|
35
43
|
requirement: !ruby/object:Gem::Requirement
|
36
44
|
requirements:
|
37
|
-
- - "
|
45
|
+
- - ">="
|
38
46
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: sass-rails
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
40
59
|
- - ">="
|
41
60
|
- !ruby/object:Gem::Version
|
42
|
-
version:
|
61
|
+
version: '0'
|
43
62
|
type: :runtime
|
44
63
|
prerelease: false
|
45
64
|
version_requirements: !ruby/object:Gem::Requirement
|
46
65
|
requirements:
|
47
|
-
- - "
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bootsnap
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
48
74
|
- !ruby/object:Gem::Version
|
49
|
-
version: '
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
50
80
|
- - ">="
|
51
81
|
- !ruby/object:Gem::Version
|
52
|
-
version:
|
82
|
+
version: '0'
|
53
83
|
- !ruby/object:Gem::Dependency
|
54
|
-
name:
|
84
|
+
name: bootstrap
|
55
85
|
requirement: !ruby/object:Gem::Requirement
|
56
86
|
requirements:
|
57
|
-
- - "
|
87
|
+
- - ">="
|
58
88
|
- !ruby/object:Gem::Version
|
59
|
-
version: '0
|
60
|
-
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: font-awesome-rails
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
61
102
|
- !ruby/object:Gem::Version
|
62
|
-
version: '0
|
63
|
-
type: :
|
103
|
+
version: '0'
|
104
|
+
type: :runtime
|
64
105
|
prerelease: false
|
65
106
|
version_requirements: !ruby/object:Gem::Requirement
|
66
107
|
requirements:
|
67
|
-
- - "
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: ffaker
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
68
116
|
- !ruby/object:Gem::Version
|
69
|
-
version: '0
|
70
|
-
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
71
123
|
- !ruby/object:Gem::Version
|
72
|
-
version: '0
|
124
|
+
version: '0'
|
73
125
|
description: Simple, plug & play Rails scaffolding with really simple Javascript
|
74
126
|
email: jason.fb@datatravels.com
|
75
127
|
executables: []
|
76
128
|
extensions: []
|
77
129
|
extra_rdoc_files: []
|
78
130
|
files:
|
79
|
-
-
|
131
|
+
- ".generators"
|
132
|
+
- ".gitignore"
|
133
|
+
- ".rakeTasks"
|
134
|
+
- Gemfile
|
135
|
+
- Gemfile.lock
|
136
|
+
- LICENSE
|
137
|
+
- README.md
|
138
|
+
- Rakefile
|
139
|
+
- app/.DS_Store
|
140
|
+
- app/assets/config/common_core_js_manifest.js
|
141
|
+
- app/assets/images/common_core_js/.keep
|
142
|
+
- app/assets/stylesheets/common_core_js/application.css
|
143
|
+
- app/assets/stylesheets/common_core_js/common_core.scss
|
144
|
+
- app/controllers/common_core_js/application_controller.rb
|
145
|
+
- app/helpers/common_core_js/application_helper.rb
|
146
|
+
- app/helpers/common_core_js/generator_helper.rb
|
147
|
+
- app/jobs/common_core_js/application_job.rb
|
148
|
+
- app/mailers/common_core_js/application_mailer.rb
|
149
|
+
- app/models/common_core_js/application_record.rb
|
80
150
|
- app/views/common/_common_create.js.erb
|
81
151
|
- app/views/common/_common_destroy.js.erb
|
82
152
|
- app/views/common/_common_edit.js.erb
|
@@ -86,40 +156,64 @@ files:
|
|
86
156
|
- app/views/common/_common_new_form.haml
|
87
157
|
- app/views/common/_common_show_form.haml
|
88
158
|
- app/views/common/_common_update.js.erb
|
159
|
+
- app/views/layouts/common_core_js/application.html.erb
|
160
|
+
- bin/rails
|
161
|
+
- common_core_js.gemspec
|
162
|
+
- config/routes.rb
|
89
163
|
- lib/.DS_Store
|
90
164
|
- lib/common_core_js.rb
|
165
|
+
- lib/common_core_js/engine.rb
|
166
|
+
- lib/common_core_js/version.rb
|
167
|
+
- lib/generators/.DS_Store
|
91
168
|
- lib/generators/common_core/USAGE
|
92
169
|
- lib/generators/common_core/erb/scaffold/common_core_scaffold_generator.rb
|
170
|
+
- lib/generators/common_core/install_generator.rb
|
93
171
|
- lib/generators/common_core/scaffold_generator.rb
|
94
172
|
- lib/generators/common_core/templates/_edit.haml
|
95
173
|
- lib/generators/common_core/templates/_form.haml
|
96
174
|
- lib/generators/common_core/templates/_line.haml
|
97
175
|
- lib/generators/common_core/templates/_list.haml
|
98
176
|
- lib/generators/common_core/templates/_new.haml
|
177
|
+
- lib/generators/common_core/templates/all.haml
|
178
|
+
- lib/generators/common_core/templates/common_core.js
|
179
|
+
- lib/generators/common_core/templates/common_core.scss
|
99
180
|
- lib/generators/common_core/templates/controller.rb
|
181
|
+
- lib/generators/common_core/templates/controller_spec.rb
|
100
182
|
- lib/generators/common_core/templates/create.js.erb
|
101
183
|
- lib/generators/common_core/templates/destroy.js.erb
|
102
184
|
- lib/generators/common_core/templates/edit.js.erb
|
103
185
|
- lib/generators/common_core/templates/index.js.erb
|
104
186
|
- lib/generators/common_core/templates/new.js.erb
|
105
187
|
- lib/generators/common_core/templates/update.js.erb
|
106
|
-
- lib/
|
107
|
-
homepage:
|
188
|
+
- lib/tasks/common_core_js_tasks.rake
|
189
|
+
homepage: https://blog.jasonfleetwoodboldt.com/common-core-js/
|
108
190
|
licenses:
|
109
191
|
- MIT
|
110
192
|
metadata:
|
111
193
|
source_code_uri: https://github.com/jasonfb/common_core_js
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
194
|
+
documentation_uri: https://github.com/jasonfb/common_core_js
|
195
|
+
homepage_uri: https://blog.jasonfleetwoodboldt.com/common-core-js/
|
196
|
+
mailing_list_uri: https://blog.jasonfleetwoodboldt.com/#sfba-form2-container
|
197
|
+
post_install_message: |
|
198
|
+
---------------------------------------------
|
199
|
+
Welcome to Common Core
|
200
|
+
|
201
|
+
rails generate common_score:scaffold Thing
|
202
|
+
|
203
|
+
* Build plug-and-play scaffolding mixing HAML with jQuery-based Javascript
|
204
|
+
* Automatically Reads Your Models (make them before building your scaffolding!)
|
205
|
+
* Excellent for CRUD, lists with pagination, searching, sorting.
|
206
|
+
* Wonderful for prototyping.
|
207
|
+
* Plays nicely with Devise, Kaminari, Haml-Rails, Rspec.
|
208
|
+
* Create specs autoamatically along with the controllers.
|
209
|
+
* Nest your routes model-by-model for built-in poor man's authentication
|
210
|
+
* Throw the scaffolding away when your app is ready to graduate to its next phase.
|
211
|
+
|
212
|
+
see README for complete instructions.
|
213
|
+
---------------------------------------------
|
119
214
|
rdoc_options: []
|
120
215
|
require_paths:
|
121
216
|
- lib
|
122
|
-
- app
|
123
217
|
required_ruby_version: !ruby/object:Gem::Requirement
|
124
218
|
requirements:
|
125
219
|
- - ">="
|
@@ -127,9 +221,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
127
221
|
version: '0'
|
128
222
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
223
|
requirements:
|
130
|
-
- - "
|
224
|
+
- - ">="
|
131
225
|
- !ruby/object:Gem::Version
|
132
|
-
version:
|
226
|
+
version: '0'
|
133
227
|
requirements: []
|
134
228
|
rubygems_version: 3.0.3
|
135
229
|
signing_key:
|