beautiful_photons 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +28 -0
  4. data/Rakefile +11 -0
  5. data/app/assets/javascripts/beautiful_photons/bulk_select_controller.js +76 -0
  6. data/app/assets/javascripts/beautiful_photons/crop_editor_controller.js +108 -0
  7. data/app/assets/javascripts/beautiful_photons/focal_point_controller.js +16 -0
  8. data/app/assets/javascripts/beautiful_photons/index.js +13 -0
  9. data/app/assets/javascripts/beautiful_photons/reorder_controller.js +45 -0
  10. data/app/assets/stylesheets/beautiful_photons/application.css +15 -0
  11. data/app/controllers/beautiful_photons/admin/base_controller.rb +10 -0
  12. data/app/controllers/beautiful_photons/admin/categories_controller.rb +37 -0
  13. data/app/controllers/beautiful_photons/admin/galleries_controller.rb +100 -0
  14. data/app/controllers/beautiful_photons/admin/photos_controller.rb +75 -0
  15. data/app/controllers/beautiful_photons/admin/standalones_controller.rb +54 -0
  16. data/app/controllers/beautiful_photons/api/base_controller.rb +15 -0
  17. data/app/controllers/beautiful_photons/api/v1/galleries_controller.rb +60 -0
  18. data/app/controllers/beautiful_photons/api/v1/gallery_photos_controller.rb +60 -0
  19. data/app/controllers/beautiful_photons/api/v1/photos_controller.rb +65 -0
  20. data/app/controllers/beautiful_photons/application_controller.rb +4 -0
  21. data/app/controllers/beautiful_photons/standalone_photos_controller.rb +16 -0
  22. data/app/helpers/beautiful_photons/application_helper.rb +4 -0
  23. data/app/helpers/beautiful_photons/photo_helper.rb +103 -0
  24. data/app/jobs/beautiful_photons/application_job.rb +4 -0
  25. data/app/mailers/beautiful_photons/application_mailer.rb +6 -0
  26. data/app/models/beautiful_photons/application_record.rb +5 -0
  27. data/app/models/beautiful_photons/category.rb +7 -0
  28. data/app/models/beautiful_photons/gallery.rb +17 -0
  29. data/app/models/beautiful_photons/gallery_photo.rb +22 -0
  30. data/app/models/beautiful_photons/photo.rb +29 -0
  31. data/app/models/beautiful_photons/standalone.rb +23 -0
  32. data/app/views/beautiful_photons/admin/categories/index.html.erb +28 -0
  33. data/app/views/beautiful_photons/admin/galleries/add_photos_page.html.erb +30 -0
  34. data/app/views/beautiful_photons/admin/galleries/edit.html.erb +17 -0
  35. data/app/views/beautiful_photons/admin/galleries/index.html.erb +13 -0
  36. data/app/views/beautiful_photons/admin/galleries/new.html.erb +17 -0
  37. data/app/views/beautiful_photons/admin/galleries/show.html.erb +84 -0
  38. data/app/views/beautiful_photons/admin/photos/edit.html.erb +35 -0
  39. data/app/views/beautiful_photons/admin/photos/index.html.erb +60 -0
  40. data/app/views/beautiful_photons/admin/photos/new.html.erb +10 -0
  41. data/app/views/beautiful_photons/admin/photos/show.html.erb +66 -0
  42. data/app/views/beautiful_photons/admin/standalones/change_photo.html.erb +39 -0
  43. data/app/views/beautiful_photons/admin/standalones/edit_crop.html.erb +38 -0
  44. data/app/views/beautiful_photons/admin/standalones/edit_mobile_crop.html.erb +37 -0
  45. data/app/views/beautiful_photons/admin/standalones/index.html.erb +27 -0
  46. data/app/views/beautiful_photons/admin/standalones/show.html.erb +52 -0
  47. data/app/views/beautiful_photons/standalone_photos/show.html.erb +27 -0
  48. data/app/views/layouts/beautiful_photons/admin.html.erb +37 -0
  49. data/config/importmap.rb +5 -0
  50. data/config/routes.rb +36 -0
  51. data/db/migrate/20260318000001_create_beautiful_photons_photos.rb +15 -0
  52. data/db/migrate/20260318000002_create_beautiful_photons_galleries.rb +13 -0
  53. data/db/migrate/20260318000003_create_beautiful_photons_gallery_photos.rb +15 -0
  54. data/db/migrate/20260318000004_create_beautiful_photons_standalones.rb +13 -0
  55. data/db/migrate/20260318000005_add_crop_to_beautiful_photons_standalones.rb +12 -0
  56. data/db/migrate/20260318185017_create_beautiful_photons_categories.rb +11 -0
  57. data/db/migrate/20260318194125_add_category_to_beautiful_photons_photos.rb +6 -0
  58. data/lib/beautiful_photons/engine.rb +30 -0
  59. data/lib/beautiful_photons/version.rb +3 -0
  60. data/lib/beautiful_photons.rb +31 -0
  61. data/lib/generators/beautiful_photons/install_generator.rb +24 -0
  62. data/lib/tasks/beautiful_photons_tasks.rake +4 -0
  63. metadata +147 -0
