johnhenry 1.0.11 → 1.0.12

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: f93e7fff2a12bff68441c0db79188fcdd07613cf
4
- data.tar.gz: 89a18c14e02a9d9f8cad13941c5c6272eab9cf74
3
+ metadata.gz: 0fe0b7023efd4b5cd0466c4549141db28b038de5
4
+ data.tar.gz: 35aeddf964e32d4e934a0dd5294a2d25b887666f
5
5
  SHA512:
6
- metadata.gz: 93f52784d4c2a90cb88eaad1d6cccf14bd5c2f5b49ff836b31e8aab51b958bbc954fc6b45ee93ba0f084d0a864707f4fb3c2b3ef14835f58ee1b3e3f83dad5bc
7
- data.tar.gz: ab0361fd3a187970178407a0a44c47ddfab574bf0bc4df32308707fca2a47754fe45bdd6eef6ceb2061f515fb6199426d24c8bb71d00918023b841c508967c7e
6
+ metadata.gz: c52c38ab387d70417b2347637960e01ff2d28199f5c22e58bf0ee6f1941204972583070d68bc48761dc68eceeda44eab5fb286ffb326f8cfe9416408227bb1ce
7
+ data.tar.gz: cecbd5e96348e1e80e7a2c1149fe649939fb1312add5cbecd421c2278cdb54e69eb811404e706b5c06efccabe06d2ba5a1317b1fe97bf296fa6bc999c03439cb
@@ -19,3 +19,7 @@ nav.navbar {
19
19
  .stretch {
20
20
  width: 100%;
21
21
  }
22
+ .well.well-section {
23
+ margin-bottom: 0;
24
+ border-radius: 0;
25
+ }
@@ -22,6 +22,9 @@
22
22
  margin-bottom: 15px;
23
23
  }
24
24
  }
25
+ #readme img {
26
+ width: 320px;
27
+ }
25
28
 
26
29
  // add margin to the 4th-plus child
27
30
  body > .container:nth-child(n+4) {
@@ -0,0 +1,24 @@
1
+ /* Sticky footer styles
2
+ -------------------------------------------------- */
3
+
4
+ html,
5
+ body {
6
+ height: 100%;
7
+ /* The html and body elements cannot have any padding or margin. */
8
+ }
9
+
10
+ /* Wrapper for page content to push down footer */
11
+ #wrap {
12
+ min-height: 100%;
13
+ height: auto;
14
+ /* Negative indent footer by its height */
15
+ margin: 0 auto -60px;
16
+ /* Pad bottom by footer height */
17
+ padding: 0 0 60px;
18
+ }
19
+
20
+ /* Set the fixed height of the footer here */
21
+ #footer {
22
+ height: 60px;
23
+ background-color: #f5f5f5;
24
+ }
@@ -1,3 +1,5 @@
1
+ require 'github/markup'
2
+
1
3
  class Johnhenry::HomeController < Johnhenry::ApplicationController
2
4
  before_filter :set_home_meta_tags
3
5
 
@@ -16,6 +18,12 @@ class Johnhenry::HomeController < Johnhenry::ApplicationController
16
18
  end
17
19
  end
18
20
 
21
+ def install
22
+ filename = File.join(File.dirname(File.expand_path(__FILE__)),
23
+ '../../../README.md')
24
+ @readme = GitHub::Markup.render(filename, File.read(filename))
25
+ end
26
+
19
27
  private
20
28
 
21
29
  def set_home_meta_tags
@@ -1,5 +1,3 @@
1
- require 'github/markup'
2
-
3
1
  class Johnhenry::PaymentsController < Johnhenry::ApplicationController
4
2
  before_action :set_payment, only: [:show, :edit, :update, :destroy]
5
3
  before_filter :must_have_session, only: [:index, :show]
@@ -13,9 +11,6 @@ class Johnhenry::PaymentsController < Johnhenry::ApplicationController
13
11
  # GET /payments/1
14
12
  # GET /payments/1.json
15
13
  def show
16
- filename = File.join(File.dirname(File.expand_path(__FILE__)),
17
- '../../../README.md')
18
- @readme = GitHub::Markup.render(filename, File.read(filename))
19
14
  end
20
15
 
21
16
  # GET /payments/new
@@ -6,6 +6,11 @@ class JohnHenryUser < ActiveRecord::Base
6
6
  :recoverable, :rememberable, :trackable, :validatable
7
7
  after_save :send_signup_email
8
8
 
