rocket_cms 0.27.5 → 0.27.6

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: 2e9dd9cc09cefc19411ab3acd4f132b604a0df4b0cdba7b75f24f6a067565fbc
4
- data.tar.gz: 86c67eb7e480f165f10cd79ce8b357053d47f9d419e4171e8658fa1ff266753f
3
+ metadata.gz: 470a0087d23b26487e0a69ecba017ab7fb2437942fec52f0568edb73dc663a62
4
+ data.tar.gz: 9d9b7265c2af23cf67625f3e0f5012a9101aa1ef8adbe69245115c9a0ea35e33
5
5
  SHA512:
6
- metadata.gz: f78102a32539492bbcb0cc50b95e274adaf37cd8678f5a2483d3e8213659b155dec8e177259fd4650563489dc0fc79e910cb7f059949c051f7c4ba8ffb072217
7
- data.tar.gz: 38b0c4ac253499dd99ca3532d47616c176458765661cf2606c11b8e828fd398470534980eb7206b918f0d974cce6fe97c26e76fa0db2535530f872163c645ccd
6
+ metadata.gz: e2fdf1c1f3de6f310ec29c966002733285486cf0c047cc114ad531efa2ae84bc603465987ac8c359a26c9298795c6faa7ca12c68a8476e2c0fc851f76969f588
7
+ data.tar.gz: c43502b1b593d57eee504601d47342d9c5846744344aadec22694f985a86cc91eb89263907fc500248ab51d6f6bcc980fc6a95e77c1e8bcb74552f50c18a0158
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rocket_cms (0.27.5)
4
+ rocket_cms (0.27.6)
5
5
  addressable
6
6
  coffee-rails
7
7
  jquery-rails
@@ -108,11 +108,11 @@ GEM
108
108
  mini_portile2 (2.3.0)
109
109
  minitest (5.11.3)
110
110
  nio4r (2.3.1)
111
- nokogiri (1.8.2)
111
+ nokogiri (1.8.4)
112
112
  mini_portile2 (~> 2.3.0)
113
113
  public_suffix (3.0.2)
114
114
  rack (2.0.5)
115
- rack-test (1.0.0)
115
+ rack-test (1.1.0)
116
116
  rack (>= 1.0, < 3)
117
117
  rails (5.2.0)
118
118
  actioncable (= 5.2.0)
@@ -142,7 +142,7 @@ GEM
142
142
  smart_excerpt (0.1.5)
143
143
  activesupport
144
144
  htmlentities
145
- sprockets (3.7.1)
145
+ sprockets (3.7.2)
146
146
  concurrent-ruby (~> 1.0)
147
147
  rack (> 1, < 3)
148
148
  sprockets-rails (3.2.1)
@@ -169,4 +169,4 @@ DEPENDENCIES
169
169
  rocket_cms!
170
170
 
171
171
  BUNDLED WITH
172
- 1.16.1
172
+ 1.16.3
data/README.md CHANGED
@@ -70,11 +70,11 @@ If not, uninstall rails and install again
70
70
 
71
71
  Then, for mongoid:
72
72
 
73
- rails new my_app -T -O -m https://raw.githubusercontent.com/rs-pro/rocket_cms/master/template.rb --skip-spring
73
+ rails new my_app -T -O -m https://gitlab.com/rocket-science/rocket_cms/raw/master/template.rb --skip-spring
74
74
 
75
75
  for ActiveRecord:
76
76
 
77
- rails new my_app -T --database=postgresql -m https://raw.githubusercontent.com/rs-pro/rocket_cms/master/template.rb --skip-spring
77
+ rails new my_app -T --database=postgresql -m https://gitlab.com/rocket-science/rocket_cms/raw/master/template.rb --skip-spring
78
78
 
79
79
  generator creates a new RVM gemset, so after cd'ing to app dir, you should run `bundle install` again if you use rvm.
80
80
 
@@ -72,7 +72,7 @@ ru:
72
72
  title: "Новый %{model_label}"
73
73
  menu: "Создание"
74
74
  breadcrumb: "новый"
75
- link: "Добавить новый %{model_label}"
75
+ link: "Добавить %{model_label}"
76
76
  done: "создано"
77
77
  edit:
78
78
  title: "Редактировение %{model_label} '%{object_label}'"