@@ -0,0 +1,31 @@
1
+ require "turbo-rails"
2
+ require "beautiful_photons/version"
3
+ require "beautiful_photons/engine"
4
+
5
+ module BeautifulPhotons
6
+ class Configuration
7
+ attr_accessor :admin_layout, :authentication_method, :current_user_method,
8
+ :api_authentication_method
9
+
10
+ def initialize
11
+ @admin_layout = "application"
12
+ @authentication_method = :authenticate_user!
13
+ @current_user_method = :current_user
14
+ @api_authentication_method = :authenticate_api_user!
15
+ end
16
+ end
17
+
18
+ class << self
19
+ def configure
20
+ yield(config)
21
+ end
22
+
23
+ def config
24
+ @config ||= Configuration.new
25
+ end
26
+
27
+ def reset_config!
28
+ @config = Configuration.new
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rails/generators"
4
+
5
+ module BeautifulPhotons
6
+ module Generators
7
+ class InstallGenerator < Rails::Generators::Base
8
+ desc "Install BeautifulPhotons photo gallery engine"
9
+
10
+ def mount_engine
11
+ route 'mount BeautifulPhotons::Engine, at: "/photos"'
12
+ end
13
+
14
+ def print_instructions
15
+ say ""
16
+ say "BeautifulPhotons installed successfully!", :green
17
+ say ""
18
+ say "Next steps:"
19
+ say " 1. Run migrations: rails db:migrate"
20
+ say ""
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :beautiful_photons do
3
+ # # Task goes here
4
+ # end
metadata ADDED
@@ -0,0 +1,147 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: beautiful_photons
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Tyler Schneider
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: rails
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: 8.1.2
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: 8.1.2
26
+ - !ruby/object:Gem::Dependency
27
+ name: turbo-rails
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ - !ruby/object:Gem::Dependency
41
+ name: keystone_ui
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 0.4.1
47
+ type: :runtime
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: 0.4.1
54
+ description: A mountable Rails engine for managing photo galleries with responsive
55
+ focal-point cropping, named galleries, and an API for uploads.
56
+ email:
57
+ - tylercschneider@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - MIT-LICENSE
63
+ - README.md
64
+ - Rakefile
65
+ - app/assets/javascripts/beautiful_photons/bulk_select_controller.js
66
+ - app/assets/javascripts/beautiful_photons/crop_editor_controller.js
67
+ - app/assets/javascripts/beautiful_photons/focal_point_controller.js
68
+ - app/assets/javascripts/beautiful_photons/index.js
69
+ - app/assets/javascripts/beautiful_photons/reorder_controller.js
70
+ - app/assets/stylesheets/beautiful_photons/application.css
71
+ - app/controllers/beautiful_photons/admin/base_controller.rb
72
+ - app/controllers/beautiful_photons/admin/categories_controller.rb
73
+ - app/controllers/beautiful_photons/admin/galleries_controller.rb
74
+ - app/controllers/beautiful_photons/admin/photos_controller.rb
75
+ - app/controllers/beautiful_photons/admin/standalones_controller.rb
76
+ - app/controllers/beautiful_photons/api/base_controller.rb
77
+ - app/controllers/beautiful_photons/api/v1/galleries_controller.rb
78
+ - app/controllers/beautiful_photons/api/v1/gallery_photos_controller.rb
79
+ - app/controllers/beautiful_photons/api/v1/photos_controller.rb
80
+ - app/controllers/beautiful_photons/application_controller.rb
81
+ - app/controllers/beautiful_photons/standalone_photos_controller.rb
82
+ - app/helpers/beautiful_photons/application_helper.rb
83
+ - app/helpers/beautiful_photons/photo_helper.rb
84
+ - app/jobs/beautiful_photons/application_job.rb
85
+ - app/mailers/beautiful_photons/application_mailer.rb
86
+ - app/models/beautiful_photons/application_record.rb
87
+ - app/models/beautiful_photons/category.rb
88
+ - app/models/beautiful_photons/gallery.rb
89
+ - app/models/beautiful_photons/gallery_photo.rb
90
+ - app/models/beautiful_photons/photo.rb
91
+ - app/models/beautiful_photons/standalone.rb
92
+ - app/views/beautiful_photons/admin/categories/index.html.erb
93
+ - app/views/beautiful_photons/admin/galleries/add_photos_page.html.erb
94
+ - app/views/beautiful_photons/admin/galleries/edit.html.erb
95
+ - app/views/beautiful_photons/admin/galleries/index.html.erb
96
+ - app/views/beautiful_photons/admin/galleries/new.html.erb
97
+ - app/views/beautiful_photons/admin/galleries/show.html.erb
98
+ - app/views/beautiful_photons/admin/photos/edit.html.erb
99
+ - app/views/beautiful_photons/admin/photos/index.html.erb
100
+ - app/views/beautiful_photons/admin/photos/new.html.erb
101
+ - app/views/beautiful_photons/admin/photos/show.html.erb
102
+ - app/views/beautiful_photons/admin/standalones/change_photo.html.erb
103
+ - app/views/beautiful_photons/admin/standalones/edit_crop.html.erb
104
+ - app/views/beautiful_photons/admin/standalones/edit_mobile_crop.html.erb
105
+ - app/views/beautiful_photons/admin/standalones/index.html.erb
106
+ - app/views/beautiful_photons/admin/standalones/show.html.erb
107
+ - app/views/beautiful_photons/standalone_photos/show.html.erb
108
+ - app/views/layouts/beautiful_photons/admin.html.erb
109
+ - config/importmap.rb
110
+ - config/routes.rb
111
+ - db/migrate/20260318000001_create_beautiful_photons_photos.rb
112
+ - db/migrate/20260318000002_create_beautiful_photons_galleries.rb
113
+ - db/migrate/20260318000003_create_beautiful_photons_gallery_photos.rb
114
+ - db/migrate/20260318000004_create_beautiful_photons_standalones.rb
115
+ - db/migrate/20260318000005_add_crop_to_beautiful_photons_standalones.rb
116
+ - db/migrate/20260318185017_create_beautiful_photons_categories.rb
117
+ - db/migrate/20260318194125_add_category_to_beautiful_photons_photos.rb
118
+ - lib/beautiful_photons.rb
119
+ - lib/beautiful_photons/engine.rb
120
+ - lib/beautiful_photons/version.rb
121
+ - lib/generators/beautiful_photons/install_generator.rb
122
+ - lib/tasks/beautiful_photons_tasks.rake
123
+ homepage: https://github.com/tylercschneider/beautiful_photons
124
+ licenses:
125
+ - MIT
126
+ metadata:
127
+ homepage_uri: https://github.com/tylercschneider/beautiful_photons
128
+ source_code_uri: https://github.com/tylercschneider/beautiful_photons
129
+ changelog_uri: https://github.com/tylercschneider/beautiful_photons/blob/main/CHANGELOG.md
130
+ rdoc_options: []
131
+ require_paths:
132
+ - lib
133
+ required_ruby_version: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ version: '0'
138
+ required_rubygems_version: !ruby/object:Gem::Requirement
139
+ requirements:
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ version: '0'
143
+ requirements: []
144
+ rubygems_version: 4.0.20
145
+ specification_version: 4
146
+ summary: Photo gallery engine for Rails with focal-point cropping.
147
+ test_files: []