singu 0.0.4 → 0.0.5
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.
- checksums.yaml +4 -4
- data/README.md +65 -0
- data/bin/singu +0 -0
- data/lib/singu/version.rb +1 -1
- data/templates/sinatra/Gemfile +4 -4
- data/templates/sinatra/Rakefile +1 -0
- data/templates/sinatra/app.rb.tt +0 -22
- data/templates/sinatra/app/models/.gitkeep +0 -0
- data/templates/sinatra/app/routes/base.rb.tt +0 -7
- data/templates/sinatra/public/favicon.ico +0 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e226632fff328ab84c9a532b0a89b46c9c30e455
|
4
|
+
data.tar.gz: 7ad0f975a032c391ea2b0f1dc746f0cd0270e285
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7291370ef95acec1e8170722e7484f5132f21f8abc8e2eb9c789b25b651e36830338d108d77b75c3c2c56868757cdb65da4fb3980cd23fc9b33eb3e390a754a6
|
7
|
+
data.tar.gz: d5253479cd1ff8f86623af0a6fd4a5be296ae9bcd44833d9c44b7b908f95fe67a77d1a24c6ce940f3bb49026169cb6e91b9bff0413131fb752259ba76e47f28b
|
data/README.md
CHANGED
@@ -4,3 +4,68 @@ singu
|
|
4
4
|
Sinatra + Angular Base App Generator
|
5
5
|
|
6
6
|
## Development Boostrap
|
7
|
+
|
8
|
+
To create Sinatra + Angular App:
|
9
|
+
|
10
|
+
Install **singu** gem with provides base app generator
|
11
|
+
|
12
|
+
```
|
13
|
+
gem install singu
|
14
|
+
```
|
15
|
+
|
16
|
+
To create new application in current directory run
|
17
|
+
|
18
|
+
```
|
19
|
+
singu app_name
|
20
|
+
```
|
21
|
+
|
22
|
+
To start sinatra app server run
|
23
|
+
|
24
|
+
```
|
25
|
+
rackup
|
26
|
+
```
|
27
|
+
|
28
|
+
Then you can open
|
29
|
+
|
30
|
+
```
|
31
|
+
open http://0.0.0.0:9292
|
32
|
+
```
|
33
|
+
|
34
|
+
## Application Structure
|
35
|
+
|
36
|
+
Generator proceeds
|
37
|
+
```
|
38
|
+
Code» singu your_app
|
39
|
+
create your_app
|
40
|
+
create your_app/.gitignore
|
41
|
+
create your_app/Gemfile
|
42
|
+
create your_app/Procfile
|
43
|
+
create your_app/Rakefile
|
44
|
+
create your_app/app.rb
|
45
|
+
create your_app/app/lib/db.rb
|
46
|
+
create your_app/app/models.rb
|
47
|
+
create your_app/app/models/
|
48
|
+
create your_app/app/routes.rb
|
49
|
+
create your_app/app/routes/base.rb
|
50
|
+
create your_app/config.ru
|
51
|
+
exist your_app
|
52
|
+
create your_app/client/Gruntfile.js
|
53
|
+
create your_app/client/app/index.html
|
54
|
+
create your_app/client/package.json
|
55
|
+
run git init . from "./your_app"
|
56
|
+
Initialized empty Git repository in /Users/rege/Code/your_app/.git/
|
57
|
+
run bundle from "./your_app"
|
58
|
+
```
|
59
|
+
|
60
|
+
## To release new version of singu
|
61
|
+
|
62
|
+
Commit changes and then
|
63
|
+
|
64
|
+
```
|
65
|
+
git tag -a v0.0.*
|
66
|
+
git push origin master --tags
|
67
|
+
gem build singu.gemspec
|
68
|
+
gem push singu-0.0.*.gem
|
69
|
+
|
70
|
+
gem update singu
|
71
|
+
```
|
data/bin/singu
CHANGED
File without changes
|
data/lib/singu/version.rb
CHANGED
data/templates/sinatra/Gemfile
CHANGED
@@ -2,13 +2,13 @@ source 'https://rubygems.org'
|
|
2
2
|
ruby '2.1.2'
|
3
3
|
|
4
4
|
gem 'sinatra', require: 'sinatra/base'
|
5
|
-
gem 'dotenv'
|
6
|
-
gem 'rake'
|
5
|
+
gem 'dotenv' # environment variables
|
6
|
+
gem 'rake', '~> 10.3'
|
7
7
|
|
8
8
|
# DB
|
9
9
|
gem 'sqlite3'
|
10
10
|
|
11
11
|
group :development do
|
12
|
-
gem 'thin'
|
13
|
-
gem 'byebug'
|
12
|
+
gem 'thin' #server
|
13
|
+
gem 'byebug' #debugging
|
14
14
|
end
|
data/templates/sinatra/Rakefile
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/templates/sinatra/app.rb.tt
CHANGED
@@ -22,28 +22,6 @@ require 'app/routes'
|
|
22
22
|
|
23
23
|
module <%= @name.camel_case %>
|
24
24
|
class App < Sinatra::Application
|
25
|
-
configure do
|
26
|
-
set :database, lambda {
|
27
|
-
ENV['DATABASE_URL'] ||
|
28
|
-
"postgres://localhost:5432/<%= @name.file_name %>_#{environment}"
|
29
|
-
}
|
30
|
-
end
|
31
|
-
|
32
|
-
configure :development, :staging do
|
33
|
-
database.loggers << Logger.new(STDOUT)
|
34
|
-
end
|
35
|
-
|
36
|
-
configure do
|
37
|
-
disable :method_override
|
38
|
-
disable :static
|
39
|
-
|
40
|
-
set :sessions,
|
41
|
-
httponly: true,
|
42
|
-
secure: production?,
|
43
|
-
secure: false,
|
44
|
-
expire_after: 5.years,
|
45
|
-
secret: ENV['SESSION_SECRET']
|
46
|
-
end
|
47
25
|
end
|
48
26
|
end
|
49
27
|
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: singu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Darek Finster
|
@@ -250,9 +250,11 @@ files:
|
|
250
250
|
- templates/sinatra/app.rb.tt
|
251
251
|
- templates/sinatra/app/lib/db.rb.tt
|
252
252
|
- templates/sinatra/app/models.rb.tt
|
253
|
+
- templates/sinatra/app/models/.gitkeep
|
253
254
|
- templates/sinatra/app/routes.rb.tt
|
254
255
|
- templates/sinatra/app/routes/base.rb.tt
|
255
256
|
- templates/sinatra/config.ru.tt
|
257
|
+
- templates/sinatra/public/favicon.ico
|
256
258
|
homepage: http://github.com/regedarek/singu
|
257
259
|
licenses:
|
258
260
|
- MIT
|