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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 095f6b6f268260aa5455d3c28f28f184dbaadc87
4
- data.tar.gz: 6dd35f99936ad73d1bab319593b86e9ccaaab39e
3
+ metadata.gz: c525f41a5bf78c69c977b19184914c4ebb19057b
4
+ data.tar.gz: 21a91f1cea0afd20f4f6e531d7c50cd0c8df631f
5
5
  SHA512:
6
- metadata.gz: fa150bfe9aebda139fa65df24aab80b4daad5ade0bddb5a42a8d43606474210e92c00b4dccb19b939c581442859a9be2fba7acc6044be6960c94ee87ff9e3e8a
7
- data.tar.gz: 5910192e7cec40441a2e8b779dc369a86015503331d1b14e35ef23c5714d7718c60eda11172c244611deace619829054e11d8a7f9824312c69399607ad1aa533
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
- # get "/stats" => "stats#stats"
31
- devise_scope :admin_user do
32
- get '/stats/:scope' => "stats#stats", as: :admin_stats
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
 
@@ -4,13 +4,12 @@
4
4
 
5
5
  %body{ :class => "#{ controller.controller_name }", "ng-app" => "HappySeed"}
6
6
  = render 'chromeframe'
7
- .container
8
- = render 'header'
9
- = render 'flashes'
7
+ = render 'header'
8
+ = render 'flashes'
10
9
 
11
- = yield
10
+ = yield
12
11
 
13
- = render 'footer'
12
+ = render 'footer'
14
13
 
15
- -# Javascript at the bottom for fast page loading
16
- = render 'javascripts'
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.generators do |g|
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,5 +1,5 @@
1
1
  - if !flash.empty?
2
- #flash
2
+ .container#flash
3
3
  - flash.each do |key, value|
4
4
  %div{ :title => key.to_s.humanize, :class => flash_class(key), :role => "alert" }
5
5
  %button.close{ "type" => "button", "data-dismiss" => "alert"}
@@ -1,15 +1,16 @@
1
1
  %header#top.navbar.navbar-default{:role=>:banner}
2
- .navbar-header
3
- %button.navbar-toggle{:type=>:button, 'data-toggle'=>:collapse, 'data-target'=>'.navbar-collapse'}
4
- %span.sr-only Toggle navigations
5
- %span.icon-bar
6
- %span.icon-bar
7
- %span.icon-bar
8
- = link_to root_path, :class=>'navbar-brand' do
9
- %span.glyphicon.glyphicon-cloud
10
- App name
11
- %nav.collapse.navbar-collapse{:role=>:navigation}
12
- %ul.nav.navbar-nav
13
- %li= link_to 'Contact', '#'
14
- %li= link_to 'Blog', '#'
15
- / USER NAV
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
- .container
8
- = render 'header'
9
- = render 'flashes'
7
+ = render 'header'
8
+ = render 'flashes'
10
9
 
11
- = yield
10
+ = yield
12
11
 
13
- = render 'footer'
12
+ = render 'footer'
14
13
 
15
- -# Javascript at the bottom for fast page loading
16
- = render 'javascripts'
14
+ -# Javascript at the bottom for fast page loading
15
+ = render 'javascripts'
@@ -1,10 +1,11 @@
1
- .page-header
2
- = link_to <%= index_helper %>_path, :class => 'btn btn-default' do
3
- %span.glyphicon.glyphicon-list-alt
4
- Back
5
- = link_to @<%= singular_table_name %>, :class => 'btn btn-primary' do
6
- %span.glyphicon.glyphicon-info-sign
7
- Show
8
- %h1 Editing <%= singular_table_name %>
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'
@@ -1,26 +1,27 @@
1
- .page-header
2
- = link_to new_<%= singular_table_name %>_path, :class => 'btn btn-primary' do
3
- %span.glyphicon.glyphicon-plus
4
- New <%= human_name %>
5
- %h1 Listing <%= plural_table_name %>
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
- %table.table.table-striped.table-bordered.table-hover
9
- %thead
10
- %tr
8
+ .table-responsive
9
+ %table.table.table-striped.table-bordered.table-hover
10
+ %thead
11
+ %tr
11
12
  <% for attribute in attributes -%>
12
- %th <%= attribute.human_name %>
13
+ %th <%= attribute.human_name %>
13
14
  <% end -%>
14
- %th
15
- %th
16
- %th
15
+ %th
16
+ %th
17
+ %th
17
18
 
18
- %tbody
19
- - @<%= plural_table_name %>.each do |<%= singular_table_name %>|
20
- %tr
19
+ %tbody
20
+ - @<%= plural_table_name %>.each do |<%= singular_table_name %>|
21
+ %tr
21
22
  <% for attribute in attributes -%>
22
- %td= <%= singular_table_name %>.<%= attribute.name %>
23
+ %td= <%= singular_table_name %>.<%= attribute.name %>
23
24
  <% end -%>
24
- %td= link_to 'Show', <%= singular_table_name %>
25
- %td= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>)
26
- %td= link_to 'Destroy', <%= singular_table_name %>, :data => { confirm: 'Are you sure?' }, :method => :delete
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
@@ -1,8 +1,9 @@
1
- .page-header
2
- = link_to <%= index_helper %>_path, :class => 'btn btn-default' do
3
- %span.glyphicon.glyphicon-list-alt
4
- Back
5
- %h1 New <%= singular_table_name %>
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
 
@@ -1,15 +1,16 @@
1
- .page-header
2
- = link_to <%= index_helper %>_path, :class => 'btn btn-default' do
3
- %span.glyphicon.glyphicon-list-alt
4
- Back
5
- = link_to edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), :class => 'btn btn-primary' do
6
- %span.glyphicon.glyphicon-pencil
7
- Edit
8
- %h1 Show <%= singular_table_name %>
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
- <%- for attribute in attributes -%>
12
- %dt <%= attribute.human_name %>:
13
- %dd= @<%= singular_table_name %>.<%= attribute.name %>
14
- <%- end -%>
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
- %ul.nav.navbar-nav.navbar-right
48
- - if user_signed_in?
49
- %li= link_to 'Sign Out', destroy_user_session_path, :method=>:delete
50
- - else
51
- / CONNECT
52
- %li= link_to 'Sign In', new_user_session_path
53
- %li= link_to 'Sign Up', new_user_registration_path
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', " %li= link_to 'sign in with #{provider}', user_omniauth_authorize_path(:#{provider})\n", after: "/ CONNECT\n"
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", " %li= link_to 'Account', user_path\n", after: " - if user_signed_in?\n"
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
@@ -1,3 +1,3 @@
1
1
  module HappySeed
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
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.8
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-08-11 00:00:00.000000000 Z
12
+ date: 2014-09-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails