Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vigetlabs/storyboard
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5a738c5fc85df54fa1febe7c3f696c662551b1b8
Choose a base ref
..
head repository: vigetlabs/storyboard
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 90db8a83aecfad54c38647eef8280a1be1516e03
Choose a head ref
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ gem 'rails', '~> 5.2.1'
gem 'uglifier'
gem 'webpacker', '~> 4.0.7'
gem 'sentry-raven'
gem 'pointless_feedback', '~> 4.1.4'
gem 'pointless_feedback', '~> 4.1.5'
gem 'stat_board', '~> 1.1.0'
gem 'administrate', '~> 0.13.0'
gem "dragonfly"
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -220,7 +220,7 @@ GEM
mini_portile2 (~> 2.4.0)
orm_adapter (0.5.0)
pg (1.1.3)
pointless_feedback (4.1.4)
pointless_feedback (4.1.5)
airrecord (~> 1.0)
jquery-rails (>= 4.0)
rails (>= 4.0)
@@ -373,7 +373,7 @@ DEPENDENCIES
listen (>= 3.0.5, < 3.2)
mimemagic!
pg (>= 0.18, < 2.0)
pointless_feedback (~> 4.1.4)
pointless_feedback (~> 4.1.5)
pry-rails
puma (~> 4.3)
rails (~> 5.2.1)
6 changes: 6 additions & 0 deletions app/controllers/adventures_controller.rb
Original file line number Diff line number Diff line change
@@ -46,6 +46,11 @@ def authenticate
end

def new
if !current_user
flash[:alert] = "You must be logged in to create a story."
return redirect_to new_user_session_path
end

@adventure = Adventure.new
end

@@ -112,6 +117,7 @@ def details
end

def destroy
Rails.logger.info @adventure.content
@adventure.destroy
if current_user
redirect_to my_adventures_url, notice: 'Adventure was successfully destroyed.'
5 changes: 5 additions & 0 deletions app/views/pointless_feedback/messages/new.html.erb
Original file line number Diff line number Diff line change
@@ -45,6 +45,11 @@
<%= f.select :topic, PointlessFeedback.message_topics, { :prompt => true } %>
</div>

<div class="Field">
<%= f.label :url, "Story URL (optional)" %>
<%= f.text_field :url %>
</div>

<div class="Field">
<%= f.label :description %>
<%= f.text_area :description %>
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@

# Use the lowest log level to ensure availability of diagnostic information
# when problems arise.
config.log_level = :debug
config.log_level = :info

# Prepend all log lines with the following tags.
config.log_tags = [ :request_id ]
2 changes: 1 addition & 1 deletion config/initializers/filter_parameter_logging.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Be sure to restart your server when you modify this file.

# Configure sensitive parameters which will be filtered from the log file.
Rails.application.config.filter_parameters += [:password]
Rails.application.config.filter_parameters += [:password, :content]
5 changes: 5 additions & 0 deletions config/initializers/pointless_feedback.rb
Original file line number Diff line number Diff line change
@@ -19,4 +19,9 @@
# Configure the words that will prevent an email from being sent if they are
# contained in the description
config.invalid_words = ['nymphomania']

# ==> URL Field
# Configure URL field in form and email
config.show_url_field = true
config.url_label = "Story URL"
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This migration comes from pointless_feedback (originally 20220518205500)
class AddUrlToPointlessFeedbackMessages < ActiveRecord::Migration[5.2]
def change
add_column :pointless_feedback_messages, :url, :string
end
end
3 changes: 2 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2021_11_24_135224) do
ActiveRecord::Schema.define(version: 2022_05_19_134603) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -57,6 +57,7 @@
t.text "description"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "url"
end

create_table "thumbnails", force: :cascade do |t|
5 changes: 3 additions & 2 deletions spec/features/adventure_spec.rb
Original file line number Diff line number Diff line change
@@ -238,10 +238,11 @@
end
end

it "lets you create a story" do
it "redirects you to the log in page if you attempt to create a story" do
visit "/"
click_on "Create a Story"
expect(page).to have_content("What's your title?")
expect(page).to have_content("You must be logged in to create a story.")
expect(page.current_path).to eq('/users/sign_in')
end

it "does not let you view /mine" do