@@ -1,3 +1,3 @@
1
1
  module RocketCMS
2
- VERSION = '0.27.5'
2
+ VERSION = '0.27.6'
3
3
  end
data/template.rb CHANGED
@@ -82,11 +82,15 @@ end
82
82
 
83
83
  group :test do
84
84
  gem 'rspec-rails'
85
- gem 'database_cleaner'
86
85
  gem 'email_spec'
87
86
  #{if mongoid then " gem 'mongoid-rspec'" else "" end}
88
87
  gem 'ffaker'
89
88
  gem 'factory_bot_rails'
89
+
90
+ gem 'capybara'
91
+ gem 'capybara-webkit'
92
+ gem 'database_cleaner'
93
+ gem 'childprocess'
90
94
  end
91
95
 
92
96
  TEXT
@@ -112,6 +116,7 @@ create_file '.gitignore' do <<-TEXT
112
116
  #{if mongoid then '/config/mongoid.yml' else '/config/database.yml' end}
113
117
  /config/secrets.yml
114
118
  yarn-error.log
119
+ spec/examples.txt
115
120
  TEXT
116
121
  end
117
122
 
@@ -121,6 +126,10 @@ remove_file 'app/controllers/application_controller.rb'
121
126
  create_file 'app/controllers/application_controller.rb' do <<-TEXT
122
127
  class ApplicationController < ActionController::Base
123
128
  include RocketCMS::Controller
129
+
130
+ def page_title #default page title
131
+ "#{app_name}"
132
+ end
124
133
  end
125
134
  TEXT
126
135
  end
@@ -189,6 +198,15 @@ development:
189
198
  username: #{app_name.downcase}
190
199
  password: #{app_name.downcase}
191
200
  template: template0
201
+ test:
202
+ adapter: postgresql
203
+ encoding: unicode
204
+ database: #{app_name.downcase}_test
205
+ pool: 5
206
+ host: 'localhost'
207
+ username: #{app_name.downcase}
208
+ password: #{app_name.downcase}
209
+ template: template0
192
210
  TEXT
193
211
  end
194
212
  say "Please create a PostgreSQL user #{app_name.downcase} with password #{app_name.downcase} and a database #{app_name.downcase}_development owned by him for development NOW.", :red
@@ -312,7 +330,7 @@ end
312
330
  TEXT
313
331
  end
314
332
 
315
- create_file 'app/assets/stylesheets/rails_admin/custom/theming.css.sass' do <<-TEXT
333
+ create_file 'app/assets/stylesheets/rails_admin/custom/theming.sass' do <<-TEXT
316
334
  TEXT
317
335
  end
318
336
 
@@ -441,6 +459,7 @@ module #{app_name.camelize}
441
459
  config.webpack.dev_server.host = proc { request.host }
442
460
  config.webpack.dev_server.port = #{port+1}
443
461
  config.webpack.manifest_type = "manifest"
462
+ config.webpack.dev_server.enabled = Rails.env.development?
444
463
  end
445
464
  end
446
465
 
@@ -471,6 +490,8 @@ development:
471
490
  secret_key_base: #{key}
472
491
  production:
473
492
  secret_key_base: #{key}
493
+ test:
494
+ secret_key_base: #{key}
474
495
  TEXT
475
496
  end
476
497
  remove_file 'config/credentials.yml.enc'
@@ -478,10 +499,234 @@ remove_file 'config/master.key'
478
499
 
479
500
  create_file 'Procfile' do <<-TEXT
480
501
  web: bundle exec puma
