Compare commits

...

96 commits

Author SHA1 Message Date
Devin Howard
98081097b4 Revert "update rails dependencies"
Original commit broke the build, since some dependencies have breaking
changes.

This reverts commit f753392d49.
2018-11-09 07:42:26 -08:00
Devin Howard
f753392d49 update rails dependencies 2018-10-17 19:51:51 -07:00
Connor Turland
38a209a970 small bug fix (#1174)
if someone besides one of "us" tried to change their password, and their settings, it wouldn't work

in the typical case it would work fine
2018-03-11 21:57:23 -07:00
Devin Howard
bd7bf20810
factory_girl => factory_bot (#1172) 2018-03-10 08:10:09 -08:00
Devin Howard
955ebdd747
Change log level of Metamaps.Debug (#1170)
debug log level is invisible in Chrome by default, which is confusing
2018-02-05 21:35:53 -08:00
Devin Howard
fdcd8a93f1 tag 3.6.1 2018-01-24 20:02:28 -08:00
Devin Howard
b5c52adf5e update to paperclip 5.2.0 2018-01-24 19:52:33 -08:00
Devin Howard
b7761a3627
manual rubocop fixes (#1163) 2018-01-21 14:21:00 -08:00
Devin Howard
e0d72fce14
update nokogiri (#1169) 2018-01-21 14:20:21 -08:00
Devin Howard
139fdf8e2b
update rubocop to 0.48.1. We still want to match Code Climate though (#1168) 2018-01-20 14:10:26 -08:00
Devin Howard
4313f6eff8
TopicCard/Desc.spec.js (#1167)
TopicCard/Desc.spec.js
2018-01-20 13:31:36 -08:00
Devin Howard
91c004ebfd
TopicCard/Permission.spec.js (#1166) 2017-12-04 21:06:09 -08:00
Devin Howard
96056f43ef
TopicCard/Title.spec.js (#1165) 2017-12-02 12:45:05 -08:00
Devin Howard
32e58fa8af
tests for TopicCard/index.js (#1164) 2017-11-26 16:13:17 -08:00
Devin Howard
5ebbd87afc
automatic rubocop fixes (#1162) 2017-11-25 11:23:47 -08:00
Devin Howard
006920b686 fix broken experience if forgot password email isn't found 2017-11-13 07:16:25 -08:00
Devin Howard
97448b389f null check in synapse policy 2017-11-13 07:11:48 -08:00
Connor Turland
f1ecc9eb0b Merge pull request #1160 from metamaps/bug/map.info.box.closing
event listener was getting lost cuz react
2017-10-26 19:17:42 -04:00
Connor Turland
ca2684fcf3 event listener was getting lost cuz react 2017-10-26 19:09:28 -04:00
Connor Turland
d9c53514fe Update pull-changes.md 2017-10-25 06:44:20 -04:00
Connor Turland
e195b89bbd Merge pull request #1155 from metamaps/bug/fix.emails
fix map activity emails
2017-10-17 12:26:20 -04:00
Connor Turland
e66498a861 add logging for delayedJob 2017-10-17 12:20:51 -04:00
Connor Turland
901eb4a513 Update daily_summary.html.erb 2017-10-17 12:06:37 -04:00
Devin Howard
cbf44e3dfe add one view test 2017-10-17 08:28:00 -07:00
Connor Turland
8b492d6dc8 made the mistake of not checking all cases 2017-10-17 01:28:07 -04:00
Connor Turland
b83f366284 Merge pull request #1151 from metamaps/feature/admin.pages
move admin header to react
2017-10-15 16:05:18 -04:00
Connor Turland
1ac06d973c Merge pull request #1153 from metamaps/feature/follow.created
follow created maps as default setting
2017-10-15 14:08:04 -04:00
Connor Turland
9af3754bc8 follow created maps as default setting
if you are the map creator, we'd like to set you up to be following it by default
2017-10-15 14:07:11 -04:00
Connor Turland
8169f24072 Merge pull request #1150 from metamaps/rake-assets-precompile
run perms:fix on assets:precompile
2017-10-15 11:02:59 -04:00
Connor Turland
b9fb4a2829 move admin header to react 2017-10-15 10:56:51 -04:00
Connor Turland
9b52d0e081 fix tests 2017-10-15 10:56:04 -04:00
Devin Howard
14dc3687cd run perms:fix on assets:precompile 2017-10-14 12:02:41 -07:00
Metamaps on Linode
0a6e7918ef fix docs building by reverting raml2html 2017-10-14 14:55:42 -04:00
Metamaps on Linode
4a7595e76d fixup imports 2017-10-14 14:55:42 -04:00
Connor Turland
e899179314 Update first-deploy.md 2017-10-14 14:44:10 -04:00
Connor Turland
44fec58985 Merge pull request #1149 from metamaps/feature/reorg.react
reorg code to distinguish between route components and normal ones
2017-10-14 12:38:57 -04:00
Connor Turland
29a25c28a8 distinguish between route components and reusable components 2017-10-14 12:37:48 -04:00
Connor Turland
76c727cd61 Merge pull request #1148 from metamaps/feature/refactor.nav.bar
rename exploreMapsBar into reusable navBar
2017-10-14 12:30:29 -04:00
Connor Turland
693e6f5e10 bug fixes and make active class auto 2017-10-14 12:03:05 -04:00
Connor Turland
a1d4c99ff6 abstract exploreMapsBar into reusable navBar 2017-10-13 13:58:21 -04:00
Connor Turland
55f2425501 Merge pull request #1142 from metamaps/feature/notifs.box
Notifications Dropdown
2017-10-13 12:29:21 -04:00
Connor Turland
f9c139c19e ruby codeclimate fixes 2017-10-13 12:22:05 -04:00
Connor Turland
d51a22c5a9 eslint fixes 2017-10-13 12:13:36 -04:00
Connor Turland
567bc9d69d Merge pull request #1145 from metamaps/feature/lower.case.headings
Switch junto headings to have normal casing (not all uppercase)
2017-10-04 11:22:33 -04:00
Connor Turland
15f512efef improve notificationbox readability 2017-09-29 14:05:39 -04:00
Connor Turland
5e6fb6290c refactor for clarity 2017-09-29 13:06:33 -04:00
Connor Turland
8695297a0f wasn't using the proper serializer causing frontend error 2017-09-29 13:06:19 -04:00
Connor Turland
216a19476b add hover states and empty case 2017-09-28 12:28:33 -04:00
Connor Turland
a0c9530c91 Update index.js 2017-09-25 16:01:25 -04:00
Connor Turland
277644f59d improve styling, fix index notifs page 2017-09-25 15:21:04 -04:00
Connor Turland
0ffc01b3fb Merge pull request #1144 from metamaps/feature/hide-learn-markdown
hide "learn markdown" unless you're editing the topic card desc
2017-09-25 14:46:44 -04:00
Devin Howard
9471efb6bd hide "learn markdown" unless you're editing the topic card desc 2017-09-23 13:19:43 -07:00
Connor Turland
fc8ac6eef1 nest inconsistent data under data key 2017-09-23 11:20:02 -04:00
Connor Turland
9cc700c64d use decorator pattern for notifs api 2017-09-22 18:38:38 -04:00
Connor Turland
64ffc78f45 add the container for the notifications dropdown 2017-09-19 23:48:46 -04:00
Connor Turland
322da431eb Merge pull request #1139 from metamaps/feature/right.click.react
Right click/context menu redone in React
2017-09-19 11:49:30 -04:00
Connor Turland
3c7c8812a4 tempplate strings and new lines 2017-09-19 11:46:19 -04:00
Connor Turland
0d6963ebb0 eslint 2017-09-19 10:16:14 -04:00
Connor Turland
c4d0bf8ce4 clean up jquery ref and strings 2017-09-19 10:02:05 -04:00
Connor Turland
3406f2e04d make render a callback and use async apply for ease of use 2017-09-19 09:58:59 -04:00
Connor Turland
a4c905df4e move each li into its own function 2017-09-19 09:04:21 -04:00
Connor Turland
5f1fe4dc3f reimplement shifting menu according to click position 2017-09-19 08:37:00 -04:00
Connor Turland
2515073393 replace old edgeRightClick code 2017-09-19 00:46:23 -04:00
Connor Turland
a04cd0d395 call the right callbacks and show in the right context 2017-09-19 00:34:37 -04:00
Connor Turland
da9e44afa0 clear the right click menu the right way 2017-09-18 23:49:35 -04:00
Connor Turland
e290244404 beginning to come together 2017-09-18 23:30:33 -04:00
Connor Turland
6e1878413f wip right click in react 2017-09-18 21:09:35 -04:00
Connor Turland
77846cfcb7 missing period for consistency 2017-09-18 16:59:52 -04:00
Connor Turland
1ffc513617 Merge pull request #1137 from metamaps/feature/improve.desc
make desc edit area larger and resizable
2017-09-17 16:25:53 -04:00
Connor Turland
3886e62a7b make desc edit area larger and resizable 2017-09-17 09:01:44 -04:00
Devin Howard
ad2ba33db6 downgrade redis to 3.3.3
This fixes the following error seen on metamaps.cc:

> *A* `Gem::LoadError` *occurred while* `POST </mappings>` *was processed
> by* `mappings#create`: Specified 'redis' for Action Cable pubsub
> adapter, but the gem is not loaded. Add `gem 'redis'` to your Gemfile
> (and ensure its version is at the minimum required by Action Cable).

Backtrace
----------------

    ```/usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/monitor.rb:214:in
    `mon_synchronize'
    /home/metamaps/metamaps.cc/app/models/mapping.rb:32:in `after_created'
    /home/metamaps/metamaps.cc/app/controllers/mappings_controller.rb:24:in
    `create'```
2017-09-16 13:41:50 -07:00
Devin Howard
cf9f54c738 tag v3.5 2017-09-16 12:27:02 -07:00
Connor Turland
f323796030 Merge pull request #1132 from metamaps/feature/mod.follow
add active scope to follows model
2017-09-13 22:45:50 -04:00
Connor Turland
a080b82e7f Merge pull request #1133 from metamaps/feature/topic.follow
Topic Card Design changes (to include 'follows')
2017-09-13 10:32:44 -04:00
Connor Turland
1174123b60 use scss vars and font fallbacks 2017-09-13 10:31:48 -04:00
Connor Turland
35f77129ad email job needs to respect active as well 2017-09-13 10:20:25 -04:00
Connor Turland
a56991aede add exception notifier for failed jobs 2017-09-13 10:18:00 -04:00
Connor Turland
672b456193 add markdown clarifications 2017-09-12 21:37:49 -04:00
Connor Turland
21518c8696 revert react router update and webpack config 2017-09-12 17:07:57 -04:00
Connor Turland
29bf2a23e8 review changes 2017-09-12 17:01:08 -04:00
Connor Turland
61eac509de Merge branch 'develop' into feature/topic.follow 2017-09-10 18:16:11 -04:00
Connor Turland
4cc420eb63 eslint fixes 2017-09-10 18:13:25 -04:00
Connor Turland
ec3e09c578 topic card design changes 2017-09-10 17:17:56 -04:00
Devin Howard
3e03e0ebbf update npm/gem dependencies (#1131)
* update npm/gem dependencies

* move to react prop-types package and fix jsdom usage

* fix sinon

* fix test support

* eslint?
2017-09-09 09:38:18 -07:00
Connor Turland
9ab7e7e170 topic card re-org 2017-09-08 16:58:17 -04:00
Connor Turland
5af2b8f216 add active scope to follows model 2017-09-08 13:42:56 -04:00
Connor Turland
8af66b1b2c Merge pull request #1130 from metamaps/feature/release.notifs
make notifs and follows work for all users
2017-09-03 18:44:33 -04:00
Connor Turland
9b2193ad8c show autofollow on client and mute on unfollow 2017-09-03 15:18:57 -04:00
Connor Turland
1a8c7810be fix eslint issue picked up by codeclimate 2017-09-03 09:13:15 -04:00
Connor Turland
d87bb7c75c make notifs and follows work for all users 2017-09-03 09:07:29 -04:00
Connor Turland
aceb3ff31e Merge pull request #1129 from metamaps/feature/map.activity.improved
improve email styling for release
2017-09-03 08:33:13 -04:00
Connor Turland
f26c6cf0b7 Merge pull request #1128 from metamaps/feature/prevent.notif.fork
dont send notification for each topic of forked map
2017-09-03 08:29:03 -04:00
Connor Turland
42f4ecb37b added bg color to sections 2017-09-03 08:27:05 -04:00
Connor Turland
64f4249f44 add comment 2017-09-02 14:12:07 -04:00
Connor Turland
958bd8c70c improve email styling for release 2017-09-02 14:06:23 -04:00
Connor Turland
3830946723 dont send notif for each topic of forked map 2017-09-02 09:59:21 -04:00
319 changed files with 3319 additions and 1949 deletions

1
.gitignore vendored
View file

@ -15,6 +15,7 @@ app/assets/javascripts/webpacked
#secrets and config #secrets and config
.env .env
*.swp
# Ignore bundler config # Ignore bundler config
.bundle .bundle

View file

@ -12,7 +12,7 @@ Rails:
Enabled: true Enabled: true
Metrics/LineLength: Metrics/LineLength:
Max: 100 Max: 120
Metrics/AbcSize: Metrics/AbcSize:
Max: 16 Max: 16
@ -22,3 +22,8 @@ Style/Documentation:
Style/EmptyMethod: Style/EmptyMethod:
EnforcedStyle: expanded EnforcedStyle: expanded
# I like this cop, but occasionally code is more readable without a guard clause,
# and I don't want to write rubocop:disable comments every time that happens
Style/GuardClause:
Enabled: false

13
Gemfile
View file

@ -1,11 +1,12 @@
# frozen_string_literal: true # frozen_string_literal: true
source 'https://rubygems.org' source 'https://rubygems.org'
ruby '2.3.0' ruby '2.3.0'
gem 'rails', '~> 5.0.0' gem 'rails', '~> 5.0.0'
gem 'active_model_serializers' gem 'active_model_serializers'
gem 'aws-sdk' gem 'aws-sdk', '~> 2.7.0'
gem 'best_in_place' gem 'best_in_place'
gem 'delayed_job' gem 'delayed_job'
gem 'delayed_job_active_record' gem 'delayed_job_active_record'
@ -24,7 +25,7 @@ gem 'pundit'
gem 'pundit_extra' gem 'pundit_extra'
gem 'rack-attack' gem 'rack-attack'
gem 'rack-cors' gem 'rack-cors'
gem 'redis' gem 'redis', '~> 3.3.3'
gem 'slack-notifier' gem 'slack-notifier'
gem 'snorlax' gem 'snorlax'
gem 'sucker_punch' gem 'sucker_punch'
@ -37,7 +38,7 @@ gem 'uglifier'
group :test do group :test do
gem 'brakeman', require: false gem 'brakeman', require: false
gem 'factory_girl_rails' gem 'factory_bot_rails'
gem 'json-schema' gem 'json-schema'
gem 'rspec-rails' gem 'rspec-rails'
gem 'shoulda-matchers' gem 'shoulda-matchers'
@ -47,10 +48,10 @@ end
group :development, :test do group :development, :test do
gem 'better_errors' gem 'better_errors'
gem 'binding_of_caller' gem 'binding_of_caller'
gem 'faker'
gem 'pry-byebug' gem 'pry-byebug'
gem 'pry-rails' gem 'pry-rails'
gem 'rubocop' gem 'rubocop', '~> 0.48.1' # match code climate https://github.com/tootsuite/mastodon/issues/1758
gem 'tunemygc'
gem 'faker'
gem 'timecop' gem 'timecop'
gem 'tunemygc'
end end

View file

@ -1,50 +1,50 @@
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
actioncable (5.0.1) actioncable (5.0.5)
actionpack (= 5.0.1) actionpack (= 5.0.5)
nio4r (~> 1.2) nio4r (>= 1.2, < 3.0)
websocket-driver (~> 0.6.1) websocket-driver (~> 0.6.1)
actionmailer (5.0.1) actionmailer (5.0.5)
actionpack (= 5.0.1) actionpack (= 5.0.5)
actionview (= 5.0.1) actionview (= 5.0.5)
activejob (= 5.0.1) activejob (= 5.0.5)
mail (~> 2.5, >= 2.5.4) mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
actionpack (5.0.1) actionpack (5.0.5)
actionview (= 5.0.1) actionview (= 5.0.5)
activesupport (= 5.0.1) activesupport (= 5.0.5)
rack (~> 2.0) rack (~> 2.0)
rack-test (~> 0.6.3) rack-test (~> 0.6.3)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2) rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.0.1) actionview (5.0.5)
activesupport (= 5.0.1) activesupport (= 5.0.5)
builder (~> 3.1) builder (~> 3.1)
erubis (~> 2.7.0) erubis (~> 2.7.0)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2) rails-html-sanitizer (~> 1.0, >= 1.0.3)
active_model_serializers (0.10.4) active_model_serializers (0.10.6)
actionpack (>= 4.1, < 6) actionpack (>= 4.1, < 6)
activemodel (>= 4.1, < 6) activemodel (>= 4.1, < 6)
case_transform (>= 0.2) case_transform (>= 0.2)
jsonapi (= 0.1.1.beta6) jsonapi-renderer (>= 0.1.1.beta1, < 0.2)
activejob (5.0.1) activejob (5.0.5)
activesupport (= 5.0.1) activesupport (= 5.0.5)
globalid (>= 0.3.6) globalid (>= 0.3.6)
activemodel (5.0.1) activemodel (5.0.5)
activesupport (= 5.0.1) activesupport (= 5.0.5)
activerecord (5.0.1) activerecord (5.0.5)
activemodel (= 5.0.1) activemodel (= 5.0.5)
activesupport (= 5.0.1) activesupport (= 5.0.5)
arel (~> 7.0) arel (~> 7.0)
activesupport (5.0.1) activesupport (5.0.5)
concurrent-ruby (~> 1.0, >= 1.0.2) concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7) i18n (~> 0.7)
minitest (~> 5.1) minitest (~> 5.1)
tzinfo (~> 1.1) tzinfo (~> 1.1)
addressable (2.5.0) addressable (2.5.2)
public_suffix (~> 2.0, >= 2.0.2) public_suffix (>= 2.0.2, < 4.0)
arel (7.1.4) arel (7.1.4)
ast (2.3.0) ast (2.3.0)
aws-sdk (2.7.0) aws-sdk (2.7.0)
@ -54,83 +54,82 @@ GEM
jmespath (~> 1.0) jmespath (~> 1.0)
aws-sdk-resources (2.7.0) aws-sdk-resources (2.7.0)
aws-sdk-core (= 2.7.0) aws-sdk-core (= 2.7.0)
aws-sigv4 (1.0.0) aws-sigv4 (1.0.2)
bcrypt (3.1.11) bcrypt (3.1.11)
best_in_place (3.1.0) best_in_place (3.1.1)
actionpack (>= 3.2) actionpack (>= 3.2)
railties (>= 3.2) railties (>= 3.2)
better_errors (2.1.1) better_errors (2.3.0)
coderay (>= 1.0.0) coderay (>= 1.0.0)
erubis (>= 2.6.6) erubi (>= 1.0.0)
rack (>= 0.9.0) rack (>= 0.9.0)
binding_of_caller (0.7.2) binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1) debug_inspector (>= 0.0.1)
brakeman (3.4.1) brakeman (3.7.2)
builder (3.2.3) builder (3.2.3)
byebug (9.0.6) byebug (9.1.0)
carrierwave (1.0.0) carrierwave (1.1.0)
activemodel (>= 4.0.0) activemodel (>= 4.0.0)
activesupport (>= 4.0.0) activesupport (>= 4.0.0)
mime-types (>= 1.16) mime-types (>= 1.16)
case_transform (0.2) case_transform (0.2)
activesupport activesupport
climate_control (0.1.0) climate_control (0.2.0)
cocaine (0.5.8) cocaine (0.5.8)
climate_control (>= 0.0.3, < 1.0) climate_control (>= 0.0.3, < 1.0)
coderay (1.1.1) coderay (1.1.2)
concurrent-ruby (1.0.4) concurrent-ruby (1.0.5)
debug_inspector (0.0.2) debug_inspector (0.0.3)
delayed_job (4.1.2) delayed_job (4.1.3)
activesupport (>= 3.0, < 5.1) activesupport (>= 3.0, < 5.2)
delayed_job_active_record (4.1.1) delayed_job_active_record (4.1.2)
activerecord (>= 3.0, < 5.1) activerecord (>= 3.0, < 5.2)
delayed_job (>= 3.0, < 5) delayed_job (>= 3.0, < 5)
devise (4.2.0) devise (4.3.0)
bcrypt (~> 3.0) bcrypt (~> 3.0)
orm_adapter (~> 0.1) orm_adapter (~> 0.1)
railties (>= 4.1.0, < 5.1) railties (>= 4.1.0, < 5.2)
responders responders
warden (~> 1.2.3) warden (~> 1.2.3)
diff-lcs (1.3) diff-lcs (1.3)
docile (1.1.5) docile (1.1.5)
doorkeeper (4.2.0) doorkeeper (4.2.6)
railties (>= 4.2) railties (>= 4.2)
dotenv (2.1.2) dotenv (2.2.1)
dotenv-rails (2.1.2) dotenv-rails (2.2.1)
dotenv (= 2.1.2) dotenv (= 2.2.1)
railties (>= 3.2, < 5.1) railties (>= 3.2, < 5.2)
erubi (1.6.1)
erubis (2.7.0) erubis (2.7.0)
exception_notification (4.2.1) exception_notification (4.2.2)
actionmailer (>= 4.0, < 6) actionmailer (>= 4.0, < 6)
activesupport (>= 4.0, < 6) activesupport (>= 4.0, < 6)
execjs (2.7.0) execjs (2.7.0)
factory_girl (4.8.0) factory_bot (4.8.2)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
factory_girl_rails (4.8.0) factory_bot_rails (4.8.2)
factory_girl (~> 4.8.0) factory_bot (~> 4.8.2)
railties (>= 3.0.0) railties (>= 3.0.0)
faker (1.7.3) faker (1.8.4)
i18n (~> 0.5) i18n (~> 0.5)
globalid (0.3.7) ffi (1.9.18)
activesupport (>= 4.1.0) globalid (0.4.0)
httparty (0.14.0) activesupport (>= 4.2.0)
httparty (0.15.6)
multi_xml (>= 0.5.2) multi_xml (>= 0.5.2)
i18n (0.7.0) i18n (0.9.3)
concurrent-ruby (~> 1.0)
jmespath (1.3.1) jmespath (1.3.1)
jquery-rails (4.2.2) jquery-rails (4.3.1)
rails-dom-testing (>= 1, < 3) rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0) railties (>= 4.2.0)
thor (>= 0.14, < 2.0) thor (>= 0.14, < 2.0)
jquery-ui-rails (6.0.1) jquery-ui-rails (6.0.1)
railties (>= 3.2.16) railties (>= 3.2.16)
json (2.0.3) json (2.1.0)
json-schema (2.7.0) json-schema (2.8.0)
addressable (>= 2.4) addressable (>= 2.4)
jsonapi (0.1.1.beta6) jsonapi-renderer (0.1.3)
jsonapi-parser (= 0.1.1.beta3)
jsonapi-renderer (= 0.1.1.beta1)
jsonapi-parser (0.1.1.beta3)
jsonapi-renderer (0.1.1.beta1)
kaminari (1.0.1) kaminari (1.0.1)
activesupport (>= 4.1.0) activesupport (>= 4.1.0)
kaminari-actionview (= 1.0.1) kaminari-actionview (= 1.0.1)
@ -145,145 +144,154 @@ GEM
kaminari-core (1.0.1) kaminari-core (1.0.1)
loofah (2.0.3) loofah (2.0.3)
nokogiri (>= 1.5.9) nokogiri (>= 1.5.9)
mail (2.6.4) mail (2.6.6)
mime-types (>= 1.16, < 4) mime-types (>= 1.16, < 4)
mailboxer (0.14.0) mailboxer (0.15.1)
carrierwave (>= 0.5.8) carrierwave (>= 0.5.8)
rails (>= 4.2.0) rails (>= 5.0.0)
method_source (0.8.2) method_source (0.8.2)
mime-types (3.1) mime-types (3.1)
mime-types-data (~> 3.2015) mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521) mime-types-data (3.2016.0521)
mimemagic (0.3.2) mimemagic (0.3.2)
mini_portile2 (2.1.0) mini_portile2 (2.3.0)
minitest (5.10.1) minitest (5.11.1)
multi_xml (0.6.0) multi_xml (0.6.0)
nio4r (1.2.1) nio4r (2.1.0)
nokogiri (1.7.0.1) nokogiri (1.8.1)
mini_portile2 (~> 2.1.0) mini_portile2 (~> 2.3.0)
orm_adapter (0.5.0) orm_adapter (0.5.0)
paperclip (5.1.0) paperclip (5.2.0)
activemodel (>= 4.2.0) activemodel (>= 4.2.0)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
cocaine (~> 0.5.5) cocaine (~> 0.5.5)
mime-types mime-types
mimemagic (~> 0.3.0) mimemagic (~> 0.3.0)
parser (2.3.3.1) parser (2.4.0.2)
ast (~> 2.2) ast (~> 2.3)
pg (0.19.0) pg (0.21.0)
powerpack (0.1.1) powerpack (0.1.1)
pry (0.10.4) pry (0.10.4)
coderay (~> 1.1.0) coderay (~> 1.1.0)
method_source (~> 0.8.1) method_source (~> 0.8.1)
slop (~> 3.4) slop (~> 3.4)
pry-byebug (3.4.2) pry-byebug (3.5.0)
byebug (~> 9.0) byebug (~> 9.1)
pry (~> 0.10) pry (~> 0.10)
pry-rails (0.3.4) pry-rails (0.3.6)
pry (>= 0.9.10) pry (>= 0.10.4)
public_suffix (2.0.5) public_suffix (3.0.0)
puma (3.6.2) puma (3.10.0)
pundit (1.1.0) pundit (1.1.0)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
pundit_extra (0.3.0) pundit_extra (0.3.0)
rack (2.0.1) rack (2.0.3)
rack-attack (5.0.1) rack-attack (5.0.1)
rack rack
rack-cors (0.4.0) rack-cors (1.0.1)
rack-test (0.6.3) rack-test (0.6.3)
rack (>= 1.0) rack (>= 1.0)
rails (5.0.1) rails (5.0.5)
actioncable (= 5.0.1) actioncable (= 5.0.5)
actionmailer (= 5.0.1) actionmailer (= 5.0.5)
actionpack (= 5.0.1) actionpack (= 5.0.5)
actionview (= 5.0.1) actionview (= 5.0.5)
activejob (= 5.0.1) activejob (= 5.0.5)
activemodel (= 5.0.1) activemodel (= 5.0.5)
activerecord (= 5.0.1) activerecord (= 5.0.5)
activesupport (= 5.0.1) activesupport (= 5.0.5)
bundler (>= 1.3.0, < 2.0) bundler (>= 1.3.0)
railties (= 5.0.1) railties (= 5.0.5)
sprockets-rails (>= 2.0.0) sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.2) rails-dom-testing (2.0.3)
activesupport (>= 4.2.0, < 6.0) activesupport (>= 4.2.0)
nokogiri (~> 1.6) nokogiri (>= 1.6)
rails-html-sanitizer (1.0.3) rails-html-sanitizer (1.0.3)
loofah (~> 2.0) loofah (~> 2.0)
railties (5.0.1) railties (5.0.5)
actionpack (= 5.0.1) actionpack (= 5.0.5)
activesupport (= 5.0.1) activesupport (= 5.0.5)
method_source method_source
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
rainbow (2.2.1) rainbow (2.2.2)
rake (12.0.0) rake
redis (3.3.2) rake (12.3.0)
responders (2.3.0) rb-fsevent (0.10.2)
railties (>= 4.2.0, < 5.1) rb-inotify (0.9.10)
rspec-core (3.5.4) ffi (>= 0.5.0, < 2)
rspec-support (~> 3.5.0) redis (3.3.3)
rspec-expectations (3.5.0) responders (2.4.0)
actionpack (>= 4.2.0, < 5.3)
railties (>= 4.2.0, < 5.3)
rspec-core (3.6.0)
rspec-support (~> 3.6.0)
rspec-expectations (3.6.0)
diff-lcs (>= 1.2.0, < 2.0) diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0) rspec-support (~> 3.6.0)
rspec-mocks (3.5.0) rspec-mocks (3.6.0)
diff-lcs (>= 1.2.0, < 2.0) diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0) rspec-support (~> 3.6.0)
rspec-rails (3.5.2) rspec-rails (3.6.1)
actionpack (>= 3.0) actionpack (>= 3.0)
activesupport (>= 3.0) activesupport (>= 3.0)
railties (>= 3.0) railties (>= 3.0)
rspec-core (~> 3.5.0) rspec-core (~> 3.6.0)
rspec-expectations (~> 3.5.0) rspec-expectations (~> 3.6.0)
rspec-mocks (~> 3.5.0) rspec-mocks (~> 3.6.0)
rspec-support (~> 3.5.0) rspec-support (~> 3.6.0)
rspec-support (3.5.0) rspec-support (3.6.0)
rubocop (0.47.1) rubocop (0.48.1)
parser (>= 2.3.3.1, < 3.0) parser (>= 2.3.3.1, < 3.0)
powerpack (~> 0.1) powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0) rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1) unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.8.1) ruby-progressbar (1.9.0)
sass (3.4.23) sass (3.5.1)
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.6) sass-rails (5.0.6)
railties (>= 4.0.0, < 6) railties (>= 4.0.0, < 6)
sass (~> 3.1) sass (~> 3.1)
sprockets (>= 2.8, < 4.0) sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0) sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3) tilt (>= 1.1, < 3)
shoulda-matchers (3.1.1) shoulda-matchers (3.1.2)
activesupport (>= 4.0.0) activesupport (>= 4.0.0)
simplecov (0.12.0) simplecov (0.15.0)
docile (~> 1.1.0) docile (~> 1.1.0)
json (>= 1.8, < 3) json (>= 1.8, < 3)
simplecov-html (~> 0.10.0) simplecov-html (~> 0.10.0)
simplecov-html (0.10.0) simplecov-html (0.10.2)
slack-notifier (2.0.0) slack-notifier (2.3.1)
slop (3.6.0) slop (3.6.0)
snorlax (0.1.6) snorlax (0.1.6)
rails (> 4.1) rails (> 4.1)
sprockets (3.7.1) sprockets (3.7.1)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
rack (> 1, < 3) rack (> 1, < 3)
sprockets-rails (3.2.0) sprockets-rails (3.2.1)
actionpack (>= 4.0) actionpack (>= 4.0)
activesupport (>= 4.0) activesupport (>= 4.0)
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
sucker_punch (2.0.2) sucker_punch (2.0.3)
concurrent-ruby (~> 1.0.0) concurrent-ruby (~> 1.0.0)
thor (0.19.4) thor (0.20.0)
thread_safe (0.3.5) thread_safe (0.3.6)
tilt (2.0.5) tilt (2.0.8)
timecop (0.8.1) timecop (0.9.1)
tunemygc (1.0.69) tunemygc (1.0.69)
tzinfo (1.2.2) tzinfo (1.2.4)
thread_safe (~> 0.1) thread_safe (~> 0.1)
uglifier (3.0.4) uglifier (3.2.0)
execjs (>= 0.3.0, < 3) execjs (>= 0.3.0, < 3)
unicode-display_width (1.1.3) unicode-display_width (1.3.0)
warden (1.2.6) warden (1.2.7)
rack (>= 1.0) rack (>= 1.0)
websocket-driver (0.6.4) websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0) websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2) websocket-extensions (0.1.2)
@ -292,7 +300,7 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
active_model_serializers active_model_serializers
aws-sdk aws-sdk (~> 2.7.0)
best_in_place best_in_place
better_errors better_errors
binding_of_caller binding_of_caller
@ -303,7 +311,7 @@ DEPENDENCIES
doorkeeper doorkeeper
dotenv-rails dotenv-rails
exception_notification exception_notification
factory_girl_rails factory_bot_rails
faker faker
httparty httparty
jquery-rails jquery-rails
@ -322,9 +330,9 @@ DEPENDENCIES
rack-attack rack-attack
rack-cors rack-cors
rails (~> 5.0.0) rails (~> 5.0.0)
redis redis (~> 3.3.3)
rspec-rails rspec-rails
rubocop rubocop (~> 0.48.1)
sass-rails sass-rails
shoulda-matchers shoulda-matchers
simplecov simplecov
@ -339,4 +347,4 @@ RUBY VERSION
ruby 2.3.0p0 ruby 2.3.0p0
BUNDLED WITH BUNDLED WITH
1.14.6 1.16.1

