diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -1,12 +1,12 @@ class ApplicationController < ActionController::Base
-
- include ApplicationHelper
protect_from_forgery with: :exception
before_filter :authenticate!
- private
- def not_found
- raise ActionController::RoutingError.new('Not Found')
- end
+private
+ include ApplicationHelper
+
+ def not_found
+ raise ActionController::RoutingError.new('Not Found')
+ end
end
|
Make the ApplicationHelper module methods private
|
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -9,4 +9,9 @@ 'umlaut.request_id' => request.id)
end
helper_method :url_for_request
+
+ # Alias new_session_path as login_path for default devise config
+ def new_session_path(scope)
+ login_path
+ end
end
|
Add new_session_path helper function to application controller
|
diff --git a/app/controllers/instruments_controller.rb b/app/controllers/instruments_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/instruments_controller.rb
+++ b/app/controllers/instruments_controller.rb
@@ -40,14 +40,4 @@ @instrument.destroy
redirect_to instruments_url, notice: "Successfully destroyed instrument."
end
-
- private
-
- def instrument_params
- # if current_user
- #params.require(:instrument).permit(:title, questions_attributes: [:text, :question_type,
- # :question_identifier, :instrument_id, :_destroy, options_attributes: [:question_id, :text, :next_question]])
- # end
- params.require(:instrument).permit!
- end
end
|
Remove un-used params for instrument controller
|
diff --git a/app/models/content_item_expanded_links.rb b/app/models/content_item_expanded_links.rb
index abc1234..def5678 100644
--- a/app/models/content_item_expanded_links.rb
+++ b/app/models/content_item_expanded_links.rb
@@ -2,7 +2,31 @@ include ActiveModel::Model
attr_accessor :content_id, :previous_version
- TAG_TYPES = %i(taxons ordered_related_items mainstream_browse_pages parent topics organisations).freeze
+ # Temporarily disable ordered_related_items. We can't allow users
+ # to edit these in content tagger until the interface is removed from
+ # panopticon, because panopticon doesn't read tags from publishing api,
+ # and could overwrite them.
+ #
+ # We'll remove it from panopticon when the javascript is done.
+ # https://github.com/alphagov/content-tagger/pull/245
+ LIVE_TAG_TYPES = %i(
+ taxons
+ mainstream_browse_pages
+ parent
+ topics
+ organisations
+ ).freeze
+
+ TEST_TAG_TYPES = %i(
+ taxons
+ ordered_related_items
+ mainstream_browse_pages
+ parent
+ topics
+ organisations
+ ).freeze
+
+ TAG_TYPES = Rails.env.production? ? LIVE_TAG_TYPES : TEST_TAG_TYPES
attr_accessor(*TAG_TYPES)
|
Hide related links behind a feature toggle
We're temporarily disabling this, because there is more work to do
on the frontend side, but we'd like to merge this branch now
so it doesn't fall behind master.
The tests still run with this functionality enabled.
|
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -1,6 +1,5 @@ class UsersController < ApplicationController
skip_before_filter :require_login, :only => [:new, :create]
- before_action :set_date_format, only: [:create, :update]
def new
@user = User.new
@@ -8,8 +7,9 @@
def create
@user = User.new(user_params)
+ @user.birth_date = Date.strptime(params["#{user_type}"]['birth_date'], '%m/%d/%Y').to_date
if @user.save
- flash[:success] = 'Bienvenido !'
+ flash[:success] = 'Registro exitoso, inicie sesión para continuar.'
redirect_to login_path
else
flash[:error] = @user.errors.full_messages.join(',')
@@ -22,15 +22,16 @@ end
def user_params
- params.require(:user).permit(:username, :first_name, :last_name,
- :birth_date, :email,
- :password, :password_confirmation, :type)
+ params.require(user_type.to_sym).permit(params["#{user_type}"].symbolize_keys.keys)
end
- def set_date_format
- formatted_date = (params['user']['birth_date']).to_date
- params['user'].merge(birth_date: formatted_date)
+ def user_type
+ if params['user']
+ 'user'
+ elsif params['lease_holder']
+ 'lease_holder'
+ end
end
- private :set_date_format
+ private :user_type
end
|
Add user_type to handle User STI params.
|
diff --git a/app/jobs/periodic_serverspec_job.rb b/app/jobs/periodic_serverspec_job.rb
index abc1234..def5678 100644
--- a/app/jobs/periodic_serverspec_job.rb
+++ b/app/jobs/periodic_serverspec_job.rb
@@ -17,6 +17,9 @@ wait_until: schedule.next_run
).perform_later(physical_id, infra_id, user_id)
- ServerspecJob.perform_now(physical_id, infra_id, user_id)
+ status = schedule.resource.infrastructure.ec2.instances[physical_id].status
+ if status == :running
+ ServerspecJob.perform_now(physical_id, infra_id, user_id)
+ end
end
end
|
Check if instance is running before running serverspec
|
diff --git a/.config.rb b/.config.rb
index abc1234..def5678 100644
--- a/.config.rb
+++ b/.config.rb
@@ -1,5 +1,9 @@+#
+# Setup QED.
+#
qed do
+ # Just to demonstrate profiles.
profile :sample do
puts ("*" * 78)
puts
@@ -10,6 +14,7 @@ end
end
+ # Create coverage report.
profile :cov do
require 'simplecov'
SimpleCov.start do
@@ -18,24 +23,4 @@ end
end
- profile :rcov do
- require 'rcov';
- #require 'rcov/report'
-
- $qed_rcov_analyzer = Rcov::CodeCoverageAnalyzer.new
-
- at_exit do
- $qed_rcov_analyzer.remove_hook;
- $qed_rcov_analyzer.dump_coverage_info([Rcov::TextReport.new]);
- Rcov::HTMLCoverage.new(
- :color => true,
- :fsr => 30,
- :destdir => "log/rcov",
- :callsites => false,
- :cross_references => false,
- :charset => nil
- ).execute
- end
- end
-
end
|
Remove rdoc profile, we use simplcov now. [admin]
|
diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb
index abc1234..def5678 100644
--- a/config/initializers/cookies_serializer.rb
+++ b/config/initializers/cookies_serializer.rb
@@ -1,2 +1,2 @@ # Be sure to restart your server when you modify this file.
-Rails.application.config.action_dispatch.cookies_serializer = :json
+Rails.application.config.action_dispatch.cookies_serializer = :hybrid
|
Fix old sessions not being recognized
|
diff --git a/app/controllers/omnisocial/auth_controller.rb b/app/controllers/omnisocial/auth_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/omnisocial/auth_controller.rb
+++ b/app/controllers/omnisocial/auth_controller.rb
@@ -20,7 +20,7 @@
self.current_user = account.find_or_create_user
- flash[:message] = 'You have logged in successfully.'
+ flash[:notice] = 'You have logged in successfully.'
redirect_back_or_default(root_path)
end
|
Send the successful login message via flash[:notice] instead of flash[:message]
|
diff --git a/app/decorators/meals/portion_count_builder.rb b/app/decorators/meals/portion_count_builder.rb
index abc1234..def5678 100644
--- a/app/decorators/meals/portion_count_builder.rb
+++ b/app/decorators/meals/portion_count_builder.rb
@@ -34,7 +34,7 @@ end
def formula_parts_by_category
- @formula_parts_by_category ||= formula.parts.group_by(&:category)
+ @formula_parts_by_category ||= formula.parts.includes(:type).group_by(&:category)
end
end
end
|
72: Add eager loading in PortionCountBuilder
|
diff --git a/Casks/android-studio-canary.rb b/Casks/android-studio-canary.rb
index abc1234..def5678 100644
--- a/Casks/android-studio-canary.rb
+++ b/Casks/android-studio-canary.rb
@@ -1,6 +1,6 @@ cask 'android-studio-canary' do
- version '2.1.0.5,143.2759333'
- sha256 '8a76eb901646d340b4edf2fb0b0475d457a2b30ef019fa4b5c2f5891695d47ea'
+ version '2.1.0.6,143.2765781'
+ sha256 'dddffb0ba11a1cf9c3f3977a0118e1b9aa9736d41b6ce700915f9dc03fe6c7f8'
url "https://dl.google.com/dl/android/studio/ide-zips/#{version.before_comma}/android-studio-ide-#{version.after_comma}-mac.zip"
name 'Android Studio Canary'
|
Update Android Studio Canary to 2.1 Beta 2
|
diff --git a/Casks/sbig-universal-driver.rb b/Casks/sbig-universal-driver.rb
index abc1234..def5678 100644
--- a/Casks/sbig-universal-driver.rb
+++ b/Casks/sbig-universal-driver.rb
@@ -0,0 +1,13 @@+cask 'sbig-universal-driver' do
+ version :latest
+ sha256 :no_check
+
+ # ftp.sbig.com was verified as official when first introduced to the cask
+ url 'ftp://ftp.sbig.com/pub/SBIGDriverInstallerUniv.dmg'
+ name 'SBIG Universal Driver'
+ homepage 'http://diffractionlimited.com/'
+
+ pkg 'SBIG Universal Driver Installer 4r84.pkg', allow_untrusted: true
+
+ uninstall pkgutil: ['com.sbig']
+end
|
Add SBIG Universal Driver (latest version)
|
diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb
index abc1234..def5678 100644
--- a/config/initializers/cookies_serializer.rb
+++ b/config/initializers/cookies_serializer.rb
@@ -2,4 +2,4 @@
# Specify a serializer for the signed and encrypted cookie jars.
# Valid options are :json, :marshal, and :hybrid.
-Rails.application.config.action_dispatch.cookies_serializer = :json
+Rails.application.config.action_dispatch.cookies_serializer = :hybrid
|
Fix scoreboard for users who have previously visited the site
|
diff --git a/config/software/datadog-upgrade-helper.rb b/config/software/datadog-upgrade-helper.rb
index abc1234..def5678 100644
--- a/config/software/datadog-upgrade-helper.rb
+++ b/config/software/datadog-upgrade-helper.rb
@@ -1,9 +1,15 @@ name "datadog-upgrade-helper"
-default_version "master"
+
source github: "DataDog/dd-agent-windows-upgrade-helper"
env = {
"GOPATH" => "#{Omnibus::Config.cache_dir}/src/#{name}",
}
+helper_branch = ENV["UPGRADE_HELPER_BRANCH"]
+if helper_branch.nil? || helper_branch.empty?
+ default_version "master"
+else
+ default_version helper_branch
+end
if ohai["platform"] == "windows"
gobin = "C:/Go/bin/go"
|
Add ability to specify UPGRADE_HELPER_BRANCH in environment
|
diff --git a/spec/acceptance/masterless_spec.rb b/spec/acceptance/masterless_spec.rb
index abc1234..def5678 100644
--- a/spec/acceptance/masterless_spec.rb
+++ b/spec/acceptance/masterless_spec.rb
@@ -0,0 +1,29 @@+require 'spec_helper_acceptance'
+
+describe 'puppet::masterless' do
+ let(:manifest) { <<-EOS
+ package { 'gawk': ensure => installed }
+
+ class { 'puppet::masterless': }
+ EOS
+ }
+
+ specify 'should provision with no errors' do
+ apply_manifest(manifest, :catch_failures => true)
+ end
+
+ specify 'should be idempotent' do
+ apply_manifest(manifest, :catch_changes => true)
+ end
+
+ describe file('/etc/cron.daily/puppet-apply') do
+ it { should be_file }
+ it { should be_owned_by 'root' }
+ it { should be_grouped_into 'root' }
+ it { should be_mode 755 }
+ end
+
+ describe command('/etc/cron.daily/puppet-apply') do
+ its(:exit_status) { should eq 0 }
+ end
+end
|
Add test for masterless mode
|
diff --git a/config/initializers/carrier_wave.rb b/config/initializers/carrier_wave.rb
index abc1234..def5678 100644
--- a/config/initializers/carrier_wave.rb
+++ b/config/initializers/carrier_wave.rb
@@ -1,9 +1,10 @@ CarrierWave.configure do |config|
config.fog_credentials = {
- :provider => 'AWS',
- :aws_access_key_id => ENV['AWS_ACCESS_KEY'],
- :aws_secret_access_key => ENV['AWS_ACCESS_SECRET'],
+ provider: 'AWS',
+ aws_access_key_id: ENV['AWS_ACCESS_KEY'],
+ aws_secret_access_key: ENV['AWS_ACCESS_SECRET'],
+ region: 'ap-northeast-1'
}
config.fog_directory = 'quoty'
config.fog_attributes = {'Cache-Control'=>'max-age=315576000'}
-end+end
|
Set region for s3 credentials
|
diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb
index abc1234..def5678 100644
--- a/config/initializers/secret_token.rb
+++ b/config/initializers/secret_token.rb
@@ -4,4 +4,4 @@ # If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
-Pmacctstats::Application.config.secret_token = '67036c5a58e6c7d0592245fe91b0ce52de9689454142fd429b4e076198e0f833d0940c87bdb447c953a41c29ee40d028bd47f546f6055de4d305961829f8c64a'
+Pmacctstats::Application.config.secret_token = ENV['SECRET_TOKEN']
|
Fix a long-forgotten security problem :)
|
diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb
index abc1234..def5678 100644
--- a/config/initializers/secret_token.rb
+++ b/config/initializers/secret_token.rb
@@ -3,5 +3,6 @@ # Your secret key for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
-# no regular words or you'll be exposed to dictionary attacks.
-AlmReport::Application.config.secret_token = '***REMOVED***'
+# no regularexi words or you'll be exposed to dictionary attacks.
+
+AlmReport::Application.config.secret_token = APP_CONFIG['secret_token']
|
Remove secret token from current config.
|
diff --git a/lib/affiliate_window/etl/config.rb b/lib/affiliate_window/etl/config.rb
index abc1234..def5678 100644
--- a/lib/affiliate_window/etl/config.rb
+++ b/lib/affiliate_window/etl/config.rb
@@ -23,7 +23,7 @@ end
def last_n_days
- env.fetch("LAST_N_DAYS", 7)
+ env.fetch("LAST_N_DAYS", "7").to_i
end
def output_stream
|
Fix etl startup when LAST_N_DAYS is set
When the LAST_N_DAYS environment variable is set
then the etl fails as environment variables are
always strings... and ruby is a strongly typed language.
|
diff --git a/db/migrate/20150625231923_create_users.rb b/db/migrate/20150625231923_create_users.rb
index abc1234..def5678 100644
--- a/db/migrate/20150625231923_create_users.rb
+++ b/db/migrate/20150625231923_create_users.rb
@@ -8,6 +8,8 @@ t.string :password_hash
t.boolean :in_office
+ t.references :user_group
+
t.timestamps
end
end
|
Add reference to user_group in User migration
|
diff --git a/lib/openstax/rescue_from/engine.rb b/lib/openstax/rescue_from/engine.rb
index abc1234..def5678 100644
--- a/lib/openstax/rescue_from/engine.rb
+++ b/lib/openstax/rescue_from/engine.rb
@@ -3,18 +3,6 @@ module OpenStax
module RescueFrom
class Engine < ::Rails::Engine
- ActionController::Base.send :include, Controller
-
- initializer 'openstax.rescue_from.inflection' do
- ActiveSupport::Inflector.inflections do |inflect|
- inflect.acronym 'OpenStax'
- end
- end
-
- initializer "openstax.rescue_from.view_helpers" do
- ActionView::Base.send :include, ViewHelpers
- end
-
initializer "openstax.rescue_from.use_exception_notification_middleware" do
Rails.application.config.middleware.use ExceptionNotification::Rack, email: {
email_prefix: RescueFrom.configuration.email_prefix,
@@ -29,3 +17,11 @@ end
end
end
+
+ActionController::Base.send :include, Controller
+
+ActiveSupport::Inflector.inflections do |inflect|
+ inflect.acronym 'OpenStax'
+end
+
+ActionView::Base.send :include, ViewHelpers
|
Move all includes into their own realm
|
diff --git a/lib/tasks/fulltext_searchable.rake b/lib/tasks/fulltext_searchable.rake
index abc1234..def5678 100644
--- a/lib/tasks/fulltext_searchable.rake
+++ b/lib/tasks/fulltext_searchable.rake
@@ -14,10 +14,17 @@ task :rebuild => :environment do
puts "Rebuilding FulltextIndex..."
- # read all models
+ # load all models
require 'active_record'
- Dir["#{Rails.root}/app/models/*"].each do |file|
- require file if File::ftype(file) == "file"
+ base_path = "#{Rails.root}/app/models/"
+ Dir["#{base_path}**/*.rb"].map do |filename|
+ filename.gsub(base_path, '').chomp('.rb').camelize
+ end.flatten.reject { |m| m.starts_with?('Concerns::') }.each do |m|
+ begin
+ m.constantize
+ rescue LoadError
+ puts "Failed to load '#{m}'. Assuming non-existent.."
+ end
end
FulltextIndex.rebuild_all
|
Rebuild task didn't play nice with autoloading
|
diff --git a/lib/totally_tabular/html_helper.rb b/lib/totally_tabular/html_helper.rb
index abc1234..def5678 100644
--- a/lib/totally_tabular/html_helper.rb
+++ b/lib/totally_tabular/html_helper.rb
@@ -1,7 +1,8 @@ module TotallyTabular
class HtmlHelper
- EMPTY_TAG = /br|input|img/
+ EMPTY_TAG = /br|hr|img|meta|link|input|base|area|col|frame|param/
+
def content_tag(tag, content="", attributes={})
if tag.to_s =~ EMPTY_TAG
"<%s%s>" % [tag, attrs(attributes)]
|
Add unpaired tags from TextMate bundle
|
diff --git a/lib/manifestation.rb b/lib/manifestation.rb
index abc1234..def5678 100644
--- a/lib/manifestation.rb
+++ b/lib/manifestation.rb
@@ -4,7 +4,7 @@ require 'ostruct'
%w(build content parse source template version).each do |lib|
- require File.join File.expand_path("./lib"), "manifestation/#{lib}"
+ require File.join File.dirname(__FILE__), "manifestation/#{lib}"
end
class Manifestation
|
Update require statement in base file.
|
diff --git a/test/unit/test_transparent_pdfs.rb b/test/unit/test_transparent_pdfs.rb
index abc1234..def5678 100644
--- a/test/unit/test_transparent_pdfs.rb
+++ b/test/unit/test_transparent_pdfs.rb
@@ -2,7 +2,7 @@ require File.join(here, '..', 'test_helper')
require 'tmpdir'
-class TransparentPDFsTest < Test::Unit::TestCase
+class TransparentPDFsTest < Minitest::Test
def setup
@klass = Class.new
|
Update merged test to minitest
|
diff --git a/spec/gaffe/errors_spec.rb b/spec/gaffe/errors_spec.rb
index abc1234..def5678 100644
--- a/spec/gaffe/errors_spec.rb
+++ b/spec/gaffe/errors_spec.rb
@@ -5,13 +5,17 @@ describe :show do
let(:request) { ActionDispatch::TestRequest.new }
let(:env) { request.env.merge 'action_dispatch.exception' => exception }
+ let(:status) { response.first }
+ let(:body) { response.last.body }
- let(:response) { Gaffe.errors_controller_for_request(env).action(:show).call(env).last }
+ let(:response) do
+ Gaffe.errors_controller_for_request(env).action(:show).call(env)
+ end
context 'with builtin exception' do
let(:exception) { ActionController::RoutingError.new(:foo) }
- it { expect(response.status).to eql 404 }
- it { expect(response.body).to match(/Not Found/) }
+ it { expect(status).to eql 404 }
+ it { expect(body).to match(/Not Found/) }
end
context 'with custom exception and missing view' do
@@ -23,8 +27,8 @@ end
let(:exception) { exception_class.new }
- it { expect(response.status).to eql 500 }
- it { expect(response.body).to match(/Internal Server Error/) }
+ it { expect(status).to eql 500 }
+ it { expect(body).to match(/Internal Server Error/) }
end
end
end
|
Fix tests to make them work with Rails 4.2
|
diff --git a/spec/models/route_spec.rb b/spec/models/route_spec.rb
index abc1234..def5678 100644
--- a/spec/models/route_spec.rb
+++ b/spec/models/route_spec.rb
@@ -21,7 +21,8 @@ end
it "should create a new instance given valid attributes" do
- Route.create!(@valid_attributes)
+ route = Route.new(@valid_attributes)
+ route.valid?.should be_true
end
describe 'when finding existing routes' do
|
Fix route spec to avoid contraint violation
|
diff --git a/lib/owners/search.rb b/lib/owners/search.rb
index abc1234..def5678 100644
--- a/lib/owners/search.rb
+++ b/lib/owners/search.rb
@@ -33,7 +33,7 @@ end
def subscriptions
- trees.flat_map(&:owner_files).uniq.product([nil])
+ trees.flat_map(&:owner_files).uniq
end
def trees
|
Remove an unnecessary call to `product([nil])`
|
diff --git a/spec/system/login_spec.rb b/spec/system/login_spec.rb
index abc1234..def5678 100644
--- a/spec/system/login_spec.rb
+++ b/spec/system/login_spec.rb
@@ -0,0 +1,12 @@+require 'rails_helper'
+
+describe 'Logging In' do
+ before do
+ driven_by :selenium_chrome_headless
+ end
+
+ it 'shows the right page' do
+ visit root_url
+ expect(page).to have_content 'Hello World'
+ end
+end
|
Make system directory and failing test
|
diff --git a/lib/slatan/spirit.rb b/lib/slatan/spirit.rb
index abc1234..def5678 100644
--- a/lib/slatan/spirit.rb
+++ b/lib/slatan/spirit.rb
@@ -26,7 +26,9 @@ :log_file_path,
:log_level,
:use_log,
- :pid_file_path
+ :pid_file_path,
+ :ignore_bot_reply,
+ :ignore_self_message
end
end
end
|
Add ignore_bot_reply, ignore_self_message to attr_accessor
|
diff --git a/lib/withings/base.rb b/lib/withings/base.rb
index abc1234..def5678 100644
--- a/lib/withings/base.rb
+++ b/lib/withings/base.rb
@@ -1,6 +1,8 @@ module Withings
SCALE = 1
BLOOD_PRESSURE_MONITOR = 4
+ PULSE = 16
+ SLEEP_MONITOR = 32
def self.consumer_secret=(value)
@consumer_secret = value
@@ -31,4 +33,4 @@ end
end
end
-end+end
|
Add Pulse and Sleep Monitor to the devices IDs
|
diff --git a/Library/Homebrew/cmd/leaves.rb b/Library/Homebrew/cmd/leaves.rb
index abc1234..def5678 100644
--- a/Library/Homebrew/cmd/leaves.rb
+++ b/Library/Homebrew/cmd/leaves.rb
@@ -13,9 +13,9 @@ f.deps.each do |dep|
if dep.optional? || dep.recommended?
tab = Tab.for_formula(f)
- deps << dep.name if tab.with?(dep.name)
+ deps << dep.to_formula.name if tab.with?(dep.to_formula.name)
else
- deps << dep.name
+ deps << dep.to_formula.name
end
end
|
Use name of formula rather than name of dependency
Closes Homebrew/homebrew#27192.
Signed-off-by: Jack Nagel <43386ce32af96f5c56f2a88e458cb94cebee3751@gmail.com>
|
diff --git a/core/app/views/users/_user.jbuilder b/core/app/views/users/_user.jbuilder
index abc1234..def5678 100644
--- a/core/app/views/users/_user.jbuilder
+++ b/core/app/views/users/_user.jbuilder
@@ -23,4 +23,9 @@ if is_current_user
json.receives_mailed_notifications user.receives_mailed_notifications
json.receives_digest user.receives_digest
+
+ json.services do |json|
+ json.twitter !!user.identities['twitter']
+ json.facebook !!user.identities['facebook']
+ end
end
|
Return in currentUser whether services are connected
|
diff --git a/acceptance/features/support/env.rb b/acceptance/features/support/env.rb
index abc1234..def5678 100644
--- a/acceptance/features/support/env.rb
+++ b/acceptance/features/support/env.rb
@@ -4,6 +4,9 @@
require_relative 'visitor_agent'
require_relative 'app_descriptor'
+
+# Set longer wait time since we're hitting external services
+Capybara.default_wait_time = 30
MAGIC_NUMBERS = OpenStruct.new({
valid: "+15005550006",
|
Set longer wait time for acceptance tests since we're hitting external services
|
diff --git a/action_cable_notifications.gemspec b/action_cable_notifications.gemspec
index abc1234..def5678 100644
--- a/action_cable_notifications.gemspec
+++ b/action_cable_notifications.gemspec
@@ -16,8 +16,8 @@
s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md"]
- s.add_dependency "rails", "~> 5.0.0", ">= 5.0.0.1"
- s.add_dependency "lodash-rails", "~> 4.15.0"
+ s.add_dependency "rails", ">= 5.0.0.1"
+ s.add_dependency "lodash-rails", ">= 4.15.0"
s.add_development_dependency "sqlite3"
s.add_development_dependency 'pry'
|
Fix gem dependencies for rails >= 5.0.0.1 and lodash
|
diff --git a/lib/saxlsx/rows_collection.rb b/lib/saxlsx/rows_collection.rb
index abc1234..def5678 100644
--- a/lib/saxlsx/rows_collection.rb
+++ b/lib/saxlsx/rows_collection.rb
@@ -15,7 +15,7 @@ end
def count
- @count ||= @sheet.match(/<dimension ref="[^:]+:[A-Z]+(\d+)"/)[1].to_i
+ @count ||= @sheet.match(/<dimension ref="[^:]+:[A-Z]*(\d+)"/)[1].to_i
end
alias :size :count
|
Fix count when ref is just numbers '1:255'
|
diff --git a/lib/simple_solr/core/index.rb b/lib/simple_solr/core/index.rb
index abc1234..def5678 100644
--- a/lib/simple_solr/core/index.rb
+++ b/lib/simple_solr/core/index.rb
@@ -2,7 +2,7 @@ # Add the given hash or array of hashes
# @return self
def add_docs(*hash_or_hashes)
- update(hash_or_hashes)
+ update(hash_or_hashes.flatten)
self
end
|
Fix fv_search to put parens around ssearch terms
|
diff --git a/lib/tracks_attributes/base.rb b/lib/tracks_attributes/base.rb
index abc1234..def5678 100644
--- a/lib/tracks_attributes/base.rb
+++ b/lib/tracks_attributes/base.rb
@@ -12,6 +12,7 @@ class Base
extend ClassMethods
include ActiveModel::Validations
+ tracks_attributes
##
# The standard create class method needed by a class that implements
@@ -34,7 +35,6 @@ # @param [Hash] options to be passed onto the initialize method.
#
def initialize(attributes = {}, options = {})
- self.class.tracks_attributes(options) unless self.class.respond_to? :attr_info_for
self.all_attributes = attributes
end
end
|
Move the call to tracks_attributes to the class def from initialize
|
diff --git a/smartcoin.gemspec b/smartcoin.gemspec
index abc1234..def5678 100644
--- a/smartcoin.gemspec
+++ b/smartcoin.gemspec
@@ -18,6 +18,8 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]
+ spec.add_dependency "rest-client", "~> 1.6.7"
+
spec.add_development_dependency "bundler", "~> 1.6"
spec.add_development_dependency "rake"
spec.add_development_dependency "rspec", "~> 2.14.0"
|
BugFix: Include gem dependency - rest-client
|
diff --git a/app/controllers/otus_controller.rb b/app/controllers/otus_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/otus_controller.rb
+++ b/app/controllers/otus_controller.rb
@@ -25,7 +25,7 @@ end
def show
- otu = Otu.find(params[:id])
+ @otu = Otu.find(params[:id])
end
def edit
|
Fix missing @ on otu
|
diff --git a/app/mailers/distribution_mailer.rb b/app/mailers/distribution_mailer.rb
index abc1234..def5678 100644
--- a/app/mailers/distribution_mailer.rb
+++ b/app/mailers/distribution_mailer.rb
@@ -9,7 +9,8 @@ @distribution = distribution
@default_email_text = current_organization.default_email_text
@comment = distribution.comment
+ @from_email = current_organization.email || current_organization.users.first.email
attachments[format("%s %s.pdf", @partner.name, @distribution.created_at.strftime("%Y-%m-%d"))] = DistributionPdf.new(current_organization, @distribution).render
- mail(to: @partner.email, from: current_organization.email, subject: "Your Distribution")
+ mail(to: @partner.email, from: @from_email, subject: "Your Distribution")
end
end
|
Address a problem when a diaper bank doesnt have an email listed. Have it fall back to the email of the first user of the diaperbank.
|
diff --git a/rspec-hal.gemspec b/rspec-hal.gemspec
index abc1234..def5678 100644
--- a/rspec-hal.gemspec
+++ b/rspec-hal.gemspec
@@ -21,5 +21,5 @@ spec.add_development_dependency "rake", "~> 10.1"
spec.add_runtime_dependency "rspec", ">= 2.0", "< 4.0.0.pre"
- spec.add_runtime_dependency "hal-client", "~> 2.4"
+ spec.add_runtime_dependency "hal-client", "> 2.4"
end
|
Allow hal-client version to float into 3.x series
|
diff --git a/rubycards.gemspec b/rubycards.gemspec
index abc1234..def5678 100644
--- a/rubycards.gemspec
+++ b/rubycards.gemspec
@@ -6,8 +6,8 @@ Gem::Specification.new do |gem|
gem.name = "rubycards"
gem.version = RubyCards::VERSION
- gem.authors = ["Jordan Scales", "Joe Letizia"]
- gem.email = ["scalesjordan@gmail.com", "joe.letizia@gmail.com"]
+ gem.authors = ["Jordan Scales", "Joe Letizia", "Justin Workman"]
+ gem.email = ["scalesjordan@gmail.com", "joe.letizia@gmail.com", "xtagon@gmail.com"]
gem.description = "RubyCards"
gem.summary = "A 52 card gem"
gem.homepage = "https://github.com/prezjordan/rubycards"
|
Add Justin Workman as an author in gemspec.
Woohoo!
|
diff --git a/danger-gitlab.gemspec b/danger-gitlab.gemspec
index abc1234..def5678 100644
--- a/danger-gitlab.gemspec
+++ b/danger-gitlab.gemspec
@@ -13,6 +13,6 @@ spec.files = %w(README.md LICENSE)
spec.required_ruby_version = ">= 2.3.0"
- spec.add_runtime_dependency "danger", "~> 8.0"
+ spec.add_runtime_dependency "danger"
spec.add_runtime_dependency "gitlab", "~> 4.2" ,">= 4.2.0"
end
|
Remove pinning from danger dependency
|
diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb
index abc1234..def5678 100644
--- a/config/initializers/secret_token.rb
+++ b/config/initializers/secret_token.rb
@@ -5,3 +5,4 @@ # Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
TradeTariffAdmin::Application.config.secret_token = 'fe3757599549043ce0bad252b0088289054f6e46ed5bfcd1e27df264ed724f39948281969defb39cbd250c600d67dcdbcec9b58d29419969c93d3b1a96b4e2c3'
+TradeTariffAdmin::Application.config.secret_key_base = 'aa5712faf8f6ef63d90f6581c53072ef2f36714d9ca15fbb55bfae7e42c1183ed4bde59a4663df9bd41dd949aec62b3b0f045de05c01352ebc64fd40a83fc625'
|
Add secret_key_base for encrypted cookies
|
diff --git a/activerecord/lib/active_record/relation/predicate_builder.rb b/activerecord/lib/active_record/relation/predicate_builder.rb
index abc1234..def5678 100644
--- a/activerecord/lib/active_record/relation/predicate_builder.rb
+++ b/activerecord/lib/active_record/relation/predicate_builder.rb
@@ -20,7 +20,9 @@ table = Arel::Table.new(table_name, :engine => @engine)
end
- attribute = table[column]
+ unless attribute = table[column]
+ raise StatementInvalid, "No attribute named `#{column}` exists for table `#{table.name}`"
+ end
case value
when Array, ActiveRecord::Associations::AssociationCollection, ActiveRecord::Relation
|
Raise a StatementInvalid error when trying to build a condition with hash keys that do not correspond to columns.
|
diff --git a/db/migrate/20151206031947_create_root_user.rb b/db/migrate/20151206031947_create_root_user.rb
index abc1234..def5678 100644
--- a/db/migrate/20151206031947_create_root_user.rb
+++ b/db/migrate/20151206031947_create_root_user.rb
@@ -2,7 +2,7 @@ def up
user = User.new
user.id = 0
- user.email = ENV["ROOT_EMAIL"].blank? ? Myplaceonline::DEFAULT_SUPPORT_EMAIL : ENV["ROOT_EMAIL"].blank?
+ user.email = ENV["ROOT_EMAIL"].blank? ? Myplaceonline::DEFAULT_SUPPORT_EMAIL : ENV["ROOT_EMAIL"]
user.password = ENV["ROOT_PASSWORD"].blank? ? "password" : ENV["SECRET_KEY_BASE"]
user.password_confirmation = user.password
user.confirmed_at = Time.now
|
Fix production email in migration
|
diff --git a/lib/capistrano/forkcms/defaults.rb b/lib/capistrano/forkcms/defaults.rb
index abc1234..def5678 100644
--- a/lib/capistrano/forkcms/defaults.rb
+++ b/lib/capistrano/forkcms/defaults.rb
@@ -7,13 +7,13 @@
# Run required tasks after the stage
Capistrano::DSL.stages.each do |stage|
- after stage, 'forkcms:configure_composer'
+ after stage, "forkcms:configure_composer"
end
# Make sure the composer executable is installed
namespace :deploy do
- after :starting, 'composer:install_executable'
+ after :starting, "composer:install_executable"
end
|
Use " instead of '
|
diff --git a/attributes/client.rb b/attributes/client.rb
index abc1234..def5678 100644
--- a/attributes/client.rb
+++ b/attributes/client.rb
@@ -20,7 +20,14 @@ libperconaserverclient#{abi_version}-dev percona-server-client-#{version}
]
when "rhel"
- default["percona"]["client"]["packages"] = %W[
- Percona-Server-devel-#{version} Percona-Server-client-#{version}
- ]
+ case node["percona"]["server"]["role"]
+ when "standalone"
+ default["percona"]["client"]["packages"] = %W[
+ Percona-Server-devel-#{version} Percona-Server-client-#{version}
+ ]
+ when "cluster"
+ default["percona"]["client"]["packages"] = %W[
+ Percona-XtraDB-Cluster-devel-#{version} Percona-XtraDB-Cluster-client-#{version}
+ ]
+ end
end
|
Fix package list for clusters based on CentOS
|
diff --git a/cookbooks/cicd_infrastructure/recipes/integration_gerrit_ldap.rb b/cookbooks/cicd_infrastructure/recipes/integration_gerrit_ldap.rb
index abc1234..def5678 100644
--- a/cookbooks/cicd_infrastructure/recipes/integration_gerrit_ldap.rb
+++ b/cookbooks/cicd_infrastructure/recipes/integration_gerrit_ldap.rb
@@ -18,8 +18,7 @@ end
template "#{node['gerrit']['install_dir']}/etc/gerrit.config" do
- source 'gerrit/gerrit.config'
- cookbook 'gerrit'
+ source 'gerrit/gerrit.config.erb'
owner node['gerrit']['user']
group node['gerrit']['group']
mode 0644
|
[DMG-406] Use improved gerrit.config template for ldap setup
|
diff --git a/scss-lint.gemspec b/scss-lint.gemspec
index abc1234..def5678 100644
--- a/scss-lint.gemspec
+++ b/scss-lint.gemspec
@@ -17,7 +17,7 @@ s.executables = ['scss-lint']
s.files = Dir['config/**/*.yml'] +
- Dir['data/**'] +
+ Dir['data/**/*'] +
Dir['lib/**/*.rb']
s.required_ruby_version = '>= 1.9.3'
|
Fix glob for data directory
This was only including files in the `data` directory, excluding
subdirectories.
Change-Id: I8a276678e0cd495196c11808ad3e3e0cdddf5c9b
Reviewed-on: http://gerrit.causes.com/40952
Tested-by: jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@causes.com>
Reviewed-by: Shane da Silva <67fb7bfe39f841b16a1f86d3928acc568d12c716@brigade.com>
|
diff --git a/birth_number.gemspec b/birth_number.gemspec
index abc1234..def5678 100644
--- a/birth_number.gemspec
+++ b/birth_number.gemspec
@@ -21,7 +21,7 @@ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) }
spec.require_paths = ['lib']
- spec.required_ruby_version = '>= 2.0'
+ spec.required_ruby_version = '>= 2.1'
spec.add_development_dependency 'bundler', '~> 1.10'
spec.add_development_dependency 'rake', '~> 10.0'
|
Set support for minimum Ruby version to 2.1
|
diff --git a/lib/miq_tools_services/bugzilla.rb b/lib/miq_tools_services/bugzilla.rb
index abc1234..def5678 100644
--- a/lib/miq_tools_services/bugzilla.rb
+++ b/lib/miq_tools_services/bugzilla.rb
@@ -14,7 +14,11 @@ def service
@service ||= begin
require 'active_bugzilla'
- bz = ActiveBugzilla::Service.new(*credentials.values_at("bugzilla_uri", "username", "password"))
+ bz = ActiveBugzilla::Service.new(
+ credentials["bugzilla_uri"],
+ credentials["username"],
+ credentials["password"]
+ )
ActiveBugzilla::Base.service = bz
end
end
|
Support RailsConfig objects for credentials
|
diff --git a/coursemology2/db/transforms/models/default.rb b/coursemology2/db/transforms/models/default.rb
index abc1234..def5678 100644
--- a/coursemology2/db/transforms/models/default.rb
+++ b/coursemology2/db/transforms/models/default.rb
@@ -1,3 +1,3 @@ module CoursemologyV1::Source
- def_model 'user_courses', 'announcements', 'achievements', 'levels', 'user_achievements'
+ def_model 'user_courses', 'announcements', 'achievements', 'levels'
end
|
Remove duplicate declaration of user_achievements
|
diff --git a/lib/serverspec/commands/freebsd.rb b/lib/serverspec/commands/freebsd.rb
index abc1234..def5678 100644
--- a/lib/serverspec/commands/freebsd.rb
+++ b/lib/serverspec/commands/freebsd.rb
@@ -1,13 +1,11 @@-require 'shellwords'
-
module Serverspec
module Commands
class FreeBSD < Base
- def check_enabled(service)
+ def check_enabled(service, level=3)
"service -e | grep -- #{escape(service)}"
end
- def check_installed(package)
+ def check_installed(package, version=nil)
"pkg_version -X -s #{escape(package)}"
end
|
Fix arguments of the methods
|
diff --git a/lib/smart_answer/question/value.rb b/lib/smart_answer/question/value.rb
index abc1234..def5678 100644
--- a/lib/smart_answer/question/value.rb
+++ b/lib/smart_answer/question/value.rb
@@ -10,16 +10,16 @@ if Integer == @parse
begin
Integer(raw_input)
- rescue TypeError => e
- raise InvalidResponse, e.message
+ rescue TypeError
+ raise InvalidResponse
end
elsif :to_i == @parse
raw_input.to_i
elsif Float == @parse
begin
Float(raw_input)
- rescue TypeError => e
- raise InvalidResponse, e.message
+ rescue TypeError
+ raise InvalidResponse
end
elsif :to_f == @parse
raw_input.to_f
|
Remove unused and therefore confusing exception message
As discussed here [1], the exception message is only ever used as a key to
**lookup** an error message from the locale files.
Looking at the original code [2] which motivated the introduction of this
`rescue` clause, it was simply raising an `InvalidResponse` exception
without explicitly setting a message.
So I've now changed the code so it no longer sets a message on the
`InvalidResponse` exception - this means the code is as similar as possible to
the original.
Note that this commit has not changed the behaviour visible to users, because
there is no key with the name: `:"can't convert nil into Integer"` in the
locale files.
[1]: https://github.com/alphagov/smart-answers/commit/d7b66ed91bc0cb5334a0de1884787c61a0d5cc01#commitcomment-11361001
[2]: 28785dd848d206e80e82c6c147b0db719258862a
|
diff --git a/Casks/adobe-reader.rb b/Casks/adobe-reader.rb
index abc1234..def5678 100644
--- a/Casks/adobe-reader.rb
+++ b/Casks/adobe-reader.rb
@@ -1,6 +1,6 @@ cask :v1 => 'adobe-reader' do
- version '2015.007.20033'
- sha256 '46703ba27599512223e9b89c308075a0ddb625287be8e22a87574dfc70a77eb5'
+ version '2015.008.20082'
+ sha256 'bff60679ff22e97addc4d6cb7baa60276e076fa6e1501289e2f89eddbf5f34a8'
url "http://ardownload.adobe.com/pub/adobe/reader/mac/AcrobatDC/#{version.gsub('.', '')[2..-1]}/AcroRdrDC_#{version.gsub('.', '')[2..-1]}_MUI.dmg"
name 'Adobe Acrobat Reader DC'
|
Upgrade Adobe Acrobat Reader DC to 2015.008.20082
|
diff --git a/Casks/font-pt-mono.rb b/Casks/font-pt-mono.rb
index abc1234..def5678 100644
--- a/Casks/font-pt-mono.rb
+++ b/Casks/font-pt-mono.rb
@@ -1,8 +1,8 @@ class FontPtMono < Cask
- version '1.002'
- sha256 '93c0ca1d9873ecc7c70131fa763aaaaa24345fc8b8f193ea2175b0857823d58a'
+ version '1.003'
+ sha256 '741b1457066d69f045ac5196a512c2c1ca7900645b97bcb7280576d34e540af3'
- url 'http://www.fontstock.com/public/PTMono.zip'
+ url 'http://www.paratype.com/uni/public/PTMono.zip'
homepage 'http://www.paratype.com/public/'
license :ofl
|
Update PT Mono to 1.003
|
diff --git a/spec/requests/user/accounts_spec.rb b/spec/requests/user/accounts_spec.rb
index abc1234..def5678 100644
--- a/spec/requests/user/accounts_spec.rb
+++ b/spec/requests/user/accounts_spec.rb
@@ -0,0 +1,19 @@+require "spec_helper"
+
+# This should not test out the functionality of the devise controllers
+# or models, since we assume that the Devise guys know what they are
+# doing. However, when we mess up the integration, feel free to create
+# corresponding tests!
+
+describe "User accounts" do
+ include_context "signed in as a site user"
+
+ it "should let you edit your account settings" do
+ visit root_path
+ within("#top-menu") do
+ click_on current_user.name
+ end
+ click_on I18n.t(".shared.profile_menu.update_account")
+ page.should have_content(I18n.t(".devise.registrations.edit.title"))
+ end
+end
|
Add a failing test - users can't edit their account details.
|
diff --git a/spec/unit/resources/package_spec.rb b/spec/unit/resources/package_spec.rb
index abc1234..def5678 100644
--- a/spec/unit/resources/package_spec.rb
+++ b/spec/unit/resources/package_spec.rb
@@ -13,6 +13,7 @@ name: 'foo',
version: '1.0.0'
)
+ expect(stow_package_run).to run_execute('stow_foo-1.0.0')
end
end
@@ -23,6 +24,7 @@ name: 'foo',
version: '1.0.0'
)
+ expect(stow_package_run).to run_execute('destow_foo-1.0.0')
end
end
end
|
Add test to verify execute command runs properly
|
diff --git a/app/controllers/application.rb b/app/controllers/application.rb
index abc1234..def5678 100644
--- a/app/controllers/application.rb
+++ b/app/controllers/application.rb
@@ -10,6 +10,7 @@
before_filter :can_create?, :only => [:new, :create]
before_filter :can_edit?, :only => [:edit, :update, :destroy]
+ before_filter :current_network
map_resource :profile, :singleton => true, :class => "User", :find => :current_user
|
Load current_network in an ApplicationController before_filter
|
diff --git a/app/controllers/forest_controller.rb b/app/controllers/forest_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/forest_controller.rb
+++ b/app/controllers/forest_controller.rb
@@ -23,12 +23,10 @@ controller_heirarchy.pop
controller_heirarchy = controller_heirarchy.collect { |a| "controller-class--#{a.underscore}" }.join(' ')
- classes = []
- classes << controller_heirarchy
- classes << "controller--#{controller_name}"
- classes << "action--#{action_name}"
-
- @body_classes = classes
+ @body_classes ||= []
+ @body_classes << controller_heirarchy
+ @body_classes << "controller--#{controller_name}"
+ @body_classes << "action--#{action_name}"
end
def reset_class_method_cache
|
Add ability to add additional body classes to body tag via host app
|
diff --git a/app/models/francis_cms/webmention.rb b/app/models/francis_cms/webmention.rb
index abc1234..def5678 100644
--- a/app/models/francis_cms/webmention.rb
+++ b/app/models/francis_cms/webmention.rb
@@ -4,7 +4,7 @@ has_one :webmention_entry
validates :source, :target, presence: true
- validates :source, format: { with: URI.regexp(%w[http https]) }
+ validates :source, format: { with: URI::DEFAULT_PARSER.make_regexp(%w[http https]) }
validates :target, format: { with: /\A#{FrancisCms.configuration.site_url.sub(/^https?:/, 'https?:')}?/ }
validates_with WebmentionValidator
|
Use URI::DEFAULT_PARSER.make_regexp instead of URI.regexp
|
diff --git a/app/services/create_esdl_scenario.rb b/app/services/create_esdl_scenario.rb
index abc1234..def5678 100644
--- a/app/services/create_esdl_scenario.rb
+++ b/app/services/create_esdl_scenario.rb
@@ -19,7 +19,11 @@ private
def send_request
- HTTParty.public_send(:post, api_url, { body: { energysystem: @esdl_file } })
+ HTTParty.public_send(
+ :post,
+ api_url,
+ { body: { energysystem: @esdl_file, environment: environment } }
+ )
end
def handle_response(response)
@@ -33,6 +37,12 @@ end
end
+ def environment
+ return 'pro' if Rails.env == 'production'
+
+ 'beta'
+ end
+
def api_url
APP_CONFIG[:esdl_api_url]
end
|
ESDL: Add support for pro environment
|
diff --git a/probablyfine.gemspec b/probablyfine.gemspec
index abc1234..def5678 100644
--- a/probablyfine.gemspec
+++ b/probablyfine.gemspec
@@ -1,13 +1,13 @@ # Ensure we require the local version and not one we might have installed already
require File.join([File.dirname(__FILE__),'lib','probablyfine','version.rb'])
-spec = Gem::Specification.new do |s|
+spec = Gem::Specification.new do |s|
s.name = 'probablyfine'
s.version = Probablyfine::VERSION
- s.author = 'Your Name Here'
- s.email = 'your@email.address.com'
- s.homepage = 'http://your.website.com'
+ s.author = 'Matt Stratton'
+ s.email = 'matt.stratton@gmail.com'
+ s.homepage = 'http://www.mattstratton.io/probablyfine/'
s.platform = Gem::Platform::RUBY
- s.summary = 'A description of your project'
+ s.summary = 'Maintenance application for devopsdays.org website'
s.files = `git ls-files`.split("
")
s.require_paths << 'lib'
|
Add stuff to the gemspect because it beats adding functionality
|
diff --git a/app/workers/build_finished_worker.rb b/app/workers/build_finished_worker.rb
index abc1234..def5678 100644
--- a/app/workers/build_finished_worker.rb
+++ b/app/workers/build_finished_worker.rb
@@ -7,9 +7,9 @@ def perform(build_id)
Ci::Build.find_by(id: build_id).try do |build|
BuildTraceSectionsWorker.perform_async(build.id)
+ BuildCoverageWorker.perform_async(build.id)
+ BuildHooksWorker.perform_async(build.id)
CreateTraceArtifactWorker.perform_async(build.id)
- BuildCoverageWorker.new.perform(build.id)
- BuildHooksWorker.new.perform(build.id)
end
end
end
|
Make all workers in BuildFinishedWorker to run async and reorder
|
diff --git a/features/step_definitions/deployment_steps.rb b/features/step_definitions/deployment_steps.rb
index abc1234..def5678 100644
--- a/features/step_definitions/deployment_steps.rb
+++ b/features/step_definitions/deployment_steps.rb
@@ -3,7 +3,7 @@ end
Given(/^I am on the target page$/) do
- visit "/target/#{Target.last.id}"
+ visit "/targets/#{Target.last.id}"
end
Then(/^I see a list of previous deployments$/) do
|
Fix typo in targets URL
|
diff --git a/lib/griddler/adapters/sendgrid_adapter.rb b/lib/griddler/adapters/sendgrid_adapter.rb
index abc1234..def5678 100644
--- a/lib/griddler/adapters/sendgrid_adapter.rb
+++ b/lib/griddler/adapters/sendgrid_adapter.rb
@@ -1,16 +1,31 @@ module Griddler
module Adapters
class SendGridAdapter
+ attr_accessor :params
+
+ def initialize(params)
+ @params = params
+ end
+
def self.normalize_params(params)
+ adapter = new(params)
+ adapter.normalize_params
+ end
+
+ def normalize_params
+ params[:attachments] = attachment_files
+ params
+ end
+
+ private
+
+ def attachment_files
+ params.delete('attachment-info')
attachment_count = params[:attachments].to_i
- attachment_files = attachment_count.times.map do |index|
+ attachment_count.times.map do |index|
params.delete("attachment#{index + 1}".to_sym)
end
-
- params.delete('attachment-info')
- params[:attachments] = attachment_files
- params
end
end
end
|
[JRO] Clean up the SendGrid adapter class
|
diff --git a/sloc.gemspec b/sloc.gemspec
index abc1234..def5678 100644
--- a/sloc.gemspec
+++ b/sloc.gemspec
@@ -22,6 +22,7 @@ spec.add_dependency "slop", "~> 3.0"
spec.add_development_dependency "bundler", ">= 1.7"
+ spec.add_development_dependency "coveralls"
spec.add_development_dependency "pry"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "rspec"
|
Add coveralls as development dependency
|
diff --git a/lib/templates/rspec/scaffold/edit_spec.rb b/lib/templates/rspec/scaffold/edit_spec.rb
index abc1234..def5678 100644
--- a/lib/templates/rspec/scaffold/edit_spec.rb
+++ b/lib/templates/rspec/scaffold/edit_spec.rb
@@ -2,14 +2,15 @@
RSpec.describe '<%= ns_table_name %>/edit', <%= type_metatag(:view) %> do
<%= model.factory_girl_let_definitions %>
+ <%= model.factory_girl_let_definition %>
before(:each) do
- @<%= ns_file_name %> = assign(:<%= ns_file_name %>, <%= model.factory_girl_to :create %>)
+ assign(:<%= model.full_resource_name %>, <%= model.full_resource_name %>)
end
- it 'renders the edit <%= ns_file_name %> form' do
+ it 'renders the edit <%= model.full_resource_name %> form' do
render
- assert_select 'form[action=?][method=?]', <%= ns_file_name %>_path(@<%= ns_file_name %>), 'post' do
+ assert_select 'form[action=?][method=?]', <%= model.full_resource_name %>_path(<%= model.full_resource_name %>), 'post' do
<% model.columns_for(:form).each do |attribute| -%>
<%= attribute.assert_select_exp %>
<% end -%>
|
Fix 'edit' template spec tempalte
|
diff --git a/middleman-google-analytics.gemspec b/middleman-google-analytics.gemspec
index abc1234..def5678 100644
--- a/middleman-google-analytics.gemspec
+++ b/middleman-google-analytics.gemspec
@@ -20,5 +20,5 @@
s.required_ruby_version = '>= 1.9.3'
s.add_dependency("middleman-core", ["~> 3.2"])
- s.add_dependency("uglifier", ["~> 2.5"])
+ s.add_dependency("uglifier", ["~> 2.4.0"])
end
|
Fix conflicting version of uglifier
|
diff --git a/cmf/all/provisioners/cikit/config.rb b/cmf/all/provisioners/cikit/config.rb
index abc1234..def5678 100644
--- a/cmf/all/provisioners/cikit/config.rb
+++ b/cmf/all/provisioners/cikit/config.rb
@@ -0,0 +1,16 @@+module VagrantPlugins::CIKit
+ class Config < Vagrant.plugin("2", :config)
+ attr_accessor :playbook
+ attr_accessor :controller
+
+ def validate(machine)
+ errors = _detected_errors
+
+ unless controller
+ errors << ":cikit provisioner requires :controller to be set."
+ end
+
+ {"CIKit Provisioner" => errors}
+ end
+ end
+end
|
Fix critical typo in CIKit Vagrant provisioner
|
diff --git a/lib/app/presenters/notifications_presenter.rb b/lib/app/presenters/notifications_presenter.rb
index abc1234..def5678 100644
--- a/lib/app/presenters/notifications_presenter.rb
+++ b/lib/app/presenters/notifications_presenter.rb
@@ -16,7 +16,7 @@ notifications.map { |notification|
{
id: notification.id,
- kind: notification.kind,
+ regarding: notification.regarding,
read: notification.read,
link: notification.link,
from: notification.from,
|
Update notification type in presenter
|
diff --git a/lib/big_decimal_helper/conversion_protocol.rb b/lib/big_decimal_helper/conversion_protocol.rb
index abc1234..def5678 100644
--- a/lib/big_decimal_helper/conversion_protocol.rb
+++ b/lib/big_decimal_helper/conversion_protocol.rb
@@ -13,6 +13,7 @@ module ViaStringRepresentation
def to_bd
string_representation = to_s.gsub(/[^\-\d\.]/, '')
+ string_representation = "0" if string_representation =~ /^\s*$/ # convert blanks to zero
BigDecimal.new(string_representation)
end
end
|
Fix spec that breaks on recent-ish Ruby
|
diff --git a/lib/enableplaceholder-jquery-rails/version.rb b/lib/enableplaceholder-jquery-rails/version.rb
index abc1234..def5678 100644
--- a/lib/enableplaceholder-jquery-rails/version.rb
+++ b/lib/enableplaceholder-jquery-rails/version.rb
@@ -1,7 +1,7 @@ module EnableplaceholderJquery
module Rails
- # Use logger version; append a pre-release version identifier if gem
- # is updated without updating version of logger.
+ # Use enablePlaceholder version; append a pre-release version identifier
+ # if gem is updated without updating version of enablePlaceholder.
# Examples:
# "2.0.0.rc1"
# "2.0.0.pre"
|
Fix comment to describe enablePlaceholder
|
diff --git a/edtf-humanize.gemspec b/edtf-humanize.gemspec
index abc1234..def5678 100644
--- a/edtf-humanize.gemspec
+++ b/edtf-humanize.gemspec
@@ -17,8 +17,9 @@ s.files = Dir["{app,config,db,lib}/**/*", "LICENSE.txt", "Rakefile", "README.rdoc"]
s.test_files = Dir["test/**/*"]
- s.add_dependency "rails", "~> 4.0"
s.add_dependency "edtf", "~> 2.3"
+ s.add_dependency "activesupport", ">= 4", "< 6"
s.add_development_dependency "sqlite3"
+ s.add_development_dependency "rails", ">= 4", "< 6"
end
|
Move dependency from Rails to ActiveSupport
Also allow Rails 5
|
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb
index abc1234..def5678 100644
--- a/config/initializers/session_store.rb
+++ b/config/initializers/session_store.rb
@@ -11,7 +11,7 @@ # www.interconlarp.org becomes interconlarp.org
second_level_domain = just_hostname.split(".").reverse.take(2).reverse.join(".")
- cookie_options[:domain] = second_level_domain
+ cookie_options[:domain] = ".#{second_level_domain}"
end
Rails.application.config.session_store :active_record_store, cookie_options
|
Make sure the cookie will work for subdomains
|
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb
index abc1234..def5678 100644
--- a/config/initializers/session_store.rb
+++ b/config/initializers/session_store.rb
@@ -2,5 +2,5 @@
Rails.application.config.session_store :cookie_store,
key: "_updated_gobierto_session",
- domain: ENV.fetch("DOMAIN") { ".gobierto.dev" },
+ domain: Rails.env.test? ? :all : ENV.fetch("DOMAIN") { ".gobierto.dev" },
tld_length: ENV.fetch("TLD_LENGTH") { "2" }.to_i
|
Set up a common session store in test environment to work with sessions
|
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb
index abc1234..def5678 100644
--- a/config/initializers/session_store.rb
+++ b/config/initializers/session_store.rb
@@ -1,6 +1,9 @@ # Be sure to restart your server when you modify this file.
-Panopticon::Application.config.session_store :cookie_store, key: '_panopticon_session'
+Panopticon::Application.config.session_store :cookie_store,
+ key: '_panopticon_session',
+ secure: Rails.env.production?,
+ http_only: true
# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
|
Set cookies to only be served over https and to be http only
|
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb
index abc1234..def5678 100644
--- a/config/initializers/session_store.rb
+++ b/config/initializers/session_store.rb
@@ -1,7 +1,7 @@ # Be sure to restart your server when you modify this file.
options = if Rails.env.production?
- {domain: 'glowfic.com', tld_length: 2}
+ {domain: ['glowfic.com', '.glowfic-staging.herokuapp.com'], tld_length: 2}
elsif Rails.env.development?
{domain: 'localhost', tld_length: 2}
else
|
Append glowfic-staging to cookies list, hopefully not affecting prod
|
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb
index abc1234..def5678 100644
--- a/config/initializers/session_store.rb
+++ b/config/initializers/session_store.rb
@@ -1,4 +1,8 @@ # We set the cookie domain dynamically with a Rack middleware.
# See lib/intercode/dynamic_cookie_domain.rb for how this works.
-Rails.application.config.session_store :active_record_store, key: '_intercode_session', domain: :all, same_site: :strict
+Rails.application.config.session_store :active_record_store,
+ key: '_intercode_session',
+ domain: :all,
+ same_site: :strict,
+ expire_after: 2.weeks
|
Set an expiration for session cookies
|
diff --git a/config/initializers/bower_rails.rb b/config/initializers/bower_rails.rb
index abc1234..def5678 100644
--- a/config/initializers/bower_rails.rb
+++ b/config/initializers/bower_rails.rb
@@ -1,19 +1,26 @@ BowerRails.configure do |bower_rails|
# Tell bower-rails what path should be considered as root. Defaults to Dir.pwd
- # bower_rails.root_path = Dir.pwd
+ bower_rails.root_path = Dir.pwd
# Invokes rake bower:install before precompilation. Defaults to false
bower_rails.install_before_precompile = true
# Invokes rake bower:resolve before precompilation. Defaults to false
- # bower_rails.resolve_before_precompile = true
+ bower_rails.resolve_before_precompile = true
# Invokes rake bower:clean before precompilation. Defaults to false
- # bower_rails.clean_before_precompile = true
+ bower_rails.clean_before_precompile = true
- # Invokes rake bower:install:deployment instead rake bower:install. Defaults to false
- # bower_rails.use_bower_install_deployment = true
- #
- # Invokes rake bower:install and rake bower:install:deployment with -F (force) flag. Defaults to false
- # bower_rails.force_install = true
+ # Excludes specific bower components from clean. Defaults to nil
+ bower_rails.exclude_from_clean = ['moment']
+
+ # Invokes rake bower:install:deployment instead of rake bower:install. Defaults to false
+ bower_rails.use_bower_install_deployment = true
+
+ # rake bower:install will search for gem dependencies and in each gem it will search for Bowerfile
+ # and then concatenate all Bowerfile for evaluation
+ bower_rails.use_gem_deps_for_bowerfile = true
+
+ # Passes the -F option to rake bower:install or rake bower:install:deployment. Defaults to false.
+ bower_rails.force_install = true
end
|
Update all of bower rails to use production settings
|
diff --git a/config/initializers/rabl_config.rb b/config/initializers/rabl_config.rb
index abc1234..def5678 100644
--- a/config/initializers/rabl_config.rb
+++ b/config/initializers/rabl_config.rb
@@ -1,6 +1,6 @@ Rabl.configure do |config|
config.include_json_root = false
config.include_child_root = false
- config.cache_sources = true
+ config.cache_sources = false
config.perform_caching = false
end
|
Update to disable Rabl caching
We've been finding that we're encountering errors on production that
we're unable to reproduce locally using the same data. After some
investigation we found that the Rabl source cache option seemed to be
the root of these issues and given the other layers of caching we have
present we felt that disabling it was the most prudent decision.
|
diff --git a/services/automatic_geocoder/lib/automatic_geocoder/runner.rb b/services/automatic_geocoder/lib/automatic_geocoder/runner.rb
index abc1234..def5678 100644
--- a/services/automatic_geocoder/lib/automatic_geocoder/runner.rb
+++ b/services/automatic_geocoder/lib/automatic_geocoder/runner.rb
@@ -17,7 +17,7 @@
def run
EventMachine.run do
- EventMachine::PeriodicTimer.new(10) do
+ EventMachine::PeriodicTimer.new(5) do
puts 'fetching job_collection'
AutomaticGeocoding.active.map &:enqueue
end
|
Reduce the interval between geocoding checks
|
diff --git a/spec/features/content_plan_spec.rb b/spec/features/content_plan_spec.rb
index abc1234..def5678 100644
--- a/spec/features/content_plan_spec.rb
+++ b/spec/features/content_plan_spec.rb
@@ -12,13 +12,11 @@
fill_in "Title", with: "Some title"
fill_in "Ref no", with: "X"
- fill_in "Size", with: "1"
click_button "Create Content plan"
expect(page).to have_text("Content plan was successfully created.")
expect(page).to have_text("Some title")
expect(page).to have_text("X")
- expect(page).to have_text("1")
end
end
|
Update spec to remove size
|
diff --git a/spec/requests/static_pages_spec.rb b/spec/requests/static_pages_spec.rb
index abc1234..def5678 100644
--- a/spec/requests/static_pages_spec.rb
+++ b/spec/requests/static_pages_spec.rb
@@ -42,4 +42,19 @@ it { should have_content('David E. Smyth') }
end
+
+ it "should have the right links on the layout" do
+ visit root_path
+ click_link "About"
+ expect(page).to have_title(page_title('About'))
+ click_link "Help"
+ expect(page).to have_title(page_title('Help for'))
+ click_link "Contact"
+ expect(page).to have_title(page_title('Contact Author of'))
+ click_link "Home"
+# click_link "Sign up now!"
+# expect(page).to # fill in
+# click_link "sample app"
+# expect(page).to # fill in
+ end
end
|
Add tests for following links on static pages
|
diff --git a/app/config/capistrano/stages/staging.rb b/app/config/capistrano/stages/staging.rb
index abc1234..def5678 100644
--- a/app/config/capistrano/stages/staging.rb
+++ b/app/config/capistrano/stages/staging.rb
@@ -1,14 +1,14 @@ ### DO NOT EDIT BELOW ###
set :branch, "staging"
-set :document_root, "/home/sites/php73/#{fetch :client}/#{fetch :project}"
+set :document_root, "/home/sites/php74/#{fetch :client}/#{fetch :project}"
set :deploy_to, "/home/sites/apps/#{fetch :client}/#{fetch :project}"
set :keep_releases, 2
-set :url, "http://#{fetch :project}.#{fetch :client}.php73.sumocoders.eu"
-set :fcgi_connection_string, "/var/run/php_73_fpm_sites.sock"
-set :php_bin, "php7.3"
+set :url, "http://#{fetch :project}.#{fetch :client}.php74.sumocoders.eu"
+set :fcgi_connection_string, "/var/run/php_74_fpm_sites.sock"
+set :php_bin, "php7.4"
set :php_bin_custom_path, fetch(:php_bin)
set :opcache_reset_strategy, "fcgi"
-set :opcache_reset_fcgi_connection_string, "/var/run/php_73_fpm_sites.sock"
+set :opcache_reset_fcgi_connection_string, "/var/run/php_74_fpm_sites.sock"
server "dev02.sumocoders.eu", user: "sites", roles: %w{app db web}
|
Change default php version to 7.4
|
diff --git a/examples/params.rb b/examples/params.rb
index abc1234..def5678 100644
--- a/examples/params.rb
+++ b/examples/params.rb
@@ -4,8 +4,8 @@
contract = Class.new(Dry::Validation::Contract) do
params do
- required(:email).filled
- required(:age).filled(:int?, gt?: 18)
+ required(:email).filled(:string)
+ required(:age).filled(:integer, gt?: 18)
end
end.new
|
Add type specs to example
|
diff --git a/script/update-marriage-abroad-services.rb b/script/update-marriage-abroad-services.rb
index abc1234..def5678 100644
--- a/script/update-marriage-abroad-services.rb
+++ b/script/update-marriage-abroad-services.rb
@@ -0,0 +1,47 @@+update_file = ARGV.shift
+unless update_file && File.exist?(update_file)
+ puts "Usage: #{__FILE__} <update-file>"
+ exit 1
+end
+
+worldwide_locations_file = Rails.root.join('test', 'fixtures', 'worldwide_locations.yml')
+worldwide_locations = YAML.load_file(worldwide_locations_file)
+
+updates = YAML.load_file(update_file)
+
+marriage_abroad_services_file = Rails.root.join('lib', 'data', 'marriage_abroad_services.yml')
+yaml = File.read(marriage_abroad_services_file)
+existing_data = YAML.load(yaml)
+
+updates[:countries].each do |country|
+ unless worldwide_locations.include?(country)
+ warn "Country: #{country} not found in worldwide location data. Is it spelled correctly?"
+ end
+
+ residencies = updates[:residency_overrides][country] || updates[:default_residencies]
+ partner_nationalities = updates[:partner_nationality_overrides][country] || updates[:default_partner_nationalities]
+
+ if updates[:services].empty?
+ if existing_data[country]
+ # Delete the `sex_of_partner` key from this country
+ existing_data[country].delete(updates[:sex_of_partner])
+ if existing_data[country].empty?
+ # Delete the `country` key if it's now empty
+ existing_data.delete(country)
+ end
+ end
+ else
+ existing_data[country] ||= {}
+ existing_data[country][updates[:sex_of_partner]] = {}
+ residencies.each do |residency|
+ existing_data[country][updates[:sex_of_partner]][residency] = {}
+ partner_nationalities.each do |partner_nationality|
+ existing_data[country][updates[:sex_of_partner]][residency][partner_nationality] = updates[:services].map(&:to_sym)
+ end
+ end
+ end
+end
+
+File.open(marriage_abroad_services_file, 'w') do |file|
+ file.puts(existing_data.to_yaml)
+end
|
Add script to update marriage_abroad_services.yml
Trello card: https://trello.com/c/D0ZMM9v5
This will help me update the services based on the data in the spreadsheet
attached to the Trello card.
|
diff --git a/feedcellar.gemspec b/feedcellar.gemspec
index abc1234..def5678 100644
--- a/feedcellar.gemspec
+++ b/feedcellar.gemspec
@@ -18,7 +18,7 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]
- spec.add_runtime_dependency("rroonga")
+ spec.add_runtime_dependency("rroonga", ">= 3.0.4")
spec.add_runtime_dependency("thor")
spec.add_development_dependency("test-unit")
|
Use rroonga 3.0.4 or later
|
diff --git a/app/controllers/auth0_controller.rb b/app/controllers/auth0_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/auth0_controller.rb
+++ b/app/controllers/auth0_controller.rb
@@ -10,7 +10,7 @@ session[:uid] = user.uid
redirect_to root_url
else
- render plain: { bell: 'shame' }, status: 403
+ render plain: "You are not a member of the Devbootcamp Org on GitHub", status: 403
end
end
|
Update error message for github org login failure to explain reason for failure
|
diff --git a/app/controllers/index_controller.rb b/app/controllers/index_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/index_controller.rb
+++ b/app/controllers/index_controller.rb
@@ -1,10 +1,12 @@ class IndexController < ApplicationController
- REDIS_KEY_PREFIX = "bus-detective:index"
-
force_ssl if: :ssl_configured?, except: [:letsencrypt]
def show
- render text: redis.get("#{REDIS_KEY_PREFIX}:#{params[:revision] || current_index_key}")
+ if s3_bucket_url.present?
+ render text: index_html
+ else
+ render layout: false
+ end
end
def letsencrypt
@@ -17,12 +19,13 @@
private
- def current_index_key
- redis.get("#{REDIS_KEY_PREFIX}:current")
+ def index_html
+ uri = URI("#{s3_bucket_url}/index.html")
+ Net::HTTP.get(uri)
end
- def redis
- @redis ||= Redis.new(url: ENV.fetch('REDISTOGO_URL', nil))
+ def s3_bucket_url
+ Rails.configuration.S3_BUCKET_URL
end
def ssl_configured?
|
Use s3-index instead of redis for ember index page
|
diff --git a/app/controllers/items_controller.rb b/app/controllers/items_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/items_controller.rb
+++ b/app/controllers/items_controller.rb
@@ -17,7 +17,9 @@ end
def show
+ today = Date.today
@item = Item.find(params[:id])
+ redirect_to root_path if today.month != "12" || @item.advent_calendar_item.date > today.day
end
def edit
|
Fix disable Item show until the day
|
diff --git a/Casks/jing.rb b/Casks/jing.rb
index abc1234..def5678 100644
--- a/Casks/jing.rb
+++ b/Casks/jing.rb
@@ -2,6 +2,6 @@ url 'http://download.techsmith.com/jing/mac/jing.dmg'
homepage 'http://www.techsmith.com/jing.html'
version 'latest'
- sha1 'no_checksum'
+ no_checksum
link 'Jing.app'
end
|
Remove quotation marks for no_checksum
|
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -5,6 +5,7 @@ end
def new
+ redirect_to root_path if current_user
@user = User.new
end
@@ -25,12 +26,12 @@ def edit
@user = User.find(params[:id])
if @user.id != session[:user_id]
- redirect_to @user
+ redirect_to @user
end
end
def update
- @user = User.find(session[:user_id])
+ @user = User.find(session[:user_id])
@user.update_attributes(user_params)
redirect_to @user
end
|
Add redirecting to root path
|
diff --git a/lib/imap/backup/downloader.rb b/lib/imap/backup/downloader.rb
index abc1234..def5678 100644
--- a/lib/imap/backup/downloader.rb
+++ b/lib/imap/backup/downloader.rb
@@ -15,7 +15,6 @@ count = uids.count
Imap::Backup::Logger.logger.debug "[#{folder.name}] #{count} new messages"
uids.each_slice(block_size).with_index do |block, i|
- offset = i * block_size + 1
uids_and_bodies = folder.fetch_multi(block)
if uids_and_bodies.nil?
if block_size > 1
@@ -28,6 +27,7 @@ end
end
+ offset = i * block_size + 1
uids_and_bodies.each.with_index do |uid_and_body, j|
uid = uid_and_body[:uid]
body = uid_and_body[:body]
|
Declare variable as late as possible
|
diff --git a/spec/extensions/invoice_extension_spec.rb b/spec/extensions/invoice_extension_spec.rb
index abc1234..def5678 100644
--- a/spec/extensions/invoice_extension_spec.rb
+++ b/spec/extensions/invoice_extension_spec.rb
@@ -4,10 +4,10 @@ context "extensions" do
describe ".pending" do
it "returns Invoices without a successful transaction" do
- invoice = SalesEngine::Invoice.find_by_id(13)
- pending_invoices = SalesEngine::Invoice.pending
+ invoice = SalesEngine::Invoice.find_by_id(13)
+ pending_invoice = SalesEngine::Invoice.pending
- pending_invoices[1].should == invoice
+ pending_invoices.map(&:id).include?(invoice).should == true
end
end
@@ -35,4 +35,4 @@ end
end
end
-end+end
|
Change test to be order independent
|
diff --git a/spec/features/user_creates_a_post_spec.rb b/spec/features/user_creates_a_post_spec.rb
index abc1234..def5678 100644
--- a/spec/features/user_creates_a_post_spec.rb
+++ b/spec/features/user_creates_a_post_spec.rb
@@ -22,8 +22,8 @@
feature 'Auto generate post slug' do
scenario 'user types on title field', js: true do
- fill_model_field(Tingui::Post, :title, with: 'T')
- expect(page).to have_field(Tingui::Post.human_attribute_name(:slug), with: 't')
+ fill_model_field(Tingui::Post, :title, with: 'Slug')
+ expect(page).to have_field(Tingui::Post.human_attribute_name(:slug), with: "slug")
end
end
end
|
Fix capybara waits for ajax
|
diff --git a/spec/support/integration_example_group.rb b/spec/support/integration_example_group.rb
index abc1234..def5678 100644
--- a/spec/support/integration_example_group.rb
+++ b/spec/support/integration_example_group.rb
@@ -10,7 +10,6 @@ include RSpec::Rails::TestUnitAssertionAdapter
include ActionDispatch::Assertions
include Capybara
- include RSpec::Matchers
module InstanceMethods
def app
|
Remove RSpec::Matchers include which was causing stack level too deep
error [myronmarston]
|
diff --git a/app/presenters/request_presenter.rb b/app/presenters/request_presenter.rb
index abc1234..def5678 100644
--- a/app/presenters/request_presenter.rb
+++ b/app/presenters/request_presenter.rb
@@ -1,6 +1,7 @@ class RequestPresenter < SimpleDelegator
def can_vote?(u)
- self.user.id != u.id && !self.user.voted_on?(__getobj__)
+ binding.pry
+ self.user.id != u.id && u.voted_on?(__getobj__)
end
def liked_by user
|
Use the current user, not the request owner
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.