9
+ def guess_name_from_email
10
+ s = email.split('@').first.try(:titleize)
11
+ s.split(/[.+-]/).first
12
+ end
13
+
9
14
  private
10
15
 
11
16
  def send_signup_email
@@ -0,0 +1,3 @@
1
+ .container#readme
2
+ .row
3
+ .col-xs-12= raw(@readme)
@@ -117,3 +117,7 @@
117
117
  %h4.text-center Example Signup Form
118
118
  %h5.text-center Just one of many included forms
119
119
  = render 'johnhenry/shared/signup_form', cta: raw('Example Button &raquo;')
120
+
121
+ .container#readme
122
+ .row
123
+ .col-md-10.col-md-offset-1= raw(@readme)
@@ -6,52 +6,70 @@
6
6
  = stylesheet_link_tag 'application', media: 'all'
7
7
  = javascript_include_tag 'application'
8
8
  %body
9
- %nav.navbar.navbar-default{role: "navigation"}
10
- / Brand and toggle get grouped for better mobile display
11
- .navbar-header
12
- %button.navbar-toggle{"data-target" => "#bs-example-navbar-collapse-1", "data-toggle" => "collapse", type: "button"}
13
- %span.sr-only Toggle navigation
14
- %span.icon-bar
15
- %span.icon-bar
16
- %span.icon-bar
17
- %a.navbar-brand{href: '/'} John Henry Rails
18
- / Collect the nav links, forms, and other content for toggling
19
- #bs-example-navbar-collapse-1.collapse.navbar-collapse
20
- %ul.nav.navbar-nav
21
- - if !signed_in?
22
- %li.active
23
- = link_to 'Sign Up', new_user_registration_path
24
- %li
25
- = link_to 'Sign In', new_user_session_path
26
- %form.navbar-form.navbar-left{role: "search"}
27
- .form-group
28
- %input.form-control{placeholder: "Search", type: "text"}/
29
- %button.btn.btn-default{type: "submit"} Search
30
- - if signed_in?
31
- %ul.nav.navbar-nav.navbar-right
32
- %li.dropdown
33
- %a.dropdown-toggle{"data-toggle" => "dropdown", href: "#"}
34
- Account
35
- %b.caret
36
- %ul.dropdown-menu
37
- %li
38
- %a{ href: payments_path } Payments
39
- %li.divider
40
- %li
41
- = link_to 'Sign Out', destroy_user_session_path, method: :delete
9
+ #wrap
10
+ %nav.navbar.navbar-default{role: "navigation"}
11
+ / Brand and toggle get grouped for better mobile display
12
+ .navbar-header
13
+ %button.navbar-toggle{"data-target" => "#bs-example-navbar-collapse-1", "data-toggle" => "collapse", type: "button"}
14
+ %span.sr-only Toggle navigation
15
+ %span.icon-bar
16
+ %span.icon-bar
17
+ %span.icon-bar
18
+ %a.navbar-brand{href: '/'} John Henry Rails
19
+ / Collect the nav links, forms, and other content for toggling
20
+ #bs-example-navbar-collapse-1.collapse.navbar-collapse
21
+ %ul.nav.navbar-nav
22
+ %li= link_to 'Install', '/install'
23
+ - if !signed_in?
24
+ %li.active
25
+ = link_to 'Sign Up', new_user_registration_path
26
+ %li
27
+ = link_to 'Sign In', new_user_session_path
28
+ %form.hide.navbar-form.navbar-left{role: "search"}
29
+ .form-group
30
+ %input.form-control{placeholder: "Search", type: "text"}/
31
+ %button.btn.btn-default{type: "submit"} Search
32
+ - if signed_in?
33
+ %ul.nav.navbar-nav.navbar-right
34
+ %li.dropdown
35
+ %a.dropdown-toggle{"data-toggle" => "dropdown", href: "#"}
36
+ Account
37
+ %b.caret
38
+ %ul.dropdown-menu
39
+ %li= link_to 'Payments', payments_path
40
+ %li.divider
41
+ %li
42
+ = link_to 'Sign Out', destroy_user_session_path, method: :delete
42
43
 
