Skip to content

Commit

Permalink
Merge pull request #9 from realstorypro/blueprints
Browse files Browse the repository at this point in the history
Setting up the Newsroom Infrastructure
  • Loading branch information
Leonid Medovyy committed May 12, 2023
2 parents 5fc563c + 6e5222d commit cac553a
Show file tree
Hide file tree
Showing 148 changed files with 18,263 additions and 407 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ node_modules
.irb_history

/.vite/

.byebug_history
7 changes: 7 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ inherit_from: .rubocop_todo.yml

require: rubocop-rails

Style/Documentation:
Enabled: false

AllCops:
NewCops: disable
Exclude:
Expand All @@ -14,4 +17,8 @@ AllCops:
- 'config/spring.rb'
- 'config/puma.rb'
- '.irbrc'
- 'lib/tasks/themes.rake'
- 'lib/cli/**/*'
- 'app/lib/story_pro.rb'
- 'app/jobs/**/*'

24 changes: 24 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,27 @@ Style/SymbolArray:
# URISchemes: http, https
Layout/LineLength:
Max: 127


Rails/FilePath:
Exclude:
- 'config/initializers/apipie.rb'
-
Metrics/ParameterLists:
Exclude:
- 'app/mailers/admin_mailer.rb'

Rails/OutputSafety:
Exclude:
- 'app/helpers/devise_helper.rb'
- 'app/helpers/application_helper.rb'

Rails/UniqueValidationWithoutIndex:
Exclude:
- 'app/models/assignment.rb'
- 'app/models/story_tag.rb'
- 'app/models/tagging.rb'

Rails/SkipsModelValidations:
Exclude:
- 'lib/tasks/stories.rake'
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@ gem "bootsnap", require: false
gem 'canonical-rails', github: 'jumph4x/canonical-rails'
gem 'config'
gem 'deep_cloneable', '~> 3.2.0'
gem 'uploadcare-rails'
gem 'friendly_id'
gem 'httparty'
gem 'maruku'
gem 'reverse_markdown'
gem 'invisible_captcha'
gem 'jsonb_accessor'
gem "jbuilder"
gem 'rack-canonical-host'
gem 'simple_scheduler'
gem 'sitemap_generator'
gem 'slack-notifier'
gem 'ruby-openai'

# Database
gem 'hiredis'
Expand All @@ -47,6 +50,7 @@ gem "stimulus-rails"
gem 'turbo-rails'
gem 'view_component'
gem 'vite_rails'
gem 'redcarpet'

# Errors
gem 'appsignal'
Expand All @@ -61,6 +65,7 @@ group :development, :test do
gem 'rubocop'
gem 'rubocop-rails'
gem 'tty-prompt'
gem 'webmock'
end

group :development do
Expand All @@ -77,6 +82,7 @@ group :test do
gem 'rspec-rails'
gem 'rspec_tap', require: false
gem 'selenium-webdriver'
gem 'shoulda-matchers', '~> 5.0'
gem 'webdrivers'
end

100 changes: 86 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ GIT