1
Rakefile Normal file → Executable file
View file

@ -1,5 +1,6 @@
#!/usr/bin/env rake #!/usr/bin/env rake
# frozen_string_literal: true # frozen_string_literal: true
# Add your own tasks in files placed in lib/tasks ending in .rake, # Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 543 B

View file

@ -56,16 +56,15 @@
} }
li.toggledOff { li.toggledOff {
opacity: 0.4; opacity: 0.6;
} }
} }
.blackBox { .centerContent {
width: 760px; width: 760px;
margin: 0 auto; margin: 0 auto;
padding: 80px 0 60px 20px; padding: 80px 0 60px 20px;
background: rgba(0, 0, 0, 0.4); background: rgba(125, 125, 125, 0.4);
color: white;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
@ -85,10 +84,10 @@
display: table-row; display: table-row;
} }
tr:nth-child(odd) { tr:nth-child(odd) {
background: rgba(0, 0, 0, 0.2); background: rgba(125, 125, 125, 0.2);
} }
tr:nth-child(even) { tr:nth-child(even) {
background: rgba(0, 0, 0, 0.3); background: rgba(125, 125, 125, 0.3);
} }
th, th,
td { td {

View file

@ -826,6 +826,7 @@ label {
font-size: 14px; font-size: 14px;
line-height: 14px; line-height: 14px;
color: #757575; color: #757575;
cursor: pointer;
} }
.accountListItem:hover { .accountListItem:hover {
color: #424242; color: #424242;
@ -1914,14 +1915,10 @@ input.collaboratorSearchField {
background-position: -32px 0; background-position: -32px 0;
} }
.yourMap .mapPermission:hover { .yourMap .mapPermission:hover {
background-image: url(<%= asset_data_uri('arrowperms_sprite.png') %>);
cursor: pointer; cursor: pointer;
background-position: -32px 0;
} }
.yourMap .mapPermission.minimize { .yourMap .mapPermission.minimize {
background-image: url(<%= asset_data_uri('arrowperms_sprite.png') %>) !important;
cursor: pointer; cursor: pointer;
background-position: 0 0;
} }
.mapInfoBox .mapPermission .permissionSelect { .mapInfoBox .mapPermission .permissionSelect {
list-style: none; list-style: none;
@ -2933,136 +2930,6 @@ and it won't be important on password protected instances */
color: #424242; color: #424242;
} }
/* Admin Pages */
.blackBox {
width: 760px;
margin: 0 auto;
padding: 20px 0 60px 20px;
background: rgba(0, 0, 0, 0.4);
color: white;
overflow: hidden;
position: relative;
}
.blackBox .metacodeSetsDescription {
width: 314px;
}
.blackBox td.metacodeSetDesc {
width: 314px;
word-wrap: break-word;
}
.blackBox .metacodeSetImage {
width: 36px;
height: 36px;
float: left;
}
.blackBox tr {
display: table-row;
}
.blackBox tr:nth-child(odd) {
background: rgba(0, 0, 0, 0.2);
}
.blackBox tr:nth-child(even) {
background: rgba(0, 0, 0, 0.3);
}
.blackBox th,
.blackBox td {
padding: 10px;
}
.blackBox td.iconURL {
max-width: 415px;
word-wrap: break-word;
}
.blackBox td.iconColor {
}
.blackBox .field {
margin: 15px 0 5px;
}
.blackBox label {
float: left;
width: 100px;
margin-right: 15px;
}
.blackBox input[type="text"] {
width: 336px;
height: 32px;
font-size: 15px;
direction: ltr;
-webkit-appearance: none;
appearance: none;
display: inline-block;
margin: 0;
padding: 0 8px;
background: #fff;
border: 1px solid #d9d9d9;
border-top: 1px solid #c0c0c0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-border-radius: 1px;
-moz-border-radius: 1px;
border-radius: 1px;
font: -webkit-small-control;
color: initial;
letter-spacing: normal;
word-spacing: normal;
text-transform: none;
text-indent: 0px;
text-shadow: none;
display: inline-block;
text-align: start;
font-family: arial;
}
.blackBox input[type="text"]:hover,
.blackBox textarea:hover {
border: 1px solid #b9b9b9;
border-top: 1px solid #a0a0a0;
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
-moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}
.blackBox textarea {
padding: 8px;
border: 1px solid #d9d9d9;
border-top: 1px solid #c0c0c0;
resize: none;
font: -webkit-small-control;
letter-spacing: normal;
word-spacing: normal;
text-transform: none;
text-indent: 0px;
text-shadow: none;
text-align: start;
font-family: arial;
font-size: 15px;
line-height: 17px;
width: 318px;
}
.blackBox .allMetacodes {
padding: 5px 0;
}
.blackBox a.button {
margin-right: 20px;
line-height: 40px;
}
.blackBox a.button,
.blackBox input.add {
float: left;
margin-top: 5px;
height: 40px;
font-size: 17px;
width: auto;
padding: 0 30px;
cursor: pointer;
font-weight: normal;
}
.blackBox a.button:hover,
.blackBox input.add:hover {
-webkit-box-shadow: none;
box-shadow: none;
}
/* request */ /* request */
.requestInvite { .requestInvite {
@ -3150,11 +3017,15 @@ script.data-gratipay-username {
} }
.topicFollow { .topicFollow {
text-align: center; height: 24px;
height: 48px; line-height: 24px;
line-height: 48px;
border-top: 1px solid #BDBDBD;
background: #FFF;
cursor: pointer; cursor: pointer;
font-family: din-regular; font-family: helvetica, sans-serif;
float: left;
width: 72px;
text-align: right;
padding: 12px 0;
color: #4fb5c0;
font-size: 13px;
font-weight: bold;
} }

View file

@ -1,9 +1,12 @@
$mid-gray: #8A8A8A;
$mid-gray-opacity: rgba(66, 66, 66, 0.6);
.nameCounter { .nameCounter {
position: absolute; position: absolute;
bottom: 1px; bottom: 1px;
right: 2px; right: 2px;
font-size: 11px; font-size: 11px;
font-family: helvetica; font-family: helvetica, sans-serif;
color: #727272; color: #727272;
line-height: 11px; line-height: 11px;
display: none; display: none;
@ -42,7 +45,7 @@
z-index:2; z-index:2;
color: #424242; color: #424242;
border-radius:2px; border-radius:2px;
box-shadow: 0px 3px 3px rgba(0,0,0,0.23), 0 3px 3px rgba(0,0,0,0.16); box-shadow: 2px 3px 3px rgba(125, 125, 125, 0.23), -2px -1px 3px rgba(125, 125, 125, 0.16);
} }
.text { .text {
@ -64,7 +67,6 @@
display:block; display:block;
position:relative; position:relative;
width:100%; width:100%;
min-height:360px;
z-index: 25; z-index: 25;
} }
.CardOnGraph.hasAttachment { .CardOnGraph.hasAttachment {
@ -73,11 +75,10 @@
.CardOnGraph .title { .CardOnGraph .title {
word-break: break-word; word-break: break-word;
font-size: 18px; font-size: 20px;
line-height: 22px; line-height: 24px;
display: table; display: table;
padding: 8px 0 16px; padding: 20px 0;
height: 80px;
text-align: center; text-align: center;
font-family: 'din-regular', sans-serif; font-family: 'din-regular', sans-serif;
width: 300px; width: 300px;
@ -88,11 +89,6 @@
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
padding: 0 16px; padding: 0 16px;
&.riek-editing {
position: absolute;
top: 32px;
}
} }
.canEdit #titleActivator:hover { .canEdit #titleActivator:hover {
background-image: url(<%= asset_data_uri('edit.png') %>); background-image: url(<%= asset_data_uri('edit.png') %>);
@ -104,9 +100,8 @@
.showcard .title .riek-editing { .showcard .title .riek-editing {
font-family: 'din-regular', sans-serif; font-family: 'din-regular', sans-serif;
color: #424242; color: #424242;
font-size: 18px; font-size: 20px;
line-height: 22px; line-height: 24px;
height: 3em;
padding: 5px 0; padding: 5px 0;
width: 100%; width: 100%;
margin: 0; margin: 0;
@ -120,11 +115,23 @@
.CardOnGraph .scroll { .CardOnGraph .scroll {
display:block; display:block;
padding: 8px 0 8px 16px; padding: 8px 0 8px 16px;
height: 152px;
font-size: 13px; font-size: 13px;
line-height:15px; line-height:15px;
font-family: helvetica, sans-serif; font-family: helvetica, sans-serif;
overflow-y: auto; overflow-y: auto;
p.emptyDesc {
color: $mid-gray-opacity;
}
a.mdSupport {
color: #4fb5c0;
font-size: 11px;
display: none;
}
.riek-editing + .mdSupport {
display: block;
}
} }
.CardOnGraph.hasAttachment .scroll { .CardOnGraph.hasAttachment .scroll {
height: auto; height: auto;
@ -136,14 +143,12 @@
font-family: helvetica, sans-serif; font-family: helvetica, sans-serif;
color: #424242; color: #424242;
padding: 0; padding: 0;
width: 100%; width: 258px;
margin: 0; margin: 0;
border: 0; border: 0;
outline: none; outline: none;
font-size: 12px;
line-height: 15px;
background: none; background: none;
resize: none; overflow-y: scroll;
} }
/* /*
@ -177,12 +182,9 @@
.CardOnGraph .riek_desc { .CardOnGraph .riek_desc {
display:block; display:block;
margin-top:2px; padding-right: 26px;
padding-right: 18px;
margin-right: 8px;
min-height: 7em;
} }
.canEdit .CardOnGraph .riek_desc:hover { .canEdit .CardOnGraph .riek_desc:not(.riek-editing):hover {
background-image: url(<%= asset_data_uri('edit.png') %>); background-image: url(<%= asset_data_uri('edit.png') %>);
background-position: top right; background-position: top right;
background-repeat: no-repeat; background-repeat: no-repeat;
@ -195,9 +197,7 @@
.CardOnGraph .links { .CardOnGraph .links {
position: relative; position: relative;
border-bottom: 1px solid #BDBDBD; z-index: 2;
border-top: 1px solid #BDBDBD;
background-color: #e0e0e0;
.linkItem { .linkItem {
float: left; float: left;
@ -213,37 +213,52 @@
} }
.icon { .icon {
position: absolute;
z-index: 1;
padding: 0; padding: 0;
height: 48px; height: 48px;
width: 100%; margin-right: 10px;
.metacodeImage { .metacodeImage {
cursor: move; cursor: move;
position: relative; position: absolute;
left: -23px; left: -18px;
top: 1px; top: 6px;
width: 46px; width: 36px;
height: 46px; height: 36px;
background-size:46px 46px; background-size:36px 36px;
background-position:0 0; background-position:0 0;
background-repeat:no-repeat; background-repeat:no-repeat;
} }
} }
}
.CardOnGraph .info {
position: relative;
.linkItem {
float: left;
z-index: 1;
position: relative;
color: $mid-gray-opacity;
font-size: 14px;
line-height: 14px;
a {
color: $mid-gray-opacity;
}
}
.contributor { .contributor {
bottom: 7px; bottom: 7px;
margin-left: 40px; margin-left: 16px;
.contributorIcon { .contributorIcon {
position: relative; position: relative;
display: inline-block;
vertical-align: middle; vertical-align: middle;
border-radius: 16px; border-radius: 16px;
margin: 5px; margin: 5px 5px 5px 0;
top: 8px; top: 11px;
left: 0; left: 0;
border-radius: 16px;
} }
span { span {
@ -252,52 +267,34 @@
} }
.contributorName { .contributorName {
display: none;
position: absolute;
background: black;
text-align: center;
color: white;
border-radius: 2px;
font-family: din-regular; font-family: din-regular;
line-height: 15px; margin-top: 20px;
font-size: 12px; display: inline-block;
padding: 3px 5px 2px; vertical-align: middle;
width: 97px;
padding: 0 8px 0 4px;
white-space: nowrap; white-space: nowrap;
margin-top: 8px; overflow: hidden;
text-overflow: ellipsis;
&:before {
content: '';
position: absolute;
top: 26px;
left: 10px;
margin-top: -30px;
width: 0;
height: 0;
border-bottom: 4px solid #000000;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
}
}
&:hover .contributorName {
display: block;
} }
} }
.mapCount { .mapCount {
padding:17px 0 17px 36px; padding:17px 38px 17px 0;
margin-left: 12px; width: 22px;
text-align: right;
.mapCountIcon { .mapCountIcon {
position: absolute; position: absolute;
top: 8px; top: 8px;
left: 0; right: 0;
width: 32px; width: 32px;
height: 32px; height: 32px;
background-image: url(<%= asset_data_uri('map32_sprite.png') %>); background-image: url(<%= asset_data_uri('map32_sprite.png') %>);
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: 0 0; background-position: 0 0;
cursor: pointer; cursor: pointer;
opacity: 0.6;
} }
&:hover .mapCountIcon { &:hover .mapCountIcon {
@ -306,18 +303,18 @@
.tip, .hoverTip { .tip, .hoverTip {
top: 44px; top: 44px;
left: 0px; right: 0px;
font-size: 12px !important; font-size: 12px !important;
&:before { &:before {
content: ''; content: '';
position: absolute; position: absolute;
top: 26px; top: 26px;
left: 10px; right: 10px;
margin-top: -30px; margin-top: -30px;
width: 0; width: 0;
height: 0; height: 0;
border-bottom: 4px solid #000000; border-bottom: 4px solid $mid-gray;
border-left: 5px solid transparent; border-left: 5px solid transparent;
border-right: 5px solid transparent; border-right: 5px solid transparent;
} }
@ -327,10 +324,9 @@
white-space: nowrap; white-space: nowrap;
font-family: 'din-regular'; font-family: 'din-regular';
top: 44px; top: 44px;
left: 0px;
font-size: 12px !important; font-size: 12px !important;
position: absolute; position: absolute;
background: black; background: $mid-gray;
color: white; color: white;
border-radius: 4px; border-radius: 4px;
line-height: 17px; line-height: 17px;
@ -362,28 +358,31 @@
} }
.synapseCount { .synapseCount {
margin-left: 26px; width: 22px;
width: 24px; padding:17px 38px 17px 0;
padding:17px 0 17px 32px; text-align: right;
margin-right: 4px;
.synapseCountIcon { .synapseCountIcon {
position: absolute; position: absolute;
top: 8px; top: 8px;
left: 0; right: 0;
width: 32px; width: 32px;
height: 32px; height: 32px;
background-image: url(<%= asset_data_uri('synapse32_sprite.png') %>); background-image: url(<%= asset_data_uri('synapse32_sprite.png') %>);
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: 0 0; background-position: 0 0;
opacity: 0.6;
} }
hover .synapseCountIcon { hover .synapseCountIcon {
background-position: 0 -32px; background-position: 0 -32px;
} }
.tip { .tip {
position: absolute; position: absolute;
background: black; background: $mid-gray;
width: auto; width: auto;
top: 44px; top: 44px;
right: 0px;
color: white; color: white;
white-space: nowrap; white-space: nowrap;
border-radius: 2px; border-radius: 2px;
@ -398,10 +397,10 @@
content: ''; content: '';
position: absolute; position: absolute;
margin-top: -8px; margin-top: -8px;
margin-left: 6px; right: 12px;
width: 0; width: 0;
height: 0; height: 0;
border-bottom: 4px solid black; border-bottom: 4px solid $mid-gray;
border-left: 5px solid transparent; border-left: 5px solid transparent;
border-right: 5px solid transparent; border-right: 5px solid transparent;
} }
@ -413,6 +412,10 @@
color: #4FC059; color: #4FC059;
} }
.linkItem.mapPerm {
margin-right: 8px;
}
.mapPerm { .mapPerm {
width: 32px; width: 32px;
height: 32px; height: 32px;
@ -434,13 +437,9 @@
} }
.yourTopic .mapPerm:hover, .yourEdge .mapPerm:hover { .yourTopic .mapPerm:hover, .yourEdge .mapPerm:hover {
background-image: url(<%= asset_data_uri('arrowperms_sprite.png') %>);
background-position: -32px 0;
cursor:pointer; cursor:pointer;
} }
.yourTopic .mapPerm.minimize, .yourEdge .mapPerm.minimize { .yourTopic .mapPerm.minimize, .yourEdge .mapPerm.minimize {
background-image: url(<%= asset_data_uri('arrowperms_sprite.png') %>) !important;
background-position: 0 0;
cursor: pointer; cursor: pointer;
} }
.mapPerm .permissionSelect { .mapPerm .permissionSelect {
@ -477,32 +476,34 @@ cursor: pointer;
} }
.CardOnGraph .metacodeTitle { .CardOnGraph .metacodeTitle {
font-style: italic; font-family: 'din-regular';
font-family: 'vinyl';
text-transform: uppercase;
position: absolute;
line-height: 24px; line-height: 24px;
height: 26px; height: 26px;
font-size: 24px; font-size: 18px;
display: none; padding: 13px 24px 9px 24px;
width: 90%;
padding: 13px 0 9px 10%;
background-color: #E0E0E0;
color: #424242; color: #424242;
width: 120px;
max-width: 120px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
} }
.permission.canEdit .metacodeTitle { .permission.canEdit .metacodeTitle {
cursor:pointer; cursor:pointer;
} }
.permission.canEdit .expandMetacodeSelect { .permission.canEdit .expandMetacodeSelect {
position: absolute; position: relative;
top: 16px; top: 2px;
right: 16px; left: 4px;
width: 16px; width: 16px;
height: 16px; height: 16px;
background-image: url(<%= asset_data_uri('arrowright_sprite.png') %>); background-image: url(<%= asset_data_uri('arrowright_sprite.png') %>);
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: 0 -32px; background-position: 0 -32px;
display: inline-block;
-webkit-transform: rotate(90deg);
transform: rotate(90deg);
} }
.permission.canEdit .minimize .expandMetacodeSelect { .permission.canEdit .minimize .expandMetacodeSelect {
@ -519,8 +520,8 @@ cursor: pointer;
background: #EAEAEA; background: #EAEAEA;
white-space: nowrap; white-space: nowrap;
position: absolute; position: absolute;
left: 300px; top: 48px;
top: -1px; box-shadow: 2px 2px 2px rgba(125, 125, 125, 0.23), -2px -1px 3px rgba(125, 125, 125, 0.16);
} }
.CardOnGraph .metacodeSelect ul { .CardOnGraph .metacodeSelect ul {
position: relative; position: relative;
@ -613,9 +614,9 @@ background-color: #E0E0E0;
} }
.CardOnGraph .tip { .CardOnGraph .tip {
position: absolute; position: absolute;
background: black; background: $mid-gray;
top: 35px; top: 35px;
left: 0; right: 0;
color: white; color: white;
border-radius: 4px; border-radius: 4px;
font-size:15px !important; font-size:15px !important;
@ -633,7 +634,6 @@ background-color: #E0E0E0;
width:100%; width:100%;
height:47px; height:47px;
position: relative; position: relative;
border-top: 1px solid #BDBDBD;
} }
.link-adder a { .link-adder a {
@ -695,9 +695,9 @@ background-color: #E0E0E0;
} }
#addLinkInput input{ #addLinkInput input{
padding: 9px 7px 9px 31px; padding: 9px 27px 9px 31px;
height: 12px; height: 12px;
width: 198px; width: 210px;
margin: 0 0 0 0; margin: 0 0 0 0;
border: none; border: none;
outline: none; outline: none;

View file

@ -668,19 +668,19 @@
box-shadow: 0px 3px 3px rgba(0,0,0,0.23), 0 3px 3px rgba(0,0,0,0.16); box-shadow: 0px 3px 3px rgba(0,0,0,0.23), 0 3px 3px rgba(0,0,0,0.16);
} }
#exploreMapsHeader { #navBar {
position: absolute; position: absolute;
width: 100%; width: 100%;
} }
.exploreMapsBar { .navBarContainer {
z-index:2; z-index:2;
background-color:#FAFAFA; background-color:#FAFAFA;
height: 42px; height: 42px;
padding-top: 52px; padding-top: 52px;
} }
.exploreMapsMenu { .navBarMenu {
display: block; display: block;
width: 100%; width: 100%;
height:42px; height:42px;
@ -689,30 +689,29 @@
text-align: center; text-align: center;
} }
.exploreMapsCenter { .navBarCenter {
display: block; display: block;
} }
.exploreMapsButton { .navBarButton {
color: #757575; color: #757575;
cursor: default; cursor: default;
font-weight: normal; font-weight: normal;
font-family: 'din-medium'; font-family: 'din-medium';
font-size: 14px; font-size: 14px;
height: 14px; padding: 0 8px;
padding: 14px 8px 12px 40px;
border-bottom: 2px solid rgba(0,0,0,0); border-bottom: 2px solid rgba(0,0,0,0);
display: inline-block; display: inline-block;
cursor: pointer; cursor: pointer;
position:relative; position:relative;
} }
.exploreMapsButton:hover, .exploreMapsButton.active { .navBarButton:hover, .navBarButton.active {
text-decoration: none; text-decoration: none;
color: #424242; color: #424242;
border-bottom: 2px solid #00BCD4; border-bottom: 2px solid #00BCD4;
} }
.exploreMapsButton.mapperButton { .navBarButton.mapperButton {
height: 40px; height: 40px;
padding: 0; padding: 0;
} }
@ -729,62 +728,69 @@
} }
.exploreMapsButton .exploreMapsIcon { .navBarButton .navBarIcon {
background-repeat: no-repeat; background-repeat: no-repeat;
width:32px; width:32px;
height:32px; height:32px;
position:absolute; margin-top:5px;
top:5px; margin-left:5px;
left:5px; margin-right: 5px;
display: inline-block;
vertical-align: top;
} }
.exploreMapsCenter .authedApps .exploreMapsIcon { .navBarLinkText {
padding: 11px 0 12px 0;
display: inline-block;
}
.navBarCenter .authedApps .navBarIcon {
background-image: url(<%= asset_path('user_sprite.png') %>); background-image: url(<%= asset_path('user_sprite.png') %>);
background-position: 0 -32px; background-position: 0 -32px;
} }
.exploreMapsCenter .myMaps .exploreMapsIcon { .navBarCenter .myMaps .navBarIcon {
background-image: url(<%= asset_path 'exploremaps_sprite.png' %>); background-image: url(<%= asset_path 'exploremaps_sprite.png' %>);
background-position: -32px 0; background-position: -32px 0;
} }
.exploreMapsCenter .sharedMaps .exploreMapsIcon { .navBarCenter .sharedMaps .navBarIcon {
background-image: url(<%= asset_path 'exploremaps_sprite.png' %>); background-image: url(<%= asset_path 'exploremaps_sprite.png' %>);
background-position: -128px 0; background-position: -128px 0;
} }
.exploreMapsCenter .activeMaps .exploreMapsIcon { .navBarCenter .activeMaps .navBarIcon {
background-image: url(<%= asset_path 'exploremaps_sprite.png' %>); background-image: url(<%= asset_path 'exploremaps_sprite.png' %>);
background-position: 0 0; background-position: 0 0;
} }
.exploreMapsCenter .featuredMaps .exploreMapsIcon { .navBarCenter .featuredMaps .navBarIcon {
background-image: url(<%= asset_path 'exploremaps_sprite.png' %>); background-image: url(<%= asset_path 'exploremaps_sprite.png' %>);
background-position: -96px 0; background-position: -96px 0;
} }
.exploreMapsCenter .starredMaps .exploreMapsIcon { .navBarCenter .starredMaps .navBarIcon {
background-image: url(<%= asset_path 'exploremaps_sprite.png' %>); background-image: url(<%= asset_path 'exploremaps_sprite.png' %>);
background-position: -96px 0; background-position: -96px 0;
} }
.exploreMapsCenter .notificationsLink .exploreMapsIcon { .navBarCenter .notificationsLink .navBarIcon {
background-image: url(<%= asset_path 'topright_sprite.png' %>); background-image: url(<%= asset_path 'topright_sprite.png' %>);
background-position: -128px 0; background-position: -128px 0;
} }
.authedApps:hover .exploreMapsIcon, .authedApps.active .exploreMapsIcon { .authedApps:hover .navBarIcon, .authedApps.active .navBarIcon {
background-position-x: -32px; background-position-x: -32px;
} }
.myMaps:hover .exploreMapsIcon, .myMaps.active .exploreMapsIcon { .myMaps:hover .navBarIcon, .myMaps.active .navBarIcon {
background-position: -32px -32px; background-position: -32px -32px;
} }
.activeMaps:hover .exploreMapsIcon, .activeMaps.active .exploreMapsIcon { .activeMaps:hover .navBarIcon, .activeMaps.active .navBarIcon {
background-position: 0 -32px; background-position: 0 -32px;
} }
.featuredMaps:hover .exploreMapsIcon, .featuredMaps.active .exploreMapsIcon { .featuredMaps:hover .navBarIcon, .featuredMaps.active .navBarIcon {
background-position: -96px -32px; background-position: -96px -32px;
} }
.starredMaps:hover .exploreMapsIcon, .starredMaps.active .exploreMapsIcon { .starredMaps:hover .navBarIcon, .starredMaps.active .navBarIcon {
background-position: -96px -32px; background-position: -96px -32px;
} }
.sharedMaps:hover .exploreMapsIcon, .sharedMaps.active .exploreMapsIcon { .sharedMaps:hover .navBarIcon, .sharedMaps.active .navBarIcon {
background-position: -128px -32px; background-position: -128px -32px;
} }
.notificationsLink:hover .exploreMapsIcon, .notificationsLink.active .exploreMapsIcon { .notificationsLink:hover .navBarIcon, .notificationsLink.active .navBarIcon {
background-position-y: -32px; background-position-y: -32px;
} }

View file

@ -32,7 +32,7 @@
/* Smartphones (portrait and landscape) ----------- the minimum space that two map cards can fit side by side */ /* Smartphones (portrait and landscape) ----------- the minimum space that two map cards can fit side by side */
@media only screen and (max-width : 504px) { @media only screen and (max-width : 504px) {
.upperLeftUI, .upperRightUI, .openCheatsheet, .mapInfoIcon, .feedback-icon, .chat-box, #exploreMapsHeader { .upperLeftUI, .upperRightUI, .openCheatsheet, .mapInfoIcon, .feedback-icon, .chat-box, #navBar {
display: none !important; display: none !important;
} }

View file

@ -1,4 +1,7 @@
$notifications-border-color: #DDDDDD;
$notifications-hover-color: #F6F6F6;
$unread_notifications_dot_size: 8px; $unread_notifications_dot_size: 8px;
.unread-notifications-dot { .unread-notifications-dot {
width: $unread_notifications_dot_size; width: $unread_notifications_dot_size;
height: $unread_notifications_dot_size; height: $unread_notifications_dot_size;
@ -13,13 +16,72 @@ $unread_notifications_dot_size: 8px;
.notificationsIcon { .notificationsIcon {
position: relative; position: relative;
} }
.notificationsBox {
position: absolute;
background: #FFFFFF;
border-radius: 2px;
width: 350px;
right: 0;
top: 50px;
box-shadow: 0 3px 6px rgba(0,0,0,0.16);
border: 1px solid $notifications-border-color;
.notificationsBoxTriangle {
min-width: 0 !important;
display: block;
position: absolute;
right: 48px;
width: 20px !important;
height: 20px !important;
margin-left: -10px;
top: -11px;
border-left: 1px solid $notifications-border-color;
border-top: 1px solid $notifications-border-color;
border-bottom: 0 !important;
border-right: 0 !important;
background-color: #fff;
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
}
ul.notifications {
max-height: 500px;
overflow-y: auto;
.notification {
font-size: 13px;
.notification-body {
border-bottom: 1px solid $notifications-border-color;
}
}
.notificationsEmpty {
font-family: din-regular, helvetica, sans-serif;
margin: 50px 10px;
text-align: center;
}
}
.notificationsBoxSeeAll {
display: block;
width: 100%;
text-align: center;
padding: 6px 0;
font-family: din-regular, helvetica, sans-serif;
border-top: 1px solid rgba(0, 0, 0, 0.1);
&:hover {
color: #333;
background: $notifications-hover-color;
}
}
}
} }
.controller-notifications { .controller-notifications {
ul.notifications {
list-style: none;
}
.notificationPage, .notificationPage,
.notificationsPage { .notificationsPage {
font-family: 'din-regular', Sans-Serif; font-family: 'din-regular', Sans-Serif;
@ -47,86 +109,6 @@ $unread_notifications_dot_size: 8px;
.emptyInbox { .emptyInbox {
padding-top: 15px; padding-top: 15px;
} }
.notification {
padding: 10px;
position: relative;
&:hover {
background: #F6F6F6;
.notification-read-unread {
display:block;
}
.notification-date {
display: none;
}
}
& > a {
float: left;
width: 85%;
box-sizing: border-box;
padding-right: 10px;
}
.notification-actor {
float: left;
img {
width: 32px;
height: 32px;
border-radius: 16px;
}
}
.notification-body {
margin-left: 50px;
line-height: 20px;
.in-bold {
font-family: 'din-medium', Sans-Serif;
}
.action {
background: #4fb5c0;
color: #FFF;
padding: 2px 6px;
border-radius: 3px;
display: inline-block;
margin: 5px 0;
}
}
.notification-date {
position: absolute;
top: 50%;
right: 10px;
color: #607d8b;
font-size: 13px;
line-height: 13px;
margin-top: -6px;
}
.notification-read-unread {
display: none;
float: left;
width: 15%;
a {
position: absolute;
top: 50%;
margin-top: -10px;
text-align: center;
}
}
&.unread {
background: #EEE;
}
}
} }
@ -163,3 +145,93 @@ $unread_notifications_dot_size: 8px;
} }
} }
} }
ul.notifications {
list-style: none;
li:nth-last-child(2) {
.notification-body {
border-bottom: none !important;
}
}
}
.notification {
padding: 10px 10px 0 10px;
position: relative;
font-family: 'din-regular', Sans-Serif;
&.unread {
background: #EEE;
}
&:hover {
background: $notifications-hover-color;
.notification-read-unread {
display:block;
}
.notification-date {
display: none;
}
}
& > a {
float: left;
width: 85%;
box-sizing: border-box;
padding-right: 10px;
}
.notification-actor {
float: left;
img {
width: 32px;
height: 32px;
border-radius: 16px;
}
}
.notification-body {
margin-left: 50px;
line-height: 20px;
padding-bottom: 10px;
.in-bold {
font-family: 'din-medium', Sans-Serif;
}
.action {
background: #4fb5c0;
color: #FFF;
padding: 2px 6px;
border-radius: 3px;
display: inline-block;
margin: 5px 0;
}
}
.notification-date {
position: absolute;
top: 50%;
right: 10px;
color: #607d8b;
margin-top: -6px;
}
.notification-read-unread {
display: none;
float: left;
width: 15%;
a, div {
position: absolute;
top: 50%;
margin-top: -10px;
text-align: center;
cursor: pointer;
}
}
}

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module ApplicationCable module ApplicationCable
class Channel < ActionCable::Channel::Base class Channel < ActionCable::Channel::Base
end end

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module ApplicationCable module ApplicationCable
class Connection < ActionCable::Connection::Base class Connection < ActionCable::Connection::Base
identified_by :current_user identified_by :current_user

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class MapChannel < ApplicationCable::Channel class MapChannel < ApplicationCable::Channel
# Called when the consumer has successfully # Called when the consumer has successfully
# become a subscriber of this channel. # become a subscriber of this channel.

View file

@ -1,11 +1,12 @@
# frozen_string_literal: true # frozen_string_literal: true
class AccessController < ApplicationController class AccessController < ApplicationController
before_action :require_user, only: [:access, :access_request, before_action :require_user, only: %i[access access_request
:approve_access, :approve_access_post, approve_access approve_access_post
:deny_access, :deny_access_post, :request_access] deny_access deny_access_post request_access]
before_action :set_map, only: [:access, :access_request, before_action :set_map, only: %i[access access_request
:approve_access, :approve_access_post, approve_access approve_access_post
:deny_access, :deny_access_post, :request_access] deny_access deny_access_post request_access]
after_action :verify_authorized after_action :verify_authorized
# GET maps/:id/request_access # GET maps/:id/request_access

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Api module Api
module V1 module V1
class DeprecatedController < ApplicationController class DeprecatedController < ApplicationController

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Api module Api
module V2 module V2
class MappingsController < WithUpdatesController class MappingsController < WithUpdatesController

View file

@ -1,9 +1,10 @@
# frozen_string_literal: true # frozen_string_literal: true
module Api module Api
module V2 module V2
class MapsController < WithUpdatesController class MapsController < WithUpdatesController
def searchable_columns def searchable_columns
[:name, :desc] %i[name desc]
end end
def apply_filters(collection) def apply_filters(collection)

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Api module Api
module V2 module V2
class MetacodesController < RestfulController class MetacodesController < RestfulController

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Api module Api
module V2 module V2
class RestfulController < ActionController::Base class RestfulController < ActionController::Base
@ -7,7 +8,7 @@ module Api
snorlax_used_rest! snorlax_used_rest!
before_action :load_resource, only: [:show, :update, :destroy] before_action :load_resource, only: %i[show update destroy]
after_action :verify_authorized after_action :verify_authorized
def index def index
@ -91,7 +92,7 @@ module Api
end end
def doorkeeper_user def doorkeeper_user
return unless doorkeeper_token.present? return if doorkeeper_token.blank?
doorkeeper_render_error unless valid_doorkeeper_token? doorkeeper_render_error unless valid_doorkeeper_token?
@doorkeeper_user ||= User.find(doorkeeper_token.resource_owner_id) @doorkeeper_user ||= User.find(doorkeeper_token.resource_owner_id)
end end

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Api module Api
module V2 module V2
class SessionsController < ApplicationController class SessionsController < ApplicationController

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Api module Api
module V2 module V2
class StarsController < RestfulController class StarsController < RestfulController

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Api module Api
module V2 module V2
class SynapsesController < WithUpdatesController class SynapsesController < WithUpdatesController

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Api module Api
module V2 module V2
class TokensController < RestfulController class TokensController < RestfulController

View file

@ -1,9 +1,10 @@
# frozen_string_literal: true # frozen_string_literal: true
module Api module Api
module V2 module V2
class TopicsController < WithUpdatesController class TopicsController < WithUpdatesController
def searchable_columns def searchable_columns
[:name, :desc, :link] %i[name desc link]
end end
end end
end end

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Api module Api
module V2 module V2
class UsersController < RestfulController class UsersController < RestfulController

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Api module Api
module V2 module V2
class WithUpdatesController < RestfulController class WithUpdatesController < RestfulController

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class ApplicationController < ActionController::Base class ApplicationController < ActionController::Base
include ApplicationHelper include ApplicationHelper
include Pundit include Pundit

View file

@ -1,6 +1,7 @@
# frozen_string_literal: true # frozen_string_literal: true
class ExploreController < ApplicationController class ExploreController < ApplicationController
before_action :require_authentication, only: [:mine, :shared, :starred] before_action :require_authentication, only: %i[mine shared starred]
before_action :authorize_explore before_action :authorize_explore
after_action :verify_authorized after_action :verify_authorized
after_action :verify_policy_scoped after_action :verify_policy_scoped

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
# bad code that should be checked over before entering one of the # bad code that should be checked over before entering one of the
# nice files from the right side of this repo # nice files from the right side of this repo
class HacksController < ApplicationController class HacksController < ApplicationController

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class MainController < ApplicationController class MainController < ApplicationController
before_action :authorize_main before_action :authorize_main
after_action :verify_authorized after_action :verify_authorized

View file

@ -1,6 +1,7 @@
# frozen_string_literal: true # frozen_string_literal: true
class MappingsController < ApplicationController class MappingsController < ApplicationController
before_action :require_user, only: [:create, :update, :destroy] before_action :require_user, only: %i[create update destroy]
after_action :verify_authorized, except: :index after_action :verify_authorized, except: :index
after_action :verify_policy_scoped, only: :index after_action :verify_policy_scoped, only: :index

View file

@ -1,7 +1,10 @@
# frozen_string_literal: true # frozen_string_literal: true
class MapsController < ApplicationController class MapsController < ApplicationController
before_action :require_user, only: [:create, :update, :destroy, :events, :follow, :unfollow] before_action :require_user, only: %i[create update destroy events follow unfollow]
before_action :set_map, only: [:show, :conversation, :update, :destroy, :contains, :events, :export, :follow, :unfollow, :unfollow_from_email] before_action :set_map, only: %i[show conversation update destroy
contains events export
follow unfollow unfollow_from_email]
after_action :verify_authorized after_action :verify_authorized
# GET maps/:id # GET maps/:id

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class MessagesController < ApplicationController class MessagesController < ApplicationController
before_action :require_user, except: [:show] before_action :require_user, except: [:show]
after_action :verify_authorized after_action :verify_authorized

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class MetacodeSetsController < ApplicationController class MetacodeSetsController < ApplicationController
before_action :require_admin before_action :require_admin

View file

@ -1,7 +1,8 @@
# frozen_string_literal: true # frozen_string_literal: true
class MetacodesController < ApplicationController class MetacodesController < ApplicationController
before_action :require_admin, except: [:index, :show] before_action :require_admin, except: %i[index show]
before_action :set_metacode, only: [:edit, :update] before_action :set_metacode, only: %i[edit update]
# GET /metacodes # GET /metacodes
# GET /metacodes.json # GET /metacodes.json

View file

@ -1,18 +1,23 @@
# frozen_string_literal: true # frozen_string_literal: true
class NotificationsController < ApplicationController class NotificationsController < ApplicationController
before_action :set_receipts, only: [:index, :show, :mark_read, :mark_unread] before_action :set_receipts, only: %i[index show mark_read mark_unread]
before_action :set_notification, only: [:show, :mark_read, :mark_unread] before_action :set_notification, only: %i[show mark_read mark_unread]
before_action :set_receipt, only: [:show, :mark_read, :mark_unread] before_action :set_receipt, only: %i[show mark_read mark_unread]
def index def index
@notifications = current_user.mailbox.notifications.page(params[:page]).per(25) @notifications = current_user.mailbox.notifications.page(params[:page]).per(25)
respond_to do |format| respond_to do |format|
format.html format.html
format.json do format.json do
render json: @notifications.map do |notification| notifications = @notifications.map do |notification|
receipt = @receipts.find_by(notification_id: notification.id) receipt = @receipts.find_by(notification_id: notification.id)
notification.as_json.merge(is_read: receipt.is_read) NotificationDecorator.decorate(notification, receipt)
end
if !notifications.empty?
render json: notifications
else
render json: [].to_json
end end
end end
end end
@ -34,9 +39,7 @@ class NotificationsController < ApplicationController
end end
end end
format.json do format.json do
render json: @notification.as_json.merge( render json: NotificationDecorator.decorate(@notification, @receipt)
is_read: @receipt.is_read
)
end end
end end
end end
@ -46,9 +49,7 @@ class NotificationsController < ApplicationController
respond_to do |format| respond_to do |format|
format.js format.js
format.json do format.json do
render json: @notification.as_json.merge( render json: NotificationDecorator.decorate(@notification, @receipt)
is_read: @receipt.is_read
)
end end
end end
end end
@ -58,9 +59,7 @@ class NotificationsController < ApplicationController
respond_to do |format| respond_to do |format|
format.js format.js
format.json do format.json do
render json: @notification.as_json.merge( render json: NotificationDecorator.decorate(@notification, @receipt)
is_read: @receipt.is_read
)
end end
end end
end end

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class SearchController < ApplicationController class SearchController < ApplicationController
include TopicsHelper include TopicsHelper
include MapsHelper include MapsHelper
@ -7,7 +8,7 @@ class SearchController < ApplicationController
before_action :authorize_search before_action :authorize_search
after_action :verify_authorized after_action :verify_authorized
after_action :verify_policy_scoped, only: [:maps, :mappers, :synapses, :topics] after_action :verify_policy_scoped, only: %i[maps mappers synapses topics]
# get /search/topics?term=SOMETERM # get /search/topics?term=SOMETERM
def topics def topics
@ -140,13 +141,13 @@ class SearchController < ApplicationController
topic1id = params[:topic1id] topic1id = params[:topic1id]
topic2id = params[:topic2id] topic2id = params[:topic2id]
if term && !term.empty? if term.present?
@synapses = policy_scope(Synapse) @synapses = policy_scope(Synapse)
.where('LOWER("desc") like ?', '%' + term.downcase.strip + '%') .where('LOWER("desc") like ?', '%' + term.downcase.strip + '%')
.order('"desc"') .order('"desc"')
@synapses = @synapses.uniq(&:desc) @synapses = @synapses.uniq(&:desc)
elsif topic1id && !topic1id.empty? elsif topic1id.present?
one = policy_scope(Synapse).where(topic1_id: topic1id, topic2_id: topic2id) one = policy_scope(Synapse).where(topic1_id: topic1id, topic2_id: topic2id)
two = policy_scope(Synapse).where(topic2_id: topic1id, topic1_id: topic2id) two = policy_scope(Synapse).where(topic2_id: topic1id, topic1_id: topic2id)
@synapses = one + two @synapses = one + two

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class StarsController < ApplicationController class StarsController < ApplicationController
before_action :require_user before_action :require_user
before_action :set_map before_action :set_map

View file

@ -1,8 +1,9 @@
# frozen_string_literal: true # frozen_string_literal: true
class SynapsesController < ApplicationController class SynapsesController < ApplicationController
include TopicsHelper include TopicsHelper
before_action :require_user, only: [:create, :update, :destroy] before_action :require_user, only: %i[create update destroy]
after_action :verify_authorized, except: :index after_action :verify_authorized, except: :index
after_action :verify_policy_scoped, only: :index after_action :verify_policy_scoped, only: :index

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class TokensController < ApplicationController class TokensController < ApplicationController
before_action :require_user, only: [:new] before_action :require_user, only: [:new]

View file

@ -1,11 +1,12 @@
# frozen_string_literal: true # frozen_string_literal: true
class TopicsController < ApplicationController class TopicsController < ApplicationController
include TopicsHelper include TopicsHelper
before_action :require_user, only: [:create, :update, :destroy, :follow, :unfollow] before_action :require_user, only: %i[create update destroy follow unfollow]
before_action :set_topic, only: [:show, :update, :relative_numbers, before_action :set_topic, only: %i[show update relative_numbers
:relatives, :network, :destroy, relatives network destroy
:follow, :unfollow, :unfollow_from_email] follow unfollow unfollow_from_email]
after_action :verify_authorized, except: :autocomplete_topic after_action :verify_authorized, except: :autocomplete_topic
respond_to :html, :js, :json respond_to :html, :js, :json
@ -13,7 +14,7 @@ class TopicsController < ApplicationController
# GET /topics/autocomplete_topic # GET /topics/autocomplete_topic
def autocomplete_topic def autocomplete_topic
term = params[:term] term = params[:term]
if term && !term.empty? if term.present?
topics = policy_scope(Topic) topics = policy_scope(Topic)
.where('LOWER("name") like ?', term.downcase + '%') .where('LOWER("name") like ?', term.downcase + '%')
.order('"name"') .order('"name"')

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Users module Users
class PasswordsController < Devise::PasswordsController class PasswordsController < Devise::PasswordsController
protected protected

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Users module Users
class RegistrationsController < Devise::RegistrationsController class RegistrationsController < Devise::RegistrationsController
before_action :configure_sign_up_params, only: [:create] before_action :configure_sign_up_params, only: [:create]
@ -29,7 +30,7 @@ module Users
end end
def configure_sign_up_params def configure_sign_up_params
devise_parameter_sanitizer.permit(:sign_up, keys: [:name, :joinedwithcode]) devise_parameter_sanitizer.permit(:sign_up, keys: %i[name joinedwithcode])
end end
def configure_account_update_params def configure_account_update_params

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Users module Users
class SessionsController < Devise::SessionsController class SessionsController < Devise::SessionsController
after_action :store_location, only: [:new] after_action :store_location, only: [:new]

View file

@ -1,6 +1,7 @@
# frozen_string_literal: true # frozen_string_literal: true
class UsersController < ApplicationController class UsersController < ApplicationController
before_action :require_user, only: [:edit, :update, :updatemetacodes, :update_metacode_focus] before_action :require_user, only: %i[edit update updatemetacodes update_metacode_focus]
respond_to :html, :json respond_to :html, :json
@ -23,15 +24,15 @@ class UsersController < ApplicationController
if user_params[:password] == '' && user_params[:password_confirmation] == '' if user_params[:password] == '' && user_params[:password_confirmation] == ''
# not trying to change the password # not trying to change the password
if @user.update_attributes(user_params.except(:password, :password_confirmation)) if @user.update_attributes(user_params.except(:password, :password_confirmation))
update_follow_settings(@user, params[:settings]) if is_tester(@user) update_follow_settings(@user, params[:settings])
@user.image = nil if params[:remove_image] == '1' @user.image = nil if params[:remove_image] == '1'
@user.save @user.save
sign_in(@user, bypass: true) bypass_sign_in(@user)
respond_to do |format| respond_to do |format|
format.html { redirect_to root_url, notice: 'Settings updated' } format.html { redirect_to root_url, notice: 'Settings updated' }
end end
else else
sign_in(@user, bypass: true) bypass_sign_in(@user)
respond_to do |format| respond_to do |format|
format.html { redirect_to edit_user_path(@user), notice: @user.errors.to_a[0] } format.html { redirect_to edit_user_path(@user), notice: @user.errors.to_a[0] }
end end
@ -41,7 +42,7 @@ class UsersController < ApplicationController
correct_pass = @user.valid_password?(params[:current_password]) correct_pass = @user.valid_password?(params[:current_password])
if correct_pass && @user.update_attributes(user_params) if correct_pass && @user.update_attributes(user_params)
update_follow_settings(@user, params[:settings]) if is_tester(@user) update_follow_settings(@user, params[:settings])
@user.image = nil if params[:remove_image] == '1' @user.image = nil if params[:remove_image] == '1'
@user.save @user.save
sign_in(@user, bypass: true) sign_in(@user, bypass: true)
@ -100,7 +101,7 @@ class UsersController < ApplicationController
@user.settings.metacode_focus = params[:value] @user.settings.metacode_focus = params[:value]
@user.save @user.save
respond_to do |format| respond_to do |format|
format.json { render json: { success: "success" }} format.json { render json: { success: 'success' } }
end end
end end

View file

@ -0,0 +1,51 @@
# frozen_string_literal: true
class NotificationDecorator
class << self
def decorate(notification, receipt)
result = {
id: notification.id,
type: notification.notification_code,
subject: notification.subject,
is_read: receipt.is_read,
created_at: notification.created_at,
actor: notification.sender,
data: {
object: notification.notified_object
}
}
case notification.notification_code
when MAP_ACCESS_APPROVED, MAP_ACCESS_REQUEST, MAP_INVITE_TO_EDIT
map = notification.notified_object&.map
result[:data][:map] = {
id: map&.id,
name: map&.name
}
when TOPIC_ADDED_TO_MAP
topic = notification.notified_object&.eventable
map = notification.notified_object&.map
result[:data][:topic] = {
id: topic&.id,
name: topic&.name
}
result[:data][:map] = {
id: map&.id,
name: map&.name
}
when TOPIC_CONNECTED_1, TOPIC_CONNECTED_2
topic1 = notification.notified_object&.topic1
topic2 = notification.notified_object&.topic2
result[:data][:topic1] = {
id: topic1&.id,
name: topic1&.name
}
result[:data][:topic2] = {
id: topic2&.id,
name: topic2&.name
}
end
result
end
end
end

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module ApplicationHelper module ApplicationHelper
def invite_link def invite_link
"#{request.base_url}/join" + (current_user ? "?code=#{current_user.code}" : '') "#{request.base_url}/join" + (current_user ? "?code=#{current_user.code}" : '')

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module ContentHelper module ContentHelper
def resource_name def resource_name
:user :user

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module DeviseHelper module DeviseHelper
def devise_error_messages! def devise_error_messages!
resource.errors.to_a[0] resource.errors.to_a[0]

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true # frozen_string_literal: true
module InMetacodeSetsHelper module InMetacodeSetsHelper
end end

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true # frozen_string_literal: true
module MainHelper module MainHelper
end end

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module MapMailerHelper module MapMailerHelper
def access_approved_subject(map) def access_approved_subject(map)
map.name + ' - access approved' map.name + ' - access approved'

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true # frozen_string_literal: true
module MappingHelper module MappingHelper
end end

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module MapsHelper module MapsHelper
# JSON autocomplete format for typeahead # JSON autocomplete format for typeahead
def autocomplete_map_array_json(maps) def autocomplete_map_array_json(maps)

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module MetacodesHelper module MetacodesHelper
def metacodeset def metacodeset
metacodes = current_user.settings.metacodes metacodes = current_user.settings.metacodes

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module SynapsesHelper module SynapsesHelper
## this one is for building our custom JSON autocomplete format for typeahead ## this one is for building our custom JSON autocomplete format for typeahead
def autocomplete_synapse_generic_json(unique) def autocomplete_synapse_generic_json(unique)

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module TopicMailerHelper module TopicMailerHelper
def added_to_map_subject(topic, map) def added_to_map_subject(topic, map)
topic.name + ' was added to map ' + map.name topic.name + ' was added to map ' + map.name

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module TopicsHelper module TopicsHelper
## this one is for building our custom JSON autocomplete format for typeahead ## this one is for building our custom JSON autocomplete format for typeahead
def autocomplete_array_json(topics) def autocomplete_array_json(topics)
@ -16,7 +17,7 @@ module TopicsHelper
rtype: is_map ? 'map' : 'topic', rtype: is_map ? 'map' : 'topic',
inmaps: is_map ? [] : t.inmaps(current_user), inmaps: is_map ? [] : t.inmaps(current_user),
inmapsLinks: is_map ? [] : t.inmapsLinks(current_user), inmapsLinks: is_map ? [] : t.inmaps_links(current_user),
type: is_map ? metamap_metacode.name : t.metacode.name, type: is_map ? metamap_metacode.name : t.metacode.name,
typeImageURL: is_map ? metamap_metacode.icon : t.metacode.icon, typeImageURL: is_map ? metamap_metacode.icon : t.metacode.icon,
mapCount: is_map ? 0 : t.maps.count, mapCount: is_map ? 0 : t.maps.count,

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module UsersHelper module UsersHelper
# build custom json autocomplete for typeahead # build custom json autocomplete for typeahead
def autocomplete_user_array_json(users) def autocomplete_user_array_json(users)

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class ApplicationMailer < ActionMailer::Base class ApplicationMailer < ActionMailer::Base
default from: 'team@metamaps.cc' default from: 'team@metamaps.cc'
layout 'mailer' layout 'mailer'

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class MapActivityMailer < ApplicationMailer class MapActivityMailer < ApplicationMailer
default from: 'team@metamaps.cc' default from: 'team@metamaps.cc'

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class MapMailer < ApplicationMailer class MapMailer < ApplicationMailer
include MapMailerHelper include MapMailerHelper
default from: 'team@metamaps.cc' default from: 'team@metamaps.cc'

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class TopicMailer < ApplicationMailer class TopicMailer < ApplicationMailer
include TopicMailerHelper include TopicMailerHelper
default from: 'team@metamaps.cc' default from: 'team@metamaps.cc'

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class AccessRequest < ApplicationRecord class AccessRequest < ApplicationRecord
belongs_to :user belongs_to :user
belongs_to :map belongs_to :map

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class ApplicationRecord < ActiveRecord::Base class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true self.abstract_class = true
end end

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class Attachment < ApplicationRecord class Attachment < ApplicationRecord
belongs_to :attachable, polymorphic: true belongs_to :attachable, polymorphic: true

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Attachable module Attachable
extend ActiveSupport::Concern extend ActiveSupport::Concern

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Routing module Routing
extend ActiveSupport::Concern extend ActiveSupport::Concern
include Rails.application.routes.url_helpers include Rails.application.routes.url_helpers

View file

@ -1,16 +1,17 @@
# frozen_string_literal: true # frozen_string_literal: true
class Event < ApplicationRecord class Event < ApplicationRecord
KINDS = %w(user_present_on_map user_not_present_on_map KINDS = %w[user_present_on_map user_not_present_on_map
conversation_started_on_map conversation_started_on_map
topic_added_to_map topic_moved_on_map topic_removed_from_map topic_added_to_map topic_moved_on_map topic_removed_from_map
synapse_added_to_map synapse_removed_from_map synapse_added_to_map synapse_removed_from_map
topic_updated synapse_updated).freeze topic_updated synapse_updated].freeze
belongs_to :eventable, polymorphic: true belongs_to :eventable, polymorphic: true
belongs_to :map belongs_to :map
belongs_to :user belongs_to :user
scope :chronologically, -> { order('created_at asc') } scope :chronologically, (-> { order('created_at asc') })
after_create :notify_webhooks!, if: :map after_create :notify_webhooks!, if: :map

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Events module Events
class ConversationStartedOnMap < Event class ConversationStartedOnMap < Event
# after_create :notify_users! # after_create :notify_users!

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Events module Events
class SynapseAddedToMap < Event class SynapseAddedToMap < Event
# after_create :notify_users! # after_create :notify_users!

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Events module Events
class SynapseRemovedFromMap < Event class SynapseRemovedFromMap < Event
# after_create :notify_users! # after_create :notify_users!

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Events module Events
class SynapseUpdated < Event class SynapseUpdated < Event
# after_create :notify_users! # after_create :notify_users!

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Events module Events
class TopicAddedToMap < Event class TopicAddedToMap < Event
after_create :notify_users! after_create :notify_users!

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Events module Events
class TopicMovedOnMap < Event class TopicMovedOnMap < Event
# after_create :notify_users! # after_create :notify_users!

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Events module Events
class TopicRemovedFromMap < Event class TopicRemovedFromMap < Event
# after_create :notify_users! # after_create :notify_users!

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Events module Events
class TopicUpdated < Event class TopicUpdated < Event
# after_create :notify_users! # after_create :notify_users!

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Events module Events
class UserNotPresentOnMap < Event class UserNotPresentOnMap < Event
# after_create :notify_users! # after_create :notify_users!

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module Events module Events
class UserPresentOnMap < Event class UserPresentOnMap < Event
# after_create :notify_users! # after_create :notify_users!

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
class Follow < ApplicationRecord
class Follow < ApplicationRecord
belongs_to :user belongs_to :user
belongs_to :followed, polymorphic: true belongs_to :followed, polymorphic: true
has_one :follow_reason, dependent: :destroy has_one :follow_reason, dependent: :destroy
@ -11,9 +11,11 @@ class Follow < ApplicationRecord
after_create :add_subsetting after_create :add_subsetting
scope :active, (-> { where(muted: false) })
private private
def add_subsetting def add_subsetting
follow_reason = FollowReason.create!(follow: self) FollowReason.create!(follow: self)
end end
end end

View file

@ -1,6 +1,7 @@
# frozen_string_literal: true # frozen_string_literal: true
class FollowReason < ApplicationRecord class FollowReason < ApplicationRecord
REASONS = %w(created commented contributed followed shared_on starred).freeze REASONS = %w[created commented contributed followed shared_on starred].freeze
belongs_to :follow belongs_to :follow

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class InMetacodeSet < ApplicationRecord class InMetacodeSet < ApplicationRecord
belongs_to :metacode, class_name: 'Metacode', foreign_key: 'metacode_id' belongs_to :metacode, class_name: 'Metacode', foreign_key: 'metacode_id'
belongs_to :metacode_set, class_name: 'MetacodeSet', foreign_key: 'metacode_set_id' belongs_to :metacode_set, class_name: 'MetacodeSet', foreign_key: 'metacode_set_id'

View file

@ -1,6 +1,7 @@
# frozen_string_literal: true # frozen_string_literal: true
class Map < ApplicationRecord class Map < ApplicationRecord
ATTRS_TO_WATCH = %w(name desc permission).freeze ATTRS_TO_WATCH = %w[name desc permission].freeze
belongs_to :user belongs_to :user
belongs_to :source, class_name: :Map belongs_to :source, class_name: :Map
@ -15,7 +16,7 @@ class Map < ApplicationRecord
has_many :messages, as: :resource, dependent: :destroy has_many :messages, as: :resource, dependent: :destroy
has_many :stars, dependent: :destroy has_many :stars, dependent: :destroy
has_many :follows, as: :followed, dependent: :destroy has_many :follows, as: :followed, dependent: :destroy
has_many :followers, :through => :follows, source: :user has_many :followers, through: :follows, source: :user
has_many :access_requests, dependent: :destroy has_many :access_requests, dependent: :destroy
has_many :user_maps, dependent: :destroy has_many :user_maps, dependent: :destroy
@ -89,10 +90,10 @@ class Map < ApplicationRecord
def as_json(_options = {}) def as_json(_options = {})
json = super( json = super(
methods: [:user_name, :user_image, :star_count, :topic_count, :synapse_count, methods: %i[user_name user_image star_count topic_count synapse_count
:contributor_count, :collaborator_ids, :screenshot_url], contributor_count collaborator_ids screenshot_url],
except: [:screenshot_content_type, :screenshot_file_size, :screenshot_file_name, except: %i[screenshot_content_type screenshot_file_size screenshot_file_name
:screenshot_updated_at] screenshot_updated_at]
) )
json[:created_at_clean] = created_at_str json[:created_at_clean] = created_at_str
json[:updated_at_clean] = updated_at_str json[:updated_at_clean] = updated_at_str
@ -142,7 +143,7 @@ class Map < ApplicationRecord
protected protected
def after_created def after_created
FollowService.follow(self, self.user, 'created') FollowService.follow(self, user, 'created')
# notify users following the map creator # notify users following the map creator
end end
@ -152,12 +153,11 @@ class Map < ApplicationRecord
end end
def after_updated_async def after_updated_async
if ATTRS_TO_WATCH.any? { |k| changed_attributes.key?(k) } return unless ATTRS_TO_WATCH.any? { |k| changed_attributes.key?(k) }
FollowService.follow(self, updated_by, 'contributed') FollowService.follow(self, updated_by, 'contributed')
# NotificationService.notify_followers(self, 'map_updated', changed_attributes) # NotificationService.notify_followers(self, 'map_updated', changed_attributes)
# or better yet publish an event # or better yet publish an event
end end
end
handle_asynchronously :after_updated_async handle_asynchronously :after_updated_async
def before_destroyed def before_destroyed

View file

@ -1,7 +1,8 @@
# frozen_string_literal: true # frozen_string_literal: true
class Mapping < ApplicationRecord class Mapping < ApplicationRecord
scope :topicmapping, -> { where(mappable_type: :Topic) } scope :topicmapping, (-> { where(mappable_type: :Topic) })
scope :synapsemapping, -> { where(mappable_type: :Synapse) } scope :synapsemapping, (-> { where(mappable_type: :Synapse) })
belongs_to :mappable, polymorphic: true belongs_to :mappable, polymorphic: true
belongs_to :map, class_name: 'Map', foreign_key: 'map_id', touch: true belongs_to :map, class_name: 'Map', foreign_key: 'map_id', touch: true
@ -24,7 +25,7 @@ class Mapping < ApplicationRecord
end end
def as_json(_options = {}) def as_json(_options = {})
super(methods: [:user_name, :user_image]) super(methods: %i[user_name user_image])
end end
def after_created def after_created
@ -52,18 +53,18 @@ class Mapping < ApplicationRecord
handle_asynchronously :after_created_async handle_asynchronously :after_created_async
def after_updated def after_updated
if (mappable_type == 'Topic') && (xloc_changed? || yloc_changed?) return unless (mappable_type == 'Topic') && (xloc_changed? || yloc_changed?)
meta = { 'x': xloc, 'y': yloc, 'mapping_id': id } meta = { 'x': xloc, 'y': yloc, 'mapping_id': id }
Events::TopicMovedOnMap.publish!(mappable, map, updated_by, meta) Events::TopicMovedOnMap.publish!(mappable, map, updated_by, meta)
ActionCable.server.broadcast 'map_' + map.id.to_s, type: 'topicMoved', id: mappable.id, mapping_id: id, x: xloc, y: yloc ActionCable.server.broadcast('map_' + map.id.to_s, type: 'topicMoved',
end id: mappable.id, mapping_id: id,
x: xloc, y: yloc)
end end
def after_updated_async def after_updated_async
if (mappable_type == 'Topic') && (xloc_changed? || yloc_changed?) return unless (mappable_type == 'Topic') && (xloc_changed? || yloc_changed?)
FollowService.follow(map, updated_by, 'contributed') FollowService.follow(map, updated_by, 'contributed')
end end
end
handle_asynchronously :after_updated_async handle_asynchronously :after_updated_async
def before_destroyed def before_destroyed

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class Message < ApplicationRecord class Message < ApplicationRecord
belongs_to :user belongs_to :user
belongs_to :resource, polymorphic: true belongs_to :resource, polymorphic: true
@ -8,13 +9,12 @@ class Message < ApplicationRecord
after_create :after_created after_create :after_created
# after_create :after_created_async # after_create :after_created_async
def user_image def user_image
user.image.url user.image.url
end end
def as_json(_options = {}) def as_json(_options = {})
json = super(methods: [:user_name, :user_image]) json = super(methods: %i[user_name user_image])
json json
end end

View file

@ -1,17 +1,16 @@
# frozen_string_literal: true # frozen_string_literal: true
class Metacode < ApplicationRecord class Metacode < ApplicationRecord
has_many :in_metacode_sets has_many :in_metacode_sets
has_many :metacode_sets, through: :in_metacode_sets has_many :metacode_sets, through: :in_metacode_sets
has_many :topics has_many :topics
# This method associates the attribute ":aws_icon" with a file attachment # This method associates the attribute ":aws_icon" with a file attachment
has_attached_file :aws_icon, styles: { has_attached_file :aws_icon, styles: { ninetysix: ['96x96#', :png] },
ninetysix: ['96x96#', :png]
},
default_url: 'https://s3.amazonaws.com/metamaps-assets/metacodes/generics/96px/gen_wildcard.png' default_url: 'https://s3.amazonaws.com/metamaps-assets/metacodes/generics/96px/gen_wildcard.png'
# Validate the attached icon is image/jpg, image/png, etc # Validate the attached icon is image/jpg, image/png, etc
validates_attachment_content_type :aws_icon, content_type: /\Aimage\/.*\Z/ validates_attachment_content_type :aws_icon, content_type: %r{\Aimage/.*\Z}
validate :aws_xor_manual_icon validate :aws_xor_manual_icon
validate :manual_icon_https validate :manual_icon_https
@ -30,15 +29,13 @@ class Metacode < ApplicationRecord
def as_json(options = {}) def as_json(options = {})
default = super(options) default = super(options)
default[:icon] = icon default[:icon] = icon
default.except('aws_icon_file_name', 'aws_icon_content_type', 'aws_icon_file_size', 'aws_icon_updated_at', 'manual_icon') default.except(
'aws_icon_file_name', 'aws_icon_content_type', 'aws_icon_file_size', 'aws_icon_updated_at',
'manual_icon'
)
end end
def hasSelected(user) def in_metacode_set(metacode_set)
return true if user.settings.metacodes.include? id.to_s
false
end
def inMetacodeSet(metacode_set)
return true if metacode_sets.include? metacode_set return true if metacode_sets.include? metacode_set
false false
end end
@ -55,10 +52,9 @@ class Metacode < ApplicationRecord
end end
def manual_icon_https def manual_icon_https
if manual_icon.present? return if manual_icon.blank?
unless manual_icon.starts_with? 'https' unless manual_icon.starts_with? 'https'
errors.add(:base, 'Manual icon must begin with https') errors.add(:base, 'Manual icon must begin with https')
end end
end end
end end
end

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class MetacodeSet < ApplicationRecord class MetacodeSet < ApplicationRecord
belongs_to :user belongs_to :user
has_many :in_metacode_sets has_many :in_metacode_sets

View file

@ -1,13 +1,18 @@
# frozen_string_literal: true # frozen_string_literal: true
class PermittedParams < Struct.new(:params)
%w(map synapse topic mapping token).each do |kind| class PermittedParams
%w[map synapse topic mapping token].each do |kind|
define_method(kind) do define_method(kind) do
permitted_attributes = send("#{kind}_attributes") permitted_attributes = send("#{kind}_attributes")
params.require(kind).permit(*permitted_attributes) @params.require(kind).permit(*permitted_attributes)
end end
alias_method :"api_#{kind}", kind.to_sym alias_method :"api_#{kind}", kind.to_sym
end end
def initialize(params)
@params = params
end
alias read_attribute_for_serialization send alias read_attribute_for_serialization send
def token_attributes def token_attributes
@ -15,18 +20,18 @@ class PermittedParams < Struct.new(:params)
end end
def map_attributes def map_attributes
[:name, :desc, :permission, :arranged] %i[name desc permission arranged]
end end
def synapse_attributes def synapse_attributes
[:desc, :category, :weight, :permission, :topic1_id, :topic2_id] %i[desc category weight permission topic1_id topic2_id]
end end
def topic_attributes def topic_attributes
[:name, :desc, :link, :permission, :metacode_id] %i[name desc link permission metacode_id]
end end
def mapping_attributes def mapping_attributes
[:xloc, :yloc, :map_id, :mappable_type, :mappable_id] %i[xloc yloc map_id mappable_type mappable_id]
end end
end end

View file

@ -1,5 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
class Star < ActiveRecord::Base
class Star < ApplicationRecord
belongs_to :user belongs_to :user
belongs_to :map belongs_to :map
validates :map, uniqueness: { scope: :user, message: 'You have already starred this map' } validates :map, uniqueness: { scope: :user, message: 'You have already starred this map' }

View file

@ -1,6 +1,7 @@
# frozen_string_literal: true # frozen_string_literal: true
class Synapse < ApplicationRecord class Synapse < ApplicationRecord
ATTRS_TO_WATCH = %w(desc category permission defer_to_map_id).freeze ATTRS_TO_WATCH = %w[desc category permission defer_to_map_id].freeze
belongs_to :user belongs_to :user
belongs_to :defer_to_map, class_name: 'Map', foreign_key: 'defer_to_map_id' belongs_to :defer_to_map, class_name: 'Map', foreign_key: 'defer_to_map_id'
@ -21,9 +22,9 @@ class Synapse < ApplicationRecord
validates :category, inclusion: { in: ['from-to', 'both'], allow_nil: true } validates :category, inclusion: { in: ['from-to', 'both'], allow_nil: true }
scope :for_topic, ->(topic_id = nil) { scope :for_topic, (lambda do |topic_id = nil|
where(topic1_id: topic_id).or(where(topic2_id: topic_id)) where(topic1_id: topic_id).or(where(topic2_id: topic_id))
} end)
before_create :set_perm_by_defer before_create :set_perm_by_defer
after_create :after_created_async after_create :after_created_async
@ -38,7 +39,7 @@ class Synapse < ApplicationRecord
def collaborator_ids def collaborator_ids
if defer_to_map if defer_to_map
defer_to_map.editors.select { |mapper| mapper != user }.map(&:id) defer_to_map.editors.reject { |mapper| mapper == user }.map(&:id)
else else
[] []
end end
@ -54,7 +55,7 @@ class Synapse < ApplicationRecord
end end
def as_json(_options = {}) def as_json(_options = {})
super(methods: [:user_name, :user_image, :collaborator_ids]) super(methods: %i[user_name user_image collaborator_ids])
end end
def as_rdf def as_rdf
@ -72,7 +73,7 @@ class Synapse < ApplicationRecord
protected protected
def set_perm_by_defer def set_perm_by_defer
permission = defer_to_map.permission if defer_to_map defer_to_map&.permission
end end
def after_created_async def after_created_async
@ -82,7 +83,8 @@ class Synapse < ApplicationRecord
handle_asynchronously :after_created_async handle_asynchronously :after_created_async
def after_updated def after_updated
if ATTRS_TO_WATCH.any? { |k| changed_attributes.key?(k) } return unless ATTRS_TO_WATCH.any? { |k| changed_attributes.key?(k) }
new = attributes.select { |k| ATTRS_TO_WATCH.include?(k) } new = attributes.select { |k| ATTRS_TO_WATCH.include?(k) }
old = changed_attributes.select { |k| ATTRS_TO_WATCH.include?(k) } old = changed_attributes.select { |k| ATTRS_TO_WATCH.include?(k) }
meta = new.merge(old) # we are prioritizing the old values, keeping them meta = new.merge(old) # we are prioritizing the old values, keeping them
@ -92,7 +94,6 @@ class Synapse < ApplicationRecord
ActionCable.server.broadcast 'map_' + map.id.to_s, type: 'synapseUpdated', id: id ActionCable.server.broadcast 'map_' + map.id.to_s, type: 'synapseUpdated', id: id
end end
end end
end
def before_destroyed def before_destroyed
# hard to know how to do this yet, because the synapse actually gets destroyed # hard to know how to do this yet, because the synapse actually gets destroyed

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class Token < ApplicationRecord class Token < ApplicationRecord
belongs_to :user belongs_to :user

View file

@ -1,6 +1,7 @@
# frozen_string_literal: true # frozen_string_literal: true
class Topic < ApplicationRecord class Topic < ApplicationRecord
ATTRS_TO_WATCH = %w(name desc link metacode_id permission defer_to_map_id).freeze ATTRS_TO_WATCH = %w[name desc link metacode_id permission defer_to_map_id].freeze
include TopicsHelper include TopicsHelper
include Attachable include Attachable
@ -16,7 +17,7 @@ class Topic < ApplicationRecord
has_many :mappings, as: :mappable, dependent: :destroy has_many :mappings, as: :mappable, dependent: :destroy
has_many :maps, through: :mappings has_many :maps, through: :mappings
has_many :follows, as: :followed, dependent: :destroy has_many :follows, as: :followed, dependent: :destroy
has_many :followers, :through => :follows, source: :user has_many :followers, through: :follows, source: :user
belongs_to :metacode belongs_to :metacode
@ -38,13 +39,13 @@ class Topic < ApplicationRecord
topics1.or(topics2) topics1.or(topics2)
end end
scope :relatives, ->(topic_id = nil, user = nil) { scope :relatives, (lambda do |topic_id = nil, user = nil|
# should only see topics through *visible* synapses # should only see topics through *visible* synapses
# e.g. Topic A (commons) -> synapse (private) -> Topic B (commons) must be filtered out # e.g. Topic A (commons) -> synapse (private) -> Topic B (commons) must be filtered out
topic_ids = Pundit.policy_scope(user, Synapse.where(topic1_id: topic_id)).pluck(:topic2_id) topic_ids = Pundit.policy_scope(user, Synapse.where(topic1_id: topic_id)).pluck(:topic2_id)
topic_ids += Pundit.policy_scope(user, Synapse.where(topic2_id: topic_id)).pluck(:topic1_id) topic_ids += Pundit.policy_scope(user, Synapse.where(topic2_id: topic_id)).pluck(:topic1_id)
where(id: topic_ids.uniq) where(id: topic_ids.uniq)
} end)
delegate :name, to: :user, prefix: true delegate :name, to: :user, prefix: true
@ -64,13 +65,13 @@ class Topic < ApplicationRecord
Pundit.policy_scope(user, maps).map(&:name) Pundit.policy_scope(user, maps).map(&:name)
end end
def inmapsLinks(user) def inmaps_links(user)
Pundit.policy_scope(user, maps).map(&:id) Pundit.policy_scope(user, maps).map(&:id)
end end
def as_json(options = {}) def as_json(options = {})
super(methods: [:user_name, :user_image, :collaborator_ids]) super(methods: %i[user_name user_image collaborator_ids])
.merge(inmaps: inmaps(options[:user]), inmapsLinks: inmapsLinks(options[:user]), .merge(inmaps: inmaps(options[:user]), inmapsLinks: inmaps_links(options[:user]),
map_count: map_count(options[:user]), synapse_count: synapse_count(options[:user])) map_count: map_count(options[:user]), synapse_count: synapse_count(options[:user]))
end end
@ -89,7 +90,7 @@ class Topic < ApplicationRecord
def collaborator_ids def collaborator_ids
if defer_to_map if defer_to_map
defer_to_map.editors.select { |mapper| mapper != user }.map(&:id) defer_to_map.editors.reject { |mapper| mapper == user }.map(&:id)
else else
[] []
end end
@ -126,15 +127,10 @@ class Topic < ApplicationRecord
end end
end end
end end
if output_format == 'array' return output if output_format == 'array'
return output return output.join('; ') if output_format == 'text'
elsif output_format == 'text'
return output.join('; ')
else
raise 'invalid argument to synapses_csv' raise 'invalid argument to synapses_csv'
end end
output
end
def topic_autocomplete_method def topic_autocomplete_method
"Get: #{name}" "Get: #{name}"
@ -143,7 +139,7 @@ class Topic < ApplicationRecord
protected protected
def set_perm_by_defer def set_perm_by_defer
permission = defer_to_map.permission if defer_to_map self.permission = defer_to_map.permission if defer_to_map
end end
def create_metamap? def create_metamap?
@ -156,13 +152,14 @@ class Topic < ApplicationRecord
end end
def after_created_async def after_created_async
FollowService.follow(self, self.user, 'created') FollowService.follow(self, user, 'created')
# notify users following the topic creator # notify users following the topic creator
end end
handle_asynchronously :after_created_async handle_asynchronously :after_created_async
def after_updated def after_updated
if ATTRS_TO_WATCH.any? { |k| changed_attributes.key?(k) } return unless ATTRS_TO_WATCH.any? { |k| changed_attributes.key?(k) }
new = attributes.select { |k| ATTRS_TO_WATCH.include?(k) } new = attributes.select { |k| ATTRS_TO_WATCH.include?(k) }
old = changed_attributes.select { |k| ATTRS_TO_WATCH.include?(k) } old = changed_attributes.select { |k| ATTRS_TO_WATCH.include?(k) }
meta = new.merge(old) # we are prioritizing the old values, keeping them meta = new.merge(old) # we are prioritizing the old values, keeping them
@ -172,13 +169,12 @@ class Topic < ApplicationRecord
ActionCable.server.broadcast 'map_' + map.id.to_s, type: 'topicUpdated', id: id ActionCable.server.broadcast 'map_' + map.id.to_s, type: 'topicUpdated', id: id
end end
end end
end
def after_updated_async def after_updated_async
if ATTRS_TO_WATCH.any? { |k| changed_attributes.key?(k) } return unless ATTRS_TO_WATCH.any? { |k| changed_attributes.key?(k) }
FollowService.follow(self, updated_by, 'contributed') FollowService.follow(self, updated_by, 'contributed')
end end
end
handle_asynchronously :after_updated_async handle_asynchronously :after_updated_async
def before_destroyed def before_destroyed

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require 'open-uri' require 'open-uri'
class User < ApplicationRecord class User < ApplicationRecord
@ -51,26 +52,24 @@ class User < ApplicationRecord
validates_attachment_content_type :image, content_type: %r{\Aimage/.*\Z} validates_attachment_content_type :image, content_type: %r{\Aimage/.*\Z}
# override default as_json # override default as_json
def as_json(_options = {}) def as_json(options = {})
json = { id: id, json = { id: id,
name: name, name: name,
image: image.url(:sixtyfour), image: image.url(:sixtyfour),
admin: admin } admin: admin }
if (_options[:follows]) if options[:follows]
json['follows'] = { json['follows'] = {
topics: following.where(followed_type: 'Topic').to_a.map(&:followed_id), topics: following.active.where(followed_type: 'Topic').to_a.map(&:followed_id),
maps: following.where(followed_type: 'Map').to_a.map(&:followed_id) maps: following.active.where(followed_type: 'Map').to_a.map(&:followed_id)
} }
end end
if (_options[:follow_settings]) if options[:follow_settings]
json['follow_topic_on_created'] = settings.follow_topic_on_created == "1" json['follow_topic_on_created'] = settings.follow_topic_on_created == '1'
json['follow_topic_on_contributed'] = settings.follow_topic_on_contributed == "1" json['follow_topic_on_contributed'] = settings.follow_topic_on_contributed == '1'
json['follow_map_on_created'] = settings.follow_map_on_created == "1" json['follow_map_on_created'] = settings.follow_map_on_created == '1'
json['follow_map_on_contributed'] = settings.follow_map_on_contributed == "1" json['follow_map_on_contributed'] = settings.follow_map_on_contributed == '1'
end
if (_options[:email])
json['email'] = email
end end
json['email'] = email if options[:email]
json json
end end
@ -107,10 +106,14 @@ class User < ApplicationRecord
end end
def most_used_metacodes def most_used_metacodes
topics.to_a.each_with_object(Hash.new(0)) do |topic, memo| metacode_counts = topics.to_a.each_with_object(Hash.new(0)) do |topic, list_so_far|
memo[topic.metacode_id] += 1 list_so_far[topic.metacode_id] += 1
memo list_so_far
end.to_a.sort { |a, b| b[1] <=> a[1] }.map { |i| i[0] }.slice(0, 5) end
id_count_pairs = metacode_counts.to_a
id_count_pairs.sort! { |a, b| b[1] <=> a[1] }
metacode_ids = id_count_pairs.map { |i| i[0] }
metacode_ids.slice(0, 5)
end end
# generate a random 8 letter/digit code that they can use to invite people # generate a random 8 letter/digit code that they can use to invite people
@ -133,11 +136,11 @@ class User < ApplicationRecord
end end
def has_map_open(map) def has_map_open(map)
latestEvent = Event.where(map: map, user: self) latest_event = Event.where(map: map, user: self)
.where(kind: ['user_present_on_map', 'user_not_present_on_map']) .where(kind: %w[user_present_on_map user_not_present_on_map])
.order(:created_at) .order(:created_at)
.last .last
latestEvent && latestEvent.kind == 'user_present_on_map' latest_event && latest_event.kind == 'user_present_on_map'
end end
def has_map_with_synapse_open(synapse) def has_map_with_synapse_open(synapse)
@ -146,7 +149,7 @@ class User < ApplicationRecord
def settings def settings
self[:settings] = UserPreference.new if self[:settings].nil? self[:settings] = UserPreference.new if self[:settings].nil?
if not self[:settings].respond_to?(:follow_topic_on_created) unless self[:settings].respond_to?(:follow_topic_on_created)
self[:settings].initialize_follow_settings self[:settings].initialize_follow_settings
end end
self[:settings] self[:settings]

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class UserMap < ApplicationRecord class UserMap < ApplicationRecord
belongs_to :map belongs_to :map
belongs_to :user belongs_to :user
@ -18,7 +19,7 @@ class UserMap < ApplicationRecord
def after_created_async def after_created_async
FollowService.follow(map, user, 'shared_on') FollowService.follow(map, user, 'shared_on')
if access_request if access_request
NotificationService.access_approved(self.access_request) NotificationService.access_approved(access_request)
else else
NotificationService.invite_to_edit(self) NotificationService.invite_to_edit(self)
end end

View file

@ -1,29 +1,34 @@
# frozen_string_literal: true # frozen_string_literal: true
class UserPreference class UserPreference
attr_accessor :metacodes, :metacode_focus, :follow_topic_on_created, :follow_topic_on_contributed, attr_accessor :metacodes, :metacode_focus, :follow_topic_on_created, :follow_topic_on_contributed,
:follow_map_on_created, :follow_map_on_contributed :follow_map_on_created, :follow_map_on_contributed
def initialize def initialize
array = [] @metacodes = init_metacodes.compact
%w(Action Aim Idea Question Note Wildcard Subject).each do |m| @metacode_focus = @metacodes[0]
initialize_follow_settings
end
private
def init_metacodes
%w[Action Aim Idea Question Note Wildcard Subject].map do |m|
begin begin
metacode = Metacode.find_by(name: m) metacode = Metacode.find_by(name: m)
array.push(metacode.id.to_s) if metacode metacode.id.to_s if metacode
rescue ActiveRecord::StatementInvalid rescue ActiveRecord::StatementInvalid
if m == 'Action' if m == 'Action'
Rails.logger.warn('TODO: remove this travis workaround in user_preference.rb') Rails.logger.warn('TODO: remove this travis workaround in user_preference.rb')
end end
end end
end end.compact
@metacodes = array
@metacode_focus = array[0]
initialize_follow_settings
end end
def initialize_follow_settings def initialize_follow_settings
@follow_topic_on_created = false @follow_topic_on_created = false
@follow_topic_on_contributed = false @follow_topic_on_contributed = false
@follow_map_on_created = false @follow_map_on_created = true
@follow_map_on_contributed = false @follow_map_on_contributed = false
end end
end end

View file

@ -1,10 +1,11 @@
# frozen_string_literal: true # frozen_string_literal: true
class Webhook < ApplicationRecord class Webhook < ApplicationRecord
belongs_to :hookable, polymorphic: true belongs_to :hookable, polymorphic: true
validates :uri, presence: true validates :uri, presence: true
validates :hookable, presence: true validates :hookable, presence: true
validates :kind, inclusion: { in: %w(slack) } validates :kind, inclusion: { in: %w[slack] }
validates :event_types, length: { minimum: 1 } validates :event_types, length: { minimum: 1 }
def headers def headers

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
Webhooks::Slack::Base = Struct.new(:webhook, :event) do Webhooks::Slack::Base = Struct.new(:webhook, :event) do
include Routing include Routing

View file

@ -1,4 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class Webhooks::Slack::ConversationStartedOnMap < Webhooks::Slack::Base class Webhooks::Slack::ConversationStartedOnMap < Webhooks::Slack::Base
def text def text
"There is a live conversation starting on map *#{event.map.name}*. #{view_map_on_metamaps('Join in!')}" "There is a live conversation starting on map *#{event.map.name}*. #{view_map_on_metamaps('Join in!')}"

Some files were not shown because too many files have changed in this diff Show more