Skip to content

Commit

Permalink
use ruby 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
grosser committed Jan 1, 2017
1 parent 95f8958 commit 9ce7582
Show file tree
Hide file tree
Showing 27 changed files with 38 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.1
2.4.0
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ group :preload do
# AR extensions
gem 'goldiloader'
gem 'kaminari', '~> 0.17.0'
gem 'active_model_serializers'
gem 'active_model_serializers', git: 'https://github.com/rails-api/active_model_serializers.git' # need >0.10.3
gem 'paper_trail'
gem 'soft_deletion'
gem 'doorkeeper'
Expand Down
49 changes: 29 additions & 20 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
GIT
remote: https://github.com/rails-api/active_model_serializers.git
revision: ec045a5388a983f45a53726b5f9dd4b3ddbf0abd
specs:
active_model_serializers (0.10.3)
actionpack (>= 4.1, < 6)
activemodel (>= 4.1, < 6)
case_transform (>= 0.2)
jsonapi (= 0.1.1.beta6)

PATH
remote: plugins/airbrake
specs:
Expand Down Expand Up @@ -118,11 +128,6 @@ GEM
rails-html-sanitizer (~> 1.0, >= 1.0.2)
active_hash (1.4.1)
activesupport (>= 2.2.2)
active_model_serializers (0.10.1)
actionpack (>= 4.1, < 6)
activemodel (>= 4.1, < 6)
jsonapi (~> 0.1.1.beta2)
railties (>= 4.1, < 6)
activejob (5.0.1)
activesupport (= 5.0.1)
globalid (>= 0.3.6)
Expand Down Expand Up @@ -169,10 +174,12 @@ GEM
brakeman (3.4.1)
builder (3.2.2)
byebug (8.2.2)
case_transform (0.2)
activesupport
cmd2json (0.2.0)
json
coderay (1.1.1)
concurrent-ruby (1.0.3)
concurrent-ruby (1.0.4)
connection_pool (2.2.0)
crack (0.4.3)
safe_yaml (~> 1.0.0)
Expand Down Expand Up @@ -212,7 +219,7 @@ GEM
goldiloader (0.0.10)
activerecord (>= 3.2, < 5.1)
activesupport (>= 3.2, < 5.1)
hashdiff (0.3.0)
hashdiff (0.3.2)
hashie (3.4.4)
http (0.9.8)
addressable (~> 2.3)
Expand All @@ -223,8 +230,7 @@ GEM
domain_name (~> 0.5)
http-form_data (1.0.1)
http_parser.rb (0.6.0)
httparty (0.13.7)
json (~> 1.8)
httparty (0.14.0)
multi_xml (>= 0.5.2)
i18n (0.7.0)
inflection (1.0.0)
Expand All @@ -236,10 +242,13 @@ GEM
thor (>= 0.16.0)
jmespath (1.2.4)
json_pure (>= 1.8.1)
json (1.8.3)
json (2.0.2)
json_pure (1.8.3)
jsonapi (0.1.1.beta2)
json (~> 1.8)
jsonapi (0.1.1.beta6)
jsonapi-parser (= 0.1.1.beta3)
jsonapi-renderer (= 0.1.1.beta1)
jsonapi-parser (0.1.1.beta3)
jsonapi-renderer (0.1.1.beta1)
jwt (1.5.1)
kaminari (0.17.0)
actionpack (>= 3.0.0)
Expand Down Expand Up @@ -271,13 +280,13 @@ GEM
mocha (1.2.1)
metaclass (~> 0.0.1)
multi_json (1.12.0)
multi_xml (0.5.5)
multi_xml (0.6.0)
multipart-post (2.0.0)
mysql2 (0.4.4)
net-http-persistent (2.9.4)
net-ldap (0.14.0)
netrc (0.11.0)
newrelic_rpm (3.15.2.317)
newrelic_rpm (3.17.2.327)
ngannotate-rails (1.2.1)
execjs
rails (>= 3.1)
Expand Down Expand Up @@ -403,9 +412,9 @@ GEM
actionpack (~> 5.x)
actionview (~> 5.x)
activesupport (~> 5.x)
rails-dom-testing (2.0.1)
rails-dom-testing (2.0.2)
activesupport (>= 4.2.0, < 6.0)
nokogiri (~> 1.6.0)
nokogiri (~> 1.6)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (5.0.1)
Expand Down Expand Up @@ -477,7 +486,7 @@ GEM
vault (0.7.1)
warden (1.2.6)
rack (>= 1.0)
webmock (2.1.0)
webmock (2.3.1)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
Expand All @@ -497,7 +506,7 @@ PLATFORMS