43
- - if notice.present? || alert.present?
44
- .container{ style: 'width: 100%' }
45
- .row
46
- - if notice.present?
47
- .col-md-12.alert.alert-success
48
- = notice
49
- %a.pull-right.dismiss-flash{ href: '#' } ✕
50
- - if alert.present?
51
- .col-md-12.alert.alert-warning
52
- = alert
53
- %a.pull-right.dismiss-flash{ href: '#' } ✕
54
- = yield
44
+ - if notice.present? || alert.present?
45
+ .container{ style: 'width: 100%' }
46
+ .row
47
+ - if notice.present?
48
+ .col-md-12.alert.alert-success
49
+ = notice
50
+ %a.pull-right.dismiss-flash{ href: '#' } ✕
51
+ - if alert.present?
52
+ .col-md-12.alert.alert-warning
53
+ = alert
54
+ %a.pull-right.dismiss-flash{ href: '#' } ✕
55
+ = yield
56
+
57
+ #footer.well.well-section
58
+ .container
59
+ .row.text-center
60
+ %ul.col-md-4.col-xs-12.list-unstyled
61
+ %li= link_to 'Home', '/'
62
+ - if signed_in?
63
+ %li= link_to 'Sign Out', destroy_user_session_path, method: :delete
64
+ %li= link_to 'Payments', payments_path
65
+ - else
66
+ %li= link_to 'Sign In', new_user_session_path
67
+ %li= link_to 'Sign Up', new_user_registration_path
68
+ .col-md-4.col-xs-12
69
+ &copy; #{ Date.today.year }
70
+ %ul.col-md-4.col-xs-12.list-unstyled
71
+ %li= link_to 'Github Home', 'http://github.com/derwiki/johnhenry'
72
+ %li= link_to 'Github Issues', 'http://github.com/derwiki/johnhenry/issues'
55
73
 
56
74
  - if Rails.env.production?
57
75
  :javascript
@@ -1,3 +1,3 @@
1
1
  module JohnHenry
2
- VERSION = '1.0.11'
2
+ VERSION = '1.0.12'
3
3
  end
@@ -1,4 +1,4 @@
1
- namespace :johnhenry do
1
+ namespace :john_henry do
2
2
  desc 'Install dependencies and references.'
3
3
  task :install do
4
4
  Rails.logger = Logger.new(STDOUT)
@@ -8,6 +8,7 @@ namespace :johnhenry do
8
8
  maybe_remove_old_layout
9
9
  update_gemfile
10
10
  update_routes
11
+ install_user_model
11
12
  install_javascript
12
13
  install_stylesheets
13
14
  install_stripe
@@ -75,6 +76,11 @@ namespace :johnhenry do
75
76
  insert_into_file_after(%w(Gemfile), 5, File.readlines(source))
76
77
  end
77
78
 
79
+ def install_user_model
80
+ code = "class User < JohnHenryUser\nend\n"
81
+ create_file(%w(app models user.rb), code)
82
+ end
83
+
78
84
  def install_javascript
79
85
  code = ["//= require johnhenry/application\n"]
80
86
  insert_into_file_after(%w(app assets javascripts application.js), 12, code)
@@ -137,6 +143,11 @@ EOS
137
143
  sessions: 'johnhenry/sessions'
138
144
  }
139
145
  resources :payments, controller: 'johnhenry/payments'
146
+ resources :home, controller: 'johnhenry/home' do
147
+ get :welcome
148
+ get :install
149
+ end
150
+ get '/install' => 'johnhenry/home#install'
140
151
  EOS
141
152
  insert_into_file_after(%w(config routes.rb), 1, [code])
142
153
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: johnhenry
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.11
4
+ version: 1.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Derewecki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-09 00:00:00.000000000 Z
11
+ date: 2014-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -178,6 +178,7 @@ files:
178
178
  - app/assets/stylesheets/johnhenry/home.css.scss
179
179
  - app/assets/stylesheets/johnhenry/payment-form.css.scss
180
180
  - app/assets/stylesheets/johnhenry/payments.css.scss
181
+ - app/assets/stylesheets/sticky-footer.css
181
182
  - app/controllers/johnhenry/application_controller.rb
182
183
  - app/controllers/johnhenry/home_controller.rb
183
184
  - app/controllers/johnhenry/payments_controller.rb
@@ -199,6 +200,7 @@ files:
199
200
  - app/views/johnhenry/devise/sessions/new.html.haml
200
201
  - app/views/johnhenry/devise/shared/_links.haml
201
202
  - app/views/johnhenry/devise/unlocks/new.html.haml
203
+ - app/views/johnhenry/home/install.html.haml
202
204
  - app/views/johnhenry/home/welcome.html.haml
203
205
  - app/views/johnhenry/payments/_form.html.haml
204
206
  - app/views/johnhenry/payments/edit.html.haml