From 59380742a96430f161f86a832da420a9662e1f51 Mon Sep 17 00:00:00 2001 From: Gitea Date: Thu, 22 Apr 2021 01:34:41 -0700 Subject: [PATCH] test --- Gemfile | 4 +- Gemfile.lock | 1004 +++++++++---------- app/assets/javascripts/persona.js | 2 + app/assets/stylesheets/persona.scss | 3 + app/controllers/persona_controller.rb | 128 +++ app/controllers/users_controller.rb | 75 ++ app/helpers/persona_helper.rb | 2 + app/views/persona/show.html.erb | 18 + app/views/users/html_show.html.erb | 2 +- config/routes.rb | 4 +- dump.rdb | Bin 809 -> 492 bytes spec/controllers/persona_controller_spec.rb | 12 + spec/helpers/persona_helper_spec.rb | 15 + spec/views/persona/show.html.erb_spec.rb | 5 + 14 files changed, 767 insertions(+), 507 deletions(-) create mode 100644 app/assets/javascripts/persona.js create mode 100644 app/assets/stylesheets/persona.scss create mode 100644 app/controllers/persona_controller.rb create mode 100644 app/helpers/persona_helper.rb create mode 100644 app/views/persona/show.html.erb create mode 100644 spec/controllers/persona_controller_spec.rb create mode 100644 spec/helpers/persona_helper_spec.rb create mode 100644 spec/views/persona/show.html.erb_spec.rb diff --git a/Gemfile b/Gemfile index 281dd705..2f153b44 100644 --- a/Gemfile +++ b/Gemfile @@ -64,7 +64,7 @@ end group :development do gem 'prettier' gem 'rubocop', '~> 0.52.0' - gem 'solargraph', '~> 0.38.0' + gem 'solargraph', '~> 0.30.0' gem 'awesome_print' gem 'web-console', '>= 3.3.0' gem 'listen', '>= 3.0.5', '< 3.2' @@ -126,3 +126,5 @@ gem 'request_store' gem 'harmonious_dictionary', '~> 0.0.1' gem 'parallel', '~> 1.19', '>= 1.19.1' +#add for debug +gem 'thor','~> 0.20.3' diff --git a/Gemfile.lock b/Gemfile.lock index cbd598f5..b807d0c8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,504 +1,500 @@ -GEM - remote: https://gems.ruby-china.com/ - specs: - aasm (5.0.6) - concurrent-ruby (~> 1.0) - actioncable (5.2.4.1) - actionpack (= 5.2.4.1) - nio4r (~> 2.0) - websocket-driver (>= 0.6.1) - actionmailer (5.2.4.1) - actionpack (= 5.2.4.1) - actionview (= 5.2.4.1) - activejob (= 5.2.4.1) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 2.0) - actionpack (5.2.4.1) - actionview (= 5.2.4.1) - activesupport (= 5.2.4.1) - rack (~> 2.0, >= 2.0.8) - rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.4.1) - activesupport (= 5.2.4.1) - builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.3) - active_decorator (1.3.2) - activesupport - activejob (5.2.4.1) - activesupport (= 5.2.4.1) - globalid (>= 0.3.6) - activemodel (5.2.4.1) - activesupport (= 5.2.4.1) - activerecord (5.2.4.1) - activemodel (= 5.2.4.1) - activesupport (= 5.2.4.1) - arel (>= 9.0) - activestorage (5.2.4.1) - actionpack (= 5.2.4.1) - activerecord (= 5.2.4.1) - marcel (~> 0.3.1) - activesupport (5.2.4.1) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - acts-as-taggable-on (6.5.0) - activerecord (>= 5.0, < 6.1) - acts_as_list (0.9.19) - activerecord (>= 3.0) - addressable (2.7.0) - public_suffix (>= 2.0.2, < 5.0) - ancestry (3.0.7) - activerecord (>= 3.2.0) - annotate (2.6.5) - activerecord (>= 2.3.0) - rake (>= 0.8.7) - archive-zip (0.12.0) - io-like (~> 0.3.0) - arel (9.0.0) - ast (2.4.0) - autoprefixer-rails (9.7.4) - execjs - awesome_print (1.8.0) - axlsx (3.0.0.pre) - htmlentities (~> 4.3, >= 4.3.4) - mimemagic (~> 0.3) - nokogiri (~> 1.8, >= 1.8.2) - rubyzip (~> 1.2, >= 1.2.1) - axlsx_rails (0.5.2) - actionpack (>= 3.1) - axlsx (>= 2.0.1) - backport (1.1.2) - benchmark (0.1.0) - bindex (0.8.1) - bootsnap (1.4.6) - msgpack (~> 1.0) - bootstrap (4.3.1) - autoprefixer-rails (>= 9.1.0) - popper_js (>= 1.14.3, < 2) - sassc-rails (>= 2.0.0) - builder (3.2.4) - bulk_insert (1.7.0) - activerecord (>= 3.2.0) - capybara (3.15.1) - addressable - mini_mime (>= 0.1.3) - nokogiri (~> 1.8) - rack (>= 1.6.0) - rack-test (>= 0.6.3) - regexp_parser (~> 1.2) - xpath (~> 3.2) - chartkick (3.3.1) - childprocess (3.0.0) - chinese_pinyin (1.0.2) - chromedriver-helper (2.1.1) - archive-zip (~> 0.10) - nokogiri (~> 1.8) - chunky_png (1.3.11) - concurrent-ruby (1.1.6) - connection_pool (2.2.2) - crass (1.0.6) - deep_cloneable (3.0.0) - activerecord (>= 3.1.0, < 7) - diff-lcs (1.3) - diffy (3.3.0) - e2mmap (0.1.0) - elasticsearch (7.5.0) - elasticsearch-api (= 7.5.0) - elasticsearch-transport (= 7.5.0) - elasticsearch-api (7.5.0) - multi_json - elasticsearch-transport (7.5.0) - faraday (>= 0.14, < 1) - multi_json - enumerize (2.3.1) - activesupport (>= 3.2) - erubi (1.9.0) - et-orbi (1.2.4) - tzinfo - execjs (2.7.0) - faraday (0.15.4) - multipart-post (>= 1.2, < 3) - ffi (1.12.2) - font-awesome-sass (4.7.0) - sass (>= 3.2) - fugit (1.4.1) - et-orbi (~> 1.1, >= 1.1.8) - raabro (~> 1.4) - globalid (0.4.2) - activesupport (>= 4.2.0) - grape-entity (0.7.1) - activesupport (>= 4.0) - multi_json (>= 1.3.2) - groupdate (4.1.2) - activesupport (>= 4.2) - harmonious_dictionary (0.0.1) - hashie (3.6.0) - htmlentities (4.3.4) - i18n (1.8.2) - concurrent-ruby (~> 1.0) - io-like (0.3.1) - jaro_winkler (1.5.4) - jbuilder (2.10.0) - activesupport (>= 5.0.0) - jquery-rails (4.3.5) - rails-dom-testing (>= 1, < 3) - railties (>= 4.2.0) - thor (>= 0.14, < 2.0) - jwt (2.2.1) - kaminari (1.2.0) - activesupport (>= 4.1.0) - kaminari-actionview (= 1.2.0) - kaminari-activerecord (= 1.2.0) - kaminari-core (= 1.2.0) - kaminari-actionview (1.2.0) - actionview - kaminari-core (= 1.2.0) - kaminari-activerecord (1.2.0) - activerecord - kaminari-core (= 1.2.0) - kaminari-core (1.2.0) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) - loofah (2.4.0) - crass (~> 1.0.2) - nokogiri (>= 1.5.9) - mail (2.7.1) - mini_mime (>= 0.1.1) - marcel (0.3.3) - mimemagic (~> 0.3.2) - maruku (0.7.3) - method_source (0.9.2) - mimemagic (0.3.4) - mini_mime (1.0.2) - mini_portile2 (2.4.0) - minitest (5.14.0) - msgpack (1.3.3) - multi_json (1.14.1) - multi_xml (0.6.0) - multipart-post (2.1.1) - mustermann (1.1.1) - ruby2_keywords (~> 0.0.1) - mysql2 (0.5.3) - nio4r (2.5.2) - nokogiri (1.10.8) - mini_portile2 (~> 2.4.0) - oauth2 (1.4.4) - faraday (>= 0.8, < 2.0) - jwt (>= 1.0, < 3.0) - multi_json (~> 1.3) - multi_xml (~> 0.5) - rack (>= 1.2, < 3) - omniauth (1.9.0) - hashie (>= 3.4.6, < 3.7.0) - rack (>= 1.6.2, < 3) - omniauth-cas (1.1.1) - addressable (~> 2.3) - nokogiri (~> 1.5) - omniauth (~> 1.2) - omniauth-oauth2 (1.6.0) - oauth2 (~> 1.1) - omniauth (~> 1.9) - parallel (1.19.1) - parser (2.7.1.1) - ast (~> 2.4.0) - pdfkit (0.8.4.1) - polyamorous (2.3.2) - activerecord (>= 5.2.1) - popper_js (1.16.0) - powerpack (0.1.2) - prettier (0.18.2) - public_suffix (4.0.3) - puma (3.12.2) - raabro (1.4.0) - rack (2.0.9) - rack-cors (1.1.1) - rack (>= 2.0.0) - rack-mini-profiler (2.0.1) - rack (>= 1.2.0) - rack-protection (2.0.8.1) - rack - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails (5.2.4.1) - actioncable (= 5.2.4.1) - actionmailer (= 5.2.4.1) - actionpack (= 5.2.4.1) - actionview (= 5.2.4.1) - activejob (= 5.2.4.1) - activemodel (= 5.2.4.1) - activerecord (= 5.2.4.1) - activestorage (= 5.2.4.1) - activesupport (= 5.2.4.1) - bundler (>= 1.3.0) - railties (= 5.2.4.1) - sprockets-rails (>= 2.0.0) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) - nokogiri (>= 1.6) - rails-html-sanitizer (1.3.0) - loofah (~> 2.3) - rails-i18n (5.1.3) - i18n (>= 0.7, < 2) - railties (>= 5.0, < 6) - railties (5.2.4.1) - actionpack (= 5.2.4.1) - activesupport (= 5.2.4.1) - method_source - rake (>= 0.8.7) - thor (>= 0.19.0, < 2.0) - rainbow (3.0.0) - rake (13.0.1) - ransack (2.3.2) - activerecord (>= 5.2.1) - activesupport (>= 5.2.1) - i18n - polyamorous (= 2.3.2) - rb-fsevent (0.10.3) - rb-inotify (0.10.1) - ffi (~> 1.0) - rchardet (1.8.0) - redcarpet (3.5.0) - redis (4.1.3) - redis-actionpack (5.2.0) - actionpack (>= 5, < 7) - redis-rack (>= 2.1.0, < 3) - redis-store (>= 1.1.0, < 2) - redis-activesupport (5.2.0) - activesupport (>= 3, < 7) - redis-store (>= 1.3, < 2) - redis-rack (2.1.2) - rack (>= 2.0.8, < 3) - redis-store (>= 1.2, < 2) - redis-rails (5.0.2) - redis-actionpack (>= 5.0, < 6) - redis-activesupport (>= 5.0, < 6) - redis-store (>= 1.2, < 2) - redis-store (1.8.2) - redis (>= 4, < 5) - regexp_parser (1.7.0) - request_store (1.5.0) - rack (>= 1.4) - reverse_markdown (1.4.0) - nokogiri - roo (2.8.3) - nokogiri (~> 1) - rubyzip (>= 1.3.0, < 3.0.0) - roo-xls (1.2.0) - nokogiri - roo (>= 2.0.0, < 3) - spreadsheet (> 0.9.0) - rqrcode (0.10.1) - chunky_png (~> 1.0) - rqrcode_png (0.1.5) - chunky_png - rqrcode - rspec-core (3.9.1) - rspec-support (~> 3.9.1) - rspec-expectations (3.9.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-mocks (3.9.1) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-rails (3.9.0) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-support (~> 3.9.0) - rspec-support (3.9.2) - rubocop (0.52.1) - parallel (~> 1.10) - parser (>= 2.4.0.2, < 3.0) - powerpack (~> 0.1) - rainbow (>= 2.2.2, < 4.0) - ruby-progressbar (~> 1.7) - unicode-display_width (~> 1.0, >= 1.0.1) - ruby-ole (1.2.12.2) - ruby-progressbar (1.10.1) - ruby2_keywords (0.0.2) - ruby_dep (1.5.0) - rubyzip (1.3.0) - sass (3.7.4) - sass-listen (~> 4.0.0) - sass-listen (4.0.0) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - sass-rails (5.0.7) - railties (>= 4.0.0, < 6) - sass (~> 3.1) - sprockets (>= 2.8, < 4.0) - sprockets-rails (>= 2.0, < 4.0) - tilt (>= 1.1, < 3) - sassc (2.2.1) - ffi (~> 1.9) - sassc-rails (2.1.2) - railties (>= 4.0.0) - sassc (>= 2.0) - sprockets (> 3.0) - sprockets-rails - tilt - searchkick (3.1.3) - activemodel (>= 4.2) - elasticsearch (>= 5) - hashie - selenium-webdriver (3.142.7) - childprocess (>= 0.5, < 4.0) - rubyzip (>= 1.2.2) - sidekiq (5.2.8) - connection_pool (~> 2.2, >= 2.2.2) - rack (< 2.1.0) - rack-protection (>= 1.5.0) - redis (>= 3.3.5, < 5) - sidekiq-cron (1.2.0) - fugit (~> 1.1) - sidekiq (>= 4.2.1) - simple_form (5.0.2) - actionpack (>= 5.0) - activemodel (>= 5.0) - simple_xlsx_reader (1.0.4) - nokogiri - rubyzip - sinatra (2.0.8.1) - mustermann (~> 1.0) - rack (~> 2.0) - rack-protection (= 2.0.8.1) - tilt (~> 2.0) - solargraph (0.38.6) - backport (~> 1.1) - benchmark - bundler (>= 1.17.2) - e2mmap - jaro_winkler (~> 1.5) - maruku (~> 0.7, >= 0.7.3) - nokogiri (~> 1.9, >= 1.9.1) - parser (~> 2.3) - reverse_markdown (~> 1.0, >= 1.0.5) - rubocop (~> 0.52) - thor (~> 1.0) - tilt (~> 2.0) - yard (~> 0.9) - spreadsheet (1.2.6) - ruby-ole (>= 1.0) - spring (2.0.2) - activesupport (>= 4.2) - spring-watcher-listen (2.0.1) - listen (>= 2.7, < 4.0) - spring (>= 1.2, < 3.0) - sprockets (3.7.2) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.2.1) - actionpack (>= 4.0) - activesupport (>= 4.0) - sprockets (>= 3.0.0) - thor (1.0.1) - thread_safe (0.3.6) - tilt (2.0.10) - turbolinks (5.2.1) - turbolinks-source (~> 5.2) - turbolinks-source (5.2.0) - tzinfo (1.2.6) - thread_safe (~> 0.1) - uglifier (4.2.0) - execjs (>= 0.3.0, < 3) - unicode-display_width (1.6.1) - web-console (3.7.0) - actionview (>= 5.0) - activemodel (>= 5.0) - bindex (>= 0.4.0) - railties (>= 5.0) - websocket-driver (0.7.1) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.4) - wkhtmltopdf-binary (0.12.5.4) - xpath (3.2.0) - nokogiri (~> 1.8) - yard (0.9.24) - -PLATFORMS - ruby - -DEPENDENCIES - aasm - active_decorator - acts-as-taggable-on (~> 6.0) - acts_as_list - ancestry - annotate (~> 2.6.0) - awesome_print - axlsx (~> 3.0.0.pre) - axlsx_rails (~> 0.5.2) - bootsnap (>= 1.1.0) - bootstrap (~> 4.3.1) - bulk_insert - capybara (>= 2.15, < 4.0) - chartkick - chinese_pinyin - chromedriver-helper - deep_cloneable (~> 3.0.0) - diffy - enumerize - faraday (~> 0.15.4) - font-awesome-sass (= 4.7.0) - grape-entity (~> 0.7.1) - groupdate (~> 4.1.0) - harmonious_dictionary (~> 0.0.1) - jbuilder (~> 2.5) - jquery-rails - kaminari (~> 1.1, >= 1.1.1) - listen (>= 3.0.5, < 3.2) - mysql2 (>= 0.4.4, < 0.6.0) - oauth2 - omniauth (~> 1.9.0) - omniauth-cas - omniauth-oauth2 (~> 1.6.0) - parallel (~> 1.19, >= 1.19.1) - pdfkit - prettier - puma (~> 3.11) - rack-cors - rack-mini-profiler - rails (~> 5.2.0) - rails-i18n (~> 5.1) - ransack - rchardet (~> 1.8) - redcarpet (~> 3.4) - redis-rails - request_store - roo-xls - rqrcode (~> 0.10.1) - rqrcode_png - rspec-rails (~> 3.8) - rubocop (~> 0.52.0) - ruby-ole - rubyzip - sass-rails (~> 5.0) - searchkick - selenium-webdriver - sidekiq - sidekiq-cron (~> 1.1) - simple_form - simple_xlsx_reader - sinatra - solargraph (~> 0.38.0) - spreadsheet - spring - spring-watcher-listen (~> 2.0.0) - turbolinks (~> 5) - tzinfo-data - uglifier (>= 1.3.0) - web-console (>= 3.3.0) - wkhtmltopdf-binary - -BUNDLED WITH - 2.1.4 +GEM + remote: https://gems.ruby-china.com/ + specs: + aasm (5.0.6) + concurrent-ruby (~> 1.0) + actioncable (5.2.4.1) + actionpack (= 5.2.4.1) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailer (5.2.4.1) + actionpack (= 5.2.4.1) + actionview (= 5.2.4.1) + activejob (= 5.2.4.1) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 2.0) + actionpack (5.2.4.1) + actionview (= 5.2.4.1) + activesupport (= 5.2.4.1) + rack (~> 2.0, >= 2.0.8) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (5.2.4.1) + activesupport (= 5.2.4.1) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.3) + active_decorator (1.3.2) + activesupport + activejob (5.2.4.1) + activesupport (= 5.2.4.1) + globalid (>= 0.3.6) + activemodel (5.2.4.1) + activesupport (= 5.2.4.1) + activerecord (5.2.4.1) + activemodel (= 5.2.4.1) + activesupport (= 5.2.4.1) + arel (>= 9.0) + activestorage (5.2.4.1) + actionpack (= 5.2.4.1) + activerecord (= 5.2.4.1) + marcel (~> 0.3.1) + activesupport (5.2.4.1) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) + minitest (~> 5.1) + tzinfo (~> 1.1) + acts-as-taggable-on (6.5.0) + activerecord (>= 5.0, < 6.1) + acts_as_list (0.9.19) + activerecord (>= 3.0) + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) + ancestry (3.0.7) + activerecord (>= 3.2.0) + annotate (2.6.5) + activerecord (>= 2.3.0) + rake (>= 0.8.7) + archive-zip (0.12.0) + io-like (~> 0.3.0) + arel (9.0.0) + ast (2.4.0) + autoprefixer-rails (9.7.4) + execjs + awesome_print (1.8.0) + axlsx (3.0.0.pre) + htmlentities (~> 4.3, >= 4.3.4) + mimemagic (~> 0.3) + nokogiri (~> 1.8, >= 1.8.2) + rubyzip (~> 1.2, >= 1.2.1) + axlsx_rails (0.5.2) + actionpack (>= 3.1) + axlsx (>= 2.0.1) + backport (0.3.0) + bindex (0.8.1) + bootsnap (1.4.6) + msgpack (~> 1.0) + bootstrap (4.3.1) + autoprefixer-rails (>= 9.1.0) + popper_js (>= 1.14.3, < 2) + sassc-rails (>= 2.0.0) + builder (3.2.4) + bulk_insert (1.7.0) + activerecord (>= 3.2.0) + capybara (3.15.1) + addressable + mini_mime (>= 0.1.3) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (~> 1.2) + xpath (~> 3.2) + chartkick (3.3.1) + childprocess (3.0.0) + chinese_pinyin (1.0.2) + chromedriver-helper (2.1.1) + archive-zip (~> 0.10) + nokogiri (~> 1.8) + chunky_png (1.3.11) + concurrent-ruby (1.1.6) + connection_pool (2.2.2) + crass (1.0.6) + deep_cloneable (3.0.0) + activerecord (>= 3.1.0, < 7) + diff-lcs (1.3) + diffy (3.3.0) + elasticsearch (7.5.0) + elasticsearch-api (= 7.5.0) + elasticsearch-transport (= 7.5.0) + elasticsearch-api (7.5.0) + multi_json + elasticsearch-transport (7.5.0) + faraday (>= 0.14, < 1) + multi_json + enumerize (2.3.1) + activesupport (>= 3.2) + erubi (1.9.0) + et-orbi (1.2.4) + tzinfo + execjs (2.7.0) + faraday (0.15.4) + multipart-post (>= 1.2, < 3) + ffi (1.12.2) + font-awesome-sass (4.7.0) + sass (>= 3.2) + fugit (1.4.1) + et-orbi (~> 1.1, >= 1.1.8) + raabro (~> 1.4) + globalid (0.4.2) + activesupport (>= 4.2.0) + grape-entity (0.7.1) + activesupport (>= 4.0) + multi_json (>= 1.3.2) + groupdate (4.1.2) + activesupport (>= 4.2) + harmonious_dictionary (0.0.1) + hashie (3.6.0) + htmlentities (4.3.4) + i18n (1.8.2) + concurrent-ruby (~> 1.0) + io-like (0.3.1) + jbuilder (2.10.0) + activesupport (>= 5.0.0) + jquery-rails (4.3.5) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) + jwt (2.2.1) + kaminari (1.2.0) + activesupport (>= 4.1.0) + kaminari-actionview (= 1.2.0) + kaminari-activerecord (= 1.2.0) + kaminari-core (= 1.2.0) + kaminari-actionview (1.2.0) + actionview + kaminari-core (= 1.2.0) + kaminari-activerecord (1.2.0) + activerecord + kaminari-core (= 1.2.0) + kaminari-core (1.2.0) + kramdown (1.17.0) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) + loofah (2.4.0) + crass (~> 1.0.2) + nokogiri (>= 1.5.9) + mail (2.7.1) + mini_mime (>= 0.1.1) + marcel (0.3.3) + mimemagic (~> 0.3.2) + method_source (0.9.2) + mimemagic (0.3.10) + nokogiri (~> 1) + rake + mini_mime (1.0.2) + mini_portile2 (2.4.0) + minitest (5.14.0) + msgpack (1.3.3) + multi_json (1.14.1) + multi_xml (0.6.0) + multipart-post (2.1.1) + mustermann (1.1.1) + ruby2_keywords (~> 0.0.1) + mysql2 (0.5.3) + nio4r (2.5.2) + nokogiri (1.10.8) + mini_portile2 (~> 2.4.0) + oauth2 (1.4.4) + faraday (>= 0.8, < 2.0) + jwt (>= 1.0, < 3.0) + multi_json (~> 1.3) + multi_xml (~> 0.5) + rack (>= 1.2, < 3) + omniauth (1.9.0) + hashie (>= 3.4.6, < 3.7.0) + rack (>= 1.6.2, < 3) + omniauth-cas (1.1.1) + addressable (~> 2.3) + nokogiri (~> 1.5) + omniauth (~> 1.2) + omniauth-oauth2 (1.6.0) + oauth2 (~> 1.1) + omniauth (~> 1.9) + parallel (1.19.1) + parser (2.7.1.1) + ast (~> 2.4.0) + pdfkit (0.8.4.1) + polyamorous (2.3.2) + activerecord (>= 5.2.1) + popper_js (1.16.0) + powerpack (0.1.2) + prettier (0.18.2) + public_suffix (4.0.3) + puma (3.12.2) + raabro (1.4.0) + rack (2.0.9) + rack-cors (1.1.1) + rack (>= 2.0.0) + rack-mini-profiler (2.0.1) + rack (>= 1.2.0) + rack-protection (2.0.8.1) + rack + rack-test (1.1.0) + rack (>= 1.0, < 3) + rails (5.2.4.1) + actioncable (= 5.2.4.1) + actionmailer (= 5.2.4.1) + actionpack (= 5.2.4.1) + actionview (= 5.2.4.1) + activejob (= 5.2.4.1) + activemodel (= 5.2.4.1) + activerecord (= 5.2.4.1) + activestorage (= 5.2.4.1) + activesupport (= 5.2.4.1) + bundler (>= 1.3.0) + railties (= 5.2.4.1) + sprockets-rails (>= 2.0.0) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.3.0) + loofah (~> 2.3) + rails-i18n (5.1.3) + i18n (>= 0.7, < 2) + railties (>= 5.0, < 6) + railties (5.2.4.1) + actionpack (= 5.2.4.1) + activesupport (= 5.2.4.1) + method_source + rake (>= 0.8.7) + thor (>= 0.19.0, < 2.0) + rainbow (3.0.0) + rake (13.0.1) + ransack (2.3.2) + activerecord (>= 5.2.1) + activesupport (>= 5.2.1) + i18n + polyamorous (= 2.3.2) + rb-fsevent (0.10.3) + rb-inotify (0.10.1) + ffi (~> 1.0) + rchardet (1.8.0) + redcarpet (3.5.0) + redis (4.1.3) + redis-actionpack (5.2.0) + actionpack (>= 5, < 7) + redis-rack (>= 2.1.0, < 3) + redis-store (>= 1.1.0, < 2) + redis-activesupport (5.2.0) + activesupport (>= 3, < 7) + redis-store (>= 1.3, < 2) + redis-rack (2.1.2) + rack (>= 2.0.8, < 3) + redis-store (>= 1.2, < 2) + redis-rails (5.0.2) + redis-actionpack (>= 5.0, < 6) + redis-activesupport (>= 5.0, < 6) + redis-store (>= 1.2, < 2) + redis-store (1.8.2) + redis (>= 4, < 5) + regexp_parser (1.7.0) + request_store (1.5.0) + rack (>= 1.4) + reverse_markdown (1.4.0) + nokogiri + roo (2.8.3) + nokogiri (~> 1) + rubyzip (>= 1.3.0, < 3.0.0) + roo-xls (1.2.0) + nokogiri + roo (>= 2.0.0, < 3) + spreadsheet (> 0.9.0) + rqrcode (0.10.1) + chunky_png (~> 1.0) + rqrcode_png (0.1.5) + chunky_png + rqrcode + rspec-core (3.9.1) + rspec-support (~> 3.9.1) + rspec-expectations (3.9.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.9.0) + rspec-mocks (3.9.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.9.0) + rspec-rails (3.9.0) + actionpack (>= 3.0) + activesupport (>= 3.0) + railties (>= 3.0) + rspec-core (~> 3.9.0) + rspec-expectations (~> 3.9.0) + rspec-mocks (~> 3.9.0) + rspec-support (~> 3.9.0) + rspec-support (3.9.2) + rubocop (0.52.1) + parallel (~> 1.10) + parser (>= 2.4.0.2, < 3.0) + powerpack (~> 0.1) + rainbow (>= 2.2.2, < 4.0) + ruby-progressbar (~> 1.7) + unicode-display_width (~> 1.0, >= 1.0.1) + ruby-ole (1.2.12.2) + ruby-progressbar (1.10.1) + ruby2_keywords (0.0.2) + ruby_dep (1.5.0) + rubyzip (1.3.0) + sass (3.7.4) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sass-rails (5.0.7) + railties (>= 4.0.0, < 6) + sass (~> 3.1) + sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (>= 1.1, < 3) + sassc (2.2.1) + ffi (~> 1.9) + sassc-rails (2.1.2) + railties (>= 4.0.0) + sassc (>= 2.0) + sprockets (> 3.0) + sprockets-rails + tilt + searchkick (3.1.3) + activemodel (>= 4.2) + elasticsearch (>= 5) + hashie + selenium-webdriver (3.142.7) + childprocess (>= 0.5, < 4.0) + rubyzip (>= 1.2.2) + sidekiq (5.2.8) + connection_pool (~> 2.2, >= 2.2.2) + rack (< 2.1.0) + rack-protection (>= 1.5.0) + redis (>= 3.3.5, < 5) + sidekiq-cron (1.2.0) + fugit (~> 1.1) + sidekiq (>= 4.2.1) + simple_form (5.0.2) + actionpack (>= 5.0) + activemodel (>= 5.0) + simple_xlsx_reader (1.0.4) + nokogiri + rubyzip + sinatra (2.0.8.1) + mustermann (~> 1.0) + rack (~> 2.0) + rack-protection (= 2.0.8.1) + tilt (~> 2.0) + solargraph (0.30.2) + backport (~> 0.2) + htmlentities (~> 4.3, >= 4.3.4) + kramdown (~> 1.16) + parser (~> 2.3) + reverse_markdown (~> 1.0, >= 1.0.5) + rubocop (~> 0.52) + thor (~> 0.19, >= 0.19.4) + tilt (~> 2.0) + yard (~> 0.9) + spreadsheet (1.2.6) + ruby-ole (>= 1.0) + spring (2.0.2) + activesupport (>= 4.2) + spring-watcher-listen (2.0.1) + listen (>= 2.7, < 4.0) + spring (>= 1.2, < 3.0) + sprockets (3.7.2) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.2.1) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) + thor (0.20.3) + thread_safe (0.3.6) + tilt (2.0.10) + turbolinks (5.2.1) + turbolinks-source (~> 5.2) + turbolinks-source (5.2.0) + tzinfo (1.2.6) + thread_safe (~> 0.1) + uglifier (4.2.0) + execjs (>= 0.3.0, < 3) + unicode-display_width (1.6.1) + web-console (3.7.0) + actionview (>= 5.0) + activemodel (>= 5.0) + bindex (>= 0.4.0) + railties (>= 5.0) + websocket-driver (0.7.1) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.4) + wkhtmltopdf-binary (0.12.5.4) + xpath (3.2.0) + nokogiri (~> 1.8) + yard (0.9.26) + +PLATFORMS + x86_64-linux + +DEPENDENCIES + aasm + active_decorator + acts-as-taggable-on (~> 6.0) + acts_as_list + ancestry + annotate (~> 2.6.0) + awesome_print + axlsx (~> 3.0.0.pre) + axlsx_rails (~> 0.5.2) + bootsnap (>= 1.1.0) + bootstrap (~> 4.3.1) + bulk_insert + capybara (>= 2.15, < 4.0) + chartkick + chinese_pinyin + chromedriver-helper + deep_cloneable (~> 3.0.0) + diffy + enumerize + faraday (~> 0.15.4) + font-awesome-sass (= 4.7.0) + grape-entity (~> 0.7.1) + groupdate (~> 4.1.0) + harmonious_dictionary (~> 0.0.1) + jbuilder (~> 2.5) + jquery-rails + kaminari (~> 1.1, >= 1.1.1) + listen (>= 3.0.5, < 3.2) + mysql2 (>= 0.4.4, < 0.6.0) + oauth2 + omniauth (~> 1.9.0) + omniauth-cas + omniauth-oauth2 (~> 1.6.0) + parallel (~> 1.19, >= 1.19.1) + pdfkit + prettier + puma (~> 3.11) + rack-cors + rack-mini-profiler + rails (~> 5.2.0) + rails-i18n (~> 5.1) + ransack + rchardet (~> 1.8) + redcarpet (~> 3.4) + redis-rails + request_store + roo-xls + rqrcode (~> 0.10.1) + rqrcode_png + rspec-rails (~> 3.8) + rubocop (~> 0.52.0) + ruby-ole + rubyzip + sass-rails (~> 5.0) + searchkick + selenium-webdriver + sidekiq + sidekiq-cron (~> 1.1) + simple_form + simple_xlsx_reader + sinatra + solargraph (~> 0.30.0) + spreadsheet + spring + spring-watcher-listen (~> 2.0.0) + thor (~> 0.20.3) + turbolinks (~> 5) + tzinfo-data + uglifier (>= 1.3.0) + web-console (>= 3.3.0) + wkhtmltopdf-binary + +BUNDLED WITH + 2.2.15 diff --git a/app/assets/javascripts/persona.js b/app/assets/javascripts/persona.js new file mode 100644 index 00000000..dee720fa --- /dev/null +++ b/app/assets/javascripts/persona.js @@ -0,0 +1,2 @@ +// Place all the behaviors and hooks related to the matching controller here. +// All this logic will automatically be available in application.js. diff --git a/app/assets/stylesheets/persona.scss b/app/assets/stylesheets/persona.scss new file mode 100644 index 00000000..a5c90364 --- /dev/null +++ b/app/assets/stylesheets/persona.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the persona controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/persona_controller.rb b/app/controllers/persona_controller.rb new file mode 100644 index 00000000..91fdef79 --- /dev/null +++ b/app/controllers/persona_controller.rb @@ -0,0 +1,128 @@ +class PersonaController < ApplicationController + def show + #平台用户总数 + #@total_users_count = User.count + #平台被Foller数量 + #@total_follow_count = Watcher.count + #平台总项目数 + #@total_project_count = Project.count + #平台不同语言项目数量 + #@total_project_languages_count = Project.joins(:project_language).group("project_languages.name").count + # 平台不同种类项目数量 + #@total_project_category_count = Project.joins(:project_category).group("project_categories.name").count + # 平台用户被fork数量 + #@total_fork_count = Project.sum('forked_count') + #平台所有项目关注数 + #@total_project_watchers_count = Project.sum('watchers_count') + #平台所有项目点赞数 + #@total_project_praises_count = Project.sum('praises_count') + #平台所有项目下的Issue数量 + #@total_project_issues_count = Project.sum('issues_count') + #平台所有PR数量 + #@total_pullrequest_count = PullRequest.count + + @user = User.find_by_login(params[:id]) || User.find_by(id: params[:id]) + #用户被Foller数量 + @follow_count = Watcher.where(watchable_id:@user.id).count + #三个月(90d)Foller数量 + @recent_follow_count = Watcher.where(watchable_id:@user.id,created_at: (Time.now.midnight - 90.day)..Time.now.midnight).count + + #用户总项目数 + @project_count = Project.where(user_id:@user.id).count + #用户三个月(90d)总项目数 + @recent_project_count = Project.where(user_id:@user.id,created_on: (Time.now.midnight - 90.day)..Time.now.midnight).count + + # 用户不同语言项目数量 + @project_languages_count = Project.where(user_id:@user.id).joins(:project_language).group("project_languages.name").count + #三个月(90d)不同语言项目数量 + @recent_project_languages_count = Project.where(user_id:@user.id).joins(:project_language).group("project_languages.name").where(created_on: (Time.now.midnight - 90.day)..Time.now.midnight).count + + # 用户不同种类项目数量 + @project_category_count = Project.where(user_id:@user.id).joins(:project_category).group("project_categories.name").count + # 三个月(90d)不同种类项目数量 + @recent_project_category_count = Project.where(user_id:@user.id).joins(:project_category).group("project_categories.name").where(created_on: (Time.now.midnight - 90.day)..Time.now.midnight).count + + # 用户被fork数量 + @fork_count = Project.where(user_id:@user.id).sum('forked_count') + # 三个月(90d)用户被fork数量 + @recent_fork_count = Project.where(user_id:@user.id,created_on: (Time.now.midnight - 90.day)..Time.now.midnight).sum('forked_count') + + #用户所有项目关注数 + @project_watchers_count = Project.where(user_id:@user.id).sum('watchers_count') + #三个月(90d)用户所有项目关注数 + @recent_project_watchers_count = Project.where(user_id:@user.id,created_on: (Time.now.midnight - 90.day)..Time.now.midnight).sum('watchers_count') + + #用户所有项目点赞数 + @project_praises_count = Project.where(user_id:@user.id).sum('praises_count') + #三个月(90d)用户所有项目点赞数 + @recent_project_praises_count = Project.where(user_id:@user.id,created_on: (Time.now.midnight - 90.day)..Time.now.midnight).sum('praises_count') + + #用户所有项目下的Issue数量 + @project_issues_count = Project.where(user_id:@user.id).sum('issues_count') + #三个月(90d)用户所有项目下的Issue数量 + @recent_project_issues_count = Project.where(user_id:@user.id,created_on: (Time.now.midnight - 90.day)..Time.now.midnight).sum('issues_count') + + #用户创建的总Issue数量 + @issues_count = Issue.where(author_id:@user.id).count + #三个月(90d)用户创建的总Issue数量 + @recent_issues_count = Issue.where(author_id:@user.id,created_on: (Time.now.midnight - 90.day)..Time.now.midnight).count + + #用户总PR数量 + @pullrequest_count = PullRequest.where(user_id:@user.id).count + #三个月(90d)用户总PR数量 + @recent_pullrequest_count = PullRequest.where(user_id:@user.id).count + + + + + #####用户画像展示数据##### + #影响力 + @influence = (60.0 + @follow_count / (@follow_count + 20.0) * 40.0).to_i + #@recent_influence = (60.0 + @recent_follow_count / (@recent_follow_count + 10.0) * 40.0).to_i + + #贡献度 + @contribution = (60.0 + @pullrequest_count / (@pullrequest_count + 20.0) * 40.0).to_i + @recent_contribution = (60.0 + @recent_pullrequest_count / (@recent_pullrequest_count + 10.0) * 40.0).to_i + + #活跃度 + @activity = (60.0 + @issues_count / (@issues_count + 80.0) * 40.0).to_i + @recent_activity = (60.0 + @recent_issues_count / (@recent_issues_count + 10.0) * 40.0).to_i + + #项目经验 + @experience = 10 * @project_count + 5 * @fork_count + @project_watchers_count + @project_praises_count + @experience = (60.0 + @experience / (@experience + 100.0) * 40.0).to_i + @recent_experience = 10 * @recent_project_count + 5 * @recent_fork_count + @recent_project_watchers_count + @recent_project_praises_count + @recent_experience = (60.0 + @recent_experience / (@recent_experience + 100.0) * 40.0).to_i + + #语言能力 + @language = (60.0 + @project_languages_count.length / (@project_languages_count.length + 5.0) * 40.0).to_i + @recent_language = (60.0 + @recent_project_languages_count.length / (@recent_project_languages_count.length + 5.0) * 40.0).to_i + + #词云图数据 + @project_category_count + @recent_project_category_count + + + #语言百分比 + @languages_percent = Hash.new + for key in @project_languages_count.keys do + @languages_percent[key] = @project_languages_count[key].to_f / @project_languages_count.values.sum + end + @recent_languages_percent = Hash.new + for key in @recent_project_languages_count.keys do + @recent_languages_percent[key] = @recent_project_languages_count[key].to_f / @recent_project_languages_count.values.sum + end + + #各门语言分数 + @each_language_score = Hash.new + for key in @project_languages_count.keys do + @each_language_score[key] = (60.0 + @project_languages_count[key] / (@project_languages_count[key] + 5.0) * 40.0).to_i + end + @recent_each_language_score = Hash.new + for key in @recent_project_languages_count.keys do + @recent_each_language_score[key] = (60.0 + @recent_project_languages_count[key] / (@recent_project_languages_count[key] + 5.0) * 40.0).to_i + end + + + end +end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 6c5c10fb..ac13b78d 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -55,7 +55,82 @@ class UsersController < ApplicationController @watchers_count = watchers.size @watchers = paginate(watchers) end + + #def persona + #平台用户总数 + #@total_users_count = User.count + #平台被Foller数量 + #@total_follow_count = Watcher.count + #平台总项目数 + #@total_project_count = Project.count + #平台不同语言项目数量 + #@total_project_languages_count = Project.joins(:project_language).group("project_languages.name").count + # 平台不同种类项目数量 + #@total_project_category_count = Project.joins(:project_category).group("project_categories.name").count + # 平台用户被fork数量 + #@total_fork_count = Project.sum('forked_count') + #平台所有项目关注数 + #@total_project_watchers_count = Project.sum('watchers_count') + #平台所有项目点赞数 + #@total_project_praises_count = Project.sum('praises_count') + #平台所有项目下的Issue数量 + #@total_project_issues_count = Project.sum('issues_count') + #平台所有PR数量 + #@total_pullrequest_count = PullRequest.count + + + #用户被Foller数量 + #@follow_count = watchers.where(watchable_id:@user.id).count + #三个月(90d)Foller数量 + #@recent_follow_count = watchers.where(watchable_id:@user.id,created_on: (Time.now.midnight - 90.day)..Time.now.midnight).count + + #用户总项目数 + #@project_count = Project.where(user_id:@user.id).count + #用户三个月(90d)总项目数 + #@recent_project_count = Project.where(user_id:@user.id,created_on: (Time.now.midnight - 90.day)..Time.now.midnight).count + + # 用户不同语言项目数量 + #@project_languages_count = Project.where(user_id:@user.id).joins(:project_language).group("project_languages.name").count + #三个月(90d)不同语言项目数量 + #@recent_project_languages_count = Project.where(user_id:@user.id).joins(:project_language).group("project_languages.name").where(created_on: (Time.now.midnight - 90.day)..Time.now.midnight).count + + # 用户不同种类项目数量 + #@project_category_count = Project.where(user_id:@user.id).joins(:project_category).group("project_categories.name").count + # 三个月(90d)不同种类项目数量 + #@recent_project_category_count = Project.where(user_id:@user.id).joins(:project_category).group("project_categories.name").where(created_on: (Time.now.midnight - 90.day)..Time.now.midnight).count + + # 用户被fork数量 + #@fork_count = Project.where(user_id:@user.id).sum('forked_count') + # 三个月(90d)用户被fork数量 + #@recent_fork_count = Project.where(user_id:@user.id,created_on: (Time.now.midnight - 90.day)..Time.now.midnight).sum('forked_count') + + #用户所有项目关注数 + #@project_watchers_count = Project.where(user_id:@user.id).sum('watchers_count') + #三个月(90d)用户所有项目关注数 + #@recent_project_watchers_count = Project.where(user_id:@user.id,created_on: (Time.now.midnight - 90.day)..Time.now.midnight)).sum('watchers_count') + + #用户所有项目点赞数 + #@project_praises_count = Project.where(user_id:@user.id).sum('praises_count') + #三个月(90d)用户所有项目点赞数 + #@recent_project_praises_count = Project.where(user_id:@user.id,created_on: (Time.now.midnight - 90.day)..Time.now.midnight)).sum('praises_count') + + #用户所有项目下的Issue数量 + #@project_issues_count = Project.where(user_id:@user.id).sum('issues_count') + #三个月(90d)用户所有项目下的Issue数量 + #@recent_project_issues_count = Project.where(user_id:@user.id,created_on: (Time.now.midnight - 90.day)..Time.now.midnight)).sum('issues_count') + + #用户创建的总Issue数量 + #@issues_count = Issue.where(author_id:@user.id).count + #三个月(90d)用户创建的总Issue数量 + #@recent_issues_count = Issue.where(author_id:@user.id,created_on: (Time.now.midnight - 90.day)..Time.now.midnight).count + + #用户总PR数量 + #@pullrequest_count = PullRequest.where(user_id:@user.id).count + #三个月(90d)用户总PR数量 + #@recent_pullrequest_count = PullRequest.where(user_id:@user.id).count + #end + def update @user = User.find params[:id] @user.update!(user_params) diff --git a/app/helpers/persona_helper.rb b/app/helpers/persona_helper.rb new file mode 100644 index 00000000..3d835355 --- /dev/null +++ b/app/helpers/persona_helper.rb @@ -0,0 +1,2 @@ +module PersonaHelper +end diff --git a/app/views/persona/show.html.erb b/app/views/persona/show.html.erb new file mode 100644 index 00000000..f407f72b --- /dev/null +++ b/app/views/persona/show.html.erb @@ -0,0 +1,18 @@ +

