Skip to content

Commit

Permalink
removed uneeded google maps call
Browse files Browse the repository at this point in the history
  • Loading branch information
John Maguire authored and julianguyen committed Dec 2, 2018
1 parent f00892c commit d23949a
Show file tree
Hide file tree
Showing 20 changed files with 16 additions and 1,092 deletions.
5 changes: 0 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@ jobs:
root: tmp
paths:
- codeclimate.backend.json
- run:
name: Run Rails Jasmine Tests
command: |
set -e
RAILS_ENV=test bundle exec rake jasmine:ci
- run: bundle exec bundle-audit check --update
- store_test_results:
path: /tmp/circleci-test-results
Expand Down
1 change: 0 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ env:
amd: true
browser: true
es6: true
jquery: true
node: true

# http://eslint.org/docs/rules/
Expand Down
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,13 @@ group :development, :test do
gem 'capybara', '~> 3.12.0'
gem 'chromedriver-helper'
gem 'factory_bot_rails'
gem 'jasmine', '~> 2.7.0'
gem 'rspec-collection_matchers', '~> 1.1.3'
gem 'rspec-html-matchers', '~> 0.9.0'
gem 'rspec-rails', '~> 3.8.1'

gem 'letter_opener'
gem 'rspec_junit_formatter'

gem 'jshint'
gem 'rubocop', '>= 0.49.0'
gem 'rubocop-rspec'

