opener-scorer 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c523b9bdb95d9bade67318bd9bbbf323a72dffc3
4
- data.tar.gz: 440ece97c32c502539fbc253144159a9da2e5876
3
+ metadata.gz: 5847623ff1e420084cafc853ee471ba7ca3cdbba
4
+ data.tar.gz: 4f02f6dc97967c621f629f72d14aa6b85e05724e
5
5
  SHA512:
6
- metadata.gz: 88d6f4fe28d608d0e5beec296603284a5f84831b6e9d4b0233e3ddc6ebcc62d5e6d5854c1531f0cd180e5553fbda0483925e25463d15459dde54575c71def83a
7
- data.tar.gz: cb0ccd806e33cabf1ca017cf1d59552c2ad9b74d46681588cd1ad06ec944927b1bf4624b134d62cb88c0eab03134562dff5ad72bb97b84755eed9444410754e0
6
+ metadata.gz: 13be740678aaed976690a837223997b6db91fa38a48827c6c005f644ca93fa0970c7a199099db2fd0745ebcbcfdc8fa8a4c237b7e0abaae9623798e360098f0a
7
+ data.tar.gz: b926359ed64e45209ffd422fc4aeab4964d042b21c4744096bcba5a823a77f2c551887e120a15537665d4f2f37c3e7afbf5138a693d04a74ebf88d6400f182d3
data/config/database.rb CHANGED
@@ -1,30 +1,31 @@
1
1
  require 'active_record'
2
2
  require 'activerecord-jdbcmysql-adapter'
3
3
 
4
-
5
- DB_PASS = ENV["DB_PASS"]
6
- DB_NAME = ENV["DB_NAME"]
7
- DB_USER = ENV["DB_USER"]
4
+ db_pass = ENV["DB_PASS"]
5
+ db_name = ENV["DB_NAME"]
6
+ db_user = ENV["DB_USER"]
7
+ db_host = ENV["DB_HOST"]
8
8
 
9
9
  if ENV["RACK_ENV"] == 'production'
10
10
  ActiveRecord::Base.establish_connection(
11
- :adapter=> 'mysql2',
12
- :host => "opener-olery.cqlc6ghud3pa.eu-west-1.rds.amazonaws.com",
13
- :username => "enouch",
14
- :password => DB_PASS,
15
- :database => "opener-olery",
11
+ adapter: 'mysql2',
12
+ database: db_name,
13
+ host: db_host,
14
+ username: db_user,
15
+ password: db_pass
16
16
  )
17
17
  else
18
18
  ActiveRecord::Base.establish_connection(
19
19
  adapter: 'mysql2',
20
- host: 'localhost',
20
+ host: db_host || 'localhost',
21
21
  username: 'root',
22
- password: DB_PASS || '',
23
- database: DB_NAME || 'opener_development'
22
+ password: db_pass || '',
23
+ database: db_name || 'opener_development'
24
24
  )
25
25
  end
26
26
 
27
27
  if ActiveRecord::Base.connection.execute("SHOW INDEX FROM output_scores").nil?
28
28
  ActiveRecord::Base.connection.execute("CREATE INDEX uuid_index ON output_scores(uuid);")
29
29
  end
30
+
30
31
  ActiveRecord::Base.connection.execute("CREATE TABLE IF NOT EXISTS output_scores (uuid varchar(40), raw_text longtext, bathroom double,breakfast double,cleanliness double,facilities double,internet double,location double,noise double,parking double,restaurant double,room double,sleeping_comfort double,staff double,swimming_pool double,value_for_money double, overall double);")
@@ -1,5 +1,5 @@
1
1
  module Opener
2
2
  class Scorer
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opener-scorer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - development@olery.com