ucb_rails_cli 1.2.0 → 1.3.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 +9 -0
- data/README.md +3 -1
- data/bin/bundle +114 -0
- data/bin/htmldiff +29 -0
- data/bin/ldiff +29 -0
- data/bin/rake +29 -0
- data/bin/rspec +29 -0
- data/bin/thor +29 -0
- data/bin/ucb_rails +2 -4
- data/lib/ucb_rails_cli/cli.rb +39 -3
- data/lib/ucb_rails_cli/templates/Gemfile_additions +1 -1
- data/lib/ucb_rails_cli/templates/config/initializers/ucb_rails_user.rb +10 -1
- data/lib/ucb_rails_cli/templates/helpers/application_helper.rb +10 -0
- data/lib/ucb_rails_cli/templates/rspc_files/support/system.rb +11 -0
- data/lib/ucb_rails_cli/templates/rspc_files/system/homepage_spec.rb +16 -0
- data/lib/ucb_rails_cli/templates/views/_footer.html.haml +1 -1
- data/lib/ucb_rails_cli/templates/views/_navigation.html.haml +1 -1
- data/lib/ucb_rails_cli/templates/views/application.html.haml +12 -12
- data/lib/ucb_rails_cli/version.rb +1 -1
- data/ucb_rails_cli.gemspec +33 -0
- metadata +17 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7a74997058892c9f136934d04c73d9f0848170ccd8c8e93264f3cde1d64ce9c
|
4
|
+
data.tar.gz: 5231da721c7ecad9da1eedce8cdef09f4ee63f64366febfd6bc1182468137a63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cc21b39ca29b06967fd40856fd5aa27fc67223423a2da01cca573238e90693ab861ddee72c538b9b50e15f15f052b1dd32223ebcc9acaf6948c82eb1bf76a3e
|
7
|
+
data.tar.gz: 882d7d060036c0d614522b5380b8c4aeeac042f880133237bf89c7564c99ea087ad1ad9bd70021feedfcefce010f9c2962f3b8b7f5f8b23487fc3b25ef22a4df
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
1.3.0
|
2
|
+
------
|
3
|
+
|
4
|
+
* Restructure gem metadata - [(PR #19)](https://github.com/ucb-ist-eas/ucb_rails_cli/pull/19)
|
5
|
+
* Change generated apps to use Pacific Time by default - [(PR #20)](https://github.com/ucb-ist-eas/ucb_rails_cli/pull/20)
|
6
|
+
* Create smart copyright year in app footer - [(PR #21)](https://github.com/ucb-ist-eas/ucb_rails_cli/pull/21)
|
7
|
+
* Prevent real emails from being sent in dev and test modes - [(PR #22)](https://github.com/ucb-ist-eas/ucb_rails_cli/pull/22)
|
8
|
+
* Integrate testing support from [ucb_rails_user](https://github.com/ucb-ist-eas/ucb_rails_user#testing-support) into generated apps - [(PR #23)](https://github.com/ucb-ist-eas/ucb_rails_cli/pull/23)
|
9
|
+
|
1
10
|
1.2.0
|
2
11
|
------
|
3
12
|
|
data/README.md
CHANGED
@@ -21,11 +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
|
+
If you're using Rails >= 6, you'll need recent versions of [https://nodejs.org/en/](node) and [https://yarnpkg.com/](yarn).
|
25
|
+
|
24
26
|
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
27
|
|
26
28
|
* the `RAILS_MASTER_KEY` environment variable, or:
|
27
29
|
* a file located at `~/.ucb_rails_master_key`
|
28
|
-
|
30
|
+
|
29
31
|
If one of these options is not set, you won't be able to generate a new app.
|
30
32
|
|
31
33
|
## Bootstrap version
|
data/bin/bundle
ADDED
@@ -0,0 +1,114 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'bundle' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "rubygems"
|
12
|
+
|
13
|
+
m = Module.new do
|
14
|
+
module_function
|
15
|
+
|
16
|
+
def invoked_as_script?
|
17
|
+
File.expand_path($0) == File.expand_path(__FILE__)
|
18
|
+
end
|
19
|
+
|
20
|
+
def env_var_version
|
21
|
+
ENV["BUNDLER_VERSION"]
|
22
|
+
end
|
23
|
+
|
24
|
+
def cli_arg_version
|
25
|
+
return unless invoked_as_script? # don't want to hijack other binstubs
|
26
|
+
return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
|
27
|
+
bundler_version = nil
|
28
|
+
update_index = nil
|
29
|
+
ARGV.each_with_index do |a, i|
|
30
|
+
if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
|
31
|
+
bundler_version = a
|
32
|
+
end
|
33
|
+
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
|
34
|
+
bundler_version = $1
|
35
|
+
update_index = i
|
36
|
+
end
|
37
|
+
bundler_version
|
38
|
+
end
|
39
|
+
|
40
|
+
def gemfile
|
41
|
+
gemfile = ENV["BUNDLE_GEMFILE"]
|
42
|
+
return gemfile if gemfile && !gemfile.empty?
|
43
|
+
|
44
|
+
File.expand_path("../../Gemfile", __FILE__)
|
45
|
+
end
|
46
|
+
|
47
|
+
def lockfile
|
48
|
+
lockfile =
|
49
|
+
case File.basename(gemfile)
|
50
|
+
when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
|
51
|
+
else "#{gemfile}.lock"
|
52
|
+
end
|
53
|
+
File.expand_path(lockfile)
|
54
|
+
end
|
55
|
+
|
56
|
+
def lockfile_version
|
57
|
+
return unless File.file?(lockfile)
|
58
|
+
lockfile_contents = File.read(lockfile)
|
59
|
+
return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
|
60
|
+
Regexp.last_match(1)
|
61
|
+
end
|
62
|
+
|
63
|
+
def bundler_version
|
64
|
+
@bundler_version ||=
|
65
|
+
env_var_version || cli_arg_version ||
|
66
|
+
lockfile_version
|
67
|
+
end
|
68
|
+
|
69
|
+
def bundler_requirement
|
70
|
+
return "#{Gem::Requirement.default}.a" unless bundler_version
|
71
|
+
|
72
|
+
bundler_gem_version = Gem::Version.new(bundler_version)
|
73
|
+
|
74
|
+
requirement = bundler_gem_version.approximate_recommendation
|
75
|
+
|
76
|
+
return requirement unless Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.7.0")
|
77
|
+
|
78
|
+
requirement += ".a" if bundler_gem_version.prerelease?
|
79
|
+
|
80
|
+
requirement
|
81
|
+
end
|
82
|
+
|
83
|
+
def load_bundler!
|
84
|
+
ENV["BUNDLE_GEMFILE"] ||= gemfile
|
85
|
+
|
86
|
+
activate_bundler
|
87
|
+
end
|
88
|
+
|
89
|
+
def activate_bundler
|
90
|
+
gem_error = activation_error_handling do
|
91
|
+
gem "bundler", bundler_requirement
|
92
|
+
end
|
93
|
+
return if gem_error.nil?
|
94
|
+
require_error = activation_error_handling do
|
95
|
+
require "bundler/version"
|
96
|
+
end
|
97
|
+
return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
|
98
|
+
warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
|
99
|
+
exit 42
|
100
|
+
end
|
101
|
+
|
102
|
+
def activation_error_handling
|
103
|
+
yield
|
104
|
+
nil
|
105
|
+
rescue StandardError, LoadError => e
|
106
|
+
e
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
m.load_bundler!
|
111
|
+
|
112
|
+
if m.invoked_as_script?
|
113
|
+
load Gem.bin_path("bundler", "bundle")
|
114
|
+
end
|
data/bin/htmldiff
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'htmldiff' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("diff-lcs", "htmldiff")
|
data/bin/ldiff
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'ldiff' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("diff-lcs", "ldiff")
|
data/bin/rake
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rake' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("rake", "rake")
|
data/bin/rspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rspec' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("rspec-core", "rspec")
|
data/bin/thor
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'thor' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("thor", "thor")
|
data/bin/ucb_rails
CHANGED
data/lib/ucb_rails_cli/cli.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require "thor"
|
2
|
+
require "date"
|
2
3
|
|
3
4
|
module UcbRailsCli
|
4
5
|
class Cli < Thor
|
@@ -86,7 +87,9 @@ Enjoy!
|
|
86
87
|
|
87
88
|
def verify_rails
|
88
89
|
begin
|
89
|
-
`rails --version` =~ /Rails
|
90
|
+
`rails --version` =~ /Rails (\d)\./
|
91
|
+
major_version = $1&.to_i
|
92
|
+
return major_version && major_version >= 5
|
90
93
|
rescue Exception => e
|
91
94
|
return false
|
92
95
|
end
|
@@ -125,6 +128,7 @@ Enjoy!
|
|
125
128
|
puts "Installing helpers..."
|
126
129
|
file_contents = `cat #{template_dir}/helpers/application_helper.rb`
|
127
130
|
.gsub("%APP_NAME", humanize(app_name))
|
131
|
+
.gsub("%APP_START_YEAR", Date.today.year.to_s)
|
128
132
|
system "echo '#{file_contents}' > #{app_name}/app/helpers/application_helper.rb"
|
129
133
|
system("cp #{template_dir}/helpers/flash_helper.rb #{app_name}/app/helpers/flash_helper.rb")
|
130
134
|
true
|
@@ -180,6 +184,15 @@ end
|
|
180
184
|
unless ENV["MASTER_KEY_PATH"].to_s.length > 0
|
181
185
|
system "cp ~/.ucb_rails_master_key #{app_name}/config/master.key"
|
182
186
|
end
|
187
|
+
|
188
|
+
# set default timezone in application.rb
|
189
|
+
application_config_contents =
|
190
|
+
`cat #{app_name}/config/application.rb`
|
191
|
+
.gsub(/end\s*end\s\Z/, %Q( config.time_zone = "Pacific Time (US & Canada)"\n end\nend))
|
192
|
+
File.open("#{app_name}/config/application.rb", "w") do |file|
|
193
|
+
file.puts(application_config_contents)
|
194
|
+
end
|
195
|
+
true
|
183
196
|
end
|
184
197
|
|
185
198
|
def install_migrations(app_name)
|
@@ -190,8 +203,19 @@ end
|
|
190
203
|
|
191
204
|
def setup_rspec(app_name)
|
192
205
|
puts "Setting up rspec..."
|
193
|
-
|
194
|
-
system("
|
206
|
+
success =
|
207
|
+
system("cd #{app_name} && bin/spring stop && bin/rails generate rspec:install") &&
|
208
|
+
system("rm -rf #{app_name}/test") &&
|
209
|
+
system("cp -R #{template_dir}/rspc_files/* #{app_name}/spec")
|
210
|
+
success or return false
|
211
|
+
rails_helper_contents =
|
212
|
+
`cat #{app_name}/spec/rails_helper.rb`
|
213
|
+
.gsub(/end\s\Z/, "#{custom_spec_helper_config()}\nend")
|
214
|
+
.gsub("require 'rspec/rails'", "require 'rspec/rails'\nrequire 'ucb_rails_user/spec_helpers'")
|
215
|
+
File.open("#{app_name}/spec/rails_helper.rb", "w") do |file|
|
216
|
+
file.puts(rails_helper_contents)
|
217
|
+
end
|
218
|
+
true
|
195
219
|
end
|
196
220
|
|
197
221
|
def template_dir
|
@@ -206,5 +230,17 @@ end
|
|
206
230
|
.join(" ")
|
207
231
|
end
|
208
232
|
|
233
|
+
def custom_spec_helper_config
|
234
|
+
config = <<-END_CONFIG
|
235
|
+
|
236
|
+
# ucb_rails config
|
237
|
+
Dir[Rails.root.join('spec', 'support', '**', '*.rb')].each { |f| require f }
|
238
|
+
config.include UcbRailsUser::SpecHelpers
|
239
|
+
UcbRailsUser.config do |config|
|
240
|
+
config.user_session_manager = "UcbRailsUser::UserSessionManager::TestSessionManager"
|
241
|
+
end
|
242
|
+
END_CONFIG
|
243
|
+
end
|
244
|
+
|
209
245
|
end
|
210
246
|
end
|
@@ -1,3 +1,9 @@
|
|
1
|
+
# the explicit requires remove a deprecation warning in Rails 6
|
2
|
+
# https://stackoverflow.com/questions/56402093/how-can-i-preload-concerns-in-a-rails-initializer-using-rails-6-zeitwerk
|
3
|
+
require "ucb_rails_user/configuration/email"
|
4
|
+
require "ucb_rails_user/configuration/ldap"
|
5
|
+
require "ucb_rails_user/configuration/cas"
|
6
|
+
|
1
7
|
############################################################
|
2
8
|
# Load configuration from config/credentials.yml.enc
|
3
9
|
############################################################
|
@@ -8,7 +14,10 @@ credentials = Rails.application.credentials
|
|
8
14
|
# ActionMailer
|
9
15
|
############################################################
|
10
16
|
|
11
|
-
|
17
|
+
# don't send real emails in development or test
|
18
|
+
unless Rails.env.test? || Rails.env.development?
|
19
|
+
UcbRailsUser::Configuration::Email.configure(credentials.email&.with_indifferent_access())
|
20
|
+
end
|
12
21
|
|
13
22
|
############################################################
|
14
23
|
# Exception Notification
|
@@ -8,4 +8,14 @@ module ApplicationHelper
|
|
8
8
|
Rails.env.production? ? app_name : "#{app_name} - #{Rails.env.titleize}"
|
9
9
|
end
|
10
10
|
|
11
|
+
def footer_copyright_year
|
12
|
+
"#{start_year}" +
|
13
|
+
(Date.today.year > start_year ? " - #{Date.today.year}" : "")
|
14
|
+
end
|
15
|
+
|
16
|
+
# year that this project was first launched
|
17
|
+
def start_year
|
18
|
+
%APP_START_YEAR
|
19
|
+
end
|
20
|
+
|
11
21
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# This spec was automatically generated by ucb_rails_cli - feel free to customize
|
2
|
+
# or remove it as needed.
|
3
|
+
require "rails_helper"
|
4
|
+
|
5
|
+
RSpec.describe "visting the homepage" do
|
6
|
+
|
7
|
+
it "shows a logged in message if the user is logged in" do
|
8
|
+
user = User.create!(first_name: "Jane", last_name: "Austen",
|
9
|
+
ldap_uid: "1234567", employee_id: "987654321", email: "jausten@berkeley.edu")
|
10
|
+
system_login_user(user)
|
11
|
+
visit "/"
|
12
|
+
expect(page.body).to have_text("You are logged in as #{user.full_name}")
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
|
@@ -1,28 +1,28 @@
|
|
1
1
|
!!!
|
2
2
|
%html
|
3
3
|
%head
|
4
|
-
%meta{:
|
5
|
-
%meta{:
|
4
|
+
%meta{charset: "utf-8"}
|
5
|
+
%meta{name: "viewport", content: "width=device-width, initial-scale=1, maximum-scale=1"}
|
6
6
|
%title= content_for?(:title) ? yield(:title) : app_name_with_env
|
7
7
|
|
8
8
|
|
9
|
-
%link{:
|
10
|
-
%link{:
|
11
|
-
%link{:
|
12
|
-
%link{:
|
13
|
-
%link{:
|
9
|
+
%link{href: "https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700,800", rel: "stylesheet"}
|
10
|
+
%link{href: "http://fonts.googleapis.com/css?family=Source+Serif+Pro:400,600,700", rel: "stylesheet"}
|
11
|
+
%link{rel: "stylesheet", href: "https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css", integrity: "sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh", crossorigin: "anonymous"}
|
12
|
+
%link{rel: "stylesheet", href: "https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" }
|
13
|
+
%link{rel: "stylesheet", href: "https://jqueryui.com/resources/demos/style.css" }
|
14
14
|
= favicon_link_tag
|
15
15
|
|
16
|
-
= stylesheet_link_tag "application", :
|
16
|
+
= stylesheet_link_tag "application", media: "all", "data-turbolinks-eval" => false
|
17
17
|
|
18
18
|
= csrf_meta_tags
|
19
19
|
|
20
|
-
%script{:
|
21
|
-
%script{:
|
22
|
-
%script{:
|
20
|
+
%script{src: "https://code.jquery.com/jquery-3.4.1.slim.min.js", integrity: "sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n", crossorigin: "anonymous"}
|
21
|
+
%script{src: "https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js", integrity: "sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo", crossorigin: "anonymous"}
|
22
|
+
%script{src: "https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js", integrity: "sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6", crossorigin: "anonymous"}
|
23
23
|
|
24
24
|
= javascript_tag "window._token = '#{form_authenticity_token}'"
|
25
|
-
=
|
25
|
+
= javascript_pack_tag "application"
|
26
26
|
|
27
27
|
= yield(:head)
|
28
28
|
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require_relative 'lib/ucb_rails_cli/version'
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = "ucb_rails_cli"
|
5
|
+
spec.version = UcbRailsCli::VERSION
|
6
|
+
spec.authors = ["Darin Wilson"]
|
7
|
+
spec.email = ["darinwilson@gmail.com"]
|
8
|
+
|
9
|
+
spec.summary = %q{Spin up a new UCB Rails app}
|
10
|
+
spec.description = %q{Spin up a new UCB Rails app with many features needed for UCB apps already built in}
|
11
|
+
spec.homepage = "https://github.com/ucb-ist-eas/ucb_rails_cli"
|
12
|
+
spec.license = "MIT"
|
13
|
+
|
14
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
15
|
+
|
16
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
17
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
18
|
+
spec.metadata["changelog_uri"] = spec.homepage
|
19
|
+
|
20
|
+
# Specify which files should be added to the gem when it is released.
|
21
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
22
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
23
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
24
|
+
end
|
25
|
+
spec.bindir = "bin"
|
26
|
+
spec.executables = ["ucb_rails"]
|
27
|
+
spec.require_paths = ["lib"]
|
28
|
+
|
29
|
+
spec.add_dependency "thor", "~> 0.20"
|
30
|
+
|
31
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
32
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
33
|
+
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.3.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: 2020-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.20'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: bundler
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '1.15'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '1.15'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: rake
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,8 +70,14 @@ files:
|
|
84
70
|
- LICENSE.txt
|
85
71
|
- README.md
|
86
72
|
- Rakefile
|
73
|
+
- bin/bundle
|
87
74
|
- bin/console
|
75
|
+
- bin/htmldiff
|
76
|
+
- bin/ldiff
|
77
|
+
- bin/rake
|
78
|
+
- bin/rspec
|
88
79
|
- bin/setup
|
80
|
+
- bin/thor
|
89
81
|
- bin/ucb_rails
|
90
82
|
- lib/ucb_rails_cli.rb
|
91
83
|
- lib/ucb_rails_cli/cli.rb
|
@@ -100,6 +92,8 @@ files:
|
|
100
92
|
- lib/ucb_rails_cli/templates/images/favicon.ico
|
101
93
|
- lib/ucb_rails_cli/templates/images/logo-ucberkeley-white.png
|
102
94
|
- lib/ucb_rails_cli/templates/javascripts/application.js
|
95
|
+
- lib/ucb_rails_cli/templates/rspc_files/support/system.rb
|
96
|
+
- lib/ucb_rails_cli/templates/rspc_files/system/homepage_spec.rb
|
103
97
|
- lib/ucb_rails_cli/templates/stylesheets/application.css
|
104
98
|
- lib/ucb_rails_cli/templates/stylesheets/main.sass
|
105
99
|
- lib/ucb_rails_cli/templates/stylesheets/themes/ucb_standard/base/_layout.sass
|
@@ -113,10 +107,14 @@ files:
|
|
113
107
|
- lib/ucb_rails_cli/templates/views/_navigation.html.haml
|
114
108
|
- lib/ucb_rails_cli/templates/views/application.html.haml
|
115
109
|
- lib/ucb_rails_cli/version.rb
|
110
|
+
- ucb_rails_cli.gemspec
|
116
111
|
homepage: https://github.com/ucb-ist-eas/ucb_rails_cli
|
117
112
|
licenses:
|
118
113
|
- MIT
|
119
|
-
metadata:
|
114
|
+
metadata:
|
115
|
+
homepage_uri: https://github.com/ucb-ist-eas/ucb_rails_cli
|
116
|
+
source_code_uri: https://github.com/ucb-ist-eas/ucb_rails_cli
|
117
|
+
changelog_uri: https://github.com/ucb-ist-eas/ucb_rails_cli
|
120
118
|
post_install_message:
|
121
119
|
rdoc_options: []
|
122
120
|
require_paths:
|
@@ -125,15 +123,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
125
123
|
requirements:
|
126
124
|
- - ">="
|
127
125
|
- !ruby/object:Gem::Version
|
128
|
-
version:
|
126
|
+
version: 2.3.0
|
129
127
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
130
128
|
requirements:
|
131
129
|
- - ">="
|
132
130
|
- !ruby/object:Gem::Version
|
133
131
|
version: '0'
|
134
132
|
requirements: []
|
135
|
-
|
136
|
-
rubygems_version: 2.7.7
|
133
|
+
rubygems_version: 3.1.2
|
137
134
|
signing_key:
|
138
135
|
specification_version: 4
|
139
136
|
summary: Spin up a new UCB Rails app
|