panda_cms 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c792dc4f11481116ec3f1ebd1ca8485be8555e203f8063eb733dbf65aec70d0
4
- data.tar.gz: d27a4e96c077c6fef1359c02d2432e87ca6a1a6bcd8b675f9034a0409a9bf01b
3
+ metadata.gz: 625476035c61b37e617fe74e22deca62b77522d70c4776663ee0429453bc6ea2
4
+ data.tar.gz: 0e5424b52179f8b3f6b0108763399ac65c7b2ed3fc12dc68c0f6721663526547
5
5
  SHA512:
6
- metadata.gz: 77ab8fc869c388bead7a207e1b78d126120d7bab04cd4eb8bb8e1dbd20e1ef72fa58c2f9fc7bad0faf019793b33b86f8e986cc58c1e07fc4b7ba2c6508b659d2
7
- data.tar.gz: ddca9298c136c577c29008f92c7c6adba0b8e4f2753cf381849f96071fec98a1aa7cf805b5ac44ed7b3b22ecf9b769b1824fd3845ac48424e3cc75dd16f96474
6
+ metadata.gz: 852b417dc7bea4ebe4f5c96edfe3937ab435f2a549722349f019b70a147d853b728a2951acebc95a9e67a28fbd907e5625e3b0d84e2b5d6ada7d0a31a1415f47
7
+ data.tar.gz: 13c1b3692557a6f9768921029da41d93ba34f6664cb85a9967a2dc6e656cc0db1a56023f07bc28bd8ee23b15fd3a0efeeb2fdae32d3041fa9797e04d28558c28
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Panda CMS
2
2
 
3
3
  > [!CAUTION]
4
- > This application is being developed in public. It is not ready for production use. If you'd like to try it out (or help with documentation), please contact [@jfi](https://github.com/jfi).
4
+ > This application is being developed in public. It is not ready for production use. If you'd like to try it out (or help with documentation), please contact [@jfi](https://github.com/jfi) by emailing [bamboo@pandacms.io](mailto:bamboo@pandacms.io).
5
5
 
6
6
  ## Panda CMS is the CMS we always wanted. 🐼
7
7
 
@@ -9,8 +9,9 @@ Better websites, on Rails.
9
9
 