DEPENDENCIES
active_hash
active_model_serializers
active_model_serializers!
airbrake (~> 4.3.6)
angular-rails-templates
ansible
Expand Down Expand Up @@ -606,7 +615,7 @@ DEPENDENCIES
webmock

RUBY VERSION
ruby 2.3.1p112
ruby 2.4.0p0

BUNDLED WITH
1.13.6
1.13.7
2 changes: 1 addition & 1 deletion app/models/concerns/attr_encrypted_support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require 'attr_encrypted'

module AttrEncryptedSupport
ENCRYPTION_KEY = Rails.application.secrets.secret_key_base
ENCRYPTION_KEY = Rails.application.secrets.secret_key_base[0...32]
ENCRYPTION_KEY_SHA = Digest::SHA2.hexdigest(Rails.application.secrets.secret_key_base)

def self.included(base)
Expand Down
9 changes: 6 additions & 3 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ class User < ActiveRecord::Base
validates :external_id, presence: :true, unless: :integration?

scope :search, ->(query) {
return self if query.blank?
query = ActiveRecord::Base.send(:sanitize_sql_like, query)
where("name LIKE ? OR email LIKE ?", "%#{query}%", "%#{query}%")
if query.blank?
self
else
query = ActiveRecord::Base.send(:sanitize_sql_like, query)
where("name LIKE ? OR email LIKE ?", "%#{query}%", "%#{query}%")
end
}
scope :with_role, -> (role_id, project_id) {
joins("LEFT OUTER JOIN user_project_roles ON users.id = user_project_roles.user_id AND user_project_roles.project_id = #{project_id.to_i}"). # rubocop:disable Metrics/LineLength
Expand Down
Binary file removed vendor/cache/active_model_serializers-0.10.1.gem
Binary file not shown.
Binary file added vendor/cache/case_transform-0.2.gem
Binary file not shown.
Binary file removed vendor/cache/concurrent-ruby-1.0.3.gem
Binary file not shown.
Binary file added vendor/cache/concurrent-ruby-1.0.4.gem
Binary file not shown.
Binary file removed vendor/cache/hashdiff-0.3.0.gem
Binary file not shown.
Binary file added vendor/cache/hashdiff-0.3.2.gem
Binary file not shown.
Binary file removed vendor/cache/httparty-0.13.7.gem
Binary file not shown.
Binary file added vendor/cache/httparty-0.14.0.gem
Binary file not shown.
Binary file removed vendor/cache/json-1.8.3.gem
Binary file not shown.
Binary file added vendor/cache/json-2.0.2.gem
Binary file not shown.
Binary file removed vendor/cache/jsonapi-0.1.1.beta2.gem
Binary file not shown.
Binary file added vendor/cache/jsonapi-0.1.1.beta6.gem
Binary file not shown.
Binary file added vendor/cache/jsonapi-parser-0.1.1.beta3.gem
Binary file not shown.
Binary file added vendor/cache/jsonapi-renderer-0.1.1.beta1.gem
Binary file not shown.
Binary file removed vendor/cache/multi_xml-0.5.5.gem
Binary file not shown.
Binary file added vendor/cache/multi_xml-0.6.0.gem
Binary file not shown.
Binary file removed vendor/cache/newrelic_rpm-3.15.2.317.gem
Binary file not shown.
Binary file added vendor/cache/newrelic_rpm-3.17.2.327.gem
Binary file not shown.
Binary file removed vendor/cache/rails-dom-testing-2.0.1.gem
Binary file not shown.
Binary file added vendor/cache/rails-dom-testing-2.0.2.gem
Binary file not shown.
Binary file removed vendor/cache/webmock-2.1.0.gem
Binary file not shown.
Binary file added vendor/cache/webmock-2.3.1.gem
Binary file not shown.

0 comments on commit 9ce7582

Please sign in to comment.