ucb_rails_cli 0.9.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +13 -0
- data/README.md +6 -1
- data/lib/ucb_rails_cli/cli.rb +6 -0
- data/lib/ucb_rails_cli/templates/Gemfile_additions +1 -1
- data/lib/ucb_rails_cli/templates/stylesheets/themes/ucb_standard/base/_layout.sass +1 -1
- data/lib/ucb_rails_cli/templates/stylesheets/themes/ucb_standard/base/_overrides.sass +3 -0
- data/lib/ucb_rails_cli/templates/stylesheets/themes/ucb_standard/components/_navbar.sass +5 -92
- data/lib/ucb_rails_cli/templates/views/_navigation.html.haml +20 -28
- data/lib/ucb_rails_cli/templates/views/application.html.haml +6 -6
- data/lib/ucb_rails_cli/version.rb +1 -1
- metadata +10 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: dd205173084a2b47a7eec534ff1ce614677b8ffc0b24b7097b1fe6221d5f5fb8
|
4
|
+
data.tar.gz: 037fda75b0e75ea624561adaee8513267c0f7e434c4cbbd8dad573c868e5f772
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55477d920cfd9eddb2c4d527c4e202a9c71ea5c2a84dc6955e1ff8ca711d6b56b444036a2eb5925ff690f451a82c9a29f980b1bbb8978feb1acfb6a78716d2d7
|
7
|
+
data.tar.gz: 8e16fb1130a44059317f09006e2b1dde8ce9f96bbdf42c0fe15f3f32ccc89edbb4811ebd9c6c99c1b1e46c0252871a56827f1f5986fbe8809b1ceed46c9ed214
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -7,9 +7,10 @@ This is the gem for the ucb_rails command line tool. You can use this tool to ge
|
|
7
7
|
* nav bar with drop-down menus for developers and admins
|
8
8
|
* styles consistent with [UCB brand guidelines](http://brand.berkeley.edu/)
|
9
9
|
* HAML for views
|
10
|
+
* Bootstrap 4 for styling
|
10
11
|
* SASS for CSS
|
11
|
-
* RSpec for tests
|
12
12
|
* [Datatables](https://datatables.net/) for client-side table sorting
|
13
|
+
* RSpec for tests
|
13
14
|
|
14
15
|
**NOTE:** Applications generated with this tool have turbolinks turned off.
|
15
16
|
|
@@ -20,6 +21,10 @@ This is the gem for the ucb_rails command line tool. You can use this tool to ge
|
|
20
21
|
|
21
22
|
Older versions of these might work, but haven't been tested.
|
22
23
|
|
24
|
+
## Bootstrap version
|
25
|
+
|
26
|
+
Version 1.0 of this gem uses Bootstrap 4. Use version 0.9.0 if you need Bootstrap 3
|
27
|
+
|
23
28
|
## Installation
|
24
29
|
|
25
30
|
```bash
|
data/lib/ucb_rails_cli/cli.rb
CHANGED
@@ -15,6 +15,12 @@ module UcbRailsCli
|
|
15
15
|
GITIGNORE = "Unable to update .gitignore - check the console output for more info"
|
16
16
|
RSPEC = "Unable to install RSpec - check the console output for more info"
|
17
17
|
|
18
|
+
desc 'version', 'Display version'
|
19
|
+
map %w[-v --version] => :version
|
20
|
+
def version
|
21
|
+
say "ucb_rails_cli #{UcbRailsCli::VERSION}"
|
22
|
+
end
|
23
|
+
|
18
24
|
desc "new APP_NAME", "generate a new UCB Rails app called NAME"
|
19
25
|
option :rails_options
|
20
26
|
def new(app_name)
|
@@ -4,7 +4,7 @@
|
|
4
4
|
gem "haml", "~> 5.0"
|
5
5
|
gem "better_errors"
|
6
6
|
gem "binding_of_caller"
|
7
|
-
gem "ucb_rails_user",
|
7
|
+
gem "ucb_rails_user", "~> 1.0"
|
8
8
|
gem "rails_view_helpers", github: "ucb-ist-eas/rails_view_helpers", branch: "rails5"
|
9
9
|
|
10
10
|
group :development, :test do
|
@@ -3,97 +3,10 @@
|
|
3
3
|
border: 1px solid transparent
|
4
4
|
font-family: $text-font
|
5
5
|
|
6
|
-
|
7
|
-
.navbar-left
|
8
|
-
padding-left: 0
|
9
|
-
margin-left: -15px
|
10
|
-
|
11
|
-
a
|
12
|
-
margin-left: -15px
|
13
|
-
|
14
|
-
.navbar-inverse
|
6
|
+
.navbar-dark
|
15
7
|
background-color: $blue
|
16
|
-
border-color: $blue
|
17
|
-
|
18
|
-
.navbar-brand
|
19
|
-
font-size: 14px
|
20
|
-
color: #fff
|
21
|
-
line-height: 20px
|
22
|
-
padding-top: 11px
|
23
|
-
font-weight: 600
|
24
|
-
|
25
|
-
.navbar-nav > li > a
|
26
|
-
font-size: 16px
|
27
|
-
color: #fff
|
28
|
-
border-bottom: none
|
29
|
-
padding-top: 11px
|
30
|
-
line-height: 20px
|
31
|
-
padding-left: 15px
|
32
|
-
padding-right: 15px
|
33
|
-
font-weight: 600
|
34
|
-
|
35
|
-
.navbar-inverse
|
36
|
-
background-color: #003262
|
37
|
-
border-color: #003262
|
38
|
-
.navbar-brand
|
39
|
-
color: #9d9d9d
|
40
|
-
&:focus, &:hover
|
41
|
-
color: #fff
|
42
|
-
background-color: transparent
|
43
|
-
|
44
|
-
.navbar-text
|
45
|
-
color: #9d9d9d
|
46
|
-
|
47
|
-
.navbar-nav >
|
48
|
-
li > a
|
49
|
-
color: #9d9d9d
|
50
|
-
&:focus, &:hover
|
51
|
-
color: #fdb515
|
52
|
-
background-color: transparent
|
53
|
-
|
54
|
-
.active > a
|
55
|
-
color: #fff
|
56
|
-
background-color: #003262
|
57
|
-
&:focus, &:hover
|
58
|
-
color: #fff
|
59
|
-
background-color: #003262
|
60
|
-
|
61
|
-
.disabled > a
|
62
|
-
color: #444
|
63
|
-
background-color: transparent
|
64
|
-
&:focus, &:hover
|
65
|
-
color: #444
|
66
|
-
background-color: transparent
|
67
|
-
|
68
|
-
.navbar-toggle
|
69
|
-
border-color: #333
|
70
|
-
&:focus, &:hover
|
71
|
-
background-color: #333
|
72
|
-
|
73
|
-
.icon-bar
|
74
|
-
background-color: #fff
|
75
|
-
|
76
|
-
.navbar-collapse, .navbar-form
|
77
|
-
border-color: #101010
|
78
|
-
|
79
|
-
.navbar-nav > .open > a
|
80
|
-
color: #fff
|
81
|
-
background-color: #003262
|
82
|
-
&:focus, &:hover
|
83
|
-
color: #fff
|
84
|
-
background-color: #003262
|
85
|
-
|
86
|
-
.navbar-link
|
87
|
-
color: #9d9d9d
|
88
|
-
&:hover
|
89
|
-
color: #fff
|
90
|
-
|
91
|
-
.btn-link
|
92
|
-
color: #9d9d9d
|
93
|
-
&:focus, &:hover
|
94
|
-
color: #fff
|
95
|
-
|
96
|
-
&[disabled]
|
97
|
-
&:focus, &:hover
|
98
|
-
color: #444
|
99
8
|
|
9
|
+
.nav-item
|
10
|
+
a.dropdown-item:hover
|
11
|
+
background-color: $blue
|
12
|
+
color: white
|
@@ -1,42 +1,34 @@
|
|
1
|
-
%nav.navbar.navbar-
|
1
|
+
%nav.navbar.navbar-expand-lg.fixed-top.navbar-dark
|
2
2
|
.container
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
= link_to "Home", "/"
|
3
|
+
= link_to "Home", "/", class: "navbar-brand"
|
4
|
+
%button.navbar-toggler{type: "button", data: {toggle: "collapse", target: "#navbar-content"}}
|
5
|
+
%span.navbar-toggler-icon
|
7
6
|
|
8
|
-
|
7
|
+
.collapse.navbar-collapse{id: "navbar-content"}
|
8
|
+
%ul.navbar-nav.ml-auto
|
9
9
|
- if logged_in?
|
10
10
|
- if superuser?
|
11
|
-
%li.dropdown
|
12
|
-
%a.dropdown-toggle{
|
11
|
+
%li.nav-item.dropdown
|
12
|
+
%a.nav-link.dropdown-toggle{href: "#", id: "admin-dropdown", role: "button", data: {toggle: "dropdown"}, "aria-expanded" => "false", "aria-haspopup" => "true"}
|
13
13
|
Admin
|
14
14
|
%span.caret
|
15
|
-
|
16
|
-
%
|
17
|
-
%a{:href => admin_users_path} Users
|
15
|
+
.dropdown-menu{"aria-labelledby" => "admin-dropdown"}
|
16
|
+
%a.dropdown-item{href: admin_users_path} Users
|
18
17
|
- if Rails.env.development?
|
19
|
-
%li.dropdown
|
20
|
-
%a.dropdown-toggle{
|
18
|
+
%li.nav-item.dropdown
|
19
|
+
%a.nav-link.dropdown-toggle{href: "#", id: "developer-dropdown", role: "button", data: {toggle: "dropdown"}, "aria-expanded" => "false", "aria-haspopup" => "true"}
|
21
20
|
Developer
|
22
21
|
%span.caret
|
23
|
-
|
24
|
-
%
|
25
|
-
|
26
|
-
|
27
|
-
%a.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :href => "#", :role => "button"}
|
22
|
+
.dropdown-menu{"aria-labelledby" => "developer-dropdown"}
|
23
|
+
%a.dropdown-item{href: admin_users_path} Users
|
24
|
+
%li.nav-item.dropdown
|
25
|
+
%a.nav-link.dropdown-toggle{href: "#", id: "login-dropdown", role: "button", data: {toggle: "dropdown"}, "aria-expanded" => "false", "aria-haspopup" => "true"}
|
28
26
|
Logged in as #{current_user.full_name}
|
29
27
|
%span.caret
|
30
|
-
|
28
|
+
.dropdown-menu{"aria-labelledby" => "login-dropdown"}
|
31
29
|
- if Rails.env.development?
|
32
30
|
- if superuser?
|
33
|
-
%
|
34
|
-
%a{:href => admin_toggle_superuser_path} Disable superuser
|
31
|
+
%a.dropdown-item{href: admin_toggle_superuser_path} Disable superuser
|
35
32
|
- else
|
36
|
-
%
|
37
|
-
|
38
|
-
%li
|
39
|
-
%a{:href => logout_path} Logout
|
40
|
-
- else
|
41
|
-
%li
|
42
|
-
= link_to('Login', login_path)
|
33
|
+
%a.dropdown-item{href: admin_toggle_superuser_path} Enable superuser
|
34
|
+
%a.dropdown-item{href: logout_path} Logout
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
%link{:href => "https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700,800", :rel => "stylesheet"}
|
10
10
|
%link{:href => "http://fonts.googleapis.com/css?family=Source+Serif+Pro:400,600,700", :rel => "stylesheet"}>
|
11
|
-
%link{:rel => "stylesheet", :href => "https://
|
11
|
+
%link{:rel => "stylesheet", :href => "https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css", :integrity => "sha384-Smlep5jCw/wG7hdkwQ/Z5nLIefveQRIY9nfy6xoR1uRYBtpZgI6339F5dgvm/e9B", :crossorigin => "anonymous"}
|
12
12
|
%link{:rel => "stylesheet", :href => "https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" }
|
13
13
|
%link{:rel => "stylesheet", :href => "https://jqueryui.com/resources/demos/style.css" }
|
14
14
|
%link{:rel => "icon", :type => "image/ico", :href => "/assets/favicon.ico" }
|
@@ -17,9 +17,9 @@
|
|
17
17
|
|
18
18
|
= csrf_meta_tags
|
19
19
|
|
20
|
-
%script{:src => "https://
|
21
|
-
%script{:src => "https://
|
22
|
-
%script{:
|
20
|
+
%script{:src => "https://code.jquery.com/jquery-3.3.1.slim.min.js", :integrity => "sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo", :crossorigin => "anonymous"}
|
21
|
+
%script{:src => "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js", :integrity => "sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49", :crossorigin => "anonymous"}
|
22
|
+
%script{:src => "https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/js/bootstrap.min.js", :integrity => "sha384-o+RDsa0aLu++PJvFqy8fFScvbHFLtbvScb8AjopnFD+iEQ7wo/CG0xlczd+2O/em", :crossorigin => "anonymous"}
|
23
23
|
|
24
24
|
= javascript_tag "window._token = '#{form_authenticity_token}'"
|
25
25
|
= javascript_include_tag "application"
|
@@ -34,9 +34,9 @@
|
|
34
34
|
- if logged_in?
|
35
35
|
-#= user_announcements
|
36
36
|
.container
|
37
|
-
%div
|
37
|
+
%div
|
38
38
|
= flash_messages
|
39
|
-
%div
|
39
|
+
%div
|
40
40
|
= yield
|
41
41
|
|
42
42
|
= render partial: 'layouts/footer'
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ucb_rails_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Darin Wilson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
19
|
+
version: '0.20'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
26
|
+
version: '0.20'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,7 +66,8 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.0'
|
69
|
-
description: Spin up a new UCB Rails app
|
69
|
+
description: Spin up a new UCB Rails app with many features needed for UCB apps already
|
70
|
+
built in
|
70
71
|
email:
|
71
72
|
- darinwilson@gmail.com
|
72
73
|
executables:
|
@@ -77,6 +78,7 @@ files:
|
|
77
78
|
- ".gitignore"
|
78
79
|
- ".rspec"
|
79
80
|
- ".travis.yml"
|
81
|
+
- CHANGELOG.md
|
80
82
|
- CODE_OF_CONDUCT.md
|
81
83
|
- Gemfile
|
82
84
|
- LICENSE.txt
|
@@ -129,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
131
|
version: '0'
|
130
132
|
requirements: []
|
131
133
|
rubyforge_project:
|
132
|
-
rubygems_version: 2.
|
134
|
+
rubygems_version: 2.7.7
|
133
135
|
signing_key:
|
134
136
|
specification_version: 4
|
135
137
|
summary: Spin up a new UCB Rails app
|