影响力 <%=@influence %>

+

近期影响力 <%=@recent_influence %>

+

贡献度 <%=@contribution %>

+

近期贡献度 <%=@recent_contribution %>

+

活跃度 <%=@activity %>

+

近期活跃度 <%=@recent_activity %>

+

项目经验 <%=@experience %>

+

近期项目经验 <%=@recent_experience %>

+

语言能力 <%=@language %>

+

近期语言能力 <%=@recent_language %>

+ +

词云图数据 <%=@project_category_count %>

+

近期词云图数据 <%=@recent_project_category_count %>

+

语言百分比 <%=@languages_percent %>

+

近期语言百分比 <%=@recent_languages_percent %>

+

各门语言分数 <%=@each_language_score %>

+

近期各门语言分数 <%=@recent_each_language_score %>

+ diff --git a/app/views/users/html_show.html.erb b/app/views/users/html_show.html.erb index 0fb51d1b..73162186 100644 --- a/app/views/users/html_show.html.erb +++ b/app/views/users/html_show.html.erb @@ -1 +1 @@ -<%= @contents.html_safe %> \ No newline at end of file +<%= @contents.html_safe %> diff --git a/config/routes.rb b/config/routes.rb index daef12bb..34583330 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,6 @@ Rails.application.routes.draw do + get 'persona/show/:id', to:'persona#show' require 'sidekiq/web' require 'sidekiq/cron/web' require 'admin_constraint' @@ -20,7 +21,7 @@ Rails.application.routes.draw do get 'oauth/bind', to: 'oauth/educoder#bind' get 'oauth/register', to: 'oauth#register' post 'oauth/auto_register', to: 'oauth#auto_register' - + resources :edu_settings scope '/api' do @@ -198,6 +199,7 @@ Rails.application.routes.draw do get :projects get :watch_users get :fan_users + #get :persona, :to => 'users#persona' end collection do post :following diff --git a/dump.rdb b/dump.rdb index f32855aa2218c0b6fabc47c634896f23703b1770..f43e43d05c8a1296a54aa9832d391fa091f7a075 100644 GIT binary patch delta 197 zcmZ3<_J(BFOEPm)4|UHiPWZ)9TAZ4qo12<@ zXoV{e!!Mr1{50KyqSVCPq@2_P4F4E@^KdZm6_+HISQQlIC#MzzRUa^)xKNGt&p8Xe zn8}Qcazcg&7#X<1O41TDbAa-U6C-pdCW*2b8XjPn_(yHxaWj_nuMPzQ70YrOSRP>g v<22_{*u+>VCPRbC`i!blOl*avsimpKjO;0?X^EvdCI7!A9LCtp{+?xnkFceUF}BE8*iM-$;m(Ku}Mysb8=Bc z=Dl8Q+tcL~0w!8M zlcMNPH7Z#Qli$1F9!x8lfS?saJTb1GSEg0M!`3JT68jMp%3tNr>eB4Z&&i$q2whMO zw@{7_FKe^y7hmt@>*&&=QJA@jx_K3Cttu-*66uA6MG)k#(bn?pL%H!XMT(;4H_(*> zRol-PNG&9h0M!Q~H%!|#UAyNv*V=~bc5T~L{Y;DtMP*6IkNcndKkAS1fD4(B7_f&2 zB7mEOZgW0t-A;Ks;@rWG+*y|Zq*J)x& z_Vk@f$kRO-MVZjA*C|hEmZp%2no8tTVhZFgS!V#O?!v+V0=vp&zRDYetMqm)w+^UDh7-|_qJkID<5-u(yYOs3ob diff --git a/spec/controllers/persona_controller_spec.rb b/spec/controllers/persona_controller_spec.rb new file mode 100644 index 00000000..d64116b1 --- /dev/null +++ b/spec/controllers/persona_controller_spec.rb @@ -0,0 +1,12 @@ +require 'rails_helper' + +RSpec.describe PersonaController, type: :controller do + + describe "GET #show" do + it "returns http success" do + get :show + expect(response).to have_http_status(:success) + end + end + +end diff --git a/spec/helpers/persona_helper_spec.rb b/spec/helpers/persona_helper_spec.rb new file mode 100644 index 00000000..faff7d5c --- /dev/null +++ b/spec/helpers/persona_helper_spec.rb @@ -0,0 +1,15 @@ +require 'rails_helper' + +# Specs in this file have access to a helper object that includes +# the PersonaHelper. For example: +# +# describe PersonaHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# expect(helper.concat_strings("this","that")).to eq("this that") +# end +# end +# end +RSpec.describe PersonaHelper, type: :helper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/views/persona/show.html.erb_spec.rb b/spec/views/persona/show.html.erb_spec.rb new file mode 100644 index 00000000..f1530e2d --- /dev/null +++ b/spec/views/persona/show.html.erb_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe "persona/show.html.erb", type: :view do + pending "add some examples to (or delete) #{__FILE__}" +end