pliny 0.14.1 → 0.14.2
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/lib/pliny/commands/creator.rb +4 -3
- data/lib/pliny/version.rb +1 -1
- data/lib/template/.env.sample +2 -0
- data/lib/template/.env.test +2 -0
- data/lib/template/config/config.rb +1 -0
- data/lib/template/config/initializers/log.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48a24aea604685a3fb76c52cf1f6019cdadb389a
|
4
|
+
data.tar.gz: b67a25fcf927be13c8c223f8c6ba090a93362b43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c743117d694c26fc792db548da9230e0b769655cbd3d4a9da672dffb6211fc327ac73e230320ac8946be1e0334c219a675fb8c81d6be25d3ee7d0013705c96fd
|
7
|
+
data.tar.gz: a92aea7a99f0bc6173f591609601d4ce6c4143e3c51a2d95a7ac4e30bbd295366756c0b81b4b05efba4ea4a81cf4f1e08d7c96f574aed83ca7135117c146d825
|
@@ -22,14 +22,14 @@ module Pliny::Commands
|
|
22
22
|
|
23
23
|
FileUtils.copy_entry template_dir, app_dir
|
24
24
|
FileUtils.rm_rf("#{app_dir}/.git")
|
25
|
-
|
25
|
+
setup_environments
|
26
26
|
display 'Pliny app created. To start, run:'
|
27
27
|
display "cd #{app_dir} && bin/setup"
|
28
28
|
end
|
29
29
|
|
30
30
|
protected
|
31
31
|
|
32
|
-
def
|
32
|
+
def setup_environments
|
33
33
|
db = URI.parse("postgres:///#{name}")
|
34
34
|
{
|
35
35
|
'.env.sample' => 'development',
|
@@ -42,7 +42,8 @@ module Pliny::Commands
|
|
42
42
|
# ruby's URI#to_s renders foo:/bar when there's no host
|
43
43
|
# we want foo:///bar instead!
|
44
44
|
db_url = db.to_s.sub(':/', ':///')
|
45
|
-
f.puts env.sub(/
|
45
|
+
f.puts env.sub(/APP_NAME=.*/, "APP_NAME=#{name}")
|
46
|
+
.sub(/DATABASE_URL=.*/, "DATABASE_URL=#{db_url}")
|
46
47
|
end
|
47
48
|
end
|
48
49
|
end
|
data/lib/pliny/version.rb
CHANGED
data/lib/template/.env.sample
CHANGED
data/lib/template/.env.test
CHANGED