super-app 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +8 -8
  2. data/lib/base.rb +6 -0
  3. metadata +4 -5
  4. data/bin/main.rb +0 -65
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MjFlZWY4ZTVkNGZkMTcyYmMxOTUwZDU4M2U4MWI3OTBmNjMzMDY4MQ==
4
+ MTZjMmFhZGE4NmYzODZlOGZjMzRmZDFmY2M5NWVhY2YyYTRjMTMyMQ==
5
5
  data.tar.gz: !binary |-
6
- NmUyNjBhNDFjMTQwN2NjYWQ0OGY3MTE5MTFhMzVmYjY5N2U5MTY3MA==
6
+ MGJiMmMwZjBkZDk5OTMzYzU5MDAwNTQ2NjM5MjUzYjViYjA4NDUzNw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MzczMjFmNzljYzZiYTU4MTM4MzM4MTgxNDk3NWYwZjk1MmE4NjFiY2Q1NjIx
10
- MWM1YWQzYzhiNzYyNzkzMjQ1MmY0NmM5OGE3OTYxZjY4MjlmOTE3YjRhOWRj
11
- YzExOTdkZjgzZjUyMzQ3OGEzYWIyMGMwZTE3ZDQyOGM4Yzk4MmE=
9
+ MDg0ZmQ4MTkyMTAxM2RmOWJlNTYyOTViNDJkZGRmNDA1ZjQ1Njg5Y2I4NWU1
10
+ ZmIwY2QwYzQwZjAxM2I1ZWQwNjU3MTMwMjMzNWEwOTI0MDBiZWRmYWQ0MWQy
11
+ ZTU5Y2IyNDgzYTgyYTgzMjMxNjhkODM3YjU2M2E2NzY2OGE0Zjg=
12
12
  data.tar.gz: !binary |-
13
- ODA3ODI1YTAzYzBhNTc4MzA4ODNhN2M1NmE3MWQ4NTNmMTE2YjI5OTU3MDc2
14
- OGE4OTlhMTQzNThlZDhlMDMxNTMzM2JhZDQ2MmRjMTNjODY2YWRjNzYzNTE0
15
- YmI0NDg4ZTA1MTM4MTNkYTJkMmMzYzk0YTI1ZGE2NjAzMDkyMjE=
13
+ NzVhNzM5NDI2Yjk0Y2MxNDQ5YjVlZjVlZmFhY2Q2MGQ0YTRjMWY5Zjc1N2E2
14
+ NDZlNTY3ZDQwZTljMjg2YjE4ODhhNDQ3OGUwODUwYjcyZDNjMzA1ZDhmZGYy
15
+ MTI3OTY2MDNmYTQ1OTIxNTBkMzc4Mjg5ZTFjZTYwZWU5OWQ0NzY=
data/lib/base.rb ADDED
@@ -0,0 +1,6 @@
1
+ #base.rb
2
+
3
+ #gem name check
4
+ $ gem list -r super-app
5
+
6
+ require './super-app/main.rb'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: super-app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Gallo
@@ -9,18 +9,17 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-03 00:00:00.000000000 Z
12
+ date: 2014-04-04 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Bundler manages an application's dependencies through its entire life,
15
15
  across many machines, systematically and repeatably
16
16
  email:
17
17
  - marco.gallo@email.com
18
- executables:
19
- - main.rb
18
+ executables: []
20
19
  extensions: []
21
20
  extra_rdoc_files: []
22
21
  files:
23
- - bin/main.rb
22
+ - lib/base.rb
24
23
  homepage:
25
24
  licenses: []
26
25
  metadata: {}
data/bin/main.rb DELETED
@@ -1,65 +0,0 @@
1
- $LOAD_PATH.unshift(File.dirname(__FILE__))
2
-
3
- require 'rubygems'
4
- require 'sinatra'
5
- require 'helpers/starter.rb'
6
- require 'logics/process_engine.rb'
7
- require 'haml'
8
-
9
- disable :protection
10
- set :port, 1000
11
- #set :bind, '192.168.128.59'
12
- set :environment, :development
13
- set :threaded, true
14
- set :server, :thin
15
-
16
- #use NTLMAuthentication
17
-
18
- get '/public/:folder/:file_name' do
19
- content_url = File.join(settings.public_folder, params[:folder], params[:file_name])
20
- send_file content_url
21
- end
22
-
23
- get '/:controller/:action.?:format?*' do
24
- output = "OK"
25
- content_disposition = false
26
- content_type = 'text/html'
27
- domain_host = "http://#{settings.bind.to_s}:#{settings.port}"
28
-
29
- begin
30
- controller = params[:controller]
31
- action = params[:action]
32
- format = params[:format]
33
-
34
- # recupero modello dati e template view
35
- ret_model = Logics::ProcessEngine.exec action, params
36
- ret_view = Helpers::Utility.get_template action
37
- ret_model.public_path = domain_host + "/public"
38
-
39
- case format.upcase
40
- when 'PDF'
41
- html = Haml::Engine.new(ret_view).render(Object.new, :models => ret_model)
42
- output = Helpers::PdfEngine.create_pdf_s DateTime.now.strftime("%Y%m%d%H%M%S"), html, action
43
-
44
- content_type = 'application/pdf'
45
- content_disposition = true
46
-
47
- when 'HTML'
48
- output = Haml::Engine.new(ret_view).render(Object.new, :models => ret_model)
49
- content_type = 'text/html'
50
- else
51
- p "errore formato sconosciuto"
52
- haml :error, :locals => {:err_msg => "errore formato sconosciuto"}
53
- end
54
-
55
- rescue Exception => e
56
- puts e.message
57
- puts e.backtrace
58
- haml :error, :locals => {:err_msg => e}
59
- end
60
-
61
- headers["Content-Type"] = content_type
62
- headers["Content-Disposition"] = "attachment;filename=the_file.pdf" if content_disposition == true
63
- output
64
- end
65
-