10
10
  [Read more about the project...](https://github.com/pandacms/.github/blob/main/profile/README.md) ✨
11
11
 
12
- Panda is grown from our work at [Otaina](https://www.otaina.co.uk), a small group of freelancers. We needed something that could handle websites large and small – but where we could expand it too. We sent our first websites live in March 2024.
12
+ 🐼 is grown from our work at [Otaina](https://www.otaina.co.uk), a small group of freelancers. We needed something that could handle websites large and small – but where we could expand it too. We sent our first websites live in March 2024.
13
13
 
14
+ ![Gem Version](https://img.shields.io/gem/v/panda_cms) ![Build Status](https://img.shields.io/github/actions/workflow/status/pandacms/panda_cms/ci.yml)
14
15
  ![GitHub Last Commit](https://img.shields.io/github/last-commit/pandacms/panda_cms) [![Ruby Code Style](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/standardrb/standard)
15
16
 
16
17
  ## Usage
@@ -30,9 +31,7 @@ The easiest way for you to get started is to visit http://localhost:3000/admin a
30
31
  Add the following to `Gemfile`:
31
32
 
32
33
  ```ruby
33
- source "https://rubygems.pkg.github.com/pandacms" do
34
- gem "panda_cms"
35
- end
34
+ gem "panda_cms"
36
35
  ```
37
36
 
38
37
  For initial setup, run:
@@ -44,6 +43,8 @@ rails db:migrate
44
43
  rails db:seed
45
44
  ```
46
45
 
46
+ You may want to check this does not re-run any of your existing seeds!
47
+
47
48
  If you don't want to use GitHub to login, you'll need to configure a user provider (in `config/initializers/panda_cms.rb`), and then set your user's `admin` attribute to `true` once you've first tried to login. (And yes, there should be a better first-time setup experience than this. We're working on it!)
48
49
 
49
50
  ## Gotchas
@@ -51,7 +52,7 @@ If you don't want to use GitHub to login, you'll need to configure a user provid
51
52
  This is a non-exhuastive list (there will be many more):
52
53
 
53
54
  * To date, this has only been tested with Rails 7.1 and 7.2.
54
- * This assumes you're using Tailwind CSS for your frontend. We'll attempt to relax this in future, but supporting Tailwind CSS is our current priority.
55
+ * There may be conflicts if you're not using Tailwind CSS on the frontend. Please report this.
55
56
  * If you change your login path from `/admin` the GitHub application we supply won't work on first login, so probably don't do that until you're setup!
56
57
 
57
58
  ## Contributing
@@ -15,8 +15,10 @@ module PandaCms
15
15
  path_to_find = "/" + params[:path].to_s
16
16
  page = Page.find_by(path: path_to_find) || Page.find_by(path: "/404")
17
17
  PandaCms::Current.page = page
18
+ layout = page&.template&.file_path
18
19
 
19
- if page
20
+ # TODO: If page is active?
21
+ if page && layout
20
22
  globals = {
21
23
  page: page,
22
24
  title: page.title
@@ -35,7 +37,7 @@ module PandaCms
35
37
  )
36
38
  end
37
39
 
38
- render inline: "", assigns: globals, status: :ok, layout: page.template.file_path
40
+ render inline: "", assigns: globals, status: :ok, layout: layout
39
41
  else
40
42
  # This works for now, but we may want to override in future (e.g. custom 404s)
41
43
  render file: "#{Rails.root}/public/404.html", layout: false, status: :not_found
@@ -1,8 +1,6 @@
1
1
  <%= render PandaCms::Admin::ContainerComponent.new do |component| %>
2
2
  <% component.with_heading(text: "Settings", level: 1) %>
3
3
 
4
- <a href="https://api.instagram.com/oauth/authorize?client_id=1149927569456763&redirect_uri=http://localhost:3000/admin/integrations/instagram/callback&scope=user_profile,user_media">Login to Instagram</a>
5
-
6
4
  <%= render PandaCms::Admin::PanelComponent.new do |panel| %>
7
5
  <% panel.with_heading(text: "System Status") %>
8
6
 
@@ -12,6 +10,10 @@
12
10
  <p class="text-base leading-loose"><i class="mr-2 text-active fa fa-check-circle"></i> <span class="font-medium">Environment:</span> <%= Rails.env.titleize %></p>
13
11
  <% end %>
14
12
 
13
+ <%= render PandaCms::Admin::PanelComponent.new do |panel| %>
14
+ <% panel.with_heading(text: "Integrations") %>
15
+ <% end %>
16
+
15
17
  <div class="text-center mt-6 space-y-2">
16
18
  <p class="text-sm font-semibold">🐼 Panda CMS version: <%= PandaCms::VERSION %></p>
17
19
  <p class="text-sm">&copy; <%= Date.current.year %> Panda Software Limited. All rights reserved.</p>
@@ -0,0 +1,6 @@
1
+
2
+ <%= render PandaCms::Admin::ButtonComponent.new(
3
+ text: "Connect Instagram Feed",
4
+ link: "https://api.instagram.com/oauth/authorize?client_id=525993713271219&redirect_uri=https://localhost:3000/admin/integrations/instagram/callback&scope=user_profile,user_media&response_type=code&state=#{current_user.id}",
5
+ icon: "brands fa-instagram"
6
+ ) %>
@@ -1,3 +1,3 @@
1
1
  module PandaCms
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panda_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Panda Software Limited
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-25 00:00:00.000000000 Z
11
+ date: 2024-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activestorage-office-previewer
@@ -280,16 +280,16 @@ dependencies:
280
280
  name: rails
281
281
  requirement: !ruby/object:Gem::Requirement
282
282
  requirements:
283
- - - ">="
283
+ - - "~>"
284
284
  - !ruby/object:Gem::Version
285
- version: '7.2'
285
+ version: 7.2.1
286
286
  type: :runtime
287
287
  prerelease: false
288
288
  version_requirements: !ruby/object:Gem::Requirement
289
289
  requirements:
290
- - - ">="
290
+ - - "~>"
291
291
  - !ruby/object:Gem::Version
292
- version: '7.2'
292
+ version: 7.2.1
293
293
  - !ruby/object:Gem::Dependency
294
294
  name: redcarpet
295
295
  requirement: !ruby/object:Gem::Requirement
@@ -500,6 +500,62 @@ dependencies:
500
500
  - - "~>"
501
501
  - !ruby/object:Gem::Version
502
502
  version: '9.5'
503
+ - !ruby/object:Gem::Dependency
504
+ name: danger-reek
505
+ requirement: !ruby/object:Gem::Requirement
506
+ requirements:
507
+ - - "~>"
508
+ - !ruby/object:Gem::Version
509
+ version: '0.3'
510
+ type: :development
511
+ prerelease: false
512
+ version_requirements: !ruby/object:Gem::Requirement
513
+ requirements:
514
+ - - "~>"
515
+ - !ruby/object:Gem::Version
516
+ version: '0.3'
517
+ - !ruby/object:Gem::Dependency
518
+ name: danger-rubocop
519
+ requirement: !ruby/object:Gem::Requirement
520
+ requirements:
521
+ - - "~>"
522
+ - !ruby/object:Gem::Version
523
+ version: '0.13'
524
+ type: :development
525
+ prerelease: false
526
+ version_requirements: !ruby/object:Gem::Requirement
527
+ requirements:
528
+ - - "~>"
529
+ - !ruby/object:Gem::Version
530
+ version: '0.13'
531
+ - !ruby/object:Gem::Dependency
532
+ name: danger-simplecov_json
533
+ requirement: !ruby/object:Gem::Requirement
534
+ requirements:
535
+ - - "~>"
536
+ - !ruby/object:Gem::Version
537
+ version: '0.3'
538
+ type: :development
539
+ prerelease: false
540
+ version_requirements: !ruby/object:Gem::Requirement
541
+ requirements:
542
+ - - "~>"
543
+ - !ruby/object:Gem::Version
544
+ version: '0.3'
545
+ - !ruby/object:Gem::Dependency
546
+ name: danger-todoist
547
+ requirement: !ruby/object:Gem::Requirement
548
+ requirements:
549
+ - - "~>"
550
+ - !ruby/object:Gem::Version
551
+ version: '2.0'
552
+ type: :development
553
+ prerelease: false
554
+ version_requirements: !ruby/object:Gem::Requirement
555
+ requirements:
556
+ - - "~>"
557
+ - !ruby/object:Gem::Version
558
+ version: '2.0'
503
559
  - !ruby/object:Gem::Dependency
504
560
  name: erb_lint
505
561
  requirement: !ruby/object:Gem::Requirement
@@ -588,16 +644,16 @@ dependencies:
588
644
  name: lefthook
589
645
  requirement: !ruby/object:Gem::Requirement
590
646
  requirements:
591
- - - ">="
647
+ - - "~>"
592
648
  - !ruby/object:Gem::Version
593
- version: '0'
649
+ version: '1.7'
594
650
  type: :development
595
651
  prerelease: false
596
652
  version_requirements: !ruby/object:Gem::Requirement
597
653
  requirements:
598
- - - ">="
654
+ - - "~>"
599
655
  - !ruby/object:Gem::Version
600
- version: '0'
656
+ version: '1.7'
601
657
  - !ruby/object:Gem::Dependency
602
658
  name: puma
603
659
  requirement: !ruby/object:Gem::Requirement
@@ -716,6 +772,62 @@ dependencies:
716
772
  - - "~>"
717
773
  - !ruby/object:Gem::Version
718
774
  version: '0.22'
775
+ - !ruby/object:Gem::Dependency
776
+ name: simplecov-json
777
+ requirement: !ruby/object:Gem::Requirement
778
+ requirements:
779
+ - - "~>"
780
+ - !ruby/object:Gem::Version
781
+ version: '0.2'
782
+ type: :development
783
+ prerelease: false
784
+ version_requirements: !ruby/object:Gem::Requirement
785
+ requirements:
786
+ - - "~>"
787
+ - !ruby/object:Gem::Version
788
+ version: '0.2'
789
+ - !ruby/object:Gem::Dependency
790
+ name: simplecov_json_formatter
791
+ requirement: !ruby/object:Gem::Requirement
792
+ requirements:
793
+ - - "~>"
794
+ - !ruby/object:Gem::Version
795
+ version: '0.1'
796
+ type: :development
797
+ prerelease: false
798
+ version_requirements: !ruby/object:Gem::Requirement
799
+ requirements:
800
+ - - "~>"
801
+ - !ruby/object:Gem::Version
802
+ version: '0.1'
803
+ - !ruby/object:Gem::Dependency
804
+ name: simplecov-lcov
805
+ requirement: !ruby/object:Gem::Requirement
806
+ requirements:
807
+ - - "~>"
808
+ - !ruby/object:Gem::Version
809
+ version: '0.8'
810
+ type: :development
811
+ prerelease: false
812
+ version_requirements: !ruby/object:Gem::Requirement
813
+ requirements:
814
+ - - "~>"
815
+ - !ruby/object:Gem::Version
816
+ version: '0.8'
817
+ - !ruby/object:Gem::Dependency
818
+ name: simplecov_lcov_formatter
819
+ requirement: !ruby/object:Gem::Requirement
820
+ requirements:
821
+ - - "~>"
822
+ - !ruby/object:Gem::Version
823
+ version: '0.9'
824
+ type: :development
825
+ prerelease: false
826
+ version_requirements: !ruby/object:Gem::Requirement
827
+ requirements:
828
+ - - "~>"
829
+ - !ruby/object:Gem::Version
830
+ version: '0.9'
719
831
  - !ruby/object:Gem::Dependency
720
832
  name: solargraph
721
833
  requirement: !ruby/object:Gem::Requirement
@@ -792,6 +904,20 @@ dependencies:
792
904
  - - "~>"
793
905
  - !ruby/object:Gem::Version
794
906
  version: '2.0'
907
+ - !ruby/object:Gem::Dependency
908
+ name: undercover
909
+ requirement: !ruby/object:Gem::Requirement
910
+ requirements:
911
+ - - "~>"
912
+ - !ruby/object:Gem::Version
913
+ version: '0.5'
914
+ type: :development
915
+ prerelease: false
916
+ version_requirements: !ruby/object:Gem::Requirement
917
+ requirements:
918
+ - - "~>"
919
+ - !ruby/object:Gem::Version
920
+ version: '0.5'
795
921
  - !ruby/object:Gem::Dependency
796
922
  name: yard-activerecord
797
923
  requirement: !ruby/object:Gem::Requirement
@@ -925,6 +1051,7 @@ files:
925
1051
  - app/views/panda_cms/admin/sessions/new.html.erb
926
1052
  - app/views/panda_cms/admin/settings/bulk_editor/new.html.erb
927
1053
  - app/views/panda_cms/admin/settings/index.html.erb
1054
+ - app/views/panda_cms/admin/settings/insta.html
928
1055
  - app/views/panda_cms/admin/shared/_breadcrumbs.html.erb
929
1056
  - app/views/panda_cms/admin/shared/_flash.html.erb
930
1057
  - app/views/panda_cms/admin/shared/_sidebar.html.erb