Expand Down
18 changes: 0 additions & 18 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -167,23 +167,13 @@ GEM
nokogiri (>= 1.6)
io-like (0.3.0)
jaro_winkler (1.5.1)
jasmine (2.7.0)
jasmine-core (>= 2.7.0, < 3.0.0)
phantomjs
rack (>= 1.2.1)
rake
jasmine-core (2.99.2)
jbuilder (2.8.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
jquery-rails (4.1.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jshint (1.5.0)
execjs (>= 1.4.0)
multi_json (~> 1.0)
therubyracer (~> 0.12.1)
json (2.1.0)
jwt (1.5.6)
kaminari (1.1.1)
Expand All @@ -202,7 +192,6 @@ GEM
addressable (~> 2.3)
letter_opener (1.6.0)
launchy (~> 2.2)
libv8 (3.16.14.19)
loofah (2.2.3)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
Expand Down Expand Up @@ -250,7 +239,6 @@ GEM
parser (2.5.3.0)
ast (~> 2.4.0)
pg (1.1.3)
phantomjs (2.1.1.0)
powerpack (0.1.2)
pry (0.12.0)
coderay (~> 1.1.0)
Expand Down Expand Up @@ -331,7 +319,6 @@ GEM
redis (4.0.2)
redis-namespace (1.6.0)
redis (>= 3.0.4)
ref (2.0.0)
regexp_parser (1.3.0)
representable (3.0.4)
declarative (< 0.1.0)
Expand Down Expand Up @@ -443,9 +430,6 @@ GEM
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
therubyracer (0.12.3)
libv8 (~> 3.16.14.15)
ref
thor (0.19.4)
thread_safe (0.3.6)
tilt (2.0.8)
Expand Down Expand Up @@ -504,10 +488,8 @@ DEPENDENCIES
google-api-client (~> 0.25.0)
groupdate (= 4.1.0)
inline_svg
jasmine (~> 2.7.0)
jbuilder (~> 2.8.0)
jquery-rails (= 4.1.1)
jshint
kaminari (= 1.1.1)
letter_opener
omniauth (~> 1.8.1)
Expand Down
1 change: 0 additions & 1 deletion app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require load_page.js
//= require jquery
//= require jquery_ujs
//= require turbolinks
Expand Down
3 changes: 0 additions & 3 deletions app/assets/javascripts/load_page.js

This file was deleted.

8 changes: 7 additions & 1 deletion app/views/devise/registrations/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
<%= f.text_field :name, 'aria-label': t('common.name') %>

<div class="label smallMarginTop"><%= t('common.form.location') %></div>
<%= react_component 'Input', props: { type: 'location', placeholder: t('devise.registrations.edit.placeholders.optional'), googleAPIKey: ENV['GOOGLE_API_KEY'], id: 'user_input'} %>
<%= react_component 'Input', props: {
type: 'location',
placeholder: t('devise.registrations.edit.placeholders.optional'),
googleAPIKey: ENV['GOOGLE_API_KEY'],
id: 'user_input',
value: current_user.location || nil
} %>

<div class="label smallMarginTop">
<%= t('common.form.email') %>
Expand Down
4 changes: 3 additions & 1 deletion app/views/devise/registrations/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
<div class="label smallMarginTop"><%= t('devise.registrations.new.label') %></div>
<%= react_component 'Input', props: { type: 'location', placeholder: t('common.form.location'), googleAPIKey: ENV['GOOGLE_API_KEY'], id: 'user_input'} %>

<%= f.email_field :email, placeholder: t('common.form.email'), 'aria-label': t('common.form.email') %>
<div class="smallMarginTop">
<%= f.email_field :email, placeholder: t('common.form.email'), 'aria-label': t('common.form.email') %>
</div>

<div class="label smallMarginTop"><%= t('devise.password') %></div>
<%= f.password_field :password, autocomplete: 'off', class: 'smallMarginBottom', placeholder: t('devise.password'), 'aria-label': t('devise.password') %>
Expand Down
6 changes: 0 additions & 6 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@
<%= javascript_include_tag pusher_url, async: true %>
<%= tag :meta, name: 'pusher-key', content: ENV['PUSHER_KEY'] %>
<% end %>
<% if join_path? || update_account_path? %>
<!-- Google Maps API -->
<% google_maps_url = "https://maps.googleapis.com/maps/api/js?key=#{ENV['GOOGLE_API_KEY']}&libraries=places" %>
<script type='text/javascript' src=<%= google_maps_url %>></script>
<% end %>
</head>

<body>
Expand Down
3 changes: 2 additions & 1 deletion client/app/components/Input/InputLocation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export type Props = {
placeholder: string,
apiKey: string,
id: string,
value?: any,
};

export type State = {
Expand All @@ -16,7 +17,7 @@ export type State = {
export class InputLocation extends React.Component<Props, State> {
constructor(props: Props) {
super(props);
this.state = { address: '' };
this.state = { address: props.value || '' };
}

handleChange = (event: SyntheticInputEvent<HTMLInputElement>) => {
Expand Down
3 changes: 2 additions & 1 deletion client/app/components/Input/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,12 @@ export class Input extends React.Component<Props, State> {

displayLocation = () => {
const {
type, placeholder, googleAPIKey, id,
type, placeholder, googleAPIKey, id, value,
} = this.props;
if (type === 'location' && placeholder && googleAPIKey) {
return (
<InputLocation
value={value}
placeholder={placeholder}
apiKey={googleAPIKey}
id={id}
Expand Down
4 changes: 1 addition & 3 deletions client/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9030,7 +9030,6 @@ react-transition-group@^2.0.0:
prop-types "^15.6.2"
react-lifecycles-compat "^3.0.4"

<<<<<<< HEAD
react-treebeard@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/react-treebeard/-/react-treebeard-3.1.0.tgz#e380b9e75f900e538044280ac365d29092583642"
Expand All @@ -9043,7 +9042,7 @@ react-treebeard@^3.1.0:
prop-types "^15.6.2"
shallowequal "^1.1.0"
velocity-react "^1.4.1"
=======

react@^15.5.4:
version "15.6.2"
resolved "https://registry.yarnpkg.com/react/-/react-15.6.2.tgz#dba0434ab439cfe82f108f0f511663908179aa72"
Expand All @@ -9054,7 +9053,6 @@ react@^15.5.4:
loose-envify "^1.1.0"
object-assign "^4.1.0"
prop-types "^15.5.10"
>>>>>>> moved to using react component for input autocomplete

react@^16.4.0:
version "16.5.2"
Expand Down
21 changes: 0 additions & 21 deletions config/jshint.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true

RSpec.feature 'Persisting browser locale after sign in', type: :feature do
feature 'Persisting browser locale after sign in', type: :feature do
scenario 'When user sign in, sign out, then change local', js: true, header: true do
user = create :user

Expand Down
27 changes: 0 additions & 27 deletions spec/javascripts/GetLocationSpec.js

This file was deleted.

1 change: 0 additions & 1 deletion spec/javascripts/fixtures/get_location.html

This file was deleted.

Loading

0 comments on commit d23949a

Please sign in to comment.