godmin 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +0 -2
- data/.travis.yml +6 -17
- data/CHANGELOG.md +9 -0
- data/Rakefile +3 -3
- data/app/views/godmin/resource/_button_actions.html.erb +1 -1
- data/gemfiles/rails_5.gemfile +1 -1
- data/gemfiles/rails_6.gemfile +1 -1
- data/lib/godmin/version.rb +1 -1
- data/template.rb +14 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a084849cf4dd5f729b2f5ca0dabdcec727ef1172eb1cb19baf9de27ca822950
|
4
|
+
data.tar.gz: 8b655c6dad3b1a1fc95d88b08cf2f25e848b646266fd63808dffad77b47f767e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0fec37368ae0548a3e3adb1b662f214aff97756f916d11da1907acbc7caa43304b920844f9a1f8ebb500a35d7f261c060fd8e605e5cb841e7fdafb9da8a744b
|
7
|
+
data.tar.gz: d6a218a707bafe5ac68611b13c74e6975c13702562d5a804514faad4af0100544b5bf722e252077af89653f2702deb932e36f1c5131855b2604af86247b069fe
|
data/.codeclimate.yml
CHANGED
data/.travis.yml
CHANGED
@@ -1,24 +1,13 @@
|
|
1
|
-
bundler_args: --without debug
|
1
|
+
bundler_args: "--without debug"
|
2
2
|
cache: bundler
|
3
|
-
script:
|
4
|
-
sudo: false
|
5
|
-
|
3
|
+
script: bundle exec rake test
|
6
4
|
rvm:
|
7
|
-
- 2.
|
8
|
-
- 2.3
|
9
|
-
- 2.5.1
|
10
|
-
|
5
|
+
- 2.6.7
|
6
|
+
- 2.7.3
|
11
7
|
gemfile:
|
12
8
|
- gemfiles/rails_5.gemfile
|
13
9
|
- gemfiles/rails_6.gemfile
|
14
|
-
|
15
|
-
matrix:
|
16
|
-
exclude:
|
17
|
-
- rvm: 2.2.2
|
18
|
-
gemfile: gemfiles/rails_6.gemfile
|
19
|
-
- rvm: 2.3.5
|
20
|
-
gemfile: gemfiles/rails_6.gemfile
|
21
|
-
|
22
10
|
addons:
|
23
11
|
code_climate:
|
24
|
-
repo_token:
|
12
|
+
repo_token:
|
13
|
+
secure: WBszVdtEvWM2KugFre9BpwkCduY6hjrmK7xo1GLiru4NMqr4ZoRXruQ5ijhZE79YqduR6zudKr72g9yG4R+4CK7ghYu4x5JB76IW8gFWpI9teTWrF4hdSbJgwxSH5JNkqWF4f6ic4Xr1Vgc43agzt+1KmA9imoGs2Q0EbAY3H2M=
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
### 2.1.0 - 2021-05-10
|
4
|
+
|
5
|
+
Bug fixes
|
6
|
+
- Use symbol in path for compatibility with the latest Rails security patches (https://github.com/varvet/godmin/pull/256)
|
7
|
+
|
8
|
+
Other
|
9
|
+
- Build and test against Ruby 2.6 and 2.7
|
10
|
+
- Stop building and testing against unsupported rubies (2.5 and older). These may still work and PRs may still be accepted.
|
11
|
+
|
3
12
|
### 2.0.0 - 2019-12-06
|
4
13
|
|
5
14
|
Features
|
data/Rakefile
CHANGED
@@ -36,14 +36,14 @@ namespace :sandbox do
|
|
36
36
|
task :deploy do
|
37
37
|
message = "Generated from: https://github.com/varvet/godmin/commit/#{`git rev-parse HEAD`.strip}"
|
38
38
|
template_path = File.expand_path("../template.rb", __FILE__)
|
39
|
-
Bundler.
|
39
|
+
Bundler.with_unbundled_env do
|
40
40
|
Dir.mktmpdir do |dir|
|
41
41
|
Dir.chdir(dir)
|
42
|
-
system("git clone
|
42
|
+
system("git clone git@github.com:varvet/godmin-sandbox.git")
|
43
43
|
if $CHILD_STATUS.success?
|
44
44
|
Dir.chdir("godmin-sandbox")
|
45
45
|
system("rm -rf *")
|
46
|
-
system("rails new . -d postgresql -m #{template_path} --without-engine --skip-spring")
|
46
|
+
system("rails _5.2.5_ new . -d postgresql -m #{template_path} --without-engine --skip-spring")
|
47
47
|
if $CHILD_STATUS.success?
|
48
48
|
system("git add --all")
|
49
49
|
system("git commit -m '#{message}'")
|
@@ -1,3 +1,3 @@
|
|
1
1
|
<% if policy(@resource_service.build_resource({})).new? %>
|
2
|
-
<%= link_to t("helpers.submit.create", model: @resource_class.model_name.human), [:new, *@resource_parents, @resource_class.model_name.singular_route_key], class: "btn btn-default" %>
|
2
|
+
<%= link_to t("helpers.submit.create", model: @resource_class.model_name.human), [:new, *@resource_parents, @resource_class.model_name.singular_route_key.to_sym], class: "btn btn-default" %>
|
3
3
|
<% end %>
|
data/gemfiles/rails_5.gemfile
CHANGED
data/gemfiles/rails_6.gemfile
CHANGED
data/lib/godmin/version.rb
CHANGED
data/template.rb
CHANGED
@@ -21,6 +21,7 @@ def install_standalone
|
|
21
21
|
modify_author_service
|
22
22
|
modify_article_controller
|
23
23
|
modify_article_service
|
24
|
+
modify_readme
|
24
25
|
|
25
26
|
migrate_and_seed
|
26
27
|
end
|
@@ -64,6 +65,7 @@ def install_engine
|
|
64
65
|
modify_author_service("admin")
|
65
66
|
modify_article_controller("admin")
|
66
67
|
modify_article_service("admin")
|
68
|
+
modify_readme
|
67
69
|
|
68
70
|
migrate_and_seed
|
69
71
|
end
|
@@ -308,6 +310,18 @@ def modify_author_service(namespace = nil)
|
|
308
310
|
end
|
309
311
|
end
|
310
312
|
|
313
|
+
def modify_readme
|
314
|
+
readme_file = "README.md"
|
315
|
+
run "rm #{readme_file}"
|
316
|
+
readme_text = <<~README
|
317
|
+
# README
|
318
|
+
|
319
|
+
This is the source code for a demo application of the [Godmin](https://github.com/varvet/godmin) admin framework for Rails.
|
320
|
+
It is generated by running `rake sandbox:deploy` inside the Godmin repo.
|
321
|
+
README
|
322
|
+
File.open(readme_file, 'w') { |file| file.write(readme_text) }
|
323
|
+
end
|
324
|
+
|
311
325
|
def migrate_and_seed
|
312
326
|
rake("db:migrate")
|
313
327
|
rake("db:seed")
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: godmin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Ljungblad
|
8
8
|
- Linus Pettersson
|
9
9
|
- Varvet
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2021-05-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bcrypt
|
@@ -534,7 +534,7 @@ homepage: https://github.com/varvet/godmin
|
|
534
534
|
licenses:
|
535
535
|
- MIT
|
536
536
|
metadata: {}
|
537
|
-
post_install_message:
|
537
|
+
post_install_message:
|
538
538
|
rdoc_options: []
|
539
539
|
require_paths:
|
540
540
|
- lib
|
@@ -549,8 +549,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
549
549
|
- !ruby/object:Gem::Version
|
550
550
|
version: '0'
|
551
551
|
requirements: []
|
552
|
-
rubygems_version: 3.
|
553
|
-
signing_key:
|
552
|
+
rubygems_version: 3.1.4
|
553
|
+
signing_key:
|
554
554
|
specification_version: 4
|
555
555
|
summary: Godmin is an admin framework for Rails 5+
|
556
556
|
test_files:
|