record_loader 0.1.0 → 0.1.1

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: 159dabfb7769aebda7cb1c5fd9f77b67e728917876c769d663191caefc386a48
4
- data.tar.gz: 64e7699028b6ca62daa1dd1bab3b9513f19a61affca1ce3df0f0b074cfc60315
3
+ metadata.gz: 9f743ea558870c1ddea1c262a64381725c6361f7a340cebc9bcff77e36a631ed
4
+ data.tar.gz: 40f7875e4cad259176da0f1b88591b5ac4934d07491db655d014a05098b3ad1e
5
5
  SHA512:
6
- metadata.gz: 3dff12471dc11ca8b76a029e229240bb76f2b86e079c9149af0119525e4ce784c8875f33e17b92f3d2ca900eb7d7d6759bb589959f568af4a56ea9a6ede85454
7
- data.tar.gz: a7506298753fe9e3d99a06b574312d00c975d93763c9a9715dc17ee5657cea60ab62fcacc5116dd36b57e2a538ecc26f841e2a0dc0891f9fa135052378a2595e
6
+ metadata.gz: 80b92f4b9ab83a6a46a7a363ed2e0205904bf6c10239566beeb04ee21152fc0ab809cb93fe9a22b019781a260a0cbec19fae8e7054f1011d700525ecb1b3c225
7
+ data.tar.gz: e834371ac808b6bad18f6f3708d9e0752a18419367260b6a182b31b88f2780b118fab20f03512c55d7e2a6a1acf2abb41fa5a2647002c1e8eae9c3e923d5a7e7
@@ -5,6 +5,13 @@ Unreleased section to make new releases easy.
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.1.1]
9
+
10
+ - [Fixed] Preflight task on `rake release` now run prior to release.
11
+ - [Fixed] Generators place config files in correct directory
12
+ - [Documentation] Improved documentation regarding dependencies
13
+ - [Documentation] Improved documentation regarding deployment
14
+
8
15
  ## [0.1.0]
9
16
 
10
17
  Initial release
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- record_loader (0.1.0)
4
+ record_loader (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -154,6 +154,39 @@ If you have an existing feature flag system you can use this instead by adding a
154
154
  end
155
155
  ```
156
156
 
157
+ ## RecordLoader Dependencies
158
+
159
+ Sometimes one loader will be dependent on the output of another. If this is the case, you can simply configure
160
+ its rake task to use the other as a pre-requisite.
161
+
162
+ For example
163
+
164
+ ```ruby
165
+ namespace :record_loader do
166
+ desc 'Automatically generate Dependent through DependentLoader'
167
+ task dependent: [:environment, :prerequisite] do
168
+ RecordLoader::DependentLoader.new.create!
169
+ end
170
+ end
171
+ ```
172
+
173
+ ## Triggering on deployment
174
+
175
+ It can be useful to set `rake record_loader:all` to run automatically on deployment.
176
+ It is recommend you trigger this after migrations have run.
177
+
178
+ ### Within Sanger PSD
179
+
180
+ **This section is relevant to developers within the Sanger only. Other users of the Gem should hook into their own deployment systems as they see fit.**
181
+
182
+ In Production Software Development at the Sanger we have the Ansible deployment project configured to run
183
+ `rake application:post_deploy` after migrations for selected applications. If you wish to take advantage of this
184
+ uncomment the appropriate line in `lib/tasks/record_loader.rake`. You should also ensure that your application has
185
+ the post_deploy tasks enabled by setting the post_deploy to true for your application.
186
+
187
+ Currently this behaviour is configured as part of the 'rails' role, and will need to be set-up independently for
188
+ any non-Rails ruby applications.
189
+
157
190
  ## Non Rails Environments
158
191
 
159
192
  In non-rails environments you can use the {RecordLoader::Adapter::Basic} adapter to avoid Rails specific functionality.
data/Rakefile CHANGED
@@ -1,5 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # We add preflight to the release task pre-requisites before loading in the
4
+ # bundler/gem_tasks to ensure that it runs first. This is becuase 'release' is
5
+ # actually composed entirely of pre-requisites and so would otherwise end up
6
+ # running the pre-flight tasks AFTER everything else
7
+ task release: :preflight
8
+
3
9
  require 'bundler/gem_tasks'
4
10
  require 'rspec/core/rake_task'
5
11
  require 'rubocop/rake_task'
@@ -9,8 +15,6 @@ RuboCop::RakeTask.new
9
15
 
10
16
  task default: %i[rubocop spec]
11
17
 
12
- task release: :preflight
13
-
14
18
  desc 'Runs the preflight checklist before building a release'
15
19
  task :preflight do
16
20
  puts '🛫 Preflight checklist'
@@ -9,3 +9,9 @@ namespace :record_loader do
9
9
  puts 'Loading all records'
10
10
  end
11
11
  end
12
+
13
+ # In Sanger PSD we have the ansible deployment project configured to run `rake application:post_deploy` after migrations
14
+ # for selected applications.
15
+ # Uncomment the following to automatically trigger record loader on running the application:post_deploy task.
16
+ # You may need to set `post_deploy: true` in the ansible configuration for your application.
17
+ # task 'application:post_deploy' => 'record_loader:all'
@@ -2,5 +2,5 @@
2
2
 
3
3
  module RecordLoader
4
4
  # @return [String] The current sem-ver version number
5
- VERSION = '0.1.0'
5
+ VERSION = '0.1.1'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: record_loader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Glover
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-14 00:00:00.000000000 Z
11
+ date: 2020-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -150,7 +150,7 @@ files:
150
150
  - lib/generators/record_loader/record_loader_generator.rb
151
151
  - lib/generators/record_loader/static_files/application_record_loader.rb
152
152
  - lib/generators/record_loader/static_files/record_loader.rake
153
- - lib/generators/record_loader/templates/config/record_loader/%underscores%/default_records.yml
153
+ - lib/generators/record_loader/templates/config/default_records/%underscores%/default_records.yml
154
154
  - lib/generators/record_loader/templates/lib/record_loader/%underscore_loader%.rb.tt
155
155
  - lib/generators/record_loader/templates/lib/tasks/record_loader/%underscore%.rake.tt
156
156
  - lib/generators/record_loader/templates/spec/data/record_loader/%underscores%/two_entry_example.yml
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
185
  - !ruby/object:Gem::Version
186
186
  version: '0'
187
187
  requirements: []
188
- rubygems_version: 3.0.3
188
+ rubygems_version: 3.0.8
189
189
  signing_key:
190
190
  specification_version: 4
191
191
  summary: Easily manage seeding and updating data from simple yml files