capistrano-nobrainer 0.2.0 → 0.3.0

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: 62570c1b0985962bdbf5a77b4295416121e06321f65b12630e83bb2ad313b755
4
- data.tar.gz: 755bdef374a6ef621593f8de7c43679a10ffd32492cc315a1a33a4a2a0617722
3
+ metadata.gz: 606598184a9ba7a4fede6d47c196af482d148998068715640fcc9e3099c777b3
4
+ data.tar.gz: 80c78b156676fc6a81fcc0ca1b69e341207abbe91a4a15f5194629eacfc99f08
5
5
  SHA512:
6
- metadata.gz: ff70b95e915bc4b3ceb8044ee5db029ff36d4f11adf62ab57414167ae2569ed6af4f3c3bb2fb2d95b7692759c58db154ae7e8dd24dd5accb3680d0b3fb198a44
7
- data.tar.gz: 12c778bcd0d955d681519a3d6b6542b75153dc7369b49083fc28f7caaef502e39fbf8470d67d9982ffbf39fb64ea6c74aa7997540d42b86e3c449abbf8890ab5
6
+ metadata.gz: a5f0c74d0dc66097e5f79cbdbf1dfaaf826c15ab1a3adea15e5819ffc71b493149477cbfbb2e5698cc26a7a692ea87e204fe536f4d5d6d5ad9d10bc819812b27
7
+ data.tar.gz: ee1509d3b184e32a64168a9a14a2cbb85add31f412173d724c2a81abed9021ee3750c0a8df9bc642f64d18cc7bf456f67b651c6087996dd0b4fdc7c2a005537e
@@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
 
9
9
 
10
10
 
11
+ ## [0.3.0] - 2020-11-02
12
+ ### Added
13
+ - Executing `nobrainer:migrate` when `db/migrate` folder is present
14
+
11
15
  ## [0.2.0] - 2020-10-23
12
16
  ### Fixed
13
17
  - Fixes allowed_push_host from the gemspec file
data/README.md CHANGED
@@ -2,14 +2,21 @@
2
2
 
3
3
  This gem adds the integration for the nobrainer gem in Capistrano.
4
4
 
5
- It creates the indexes automatically.
5
+ It creates the indexes automatically and run the database migration if any (WARNING: You need to use the zedtux's nobrainer fork in order to use migration scripts until it get merged).
6
+
7
+ | Feature | capistrano-nobrainer version |
8
+ | --------------------------- | ----------------------------- |
9
+ | Nobrainer indexes creation | 0.2.0 |
10
+ | Nobrainer migration scripts | 0.3.0 |
11
+
12
+ So if you don't use migration scripts, stick on version 0.2.0.
6
13
 
7
14
  ## Installation
8
15
 
9
16
  Add this line to your application's Gemfile:
10
17
 
11
18
  ```ruby
12
- gem 'capistrano-nobrainer', '~> 0.2'
19
+ gem 'capistrano-nobrainer', '~> 0.2', require: false
13
20
  ```
14
21
 
15
22
  And then execute:
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Capistrano
4
4
  module Nobrainer
5
- VERSION = '0.2.0'
5
+ VERSION = '0.3.0'
6
6
  end
7
7
  end
@@ -1,6 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  namespace :deploy do
4
+ after 'deploy:updated', 'nobrainer:create_nobrainer_indexes'
5
+ end
6
+
7
+ namespace :nobrainer do
4
8
  desc 'Runs rails nobrainer:sync_indexes'
5
9
  task :create_nobrainer_indexes do
6
10
  on roles(:app) do
@@ -12,5 +16,23 @@ namespace :deploy do
12
16
  end
13
17
  end
14
18
 
15
- after 'deploy:updated', 'deploy:create_nobrainer_indexes'
19
+ desc 'Runs rails nobrainer:migrate'
20
+ task :migrate_database do
21
+ on fetch(:migration_servers) do
22
+ within release_path do
23
+ with rails_env: fetch(:rails_env) do
24
+ execute :rails, 'nobrainer:migrate'
25
+ end
26
+ end
27
+ end
28
+ end
29
+
30
+ before 'nobrainer:create_nobrainer_indexes', 'nobrainer:migrate_database'
31
+ end
32
+
33
+ namespace :load do
34
+ task :defaults do
35
+ set :migration_role, fetch(:migration_role, :db)
36
+ set :migration_servers, -> { primary(fetch(:migration_role)) }
37
+ end
16
38
  end
metadata CHANGED
@@ -1,20 +1,26 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-nobrainer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillaume Hain
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-23 00:00:00.000000000 Z
11
+ date: 2020-11-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: '["This gem adds the integration for the nobrainer gem in Capistrano.\n\nIt
14
- creates the indexes automatically.\n\n## Installation\n\nAdd this line to your application''s
15
- Gemfile:\n\n```ruby\ngem ''capistrano-nobrainer'', ''~> 0.2''\n```\n\nAnd then execute:\n\n $
16
- bundle install\n\nOr install it yourself as:\n\n $ gem install capistrano-nobrainer\n\n##
17
- Usage\n\nAdd the following require to your `Capfile`:\n\n```ruby\nrequire ''capistrano/nobrainer''\n```\n\n##
14
+ creates the indexes automatically and run the database migration if any (WARNING:
15
+ You need to use the zedtux''s nobrainer fork in order to use migration scripts until
16
+ it get merged).\n\n| Feature | capistrano-nobrainer version |\n|
17
+ --------------------------- | ----------------------------- |\n| Nobrainer indexes
18
+ creation | 0.2.0 |\n| Nobrainer migration scripts | 0.3.0 |\n\nSo
19
+ if you don''t use migration scripts, stick on version 0.2.0.\n\n## Installation\n\nAdd
20
+ this line to your application''s Gemfile:\n\n```ruby\ngem ''capistrano-nobrainer'',
21
+ ''~> 0.2'', require: false\n```\n\nAnd then execute:\n\n $ bundle install\n\nOr
22
+ install it yourself as:\n\n $ gem install capistrano-nobrainer\n\n## Usage\n\nAdd
23
+ the following require to your `Capfile`:\n\n```ruby\nrequire ''capistrano/nobrainer''\n```\n\n##
18
24
  Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies.
19
25
  You can also run `bin/console` for an interactive prompt that will allow you to
20
26
  experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake
@@ -50,7 +56,7 @@ metadata:
50
56
  homepage_uri: https://gitlab.com/zedtux/capistrano-nobrainer
51
57
  source_code_uri: https://gitlab.com/zedtux/capistrano-nobrainer
52
58
  changelog_uri: https://gitlab.com/zedtux/capistrano-nobrainer/-/blob/master/CHANGELOG.md
53
- post_install_message:
59
+ post_install_message:
54
60
  rdoc_options: []
55
61
  require_paths:
56
62
  - lib
@@ -65,8 +71,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
71
  - !ruby/object:Gem::Version
66
72
  version: '0'
67
73
  requirements: []
68
- rubygems_version: 3.0.4
69
- signing_key:
74
+ rubygems_version: 3.0.8
75
+ signing_key:
70
76
  specification_version: 4
71
77
  summary: Nobrainer integration for Capistrano
72
78
  test_files: []