Skip to content

Commit

Permalink
Merge branch 'release/v1.7.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
odinsride committed Aug 17, 2020
2 parents 34dd0cb + 5a8ea28 commit 80720a9
Show file tree
Hide file tree
Showing 72 changed files with 634 additions and 389 deletions.
7 changes: 5 additions & 2 deletions .gitignore
Expand Up @@ -17,15 +17,15 @@ pickle-email-*.html
!/log/.keep
!/tmp/.keep

# TODO Comment out this rule if you are OK with secrets being uploaded to the repo
# Comment out this rule if you are OK with secrets being uploaded to the repo
config/initializers/secret_token.rb
config/master.key

# Only include if you have production secrets in this file, which is no longer a Rails default
#config/secrets.yml

# dotenv
# TODO Comment out this rule if environment variables can be committed
# Comment out this rule if environment variables can be committed
.env
.env.*

Expand Down Expand Up @@ -70,3 +70,6 @@ yarn-debug.log*
/storage/*
!/storage/.keep
/public/uploads

# Other
.DS_Store
7 changes: 6 additions & 1 deletion .rubocop.yml
@@ -1,5 +1,6 @@
AllCops:
DisplayCopNames: true
NewCops: enable
Exclude:
- db/**/*
- script/**/*
Expand Down Expand Up @@ -66,4 +67,8 @@ Style/HashTransformValues:
Enabled: true

Style/SlicingWithRange:
Enabled: true
Enabled: true

Style/StringConcatenation:
Enabled: false

45 changes: 45 additions & 0 deletions .yarnclean
@@ -0,0 +1,45 @@
# test directories
__tests__
test
tests
powered-test

# asset directories
#docs
#doc
##website
#images
#assets

# examples
example
examples

# code coverage directories
coverage
.nyc_output

# build scripts
Makefile
Gulpfile.js
Gruntfile.js

# configs
appveyor.yml
circle.yml
codeship-services.yml
codeship-steps.yml
wercker.yml
.tern-project
.gitattributes
.editorconfig
.*ignore
.eslintrc
.jshintrc
.flowconfig
.documentup.json
.yarn-metadata.json
.travis.yml

# misc
*.md
17 changes: 16 additions & 1 deletion CHANGELOG.md
Expand Up @@ -6,6 +6,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased] changes

## [v1.7.1] - 2020-08-17

### New
- User registration, and current user email changes now require email confirmation. This is to prevent false registrations from bots.
- Version number has been added to footer

### Changed
- Transaction attachment interface improved to display the filename of the current attachment, as well as corrections to a text overflow issue with long attachment filenames.
- Favicon has been updated

### Fixed
- User sign-out no longer causes an error
- Transactions with long descriptions now display better on mobile

## [v1.7.0] - 2020-08-06

### New
Expand Down Expand Up @@ -212,7 +226,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Account overview with list of all accounts and balances for each


[Unreleased]: https://github.com/odinsride/olubalance/compare/v1.7.0...develop
[Unreleased]: https://github.com/odinsride/olubalance/compare/v1.7.1...develop
[v1.7.1]: https://github.com/odinsride/olubalance/compare/v1.7.0...v1.7.1
[v1.7.0]: https://github.com/odinsride/olubalance/compare/v1.6.4...v1.7.0
[v1.6.4]: https://github.com/odinsride/olubalance/compare/v1.6.3...v1.6.4
[v1.6.3]: https://github.com/odinsride/olubalance/compare/v1.6.2...v1.6.3
Expand Down
5 changes: 3 additions & 2 deletions Gemfile
Expand Up @@ -20,7 +20,7 @@ gem 'pagy', '~> 3.8.2'
gem 'pg', '~> 1.2.3'
gem 'puma', '~> 4.3.5'
gem 'rails', '~> 6.0.3.2'
gem 'redis', '>= 4.0', :require => ['redis', 'redis/connection/hiredis']
gem 'redis', '>= 4.0', require: ['redis', 'redis/connection/hiredis']
gem 'stimulus_reflex', '~> 3.2.3'
gem 'webpacker', '~> 5.1.1'

