Commit graph

376 commits

Author SHA1 Message Date
Devin Howard
df84bd9e1d fix @maps serialization bug
if @maps is empty, it returns {"maps":[]}, instead of [] like we expect
on the frontend.

This commit fixes this issue
2016-09-23 14:40:26 +08:00
Devin Howard
b13ebc6716 Merge pull request #640 from metamaps/fix/password-reset-error
fix password reset error
2016-09-22 09:16:25 +08:00
Devin Howard
3843cab643 rails 5 + api v2 + raml api docs (#593)
* update Gemfile to rails 5 and ruby 2.3.0

* fiddle with javascripts and add sprockets manifest file

* update config directory for rails 5

* fix some errors with controllers/serializers

* fix travis and rspec

* new serializers renamed to serializers

* module Api::V1

* reusable embedding code

* add index/collections/paging. overriding most of snorlax now |:)

* raml api documentation + rspec tests to verify schemas/examples

* add sorting by ?sort and searching by ?q. Add pagination Link headers

* api v1 => v2

* fill out synapse api

* alphabetize map policy

* fix page thing

* fill out maps api

* formParameters => properties, and fiddle with map api

* more raml 1.0 stuff i'm learning about

* deprecate v1 api

* rails 5 uses ApplicationRecord class for app-wide model config

* Update topic spec for api v2

* workaround for user_preference.rb issue

* get ready for token api docs. also TODO is mapping api docs

* spec out mapping api

* map/mapping/synapse spec, plus other bugs

* awesome, token specs/apis are done

* add sanity checks to the api tests

* more cleanup

* devise fix

