postmod 0.0.0 → 0.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7326f92e0cb683394c2fcb767df72817f74646a6
4
- data.tar.gz: 5452430fda8804df4e8b3e670b707a1938818943
3
+ metadata.gz: 87a896d35936bd982a4fd58cf17d86be7e93e28d
4
+ data.tar.gz: bae19d6b64d5f693d690c51507d995ee6fddabb7
5
5
  SHA512:
6
- metadata.gz: 238a9ad7030594e964462bdbed43f17825d093cd58dfdb358a81d52831c768e7353d147b78053d2119b60a4362649ddecbe695fcf0677d17ebd4bb1089b186ed
7
- data.tar.gz: d13cdce2bc5eb2677a4bfc1c711c6004577b2711a58df81ed915137bc1ee368564f5cced4a3522aac1337dd227ecba5e50f9b43f542eb32bdaecbcba2b95d9a7
6
+ metadata.gz: 62f2123a7c21681d2e499e935e5dcf033d6c3b86b7472442fcec1673e4706d7e3f101584887aaa003a5f587b9f03d1e9a246a68fdddc355e77dd7b21d276e632
7
+ data.tar.gz: 68749d9c40667c872712a463ab88e901020046ada86cb89444eae46b8c9df85737b2a32ffc79b7f9be7c95a0fc0f51b9e3912f2c6fd4bdc0640a2ccf8565097a
@@ -0,0 +1,12 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'postmod', git: 'git://github.com/victormours/postmod.git'
4
+
5
+ group :web do
6
+ gem 'chaplin', git: 'git://github.com/victormours/chaplin.git'
7
+ end
8
+
9
+ group :data_store do
10
+ gem 'activerecord'
11
+ gem 'standalone_migrations'
12
+ end
@@ -0,0 +1 @@
1
+ web: bundle exec rackup --port $PORT
@@ -0,0 +1,4 @@
1
+ require 'sinatra/base'
2
+
3
+ class Api < Sinatra::Application
4
+ end
@@ -0,0 +1,2 @@
1
+ require_relative "api"
2
+ run Api
@@ -0,0 +1,9 @@
1
+ require_relative "web/web"
2
+ require_relative "api/api"
3
+
4
+ map '/' do
5
+ run Web.new
6
+ end
7
+ map '/api' do
8
+ run Api
9
+ end
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'activerecord'
@@ -0,0 +1,18 @@
1
+ RSpec.configure do |config|
2
+ config.expect_with :rspec do |expectations|
3
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
4
+ end
5
+
6
+ config.mock_with :rspec do |mocks|
7
+ mocks.verify_partial_doubles = true
8
+ end
9
+
10
+ config.disable_monkey_patching!
11
+
12
+ if config.files_to_run.one?
13
+ config.default_formatter = 'doc'
14
+ end
15
+
16
+ config.order = :random
17
+ Kernel.srand config.seed
18
+ end
@@ -0,0 +1,2 @@
1
+ require 'standalone_migrations'
2
+ StandaloneMigrations::Tasks.load_tasks
@@ -0,0 +1,11 @@
1
+ development:
2
+ adapter: sqlite3
3
+ database: development.sqlite3
4
+ pool: 5
5
+ timeout: 5000
6
+
7
+ test: &test
8
+ adapter: sqlite3
9
+ database: test.sqlite3
10
+ pool: 5
11
+ timeout: 5000
@@ -0,0 +1,24 @@
1
+ api_url: "http://localhost:{{env.PORT}}/api"
2
+
3
+ layout: layout.html
4
+
5
+ 404: 404.html
6
+
7
+ routes:
8
+ GET /: index.html
9
+ GET /about: about.html
10
+ GET /redirect_to_about: redirect go_to_about_page
11
+
12
+
13
+ pages:
14
+
15
+ about.html:
16
+ repo: GET repos/victormours/chaplin
17
+
18
+
19
+ redirects:
20
+
21
+ go_to_about_page:
22
+ path: /about
23
+ requests: {}
24
+
@@ -0,0 +1,2 @@
1
+ require_relative "web"
2
+ run Web.new
@@ -0,0 +1,11 @@
1
+ require 'chaplin'
2
+
3
+ class Web
4
+ def initialize
5
+ @app = Chaplin.new(__dir__).server
6
+ end
7
+
8
+ def call(env)
9
+ @app.call(env)
10
+ end
11
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postmod
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Mours
@@ -122,6 +122,18 @@ files:
122
122
  - lib/postmod/generate.rb
123
123
  - lib/postmod/generate/action.rb
124
124
  - lib/postmod/generate/module.rb
125
+ - project_template/Gemfile
126
+ - project_template/Procfile
127
+ - project_template/api/api.rb
128
+ - project_template/api/config.ru
129
+ - project_template/config.ru
130
+ - project_template/core/Gemfile
131
+ - project_template/core/spec/spec_helper.rb
132
+ - project_template/data_store/Rakefile
133
+ - project_template/data_store/config.yml
134
+ - project_template/web/app.yml
135
+ - project_template/web/config.ru
136
+ - project_template/web/web.rb
125
137
  homepage:
126
138
  licenses:
127
139
  - MIT