diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/petfinder.rb b/petfinder.rb
index abc1234..def5678 100644
--- a/petfinder.rb
+++ b/petfinder.rb
@@ -15,3 +15,10 @@ names = pets.map { |pet| pet.name }
{:names => names}.to_json
end
+
+get '/pets/:shelter_id' do
+ options = {count:1000}
+ pets = petfinder.shelter_pets(params['shelter_id'], options)
+ names = pets.map { |pet| pet.names}
+ {:name => names}.to_json
+end
|
Add endpoint to find all pets by shelter id
|
diff --git a/Casks/mini-metro.rb b/Casks/mini-metro.rb
index abc1234..def5678 100644
--- a/Casks/mini-metro.rb
+++ b/Casks/mini-metro.rb
@@ -1,7 +1,7 @@ class MiniMetro < Cask
- url 'http://static.dinopoloclub.com/minimetro/builds/alpha9/MiniMetro-alpha9e-osx.zip'
+ url 'http://static.dinopoloclub.com/minimetro/builds/alpha10/MiniMetro-alpha10-osx.zip'
homepage 'http://dinopoloclub.com/minimetro/'
- version 'Alpha 9e'
- sha256 'd2261a4e2ab6d71114af99524fa86c590b66f880c32c8546d556a2b80cc0be16'
- link 'MiniMetro-alpha9e-osx.app', :target => 'Mini Metro.app'
+ version 'Alpha 10'
+ sha256 '7453b2edff9dc91416f7ad376830da38b15e02c03eae7573ddb9e526ce9309ee'
+ link 'MiniMetro-alpha10-osx.app', :target => 'Mini Metro.app'
end
|
Upgrade Mini Metro to alpha10
|
diff --git a/ultracart_connector.rb b/ultracart_connector.rb
index abc1234..def5678 100644
--- a/ultracart_connector.rb
+++ b/ultracart_connector.rb
@@ -1,7 +1,7 @@ require 'json'
-HUB_ENDPOINT = 'https://push.hubapp.io'
-HUB_TIMEOUT = 240
+HUB_ENDPOINT = ENV['HUB_ENDPOINT'] || 'https://wombat.co/push'
+HUB_TIMEOUT = ENV['HUB_TIMEOUT'] || 240
class UltraCartConnector < Sinatra::Base
attr_reader :payload
|
Allow configuration via HUB_ENDPOINT environmental variable
|
diff --git a/lib/generators/doorkeeper/install_generator.rb b/lib/generators/doorkeeper/install_generator.rb
index abc1234..def5678 100644
--- a/lib/generators/doorkeeper/install_generator.rb
+++ b/lib/generators/doorkeeper/install_generator.rb
@@ -3,6 +3,7 @@ class Doorkeeper::InstallGenerator < Rails::Generators::Base
include Rails::Generators::Migration
source_root File.expand_path('../templates', __FILE__)
+ desc "Installs Doorkeeper."
def install
migration_template 'migration.rb', 'db/migrate/create_doorkeeper_tables.rb'
|
Add description to install generator
|
diff --git a/lib/rails_locale_detection/locale_accessors.rb b/lib/rails_locale_detection/locale_accessors.rb
index abc1234..def5678 100644
--- a/lib/rails_locale_detection/locale_accessors.rb
+++ b/lib/rails_locale_detection/locale_accessors.rb
@@ -1,11 +1,11 @@ module RailsLocaleDetection
module LocaleAccessors
+ def alternate_locales
+ available_locales - [current_locale]
+ end
+
def available_locales
I18n.available_locales
- end
-
- def default_locale
- I18n.default_locale
end
def current_locale
@@ -15,5 +15,9 @@ def current_locale=(locale)
I18n.locale = locale
end
+
+ def default_locale
+ I18n.default_locale
+ end
end
end
|
Add an available locales accessor
|
diff --git a/app/controllers/organisations_controller.rb b/app/controllers/organisations_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/organisations_controller.rb
+++ b/app/controllers/organisations_controller.rb
@@ -6,7 +6,7 @@
def new
if Setting[:theme] == 'cooperatives_uk'
- redirect_to intro_coop_path
+ redirect_to intro_coops_path
return
end
end
|
Fix broken redirect from organisations/new to coops/intro.
|
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/registrations_controller.rb
+++ b/app/controllers/registrations_controller.rb
@@ -6,6 +6,6 @@ end
def account_update_params
- params.require(:user).permit(:name, :email, :password, :password_confirmation, :current_password, :twitter_handle, :decription, :interests, :skills)
+ params.require(:user).permit(:name, :email, :password, :password_confirmation, :current_password, :twitter_handle, :description, :interests, :skills)
end
end
|
Fix typo in registrations controller.
|
diff --git a/app/lib/api_entreprise/exercices_adapter.rb b/app/lib/api_entreprise/exercices_adapter.rb
index abc1234..def5678 100644
--- a/app/lib/api_entreprise/exercices_adapter.rb
+++ b/app/lib/api_entreprise/exercices_adapter.rb
@@ -23,6 +23,10 @@ end
def attr_to_fetch
- [:ca, :date_fin_exercice, :date_fin_exercice_timestamp]
+ [
+ :ca,
+ :date_fin_exercice,
+ :date_fin_exercice_timestamp
+ ]
end
end
|
Format all attr_to_fetch methods the same way
|
diff --git a/app/importers/educator_row.rb b/app/importers/educator_row.rb
index abc1234..def5678 100644
--- a/app/importers/educator_row.rb
+++ b/app/importers/educator_row.rb
@@ -12,6 +12,7 @@ full_name: row[:full_name],
staff_type: row[:staff_type],
admin: is_admin?,
+ email: row[:login_name] + '@k12.somerville.ma.us',
school_id: school_rails_id
)
|
Build educator email from login name
|
diff --git a/app/jobs/build_attempt_job.rb b/app/jobs/build_attempt_job.rb
index abc1234..def5678 100644
--- a/app/jobs/build_attempt_job.rb
+++ b/app/jobs/build_attempt_job.rb
@@ -1,9 +1,12 @@ require 'job_base'
+# Keep this interface so we can easily enqueue new jobs.
+# The job is handled by kochiku-worker
class BuildAttemptJob < JobBase
- def initialize(build_attempt_id, build_kind, build_ref, test_files)
- # Keep this interface so we can easily enqueue new jobs.
- # The job is handled by kochiku-worker
+ class WrongBuildAttemptJobClassError < StandardError; end
+
+ def initialize(build_options)
+ raise WrongBuildAttemptJobClassError, "BuildAttemptJob was processed by the BuildAttemptJob shim in Kochiku instead of real class in Kochiku-worker."
end
def perform
|
Add warning about accidental processing to BuildAttemptJob shim
|
diff --git a/lib/mobility/backend/active_record/dirty.rb b/lib/mobility/backend/active_record/dirty.rb
index abc1234..def5678 100644
--- a/lib/mobility/backend/active_record/dirty.rb
+++ b/lib/mobility/backend/active_record/dirty.rb
@@ -1,5 +1,11 @@ module Mobility
module Backend
+=begin
+
+Dirty tracking for AR models. See {Mobility::Backend::ActiveModel::Dirty} for
+details on usage.
+
+=end
module ActiveRecord::Dirty
include ActiveModel::Dirty
@@ -9,7 +15,10 @@ backend_class.extend(ClassMethods)
end
+ # Adds hook after {Backend::Setup#setup_model} to patch AR so that it
+ # handles changes to translated attributes just like normal attributes.
module ClassMethods
+ # (see Mobility::Backend::Setup#setup_model)
def setup_model(model_class, attributes, **options)
super
|
Add documentation for AR::Dirty module
[ci skip]
|
diff --git a/app/models/common/language.rb b/app/models/common/language.rb
index abc1234..def5678 100644
--- a/app/models/common/language.rb
+++ b/app/models/common/language.rb
@@ -10,7 +10,7 @@ property :name, String, :required => true
# locale string like 'en-US'
- validates_format_of :code, :with => /^[a-z]{2}-[A-Z]{2}$/
+ validates_format_of :code, :with => /\A[a-z]{2}-[A-Z]{2}\z/
def self.[](code)
|
Use \A and \z in regexp for stricter matching
* While \A and ^ are the same, there is a difference between \z and $
Using $ it will match the "end of line", which means that this would
match strings like: "en-US\n". While \z means "end of string" and it
will not match that, and will only match "en-US".
I would assert that most of the time when using anchors you would want
to use \A and \z, only falling back to ^ and $ in specific cases.
|
diff --git a/lib/nehm/user_control.rb b/lib/nehm/user_control.rb
index abc1234..def5678 100644
--- a/lib/nehm/user_control.rb
+++ b/lib/nehm/user_control.rb
@@ -30,8 +30,8 @@ end
def self.user(permalink)
- user = Client.get('/resolve', url: "https://soundcloud.com/#{permalink}")
- if user_exist?(user)
+ if user_exist?(permalink)
+ user = Client.get('/resolve', url: "https://soundcloud.com/#{permalink}")
User.new(user.id)
else
puts Paint['Invalid permalink. Please enter correct permalink', :red]
@@ -41,8 +41,8 @@
module_function
- def user_exist?(url)
- Client.get('/resolve', url: url)
+ def user_exist?(permalink)
+ Client.get('/resolve', url: "https://soundcloud.com/#{permalink}")
rescue SoundCloud::ResponseError => e
if e.message =~ /404/
|
Fix UserControl.user and UserControl.user_exist? methods
|
diff --git a/test/models/order_item_test.rb b/test/models/order_item_test.rb
index abc1234..def5678 100644
--- a/test/models/order_item_test.rb
+++ b/test/models/order_item_test.rb
@@ -1,7 +1,13 @@ require 'test_helper'
class OrderItemTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
- # end
+ test "OrderItem weight should match" do
+ assert_equal 300, order_items(:one).weight
+ assert_equal 100, order_items(:two).weight
+ end
+
+ test "OrderItem cost should match" do
+ assert_equal 79.9, order_items(:one).cost.to_f
+ assert_equal 29.95, order_items(:two).cost.to_f
+ end
end
|
Add tests for OrderItem model
|
diff --git a/lib/retina_tag/engine.rb b/lib/retina_tag/engine.rb
index abc1234..def5678 100644
--- a/lib/retina_tag/engine.rb
+++ b/lib/retina_tag/engine.rb
@@ -16,7 +16,6 @@ retina_path = "#{retina_els.join('.')}@2x.#{extension}"
if !Rails.application.assets.find_asset(retina_path).nil?
- puts "Found HIDPI Asset"
hidpi_asset_path = asset_path(retina_path)
end
rescue
@@ -28,7 +27,6 @@ end
options_default.merge!(options)
- puts "Checking for #{source} #{options_default}"
image_tag_without_retina(source,options_default)
if options_default[:"data-lazy-load"]
|
Remove debug puts (cleans up test output)
|
diff --git a/spec/rails_admin/config/fields/types/uuid_spec.rb b/spec/rails_admin/config/fields/types/uuid_spec.rb
index abc1234..def5678 100644
--- a/spec/rails_admin/config/fields/types/uuid_spec.rb
+++ b/spec/rails_admin/config/fields/types/uuid_spec.rb
@@ -2,6 +2,8 @@
describe RailsAdmin::Config::Fields::Types::Uuid do
let(:uuid) { SecureRandom.uuid }
+ let(:object) { FactoryGirl.create(:field_test) }
+ let(:field) { RailsAdmin.config(FieldTest).fields.detect { |f| f.name == :uuid_field } }
before do
RailsAdmin.config do |config|
@@ -10,19 +12,16 @@ end
end
- @object = FactoryGirl.create(:field_test)
- @object.stub(:uuid_field).and_return uuid
-
- @field = RailsAdmin.config(FieldTest).fields.detect { |f| f.name == :uuid_field }
- @field.bindings = {object: @object}
+ allow(object).to receive(:uuid_field).and_return uuid
+ field.bindings = {object: object}
end
it 'field is a Uuid fieldtype' do
- expect(@field.class).to eq RailsAdmin::Config::Fields::Types::Uuid
+ expect(field.class).to eq RailsAdmin::Config::Fields::Types::Uuid
end
it 'handles uuid string' do
- expect(@field.value).to eq uuid
+ expect(field.value).to eq uuid
end
it_behaves_like 'a generic field type', :string_field, :uuid
|
Replace old stub syntax with newest RSpec 3
|
diff --git a/puppet-lint-duplicate_class_parameters-check.gemspec b/puppet-lint-duplicate_class_parameters-check.gemspec
index abc1234..def5678 100644
--- a/puppet-lint-duplicate_class_parameters-check.gemspec
+++ b/puppet-lint-duplicate_class_parameters-check.gemspec
@@ -22,7 +22,7 @@ spec.add_development_dependency 'rspec', '~> 3.9.0'
spec.add_development_dependency 'rspec-its', '~> 1.0'
spec.add_development_dependency 'rspec-collection_matchers', '~> 1.0'
- spec.add_development_dependency 'rubocop', '~> 0.77.0'
+ spec.add_development_dependency 'rubocop', '~> 0.78.0'
spec.add_development_dependency 'rake', '~> 13.0.0'
spec.add_development_dependency 'rspec-json_expectations', '~> 2.2'
spec.add_development_dependency 'simplecov', '~> 0.17.1'
|
Update rubocop requirement from ~> 0.77.0 to ~> 0.78.0
Updates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.77.0...v0.78.0)
Signed-off-by: dependabot-preview[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@dependabot.com>
|
diff --git a/app/models/webmail/extensions/imap_settings.rb b/app/models/webmail/extensions/imap_settings.rb
index abc1234..def5678 100644
--- a/app/models/webmail/extensions/imap_settings.rb
+++ b/app/models/webmail/extensions/imap_settings.rb
@@ -13,11 +13,11 @@
def mongoize(object)
case object
- when self.class
- object.mongoize
- when Array
- self.new(object).mongoize
- else
+ when self.class
+ object.mongoize
+ when Array
+ self.new(object).mongoize
+ else
object
end
end
|
[rubocop] C: Indent when as deep as case.
|
diff --git a/app/presenters/tree_builder_service_catalog.rb b/app/presenters/tree_builder_service_catalog.rb
index abc1234..def5678 100644
--- a/app/presenters/tree_builder_service_catalog.rb
+++ b/app/presenters/tree_builder_service_catalog.rb
@@ -21,7 +21,8 @@ end
def x_get_tree_roots(count_only, _options)
- objects = Rbac.filtered(ServiceTemplateCatalog).sort_by { |o| o.name.downcase }
+ includes = {:tenant => {}}
+ objects = Rbac.filtered(ServiceTemplateCatalog, :include_for_find => includes).sort_by { |o| o.name.downcase }
filtered_objects = []
# only show catalogs nodes that have any servicetemplate records under them
objects.each do |object|
|
Include :tenant to remove N+1 query
tenant is touched here:
https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/presenters/tree_node/service_template_catalog.rb#L5
|
diff --git a/IGIdenticon.podspec b/IGIdenticon.podspec
index abc1234..def5678 100644
--- a/IGIdenticon.podspec
+++ b/IGIdenticon.podspec
@@ -1,6 +1,6 @@ Pod::Spec.new do |s|
s.name = "IGIdenticon"
- s.version = "0.5"
+ s.version = "0.6"
s.summary = "Swift identicon generator"
s.description = "This library is a port of [identicon](https://github.com/donpark/identicon) library that generates identicon."
s.homepage = "https://github.com/Seaburg/IGIdenticon"
@@ -8,7 +8,7 @@ s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "Evgeniy Yurtaev" => "evgeniyyurt@gmail.com" }
s.platform = :ios, "8.0"
- s.source = { :git => "https://github.com/seaburg/IGIdenticon.git", :tag => "0.5" }
+ s.source = { :git => "https://github.com/seaburg/IGIdenticon.git", :tag => "0.6" }
s.source_files = "Identicon/*.swift"
s.framework = "CoreGraphics"
s.requires_arc = true
|
Update library version to 0.6
|
diff --git a/app/controllers/password_resets_controller.rb b/app/controllers/password_resets_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/password_resets_controller.rb
+++ b/app/controllers/password_resets_controller.rb
@@ -27,8 +27,8 @@ return
end
- @user.password_confirmation = params[:user][:password_confirmation]
- if @user.change_password!(params[:user][:password])
+ @user.password_confirmation = params[:member][:password_confirmation]
+ if @user.change_password!(params[:member][:password])
redirect_to(root_path, :notice => 'Password was successfully updated.')
else
render :action => "edit"
|
Fix bug of password_reset: Use member instead of user
|
diff --git a/app/presenters/tree_builder_roles_by_server.rb b/app/presenters/tree_builder_roles_by_server.rb
index abc1234..def5678 100644
--- a/app/presenters/tree_builder_roles_by_server.rb
+++ b/app/presenters/tree_builder_roles_by_server.rb
@@ -8,7 +8,7 @@ end
def override(node, _object)
- if @sb[:diag_selected_id] && node[:key] == "svr-#{@sb[:diag_selected_id]}"
+ if @sb[:diag_selected_id] && node[:key] == "#{self.class.get_prefix_for_model(@sb[:diag_selected_model]) || 'svr'}-#{@sb[:diag_selected_id]}"
node[:highlighted] = true
end
end
|
Build the selected node key from the session stored model in RBS 🌳🐞
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1734393
|
diff --git a/core/spec/integration/confirm_user_spec.rb b/core/spec/integration/confirm_user_spec.rb
index abc1234..def5678 100644
--- a/core/spec/integration/confirm_user_spec.rb
+++ b/core/spec/integration/confirm_user_spec.rb
@@ -0,0 +1,39 @@+require 'integration_helper'
+
+describe 'When a username is reserved', type: :request do
+ it 'the user should receive a confirmation email' do
+ email = random_email
+
+ clear_emails
+
+ visit '/'
+
+ fill_in 'user_username', with: random_username
+ fill_in 'user_email', with: email
+
+ click_button 'Reserve'
+
+ open_email email
+
+ current_email.have_content 'Confirm my email address'
+ end
+
+ it 'the user should be able to confirm his email address' do
+ email = random_email
+
+ clear_emails
+
+ visit '/'
+
+ fill_in 'user_username', with: random_username
+ fill_in 'user_email', with: email
+
+ click_button 'Reserve'
+
+ open_email email
+
+ current_email.click_link 'Confirm my email address'
+
+ page.should have_content "Email confirmed. Awaiting account approval."
+ end
+end
|
Add integration spec which covers the whole confirmation process
|
diff --git a/Interstellar.podspec b/Interstellar.podspec
index abc1234..def5678 100644
--- a/Interstellar.podspec
+++ b/Interstellar.podspec
@@ -10,6 +10,8 @@
s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.9'
+ s.watchos.deployment_target = '2.0'
+ s.tvos.deployment_target = '9.0'
s.source_files = 'Interstellar/*.swift'
|
Add tvOS and watchOS support to the podspec
|
diff --git a/todoist-api.gemspec b/todoist-api.gemspec
index abc1234..def5678 100644
--- a/todoist-api.gemspec
+++ b/todoist-api.gemspec
@@ -18,5 +18,5 @@ spec.require_paths = ["lib"]
spec.add_development_dependency "rspec", "~> 3"
- spec.add_development_dependency "webmock"
+ spec.add_development_dependency "webmock", "~> 1.21.0"
end
|
Update gemspec with webmock dependency
|
diff --git a/test/daemon_test.rb b/test/daemon_test.rb
index abc1234..def5678 100644
--- a/test/daemon_test.rb
+++ b/test/daemon_test.rb
@@ -1,5 +1,5 @@ require File.dirname(__FILE__) + '/test_helper.rb'
-context "APND Daemon" do
-
-end
+# context "APND Daemon" do
+#
+# end
|
Comment this out for now
|
diff --git a/spec/rule_spec.rb b/spec/rule_spec.rb
index abc1234..def5678 100644
--- a/spec/rule_spec.rb
+++ b/spec/rule_spec.rb
@@ -0,0 +1,18 @@+require_relative 'spec_helper'
+
+describe Picobot::RuleParser do
+ def format_rules(arr)
+ arr.map { |r| "#{r}\n" }.join('')
+ end
+
+ it 'should round-trip simple rules' do
+ rules = <<EOM
+0 *x** -> E 0
+0 *E*x -> S 0
+EOM
+ parser = Picobot::RuleParser.new
+ res = nil
+ expect { res = parser.parse(rules) }.not_to raise_exception
+ expect(format_rules(res)).to eq rules
+ end
+end
|
Add spec for rule parsing.
Signed-off-by: brian m. carlson <738bdd359be778fee9f0fc4e2934ad72f436ceda@crustytoothpaste.net>
|
diff --git a/spy_glass.gemspec b/spy_glass.gemspec
index abc1234..def5678 100644
--- a/spy_glass.gemspec
+++ b/spy_glass.gemspec
@@ -20,6 +20,7 @@ spec.add_development_dependency 'bundler', '~> 1.5'
spec.add_development_dependency 'rake'
spec.add_development_dependency 'rspec', '~> 3.1'
+ spec.add_development_dependency 'sinatra'
spec.add_dependency 'activesupport', '~> 3.1'
spec.add_dependency 'faraday', '~> 0.9'
|
Add sinatra as development dependency
|
diff --git a/core/dir/shared/pwd.rb b/core/dir/shared/pwd.rb
index abc1234..def5678 100644
--- a/core/dir/shared/pwd.rb
+++ b/core/dir/shared/pwd.rb
@@ -2,9 +2,6 @@ with_feature :encoding do
before :each do
@fs_encoding = Encoding.find('filesystem')
- if @fs_encoding == Encoding::US_ASCII
- @fs_encoding = Encoding::ASCII_8BIT
- end
end
end
@@ -24,7 +21,12 @@
with_feature :encoding do
it "returns a String with the filesystem encoding" do
- Dir.send(@method).encoding.should equal(@fs_encoding)
+ enc = Dir.send(@method).encoding
+ if @fs_encoding == Encoding::US_ASCII
+ [Encoding::US_ASCII, Encoding::ASCII_8BIT].should include(enc)
+ else
+ enc.should equal(@fs_encoding)
+ end
end
end
end
|
Allow both US_ASCII and ASCII_8BIT if fs encoding is unset (LANG=C)
|
diff --git a/db/seeds/super_admin.rb b/db/seeds/super_admin.rb
index abc1234..def5678 100644
--- a/db/seeds/super_admin.rb
+++ b/db/seeds/super_admin.rb
@@ -1 +1,7 @@-Administration.create(email: SUPERADMIN.email, password: SUPERADMIN.password)+begin
+ Administration.create!(email: SUPERADMIN.email, password: SUPERADMIN.password)
+rescue ActiveRecord::RecordInvalid
+ admin = Administration.find_by_email(SUPERADMIN.email)
+ admin.password = SUPERADMIN.password
+ admin.save
+end
|
Fix seeds superadmin password changement
|
diff --git a/spec/views/shared/milestones/_top.html.haml.rb b/spec/views/shared/milestones/_top.html.haml.rb
index abc1234..def5678 100644
--- a/spec/views/shared/milestones/_top.html.haml.rb
+++ b/spec/views/shared/milestones/_top.html.haml.rb
@@ -0,0 +1,35 @@+require 'spec_helper'
+
+describe 'shared/milestones/_top.html.haml' do
+ let(:group) { create(:group) }
+ let(:project) { create(:project, group: group) }
+ let(:milestone) { create(:milestone, project: project) }
+
+ before do
+ allow(milestone).to receive(:milestones) { [] }
+ end
+
+ it 'renders a deprecation message for a legacy milestone' do
+ allow(milestone).to receive(:legacy_group_milestone?) { true }
+
+ render 'shared/milestones/top', milestone: milestone
+
+ expect(rendered).to have_css('.milestone-deprecation-message')
+ end
+
+ it 'renders a deprecation message for a dashboard milestone' do
+ allow(milestone).to receive(:dashboard_milestone?) { true }
+
+ render 'shared/milestones/top', milestone: milestone
+
+ expect(rendered).to have_css('.milestone-deprecation-message')
+ end
+
+ it 'does not render a deprecation message for a non-legacy and non-dashboard milestone' do
+ assign :group, group
+
+ render 'shared/milestones/top', milestone: milestone
+
+ expect(rendered).not_to have_css('.milestone-deprecation-message')
+ end
+end
|
Add view spec for top
|
diff --git a/spec/models/order_spec.rb b/spec/models/order_spec.rb
index abc1234..def5678 100644
--- a/spec/models/order_spec.rb
+++ b/spec/models/order_spec.rb
@@ -13,6 +13,7 @@ end
it 'has many products' do
- expect(order.products).to be_truthy
+ order.products.create(name: 'Settlers of Catan')
+ expect(order.products.last.name).to eq('Settlers of Catan')
end
end
|
Modify spec for order and products assocation
|
diff --git a/priority_test.gemspec b/priority_test.gemspec
index abc1234..def5678 100644
--- a/priority_test.gemspec
+++ b/priority_test.gemspec
@@ -19,6 +19,6 @@ s.require_paths = ["lib"]
# specify any dependencies here; for example:
- s.add_runtime_dependency "rspec"
s.add_runtime_dependency "sequel"
+ s.add_development_dependency "rspec"
end
|
Change rspec to development dependency
|
diff --git a/test/test_map.rb b/test/test_map.rb
index abc1234..def5678 100644
--- a/test/test_map.rb
+++ b/test/test_map.rb
@@ -4,18 +4,12 @@
def setup
@window = Window.new
- @map_file = <<-eos
- V....g...V
- V....g...V
- {'.'=>0, 'V'=>1, 'g'=>2}
- eos
-
- @map = Map.new(window: @window, map_file: @map_file, tileset: nil)
+ @map = @window.current_grid.instance_variable_get(:@map)
+ @map_key = @map.instance_variable_get(:@map_key)
end
def test_extract_map_key_produces_a_hash
- assert_equal({'.'=>0, 'V'=>1, 'g'=>2},
- @map.instance_variable_get(:@map_key))
+ assert_equal({'.'=>0, 'V'=>1, 'g'=>2}, @map_key)
end
end
|
Use mapfile that is in place
|
diff --git a/app/helpers/venues_helper.rb b/app/helpers/venues_helper.rb
index abc1234..def5678 100644
--- a/app/helpers/venues_helper.rb
+++ b/app/helpers/venues_helper.rb
@@ -9,10 +9,10 @@ end
def options_for_purpose
- ['Trek', 'Trail', 'Jungle Safari', 'Ghaat', 'Valley', 'Waterfall', 'Beach', 'Sanctuary', 'Caves']
+ ['Fort', 'Trek', 'Trail', 'Jungle Safari', 'Ghaat', 'Valley', 'Waterfall', 'Beach', 'Sanctuary', 'Caves']
end
def options_for_grade
- ['Easy', 'Medium', 'Difficult', 'Extreme']
+ ['Easiest', 'Easier', 'Easy', 'Medium', 'Difficult', 'Very Difficult', 'Extreme']
end
end
|
Add more options in helpers
|
diff --git a/DateRangePicker.podspec b/DateRangePicker.podspec
index abc1234..def5678 100644
--- a/DateRangePicker.podspec
+++ b/DateRangePicker.podspec
@@ -1,6 +1,6 @@ Pod::Spec.new do |s|
s.name = 'DateRangePicker'
- s.version = '2.0.1'
+ s.version = '2.1'
s.homepage = 'https://github.com/MrMage/DateRangePicker'
s.summary = 'The best (?) date range picker control for OS X.'
@@ -13,7 +13,7 @@
s.source_files = 'DateRangePicker/*.{h,swift}'
s.module_name = 'DateRangePicker'
- s.source = { :git => 'https://github.com/MrMage/DateRangePicker.git', :tag => "v2.0.1" }
+ s.source = { :git => 'https://github.com/MrMage/DateRangePicker.git', :tag => "v2.1" }
s.requires_arc = true
s.frameworks = 'AppKit', 'Foundation'
|
Update the Podspec to version 2.1.
|
diff --git a/test/test_basic.rb b/test/test_basic.rb
index abc1234..def5678 100644
--- a/test/test_basic.rb
+++ b/test/test_basic.rb
@@ -2,12 +2,7 @@
class BasicTest < IWNGTest
def test_basic
- code = IronWorkerNG::Code::Base.new do
- name 'test_basic'
- exec(File.dirname(__FILE__) + '/hello.rb')
- end
-
- client.codes_create(code)
+ create_code('test_basic')
task_id = client.tasks_create('test_basic').id
task = client.tasks_wait_for(task_id)
@@ -20,4 +15,44 @@ log = client.tasks_log(task_id)
assert_equal( "hello\n", log, "worker stdout is in log" )
end
+
+ def test_task_label
+ create_code('test_label')
+ resp = client.tasks.create('test_label', {}, label: 'new_label' )
+ task = client.tasks.get(resp.id)
+ assert_equal "new_label", task.label
+ end
+
+ def test_schedule_label
+ create_code('test_label')
+ resp = client.schedules.create('test_label', {}, start_at: Time.now + 120, run_times: 1, label: 'schedule_label' )
+ task = client.schedules.get(resp.id)
+ assert_equal "schedule_label", task.label
+ end
+
+ def test_pause_task_queue
+ code_id = create_code('test_paused_task')
+ client.tasks.create('test_paused_task')
+ response = client.codes.pause_task_queue(code_id)
+ paused_code = client.codes.get(code_id)
+ assert_equal response['msg'], 'Paused'
+ assert_equal paused_code.max_concurrency, -1
+ client.codes.resume_task_queue(code_id)
+ end
+
+ def test_resume_task_queue
+ code_id = create_code('test_resumed_task')
+ client.tasks.create('test_paused_task')
+ client.codes.pause_task_queue(code_id)
+ sleep 1
+ response = client.codes.resume_task_queue(code_id)
+ resumed_code = client.codes.get(code_id)
+ assert_equal response['msg'], 'Resumed'
+ assert_not_equal resumed_code.max_concurrency, -1
+ end
+
+ def create_code(name)
+ code = code_bundle(exec: 'test/hello.rb', name: name)
+ client.codes.create(code).id
+ end
end
|
Cover with tests all new IronWorker features (label,tasks on pause)
|
diff --git a/static_deploy.gemspec b/static_deploy.gemspec
index abc1234..def5678 100644
--- a/static_deploy.gemspec
+++ b/static_deploy.gemspec
@@ -18,9 +18,7 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]
- spec.add_dependency "tty"
+ spec.add_dependency "tty", "0.2.0"
spec.add_development_dependency "bundler", "~> 1.3"
- spec.add_development_dependency "rake"
- spec.add_development_dependency "rspec"
end
|
Change to fix tty dependency.
|
diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb
index abc1234..def5678 100644
--- a/config/initializers/new_framework_defaults.rb
+++ b/config/initializers/new_framework_defaults.rb
@@ -18,6 +18,3 @@
# Require `belongs_to` associations by default. Previous versions had false.
Rails.application.config.active_record.belongs_to_required_by_default = false
-
-# Do not halt callback chains when a callback returns false. Previous versions had true.
-ActiveSupport.halt_callback_chains_on_return_false = true
|
Drop deprecated Rails configuration param
|
diff --git a/thermite.gemspec b/thermite.gemspec
index abc1234..def5678 100644
--- a/thermite.gemspec
+++ b/thermite.gemspec
@@ -17,11 +17,11 @@ # Mostly due to tomlrb
s.required_ruby_version = '>= 2.0.0'
- s.add_runtime_dependency 'minitar', '~> 0.5'
+ s.add_runtime_dependency 'minitar', '~> 0.6'
s.add_runtime_dependency 'rake', '>= 10'
s.add_runtime_dependency 'tomlrb', '~> 1.2'
s.add_development_dependency 'minitest', '~> 5.9'
s.add_development_dependency 'mocha', '~> 1.1'
- s.add_development_dependency 'rubocop', '~> 0.41'
+ s.add_development_dependency 'rubocop', '~> 0.49'
s.add_development_dependency 'yard', '~> 0.9'
end
|
Raise dependency versions due to vulnerabilities
|
diff --git a/raygun_client.gemspec b/raygun_client.gemspec
index abc1234..def5678 100644
--- a/raygun_client.gemspec
+++ b/raygun_client.gemspec
@@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = 'raygun_client'
- s.version = '0.3.2.0'
+ s.version = '0.4.0.0'
s.summary = 'Client for the Raygun API using the Obsidian HTTP client'
s.description = ' '
|
Package version increased from 0.3.2.0 to 0.4.0.0
|
diff --git a/WireCompiler.podspec b/WireCompiler.podspec
index abc1234..def5678 100644
--- a/WireCompiler.podspec
+++ b/WireCompiler.podspec
@@ -9,8 +9,8 @@ s.module_name = 'WireCompiler'
s.prepare_command = <<-CMD
- ./gradlew -p wire-library :wire-compiler:jar
- cp ./wire-library/wire-compiler/build/libs/wire-compiler-*.jar ./compiler.jar
+ ./gradlew -p wire-library :wire-compiler:assemble
+ cp ./wire-library/wire-compiler/build/libs/wire-compiler-*-SNAPSHOT-jar-with-dependencies.jar ./compiler.jar
CMD
s.preserve_paths = 'compiler.jar'
|
Use correct compiler artifact for Swift podspec
We want to use the fully assembled jar, not the one containing just the main classes.
|
diff --git a/Blockfile.rb b/Blockfile.rb
index abc1234..def5678 100644
--- a/Blockfile.rb
+++ b/Blockfile.rb
@@ -9,17 +9,17 @@ dependency efx.route 'engine'
block 'accordion' do
- scss_file 'accordion.scss'
+ scss_file 'accordion.css'
js_file 'accordion.js'
end
block 'tabs' do
- scss_file 'tabs.scss'
+ scss_file 'tabs.css'
js_file 'tabs.js'
end
block 'toggle' do
- scss_file 'toggle.scss'
+ scss_file 'toggle.css'
js_file 'toggle.js'
end
|
Update scss_file defs to use .css extension per WebBlocks update
|
diff --git a/lib/fake-resque/faker.rb b/lib/fake-resque/faker.rb
index abc1234..def5678 100644
--- a/lib/fake-resque/faker.rb
+++ b/lib/fake-resque/faker.rb
@@ -5,7 +5,13 @@ def fake_push(queue, item)
if @forward
payload = decode(encode(item))
- Resque::Job.new(queue, payload).perform
+ job=Resque::Job.new(queue, payload)
+ begin
+ job.perform
+ rescue Object=>e
+ job.fail(e)
+ # Eat the error because logically it happened in a worker
+ end
end
end
|
Put failed jobs in the failure back end
|
diff --git a/lib/ghi/commands/show.rb b/lib/ghi/commands/show.rb
index abc1234..def5678 100644
--- a/lib/ghi/commands/show.rb
+++ b/lib/ghi/commands/show.rb
@@ -22,6 +22,10 @@ else
if patch_path
i = throb { Web.new(repo).curl patch_path }
+ unless i.start_with? 'From'
+ warn 'Patch not found'
+ abort
+ end
page do
puts i
break
|
Abort with error when patch isn't found
This should fix #98.
Signed-off-by: Stephen Celis <06fa905d7f2aaced6dc72e9511c71a2a51e8aead@stephencelis.com>
|
diff --git a/test/test_pedantic.rb b/test/test_pedantic.rb
index abc1234..def5678 100644
--- a/test/test_pedantic.rb
+++ b/test/test_pedantic.rb
@@ -32,6 +32,18 @@ end
end
+ def test_heuristics_are_sorted
+ file = File.expand_path("../../lib/linguist/heuristics.rb", __FILE__)
+ heuristics = open(file).each.grep(/^ *disambiguate/)
+ assert_sorted heuristics
+ end
+
+ def test_heuristics_tests_are_sorted
+ file = File.expand_path("../test_heuristics.rb", __FILE__)
+ tests = open(file).each.grep(/^ *def test_[a-z_]+_by_heuristics/)
+ assert_sorted tests
+ end
+
def assert_sorted(list)
list.each_cons(2) do |previous, item|
flunk "#{previous} should come after #{item}" if previous > item
|
Add checks to keep heuristics alphabetised.
|
diff --git a/lib/rack/handler/reel.rb b/lib/rack/handler/reel.rb
index abc1234..def5678 100644
--- a/lib/rack/handler/reel.rb
+++ b/lib/rack/handler/reel.rb
@@ -30,7 +30,7 @@ rescue Interrupt
Celluloid.logger.info "Interrupt received... shutting down"
supervisor.terminate
- Celluloid.join(supervisor)
+ Celluloid::Actor.join(supervisor)
Celluloid.logger.info "That's all, folks!"
end
end
|
Join toplevel supervisor after terminating it
|
diff --git a/lib/saas_pulse/client.rb b/lib/saas_pulse/client.rb
index abc1234..def5678 100644
--- a/lib/saas_pulse/client.rb
+++ b/lib/saas_pulse/client.rb
@@ -22,7 +22,8 @@ end
def track(data={})
- Thread.new {open(build_url(data))}
+ url = build_url(data)
+ Thread.new {open(url)}
end
def build_url(data)
|
Validate args sent to SaasPulse.track before making the actual call
|
diff --git a/lib/serverspec/helper.rb b/lib/serverspec/helper.rb
index abc1234..def5678 100644
--- a/lib/serverspec/helper.rb
+++ b/lib/serverspec/helper.rb
@@ -7,7 +7,7 @@ options = Net::SSH::Config.for(host)
user = options[:user] || Etc.getlogin
- ret = {}
+ ret = nil
Net::SSH.start(host, user, options) do |ssh|
ret = ssh_exec!(ssh, cmd)
end
|
Change default value of ret
For easy error handling
|
diff --git a/lib/travis/config/url.rb b/lib/travis/config/url.rb
index abc1234..def5678 100644
--- a/lib/travis/config/url.rb
+++ b/lib/travis/config/url.rb
@@ -19,6 +19,8 @@ end
end
+ Ampqs = Amqp
+
class << self
def parse(url)
return Generic.new if url.nil? || url.empty?
|
Patch in AMQPS support from travis-core since its vendored here
|
diff --git a/lib/twitter2fleep/cli.rb b/lib/twitter2fleep/cli.rb
index abc1234..def5678 100644
--- a/lib/twitter2fleep/cli.rb
+++ b/lib/twitter2fleep/cli.rb
@@ -6,19 +6,51 @@ class Twitter2Fleep::CLI < Thor
desc "start", "Start the bot"
option :config_file, :default => "#{Dir.home}/.twitter2fleep/config.yml"
+ option :env_config, :type => :boolean, :default => false
def start
- config_file = options[:config_file]
- begin
- t2f_config = YAML::load_file(config_file)
- rescue Errno::ENOENT => exception
- puts "You need to create the config file \`#{config_file}\`"
- puts "See example at https://github.com/wancw/twitter2fleep/blob/master/config.yml.example"
- exit(-1)
+ if options[:env_config]
+ puts "Load config from environment variables."
+ config = load_env_config
+ else
+ config_file = options[:config_file]
+ puts "Load config from \`#{config_file}\`."
+ config = load_config_file(config_file)
end
- t2f_config[:twitter] = t2f_config[:client]
-
- bot = Twitter2Fleep::Bot.new(t2f_config)
+ bot = Twitter2Fleep::Bot.new(config)
bot.start
end
+
+ no_commands do
+ def load_env_config
+ {
+ :twitter => {
+ :consumer_key => ENV.fetch('TWITTER_CONSUMER_KEY', ''),
+ :consumer_secret => ENV.fetch('TWITTER_CONSUMER_SECRET', ''),
+ :access_token => ENV.fetch('TWITTER_ACCESS_TOKEN', ''),
+ :access_token_secret => ENV.fetch('TWITTER_ACCESS_TOKEN_SECRET', ''),
+ },
+ :selected_user_ids => ENV.fetch('SELECTED_USER_IDS', '').split(',').map {|v| v.to_i},
+ :fleep_hook_url => ENV.fetch('FLEEP_HOOK_URL', '')
+ }
+ end
+
+ def load_config_file(filename)
+ config_file = options[:config_file]
+
+ begin
+ config = YAML::load_file(config_file)
+ rescue Errno::ENOENT => exception
+ puts "You need to create the config file \`#{config_file}\`"
+ puts "See example at https://github.com/wancw/twitter2fleep/blob/master/config.yml.example"
+ exit(-1)
+ end
+
+ config[:twitter] = config[:client]
+ config.delete :config
+
+ return config
+ end
+ end
+
end
|
Add option to load config from environment variables.
|
diff --git a/cloud_conductor_utils.gemspec b/cloud_conductor_utils.gemspec
index abc1234..def5678 100644
--- a/cloud_conductor_utils.gemspec
+++ b/cloud_conductor_utils.gemspec
@@ -24,5 +24,4 @@
spec.add_dependency "rest-client"
spec.add_dependency "json"
- spec.add_dependency "base64"
end
|
Fix gemspec to remove unnecessary dependency.
|
diff --git a/Casks/satellite-eyes.rb b/Casks/satellite-eyes.rb
index abc1234..def5678 100644
--- a/Casks/satellite-eyes.rb
+++ b/Casks/satellite-eyes.rb
@@ -1,10 +1,10 @@ cask :v1 => 'satellite-eyes' do
- version '1.2.4'
- sha256 'adc1554c9095e3f316474e0f3712fa2a086d9405d126eca6359b8ebdc7451902'
+ version '1.4.0'
+ sha256 '9ef7e0e5e4ab5a341e4b7bfa2528e788caa2ad73d29949a305e1dfab94bb2574'
url "https://satellite-eyes.s3.amazonaws.com/satellite-eyes-#{version}.zip"
appcast 'https://satellite-eyes.s3.amazonaws.com/appcast.xml',
- :sha256 => 'ef859a7550ea22ebbd91423e2336228a35e60bb901112cfe1f17c8f0481ccbf9'
+ :sha256 => '5853ce38284dd959729ea64a423c359d6f2e383be3f062b38825762dfb97860b'
homepage 'http://satelliteeyes.tomtaylor.co.uk/'
license :unknown
|
Upgrade Satellite Eyes.app to v1.4.0
|
diff --git a/app/models/mailer.rb b/app/models/mailer.rb
index abc1234..def5678 100644
--- a/app/models/mailer.rb
+++ b/app/models/mailer.rb
@@ -1,10 +1,12 @@ ActionMailer::Base.default_content_type = 'text/html'
class Mailer < ActionMailer::Base
+ FROM = "Starbuck <noreply@#{ENV['APP_HOST']}>"
+
def star(star)
subject "#{star.to_sentence} got a star!"
recipients EVERYONE
- from 'Starbuck'
+ from FROM
body :star => star
end
@@ -16,7 +18,7 @@
subject "Superstars - #{Date.today.beginning_of_week.strftime('%B %d, %Y')}"
recipients EVERYONE
- from 'Starbuck'
+ from FROM
body :superstars => Superstar.last_week,
:num_stars => num_stars, :num_tos => num_tos,
|
Send email from a noreply@
|
diff --git a/tasks/pws-update-buildpack/run.rb b/tasks/pws-update-buildpack/run.rb
index abc1234..def5678 100644
--- a/tasks/pws-update-buildpack/run.rb
+++ b/tasks/pws-update-buildpack/run.rb
@@ -19,7 +19,7 @@
FileUtils.mv(orig_filename, filename)
-puts filename
+puts "\ncf update-buildpack #{ENV['BUILDPACK_NAME']}_buildpack -p #{filename}"
_, status = Open3.capture2e('cf', 'update-buildpack', "#{ENV['BUILDPACK_NAME']}_buildpack", '-p', "#{filename}")
raise 'cf update-buildpack failed' unless status.success?
|
Change update PWS task logging for enhanced clarity
[#147749883]
Signed-off-by: Keaty Gross <ba27100af1ae477f2abedd28f15b1dd208b1f48a@pivotal.io>
|
diff --git a/db/migrate/20150716211149_create_chat_rooms.rb b/db/migrate/20150716211149_create_chat_rooms.rb
index abc1234..def5678 100644
--- a/db/migrate/20150716211149_create_chat_rooms.rb
+++ b/db/migrate/20150716211149_create_chat_rooms.rb
@@ -1,8 +1,8 @@ class CreateChatRooms < ActiveRecord::Migration
def change
create_table :chat_rooms do |t|
- t.references :sender
- t.references :recipient
+ t.references :sender, index: true, foreign_key: true
+ t.references :recipient, index: true, foreign_key: true
t.timestamps null: false
end
|
Add constraints to chat rooms migration
|
diff --git a/features/support/env.rb b/features/support/env.rb
index abc1234..def5678 100644
--- a/features/support/env.rb
+++ b/features/support/env.rb
@@ -6,8 +6,15 @@
# TODO: Maze.hooks.after_configuration doesn't seem to work ?
AfterConfiguration do
+ # log to console, not the file
Maze.config.file_log = false
Maze.config.log_requests = true
+
+ # don't wait so long for requests/not to receive requests
+ Maze.config.receive_requests_wait = 10
+ Maze.config.receive_no_requests_wait = 10
+
+ # bugsnag-symfony doesn't send the integrity header (because it's not needed)
Maze.config.enforce_bugsnag_integrity = false
if ENV["DEBUG"]
|
Reduce the wait time for requests
|
diff --git a/CodableFirebase.podspec b/CodableFirebase.podspec
index abc1234..def5678 100644
--- a/CodableFirebase.podspec
+++ b/CodableFirebase.podspec
@@ -15,5 +15,5 @@
s.source = { :git => "https://github.com/alickbass/CodableFirebase.git", :tag => s.version, :branch => 'master'}
s.source_files = "CodableFirebase/*.swift"
- s.swift_version = '4.1'
+ s.swift_version = '4.2'
end
|
Update podspec to Swift 4.2
|
diff --git a/DDCoachMarks.podspec b/DDCoachMarks.podspec
index abc1234..def5678 100644
--- a/DDCoachMarks.podspec
+++ b/DDCoachMarks.podspec
@@ -7,7 +7,7 @@ s.author = { "Darin Doria" => "ddoria921@gmail.com" }
s.source = { :git => "https://github.com/ddoria921/DDCoachMarks.git", :branch => "master" }
s.platform = :ios, '6.0'
- s.source_files = 'Coach Marks/*.{h,m}'
+ s.source_files = 'Coach Marks/DD*.{h,m}'
s.frameworks = 'Foundation', 'UIKit', 'QuartzCore'
s.requires_arc = true
end
|
Remove example project files from Podspec
|
diff --git a/features/step_definitions/resource_steps.rb b/features/step_definitions/resource_steps.rb
index abc1234..def5678 100644
--- a/features/step_definitions/resource_steps.rb
+++ b/features/step_definitions/resource_steps.rb
@@ -15,13 +15,8 @@
instance = resource_model.find(instance.id)
- unless instance.acl == {"foo" => :bar}
- raise %[Expecting {"foo"=> :bar} as an ACL but found #{instance.acl.inspect}]
- end
-
- unless instance.acl.kind_of?(resource_model.acl)
- raise "Expecting #{instance.acl.class} to be a #{resource_model.acl}"
- end
+ expect(instance.acl).to eq({"foo" => :bar})
+ expect(instance.acl).to be_a(resource_model.acl)
end
Then(/(\w+) can see (?:only)? *"(.*?)" in the (\w+) authorized list/) do |actor_name, resource_names, resource_model|
@@ -31,9 +26,7 @@ resources = resource_names.map {|name| fetch_resource(resource_model, name)}
resource_model = find_model(resource_model)
- accessible = resource_model.accessible_by(actor).to_a
+ accessible = resource_model.accessible_by(actor)
- unless (accessible & resources) == resources
- raise "Expected to have access to #{resources} but found only #{accessible}"
- end
+ expect(accessible).to match(resources)
end
|
Use rspec expectations where possible
|
diff --git a/test/server/stdout_writer_test.rb b/test/server/stdout_writer_test.rb
index abc1234..def5678 100644
--- a/test/server/stdout_writer_test.rb
+++ b/test/server/stdout_writer_test.rb
@@ -0,0 +1,47 @@+require_relative 'test_base'
+require_source 'stdout_writer'
+
+class StdoutWriterTest < TestBase
+
+ def self.id58_prefix
+ '60e'
+ end
+
+ # - - - - - - - - - - - - - - - - -
+
+ test 'dF7', %w( write(s) is a no-op when s is empty ) do
+ assert_equal '', write('')
+ end
+
+ # - - - - - - - - - - - - - - - - -
+
+ test 'dF8', %w( write(s) logs s and a trailing newline when s does not end in a newline ) do
+ assert_equal "hello\n", write('hello')
+ end
+
+ # - - - - - - - - - - - - - - - - -
+
+ test 'dF9', %w( write(s) logs s as it is when s ends in a newline ) do
+ assert_equal "world\n", write("world\n")
+ end
+
+ private
+
+ def write(s)
+ writer = StdoutWriter.new(nil)
+ captured_stdout { writer.write(s) }
+ end
+
+ def captured_stdout
+ begin
+ old_stdout = $stdout
+ $stdout = StringIO.new('', 'w')
+ yield
+ captured = $stdout.string
+ ensure
+ $stdout = old_stdout
+ end
+ captured
+ end
+
+end
|
Add tests for StdoutWriter class
|
diff --git a/reporter.rb b/reporter.rb
index abc1234..def5678 100644
--- a/reporter.rb
+++ b/reporter.rb
@@ -1,9 +1,13 @@ #!/usr/bin/env ruby
require 'active_support/all'
-require './lib/stripe_data'
-require './lib/clearbooks_csv'
-require './lib/clearbooks_clients'
+
+$LOAD_PATH.unshift File.expand_path(".", "lib")
+
+require 'stripe_data'
+require 'clearbooks_csv'
+require 'clearbooks_clients'
+require 'stripe_charge'
month = ARGV[0].to_s || Time.now.month
year = ARGV[1].to_s || Time.now.year
|
Use LOAD_PATH to require files
|
diff --git a/benchmarks/rdoc_vs_yardoc.rb b/benchmarks/rdoc_vs_yardoc.rb
index abc1234..def5678 100644
--- a/benchmarks/rdoc_vs_yardoc.rb
+++ b/benchmarks/rdoc_vs_yardoc.rb
@@ -0,0 +1,8 @@+require "benchmark"
+
+files = Dir.glob(File.dirname(__FILE__) + '/../lib/**/*.rb').join(" ")
+Benchmark.bmbm do |x|
+ x.report("rdoc") { `rm -rf rdoc && rdoc -q -o rdoc #{files} && rm -rf rdoc` }
+ x.report("yardoc") { `rm -rf yard && ./bin/yardoc -q -o yard #{files} && rm -rf yard` }
+ x.report("yardoc-cached") { `rm -rf yard && ./bin/yardoc -c -q -o yard #{files} && rm -rf yard` }
+end
|
Add RDoc vs YARD benchmark
|
diff --git a/tidylib-validation_errors.gemspec b/tidylib-validation_errors.gemspec
index abc1234..def5678 100644
--- a/tidylib-validation_errors.gemspec
+++ b/tidylib-validation_errors.gemspec
@@ -10,7 +10,6 @@ spec.email = ["sumangurung@gmail.com"]
if spec.respond_to?(:metadata)
- spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com' to prevent pushes to rubygems.org, or delete to allow pushes to any server."
end
spec.summary = %q{Simple Validation Errors}
|
Modify gemspec to allow pusing to rubygems
|
diff --git a/spec/roll/amp/compiled_stylesheet_file_spec.rb b/spec/roll/amp/compiled_stylesheet_file_spec.rb
index abc1234..def5678 100644
--- a/spec/roll/amp/compiled_stylesheet_file_spec.rb
+++ b/spec/roll/amp/compiled_stylesheet_file_spec.rb
@@ -2,7 +2,7 @@
RSpec.describe Roll::Amp::CompiledStylesheetFile do
def create(stylesheet_name)
- app_root = File.expand_path('../../', __dir__)
+ app_root = File.expand_path('../../', File.dirname(__FILE__))
Roll::Amp::CompiledStylesheetFile.new(app_root, stylesheet_name)
end
|
Use __FILE__ instead of __dir__ which isn't supported by JRuby.
|
diff --git a/translate/spec/quickstart_spec.rb b/translate/spec/quickstart_spec.rb
index abc1234..def5678 100644
--- a/translate/spec/quickstart_spec.rb
+++ b/translate/spec/quickstart_spec.rb
@@ -20,8 +20,8 @@ it "translates Hello, world! to Russian" do
translate = Google::Cloud::Translate.new
expect(Google::Cloud::Translate).to receive(:new).
- with(project: "YOUR_PROJECT_ID").
- and_return(translate)
+ with(project: "YOUR_PROJECT_ID").
+ and_return(translate)
expect {
load File.expand_path("../quickstart.rb", __dir__)
|
Change alignment of client instantiation mocking
|
diff --git a/tumblr_client.gemspec b/tumblr_client.gemspec
index abc1234..def5678 100644
--- a/tumblr_client.gemspec
+++ b/tumblr_client.gemspec
@@ -5,7 +5,7 @@ gem.add_dependency 'faraday', '~> 0.9.0'
gem.add_dependency 'faraday_middleware', '~> 0.9.0'
gem.add_dependency 'json'
- gem.add_dependency 'simple_oauth', '0.2.0'
+ gem.add_dependency 'simple_oauth'
gem.add_dependency 'oauth'
gem.add_dependency 'mime-types'
gem.add_development_dependency 'rake'
|
Revert "Updated oauth library to 0.2.0"
This reverts commit ff94c8399d86bf790be8614f3404d964abf76e02.
|
diff --git a/features/support/env.rb b/features/support/env.rb
index abc1234..def5678 100644
--- a/features/support/env.rb
+++ b/features/support/env.rb
@@ -2,6 +2,3 @@ require 'database_cleaner'
require 'rspec/expectations'
-
-require 'test/unit/assertions'
-
|
Remove unused requirement of test/unit/assertions
|
diff --git a/what_now.gemspec b/what_now.gemspec
index abc1234..def5678 100644
--- a/what_now.gemspec
+++ b/what_now.gemspec
@@ -2,8 +2,8 @@ s.name = 'what_now'
s.version = '0.0.1'
s.date = '2014-02-27'
- s.summary = 'Find TODO comments in your code'
- s.description = 'Executable for finding TODO comments on directories'
+ s.summary = 'Find todo comments in your code'
+ s.description = 'Executable for finding todo comments on directories'
s.authors = ['Edgar Cabrera']
s.email = 'edgar@cafeinacode.com'
s.license = 'MIT'
|
Add executable for showing todos
|
diff --git a/test/models/authorization_test.rb b/test/models/authorization_test.rb
index abc1234..def5678 100644
--- a/test/models/authorization_test.rb
+++ b/test/models/authorization_test.rb
@@ -15,8 +15,8 @@ end
it 'has lists of stories and series belonging to accounts authorized on token' do
- authorization.token_auth_stories.must_equal account.stories
- authorization.token_auth_series.must_equal account.series
+ assert_same_elements(authorization.token_auth_stories, account.stories)
+ assert_same_elements(authorization.token_auth_series, account.series)
end
it 'checks against token to see if accounts are authorized' do
|
Make token story/series test order agnostic
|
diff --git a/test/xample/text/no_match_spec.rb b/test/xample/text/no_match_spec.rb
index abc1234..def5678 100644
--- a/test/xample/text/no_match_spec.rb
+++ b/test/xample/text/no_match_spec.rb
@@ -0,0 +1,7 @@+require File.dirname(__FILE__) + "/../../test_helper"
+
+describe Xample::Text::NoMatch do
+ it "should be an XampleException" do
+ Xample::Text::NoMatch.should < Xample::XampleException
+ end
+end
|
Add small spec for NoMatch exception.
|
diff --git a/test_client/data/certs_example.rb b/test_client/data/certs_example.rb
index abc1234..def5678 100644
--- a/test_client/data/certs_example.rb
+++ b/test_client/data/certs_example.rb
@@ -1,9 +1,13 @@-NORDEA_CSR = ''.freeze
-NORDEA_CERT = ''.freeze
-NORDEA_PRIVATE_KEY = ''.freeze
-DANSKE_BANK_ENC_CERT = ''.freeze
-DANSKE_SIGNING_CERT_REQUEST = ''.freeze
-DANSKE_ENC_CERT_REQUEST = ''.freeze
-OP_CSR = ''.freeze
-OP_PRIVATE_KEY = ''.freeze
-OP_CERT = ''.freeze
+# frozen_string_literal: true
+
+NORDEA_CSR = ''
+NORDEA_RENEW_CSR = ''
+NORDEA_CERT = ''
+NORDEA_PRIVATE_KEY = ''
+DANSKE_BANK_ENC_CERT = ''
+DANSKE_SIGNING_CERT_REQUEST = ''
+DANSKE_ENC_CERT_REQUEST = ''
+OP_CSR = ''
+OP_RENEW_CSR = ''
+OP_PRIVATE_KEY = ''
+OP_CERT = ''
|
Update test client certs example
|
diff --git a/activeresource/test/abstract_unit.rb b/activeresource/test/abstract_unit.rb
index abc1234..def5678 100644
--- a/activeresource/test/abstract_unit.rb
+++ b/activeresource/test/abstract_unit.rb
@@ -4,6 +4,7 @@ require 'test/unit'
require 'active_resource'
require 'active_support'
+require 'active_support/test_case'
$:.unshift "#{File.dirname(__FILE__)}/../test"
require 'setter_trap'
|
Fix isolated test fail due to missing mocha
|
diff --git a/geos-extensions.gemspec b/geos-extensions.gemspec
index abc1234..def5678 100644
--- a/geos-extensions.gemspec
+++ b/geos-extensions.gemspec
@@ -11,6 +11,7 @@ s.description = "Extensions for the GEOS library."
s.summary = s.description
s.email = "code@zoocasa.com"
+ s.license = "MIT"
s.extra_rdoc_files = [
"README.rdoc"
]
|
Add license details to gemspec.
|
diff --git a/etc/qed.rb b/etc/qed.rb
index abc1234..def5678 100644
--- a/etc/qed.rb
+++ b/etc/qed.rb
@@ -1,13 +1,12 @@ #!/usr/bin/env ruby
-#
-# Setup QED.
-#
-config :qed, :profile=>:cov do
+QED.configure 'cov' do
require 'simplecov'
+ SimpleCov.command_name 'qed'
SimpleCov.start do
+ add_filter '/demo/'
coverage_dir 'log/coverage'
- #add_group "RSpec", "lib/assay/rspec.rb"
+ #add_group "Label", "lib/qed/directory"
end
end
|
:admin: Move config for QED to etc directory.
|
diff --git a/faxtest.rb b/faxtest.rb
index abc1234..def5678 100644
--- a/faxtest.rb
+++ b/faxtest.rb
@@ -0,0 +1,13 @@+require 'phaxio'
+require 'pry'
+
+Phaxio.config do |config|
+ config.api_key = ENV['PHAXIO_API_KEY']
+ config.api_secret = ENV['PHAXIO_API_SECRET']
+end
+
+file1 = File.new('/tmp/application_2bedc7f5a4bcfa8dbb32afac6fccd499-6-signed.png')
+file2 = File.new('/tmp/application_2bedc7f5a4bcfa8dbb32afac6fccd499-7.png')
+result = Phaxio.send_fax(to: ENV['FAX_DESTINATION_NUMBER'], filename: [file1, file2])
+
+binding.pry
|
Add working fax test code
|
diff --git a/Formula/wakeonlan.rb b/Formula/wakeonlan.rb
index abc1234..def5678 100644
--- a/Formula/wakeonlan.rb
+++ b/Formula/wakeonlan.rb
@@ -7,6 +7,11 @@
def install
system "perl", "Makefile.PL"
+ # Make sure script and manual get installed in Cellar properly
+ inreplace "Makefile" do |s|
+ s.change_make_var! "INSTALLSITESCRIPT", bin
+ s.change_make_var! "INSTALLSITEMAN1DIR", man1
+ end
system "make"
system "make install"
end
|
Fix to install in Cellar as it should
The current wakeonlan formula causes the script and man
page to get installed directly into /usr/local instead of
into the Cellar like it should, this patch fixes that.
Signed-off-by: Adam Vandenberg <34c2b6407fd5a10249a15d699d40f9ed1782e98c@gmail.com>
|
diff --git a/Library/Formula/bash.rb b/Library/Formula/bash.rb
index abc1234..def5678 100644
--- a/Library/Formula/bash.rb
+++ b/Library/Formula/bash.rb
@@ -18,4 +18,10 @@ system "./configure", "--prefix=#{prefix}", "--with-installed-readline"
system "make install"
end
+
+ def caveats; <<-EOS.undent
+ In order to use this build of bash as your login shell,
+ it must be added to /etc/shells.
+ EOS
+ end
end
|
Add caveat about using this Bash as login shell
Signed-off-by: Adam Vandenberg <34c2b6407fd5a10249a15d699d40f9ed1782e98c@gmail.com>
|
diff --git a/lib/awspec/type/base.rb b/lib/awspec/type/base.rb
index abc1234..def5678 100644
--- a/lib/awspec/type/base.rb
+++ b/lib/awspec/type/base.rb
@@ -7,8 +7,14 @@ attr_reader :id, :resource
def initialize(id = nil)
+ @display_name = id
super
@id = nil
+ end
+
+ def to_s
+ type = self.class.name.demodulize.underscore
+ "#{type} '#{@display_name}'"
end
def exists?
|
Add method to_s for spec results
|
diff --git a/MenuPopOverView.podspec b/MenuPopOverView.podspec
index abc1234..def5678 100644
--- a/MenuPopOverView.podspec
+++ b/MenuPopOverView.podspec
@@ -1,14 +1,14 @@ Pod::Spec.new do |s|
s.name = "MenuPopOverView"
- s.version = "0.0.1"
+ s.version = "0.0.2"
s.summary = "A custom PopOverView looks like UIMenuController works on iPhone."
s.homepage = "https://github.com/camelcc/MenuPopOverView"
s.screenshots = "https://github.com/camelcc/MenuPopOverView/blob/master/popOver.png"
s.license = 'MIT'
- s.author = { "camel_young" => "camel.young@gmail.com" }
+ s.author = { "camel_young" => "camel.young@gmail.com" }
s.social_media_url = "http://twitter.com/camel_young"
s.platform = :ios, '7.0'
- s.source = { :git => "https://github.com/camelcc/MenuPopOverView.git", :tag => "0.0.1" }
- s.source_files = 'MenuPopOverView'
+ s.source = { :git => "https://github.com/camelcc/MenuPopOverView.git", :tag => "0.0.2" }
+ s.source_files = 'MenuPopOverView'
s.requires_arc = true
end
|
Update pod spec to v0.0.2
update pod spec to v0.0.2
|
diff --git a/lib/flickxtractr/cli.rb b/lib/flickxtractr/cli.rb
index abc1234..def5678 100644
--- a/lib/flickxtractr/cli.rb
+++ b/lib/flickxtractr/cli.rb
@@ -11,5 +11,11 @@ `brew install #{dependency}`
end
end
+
+ desc "extract URL", "Extract and enrich flickr image"
+ def extract(flickr_url)
+ extractr = Flickxtractr::Extractr.new(flickr_url)
+ extractr.generate_image!
+ end
end
end
|
Add exec command for image extraction
|
diff --git a/lib/gist-block-macro.rb b/lib/gist-block-macro.rb
index abc1234..def5678 100644
--- a/lib/gist-block-macro.rb
+++ b/lib/gist-block-macro.rb
@@ -1,7 +1,7 @@ RUBY_ENGINE == 'opal' ? (require 'gist-block-macro/extension') : (require_relative 'gist-block-macro/extension')
-Extensions.register do
- if (registry.document.basebackend? 'html') && (registry.document.safe < SafeMode::SECURE)
+Asciidoctor::Extensions.register do
+ if (@document.basebackend? 'html') && (@document.safe < SafeMode::SECURE)
block_macro GistBlockMacro
end
end
|
Use @document instead of registry.document
|
diff --git a/spec/app/reader_spec.rb b/spec/app/reader_spec.rb
index abc1234..def5678 100644
--- a/spec/app/reader_spec.rb
+++ b/spec/app/reader_spec.rb
@@ -13,4 +13,11 @@ expect(last_response).to be_not_found
end
end
+
+ describe "GET /about" do
+ it "returns a success" do
+ get "/about"
+ expect(last_response).to be_ok
+ end
+ end
end
|
Make sure the about route works
|
diff --git a/utbs.gemspec b/utbs.gemspec
index abc1234..def5678 100644
--- a/utbs.gemspec
+++ b/utbs.gemspec
@@ -10,13 +10,13 @@ s.authors = ["Andrij Tytar"]
s.email = ["faust@dot.com.ua"]
s.homepage = "http://utbs.kiev.ua"
- s.summary = "Rails Client for utbs.com.ua link bla"
+ s.summary = "Rails Client for utbs.com.ua link exchanger"
s.description = "Link sharing system"
s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"]
s.test_files = Dir["test/**/*"]
- s.add_dependency "rails", "~> 4.0.0.beta1"
+ s.add_dependency "rails", ">= 3.2"
# s.add_dependency "rails", "~> 3.0"
s.add_development_dependency 'sqlite3'
|
Add Rails 3.2 to dependency
|
diff --git a/attributes/theme.rb b/attributes/theme.rb
index abc1234..def5678 100644
--- a/attributes/theme.rb
+++ b/attributes/theme.rb
@@ -1,9 +1,9 @@-override['gerrit']['theme']['compile_files'] = %w{
+default['gerrit']['theme']['compile_files'] = %w{
GerritSiteHeader.html
GerritSite.css
}
-override['gerrit']['theme']['static_files'] = %w{
+default['gerrit']['theme']['static_files'] = %w{
401-redirect-to-wiki.html
footer-logo.b9f2ba66aab906975d481c42d4.cache.gif
s-buttons.2a9e3abb93e617254323a2f81b.cache.png
|
Set attributes with default precedence level
|
diff --git a/acfs.gemspec b/acfs.gemspec
index abc1234..def5678 100644
--- a/acfs.gemspec
+++ b/acfs.gemspec
@@ -20,6 +20,7 @@
spec.add_runtime_dependency 'activesupport'
spec.add_runtime_dependency 'activemodel'
+ spec.add_runtime_dependency 'typhoeus'
spec.add_development_dependency 'bundler', '~> 1.3'
spec.add_development_dependency 'webmock', '~> 1.7'
|
Add typhoeus as http library.
|
diff --git a/features/step_definitions/cross_compilation.rb b/features/step_definitions/cross_compilation.rb
index abc1234..def5678 100644
--- a/features/step_definitions/cross_compilation.rb
+++ b/features/step_definitions/cross_compilation.rb
@@ -6,13 +6,14 @@ end
Given %r{^I've installed cross compile toolchain$} do
- compiler = 'i586-mingw32msvc-gcc'
- found = false
- ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
- next unless File.exist?(File.join(path, compiler))
- found = true
+ compilers = %w(i586-mingw32msvc-gcc i386-mingw32-gcc)
+ paths = ENV['PATH'].split(File::PATH_SEPARATOR)
+ compiler = compilers.find do |comp|
+ paths.find do |path|
+ File.exist? File.join(path, comp)
+ end
end
- raise "Cannot locate '#{compiler}' in the PATH." unless found
+ raise "Cannot locate '#{compiler}' in the PATH." unless compiler
end
Then /^binaries for platform '(.*)' get generated$/ do |platform|
|
Fix compiler discovery in steps, for macports mingw
|
diff --git a/lib/logster/middleware/debug_exceptions.rb b/lib/logster/middleware/debug_exceptions.rb
index abc1234..def5678 100644
--- a/lib/logster/middleware/debug_exceptions.rb
+++ b/lib/logster/middleware/debug_exceptions.rb
@@ -1,7 +1,14 @@ class Logster::Middleware::DebugExceptions < ActionDispatch::DebugExceptions
private
- def log_error(env,wrapper)
+ def log_error(request_or_env, wrapper)
+ env =
+ if Rails::VERSION::MAJOR > 4
+ request_or_env.env
+ else
+ request_or_env
+ end
+
exception = wrapper.exception
Logster.config.current_context.call(env) do
|
Fix `Logster::Middleware::DebugExceptions` error with Rails 5.
fixes https://github.com/discourse/logster/issues/55
|
diff --git a/db/seeds.rb b/db/seeds.rb
index abc1234..def5678 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -1,7 +1,22 @@-# This file should contain all the record creation needed to seed the database with its default values.
-# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
-#
-# Examples:
-#
-# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
-# Mayor.create(name: 'Emanuel', city: cities.first)
+require 'faker'
+
+users = []
+applications = []
+companies = []
+race = %w(black white latino asian)
+gender = %w(male female non-binary)
+
+5.times do
+ users << User.create!(username:Faker::Internet.user_name,email:Faker::Internet.free_email,hash_password:"password",race:race.sample,gender:gender.sample)
+ p users.last
+end
+
+5.times do
+ companies << Company.create!(name:Faker::Company.name, state:Faker::Address.state, city:Faker::Address.city, address:Faker::Address.street_address)
+ p companies.last
+end
+
+10.times do
+ applications << Application.create!(applicant_id:users.sample.id,company_id:companies.sample.id)
+ p applications.last
+end
|
Create User, application, and companies seed data
|
diff --git a/core/threadgroup/list_spec.rb b/core/threadgroup/list_spec.rb
index abc1234..def5678 100644
--- a/core/threadgroup/list_spec.rb
+++ b/core/threadgroup/list_spec.rb
@@ -16,6 +16,8 @@ tg.add(th2)
(tg.list & [th1, th2]).should include(th1, th2)
+ Thread.pass until th1.status == 'sleep' || !th1.alive?
+ Thread.pass until th2.status == 'sleep' || !th2.alive?
th1.run; th1.join
th2.run; th2.join
end
|
Fix yet another race condition in a threading spec:
ThreadGroup's list_spec was making the assumption that immediately after
the two threads posted to the Channel, they would then be asleep. The
spec ran through its checks and then tried to #run and #join those
threads. But since there was no guarantee either thread had actually
reached the #sleep call, there was a real chance #run would be called too
early and #join would end up waiting for a sleeping thread. The fix was
simply to wait for both threads to either be sleeping or dead, and then
proceed to the #run and #wait calls.
|
diff --git a/spec/airbrush_spec.rb b/spec/airbrush_spec.rb
index abc1234..def5678 100644
--- a/spec/airbrush_spec.rb
+++ b/spec/airbrush_spec.rb
@@ -0,0 +1,9 @@+require File.dirname(__FILE__) + '/spec_helper.rb'
+
+describe 'airbrush' do
+
+ it 'should add a log method to object' do
+ Object.should respond_to(:log)
+ end
+
+end
|
Add root level airbrush spec
git-svn-id: 6d9b9a8f21f96071dc3ac7ff320f08f2a342ec80@39 daa9635f-4444-0410-9b3d-b8c75a019348
|
diff --git a/db/seeds.rb b/db/seeds.rb
index abc1234..def5678 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -1,7 +1,2 @@-# This file should contain all the record creation needed to seed the database with its default values.
-# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
-#
-# Examples:
-#
-# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
-# Mayor.create(name: 'Emanuel', city: cities.first)
+FactoryGirl.create(:hackney_booking_manager, name: "Andrew")
+FactoryGirl.create(:hackney_booking_request)
|
Add seed data for a simple hackney booking request
Also adds the first user for gds-sso.
|
diff --git a/ext/wikitext/extconf.rb b/ext/wikitext/extconf.rb
index abc1234..def5678 100644
--- a/ext/wikitext/extconf.rb
+++ b/ext/wikitext/extconf.rb
@@ -28,7 +28,7 @@ exit 1
end
-if RUBY_VERSION !~ /\A2\.[0-4](\.|$)/
+if RUBY_VERSION !~ /\A2\.[0-5](\.|$)/
raise "unsupported Ruby version: #{RUBY_VERSION}"
end
|
Mark Ruby 2.5.0 as supported
|
diff --git a/app/serializers/sprangular/adjustment_serializer.rb b/app/serializers/sprangular/adjustment_serializer.rb
index abc1234..def5678 100644
--- a/app/serializers/sprangular/adjustment_serializer.rb
+++ b/app/serializers/sprangular/adjustment_serializer.rb
@@ -1,7 +1,7 @@ module Sprangular
class AdjustmentSerializer < BaseSerializer
attributes :id, :source_type, :source_id, :adjustable_type, :adjustable_id,
- :originator_type, :originator_id, :amount, :label, :mandatory,
- :locked, :eligible, :created_at, :updated_at, :display_amount
+ :amount, :label, :mandatory,
+ :included, :eligible, :display_amount
end
end
|
Remove originator_type/originator_id attributes from Adjustment serializer
|
diff --git a/puppet-lint-no_cron_resources-check.gemspec b/puppet-lint-no_cron_resources-check.gemspec
index abc1234..def5678 100644
--- a/puppet-lint-no_cron_resources-check.gemspec
+++ b/puppet-lint-no_cron_resources-check.gemspec
@@ -21,7 +21,7 @@ spec.add_development_dependency 'rspec', '~> 3.9.0'
spec.add_development_dependency 'rspec-its', '~> 1.0'
spec.add_development_dependency 'rspec-collection_matchers', '~> 1.0'
- spec.add_development_dependency 'rubocop', '~> 0.85.0'
+ spec.add_development_dependency 'rubocop', '~> 0.86.0'
spec.add_development_dependency 'rake', '~> 13.0.0'
spec.add_development_dependency 'rspec-json_expectations', '~> 2.2'
spec.add_development_dependency 'simplecov', '~> 0.18.0'
|
Update rubocop requirement from ~> 0.85.0 to ~> 0.86.0
Updates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.85.0...v0.86.0)
Signed-off-by: dependabot-preview[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@dependabot.com>
|
diff --git a/app/controllers/builds_controller.rb b/app/controllers/builds_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/builds_controller.rb
+++ b/app/controllers/builds_controller.rb
@@ -1,2 +1,15 @@ class BuildsController < ApplicationController
+ def create
+ name = params[:project_name]
+ project = Project.find_by_name(name)
+
+ if project.nil?
+ ProjectsWorker.perform_async
+ render :text => "Project was not found. Project database is being"\
+ "updated. Retry later"
+ return
+ end
+
+ build = Build.new(params.except(:project_name))
+ end
end
|
Work on the builds controller
|
diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/people_controller.rb
+++ b/app/controllers/people_controller.rb
@@ -1,4 +1,6 @@ class PeopleController < AuthorizedController
+ has_scope :by_text
+
def show
# Invoice scoping by state
@invoices = resource.invoices.where("type != 'Salary'").invoice_state(params[:invoice_state])
|
Fix search in people index.
|
diff --git a/app/controllers/pusher_controller.rb b/app/controllers/pusher_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/pusher_controller.rb
+++ b/app/controllers/pusher_controller.rb
@@ -14,19 +14,16 @@ # If there is an error, the response will look like this
# {"channel_name":["can't be blank"],"socket_id":["can't be blank"]}
def auth
- if current_user
- errors = {}
- errors[:channel_name] = [I18n.t('errors.empty_params')] if params[:channel_name].blank?
- errors[:socket_id] = [I18n.t('errors.empty_params')] if params[:socket_id].blank?
+ errors = {}
+ message = [I18n.t('errors.empty_params')]
+ errors[:channel_name] = message if params[:channel_name].blank?
+ errors[:socket_id] = message if params[:socket_id].blank?
- if errors.empty?
- response = Pusher[params[:channel_name]].authenticate(params[:socket_id])
- render json: response
- else
- render json: errors, status: :bad_request
- end
+ if errors.empty?
+ response = Pusher[params[:channel_name]].authenticate(params[:socket_id])
+ render json: response
else
- render text: t('pusher.not_authorized'), status: '403'
+ render json: errors, status: :bad_request
end
end
end
|
Remove unnecessary user check in PusherController
|
diff --git a/app/helpers/publishing_api_helper.rb b/app/helpers/publishing_api_helper.rb
index abc1234..def5678 100644
--- a/app/helpers/publishing_api_helper.rb
+++ b/app/helpers/publishing_api_helper.rb
@@ -2,7 +2,7 @@ # state_history returns a hash like {"3"=>"draft", "2"=>"published", "1"=>"superseded"}
# so we need to get the highest value for a key.
def latest_edition_number(content_id, publication_state: "")
- latest_content_item = content_item(content_id)
+ latest_content_item = content_item(content_id).with_indifferent_access
if publication_state.present?
version = latest_content_item[:state_history].select { |_, hash| hash[publication_state] }
|
Allow indifferent access for content item hash
Publishing api returns a content item hash with string keys.
Allow the hash to be accessed with label keys as well.
See https://api.rubyonrails.org/v4.2/classes/ActiveSupport/HashWithIndifferentAccess.html
|
diff --git a/app/serializers/effort_serializer.rb b/app/serializers/effort_serializer.rb
index abc1234..def5678 100644
--- a/app/serializers/effort_serializer.rb
+++ b/app/serializers/effort_serializer.rb
@@ -1,6 +1,6 @@ class EffortSerializer < BaseSerializer
attributes :id, :event_id, :participant_id, :bib_number, :first_name, :last_name, :full_name, :gender,
- :birthdate, :age, :city, :state_code, :country_code
+ :birthdate, :age, :city, :state_code, :country_code, :phone, :email, :beacon_url, :photo_url, :report_url
link(:self) { api_v1_effort_path(object) }
has_many :split_times, if: :split_times_loaded?
|
Add phone, email, and url attributes to EffortSerializer.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.