opener-scorer 1.0.5 → 1.0.6

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: f61699e7f1036243b7cea97ade48234da79f1c07
4
- data.tar.gz: c4a5dca327ffdf3920726b0b1d69a880b3678e67
3
+ metadata.gz: 0752e2269c6679ed3c4ef59a0197769bb03250e2
4
+ data.tar.gz: f83f448cab5ac90c88eb6ad613c749bc4384ae93
5
5
  SHA512:
6
- metadata.gz: 364d71d28225c2614461208377906797f25500e7b63422e476dfff7a12f87a760709ab1d9825db363c52b19e579dfe8bc86b8aadaf2412e037e74fb4b1124317
7
- data.tar.gz: 3ae832f907b428bb3512044730893a12472886591991f4dcbe221e64a925ab411fadfa0675f8ca88ed1f9ffc6972152e7bca034dc1aa58dbe77fa220611887c1
6
+ metadata.gz: 26c398c27005dd9961edf35c9e3a920a00ab7d86d38e44e8e72b1c7dfdce63d62d093980a86eaf59c0053d46148c908e914f759041298c7fae55f63c88018066
7
+ data.tar.gz: 714376110824f4c0309c004328866bb2b0ad8eb83b21e87a5c17b25d534acf17c6bf4747af1c11886d6a2020b8b53988dd79059a24bf088ca7f24ce6c7ba1def
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'opener/daemons'
4
+
5
+ exec_path = File.expand_path('../../exec/scorer.rb', __FILE__)
6
+
7
+ Opener::Daemons::Controller.new(
8
+ :name => 'scorer',
9
+ :exec_path => exec_path
10
+ )
@@ -24,8 +24,8 @@ else
24
24
  )
25
25
  end
26
26
 
27
+ 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);")
28
+
27
29
  if ActiveRecord::Base.connection.execute("SHOW INDEX FROM output_scores").nil?
28
30
  ActiveRecord::Base.connection.execute("CREATE INDEX uuid_index ON output_scores(uuid);")
29
31
  end
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);")
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'opener/daemons'
4
+ require_relative '../lib/opener/scorer'
5
+
6
+ options = Opener::Daemons::OptParser.parse!(ARGV)
7
+ daemon = Opener::Daemons::Daemon.new(Opener::Scorer, options)
8
+
9
+ daemon.start
@@ -1,5 +1,5 @@
1
1
  module Opener
2
2
  class Scorer
3
- VERSION = "1.0.5"
3
+ VERSION = "1.0.6"
4
4
  end
5
5
  end
@@ -15,7 +15,8 @@ Gem::Specification.new do |gem|
15
15
  'lib/**/*',
16
16
  'config.ru',
17
17
  '*.gemspec',
18
- 'README.md'
18
+ 'README.md',
19
+ 'exec/**/*'
19
20
  ]).select { |file| File.file?(file) }
20
21
 
21
22
  gem.executables = Dir.glob('bin/*').map { |file| File.basename(file) }
@@ -26,6 +27,8 @@ Gem::Specification.new do |gem|
26
27
  gem.add_dependency 'httpclient'
27
28
  gem.add_dependency 'uuidtools'
28
29
  gem.add_dependency 'puma'
30
+ gem.add_dependency 'opener-daemons'
31
+ gem.add_dependency 'opener-core', ['>= 0.1.2']
29
32
  gem.add_dependency 'jdbc-mysql'
30
33
  gem.add_dependency 'activerecord-jdbcmysql-adapter'
31
34
  gem.add_dependency 'activerecord', '~>3.2'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opener-scorer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - development@olery.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-21 00:00:00.000000000 Z
11
+ date: 2014-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder
@@ -94,6 +94,34 @@ dependencies:
94
94
  version: '0'
95
95
  prerelease: false
96
96
  type: :runtime
97
+ - !ruby/object:Gem::Dependency
98
+ name: opener-daemons
99
+ version_requirements: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ requirement: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - '>='
107
+ - !ruby/object:Gem::Version
108
+ version: '0'
109
+ prerelease: false
110
+ type: :runtime
111
+ - !ruby/object:Gem::Dependency
112
+ name: opener-core
113
+ version_requirements: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '>='
116
+ - !ruby/object:Gem::Version
117
+ version: 0.1.2
118
+ requirement: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - '>='
121
+ - !ruby/object:Gem::Version
122
+ version: 0.1.2
123
+ prerelease: false
124
+ type: :runtime
97
125
  - !ruby/object:Gem::Dependency
98
126
  name: jdbc-mysql
99
127
  version_requirements: !ruby/object:Gem::Requirement
@@ -209,23 +237,26 @@ dependencies:
209
237
  description: MySQL data storing for the web services output when using callbacks.
210
238
  email:
211
239
  executables:
212
- - scorer
213
240
  - scorer-server
241
+ - scorer-daemon
242
+ - scorer
214
243
  extensions: []
215
244
  extra_rdoc_files: []
216
245
  files:
217
- - README.md
218
- - bin/scorer
219
- - bin/scorer-server
220
- - config.ru
221
246
  - config/database.rb
222
247
  - lib/opener/scorer.rb
248
+ - lib/opener/scorer/version.rb
223
249
  - lib/opener/scorer/output.rb
224
- - lib/opener/scorer/output_processor.rb
225
250
  - lib/opener/scorer/server.rb
226
- - lib/opener/scorer/version.rb
251
+ - lib/opener/scorer/output_processor.rb
227
252
  - lib/opener/scorer/views/index.erb
253
+ - config.ru
228
254
  - opener-scorer.gemspec
255
+ - README.md
256
+ - exec/scorer.rb
257
+ - bin/scorer-server
258
+ - bin/scorer-daemon
259
+ - bin/scorer
229
260
  homepage: http://opener-project.github.com/
230
261
  licenses: []
231
262
  metadata: {}
@@ -245,8 +276,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
245
276
  version: '0'
246
277
  requirements: []
247
278
  rubyforge_project:
248
- rubygems_version: 2.2.2
279
+ rubygems_version: 2.1.9
249
280
  signing_key:
250
281
  specification_version: 4
251
282
  summary: MySQL data storing for the web services output when using callbacks.
252
283
  test_files: []
284
+ has_rdoc: yard