Skip to content

Commit

Permalink
Merge branch 'release/0.2.5'
Browse files Browse the repository at this point in the history
* release/0.2.5:
  Prepare to release 0.2.5
  Resolve definition of `UserRepository` at include time, not require time
  Eliminate namespacing on default UserRepository constant in config
jdickey committed Mar 1, 2019
2 parents 4b6af29 + ac26881 commit e3a95cd
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
crypt_ident (0.2.3)
crypt_ident (0.2.5)
bcrypt
dry-matcher
dry-monads
8 changes: 8 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# CryptIdent Version History

## 0.2.5 (1 March 2019)

This is what should have been 0.2.3. That version attempted to resolve `UserRepository`, used in the `CryptIdent.included` method, at `require` time; instead, by using `Object#const_get`, we now do it at the time the module is included in another (by which time `UserRepository` can be expected to be defined). Meh.

## 0.2.4 (28 February 2019)

Yanked. Disregard.

## 0.2.3 (28 February 2019)

Beginning with this release, you do not need to (and ordinarily should not) assign to `config.repository` in order for `config.guest_user` to work (or vice versa). This eliminates a noisome bit of ceremony from using the config. See Issue [#29](https://github.com/jdickey/crypt_ident/issues/29).
5 changes: 2 additions & 3 deletions lib/crypt_ident/config.rb
Original file line number Diff line number Diff line change
@@ -20,15 +20,14 @@ module CryptIdent
def self.included(base)
super
configure do |conf|
conf.repository = conf.user_repo_class.new
repo_class = Object.const_get(:UserRepository)
conf.repository = repo_class.new
conf.guest_user = conf.repository.guest_user
end
end

# Flash index to use for error messages.
setting :error_key, :error, reader: true
# Class to use for :repository, which is the *User* Repository. Oops on that.
setting :user_repo_class, UserRepository, reader: true
setting :guest_user, reader: true
# Hashing cost for BCrypt. Note that each 1-unit increase *doubles* the
# processing time needed to encode/decode a password.
2 changes: 1 addition & 1 deletion lib/crypt_ident/version.rb
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@

module CryptIdent
# Version number for Gem. Uses Semantic Versioning.
VERSION = '0.2.3'
VERSION = '0.2.5'
end

0 comments on commit e3a95cd

Please sign in to comment.