From 619cb490a8f61e341b69cfd93e953a0d181cedfc Mon Sep 17 00:00:00 2001 From: Ajey Gore Date: Sat, 25 Aug 2018 05:53:45 +0800 Subject: [PATCH] [ajey] upgraded mysql version, and removed static factory attributes --- Gemfile | 2 +- Gemfile.lock | 6 +++--- spec/factories/access_tokens.rb | 2 +- spec/factories/api_resources.rb | 4 ++-- spec/factories/group_associations.rb | 4 ++-- spec/factories/host_access_groups.rb | 4 ++-- spec/factories/host_machine_groups.rb | 4 ++-- spec/factories/ip_addresses.rb | 4 ++-- spec/factories/organisations.rb | 16 ++++++++-------- spec/factories/user_host_access_groups.rb | 4 ++-- spec/factories/users.rb | 12 ++++++------ 11 files changed, 31 insertions(+), 31 deletions(-) diff --git a/Gemfile b/Gemfile index e97e3a09..ffebe126 100755 --- a/Gemfile +++ b/Gemfile @@ -8,7 +8,7 @@ gem 'figaro' gem 'font-awesome-rails' gem 'jbuilder' gem 'jquery-rails' -gem 'mysql2', '~> 0.3.18', platform: :ruby +gem 'mysql2', '~> 0.4.10' gem 'newrelic_rpm' gem 'omniauth' gem 'omniauth-google-oauth2' diff --git a/Gemfile.lock b/Gemfile.lock index 36303d90..c08de1f8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -140,7 +140,7 @@ GEM multi_json (1.13.1) multi_xml (0.6.0) multipart-post (2.0.0) - mysql2 (0.3.21) + mysql2 (0.4.10) newrelic_rpm (5.3.0.346) nokogiri (1.8.4) mini_portile2 (~> 2.3.0) @@ -346,7 +346,7 @@ DEPENDENCIES jbuilder jquery-rails mock_redis - mysql2 (~> 0.3.18) + mysql2 (~> 0.4.10) newrelic_rpm omniauth omniauth-google-oauth2 @@ -376,4 +376,4 @@ DEPENDENCIES whenever BUNDLED WITH - 1.16.2 + 1.16.4 diff --git a/spec/factories/access_tokens.rb b/spec/factories/access_tokens.rb index 60a78e87..0102f4c0 100644 --- a/spec/factories/access_tokens.rb +++ b/spec/factories/access_tokens.rb @@ -1,5 +1,5 @@ FactoryBot.define do factory :access_token do - token SecureRandom.uuid + token { SecureRandom.uuid } end end diff --git a/spec/factories/api_resources.rb b/spec/factories/api_resources.rb index 7b04b3ca..bb769bb0 100755 --- a/spec/factories/api_resources.rb +++ b/spec/factories/api_resources.rb @@ -1,7 +1,7 @@ FactoryBot.define do factory :api_resource do sequence(:name, 1000) { |n| "API#{n}" } - description "MyString" - access_key "MyString" + description { "MyString" } + access_key { "MyString" } end end diff --git a/spec/factories/group_associations.rb b/spec/factories/group_associations.rb index 9a891fb2..fe8a6356 100644 --- a/spec/factories/group_associations.rb +++ b/spec/factories/group_associations.rb @@ -1,6 +1,6 @@ FactoryBot.define do factory :group_association do - user "" - group "" + user { "" } + group { "" } end end diff --git a/spec/factories/host_access_groups.rb b/spec/factories/host_access_groups.rb index 91163ef7..299186b7 100644 --- a/spec/factories/host_access_groups.rb +++ b/spec/factories/host_access_groups.rb @@ -1,6 +1,6 @@ FactoryBot.define do factory :host_access_group do - references "" - references "" + references { "" } + references { "" } end end diff --git a/spec/factories/host_machine_groups.rb b/spec/factories/host_machine_groups.rb index 6464c2bb..807d6f09 100644 --- a/spec/factories/host_machine_groups.rb +++ b/spec/factories/host_machine_groups.rb @@ -1,6 +1,6 @@ FactoryBot.define do factory :host_machine_group do - user nil - host_machine nil + user { nil } + host_machine { nil } end end diff --git a/spec/factories/ip_addresses.rb b/spec/factories/ip_addresses.rb index 15ce1c42..6e0285da 100755 --- a/spec/factories/ip_addresses.rb +++ b/spec/factories/ip_addresses.rb @@ -1,6 +1,6 @@ FactoryBot.define do factory :ip_address do - address "MyString" - mac_address "MyString" + address { "MyString" } + mac_address { "MyString" } end end diff --git a/spec/factories/organisations.rb b/spec/factories/organisations.rb index 2ed010ce..ad5de926 100644 --- a/spec/factories/organisations.rb +++ b/spec/factories/organisations.rb @@ -2,13 +2,13 @@ country = Country.find_country_by_name(Country.all.map(&:name).sort.sample) factory :organisation do sequence(:slug) { |n| "#{Faker::Internet.slug}_#{n}" } - name Faker::Lorem.word - website Faker::Internet.url - domain Faker::Internet.email.split('@').last - country country.gec - state Faker::Address.state - address Faker::Lorem.words(3).join(' ') - unit_name 'IT' - admin_email_address Faker::Internet.email + name { Faker::Lorem.word } + website { Faker::Internet.url } + domain { Faker::Internet.email.split('@').last } + country { country.gec } + state { Faker::Address.state } + address { Faker::Lorem.words(3).join(' ') } + unit_name { 'IT' } + admin_email_address { Faker::Internet.email } end end diff --git a/spec/factories/user_host_access_groups.rb b/spec/factories/user_host_access_groups.rb index 398d9b5e..d7979ea6 100644 --- a/spec/factories/user_host_access_groups.rb +++ b/spec/factories/user_host_access_groups.rb @@ -1,6 +1,6 @@ FactoryBot.define do factory :user_host_access_group do - user nil - host_access_group nil + user { nil } + host_access_group { nil } end end diff --git a/spec/factories/users.rb b/spec/factories/users.rb index 75f599dd..de35f9a8 100644 --- a/spec/factories/users.rb +++ b/spec/factories/users.rb @@ -8,8 +8,8 @@ factory :user do name email - active true - admin true + active { true } + admin { true } sequence(:reset_password_token) { |n| "secret#{n}" } after(:create) do |user, _evaluator| user.assign_attributes( @@ -23,8 +23,8 @@ factory :group_admin, class: User do name email - active true - admin true + active { true } + admin { true } sequence(:reset_password_token) { |n| "secret#{n}" } after(:create) do |user, _evaluator| user.assign_attributes( @@ -38,8 +38,8 @@ factory :admin_user, class: User do name email - active true - admin true + active { true } + admin { true } sequence(:reset_password_token) { |n| "secret#{n}" } after(:create) do |user, _evaluator| user.assign_attributes(