Expand All @@ -39,10 +39,11 @@ end
group :development do
gem 'better_errors'
gem 'binding_of_caller'
gem 'letter_opener'
gem 'listen'
gem 'rubocop', require: false
gem 'rubocop-rails', require: false
gem 'spring'
gem 'spring-watcher-listen'
gem 'spring-commands-rspec'
gem 'spring-watcher-listen'
end
17 changes: 11 additions & 6 deletions Gemfile.lock
Expand Up @@ -64,7 +64,7 @@ GEM
public_suffix (>= 2.0.2, < 5.0)
ast (2.4.1)
aws-eventstream (1.1.0)
aws-partitions (1.352.0)
aws-partitions (1.356.0)
aws-sdk-core (3.104.3)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
Expand All @@ -77,7 +77,7 @@ GEM
aws-sdk-core (~> 3, >= 3.99.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.1)
aws-sigv4 (1.2.2)
aws-eventstream (~> 1, >= 1.0.2)
bcrypt (3.1.15)
better_errors (2.7.1)
Expand All @@ -99,7 +99,7 @@ GEM
regexp_parser (~> 1.5)
xpath (~> 3.2)
coderay (1.1.3)
concurrent-ruby (1.1.6)
concurrent-ruby (1.1.7)
crass (1.0.6)
database_cleaner (1.8.5)
debug_inspector (0.0.3)
Expand Down Expand Up @@ -134,6 +134,10 @@ GEM
i18n (1.8.5)
concurrent-ruby (~> 1.0)
jmespath (1.4.0)
launchy (2.5.0)
addressable (~> 2.7)
letter_opener (1.7.0)
launchy (~> 2.2)
listen (3.2.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
Expand Down Expand Up @@ -235,13 +239,13 @@ GEM
rspec-mocks (~> 3.9)
rspec-support (~> 3.9)
rspec-support (3.9.3)
rubocop (0.89.0)
rubocop (0.89.1)
parallel (~> 1.10)
parser (>= 2.7.1.1)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.7)
rexml
rubocop-ast (>= 0.1.0, < 1.0)
rubocop-ast (>= 0.3.0, < 1.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (0.3.0)
Expand All @@ -254,7 +258,7 @@ GEM
semantic_range (2.3.0)
shoulda-matchers (4.3.0)
activesupport (>= 4.2.0)
simplecov (0.18.5)
simplecov (0.19.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov-html (0.12.2)
Expand Down Expand Up @@ -310,6 +314,7 @@ DEPENDENCIES
faker (~> 2.12.0)
figaro (~> 1.2.0)
hiredis
letter_opener
listen
mini_magick (~> 4.10.1)
pagy (~> 3.8.2)
Expand Down
16 changes: 0 additions & 16 deletions app/controllers/transactions_controller.rb
Expand Up @@ -9,16 +9,6 @@ class TransactionsController < ApplicationController

# Index action to render all transactions
def index
# TODO: Deprecate following code
# Preserve pagination state when working within the same account,
# otherwise reset pagination when moving to a different account
# if session[:account_id] == @account.id
# session[:trx_index_page] = params[:page] if params[:page]
# else
# session[:account_id] = @account.id
# session[:trx_index_page] = nil
# end

@query = session[:query]
@order_by = permitted_column_name(session[:order_by])
@direction = permitted_direction(session[:direction])
Expand All @@ -32,12 +22,6 @@ def index
@pagy, @transactions = pagy(transactions, page: @page)
@transactions = @transactions.decorate

# TODO: Deprecate following code
# @transactions = @account.transactions.search(params[:description]).with_balance.desc
# # @transactions = @transactions.paginate(page: session[:trx_index_page], per_page: 15)
# @pagy, @transactions = pagy(@transactions, page: session[:trx_index_page], items: 15)
# @transactions = @transactions.decorate

@stashed = @account.stashes.sum(:balance)

respond_to do |format|
Expand Down
16 changes: 16 additions & 0 deletions app/decorators/transaction_decorator.rb
Expand Up @@ -48,6 +48,14 @@ def filename_size
attachment.attached? ? attachment.filename.to_s + ' (' + number_to_human_size(attachment.byte_size).to_s + ')' : nil
end

def filename_form
attachment.attached? ? filename_size : '- No receipt -'
end

def add_receipt_button_label
attachment.attached? ? 'Change receipt...' : 'Add receipt...'
end

def running_balance_display
number_to_currency(running_balance)
end
Expand All @@ -73,4 +81,12 @@ def trx_date_form_value
def created_at_decorated
created_at.in_time_zone(current_user.timezone).strftime('%b %d, %Y @ %I:%M %p %Z')
end

def name_too_long
description.length > 35
end

def trx_desc_display
name_too_long ? description[0..35] + '...' : description
end
end
Binary file modified app/javascript/application/images/obfavicon.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 4 additions & 5 deletions app/javascript/application/stylesheets/application.scss
Expand Up @@ -66,17 +66,16 @@ a.navbar-link {
flex-direction: column;
}

// Override file-icon margin
.file-icon {
margin-right: 0;
}

// Override file-cta and file-name border color
.file-cta,
.file-name {
border-color: $primary;
}

.ob-file-name {
margin-top: 0.5em;
}

.ob-icon-rpad {
i {
margin-right: 10px;
Expand Down
1 change: 0 additions & 1 deletion app/javascript/controllers/shared_controller.js
Expand Up @@ -7,7 +7,6 @@ export default class extends Controller {

connect () {
//Invoke bulma toast notifications, if any
//this.element.remove() TODO: is this needed?
var message = this.data.get("message")
var messageType = this.data.get("message-type")
if (message && messageType) {
Expand Down
1 change: 1 addition & 0 deletions app/javascript/packs/application.js
@@ -1,6 +1,7 @@
// Core libraries
require("turbolinks").start()
require("@rails/ujs").start()
require("@rails/actioncable")
require("@rails/activestorage").start()
require("channels")
require.context("../application/images", true)
Expand Down
2 changes: 1 addition & 1 deletion app/mailers/application_mailer.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class ApplicationMailer < ActionMailer::Base
default from: 'from@example.com'
default from: 'accounts@olubalance.com'
layout 'mailer'
end
1 change: 0 additions & 1 deletion app/models/stash.rb
Expand Up @@ -16,7 +16,6 @@ class Stash < ApplicationRecord

before_destroy :unstash


private

# Create an account transaction to return any stashed money
Expand Down
2 changes: 1 addition & 1 deletion app/models/user.rb
Expand Up @@ -5,7 +5,7 @@ class User < ApplicationRecord
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
:recoverable, :rememberable, :trackable, :validatable, :confirmable

# validates :password_confirmation, presence: true

Expand Down
5 changes: 2 additions & 3 deletions app/views/accounts/components/_accountCardContent.html.erb
@@ -1,9 +1,8 @@
<header class="card-header has-background-primary <%= class_string(tooltip: account.name_too_long) %>"
data-tooltip="<%= account.name %>">
<%= content_tag :header, class: "card-header has-background-primary", data: { tooltip: account.name_too_long ? account.name : nil } do -%>
<h6 class="title is-6 card-header-title has-text-white">
<%= account.account_card_title %>
</h6>
</header>
<% end %>
<div class="card-content">
<div class="content has-text-right ">
<p class="title is-6 has-text-link">
Expand Down
4 changes: 2 additions & 2 deletions app/views/devise/mailer/confirmation_instructions.html.erb
@@ -1,5 +1,5 @@
<p>Welcome <%= @email %>!</p>
<p>Welcome to olubalance, <%= @email %>!</p>

<p>You can confirm your account email through the link below:</p>
<p>Please confirm your account email by clicking the link below:</p>

<p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
@@ -1,6 +1,6 @@
<p>Hello <%= @resource.email %>!</p>

<p>Someone has requested a link to change your password. You can do this through the link below.</p>
<p>Someone has requested a link to change your olubalance password. You can do this through the link below.</p>

<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>

Expand Down
22 changes: 9 additions & 13 deletions app/views/layouts/application.html.erb
Expand Up @@ -7,20 +7,16 @@

<title>olubalance</title>

<link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/android-chrome-144x144.png" sizes="144x144">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
<meta name="application-name" content="olubalance">
<meta name="msapplication-TileColor" content="#00aba9">
<meta name="msapplication-TileImage" content="/mstile-150x150.png">
<meta name="theme-color" content="#ffffff">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=dLXL9YRL6A">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png?v=dLXL9YRL6A">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png?v=dLXL9YRL6A">
<link rel="manifest" href="/site.webmanifest?v=dLXL9YRL6A">
<link rel="mask-icon" href="/safari-pinned-tab.svg?v=dLXL9YRL6A" color="#366a64">
<link rel="shortcut icon" href="/favicon.ico?v=dLXL9YRL6A">
<meta name="apple-mobile-web-app-title" content="olubalance">
<meta name="application-name" content="olubalance">
<meta name="msapplication-TileColor" content="#366a64">
<meta name="theme-color" content="#366a64">

<%= csrf_meta_tags %>
<%= action_cable_meta_tag %>
Expand Down

0 comments on commit 80720a9

Please sign in to comment.