postmod 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.
- checksums.yaml +4 -4
- data/bin/postmod +1 -1
- data/lib/postmod/create.rb +7 -2
- data/lib/postmod/generate/model.rb +2 -0
- data/lib/postmod/generate/module.rb +1 -1
- data/project_template/Gemfile +6 -4
- data/project_template/api/api.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d27d6be9810d1bedaac3defd784c63692cbb8ad4
|
|
4
|
+
data.tar.gz: 7763daeb3aec535f7ec0eb90e03d624e6d2a987b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5dde0f6c974ad7f2b9711b2838ce1cd90c7fc2631255899f5dcc7b4b526fffee33cd5f4e9938dcc38d0871dec28439cfa72bf7cac40aa8d668d5a4320ce27250
|
|
7
|
+
data.tar.gz: e2b4d647f28e03a8b7a69c1ff7d35a99fe106895c38e249562cd0b513465f0dc92df73bdb920c8de87ca0798a665203e922f8e2d8e62f7f7100131158799c3bf
|
data/bin/postmod
CHANGED
data/lib/postmod/create.rb
CHANGED
|
@@ -22,10 +22,11 @@ module Postmod
|
|
|
22
22
|
FileUtils.cp_r(Dir.glob(project_template_path + "/*"), project_path)
|
|
23
23
|
File.write("#{project_path}/.ruby-version", '2.2.2')
|
|
24
24
|
File.write("#{project_path}/.ruby-version", '2.2.2')
|
|
25
|
+
File.write("#{project_path}/.env", "export DATABASE_URL=postgres:///#{project_name}_dev")
|
|
25
26
|
end
|
|
26
27
|
|
|
27
28
|
def create_lib
|
|
28
|
-
|
|
29
|
+
Generate::Module.("#{project_path}/lib/#{project_name}")
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
def create_db
|
|
@@ -37,9 +38,11 @@ module Postmod
|
|
|
37
38
|
end
|
|
38
39
|
|
|
39
40
|
def create_bin
|
|
40
|
-
|
|
41
41
|
File.open("#{project_path}/bin/console", 'w') do |console_file|
|
|
42
42
|
console_file.puts '#!/usr/bin/env ruby'
|
|
43
|
+
console_file.puts "require 'pry'"
|
|
44
|
+
console_file.puts "require_relative '../lib/#{project_name}'"
|
|
45
|
+
console_file.puts "ActiveRecord::Base.establish_connection"
|
|
43
46
|
console_file.puts "#{project_name.capitalize}.pry"
|
|
44
47
|
end
|
|
45
48
|
`chmod u+x #{project_path}/bin/console`
|
|
@@ -75,4 +78,6 @@ module Postmod
|
|
|
75
78
|
end
|
|
76
79
|
|
|
77
80
|
end
|
|
81
|
+
|
|
82
|
+
Dir["#{__FILE__.gsub(/\.rb$/, '')}/*.rb"].each {|file| require file }
|
|
78
83
|
end
|
data/project_template/Gemfile
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
source 'https://rubygems.org'
|
|
2
2
|
|
|
3
|
-
gem 'postmod', git: 'git://github.com/victormours/postmod.git'
|
|
4
|
-
|
|
5
3
|
group :web do
|
|
6
4
|
gem 'chaplin', git: 'git://github.com/victormours/chaplin.git'
|
|
7
5
|
end
|
|
@@ -10,12 +8,16 @@ group :lib do
|
|
|
10
8
|
gem 'pg'
|
|
11
9
|
end
|
|
12
10
|
|
|
13
|
-
group :
|
|
11
|
+
group :bin do
|
|
12
|
+
gem 'pry'
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
group :db do
|
|
14
16
|
gem 'activerecord'
|
|
15
17
|
gem 'standalone_migrations'
|
|
16
18
|
end
|
|
17
19
|
|
|
18
20
|
group :development do
|
|
21
|
+
gem 'postmod', git: 'git://github.com/victormours/postmod.git'
|
|
19
22
|
gem 'dotenv'
|
|
20
|
-
gem 'pry'
|
|
21
23
|
end
|
data/project_template/api/api.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: postmod
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Victor Mours
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-12-
|
|
11
|
+
date: 2015-12-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: chaplin
|