GIT
remote: https://github.com/kaminari/kaminari.git
revision: ff07a285215cfb8a5f70515e86decf4a16ff643c
revision: 68fdf60cd6fa6552ac59f26dba3f71ff3c20ba52
branch: master
specs:
kaminari (1.2.2)
Expand Down Expand Up @@ -118,7 +118,7 @@ GEM
apipie-rails (1.0.0)
actionpack (>= 5.0)
activesupport (>= 5.0)
appsignal (3.4.1)
appsignal (3.4.2)
rack
ast (2.4.2)
awesome_print (1.9.2)
Expand All @@ -138,10 +138,12 @@ GEM
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
concurrent-ruby (1.2.2)
config (4.1.0)
config (4.2.0)
deep_merge (~> 1.2, >= 1.2.1)
dry-validation (~> 1.0, >= 1.0.0)
connection_pool (2.4.0)
crack (0.4.5)
rexml
crass (1.0.6)
date (3.3.3)
deep_cloneable (3.2.0)
Expand All @@ -154,6 +156,8 @@ GEM
responders
warden (~> 1.2.3)
diff-lcs (1.5.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.8.1)
dotenv-rails (2.8.1)
dotenv (= 2.8.1)
Expand All @@ -171,6 +175,10 @@ GEM
concurrent-ruby (~> 1.0)
dry-core (~> 1.0, < 2)
zeitwerk (~> 2.6)
dry-monads (1.6.0)
concurrent-ruby (~> 1.0)
dry-core (~> 1.0, < 2)
zeitwerk (~> 2.6)
dry-schema (1.13.1)
concurrent-ruby (~> 1.0)
dry-configurable (~> 1.0, >= 1.0.1)
Expand Down Expand Up @@ -199,11 +207,31 @@ GEM
railties (>= 5.0.0)
faker (3.2.0)
i18n (>= 1.8.11, < 2)
faraday (2.7.4)
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (3.0.2)
ffi (1.15.5)
ffi-compiler (1.0.1)
ffi (>= 1.0.0)
rake
friendly_id (5.5.0)
activerecord (>= 4.0.0)
globalid (1.1.0)
activesupport (>= 5.0)
hashdiff (1.0.1)
hashie (5.0.0)
hiredis (0.6.3)
http (5.1.1)
addressable (~> 2.8)
http-cookie (~> 1.0)
http-form_data (~> 2.2)
llhttp-ffi (~> 0.4.0)
http-cookie (1.0.5)
domain_name (~> 0.5)
http-form_data (2.3.0)
httparty (0.21.0)
mini_mime (>= 1.0.0)
multi_xml (>= 0.5.2)
Expand All @@ -219,7 +247,10 @@ GEM
activerecord (>= 5.0)
activesupport (>= 5.0)
pg (>= 0.18.1)
loofah (2.20.0)
llhttp-ffi (0.4.0)
ffi-compiler (~> 1.0)
rake (~> 13.0)
loofah (2.21.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.8.1)
Expand All @@ -233,10 +264,14 @@ GEM
meta-tags (2.18.0)
actionpack (>= 3.2.0, < 7.1)
method_source (1.0.0)
mimemagic (0.4.3)
nokogiri (~> 1)
rake
mini_mime (1.1.2)
minitest (5.18.0)
msgpack (1.7.0)
multi_xml (0.6.0)
multipart-post (2.3.0)
net-imap (0.3.4)
date
net-protocol
Expand Down Expand Up @@ -307,6 +342,7 @@ GEM
zeitwerk (~> 2.5)
rainbow (3.1.1)
rake (13.0.6)
redcarpet (3.6.0)
redis (5.0.6)
redis-client (>= 0.9.0)
redis-client (0.14.1)
Expand All @@ -315,6 +351,9 @@ GEM
responders (3.1.0)
actionpack (>= 5.2)
railties (>= 5.2)
retries (0.0.5)
reverse_markdown (2.1.1)
nokogiri
rexml (3.2.5)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
Expand All @@ -324,14 +363,14 @@ GEM
rspec-mocks (3.12.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-rails (6.0.1)
rspec-rails (6.0.2)
actionpack (>= 6.1)
activesupport (>= 6.1)
railties (>= 6.1)
rspec-core (~> 3.11)
rspec-expectations (~> 3.11)
rspec-mocks (~> 3.11)
rspec-support (~> 3.11)
rspec-core (~> 3.12)
rspec-expectations (~> 3.12)
rspec-mocks (~> 3.12)
rspec-support (~> 3.12)
rspec-support (3.12.0)
rspec_tap (0.2.0)
rubocop (1.50.2)
Expand All @@ -344,23 +383,29 @@ GEM
rubocop-ast (>= 1.28.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.28.0)
rubocop-ast (1.28.1)
parser (>= 3.2.1.0)
rubocop-rails (2.19.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
ruby-openai (4.0.0)
faraday (>= 1)
faraday-multipart (>= 1)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
selenium-webdriver (4.9.0)
selenium-webdriver (4.9.1)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
sidekiq (7.0.9)
shoulda-matchers (5.3.0)
activesupport (>= 5.2.0)
sidekiq (7.1.0)
concurrent-ruby (< 2)
connection_pool (>= 2.3.0)
rack (>= 2.2.4)
redis-client (>= 0.11.0)
redis-client (>= 0.14.0)
simple_form (5.2.0)
actionpack (>= 5.2)
activemodel (>= 5.2)
Expand Down Expand Up @@ -406,15 +451,32 @@ GEM
railties (>= 6.0.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (2.4.2)
uploadcare-api_struct (1.1.0)
dry-configurable (~> 1.0)
dry-inflector (~> 1.0)
dry-monads (~> 1.6)
hashie (~> 5.0)
http (~> 5.1)
uploadcare-rails (3.3.4)
rails (>= 6)
uploadcare-ruby (>= 4.3)
uploadcare-ruby (4.3.3)
mimemagic (~> 0.4)
parallel (~> 1.22)
retries (~> 0.0)
uploadcare-api_struct (>= 1.1, < 2)
view_component (3.0.0)
activesupport (>= 5.2.0, < 8.0)
concurrent-ruby (~> 1.0)
method_source (~> 1.0)
vite_rails (3.0.14)
railties (>= 5.1, < 8)
vite_ruby (~> 3.0, >= 3.2.2)
vite_ruby (3.3.1)
vite_ruby (3.3.2)
dry-cli (>= 0.7, < 2)
rack-proxy (~> 0.6, >= 0.6.1)
zeitwerk (~> 2.2)
Expand All @@ -429,6 +491,10 @@ GEM
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (~> 4.0)
webmock (3.18.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
websocket (1.2.9)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
Expand Down Expand Up @@ -475,12 +541,16 @@ DEPENDENCIES
rails (~> 7.0.4, >= 7.0.4.3)
rails-controller-testing
rapid_ui!
redcarpet
redis
reverse_markdown
rspec-rails
rspec_tap
rubocop
rubocop-rails
ruby-openai
selenium-webdriver
shoulda-matchers (~> 5.0)
sidekiq
simple_form
simple_scheduler
Expand All @@ -491,10 +561,12 @@ DEPENDENCIES
stimulus-rails
tty-prompt
turbo-rails
uploadcare-rails
view_component
vite_rails
web-console
webdrivers
webmock

RUBY VERSION
ruby 3.2.2p53
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 🚀 Enterprise

### ActiveJobs

```ruby
AssembleJob.perform_now
```

#### Mailcatcher
Is the best way to test emails in development. It catches all emails sent by your application and displays them in a web interface. You can also use it to test HTML emails during development.

Expand Down
3 changes: 1 addition & 2 deletions app/controllers/concerns/restricted_access.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ module RestrictedAccess
def check_access
redirect_to unauthorized_index_path unless current_user.has_access?
end

end
end
8 changes: 8 additions & 0 deletions app/controllers/feeds_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class FeedsController < ApplicationController
include RestrictedAccess

def index
@feeds = Feed.all.order(id: :desc).page params[:page]
@total_feeds = Feed.all.count
end
end
2 changes: 1 addition & 1 deletion app/controllers/page_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class PageController < ApplicationController
include RestrictedAccess
def index
@topics = Topic.all.order(:name)
end

end
Loading

0 comments on commit cac553a

Please sign in to comment.