shiplane 0.1.5 → 0.1.6

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
  SHA256:
3
- metadata.gz: 40c7d0cfaf215143f6420c6ff3c67692d8814ee521b97f002b76cc43724481f3
4
- data.tar.gz: 18b6eccdd46ad18172bb1f50d568d6f6b302ce6d526ad211d55a77a92eae6a82
3
+ metadata.gz: 8d8cf09c60a0e71f8f4a4bde78e66cb00016a11710972b17ed3fe3f01c5860e5
4
+ data.tar.gz: 222c62bdcf4e3c0181aeff82f5588c6b8fde1df79471835f68d7928e2fad40e6
5
5
  SHA512:
6
- metadata.gz: af99a54e1329ab8e9b9059cc56f424bf94efca2512597e7dcd8d196ab5b76a132b9cd74745f683d5a6b5bd4899ffeda4c7ad349cabc3a8b2a070d1593b9c2b04
7
- data.tar.gz: 41364f3981258ebb5d4f1a2fba587de30f940d92b4cb8f9f3933017c147caae7ff3c6a3d24c33e3c98388f522714d4bbc01473aff87784b20f6088ebac542f3d
6
+ metadata.gz: a87c6e901acccf1281e8fc9c9f2f4e4ebdd1a062702d6d3d1b8ca5d1da2b57de4bf9b0edec3fbe486ac7ee914a22a42a4c60925a35bf45644c9942479ad47ccc
7
+ data.tar.gz: 1baf831d73da4a75247f6c06919bcd518cbb096bcda5584537da5b5a8109dafce4243956e04412ebc97f06bf1e68d378e17ccd4fc308eb457233fbf83b50e94f
data/README.md CHANGED
@@ -124,12 +124,40 @@ You can run a deployment like so:
124
124
  bundle exec cap production deploy
125
125
  ```
126
126
 
127
- #### Troubleshooting
127
+ ### Troubleshooting
128
128
  This is as much a reminder to me as anyone else. If a new version of the gem has just been released and you are trying to pull it, make sure to run the following if bundler fails:
129
129
  ```
130
130
  bundle install --full-index
131
131
  ```
132
132
 
133
+ ##### `Could not load database configuration. No such file - ["config/database.yml"]`
134
+ If you are receiving similar messages during the build process, this likely means that you are running a task during the build (e.g. asset precompilation) that is loading up the Rails initializers and have an initializer that tries to connect to the database. You can fix this by finding which of your initializers is being called. See this snippet here from an app that shows where you would find the offending initializer:
135
+ ```
136
+ /var/www/surveyor/vendor/bundle/ruby/2.6.0/gems/zeitwerk-2.1.6/lib/zeitwerk/kernel.rb:23:in `require'
137
+ /var/www/surveyor/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0.rc1/lib/active_support/dependencies.rb:302:in `block in require'
138
+ /var/www/surveyor/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0.rc1/lib/active_support/dependencies.rb:268:in `load_dependency'
139
+ /var/www/surveyor/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0.rc1/lib/active_support/dependencies.rb:302:in `require'
140
+ /var/www/surveyor/config/initializers/public_activity.rb:1:in `<main>'
141
+ /var/www/surveyor/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `load'
142
+ /var/www/surveyor/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `load'
143
+ /var/www/surveyor/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0.rc1/lib/active_support/dependencies.rb:296:in `block in load'
144
+ /var/www/surveyor/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0.rc1/lib/active_support/dependencies.rb:268:in `load_dependency'
145
+ /var/www/surveyor/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0.rc1/lib/active_support/dependencies.rb:296:in `load'
146
+ /var/www/surveyor/vendor/bundle/ruby/2.6.0/gems/railties-6.0.0.rc1/lib/rails/engine.rb:668:in `block in load_config_initializer'
147
+ ```
148
+
149
+ To fix this, wrap the offending code in the initializer with this helper provided by Shiplane:
150
+ ```
151
+ require 'shiplane/safe_build'
152
+
153
+ Shiplane::SafeBuild.wrap do
154
+ PublicActivity::Activity.class_eval do
155
+ belongs_to :true_owner, polymorphic: true
156
+ end
157
+ end
158
+
159
+ ```
160
+
133
161
  ## Becoming Involved
134
162
  ### Community Channels
135
163
  You can join our [Discord community](https://discord.gg/drrn2YG) to ask any questions you might have or to get ahold of someone in the community who might be able to help you. There is no guarantee of service implied, but we absolutely believe in helping out our fellow developers and will do so as we are able. If you feel you know some stuff about Shiplane, feel free to hang out and please help out as well!
@@ -19,6 +19,7 @@ module Shiplane
19
19
  @postfix = postfix
20
20
 
21
21
  Dotenv.overload File.join(Dir.pwd, build_config.fetch('environment_file', '.env'))
22
+ ENV['SHIPLANE_BUILDING'] = 'true'
22
23
  end
23
24
 
24
25
  def appname
@@ -0,0 +1,8 @@
1
+ module Shiplane
2
+ class SafeBuild
3
+ def self.wrap
4
+ return if ENV['SHIPLANE_BUILDING'] == 'true'
5
+ yield
6
+ end
7
+ end
8
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Shiplane
4
- VERSION = "0.1.5"
4
+ VERSION = "0.1.6"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shiplane
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Epperson
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.1.5
19
+ version: 0.1.6
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.1.5
26
+ version: 0.1.6
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: shiplane_deployers_capistrano_docker
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.1.5
33
+ version: 0.1.6
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.1.5
40
+ version: 0.1.6
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: dotenv
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -129,6 +129,7 @@ files:
129
129
  - lib/shiplane/extensions.rb
130
130
  - lib/shiplane/host.rb
131
131
  - lib/shiplane/railtie.rb
132
+ - lib/shiplane/safe_build.rb
132
133
  - lib/shiplane/tasks/install.rake
133
134
  - lib/shiplane/version.rb
134
135
  homepage: https://github.com/kirillian/shiplane