happy_seed 0.0.8 → 0.0.9
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/lib/generators/happy_seed/admin/admin_generator.rb +9 -4
- data/lib/generators/happy_seed/angular_install/templates/app/views/layouts/angular.html.haml +6 -7
- data/lib/generators/happy_seed/bootstrap/bootstrap_generator.rb +4 -1
- data/lib/generators/happy_seed/bootstrap/templates/app/views/application/_flashes.html.haml +1 -1
- data/lib/generators/happy_seed/bootstrap/templates/app/views/application/_header.html.haml +15 -14
- data/lib/generators/happy_seed/bootstrap/templates/app/views/layouts/application.html.haml +6 -7
- data/lib/generators/happy_seed/bootstrap/templates/lib/templates/haml/scaffold/edit.html.haml +10 -9
- data/lib/generators/happy_seed/bootstrap/templates/lib/templates/haml/scaffold/index.html.haml +21 -20
- data/lib/generators/happy_seed/bootstrap/templates/lib/templates/haml/scaffold/new.html.haml +7 -6
- data/lib/generators/happy_seed/bootstrap/templates/lib/templates/haml/scaffold/show.html.haml +14 -13
- data/lib/generators/happy_seed/devise/devise_generator.rb +8 -7
- data/lib/generators/happy_seed/happy_seed_generator.rb +1 -1
- data/lib/generators/happy_seed/omniauth/omniauth_generator.rb +1 -1
- data/lib/happy_seed/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c525f41a5bf78c69c977b19184914c4ebb19057b
|
|
4
|
+
data.tar.gz: 21a91f1cea0afd20f4f6e531d7c50cd0c8df631f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5db1e04ddb6126e889c52e7f2cfd0a689f4bedf1b10ba00c258b57adc2c56ad65f261f8568c12c5b7b41623348bf2fa0dd9ce93c23b6cc88289a6fd06a9d6a2c
|
|
7
|
+
data.tar.gz: b9c21b8fa10f6cef912d2a40254081d3dcfe675e04568d45b943041138a3c3ee56ac54cea5375c23545f9923be021dc641d833ceae6d7410a9b9f9e600c0e416
|
|
@@ -25,13 +25,18 @@ module HappySeed
|
|
|
25
25
|
insert_into_file "config/initializers/active_admin.rb", " config.register_javascript '//www.google.com/jsapi'\n config.register_javascript 'chartkick.js'\n", :after => "To load a javascript file:\n"
|
|
26
26
|
append_to_file "config/initializers/assets.rb", "\nRails.application.config.assets.precompile += %w( chartkick.js )\n"
|
|
27
27
|
|
|
28
|
+
inject_into_file 'config/application.rb', after: "config.generators do |g|\n" do <<-'RUBY'
|
|
29
|
+
g.scaffold_controller "scaffold_controller"
|
|
30
|
+
RUBY
|
|
31
|
+
end
|
|
32
|
+
|
|
28
33
|
route <<-'ROUTE'
|
|
29
34
|
namespace :admin do
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
# get "/stats" => "stats#stats"
|
|
36
|
+
devise_scope :admin_user do
|
|
37
|
+
get '/stats/:scope' => "stats#stats", as: :admin_stats
|
|
38
|
+
end
|
|
33
39
|
end
|
|
34
|
-
end
|
|
35
40
|
ROUTE
|
|
36
41
|
|
|
37
42
|
|
data/lib/generators/happy_seed/angular_install/templates/app/views/layouts/angular.html.haml
CHANGED
|
@@ -4,13 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
%body{ :class => "#{ controller.controller_name }", "ng-app" => "HappySeed"}
|
|
6
6
|
= render 'chromeframe'
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
= render 'flashes'
|
|
7
|
+
= render 'header'
|
|
8
|
+
= render 'flashes'
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
= yield
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
= render 'footer'
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
-# Javascript at the bottom for fast page loading
|
|
15
|
+
= render 'javascripts'
|
|
@@ -22,9 +22,12 @@ module HappySeed
|
|
|
22
22
|
directory 'docs'
|
|
23
23
|
|
|
24
24
|
inject_into_file 'config/application.rb', before: "end\nend\n" do <<-'RUBY'
|
|
25
|
-
config.
|
|
25
|
+
config.action_view.field_error_proc = Proc.new { |html_tag, instance| html_tag }
|
|
26
|
+
config.generators do |g|
|
|
26
27
|
g.stylesheets = false
|
|
28
|
+
g.scaffold_controller "scaffold_controller"
|
|
27
29
|
end
|
|
30
|
+
|
|
28
31
|
RUBY
|
|
29
32
|
end
|
|
30
33
|
if File.exists?( File.join( destination_root, ".env" ) )
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
%header#top.navbar.navbar-default{:role=>:banner}
|
|
2
|
-
.
|
|
3
|
-
|
|
4
|
-
%
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
%
|
|
13
|
-
%
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
.container-fluid
|
|
3
|
+
.navbar-header
|
|
4
|
+
%button.navbar-toggle{:type=>:button, 'data-toggle'=>:collapse, 'data-target'=>'.navbar-collapse'}
|
|
5
|
+
%span.sr-only Toggle navigations
|
|
6
|
+
%span.icon-bar
|
|
7
|
+
%span.icon-bar
|
|
8
|
+
%span.icon-bar
|
|
9
|
+
= link_to root_path, :class=>'navbar-brand' do
|
|
10
|
+
%span.glyphicon.glyphicon-cloud
|
|
11
|
+
App name
|
|
12
|
+
%nav.collapse.navbar-collapse{:role=>:navigation}
|
|
13
|
+
%ul.nav.navbar-nav
|
|
14
|
+
%li= link_to 'Contact', '#'
|
|
15
|
+
%li= link_to 'Blog', '#'
|
|
16
|
+
/ USER NAV
|
|
@@ -4,13 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
%body{ :class => "#{ controller.controller_name }" }
|
|
6
6
|
= render 'chromeframe'
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
= render 'flashes'
|
|
7
|
+
= render 'header'
|
|
8
|
+
= render 'flashes'
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
= yield
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
= render 'footer'
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
-# Javascript at the bottom for fast page loading
|
|
15
|
+
= render 'javascripts'
|
data/lib/generators/happy_seed/bootstrap/templates/lib/templates/haml/scaffold/edit.html.haml
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
.container
|
|
2
|
+
.page-header
|
|
3
|
+
= link_to <%= index_helper %>_path, :class => 'btn btn-default' do
|
|
4
|
+
%span.glyphicon.glyphicon-list-alt
|
|
5
|
+
Back
|
|
6
|
+
= link_to @<%= singular_table_name %>, :class => 'btn btn-primary' do
|
|
7
|
+
%span.glyphicon.glyphicon-info-sign
|
|
8
|
+
Show
|
|
9
|
+
%h1 Editing <%= singular_table_name %>
|
|
9
10
|
|
|
10
|
-
= render 'form'
|
|
11
|
+
= render 'form'
|
data/lib/generators/happy_seed/bootstrap/templates/lib/templates/haml/scaffold/index.html.haml
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
.container
|
|
2
|
+
.page-header
|
|
3
|
+
= link_to new_<%= singular_table_name %>_path, :class => 'btn btn-primary' do
|
|
4
|
+
%span.glyphicon.glyphicon-plus
|
|
5
|
+
New <%= human_name %>
|
|
6
|
+
%h1 Listing <%= plural_table_name %>
|
|
6
7
|
|
|
7
|
-
.table-responsive
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
.table-responsive
|
|
9
|
+
%table.table.table-striped.table-bordered.table-hover
|
|
10
|
+
%thead
|
|
11
|
+
%tr
|
|
11
12
|
<% for attribute in attributes -%>
|
|
12
|
-
|
|
13
|
+
%th <%= attribute.human_name %>
|
|
13
14
|
<% end -%>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
%th
|
|
16
|
+
%th
|
|
17
|
+
%th
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
%tbody
|
|
20
|
+
- @<%= plural_table_name %>.each do |<%= singular_table_name %>|
|
|
21
|
+
%tr
|
|
21
22
|
<% for attribute in attributes -%>
|
|
22
|
-
|
|
23
|
+
%td= <%= singular_table_name %>.<%= attribute.name %>
|
|
23
24
|
<% end -%>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
%td= link_to 'Show', <%= singular_table_name %>
|
|
26
|
+
%td= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>)
|
|
27
|
+
%td= link_to 'Destroy', <%= singular_table_name %>, :data => { confirm: 'Are you sure?' }, :method => :delete
|
data/lib/generators/happy_seed/bootstrap/templates/lib/templates/haml/scaffold/new.html.haml
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
.container
|
|
2
|
+
.page-header
|
|
3
|
+
= link_to <%= index_helper %>_path, :class => 'btn btn-default' do
|
|
4
|
+
%span.glyphicon.glyphicon-list-alt
|
|
5
|
+
Back
|
|
6
|
+
%h1 New <%= singular_table_name %>
|
|
6
7
|
|
|
7
|
-
= render 'form'
|
|
8
|
+
= render 'form'
|
|
8
9
|
|
data/lib/generators/happy_seed/bootstrap/templates/lib/templates/haml/scaffold/show.html.haml
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
.container
|
|
2
|
+
.page-header
|
|
3
|
+
= link_to <%= index_helper %>_path, :class => 'btn btn-default' do
|
|
4
|
+
%span.glyphicon.glyphicon-list-alt
|
|
5
|
+
Back
|
|
6
|
+
= link_to edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), :class => 'btn btn-primary' do
|
|
7
|
+
%span.glyphicon.glyphicon-pencil
|
|
8
|
+
Edit
|
|
9
|
+
%h1 Show <%= singular_table_name %>
|
|
9
10
|
|
|
10
|
-
%dl.dl-horizontal
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
%dl.dl-horizontal
|
|
12
|
+
<%- for attribute in attributes -%>
|
|
13
|
+
%dt <%= attribute.human_name %>:
|
|
14
|
+
%dd= @<%= singular_table_name %>.<%= attribute.name %>
|
|
15
|
+
<%- end -%>
|
|
15
16
|
|
|
@@ -44,13 +44,14 @@ module HappySeed
|
|
|
44
44
|
|
|
45
45
|
if File.exists?( File.join( destination_root, 'app/views/application/_header.html.haml' ) )
|
|
46
46
|
gsub_file 'app/views/application/_header.html.haml', "/ USER NAV", <<-'RUBY'
|
|
47
|
-
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
|
|
48
|
+
%ul.nav.navbar-nav.navbar-right
|
|
49
|
+
- if user_signed_in?
|
|
50
|
+
%li= link_to 'Sign Out', destroy_user_session_path, :method=>:delete
|
|
51
|
+
- else
|
|
52
|
+
/ CONNECT
|
|
53
|
+
%li= link_to 'Sign In', new_user_session_path
|
|
54
|
+
%li= link_to 'Sign Up', new_user_registration_path
|
|
54
55
|
RUBY
|
|
55
56
|
else
|
|
56
57
|
say_status :gsub_file, "Can't find application/_header.html.haml, skipping"
|
|
@@ -32,7 +32,7 @@ module HappySeed
|
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
begin
|
|
35
|
-
inject_into_file 'app/views/application/_header.html.haml', "
|
|
35
|
+
inject_into_file 'app/views/application/_header.html.haml', " %li= link_to 'sign in with #{provider}', user_omniauth_authorize_path(:#{provider})\n", after: "/ CONNECT\n"
|
|
36
36
|
rescue
|
|
37
37
|
say_status :header_links, "Unable to add links to the nav bar header", :red
|
|
38
38
|
end
|
|
@@ -41,7 +41,7 @@ module HappySeed
|
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
begin
|
|
44
|
-
insert_into_file "app/views/application/_header.html.haml", "
|
|
44
|
+
insert_into_file "app/views/application/_header.html.haml", " %li= link_to 'Account', user_path\n", after: " - if user_signed_in?\n"
|
|
45
45
|
rescue
|
|
46
46
|
say_status :header_links, "Unable to add user accounts links to the nav bar", :red
|
|
47
47
|
end
|
data/lib/happy_seed/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: happy_seed
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Will Schenk
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2014-
|
|
12
|
+
date: 2014-09-01 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rails
|