pliny 0.14.1 → 0.14.2

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: 9fd74ed75ef414a1f1602c0548d2f56fdfb4d97d
4
- data.tar.gz: 07b464141302bb46918948da5af25fcd5ee1ff0a
3
+ metadata.gz: 48a24aea604685a3fb76c52cf1f6019cdadb389a
4
+ data.tar.gz: b67a25fcf927be13c8c223f8c6ba090a93362b43
5
5
  SHA512:
6
- metadata.gz: 740e5f9300ec9d45f8f8bba3f4523684204a94fea7bfd5907a448a56783a791bd3a38d52d9817a51c48fdae2103e5edba5578e36f21916f4681704dd4dff0fbf
7
- data.tar.gz: 76f70b7c91576c41c3f7101417512dce9a16915ea06b02cefee49631fecc38e6acaee001351c877630c506d5d83757233874cd66a47f91f86d02a2bf2bd82b14
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
- setup_database_urls
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 setup_database_urls
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(/DATABASE_URL=.*/, "DATABASE_URL=#{db_url}")
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
@@ -1,3 +1,3 @@
1
1
  module Pliny
2
- VERSION = "0.14.1"
2
+ VERSION = "0.14.2"
3
3
  end
@@ -1,4 +1,6 @@
1
+ APP_NAME=pliny
1
2
  DATABASE_URL=postgres://localhost/pliny-development
3
+ DEPLOYMENT=development
2
4
  PLINY_ENV=development
3
5
  TZ=UTC
4
6
  RAISE_ERRORS=true
@@ -1,4 +1,6 @@
1
+ APP_NAME=pliny
1
2
  DATABASE_URL=postgres://localhost/pliny-test
3
+ DEPLOYMENT=test
2
4
  PLINY_ENV=test
3
5
  TZ=UTC
4
6
  RAISE_ERRORS=true
@@ -13,6 +13,7 @@ module Config
13
13
  mandatory :database_url, string
14
14
 
15
15
  # Optional -- value is returned or `nil` if it wasn't present.
16
+ optional :app_name, string
16
17
  optional :placeholder, string
17
18
  optional :versioning_default, string
18
19
  optional :versioning_app_name, string
@@ -1 +1,3 @@
1
1
  Pliny.default_context = {}
2
+ Pliny.default_context[:app] = Config.app_name if Config.app_name
3
+ Pliny.default_context[:deployment] = Config.deployment
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pliny
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.1
4
+ version: 0.14.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandur Leach