481
- webpack: npm start
502
+ webpack: yarn start
503
+ TEXT
504
+ end
505
+
506
+ unless mongoid
507
+ create_file 'Dockerfile' do <<-TEXT
508
+ # docker build -t #{app_name.downcase} /root/#{app_name.downcase}/
509
+ FROM ruby:2.5.1-stretch
510
+
511
+ RUN apt-get update -qq >/dev/null
512
+
513
+ RUN apt-get install -y -qq postgresql postgresql-contrib libpq-dev cmake libpq5 >/dev/null
514
+ RUN apt-get install -y -qq locales apt-utils apt-transport-https >/dev/null
515
+ RUN apt-get install -y -qq qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x >/dev/null
516
+ RUN apt-get install -y -qq xvfb > /dev/null
517
+
518
+
519
+ RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
520
+ RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
521
+ RUN apt-get update -qq >/dev/null
522
+ RUN apt-get install -y -qq yarn >/dev/null
523
+
524
+ RUN echo "en_US UTF-8" > /etc/locale.gen
525
+ RUN locale-gen en_US.UTF-8
526
+ ENV LANG=en_US.UTF-8
527
+ ENV LANGUAGE=en_US:en
528
+ ENV LC_ALL=en_US.UTF-8
529
+
530
+ RUN wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash
531
+ RUN /bin/bash -c "source /root/.bashrc && nvm install node && nvm use node"
532
+
533
+ ENV TZ=Europe/Moscow
534
+ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
535
+ TEXT
536
+ end
537
+
538
+ create_file '.gitlab-ci.yml' do <<-TEXT
539
+ image: #{app_name.downcase}:latest
540
+
541
+ services:
542
+ - postgres:latest
543
+
544
+ variables:
545
+ POSTGRES_DB: #{app_name.downcase}_test
546
+ POSTGRES_USER: #{app_name.downcase}
547
+ POSTGRES_PASSWORD: "#{app_name.downcase}"
548
+
549
+ cache:
550
+ untracked: true
551
+ key: "$CI_PROJECT_ID"
552
+ paths:
553
+ - node_modules/
554
+ - .bundled/
555
+ - .yarn
556
+ - tmp/cache
557
+
558
+ rspec:
559
+ before_script:
560
+ - source /root/.bashrc
561
+ - nvm use node
562
+ - cp -f config/database.yml.ci config/database.yml
563
+ - cp -f config/secrets.yml.sample config/secrets.yml
564
+ - cat config/database.yml
565
+ - cat config/secrets.yml
566
+ - ruby -v
567
+ - which ruby
568
+ - export RAILS_ENV=test
569
+ - export CI=YES
570
+ - gem install bundler --no-ri --no-rdoc
571
+ - bundle install --jobs $(nproc) --path=/cache/bundler
572
+ - yarn --version
573
+ - yarn config set cache-folder .yarn
574
+ - yarn install
575
+ - bundle exec rake webpack:compile
576
+ - date
577
+ - RAILS_ENV=test bundle exec rake db:create db:schema:load
578
+ script:
579
+ - RAILS_ENV=test xvfb-run -a bundle exec rspec
580
+ - bundle exec pronto run -c=origin/master --exit-code
581
+
582
+ dependency_scanning:
583
+ image: docker:stable
584
+ variables:
585
+ DOCKER_DRIVER: overlay2
586
+ allow_failure: true
587
+ services:
588
+ - docker:stable-dind
589
+ script:
590
+ - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\\([0-9]*\\)\\.\\([0-9]*\\).*/\\1-\\2-stable/')
591
+ - docker run
592
+ --env DEP_SCAN_DISABLE_REMOTE_CHECKS="${DEP_SCAN_DISABLE_REMOTE_CHECKS:-false}"
593
+ --volume "$PWD:/code"
594
+ --volume /var/run/docker.sock:/var/run/docker.sock
595
+ "registry.gitlab.com/gitlab-org/security-products/dependency-scanning:$SP_VERSION" /code
596
+ artifacts:
597
+ paths: [gl-dependency-scanning-report.json]
482
598
  TEXT
483
599
  end
484
600
 