* fix starred map error
2016-09-21 13:22:40 -04:00
Devin Howard
d1c390636a Get siblings by metacode type returns only topics with that metacode - fix #538 2016-09-17 17:12:39 +08:00
Devin Howard
4723c62b20 fix password reset error 2016-09-15 07:18:15 +08:00
Devin Howard
3e38fba215 remove relatives1 and relatives2 2016-09-05 11:55:19 +08:00
Devin Howard
e761e1693c use Topic.relatives scope to get all relatives 2016-09-05 11:52:35 +08:00
Connor Turland
7de89cfa0f shouldn't reference relatives that are connected in private ways 2016-09-02 12:37:01 -04:00
Connor Turland
19dabe81cc Enable users to star maps, and to see their starred collection (#615)
* enable starring

* users should be able to star others maps

* proper star icon

* starred maps display as starred without refreshing

* oops

* make phrasing clearer
2016-08-31 16:58:49 -04:00
Devin Howard
03e98e617b fix login redirect loop - fixes #602 (#609) 2016-08-16 08:03:22 -04:00
Connor Turland
57181e208f layout tweaks (#607)
* new map creation pops to new window

* hide the search on logged out homepage

* add { }

* just writing the same code better

* remove that old code
2016-08-16 08:03:06 -04:00
Connor Turland
da090e60db remove homepage changes 2016-08-10 17:32:43 +00:00
Connor Turland
6b2386a545 progress onthe home page 2016-08-04 13:56:39 -04:00
Devin Howard
4161f70d2e remove duplicates from synapse search
there were 2 issues. one is synapses with leading/trailing whitespace. I've run a script on production to strip existing leading/trailing whitespace from synapse descs.

The second issue was that this code wasn't actually modifying the @synapses array, and collectedDesc wasn't doing anything. So this new line will be more effective.
2016-07-31 19:31:31 +08:00
Devin Howard
7d4da81272 Update code style automatically using rubocop gem (#563)
* install rubocop

* 1961 automatic rubocop fixes

* update rubocop.yml to ignore half of the remaining cops

* rubocop lint warnings

* random other warnings fixed
2016-07-26 08:14:23 +08:00
Devin Howard
b72536853f fix activemaps_path url bug (#559)
* fix activemaps_path url bug

* annoying doc updates

* skip policy scope if redirecting an explore page

* lol that would have been dumb
2016-06-20 08:32:39 +08:00
Devin Howard
6e1797183e brakeman (#556)
* update rails to 4.2.5.1

* fix brakeman gem warning

* make brakeman happier and add it to travis

* install brakeman gem for static security analysis

* fix brakeman call in travis
2016-06-16 15:44:08 +08:00
Connor Turland
c08868a5c1 user presence event (#552) 2016-04-26 08:08:12 -04:00
Connor Turland
8c51108a0c enable shared private and public maps (#530)
* enable shared private and public maps

* change the list

* yeehaw add collaborators

* I believe this fixes the error connor brought up

* when topic or synapse is no longer on a map, don't defer

* needs to be before?

* just do it in the controller

* make recommendation they sign in and retry

* better email

* config for mailer previews

* improve wording

* shouldn't have included that

* switch to green

* don't execute if there's no map

* wasn't including the right people in some circumstances

* Finish breaking out JS files (#551)

* metamaps.Realtime refactor

* Metamaps.Util

* Metamaps.Visualize

* Metamaps.SynapseCard

* Metamaps.TopicCard

* Metamaps.Create.js

* Remove erb extension from Metamaps.Map.js

* Metmaps.Account and Metamaps.GlobalUI remove extension

* Metamaps.JIT no more erb extension

* move Backbone.init; standard-format on Metamaps.js.erb

* factor out canvas support check function

* some llittle template bugs

* remove featured from signed in explore maps bar

* don't let it overflow off the page
2016-04-24 11:50:35 -04:00
Devin Howard
44ae6730a6 fix user search error 2016-04-21 00:30:11 -04:00
Devin Howard
837e4bde1b fix map forking (fix #540) 2016-04-20 09:00:45 +08:00
Connor Turland
7bb7f345f1 added an event for conversations starting (#547)
* added an event for conversations starting

* switch to post
2016-04-14 14:35:28 -04:00
Devin Howard
a2fe1399e4 fix invite link 2016-03-29 22:34:47 +08:00
Connor Turland
8fa856451d request invite page was broken 2016-03-27 12:04:28 -07:00
Devin Howard
ae9f4a51a2 fix a few embarassing errors - export is working 2016-03-26 15:53:14 +08:00
Devin Howard
d3649f1d26 DRY map exporting with policy_scoping 2016-03-26 12:46:43 +08:00
Devin Howard
14bdc8546b metacodes#show routes 2016-03-26 10:12:32 +08:00
Connor Turland
b36d5df6cb this may make it work 2016-03-24 23:33:26 -07:00
Connor Turland
c6f1e3cc4a breaking the mapping_policy 2016-03-24 23:29:08 -07:00
Connor Turland
415c9b8ac3 final touchups on oauth 2016-03-24 21:26:07 -07:00
Connor Turland
540b35c757 Merge branch 'feature/no-cancancan' into develop 2016-03-24 20:47:35 -07:00
Connor Turland
42eea78bc4 Merge branch 'fix/typo' into develop 2016-03-24 20:47:23 -07:00
Devin Howard
530a16cadb instantiate_resource 2016-03-25 10:26:32 +08:00
Devin Howard
34d3a80db1 use new pundit-enabled snorlax 2016-03-25 10:07:57 +08:00
Connor Turland
14dfe3c926 styling for doorkeeper and api functional 2016-03-24 17:16:27 -07:00
Connor Turland
c4890274f2 switch messages to use pundit 2016-03-23 16:29:26 -07:00
Connor Turland
1ee33b843f Merge branch 'develop' into feature/realtime.video 2016-03-14 21:40:25 +11:00
Connor Turland
8bd032472d topic related things weren't working at all 2016-03-14 21:36:34 +11:00
Connor Turland
604087c592 Merge branch 'develop' into feature/realtime.video 2016-03-14 10:45:16 +11:00
Connor Turland
11e57c1b37 rebase onto develop which now has API and pundit 2016-03-13 10:36:38 +11:00
Connor Turland
efe13dc7c0 Merge branch 'develop' into feature/api 2016-03-12 21:30:27 +11:00
Connor Turland
f58185fd40 Merge branch 'feature/pundit' into develop 2016-03-12 21:26:06 +11:00
Connor Turland
446619c451 omg not having this was breaking things 2016-03-12 13:20:15 +11:00
Connor Turland
8b8db40c67 Merge branch 'feature/pundit' into feature/api 2016-03-12 12:59:42 +11:00
Connor Turland
a295c61322 json response was broken 2016-03-12 12:58:13 +11:00
Connor Turland
e4ac5b0134 Merge branch 'feature/pundit' into feature/api 2016-03-12 12:40:11 +11:00
Connor Turland
bf4fbbeb06 fix tokens 2016-03-12 12:26:23 +11:00
Devin Howard
bb03b49d80 update main controller (searching) to use policies 2016-03-12 09:09:41 +08:00
Connor Turland
521aa6b5d0 function no longer exists 2016-03-12 11:58:26 +11:00
Connor Turland
a78312f90c Merge branch 'feature/pundit' into feature/api.pundit 2016-03-12 11:49:41 +11:00
Connor Turland
d0aecc0b31 pundit: make it work 2016-03-12 11:47:24 +11:00
Connor Turland
dc6ccd2022 pundit: fixing up topics and synapses 2016-03-12 11:47:05 +11:00
Connor Turland
1cf3182e75 pundit: exclude topic action 2016-03-12 11:46:52 +11:00
Connor Turland
5f3f5212c5 pundit: syntax error 2016-03-12 11:46:18 +11:00
Connor Turland
d8c328468e changess for pundit 2016-03-12 11:45:39 +11:00
Connor Turland
cb79f2deae pundit: make it work 2016-03-12 11:16:46 +11:00
Connor Turland
bef21341c6 pundit: fixing up topics and synapses 2016-03-12 11:10:30 +11:00
Connor Turland
09a7b336bf pundit: exclude topic action 2016-03-12 10:13:22 +11:00
Connor Turland
0095a8daf4 pundit: syntax error 2016-03-12 10:06:00 +11:00
Connor Turland
fc1a7fd23d api: adjust serializers 2016-03-12 10:05:42 +11:00
Connor Turland
450db5eb8d changes for pundit 2016-03-12 09:37:32 +11:00
Connor Turland
669b337d04 changes for api 2016-03-12 09:37:18 +11:00
Connor Turland
e6017c4129 Merge remote-tracking branch 'origin/feature/pundit' into feature/api.pundit 2016-03-12 07:19:19 +11:00
Devin Howard
eb56755068 implement five policies into their controllers 2016-03-11 22:10:31 +08:00
Devin Howard
7395811ba5 handle unauthorized with baaaaad 403 2016-03-11 21:35:48 +08:00
Connor Turland
ccfba03fdb clean up duplicate code 2016-03-11 17:26:54 +11:00
Connor Turland
059591b78b first pass at important API endpoints, token auth 2016-03-11 17:16:04 +11:00
Connor Turland
616dc9ed0e messages weren't being displayed in order 2016-03-01 12:55:00 +13:00
Connor Turland
c6fea78054 merge develop 2016-02-29 13:58:47 +13:00
Devin Howard
ef5d85c2bf before_filter => before_action 2016-02-28 17:48:35 +08:00
Devin Howard
36c5ddab1f before_filter => before_action 2016-02-28 17:48:18 +08:00
Devin Howard
895b872bda remove unneeded https stuff 2016-02-28 17:15:09 +08:00
Devin Howard
25774d9f16 remove unneeded https stuff 2016-02-28 16:57:25 +08:00
Devin Howard
cbb6b648be implement main_policy (headless). also remove all @current references 2016-02-28 16:53:59 +08:00
Devin Howard
bc7db85c8c update map index views 2016-02-28 13:14:34 +08:00
Devin Howard
8ef847bd6d factor maps#index into 4 separate functions 2016-02-28 12:30:41 +08:00
Devin Howard
66f1d2ec0b install pundit 2016-02-28 12:30:41 +08:00
Devin Howard
40cd1ebb5c modify metacodes to instead have two fields, and validate that only one is present. Manual icons can be entered through rake tasks or on the rails console or in db seed 2016-02-25 14:49:48 +08:00
Devin Howard
40a833b069 Merge pull request #473 from metamaps/feature/fix-invite-link
fix get_invite_link function. fixes #471
2016-02-21 15:22:34 +08:00
Devin Howard
e629a9bf71 fix get_invite_link function. fixes #471 2016-02-19 18:09:46 +08:00
Devin Howard
7b9c6459e3 allow embedding 2016-02-19 09:23:39 +08:00
Devin Howard
056ef2b5b6 smoother synapse creation with clicks/tabs 2016-02-14 15:19:35 +08:00
Devin Howard
6d0dcec1ba mess with metacode tests 2016-02-09 12:43:34 +08:00
Devin Howard
43bdda61de maps controller spec passes, 3 pending 2016-02-09 11:48:07 +08:00
Devin Howard
005250f330 typo 2016-02-09 11:26:42 +08:00
Devin Howard
0b98e446ca fiddle with maps_controller code style 2016-02-09 11:20:04 +08:00
Devin Howard
cc99ed001d fix mapping_controller_spec.rb 2016-02-08 11:19:38 +08:00
Devin Howard
987cd7f5a0 Merge branch 'feature/xls.export' into release/v2.8 2016-02-08 09:58:09 +08:00
Devin Howard
0ae8ea0ca5 implement csv/xls export 2016-02-07 13:12:18 +08:00
Devin Howard
8202fb38f3 Merge branch 'develop' into feature/realtime.video 2016-02-05 16:27:43 +08:00
Devin Howard
f2cbde50ca dos2unix on the whole repo 2016-02-05 11:43:15 +08:00
Connor Turland
4557b8e305 merge develop 2016-01-22 14:59:09 +13:00
Devin Howard
bf21dcc3e6 merge develop into rspec tests 2016-01-06 23:03:34 +08:00
Connor Turland
49dd2f2e92 merge develop 2015-12-22 13:16:03 -05:00
Devin Howard
c58b2c805e syntax error 2015-12-21 21:38:02 +08:00
Devin Howard
e2bf1d5eb1 try to make metamaps more tls friendly 2015-12-20 18:36:57 +08:00
Devin Howard
4dbff85443 default value if no request.env in application controller passes the rspec test woot. Only 80 more tests to implement 2015-12-16 22:36:12 +08:00
Devin Howard
ae1117338a set up devise authentication more srsly. Still doesn't pass the test though haha 2015-12-16 22:16:02 +08:00
Devin Howard
be3924aa54 setup bare minimum devise authentication in tests 2015-12-16 21:32:50 +08:00
Devin Howard
6148f55e1c handle nil unsafe_uri in app conttroller function 2015-12-16 21:05:18 +08:00