ucb_rails_cli 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +7 -2
- data/lib/ucb_rails_cli/cli.rb +3 -2
- data/lib/ucb_rails_cli/templates/Gemfile_additions +0 -1
- data/lib/ucb_rails_cli/templates/helpers/flash_helper.rb +15 -0
- data/lib/ucb_rails_cli/templates/stylesheets/themes/ucb_standard/components/_footer.sass +5 -0
- data/lib/ucb_rails_cli/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62491d03e7bfb3b5afc4767affee124e309fe4a8ab7413568c72a57db84901ae
|
4
|
+
data.tar.gz: '09518cc3fe1746d44e0dd0d09f68a0717d3ee943a7b5b249643adc8eef269a0f'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a6a7c418e904914063e0fe416f93a2c3a58764ba85394ac91de8a59893e85f77f1b36164538ecf81484e9d4610f65f53502fd18484186c735479ed73878455b
|
7
|
+
data.tar.gz: 47c388b9fe82b26022f525f5cddc788b8c8be75ae8bf5c7bf1a09fd59ce07ac3d0be4043cfbb9c77110310d504761b1f96cc293a8b6b7f49ef94a87ff666549e
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
1.2.0
|
2
|
+
------
|
3
|
+
|
4
|
+
* Remove rails_view_helpers and bootstrap-view-helpers from Gemfile additions - [(PR #11)](https://github.com/ucb-ist-eas/ucb_rails_cli/pull/11)
|
5
|
+
* Spruce up footer - [(PR #12)](https://github.com/ucb-ist-eas/ucb_rails_cli/pull/12)
|
6
|
+
* Update documentation so database creation commands use `rails` rather than `rake` - [79d3ee6](https://github.com/ucb-ist-eas/ucb_rails_cli/commit/79d3ee66d2c952dbaa9f2a519577975c79707cc8)
|
7
|
+
|
8
|
+
|
9
|
+
1.1.0
|
10
|
+
------
|
11
|
+
|
12
|
+
* Add [exception_notification gem](https://github.com/smartinez87/exception_notification) - [(PR #9)](https://github.com/ucb-ist-eas/ucb_rails_cli/pull/9)
|
13
|
+
* Integrate [encrypted credentials](https://www.engineyard.com/blog/rails-encrypted-credentials-on-rails-5.2) - [(PR #10)](https://github.com/ucb-ist-eas/ucb_rails_cli/pull/10)
|
14
|
+
|
1
15
|
1.0.0
|
2
16
|
------
|
3
17
|
|
data/README.md
CHANGED
@@ -21,6 +21,13 @@ This is the gem for the ucb_rails command line tool. You can use this tool to ge
|
|
21
21
|
|
22
22
|
Older versions of these might work, but haven't been tested.
|
23
23
|
|
24
|
+
You also need the master key to [decrypt credentials stored in the generated `config/credentials.yml.enc` file.](https://www.engineyard.com/blog/rails-encrypted-credentials-on-rails-5.2) You can set this up by storing the key in either:
|
25
|
+
|
26
|
+
* the `RAILS_MASTER_KEY` environment variable, or:
|
27
|
+
* a file located at `~/.ucb_rails_master_key`
|
28
|
+
|
29
|
+
If one of these options is not set, you won't be able to generate a new app.
|
30
|
+
|
24
31
|
## Bootstrap version
|
25
32
|
|
26
33
|
Version 1.0 of this gem uses Bootstrap 4. Use version 0.9.0 if you need Bootstrap 3
|
@@ -55,8 +62,6 @@ bin/rake db:create
|
|
55
62
|
bin/rake db:migrate
|
56
63
|
```
|
57
64
|
|
58
|
-
then open `config/config.yml` and add the username and password to access LDAP (you can get these credentials from another developer).
|
59
|
-
|
60
65
|
Now you can start the server:
|
61
66
|
|
62
67
|
```bash
|
data/lib/ucb_rails_cli/cli.rb
CHANGED
@@ -62,8 +62,8 @@ Finished! Your new app is in ./#{app_name}
|
|
62
62
|
From here, you should set up the database:
|
63
63
|
|
64
64
|
cd #{app_name}
|
65
|
-
bin/
|
66
|
-
bin/
|
65
|
+
bin/rails db:create
|
66
|
+
bin/rails db:migrate
|
67
67
|
|
68
68
|
then start the server as usual:
|
69
69
|
|
@@ -126,6 +126,7 @@ Enjoy!
|
|
126
126
|
file_contents = `cat #{template_dir}/helpers/application_helper.rb`
|
127
127
|
.gsub("%APP_NAME", humanize(app_name))
|
128
128
|
system "echo '#{file_contents}' > #{app_name}/app/helpers/application_helper.rb"
|
129
|
+
system("cp #{template_dir}/helpers/flash_helper.rb #{app_name}/app/helpers/flash_helper.rb")
|
129
130
|
true
|
130
131
|
end
|
131
132
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module FlashHelper
|
2
|
+
DEFAULT_MAPPING = {
|
3
|
+
:notice => :info,
|
4
|
+
:alert => :danger,
|
5
|
+
:error => :danger,
|
6
|
+
}
|
7
|
+
|
8
|
+
def flash_messages
|
9
|
+
messages =
|
10
|
+
flash.map do |type, message|
|
11
|
+
content_tag(:div, message, class: "alert alert-#{DEFAULT_MAPPING[type.to_sym] || type}", role: "alert")
|
12
|
+
end
|
13
|
+
safe_join(messages, "\n")
|
14
|
+
end
|
15
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ucb_rails_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.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:
|
11
|
+
date: 2019-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -95,6 +95,7 @@ files:
|
|
95
95
|
- lib/ucb_rails_cli/templates/config/routes.rb
|
96
96
|
- lib/ucb_rails_cli/templates/controllers/application_controller.rb
|
97
97
|
- lib/ucb_rails_cli/templates/helpers/application_helper.rb
|
98
|
+
- lib/ucb_rails_cli/templates/helpers/flash_helper.rb
|
98
99
|
- lib/ucb_rails_cli/templates/images/.keep
|
99
100
|
- lib/ucb_rails_cli/templates/images/favicon.ico
|
100
101
|
- lib/ucb_rails_cli/templates/images/logo-ucberkeley-white.png
|