601
+ create_file "config/database.yml.ci" do <<-TEXT
602
+ test:
603
+ adapter: postgresql
604
+ encoding: unicode
605
+ database: #{app_name.downcase}_test
606
+ pool: 5
607
+ host: postgres
608
+ username: #{app_name.downcase}
609
+ password: #{app_name.downcase}
610
+ template: template0
611
+ TEXT
612
+ end
613
+
614
+ create_file "config/secrets.yml.sample" do <<-TEXT
615
+ test:
616
+ secret_key_base: #{key}
617
+ TEXT
618
+ end
619
+
620
+ create_file "spec/features/home_page_spec.rb" do <<-TEXT
621
+ require 'rails_helper'
622
+
623
+ RSpec.feature 'main page', :js do
624
+ scenario "visit" do
625
+ visit root_path
626
+ expect(page.status_code).to eq(200).or eq(304)
627
+ end
628
+ end
629
+ TEXT
630
+ end
631
+
632
+ create_file "spec/support/capybara.rb" do <<-TEXT
633
+ require 'capybara/rspec'
634
+ require 'capybara/webkit'
635
+
636
+ # https://github.com/teamcapybara/capybara/blob/master/lib/capybara.rb#L35
637
+ Capybara.configure do |config|
638
+ config.default_driver = :webkit
639
+ config.javascript_driver = :webkit
640
+
641
+ # use the custom server
642
+ config.server = :puma
643
+ config.run_server = true
644
+ end
645
+ TEXT
646
+ end
647
+
648
+ create_file "spec/support/database_cleaner.rb" do <<-TEXT
649
+ RSpec.configure do |config|
650
+ config.before(:suite) do
651
+ DatabaseCleaner.clean_with(:truncation)
652
+ end
653
+ config.before(:each) do
654
+ DatabaseCleaner.start
655
+ end
656
+ config.after(:each) do
657
+ DatabaseCleaner.clean
658
+ end
659
+ end
660
+ TEXT
661
+ end
662
+
663
+ remove_file "spec/rails_helper.rb"
664
+ create_file "spec/rails_helper.rb" do <<-TEXT
665
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
666
+ require 'spec_helper'
667
+ ENV['RAILS_ENV'] ||= 'test'
668
+ require File.expand_path('../../config/environment', __FILE__)
669
+ # Prevent database truncation if the environment is production
670
+ abort("The Rails environment is running in production mode!") if Rails.env.production?
671
+ require 'rspec/rails'
672
+ # Add additional requires below this line. Rails is not loaded until this point!
673
+
674
+ # Requires supporting ruby files with custom matchers and macros, etc, in
675
+ # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
676
+ # run as spec files by default. This means that files in spec/support that end
677
+ # in _spec.rb will both be required and run as specs, causing the specs to be
678
+ # run twice. It is recommended that you do not name files matching this glob to
679
+ # end with _spec.rb. You can configure this pattern with the --pattern
680
+ # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
681
+ #
682
+ # The following line is provided for convenience purposes. It has the downside
683
+ # of increasing the boot-up time by auto-requiring all files in the support
684
+ # directory. Alternatively, in the individual `*_spec.rb` files, manually
685
+ # require only the support files necessary.
686
+ #
687
+ Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
688
+
689
+ # Checks for pending migrations and applies them before tests are run.
690
+ # If you are not using ActiveRecord, you can remove this line.
691
+ ActiveRecord::Migration.maintain_test_schema!
692
+
693
+ require 'capybara/rails'
694
+
695
+ RSpec.configure do |config|
696
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
697
+ config.fixture_path = "#\{::Rails.root}/spec/fixtures"
698
+
699
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
700
+ # examples within a transaction, remove the following line or assign false
701
+ # instead of true.
702
+ config.use_transactional_fixtures = true
703
+
704
+ # RSpec Rails can automatically mix in different behaviours to your tests
705
+ # based on their file location, for example enabling you to call `get` and
706
+ # `post` in specs under `spec/controllers`.
707
+ #
708
+ # You can disable this behaviour by removing the line below, and instead
709
+ # explicitly tag your specs with their type, e.g.:
710
+ #
711
+ # RSpec.describe UsersController, :type => :controller do
712
+ # # ...
713
+ # end
714
+ #
715
+ # The different available types are documented in the features, such as in
716
+ # https://relishapp.com/rspec/rspec-rails/docs
717
+ config.infer_spec_type_from_file_location!
718
+
719
+ # Filter lines from Rails gems in backtraces.
720
+ config.filter_rails_from_backtrace!
721
+ # arbitrary gems may also be filtered via:
722
+ # config.filter_gems_from_backtrace("gem name")
723
+ end
724
+ TEXT
725
+ end
726
+
727
+
728
+ end # end if unless mongoid
729
+
485
730
  FileUtils.cp(Pathname.new(destination_root).join('config', 'secrets.yml').to_s, Pathname.new(destination_root).join('config', 'secrets.yml.example').to_s)
486
731
 
487
732
  unless mongoid
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rocket_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.5
4
+ version: 0.27.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebtv
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-05 00:00:00.000000000 Z
11
+ date: 2018-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler