cuba-generator 0.0.2 → 0.0.3

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: f12dc7c6b72987e73e054170e47cc5c6cb2f16b7
4
- data.tar.gz: c564a207b783f5c11e52f88ec706221c01b896d6
3
+ metadata.gz: b4eec12e492f60c19414252cf7e9f5f0a6924de1
4
+ data.tar.gz: be9ea2e861b2a729bdf278f09429a3effaab8384
5
5
  SHA512:
6
- metadata.gz: 9d7130e10c95bc8c8f68118eb8df78cfdc96cff93d0a7eaa8dd40aaeb91a453c3f7efcc5ec6296887ce86272de21af07f0c9cd76bea9ea5781f8831700285314
7
- data.tar.gz: c502400501656597ad2e068c063e53251e587417898ade4b7ac1160120f059628b3a2b59d061592569eae529691a4787766ca65ec4d322fdd342cb158de2ad1c
6
+ metadata.gz: b2808fc78401343a3b0901b7912691fc2c574629571324ed881d06ed871b3f1a3f68172080dd4ea198aa0ec1232f8750f254ee893f0052e76794b313d2093bdc
7
+ data.tar.gz: fd9495af1c195e0ca9164d37ba006418a1417a8814363b98d71d29c1d9b3198e28c9e0407f30de835377ae389b952e7b48792e1133c2c63cec3bcc90535f24f9
@@ -1,5 +1,5 @@
1
1
  module Cuba
2
2
  class Generator
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -1,39 +1,40 @@
1
- <%= <<-TEMPLATE.gsub /^\s+/, ""
2
- require 'cuba'
1
+ <%=
2
+ <<-TEMPLATE
3
+ require 'cuba'
3
4
 
4
- # If you need extra protection.
5
- # require 'rack/protection'
6
- # Cuba.use Rack::Protection
7
- # Cuba.use Rack::Protection::RemoteReferrer
5
+ # If you need extra protection.
6
+ # require 'rack/protection'
7
+ # Cuba.use Rack::Protection
8
+ # Cuba.use Rack::Protection::RemoteReferrer
8
9
 
9
- Cuba.use Rack::Session::Cookie, :secret => "#{SecureRandom.base64(64)}"
10
+ Cuba.use Rack::Session::Cookie, :secret => "#{SecureRandom.base64(64)}"
10
11
 
11
- # Cuba includes a plugin called Cuba::Render that provides a couple of helper methods for rendering templates.
12
- # require "cuba/render"
13
- # Cuba.plugin(Cuba::Render)
12
+ # Cuba includes a plugin called Cuba::Render that provides a couple of helper methods for rendering templates.
13
+ # require "cuba/render"
14
+ # Cuba.plugin(Cuba::Render)
14
15
 
15
- # This plugin uses Tilt, which serves as an interface to a bunch of different Ruby template engines
16
- # (ERB, Haml, Sass, CoffeeScript, etc.), so you can use the template engine of your choice.
17
- # require 'slim'
18
- # Cuba.settings[:render][:template_engine] = 'slim'
16
+ # This plugin uses Tilt, which serves as an interface to a bunch of different Ruby template engines
17
+ # (ERB, Haml, Sass, CoffeeScript, etc.), so you can use the template engine of your choice.
18
+ # require 'slim'
19
+ # Cuba.settings[:render][:template_engine] = 'slim'
19
20
 
20
- # Cuba.settings[:render][:template_engine] = "slim"
21
- # Cuba.settings[:render][:views] = "./views/admin/"
22
- # Cuba.settings[:render][:layout] = "admin"
21
+ # Cuba.settings[:render][:template_engine] = "slim"
22
+ # Cuba.settings[:render][:views] = "./views/admin/"
23
+ # Cuba.settings[:render][:layout] = "admin"
23
24
 
24
- # To launch just type: 'rackup' in your console
25
- Cuba.define do
26
- on get do
27
- on "#{project_name}" do
28
- on root do
29
- res.write 'Hello world!'
30
- end
31
- end
32
-
33
- on root do
34
- res.redirect "/#{project_name}"
35
- end
25
+ # To launch just type: 'rackup' in your console
26
+ Cuba.define do
27
+ on get do
28
+ on "#{project_name}" do
29
+ on root do
30
+ res.write 'Hello world!'
36
31
  end
37
32
  end
38
- TEMPLATE
33
+
34
+ on root do
35
+ res.redirect "/#{project_name}"
36
+ end
37
+ end
38
+ end
39
+ TEMPLATE
39
40
  %>
@@ -1,6 +1,7 @@
1
- <%= <<-TEMPLATE.gsub /^\s+/, ""
2
- require "./#{project_name}"
1
+ <%=
2
+ <<-TEMPLATE
3
+ require "./#{project_name}"
3
4
 
4
- run Cuba
5
- TEMPLATE
5
+ run Cuba
6
+ TEMPLATE
6
7
  %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cuba-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Serdar Dogruyol