Module: Profilepic

Defined in:
lib/profilepic.rb,
lib/profilepic/version.rb

Constant Summary collapse

MAJOR =
0
MINOR =
1
PATCH =
5
VERSION =
[MAJOR,MINOR,PATCH].join('.')

Class Method Summary collapse

Class Method Details



13
14
15
# File 'lib/profilepic/version.rb', line 13

def self.banner
  "profilepic/#{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}] in (#{root})"
end

.mainObject



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/profilepic.rb', line 23

def self.main
   puts 'hello from main'

#####
# fix/todo:
##   use differnt port ??
##
##  use --local  for host e.g. 127.0.0.1  insteaod of 0.0.0.0 ???

 #   puts 'before Puma.run app'
 #   require 'rack/handler/puma'
 #   Rack::Handler::Puma.run ProfilepicService, :Port => 3000, :Host => '0.0.0.0'
 #   puts 'after Puma.run app'

 # use webrick for now - why? why not?
   puts 'before WEBrick.run service'
   Rack::Handler::WEBrick.run ProfilepicService, :Port => 3000, :Host => '127.0.0.1'
   puts 'after WEBrick.run service'

  puts 'bye'
end

.rootObject



17
18
19
# File 'lib/profilepic/version.rb', line 17

def self.root
  File.expand_path( File.dirname(File.dirname(File.dirname(__FILE__))) )
end

.versionObject



9
10
11
# File 'lib/profilepic/version.rb', line 9

def self.version
  VERSION
end