-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Backfill tests Structure the code slightly differently in order to facilitate testing, and then test with a database and a full Rails stack for better assurance we have things working correctly. * Add usage of disabled_at to allow old keys When old keys are used, and assuming the disabled_at field is set, this allows those old keys to be successful, but warns that the key is disabled and will be removed soon. Use defaults for 6.0 so that test work for Rails 6 runner Update the generators to reduce whitespace Blank lines were generated by the generators in a few places, which cause some style format validators to fail, such as rubocop. * Update version to 4.2.0 Note that we are moving from 4.0.2 to 4.2.0. This is because there were a set of RC builds and tags for 4.1.0 which never made it to a 4.1.0 release. Nevertheless, it seems prudent to move to a new minor revision.
- Loading branch information
1 parent
0daccee
commit cef2b5d
Showing
89 changed files
with
2,020 additions
and
346 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
pkg | ||
spec/reports | ||
spec/fake_app/log/ | ||
.vimrc | ||
*.sw? | ||
.idea/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
require 'rails/generators' | ||
|
||
module Stitches | ||
class AddDisabledAtToApiClientsGenerator < Rails::Generators::Base | ||
include Rails::Generators::Migration | ||
|
||
source_root(File.expand_path(File.join(File.dirname(__FILE__),"generator_files"))) | ||
|
||
def self.next_migration_number(path) | ||
Time.now.utc.strftime("%Y%m%d%H%M%S") | ||
end | ||
|
||
desc "Upgrade your api_clients table so it includes the `disabled_at` field" | ||
def update_api_clients_table | ||
migration_template "db/migrate/add_disabled_at_to_api_clients.rb", "db/migrate/add_disabled_at_to_api_clients.rb" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
lib/stitches/generator_files/db/migrate/add_disabled_at_to_api_clients.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddDisabledAtToApiClients < ActiveRecord::Migration<% if Rails::VERSION::MAJOR >= 5 %>[<%= Rails::VERSION::MAJOR %>.<%= Rails::VERSION::MINOR %>]<% end %> | ||
def change | ||
add_column :api_clients, :disabled_at, "timestamp with time zone", null: true | ||
end | ||
end |
6 changes: 1 addition & 5 deletions
6
lib/stitches/generator_files/db/migrate/add_enabled_to_api_clients.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 2 additions & 5 deletions
7
lib/stitches/generator_files/db/migrate/create_api_clients.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 1 addition & 5 deletions
6
lib/stitches/generator_files/db/migrate/enable_uuid_ossp_extension.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module Stitches | ||
VERSION = '4.0.2' | ||
VERSION = '4.2.0' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.