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 +4 -4
- data/app/assets/stylesheets/johnhenry/application.css +4 -0
- data/app/assets/stylesheets/johnhenry/home.css.scss +3 -0
- data/app/assets/stylesheets/sticky-footer.css +24 -0
- data/app/controllers/johnhenry/home_controller.rb +8 -0
- data/app/controllers/johnhenry/payments_controller.rb +0 -5
- data/app/models/john_henry_user.rb +5 -0
- data/app/views/johnhenry/home/install.html.haml +3 -0
- data/app/views/johnhenry/home/welcome.html.haml +4 -0
- data/app/views/layouts/johnhenry/application.html.haml +63 -45
- data/lib/johnhenry/version.rb +1 -1
- data/lib/tasks/johnhenry_tasks.rake +12 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fe0b7023efd4b5cd0466c4549141db28b038de5
|
4
|
+
data.tar.gz: 35aeddf964e32d4e934a0dd5294a2d25b887666f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c52c38ab387d70417b2347637960e01ff2d28199f5c22e58bf0ee6f1941204972583070d68bc48761dc68eceeda44eab5fb286ffb326f8cfe9416408227bb1ce
|
7
|
+
data.tar.gz: cecbd5e96348e1e80e7a2c1149fe649939fb1312add5cbecd421c2278cdb54e69eb811404e706b5c06efccabe06d2ba5a1317b1fe97bf296fa6bc999c03439cb
|
@@ -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
|
@@ -6,52 +6,70 @@
|
|
6
6
|
= stylesheet_link_tag 'application', media: 'all'
|
7
7
|
= javascript_include_tag 'application'
|
8
8
|
%body
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
%
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
-
|
22
|
-
%li
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
%
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
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
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
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
|
+
© #{ 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
|
data/lib/johnhenry/version.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
namespace :
|
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.
|
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-
|
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
|