Compare commits

..

6 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 ()
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 () 2018-03-10 08:10:09 -08:00
Devin Howard
955ebdd747
Change log level of Metamaps.Debug ()
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
20 changed files with 30 additions and 31 deletions

View file

@ -38,7 +38,7 @@ gem 'uglifier'
group :test do
gem 'brakeman', require: false
gem 'factory_girl_rails'
gem 'factory_bot_rails'
gem 'json-schema'
gem 'rspec-rails'
gem 'shoulda-matchers'

View file

@ -105,10 +105,10 @@ GEM
actionmailer (>= 4.0, < 6)
activesupport (>= 4.0, < 6)
execjs (2.7.0)
factory_girl (4.8.0)
factory_bot (4.8.2)
activesupport (>= 3.0.0)
factory_girl_rails (4.8.0)
factory_girl (~> 4.8.0)
factory_bot_rails (4.8.2)
factory_bot (~> 4.8.2)
railties (>= 3.0.0)
faker (1.8.4)
i18n (~> 0.5)
@ -311,7 +311,7 @@ DEPENDENCIES
doorkeeper
dotenv-rails
exception_notification
factory_girl_rails
factory_bot_rails
faker
httparty
jquery-rails

Binary file not shown.

View file

@ -42,7 +42,7 @@ class UsersController < ApplicationController
correct_pass = @user.valid_password?(params[:current_password])
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.save
sign_in(@user, bypass: true)

View file

@ -17,6 +17,5 @@
<%= render :partial => 'layouts/templates' %>
<%= render :partial => 'shared/metacodeCssColors' %>
<%= render :partial => 'layouts/googleanalytics' if ENV["GA_TRACKING_CODE"].present? %>
<a href="https://plus.google.com/110591816803782637658" rel="publisher"></a>
</body>
</html>

View file

@ -1,5 +1,5 @@
# frozen_string_literal: true
METAMAPS_VERSION = '3.5'
METAMAPS_BUILD = `git log HEAD~1 -1 --pretty=%H`.chomp[0..11].freeze
METAMAPS_LAST_UPDATED = `git log HEAD~1 -1 --pretty='%ad'`.split(' ').values_at(1, 2, 4).join(' ').freeze
METAMAPS_VERSION = '3..6.1'
METAMAPS_BUILD = `git log -1 --pretty=%H`.chomp[0..11].freeze
METAMAPS_LAST_UPDATED = `git log -1 --pretty='%ad'`.split(' ').values_at(1, 2, 4).join(' ').freeze

View file

@ -26,13 +26,13 @@ At the time of writing, there are four directories in the spec folder. One,
`support`, is for helper functions. `rails_helper.rb` and `spec_helper.rb` are
also for helper functions.
`factories` is for a gem called [factory-girl][factory-girl]. This gem lets you
`factories` is for a gem called [factory-bot][factory_bot]. This gem lets you
use the `create` and `build` functions to quickly create the simplest possible
valid version of a given model. For instance:
let(:map1) { create :map }
let(:ronald) { create :user, name: "Ronald" }
let(:map2) { create :map, user: ronald }
let(:alex) { create :user, name: "Alex" }
let(:map2) { create :map, user: alex }
As you can see, you can also customize the factories. You can read the full
documentation at the link above or check the existing specs to see how it works.
@ -53,5 +53,5 @@ the added code works. This will help in a few ways:
Happy testing!
[factory-girl]: https://github.com/thoughtbot/factory_girl
[factory-bot]: https://github.com/thoughtbot/factory_bot
[rspec-docs]: http://rspec.info

View file

@ -1,9 +1,9 @@
const Debug = function(arg = window.Metamaps) {
if (arg === undefined && typeof window !== 'undefined') arg = window.Metamaps
console.debug(arg)
console.debug(`Metamaps Version: ${arg.ServerData.VERSION}`)
console.debug(`Build: ${arg.ServerData.BUILD}`)
console.debug(`Last Updated: ${arg.ServerData.LAST_UPDATED}`)
console.log(arg)
console.log(`Metamaps Version: ${arg.ServerData.VERSION}`)
console.log(`Build: ${arg.ServerData.BUILD}`)
console.log(`Last Updated: ${arg.ServerData.LAST_UPDATED}`)
}
export default Debug

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
FactoryGirl.define do
FactoryBot.define do
factory :access_request do
map
user

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
FactoryGirl.define do
FactoryBot.define do
factory :mapping do
xloc 0
yloc 0

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
FactoryGirl.define do
FactoryBot.define do
factory :map do
sequence(:name) { |n| "Cool Map ##{n}" }
permission :commons

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
FactoryGirl.define do
FactoryBot.define do
factory :message do
association :resource, factory: :map
user

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
FactoryGirl.define do
FactoryBot.define do
factory :metacode do
sequence(:name) { |n| "Cool Metacode ##{n}" }
manual_icon 'https://images.com/image.png'

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
FactoryGirl.define do
FactoryBot.define do
factory :star do
end
end

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
FactoryGirl.define do
FactoryBot.define do
factory :synapse do
sequence(:desc) { |n| "Cool synapse ##{n}" }
category :'from-to'

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
FactoryGirl.define do
FactoryBot.define do
factory :token do
user
description ''

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
FactoryGirl.define do
FactoryBot.define do
factory :topic do
user
association :updated_by, factory: :user

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
FactoryGirl.define do
FactoryBot.define do
factory :user_map do
map
user

View file

@ -10,7 +10,7 @@
# have actual codes, you'll need to specify one simple_user and then you
# can specify other :code_user users based on the pre-existing user's code.
FactoryGirl.define do
FactoryBot.define do
factory :code_user, class: User do
sequence(:name) { |n| "Cool User ##{n}" }
sequence(:email) { |n| "cooluser#{n}@cooldomain.com" }

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
# lets you type create(:user) instead of FactoryGirl.create(:user)
# lets you type create(:user) instead of FactoryBot.create(:user)
RSpec.configure do |config|
config.include FactoryGirl::Syntax::Methods
config.include FactoryBot::Syntax::Methods
end