diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/lib/wechatpay/service.rb b/lib/wechatpay/service.rb index abc1234..def5678 100644 --- a/lib/wechatpay/service.rb +++ b/lib/wechatpay/service.rb @@ -3,6 +3,9 @@ module Wechatpay module Service + + class InvalidResponseError < StandardError; end + class << self def unified_order(options) config = Wechatpay::Config @@ -21,7 +24,7 @@ if Wechatpay::Sign.valid?(result) result else - nil + raise InvalidResponseError.new(response.body.force_encoding('utf-8')) end end
Raise proper error when response is not expected
diff --git a/app/controllers/thredded/application_controller.rb b/app/controllers/thredded/application_controller.rb index abc1234..def5678 100644 --- a/app/controllers/thredded/application_controller.rb +++ b/app/controllers/thredded/application_controller.rb @@ -22,7 +22,7 @@ def messageboard if params.key? :messageboard_id - @messageboard ||= Messageboard.where(slug: params[:messageboard_id]).first + @messageboard ||= Messageboard.friendly.find(params[:messageboard_id]) end end
[JRO] Use friendly_id for finding messageboard obj
diff --git a/chef-repo/site-cookbooks/cbench-chef-server/attributes/default.rb b/chef-repo/site-cookbooks/cbench-chef-server/attributes/default.rb index abc1234..def5678 100644 --- a/chef-repo/site-cookbooks/cbench-chef-server/attributes/default.rb +++ b/chef-repo/site-cookbooks/cbench-chef-server/attributes/default.rb @@ -1,10 +1,6 @@-# default["chef-server"]["fqdn"] = # Not known à priori! => reprovision or dynamically set in recipe -# For cloud config see running instance and http://stackoverflow.com/questions/19586040/install-chef-server-11-on-ec2-instance - - - -# Override api_fqdn with public ipv4 if available -default["chef-server"]["api_fqdn"] = node["cloud_v2"]["public_ipv4"] || node["chef-server"]["api_fqdn"] +# Update api_fqdn with public_hostname from Ohai if available +# Cannot be an ip address (e.g. node["cloud_v2"]["public_ipv4"] causes api services such as the cookbook service bookshelf to fail) +default["chef-server"]["api_fqdn"] = node["cloud_v2"]["public_hostname"] || node["chef-server"]["api_fqdn"] # This will cause that two api_fqdn entries appear (it's a bug in https://github.com/opscode-cookbooks/chef-server/blob/v2.1.4/templates/default/chef-server.rb.erb) -# default["chef-server"]["configuration"]["api_fqdn"] = node["cloud_v2"]["public_ipv4"] || "localhost" +# default["chef-server"]["configuration"]["api_fqdn"] = node["cloud_v2"]["public_hostname"] || "localhost"
Fix chef api_fqdn config causing bookshelf reachability issues (ipv4 shortcut does not work)
diff --git a/definitions/disk-monitor.rb b/definitions/disk-monitor.rb index abc1234..def5678 100644 --- a/definitions/disk-monitor.rb +++ b/definitions/disk-monitor.rb @@ -11,6 +11,7 @@ a[:template] = params[:template] a[:cookbook] = params[:cookbook] || "disk-monitor" a[:check_frequency] = params[:check_frequency] || 15 + a[:cron_frequency] = a[:check_frequency] == 1 ? "*" : "*/#{a[:check_frequency]}" a[:bin_path] = params[:bin_path] a[:bin_file] = params[:bin_file] || "disk-alert-#{a[:alert_level]}" a[:bin] = "#{a[:bin_path]}/#{a[:bin_file]}" @@ -26,7 +27,7 @@ end cron "disk-alert-#{application[:alert_level]}" do - minute "*/#{application[:check_frequency]}" + minute a[:cron_frequency] user application[:user] command application[:bin] end
Allow check frequency to be every minute
diff --git a/omnibus_overrides.rb b/omnibus_overrides.rb index abc1234..def5678 100644 --- a/omnibus_overrides.rb +++ b/omnibus_overrides.rb @@ -10,7 +10,7 @@ # variable. override :bundler, version: "1.15.4" override :rubygems, version: "2.7.6" -override :ruby, version: "2.4.4" +override :ruby, version: "2.4.5" override "libxml2", version: "2.9.7" # Default in omnibus-software was too old. Feel free to move this ahead as necessary.
Update Ruby from 2.4.4 to 2.4.5 This resolves a CVE and fixes a few bugs Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
diff --git a/test/acceptance/version_test.rb b/test/acceptance/version_test.rb index abc1234..def5678 100644 --- a/test/acceptance/version_test.rb +++ b/test/acceptance/version_test.rb @@ -5,4 +5,14 @@ result = execute("vagrant", "version") assert_equal("Vagrant version #{config.vagrant_version}\n", result.stdout.read) end + + should "print the version with '-v'" do + result = execute("vagrant", "-v") + assert_equal("Vagrant version #{config.vagrant_version}\n", result.stdout.read) + end + + should "print the version with '--version'" do + result = execute("vagrant", "--version") + assert_equal("Vagrant version #{config.vagrant_version}\n", result.stdout.read) + end end
Add more acceptance tests for printing the Vagrant version
diff --git a/Banana.podspec b/Banana.podspec index abc1234..def5678 100644 --- a/Banana.podspec +++ b/Banana.podspec @@ -2,15 +2,6 @@ s.name = "Banana" s.version = "0.0.1" s.summary = "A customizable dropdown menu" - s.description = <<-DESC - A longer description of Banana in Markdown format. - - * Think: Why did you write this? What is the focus? What does it do? - * CocoaPods will be using this to generate tags, and improve search results. - * Try to keep it short, snappy and to the point. - * Finally, don't worry about the indent, CocoaPods strips it! - DESC - s.homepage = "https://github.com/Nonouf/Banana" # s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif" s.license = "MIT"
Remove description from pod spec
diff --git a/lib/generators/spree_shipping_matrix/install/install_generator.rb b/lib/generators/spree_shipping_matrix/install/install_generator.rb index abc1234..def5678 100644 --- a/lib/generators/spree_shipping_matrix/install/install_generator.rb +++ b/lib/generators/spree_shipping_matrix/install/install_generator.rb @@ -4,6 +4,7 @@ class_option :auto_run_migrations, :type => :boolean, :default => false def add_javascripts + append_file 'vendor/assets/javascripts/spree/backend/all.js', "//= require spree/backend/spree_shipping_matrix\n" end def add_stylesheets
Update generator to include backend JS
diff --git a/jquery-qtip2-rails.gemspec b/jquery-qtip2-rails.gemspec index abc1234..def5678 100644 --- a/jquery-qtip2-rails.gemspec +++ b/jquery-qtip2-rails.gemspec @@ -16,4 +16,6 @@ gem.version = Jquery::Qtip2::Rails::VERSION gem.add_dependency "railties", ">= 3.1.0" + + gem.add_development_dependency 'rails' end
Add rails as a development dependency due to the dummy app
diff --git a/test/lib/test_initialization.rb b/test/lib/test_initialization.rb index abc1234..def5678 100644 --- a/test/lib/test_initialization.rb +++ b/test/lib/test_initialization.rb @@ -11,13 +11,15 @@ assert_equal client.host, 'login.salesforce.com' assert_equal client.version, '23.0' + assert_equal client.debugging, false end test "should accept various options" do options = { :username => 'username', :password => 'password', - :token => 'token' + :token => 'token', + :debugging => true } client = SalesforceBulk::Client.new(options) @@ -25,6 +27,7 @@ assert_equal client.username, 'username' assert_equal client.password, 'password' assert_equal client.token, 'token' + assert_equal client.debugging, true end end
Update test to check debugging option default and override.
diff --git a/pgoapi.podspec b/pgoapi.podspec index abc1234..def5678 100644 --- a/pgoapi.podspec +++ b/pgoapi.podspec @@ -13,7 +13,7 @@ s.author = "Rayman Rosevear" - s.ios.deployment_target = '8.0' + s.ios.deployment_target = '9.0' s.osx.deployment_target = '10.10' s.source = { :git => "https://github.com/AgentFeeble/pgoapi.git", :tag => "#{s.version}" }
Update the minimum deployment target in the podspec
diff --git a/resources/port_options.rb b/resources/port_options.rb index abc1234..def5678 100644 --- a/resources/port_options.rb +++ b/resources/port_options.rb @@ -23,14 +23,8 @@ attribute :name, kind_of: String, name_attribute: true attribute :source, kind_of: String attribute :options, kind_of: Hash -attribute :dir_path, kind_of: String -attribute :full_path, kind_of: String +attribute :dir_path, kind_of: String, default: lazy { |r| '/var/db/ports/' + r.name } +attribute :full_path, kind_of: String, default: lazy { |r| r.dir_path + '/options' } attribute :default_options, kind_of: Hash, default: {} attribute :current_options, kind_of: Hash, default: {} attribute :file_writer, kind_of: String - -def initialize(*args) - super - @dir_path = '/var/db/ports/' + name - @full_path = @dir_path + '/options' -end
Use lazy for the default values instead of the initializer Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
diff --git a/sensu-plugins-kue.gemspec b/sensu-plugins-kue.gemspec index abc1234..def5678 100644 --- a/sensu-plugins-kue.gemspec +++ b/sensu-plugins-kue.gemspec @@ -14,9 +14,9 @@ spec.homepage = "https://github.com/xgin/sensu-plugins-kue" spec.license = "MIT" - spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } + spec.files = Dir.glob("lib/**/*") spec.bindir = "exe" - spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.executables = Dir.glob("bin/*").map{ |f| File.basename(f) } spec.require_paths = ["lib"] spec.add_runtime_dependency "sensu-plugin", "~> 1.2"
Switch from using 'git ls-files' to Ruby Dir globbing
diff --git a/lib/open_project/revisions/subversion/version.rb b/lib/open_project/revisions/subversion/version.rb index abc1234..def5678 100644 --- a/lib/open_project/revisions/subversion/version.rb +++ b/lib/open_project/revisions/subversion/version.rb @@ -1,3 +1,7 @@-module OpenProject::Revisions::Subversion - VERSION = "0.0.1" +module OpenProject + module Revisions + module Subversion + VERSION = "0.0.1" + end + end end
Fix NameError when installing plugin
diff --git a/main.rb b/main.rb index abc1234..def5678 100644 --- a/main.rb +++ b/main.rb @@ -15,7 +15,7 @@ else set :domain, "https://127.0.0.1:3000" end - set :secret_key, File.read('secret-key').strip + #set :secret_key, File.read('secret-key').strip end Dir["./app/models/*.rb"].each { |file| require file }
Remove secret key reference for prod
diff --git a/social_stream.gemspec b/social_stream.gemspec index abc1234..def5678 100644 --- a/social_stream.gemspec +++ b/social_stream.gemspec @@ -13,5 +13,5 @@ s.add_dependency('inherited_resources', '~> 1.1.2') s.add_dependency('stringex', '~> 1.2.0') s.add_dependency('paperclip', '~> 2.3.4') - s.add_dependency('jquery-rails', '~> 0.2.4') + s.add_dependency('jquery-rails', '~> 0.2.5') end
Fix github jquery-rails redirect issue
diff --git a/Library/Homebrew/requirements/glibc_requirement.rb b/Library/Homebrew/requirements/glibc_requirement.rb index abc1234..def5678 100644 --- a/Library/Homebrew/requirements/glibc_requirement.rb +++ b/Library/Homebrew/requirements/glibc_requirement.rb @@ -30,6 +30,6 @@ # Fix for brew tests, which uses NullLoader. true end - Version.new(system_version.to_s) >= Version.new(@version) + Version.new(self.class.system_version.to_s) >= Version.new(@version) } end
GlibcRequirement: Fix system_version for old Ruby
diff --git a/dartsduino-games-countup.gemspec b/dartsduino-games-countup.gemspec index abc1234..def5678 100644 --- a/dartsduino-games-countup.gemspec +++ b/dartsduino-games-countup.gemspec @@ -8,8 +8,8 @@ spec.version = Dartsduino::Games::Countup::VERSION spec.authors = ["Ikuo Terado"] spec.email = ["eqobar@gmail.com"] - spec.summary = %q{TODO: Write a short summary. Required.} - spec.description = %q{TODO: Write a longer description. Optional.} + spec.summary = %q{dartsduino games: Count up.} + spec.description = %q{dartsduino games: Count up.} spec.homepage = "" spec.license = "MIT"
Update gem's summary and description
diff --git a/db/migrate/20140927005000_add_dummy_for_missing_emails.rb b/db/migrate/20140927005000_add_dummy_for_missing_emails.rb index abc1234..def5678 100644 --- a/db/migrate/20140927005000_add_dummy_for_missing_emails.rb +++ b/db/migrate/20140927005000_add_dummy_for_missing_emails.rb @@ -1,7 +1,7 @@ class AddDummyForMissingEmails < ActiveRecord::Migration def up Enterprise.all.each do |enterprise| - enterprise.update_column({:email => "missing@example.com"}) if enterprise.read_attribute(:email).blank? + enterprise.update_column(:email, "missing@example.com") if enterprise.read_attribute(:email).blank? end end end
Correct syntax for update column
diff --git a/config/initializers/omniauth.rb b/config/initializers/omniauth.rb index abc1234..def5678 100644 --- a/config/initializers/omniauth.rb +++ b/config/initializers/omniauth.rb @@ -2,5 +2,5 @@ Rails.application.config.middleware.use OmniAuth::Builder do provider :trello, ENV['TRELLO_KEY'], ENV['TRELLO_SECRET'], - app_name: "Echo for Trello", scope: 'read,write', expiration: 'never' + app_name: "Echo for Trello", scope: 'read,write,account', expiration: 'never' end
Add account OAuth scope in order to get the user's email
diff --git a/spec/integration/admin_collections_controller_spec.rb b/spec/integration/admin_collections_controller_spec.rb index abc1234..def5678 100644 --- a/spec/integration/admin_collections_controller_spec.rb +++ b/spec/integration/admin_collections_controller_spec.rb @@ -0,0 +1,34 @@+# Copyright 2011-2019, The Trustees of Indiana University and Northwestern +# University. Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# --- END LICENSE_HEADER BLOCK --- + +require 'rails_helper.rb' + +describe 'Admin::CollectionsController' do + describe 'resize_uploaded_poster' do + let(:uploaded_file) { fixture_file_upload('/collection_poster.jpg', 'image/jpeg') } + let(:controller) { Admin::CollectionsController.new } + + it 'successfully runs mini_magick' do + expect(controller.send(:resize_uploaded_poster, uploaded_file.path)).not_to be_empty + end + + context 'when passed an invalid file' do + let(:uploaded_file) { fixture_file_upload('/captions.vtt', 'text/vtt') } + + it 'returns nil' do + expect(controller.send(:resize_uploaded_poster, uploaded_file.path)).to be_nil + end + end + end +end
Add integration test for mini_magick
diff --git a/cortex-field-types-core.rb b/cortex-field-types-core.rb index abc1234..def5678 100644 --- a/cortex-field-types-core.rb +++ b/cortex-field-types-core.rb @@ -1,10 +1,17 @@+require 'cortex/field_types/core/boolean/boolean_field_type' +require 'cortex/field_types/core/boolean/boolean_cell' -require 'cortex/field_types/core/*' +require 'cortex/field_types/core/date_time/date_time_field_type' +require 'cortex/field_types/core/date_time/date_time_cell' + +require 'cortex/field_types/core/tag/tag_field_type' +require 'cortex/field_types/core/tag/tag_cell' + require 'cortex/field_types/core/text/text_field_type' require 'cortex/field_types/core/text/text_cell' -require 'cortex/field_types/core/boolean/boolean_field_type' -require 'cortex/field_types/core/boolean/boolean_cell' - require 'cortex/field_types/core/tree/tree_field_type' require 'cortex/field_types/core/tree/tree_cell' + +require 'cortex/field_types/core/user/user_field_type' +require 'cortex/field_types/core/user/user_cell'
Remove Tree concern, explicitly require Core FieldTypes due to eager-loading issues
diff --git a/app/controllers/ruby_wedding/invitations_controller.rb b/app/controllers/ruby_wedding/invitations_controller.rb index abc1234..def5678 100644 --- a/app/controllers/ruby_wedding/invitations_controller.rb +++ b/app/controllers/ruby_wedding/invitations_controller.rb @@ -34,7 +34,7 @@ @menu = Menu.all.first @invitation.guests.each do |guest| @menu.courses.each do |course| - guest.menu_choices.build(course_id: course.id) unless guest.menu_choices.where(course_id: course.id) + guest.menu_choices.build(course_id: course.id) unless guest.menu_choices.where(course_id: course.id).present? end end end
Correct detection of whether a guest already has choices for this course.
diff --git a/kuromi.gemspec b/kuromi.gemspec index abc1234..def5678 100644 --- a/kuromi.gemspec +++ b/kuromi.gemspec @@ -10,7 +10,7 @@ spec.email = ["matt@eightbitraptor.com"] spec.description = %q{Kuromi is an application runner} spec.summary = %q{Kuromi provides a DSL for running command lines in Ruby} - spec.homepage = "" + spec.homepage = "http://github.com/onthebeach/kuromi" spec.license = "MIT" spec.files = `git ls-files`.split($/)
Add homepage to the gemspec
diff --git a/lancat.gemspec b/lancat.gemspec index abc1234..def5678 100644 --- a/lancat.gemspec +++ b/lancat.gemspec @@ -2,6 +2,12 @@ s.name = 'lancat' s.version = '0.0.1' s.summary = 'Zero-configuration LAN file transfer' + s.description = 'lancat is a program which allows files and other data to ' \ + 'be quickly transferred over the local network by piping ' \ + 'data into lancat in the shell at one end, and out of ' \ + 'lancat at the other end. It uses multicast so no ' \ + 'configuration (e.g. of IP addresses) needs to take place.' + s.license = 'ISC' s.author = 'Graham Edgecombe' s.email = 'graham@grahamedgecombe.com' s.homepage = 'http://grahamedgecombe.com/projects/lancat'
Add license and description to gemspec.
diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index abc1234..def5678 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -10,7 +10,12 @@ def api_release_notes; end - def servicedown; end + def servicedown + respond_to do |format| + format.html { render :servicedown, status: 503 } + format.json { render json: [{ error: 'Temporarily unavailable' }], status: 503 } + end + end def timed_retention; end end
Add ability for servicedown to respond to json API queries should also respond in kind and indicate that service is unavailable.
diff --git a/seed_migration.gemspec b/seed_migration.gemspec index abc1234..def5678 100644 --- a/seed_migration.gemspec +++ b/seed_migration.gemspec @@ -8,8 +8,8 @@ Gem::Specification.new do |s| s.name = "seed_migration" s.version = SeedMigration::VERSION - s.authors = ["Andy O'Neill", "Daniel Schwartz"] - s.email = ["aoneill@harrys.com", 'daniel@harrys.com'] + s.authors = ["Andy O'Neill", "Daniel Schwartz", "Ilya Rubnich", "Pierre Jambet"] + s.email = ["aoneill@harrys.com", 'daniel@harrys.com', 'ilya@harrys.com', 'pierre@harrys.com'] s.description = %q{Rails gem for Data Migrations} s.summary = %q{Rails Data Migration} s.homepage = "http://github.com/harrystech/seed_migration"
Add @irubnich and me as gem authors
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 @@ -33,7 +33,7 @@ protected def user_params - params.fetch(:user, {}).permit(:email, :password, :password_confirmation) + params.fetch(:user).permit(:email, :password, :password_confirmation) end end
Revert "add {} in user params.fetch" This reverts commit b5f12c39c4b962cb28787d45ffd08fb601c19c32.
diff --git a/ruby/utils.rb b/ruby/utils.rb index abc1234..def5678 100644 --- a/ruby/utils.rb +++ b/ruby/utils.rb @@ -1,19 +1,11 @@-def benchmark_once - start = Time.now - yield - stop = Time.now - stop - start -end +require 'benchmark' def benchmark(&b) runs = 100 - total = 0.0 - runs.times do |i| - result = benchmark_once(&b) - STDERR.puts "Run #{i}: #{result}" - total += result + + Benchmark.bmbm do |x| + x.report { runs.times { b.call } } end - total / runs end def with_utf8_file(filename)
Use 'benchmark' for benchmarking (duh).
diff --git a/activerecord-uuid.gemspec b/activerecord-uuid.gemspec index abc1234..def5678 100644 --- a/activerecord-uuid.gemspec +++ b/activerecord-uuid.gemspec @@ -18,7 +18,7 @@ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ["lib"] - s.add_runtime_dependency "activerecord", "~> 3.1" + s.add_runtime_dependency "activerecord", "3.2.8" s.add_runtime_dependency "railties", "~> 3.1" s.add_development_dependency "rake"
Change gemspec activerecord dependency to 3.2.8
diff --git a/app/jobs/sweep_subscriptions_job.rb b/app/jobs/sweep_subscriptions_job.rb index abc1234..def5678 100644 --- a/app/jobs/sweep_subscriptions_job.rb +++ b/app/jobs/sweep_subscriptions_job.rb @@ -6,7 +6,7 @@ def perform start_time = Time.current report = '' - report += "Started job at #{start_time}\n" + report += "Started job for #{ENV['HEROKU_APP_NAME']} at #{start_time}\n" problem_subs = [] obsolete_subs = Subscription.joins('join efforts on efforts.id = subscriptions.subscribable_id join events on events.id = efforts.event_id') @@ -16,7 +16,7 @@ if count == 0 report += "No obsolete subscriptions found\n" else - report += "Found #{count} obsolete subscriptions\n" + report += "Found #{count} obsolete subscription(s)\n" obsolete_subs.find_in_batches do |subs| subs.each do |sub| @@ -27,11 +27,11 @@ if problem_subs.present? report += "Could not destroy the following #{problem_subs.size} subscriptions: #{problem_subs.join(', ')}\n" else - report += "All #{count} obsolete subscriptions were destroyed\n" + report += "Destroyed all #{count} obsolete subscription(s)\n" end end - duration = Time.current - start_time + duration = (Time.current - start_time).round(1) report += "Finished job in #{duration} seconds at #{Time.current}\n" AdminMailer.job_report(self.class, report).deliver_now
Improve reporting for subscription sweeper
diff --git a/app/models/schedule_rehabilitation_update_event.rb b/app/models/schedule_rehabilitation_update_event.rb index abc1234..def5678 100644 --- a/app/models/schedule_rehabilitation_update_event.rb +++ b/app/models/schedule_rehabilitation_update_event.rb @@ -7,7 +7,7 @@ # Callbacks after_initialize :set_defaults - validates :rebuild_year, :numericality => {:only_integer => :true, :greater_than_or_equal_to => Date.today.year - 10}, :allow_nil => true + validates :rebuild_year, :numericality => {:only_integer => :true, :greater_than_or_equal_to => Date.today.year - 10} #------------------------------------------------------------------------------ # Scopes
Fix validation. rehab year must be entered
diff --git a/config/puma/development.rb b/config/puma/development.rb index abc1234..def5678 100644 --- a/config/puma/development.rb +++ b/config/puma/development.rb @@ -1,3 +1,7 @@-# config/puma.rb +# config/puma/development.rb +# Number of threads to start (min / max) threads 2,8 + +# Log files +stdout_redirect 'log/puma.out', 'log/puma.err', true
Add stdout/stderr redirection of puma in log/puma.out and log/puma.err
diff --git a/spec/higher_level_api/integration/connection_stop_spec.rb b/spec/higher_level_api/integration/connection_stop_spec.rb index abc1234..def5678 100644 --- a/spec/higher_level_api/integration/connection_stop_spec.rb +++ b/spec/higher_level_api/integration/connection_stop_spec.rb @@ -1,21 +1,13 @@ require "spec_helper" describe Bunny::Session do - n = if RUBY_ENGINE == "jruby" - 100 - else - 4000 - end + it "can be closed" do + c = Bunny.new(:automatically_recover => false) + c.start + ch = c.create_channel - n.times do |i| - it "can be closed (take #{i})" do - c = Bunny.new(:automatically_recover => false) - c.start - ch = c.create_channel - - c.should be_connected - c.stop - c.should be_closed - end + c.should be_connected + c.stop + c.should be_closed end end
Make this a "regular" functional test
diff --git a/lib/validated_fields/validators/numericality_validator.rb b/lib/validated_fields/validators/numericality_validator.rb index abc1234..def5678 100644 --- a/lib/validated_fields/validators/numericality_validator.rb +++ b/lib/validated_fields/validators/numericality_validator.rb @@ -12,6 +12,9 @@ options[:min] = voptions[:greater_than].to_i + 1 if voptions[:greater_than].present? options[:max] = voptions[:less_than].to_i - 1 if voptions[:less_than].present? + options[:min] = voptions[:greater_than_or_equal_to].to_i + 1 if voptions[:greater_than_or_equal_to].present? + options[:max] = voptions[:less_than_or_equal_to].to_i - 1 if voptions[:less_than_or_equal_to].present? + options['data-numericality-error-msg'] = voptions[:message] if voptions[:message].present? options end
Add greater_than_or_equal_to and greater_than_or_equal_to support to NumericalityValidator
diff --git a/app/view_models/effort_show_view.rb b/app/view_models/effort_show_view.rb index abc1234..def5678 100644 --- a/app/view_models/effort_show_view.rb +++ b/app/view_models/effort_show_view.rb @@ -22,7 +22,7 @@ splits.each do |split| split_row = SplitRow.new(split, related_split_times(split), prior_time) split_rows << split_row - prior_time = split_row.times_from_start.last if split_row.times_from_start.compact.present? + prior_time = split_row.times_from_start.compact.last if split_row.times_from_start.compact.present? end end
Fix minor bug that prevented certain segment times from displaying in effort show view.
diff --git a/lib/capistrano/twingly/tasks/servers_from_srv_record.rake b/lib/capistrano/twingly/tasks/servers_from_srv_record.rake index abc1234..def5678 100644 --- a/lib/capistrano/twingly/tasks/servers_from_srv_record.rake +++ b/lib/capistrano/twingly/tasks/servers_from_srv_record.rake @@ -1,7 +1,6 @@ require 'resolv' SRV_RECORDS = %w[ - _rubyapps._tcp.live.lkp.primelabs.se _rubyapps._tcp.sth.twingly.network ]
Remove SRV record for LKP datacenter
diff --git a/spec/support/vcr_setup.rb b/spec/support/vcr_setup.rb index abc1234..def5678 100644 --- a/spec/support/vcr_setup.rb +++ b/spec/support/vcr_setup.rb @@ -1,7 +1,9 @@ VCR.configure do |c| - c.cassette_library_dir = 'spec/fixtures/vcr_cassettes' + c.cassette_library_dir = "spec/fixtures/vcr_cassettes" c.hook_into :webmock # or :fakeweb c.ignore_localhost = true - c.debug_logger = File.open('vcr.log', 'w') + c.debug_logger = File.open("vcr.log", "w") c.allow_http_connections_when_no_cassette = true + c.filter_sensitive_data("<SLACK_TOKEN>") { ENV["SLACK_TOKEN"] } + c.filter_sensitive_data("<OUTGOING_TOKEN>") { ENV["OUTGOING_TOKEN"] } end
Configure VCR to filter sensitive data in it's cassettes Why: * Someone can see sensitive data in fixtures/cassettes/* This change addresses the need by: * Security
diff --git a/test/functional_test_case.rb b/test/functional_test_case.rb index abc1234..def5678 100644 --- a/test/functional_test_case.rb +++ b/test/functional_test_case.rb @@ -38,7 +38,6 @@ end def delete(*args, &block) - args = check_for_params(args) super(*args, &block) check_for_unsafe_html! end
Remove Rails 5.2 `delete` monkey-patch
diff --git a/domgen/domgen/iris_model_ext.rb b/domgen/domgen/iris_model_ext.rb index abc1234..def5678 100644 --- a/domgen/domgen/iris_model_ext.rb +++ b/domgen/domgen/iris_model_ext.rb @@ -11,9 +11,18 @@ class IrisAttribute < IrisElement attr_accessor :inverse_sorter + + attr_writer :traversable + + def traversable? + @traversable = false if @traversable.nil? + @traversable + end end class IrisClass < IrisElement + attr_accessor :metadata_that_can_change + attr_accessor :display_name end end
Update model extension to support some extra irisi specific cruft
diff --git a/application.rb b/application.rb index abc1234..def5678 100644 --- a/application.rb +++ b/application.rb @@ -1,4 +1,5 @@ require 'bundler' +ENV['RACK_ENV'] = 'development' unless ENV['RACK_ENV'] Bundler.require(:default, ENV['RACK_ENV']) class App < Sinatra::Base
Set RACK_ENV if not set so a Rakefile can pick up the environment.
diff --git a/lib/inherited_attribute.rb b/lib/inherited_attribute.rb index abc1234..def5678 100644 --- a/lib/inherited_attribute.rb +++ b/lib/inherited_attribute.rb @@ -19,7 +19,8 @@ class_eval \ " def share_#{attribute}_with(person) - visible? and ( + read_attribute(:visible) and + family and family.visible? and ( share_#{attribute}? or self == person or (self.respond_to?(:family_id) and self.family_id == person.family_id) or
Fix bug that hides attributes for hidden people (even when viewer can see the person).
diff --git a/spec/dummy/db/seeds.rb b/spec/dummy/db/seeds.rb index abc1234..def5678 100644 --- a/spec/dummy/db/seeds.rb +++ b/spec/dummy/db/seeds.rb @@ -0,0 +1,20 @@+# create users +User.create(email: 'partner@example.com') +partner = User.first +4.times do |n| + User.create(email: "m#{n}@example.com") + User.last.tap do |u| + partner.reload.partnership.referrals << u + Referrals::IncomeHistory.create( + referral: u, + partner: partner.partnership, + info: 'Payment for subscription', + amount: 2077, + share: partner.partnership.share, + share_amount: partner.partnership.share * 2077 + ) + end +end + + +
Add seed for dummy app
diff --git a/lib/my_mongoid/document.rb b/lib/my_mongoid/document.rb index abc1234..def5678 100644 --- a/lib/my_mongoid/document.rb +++ b/lib/my_mongoid/document.rb @@ -4,7 +4,7 @@ end module Document - + attr_reader :attributes module ClassMethods def is_mongoid_model? true @@ -16,5 +16,22 @@ klass.extend ClassMethods end + def initialize(attrs = nil) + raise ArgumentError unless attrs.is_a?(Hash) + @attributes = attrs + end + + def read_attribute(key) + @attributes[key] + end + + def write_attribute(key, value) + @attributes[key] = valus + end + + def new_record? + true + end + end end
Implement attributes for a model
diff --git a/lib/resync/client/resync_extensions.rb b/lib/resync/client/resync_extensions.rb index abc1234..def5678 100644 --- a/lib/resync/client/resync_extensions.rb +++ b/lib/resync/client/resync_extensions.rb @@ -12,10 +12,11 @@ alias_method :base_links=, :links= def links=(value) self.base_links = value + self.base_links = value + parent = self links.each do |l| - l.instance_variable_set('@container', self) - def l.client - @container.client + l.define_singleton_method(:client) do + parent.client end end end @@ -25,10 +26,10 @@ alias_method :base_resources=, :resources= def resources=(value) self.base_resources = value + parent = self resources.each do |r| - r.instance_variable_set('@container', self) - def r.client - @container.client + r.define_singleton_method(:client) do + parent.client end end end
Use closures & define_singleton_method to avoid creating extra instance variables
diff --git a/lib/rubocop/cop/rspec/scattered_let.rb b/lib/rubocop/cop/rspec/scattered_let.rb index abc1234..def5678 100644 --- a/lib/rubocop/cop/rspec/scattered_let.rb +++ b/lib/rubocop/cop/rspec/scattered_let.rb @@ -34,22 +34,18 @@ def on_block(node) return unless example_group_with_body?(node) - _describe, _args, body = *node - - check_let_declarations(body) + check_let_declarations(node.body) end - def check_let_declarations(node) - let_found = false - mix_found = false + private - node.each_child_node do |child| - if let?(child) - add_offense(child, location: :expression) if mix_found - let_found = true - elsif let_found - mix_found = true - end + def check_let_declarations(body) + lets = body.each_child_node.select { |node| let?(node) } + + first_let = lets.first + lets.each_with_index do |node, idx| + next if node.sibling_index == first_let.sibling_index + idx + add_offense(node, location: :expression) end end end
Simplify code and make helper methods private
diff --git a/lib/riddle/query/insert.rb b/lib/riddle/query/insert.rb index abc1234..def5678 100644 --- a/lib/riddle/query/insert.rb +++ b/lib/riddle/query/insert.rb @@ -50,6 +50,8 @@ value.to_time.to_i when Array "(#{value.join(',')})" + when Hash + "'#{value.to_json.gsub("'", "\\\\'").gsub('\u0026', '&')}'" # HACK: sphinx stores \u0026 as the string u0026 else value end
Fix for json attributes in sphinx
diff --git a/lib/zombie_scout/method_call_finder.rb b/lib/zombie_scout/method_call_finder.rb index abc1234..def5678 100644 --- a/lib/zombie_scout/method_call_finder.rb +++ b/lib/zombie_scout/method_call_finder.rb @@ -23,7 +23,7 @@ end def files_to_search - glob = @ruby_project.folders.join(' ') + @ruby_project.folders.join(' ') end end end
Kill unneeded assignment to local var
diff --git a/lib/gir_ffi.rb b/lib/gir_ffi.rb index abc1234..def5678 100644 --- a/lib/gir_ffi.rb +++ b/lib/gir_ffi.rb @@ -13,6 +13,7 @@ require 'gir_ffi/sized_array' require 'gir_ffi/zero_terminated' require 'gir_ffi/arg_helper' +require 'gir_ffi/user_defined_type_info' require 'gir_ffi/builder' module GirFFI
Make sure UserDefinedTypeInfo is available
diff --git a/github-auth.gemspec b/github-auth.gemspec index abc1234..def5678 100644 --- a/github-auth.gemspec +++ b/github-auth.gemspec @@ -21,6 +21,7 @@ spec.add_development_dependency 'bundler', '~> 1.3' spec.add_development_dependency 'rake' spec.add_development_dependency 'rspec' + spec.add_development_dependency 'cane' spec.add_development_dependency 'coveralls' spec.add_development_dependency 'sinatra' spec.add_development_dependency 'thin'
Add cane as development dependency
diff --git a/lib/csv2api.rb b/lib/csv2api.rb index abc1234..def5678 100644 --- a/lib/csv2api.rb +++ b/lib/csv2api.rb @@ -1,6 +1,7 @@ require 'csv2api/version' require 'csv2api/utils' require 'csv2api/parser' +require 'active_support' require 'active_support/core_ext' # @author Jonah Ruiz <jonah@pixelhipsters.com>
Add active_support before using core_ext to prevent weird travis err
diff --git a/lib/sisimai.rb b/lib/sisimai.rb index abc1234..def5678 100644 --- a/lib/sisimai.rb +++ b/lib/sisimai.rb @@ -6,6 +6,19 @@ def version(); return Sisimai::VERSION; end def sysname(); return 'bouncehammer'; end def libname(); return 'Sisimai'; end + + # Wrapper method for parsing mailbox/maidir + # @param [String] mbox Path to mbox or Maildir/ + # @return [Array] Parsed objects + # @return [nil] nil if the argument was wrong or an empty array + def make(path) + end + + # Wrapper method to parse mailbox/Maildir and dump as JSON + # @param [String] mbox Path to mbox or Maildir/ + # @return [String] Parsed data as JSON text + def dump(path) + end end end
Implement make() and dump() methods as a skelton
diff --git a/lib/sublime_video_layout.rb b/lib/sublime_video_layout.rb index abc1234..def5678 100644 --- a/lib/sublime_video_layout.rb +++ b/lib/sublime_video_layout.rb @@ -5,6 +5,7 @@ module SublimeVideoLayout class Engine < ::Rails::Engine initializer 'assets' do |app| + # Should be duplicated to application when initialize_on_precompile is false app.config.assets.precompile += %w[errors.css ie.css] end initializer 'static assets' do |app|
Add not about assets.precompile & initialize_on_precompile
diff --git a/lib/tasks/team_members.rake b/lib/tasks/team_members.rake index abc1234..def5678 100644 --- a/lib/tasks/team_members.rake +++ b/lib/tasks/team_members.rake @@ -0,0 +1,10 @@+namespace :migrate do + desc "Make all current team members confirmed" + task :team_members do + require 'bundler' + Bundler.require + require 'exercism' + + TeamMembership.update_all(confirmed: true) + end +end
Add data migration for team memberships
diff --git a/lib/travis/config/heroku.rb b/lib/travis/config/heroku.rb index abc1234..def5678 100644 --- a/lib/travis/config/heroku.rb +++ b/lib/travis/config/heroku.rb @@ -11,6 +11,7 @@ compact( database: database, logs_database: logs_database, + logs_readonly_database: logs_readonly_database, amqp: amqp, redis: redis, memcached: memcached, @@ -26,6 +27,10 @@ def logs_database Database.new(prefix: 'logs').config + end + + def logs_readonly_database + Database.new(prefix: 'logs_readonly').config end def amqp
Add support for parsing LOGS_READONLY_DATABASE_URL
diff --git a/lib/winnow/fingerprinter.rb b/lib/winnow/fingerprinter.rb index abc1234..def5678 100644 --- a/lib/winnow/fingerprinter.rb +++ b/lib/winnow/fingerprinter.rb @@ -29,10 +29,12 @@ def k_grams(str) current_line = 0 - # this starts at -1 to make the #map logic simpler - current_col = -1 + current_col = 0 str.chars.each_cons(noise).map do |k_gram| + fingerprint = Fingerprint.new(k_gram.join.hash, + Location.new(current_line, current_col)) + if k_gram.first == "\n" current_line += 1 current_col = 0 @@ -40,8 +42,7 @@ current_col += 1 end - Fingerprint.new(k_gram.join.hash, - Location.new(current_line, current_col)) + fingerprint end end end
Refactor / fix window positioning logic. This implementation works with newlines properly.
diff --git a/.delivery/build_cookbook/recipes/smoke.rb b/.delivery/build_cookbook/recipes/smoke.rb index abc1234..def5678 100644 --- a/.delivery/build_cookbook/recipes/smoke.rb +++ b/.delivery/build_cookbook/recipes/smoke.rb @@ -3,22 +3,41 @@ # Recipe:: smoke # # Copyright:: 2017, Jp Robinson, All Rights Reserved. +with_server_config do + # retrieve what we set in provision + env_name = if node['delivery']['change']['stage'] == 'acceptance' + get_acceptance_environment + else + node['delivery']['change']['stage'] + end -build_root = "#{workflow_workspace_repo}/build" + cur_env = ::DeliveryTruck::Helpers::Provision.fetch_or_create_environment(env_name) # Helper method from delivery-truck's provision stage + + build_root = "#{workflow_workspace_repo}/smoke_test" -template '#{workflow_workspace_repo}/min_httpd_conf.conf' do - source 'min_httpd_conf.erb' - variables(server_root: build_root) -end + directory build_root do + action :create + end -execute 'Start apache locally' do - command "#{build_root}/bin/httpd -k start -f #{workflow_workspace_repo}/min_httpd_conf.conf" -end + tar_extract cur_env.default_attributes['custom-apache']['url'] do + target_dir build_root + compress_char 'z' + end -http_request 'test_request' do - url 'http://localhost:12345/' -end + template '#{workflow_workspace_repo}/min_httpd_conf.conf' do + source 'min_httpd_conf.erb' + variables(server_root: "#{build_root}/opt/apache") + end -execute 'Stop apache locally' do - command "#{build_root}/bin/httpd -k stop -f #{workflow_workspace_repo}/min_httpd_conf.conf" -end + execute 'Start apache locally' do + command "#{build_root}/opt/apache/bin/httpd -k start -f #{workflow_workspace_repo}/min_httpd_conf.conf" + end + + http_request 'test_request' do + url 'http://localhost:12345/' + end + + execute 'Stop apache locally' do + command "#{build_root}/opt/apache/bin/httpd -k stop -f #{workflow_workspace_repo}/min_httpd_conf.conf" + end +end # with_server_config
Test fetching the published package and starting it
diff --git a/spec/github_pulls_spec.rb b/spec/github_pulls_spec.rb index abc1234..def5678 100644 --- a/spec/github_pulls_spec.rb +++ b/spec/github_pulls_spec.rb @@ -1,4 +1,6 @@ require 'spec_helper' + +# TODO: using webmock? describe GithubPulls::API do let(:api) { GithubPulls::API.new('holysugar/github_pulls') } @@ -17,7 +19,9 @@ let(:pull) { api.pulls.last } describe "#branch" do - it "is branch name of head pull requested" + it "is branch name of head pull requested" do + pull.branch.should == "pull-sample" + end end end
Add a spec using pull request data
diff --git a/spec/lib/basecamp_spec.rb b/spec/lib/basecamp_spec.rb index abc1234..def5678 100644 --- a/spec/lib/basecamp_spec.rb +++ b/spec/lib/basecamp_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe TaskMapper::Basecamp do +describe TaskMapper::Provider::Basecamp do let(:tm) { create_instance } describe "#new" do
Remove ref to top-level constant
diff --git a/spec/models/phone_spec.rb b/spec/models/phone_spec.rb index abc1234..def5678 100644 --- a/spec/models/phone_spec.rb +++ b/spec/models/phone_spec.rb @@ -0,0 +1,38 @@+require "spec_helper" + +describe Phone do + it "does not allow duplicate phone numbers per contact" do + contact = Contact.create( + firstname: "Joe", + lastname: "Tester", + email: "joetester@example.com" + ) + contact.phones.create( + phone_type: "home", + phone: "123-456-789" + ) + mobile_phone = contact.phones.build( + phone_type: "mobile", + phone: "123-456-789" + ) + expect(mobile_phone).to have(1).errors_on(:phone) + end + + it "allows two contacts to share a phone number" do + contact = Contact.create( + firstname: "Joe", + lastname: "Tester", + email: "joetester@example.com" + ) + contact.phones.create( + phone_type: "home", + phone: "123-456-789" + ) + other_contact = Contact.new + other_phone = other_contact.phones.build( + phone_type: "home", + phone: "123-456-789" + ) + expect(other_phone).to be_valid + end +end
Write specs of Phone model
diff --git a/rack-pretty_json.gemspec b/rack-pretty_json.gemspec index abc1234..def5678 100644 --- a/rack-pretty_json.gemspec +++ b/rack-pretty_json.gemspec @@ -6,7 +6,7 @@ gem.email = ["damien@mindglob.com"] gem.description = %q{Pretty JSON for pretty people} gem.summary = %q{Rack::PrettyJSON reformats JSON responses for easier readability.} - gem.homepage = "htts://www.github.com/damien/rack-pretty_json/" + gem.homepage = "https://www.github.com/damien/rack-pretty_json/" gem.files = `git ls-files`.split($\) gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
Fix a type in the gem home URL.
diff --git a/react-native-pdf.podspec b/react-native-pdf.podspec index abc1234..def5678 100644 --- a/react-native-pdf.podspec +++ b/react-native-pdf.podspec @@ -12,4 +12,5 @@ s.source = { :git => 'https://github.com/wonday/react-native-pdf.git' } s.platform = :ios, '8.0' s.source_files = "ios/**/*.{h,m}" + s.dependency "React" end
Fix compile issues with cocoapods 1.5+ Add React as explicit dependency
diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index abc1234..def5678 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -2,7 +2,7 @@ def new @trail = Trail.find(params[:trail_id]) - @comments = @trail.comments + @comment = Comment.new render :new end
Create new comment to avoid nil form object
diff --git a/app/controllers/products_controller.rb b/app/controllers/products_controller.rb index abc1234..def5678 100644 --- a/app/controllers/products_controller.rb +++ b/app/controllers/products_controller.rb @@ -1,6 +1,6 @@ class ProductsController < ApplicationController def index - @productsbytitle = Product.order(title: :asc) + @productsbytitle = Product.order(product_order_params) @statuscounts = Product.group(:status).count end @@ -26,4 +26,18 @@ def product_params params.require(:product).permit(:title, :status, :supportedFeatures) end + + def product_order_params + sort_column + " " + sort_direction + end + + def sort_column + #Default to sorting by title + Product.column_names.include?(params[:sort]) ? params[:sort] : "title" + end + + def sort_direction + #Default to ascending order + %w[asc desc].include?(params[:direction]) ? params[:direction] : "asc" + end end
Allow sort queries on All Products page
diff --git a/mellon.gemspec b/mellon.gemspec index abc1234..def5678 100644 --- a/mellon.gemspec +++ b/mellon.gemspec @@ -17,6 +17,8 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] + spec.add_dependency "plist" + spec.add_development_dependency "bundler", "~> 1.6" spec.add_development_dependency "rake" spec.add_development_dependency "pry"
Add plist for parsing secure notes from keychain
diff --git a/lib/rfm.rb b/lib/rfm.rb index abc1234..def5678 100644 --- a/lib/rfm.rb +++ b/lib/rfm.rb @@ -1,8 +1,11 @@-path = File.expand_path(File.dirname(__FILE__)) -$:.unshift(path) unless $:.include?(path) - -require path + '/rfm/utilities/case_insensitive_hash' -require path + '/rfm/utilities/factory' +# encoding: utf-8 +require 'rfm/utilities/case_insensitive_hash' +require 'rfm/utilities/factory' +require 'rfm/error' +require 'rfm/server' +require 'rfm/database' +require 'rfm/layout' +require 'rfm/resultset' module Rfm @@ -10,10 +13,4 @@ class ParameterError < StandardError; end class AuthenticationError < StandardError; end - autoload :Error, 'rfm/error' - autoload :Server, 'rfm/server' - autoload :Database, 'rfm/database' - autoload :Layout, 'rfm/layout' - autoload :Resultset, 'rfm/resultset' - -end+end
Remove autoload in favor of require
diff --git a/app/models/manageiq/providers/amazon/network_manager/refresher.rb b/app/models/manageiq/providers/amazon/network_manager/refresher.rb index abc1234..def5678 100644 --- a/app/models/manageiq/providers/amazon/network_manager/refresher.rb +++ b/app/models/manageiq/providers/amazon/network_manager/refresher.rb @@ -2,12 +2,38 @@ class Amazon::NetworkManager::Refresher < ManageIQ::Providers::BaseManager::Refresher include ::EmsRefresh::Refreshers::EmsRefresherMixin - def parse_legacy_inventory(ems) - if refresher_options.try(:[], :inventory_object_refresh) - ManageIQ::Providers::Amazon::NetworkManager::RefreshParserInventoryObject.ems_inv_to_hashes(ems, refresher_options) - else - ManageIQ::Providers::Amazon::NetworkManager::RefreshParser.ems_inv_to_hashes(ems, refresher_options) + def collect_inventory_for_targets(ems, targets) + targets_with_data = targets.collect do |target| + target_name = target.try(:name) || target.try(:event_type) + + _log.info "Filtering inventory for #{target.class} [#{target_name}] id: [#{target.id}]..." + + inventory = if refresher_options.try(:[], :inventory_object_refresh) + ManageIQ::Providers::Amazon::Inventory::Factory.inventory(ems, target) + else + nil + end + + _log.info "Filtering inventory...Complete" + [target, inventory] end + + targets_with_data + end + + def parse_targeted_inventory(ems, _target, inventory) + log_header = format_ems_for_logging(ems) + _log.debug "#{log_header} Parsing inventory..." + hashes, = Benchmark.realtime_block(:parse_inventory) do + if refresher_options.try(:[], :inventory_object_refresh) + ManageIQ::Providers::Amazon::NetworkManager::RefreshParserInventoryObject.new(inventory).populate_inventory_collections + else + ManageIQ::Providers::Amazon::NetworkManager::RefreshParser.ems_inv_to_hashes(ems, refresher_options) + end + end + _log.debug "#{log_header} Parsing inventory...Complete" + + hashes end def post_process_refresh_classes
Change AWS Network Refresher to the new format Change AWS Network Refresher to the new format separating collection from parsing. We use Inventory abstraction for the inventory collection and parsing.
diff --git a/spec/exporter/test_dot.rb b/spec/exporter/test_dot.rb index abc1234..def5678 100644 --- a/spec/exporter/test_dot.rb +++ b/spec/exporter/test_dot.rb @@ -2,10 +2,26 @@ module Agora describe "Graphviz dot export" do + subject{ model.to_dot } + context 'on the minepump' do let(:model){ minepump_model } - subject{ model.to_dot } + it{ should be_a(String) } + end + + context 'on a single goal' do + MODEL = <<-EOF + declare goal + id switch_pump_on + name "Maintain [Pump Switch On If High Water Detected]" + definition "When the high water level is detected, the pump switch is on" + assignedto controller + end + EOF + + let(:path){ Path.tmpfile.tap{|f| f.write(MODEL) } } + let(:model){ Model.load(path, :kaos) } it{ should be_a(String) } end
Add a dot test on a single goal.
diff --git a/spec/lib/hubstats_spec.rb b/spec/lib/hubstats_spec.rb index abc1234..def5678 100644 --- a/spec/lib/hubstats_spec.rb +++ b/spec/lib/hubstats_spec.rb @@ -2,15 +2,19 @@ describe Hubstats context ".config" do + subject { Hubstats } + after do + Hubstats.class_variable_set(:@@config, nil) + end it "creates a new config object" do - expect(Hubstats::Config).to receive(:parse).once - Hubstats.config + expect(Hubstats::Config).to receive(:parse).once { double(:config) } + subject.config end it "memoizes the config object" do expect(Hubstats::Config).to receive(:parse).once { double(:config) } - Hubstats.config - Hubstats.config + subject.config + subject.config end end
Fix race condition in the config test
diff --git a/db/migrate/20131123172825_create_asset_attachments.rb b/db/migrate/20131123172825_create_asset_attachments.rb index abc1234..def5678 100644 --- a/db/migrate/20131123172825_create_asset_attachments.rb +++ b/db/migrate/20131123172825_create_asset_attachments.rb @@ -1,8 +1,8 @@ class CreateAssetAttachments < ActiveRecord::Migration[5.1] def change create_table :assetable_asset_attachments do |t| - t.references :asset - t.references :assetable, :polymorphic => true + t.references :asset, index: false + t.references :assetable, :polymorphic => true, index: false t.string :name t.timestamps end @@ -12,4 +12,4 @@ add_index(:assetable_asset_attachments, [:assetable_type, :assetable_id, :name], unique: true, name: "assetable_asset_attachments_poly_named_asset") add_index(:assetable_asset_attachments, :assetable_id, name: "assetable_asset_attachments_assetable_id") end -end +end
Fix migration for rails 5
diff --git a/test/daimon_skycrawlers/commands/enqueue_test.rb b/test/daimon_skycrawlers/commands/enqueue_test.rb index abc1234..def5678 100644 --- a/test/daimon_skycrawlers/commands/enqueue_test.rb +++ b/test/daimon_skycrawlers/commands/enqueue_test.rb @@ -0,0 +1,77 @@+require "test_helper" +require "daimon_skycrawlers/commands/enqueue" + +class EnqueueCommandTest < Test::Unit::TestCase + setup do + @command = DaimonSkycrawlers::Commands::Enqueue.new + end + + sub_test_case "url" do + test "simple" do + url = "http://example.com/" + mock(DaimonSkycrawlers::Crawler).enqueue_url(url, {}) + @command.invoke("url", [url]) + end + + test "with message" do + url = "http://example.com/" + mock(DaimonSkycrawlers::Crawler).enqueue_url(url, "key" => "value") + @command.invoke("url", [url, "key:value"]) + end + end + + sub_test_case "response" do + test "simple" do + url = "http://example.com/" + mock(DaimonSkycrawlers::Processor).enqueue_http_response(url, {}) + @command.invoke("response", [url]) + end + + test "with message" do + url = "http://example.com/" + mock(DaimonSkycrawlers::Processor).enqueue_http_response(url, "key" => "value") + @command.invoke("response", [url, "key:value"]) + end + end + + sub_test_case "sitemap" do + test "sitemap.xml" do + sitemap = "http://example.com/sitemap.xml" + urls = [ + "http://example.com/1", + "http://example.com/2", + "http://example.com/3", + ] + sitemap_parser = mock(DaimonSkycrawlers::SitemapParser.new([sitemap])) + sitemap_parser.parse { urls } + mock(DaimonSkycrawlers::SitemapParser).new([sitemap]) { sitemap_parser } + urls.each do |url| + mock(DaimonSkycrawlers::Crawler).enqueue_url(url) + end + @command.invoke("sitemap", [sitemap]) + end + + test "robots.txt" do + robots_txt = "http://example.com/robots.txt" + sitemaps = [ + "http://example.com/sitemap1.xml", + "http://example.com/sitemap2.xml" + ] + urls = [ + "http://example.com/1", + "http://example.com/2", + "http://example.com/3", + ] + webrobots = mock(WebRobots.new("test")) + webrobots.sitemaps(robots_txt) { sitemaps } + mock(WebRobots).new(anything) { webrobots } + sitemap_parser = mock(DaimonSkycrawlers::SitemapParser.new(sitemaps)) + sitemap_parser.parse { urls } + mock(DaimonSkycrawlers::SitemapParser).new(sitemaps) { sitemap_parser } + urls.each do |url| + mock(DaimonSkycrawlers::Crawler).enqueue_url(url) + end + @command.invoke("sitemap", [robots_txt], "robots-txt" => true) + end + end +end
Add test for daimon_skycrawlers enqueue sub command
diff --git a/lib/domgen.rb b/lib/domgen.rb index abc1234..def5678 100644 --- a/lib/domgen.rb +++ b/lib/domgen.rb @@ -16,6 +16,7 @@ # Ruby require 'domgen/ruby/model' +require 'domgen/ruby/helper' # SQL require 'domgen/sql/model'
Make sure the ruby helper is required
diff --git a/test/integration/default/serverspec/ruby_spec.rb b/test/integration/default/serverspec/ruby_spec.rb index abc1234..def5678 100644 --- a/test/integration/default/serverspec/ruby_spec.rb +++ b/test/integration/default/serverspec/ruby_spec.rb @@ -0,0 +1,22 @@+require "spec_helper" + +describe "practicingruby::_ruby" do + let(:prefix_path) { "/usr/local" } + + it "installs ruby-build" do + expect(command "#{prefix_path}/bin/ruby-build --version").to return_exit_status 0 + end + + it "installs correct version of Ruby" do + ruby_version = "2.0.0p353" + expect(command "#{prefix_path}/bin/ruby --version").to return_stdout /^ruby #{ruby_version}/ + end + + it "updates rubygems" do + expect(package "rubygems-update").to be_installed.by "gem" + end + + it "installs bundler gem" do + expect(package "bundler").to be_installed.by "gem" + end +end
Add integration test for Ruby
diff --git a/contrib/ruby_event_store-protobuf/lib/ruby_event_store/protobuf.rb b/contrib/ruby_event_store-protobuf/lib/ruby_event_store/protobuf.rb index abc1234..def5678 100644 --- a/contrib/ruby_event_store-protobuf/lib/ruby_event_store/protobuf.rb +++ b/contrib/ruby_event_store-protobuf/lib/ruby_event_store/protobuf.rb @@ -14,3 +14,17 @@ require 'ruby_event_store/protobuf/mappers/transformation/protobuf_nested_struct_metadata' require 'ruby_event_store/protobuf/mappers/protobuf' require 'ruby_event_store/protobuf/version' + +module RubyEventStore + Proto = Protobuf::Proto + + module Mappers + Protobuf = RubyEventStore::Protobuf::Mappers::Protobuf + + module Transformation + ProtoEvent = RubyEventStore::Protobuf::Mappers::Transformation::ProtoEvent + ProtobufEncoder = RubyEventStore::Protobuf::Mappers::Transformation::ProtobufEncoder + ProtobufNestedStructMetadata = RubyEventStore::Protobuf::Mappers::Transformation::ProtobufNestedStructMetadata + end + end +end
Define aliases for backward compatibility
diff --git a/lib/swftly.rb b/lib/swftly.rb index abc1234..def5678 100644 --- a/lib/swftly.rb +++ b/lib/swftly.rb @@ -1,37 +1,49 @@ class Swftly - attr_reader :swf - - #init w/ a swf - def initialize( swf, options = {} ) + require 'curb' + attr_reader :auto_process, :swf, :runtime, :markup, :raw, + :converter_response_code, :fetcher_response_code + + #init w/ a swf, through false for the second param if you don't wanna + #immediately trigger post-conversion processing + def initialize( swf, auto_process = true ) @swf = swf - @options = { - form: { - upload_field_name: 'swfFile', - tos_field_name: 'gwt-uid-13', - post_path: 'https://www.google.com/doubleclick/studio/swiffy/upload' - } - }.merge options + @auto_process = auto_process end # post the swf to swiffy and parse/process the results def swiff + file = Curl::PostField.file 'swfFile', @swf + converter = Curl::Easy.http_post("https://www.google.com/doubleclick/studio/swiffy/upload", file) do |curl| + curl.multipart_form_post = true + curl.headers["User-Agent"] = "Curl/Ruby" + curl.follow_location = true + curl.enable_cookies = true + end + @converter_response_code = converter.response_code + @raw = converter.body_str + + process if @auto_process + end + + # perform and process the second fetching + def process + return failed unless @converter_response_code == 200 + cooked = @raw.split '","' + path = (cooked[3] + cooked[5]).gsub(/\/i\//,'/o/') + + fetcher = Curl.get(path) + + @fetcher_response_code = fetcher.response_code + @markup = fetcher.body_str + @runtime = Runtime.new(@markup) end protected - # use curb to send the swf to swiffy's web service. - def post + def failed + raise "File conversion failed with response code #{response_code}." + end +end - end - - # we should prolly make sure we've got workable results. - def verify - - end - - # do whatevs we need to do to persist the verified results - def process - - end -end+require 'swftly/runtime'
Add some basic functionality, plus the tie-in to the Runtime class.
diff --git a/roadie.gemspec b/roadie.gemspec index abc1234..def5678 100644 --- a/roadie.gemspec +++ b/roadie.gemspec @@ -21,13 +21,6 @@ s.add_development_dependency 'rspec' - # TODO: Remove these dependencies - s.add_dependency 'actionmailer', '> 3.0.0', '< 5.0.0' - s.add_dependency 'sprockets' - s.add_development_dependency 'rake' - s.add_development_dependency 'rails' - s.add_development_dependency 'rspec-rails' - s.extra_rdoc_files = %w[README.md Changelog.md] s.require_paths = %w[lib]
Remove Rails, Sprockets and ActionMailer dependencies
diff --git a/app/services/generate_envelope_dump.rb b/app/services/generate_envelope_dump.rb index abc1234..def5678 100644 --- a/app/services/generate_envelope_dump.rb +++ b/app/services/generate_envelope_dump.rb @@ -33,15 +33,9 @@ end def write_dump_to_file - File.write(dump_file, dump_contents) - end - - def dump_contents - dump_contents = '' - transactions.each do |transaction| - dump_contents += "#{transaction.dump}\n" + File.open(dump_file, 'w') do |file| + transactions.each { |transaction| file.puts(transaction.dump) } end - dump_contents end def transactions
Optimize dump file generation code An intermediary string that contained all the dumped envelopes is discarded in favor of writing directly to the final file on disk.
diff --git a/wordpress_deploy.gemspec b/wordpress_deploy.gemspec index abc1234..def5678 100644 --- a/wordpress_deploy.gemspec +++ b/wordpress_deploy.gemspec @@ -5,8 +5,8 @@ gem.authors = ["Ryan Lovelett"] gem.email = ["ryan@lovelett.me"] gem.description = %q{Used to deploy a Wordpress site.} - gem.summary = %q{} - gem.homepage = %q{https://github.com/RLovelett/jsb3} + gem.summary = %q{Wordpress Deploy is a RubyGem, written for Linux and Mac OSX, that allows you to easily perform Wordpress deployment operations. It provides you with an elegant DSL in Ruby for modeling your deployments.} + gem.homepage = %q{https://github.com/RLovelett/wordpress-deploy} gem.files = `git ls-files`.split($\) gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
Update Gemspec summary and homepage.
diff --git a/features/step_definitions/moderate_proposed_organisation_steps.rb b/features/step_definitions/moderate_proposed_organisation_steps.rb index abc1234..def5678 100644 --- a/features/step_definitions/moderate_proposed_organisation_steps.rb +++ b/features/step_definitions/moderate_proposed_organisation_steps.rb @@ -1,12 +1,12 @@ Then (/^I should( not)? see an "Accept Proposed Organisation" button$/) do |negation| - unless negation - expect(page).to have_link "Accept" + if negation + expect(page).not_to have_link "Accept" end - expect(page).not_to have_link "Accept" + expect(page).to have_link "Accept" end Then (/^I should( not)? see a "Reject Proposed Organisation" button$/) do |negation| - unless negation - expect(page).to have_link "Reject" + if negation + expect(page).not_to have_link "Reject" end - expect(page).not_to have_link "Reject" + expect(page).to have_link "Reject" end
Fix step for accept/reject button
diff --git a/lib/commutator/simple_client.rb b/lib/commutator/simple_client.rb index abc1234..def5678 100644 --- a/lib/commutator/simple_client.rb +++ b/lib/commutator/simple_client.rb @@ -17,10 +17,10 @@ super Aws::DynamoDB::Client.new(options) end - # `**kwargs` automatically calls `to_hash` on Options instances API_OPERATIONS.each do |operation| - define_method(operation) do |**kwargs| - super kwargs + define_method(operation) do |kwargs| + kwargs = kwargs.to_hash if kwargs.respond_to? :to_hash + __getobj__.send(operation, kwargs) end end end
Make SimpleClient compatible with ruby 2.3 Somehow `super kwargs` worked pre-2.3 but resulted in `NoMethodError: super called outside of method` in 2.3 I still don't understand why, but this is a better implementation anyway
diff --git a/app/views/courses/course.json.jbuilder b/app/views/courses/course.json.jbuilder index abc1234..def5678 100644 --- a/app/views/courses/course.json.jbuilder +++ b/app/views/courses/course.json.jbuilder @@ -9,9 +9,7 @@ json.published CohortsCourses.exists?(course_id: @course.id) json.enroll_url "#{request.base_url}#{course_slug_path(@course.slug)}/enroll/" - json.created_count number_to_human @course.revisions.joins(:article) - .where(articles: { namespace: 0 }) - .where(new_article: true).count + json.created_count number_to_human @course.new_article_count json.edited_count number_to_human @course.article_count json.edit_count number_to_human @course.revisions.count json.student_count @course.user_count
Update one more instance where new article count logic is duplicated. We want to use course.new_article_count as the canonical definition of how many new articles were created by a class.
diff --git a/lib/capistrano/tasks/nodejs.rake b/lib/capistrano/tasks/nodejs.rake index abc1234..def5678 100644 --- a/lib/capistrano/tasks/nodejs.rake +++ b/lib/capistrano/tasks/nodejs.rake @@ -2,8 +2,8 @@ desc 'Install node packages in shared directory' task :install_packages do - run "ln -s #{shared_path}/node_modules #{release_path}/node_modules" - run "cd #{release_path} && npm install --loglevel warn" + execute :ln, '-s', "#{shared_path}/node_modules", "#{release_path}/node_modules" + execute "cd #{release_path} && npm install --loglevel warn" end end
Use execute rather than run
diff --git a/app/models/shipit/deploy_spec/rubygems_discovery.rb b/app/models/shipit/deploy_spec/rubygems_discovery.rb index abc1234..def5678 100644 --- a/app/models/shipit/deploy_spec/rubygems_discovery.rb +++ b/app/models/shipit/deploy_spec/rubygems_discovery.rb @@ -15,7 +15,7 @@ def discover_gem_checklist [%(<strong>Don't forget to add a tag before deploying!</strong> You can do this with: - git tag -a -m "Version <strong>x.y.z</strong>" v<strong>x.y.z</strong> && git push --tags)] if gem? + git tag v<strong>x.y.z</strong> && git push --tags)] if gem? end def gem?
Fix rubygems checklist git tag command Shipit don't support annotated tags unfortunately :/
diff --git a/lib/danger/ci_source/bitrise.rb b/lib/danger/ci_source/bitrise.rb index abc1234..def5678 100644 --- a/lib/danger/ci_source/bitrise.rb +++ b/lib/danger/ci_source/bitrise.rb @@ -40,7 +40,7 @@ self.pull_request_id = env["BITRISE_PULL_REQUEST"] self.repo_url = env["GIT_REPOSITORY_URL"] - repo_matches = self.repo_url.match(%r{([\/:])([^\/]+\/[^\/.]+)(?:.git)?$}) + repo_matches = self.repo_url.match(%r{([\/:])([^\/]+\/[^\/.]+.*?)(?:.git)?$}) self.repo_slug = repo_matches[2] unless repo_matches.nil? end end
Add lazy match to Bitrise repo URL regex Lazy match allows for periods in the repo name.
diff --git a/core/spec/support/rspec-activemodel-mocks-patch.rb b/core/spec/support/rspec-activemodel-mocks-patch.rb index abc1234..def5678 100644 --- a/core/spec/support/rspec-activemodel-mocks-patch.rb +++ b/core/spec/support/rspec-activemodel-mocks-patch.rb @@ -0,0 +1,8 @@+# Manually applied the patch from https://github.com/jdelStrother/rspec-activemodel-mocks/commit/1211c347c5a574739616ccadf4b3b54686f9051f +if Gem.loaded_specs['rspec-activemodel-mocks'].version.to_s != "1.0.1" + raise "RSpec-ActiveModel-Mocks version has changed, please check if the behaviour has already been fixed: https://github.com/rspec/rspec-activemodel-mocks/pull/10 +If so, this patch might be obsolete-" +end +RSpec::ActiveModel::Mocks::Mocks::ActiveRecordInstanceMethods.class_eval do + alias_method :_read_attribute, :[] +end
Add rspec-activemodel-mocks patch until fixed upstream.
diff --git a/0_code_wars/6_is_prime.rb b/0_code_wars/6_is_prime.rb index abc1234..def5678 100644 --- a/0_code_wars/6_is_prime.rb +++ b/0_code_wars/6_is_prime.rb @@ -0,0 +1,16 @@+# http://www.codewars.com/kata/5262119038c0985a5b00029f/ +# --- iteration 1 --- +def isPrime(num) + return false if num < 2 + (2..(Math.sqrt(num))).each do |x| + return false if num % x == 0 + end + true +end + +# --- iteration 2 --- +def isPrime(num) + return false if num < 2 + (2..Math.sqrt(num)).each { |i| return false if num % i == 0 } + true +end
Add code wars (6) is prime
diff --git a/app/controllers/spree/checkout_controller_decorator.rb b/app/controllers/spree/checkout_controller_decorator.rb index abc1234..def5678 100644 --- a/app/controllers/spree/checkout_controller_decorator.rb +++ b/app/controllers/spree/checkout_controller_decorator.rb @@ -12,7 +12,7 @@ def update_registration fire_event("spree.user.signup", :order => current_order) # hack - temporarily change the state to something other than cart so we can validate the order email address - current_order.state = 'address' + current_order.state = current_order.checkout_steps.first if current_order.update_attributes(params[:order]) redirect_to checkout_path else
Address state is required (and shouldn't be) Email validation in checkout controller decorator assumes the `address` state will be the present. Changed to use the first checkout step via `current_order.checkout_steps.first`. Fixes #59
diff --git a/nixos-i686.rb b/nixos-i686.rb index abc1234..def5678 100644 --- a/nixos-i686.rb +++ b/nixos-i686.rb @@ -3,7 +3,7 @@ gen_template( arch: "i686", - iso_url: "https://nixos.org/releases/nixos/15.09/nixos-15.09.1076.9220f03/nixos-minimal-15.09.1076.9220f03-i686-linux.iso", - iso_sha256: "4ffa1cbaa006bd6d804ecbf3da3c613fbf57602e9c383e5d985f2fbd6ff265f5", + iso_url: "https://nixos.org/releases/nixos/16.03/nixos-16.03.1277.c84026f/nixos-minimal-16.03.1277.c84026f-i686-linux.iso", + iso_sha256: "28e3b6bb814fbe26679cbf16bb538b86eab5a6c139670fba39254c4388643ac3", virtualbox_guest_os: "Linux", )
Update i686 template to nixos-16.03
diff --git a/lib/honeybadger-read-api/api.rb b/lib/honeybadger-read-api/api.rb index abc1234..def5678 100644 --- a/lib/honeybadger-read-api/api.rb +++ b/lib/honeybadger-read-api/api.rb @@ -20,7 +20,7 @@ private def request(path, options = {}) - uri = URI.join(Api.site, path, "?auth_token=#{access_token}") + uri = build_uri(path, options) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE @@ -30,7 +30,17 @@ response = http.request(request) end - def self.site + def build_uri(path, opts) + uri = URI.join(host, path) + uri.query = build_query(opts) + uri + end + + def build_query(opts) + URI.encode_www_form(opts.merge({:auth_token => access_token})) + end + + def host "https://api.honeybadger.io/v1/" end end
Rework building the uri to enable pagination to properly implemented
diff --git a/lib/google-maps/location.rb b/lib/google-maps/location.rb index abc1234..def5678 100644 --- a/lib/google-maps/location.rb +++ b/lib/google-maps/location.rb @@ -17,9 +17,18 @@ end def self.find(address, language=:en) - API.query(:geocode_service, :language => language, :address => address).results.map { |result| Location.new(result.formatted_address, result.geometry.location.lat, result.geometry.location.lng) } + args = { language: language, address: address } + args[:key] = Google::Maps.api_key unless Google::Maps.api_key.nil? + + API.query(:geocode_service, args).results.map do |result| + Location.new( + result.formatted_address, + result.geometry.location.lat, + result.geometry.location.lng, + ) + end end end end -end+end
Add api key to Geocode API Google requires an API key for this API and you'll get over query limit errors early without it.
diff --git a/lib/pgbackups-archive/storage.rb b/lib/pgbackups-archive/storage.rb index abc1234..def5678 100644 --- a/lib/pgbackups-archive/storage.rb +++ b/lib/pgbackups-archive/storage.rb @@ -23,7 +23,7 @@ end def store - bucket.files.create :key => @key, :body => @file, :public => false + bucket.files.create :key => @key, :body => @file, :public => false, :multipart_chunk_size => 5242880 end end
Use multipart uploads per Jonathan Baxter's fork
diff --git a/lib/kaminari-views-bootstrap.rb b/lib/kaminari-views-bootstrap.rb index abc1234..def5678 100644 --- a/lib/kaminari-views-bootstrap.rb +++ b/lib/kaminari-views-bootstrap.rb @@ -1,5 +1,6 @@ require "kaminari-views-bootstrap/version" module KaminariViewsBootstrap - + class Engine < Rails::Engine + end end
Make Kaminari actually see this
diff --git a/Casks/dockermachine010.rb b/Casks/dockermachine010.rb index abc1234..def5678 100644 --- a/Casks/dockermachine010.rb +++ b/Casks/dockermachine010.rb @@ -0,0 +1,19 @@+cask :v1 => 'dockermachine010' do + version 'v0.1.0' + sha256 '9915d88f779915aa7f1d7ba2537433b15665030574d61b9e348dd1f7397606c4' + + # github.com is the official download host per the vendor homepage + url "https://github.com/docker/machine/releases/download/#{version}/docker-machine_darwin-amd64" + name 'Docker Machine' + homepage 'https://docs.docker.com/machine' + license :apache + + container :type => :naked + binary 'docker-machine_darwin-amd64', :target => 'docker-machine' + + postflight do + system '/bin/chmod', '--', '0755', "#{staged_path}/docker-machine_darwin-amd64" + end + + depends_on :arch => :x86_64 +end
Add docker-machine with no boot2docker dependency
diff --git a/Casks/intellij-idea-ce.rb b/Casks/intellij-idea-ce.rb index abc1234..def5678 100644 --- a/Casks/intellij-idea-ce.rb +++ b/Casks/intellij-idea-ce.rb @@ -1,8 +1,8 @@ class IntellijIdeaCe < Cask - version '13.1.3' - sha256 '4b0e3cb665aa2e3523d3c90b0075292f5ba3eaaff2bfc4872e4438193e561067' + version '13.1.4' + sha256 '33253297570e99df5de5ac25cfffc97f94c115c2e13c7669210a7c1cbdc55d55' - url 'http://download-cf.jetbrains.com/idea/ideaIC-13.1.3.dmg' + url "http://download-cf.jetbrains.com/idea/ideaIC-#{version}.dmg" homepage 'https://www.jetbrains.com/idea/index.html' link 'IntelliJ IDEA 13 CE.app'
Update IntelliJ IDEA to 13.1.4 Additionally, reuse `version` stanza to facilitate future updates
diff --git a/app/presenters/renalware/dashboard/dashboard_presenter.rb b/app/presenters/renalware/dashboard/dashboard_presenter.rb index abc1234..def5678 100644 --- a/app/presenters/renalware/dashboard/dashboard_presenter.rb +++ b/app/presenters/renalware/dashboard/dashboard_presenter.rb @@ -1,4 +1,5 @@ require_dependency "renalware/dashboard" +require_dependency "collection_presenter" module Renalware module Dashboard
Add explicit require to ensure presenter works in isolation
diff --git a/AGEmojiKeyboard.podspec b/AGEmojiKeyboard.podspec index abc1234..def5678 100644 --- a/AGEmojiKeyboard.podspec +++ b/AGEmojiKeyboard.podspec @@ -0,0 +1,23 @@+Pod::Spec.new do |s| + s.name = "AGEmojiKeyboard" + s.version = "0.1.0" + s.summary = "An emoji keyboard view that can replace the default iOS keyboard." + s.description = <<-DESC + iOS-emoji-keyboard is a replacement view for the default keyboard + for iOS that contains all the emojis supported by iOS. This keyboard + view intends to be cutomizable to the point that you can easily alter + it according to your needs. + DESC + s.homepage = "https://github.com/ayushgoel/iOS-emoji-keyboard" +# s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2" + + s.license = 'MIT' + s.author = { "Ayush Goel" => "ayushgoel111@gmail.com" } + s.source = { :git => "https://github.com/ayushgoel/iOS-emoji-keyboard.git", :tag => "#{s.version}" } + + s.platform = :ios, '7.0' + s.ios.deployment_target = '7.0' + s.requires_arc = true + + s.source_files = 'AGEmojiKeyboard/*.{h,m}' +end
Create podspec file and edit required details
diff --git a/lib/ticket_evolution/offices.rb b/lib/ticket_evolution/offices.rb index abc1234..def5678 100644 --- a/lib/ticket_evolution/offices.rb +++ b/lib/ticket_evolution/offices.rb @@ -3,5 +3,6 @@ include TicketEvolution::Modules::List include TicketEvolution::Modules::Search include TicketEvolution::Modules::Show + include TicketEvolution::Modules::Create end end
Allow office create (Sabre related).
diff --git a/lib/probes/active_record.rb b/lib/probes/active_record.rb index abc1234..def5678 100644 --- a/lib/probes/active_record.rb +++ b/lib/probes/active_record.rb @@ -4,7 +4,7 @@ module Base module ClassMethods def find_by_sql_with_probes(sql) - Dtrace::Probe::ActionController.find_by_sql_start do |p| + Dtrace::Probe::ActiveRecord.find_by_sql_start do |p| p.fire(sql) end results = find_by_sql_without_probes(sql)
Correct call to ActiveRecord.find_by_sql probe, prompting exception on bad call to probes in ruby-dtrace. git-svn-id: ee21a9573714ad23dc07274cc891719afe0bb9d1@358 0a37a38d-5523-0410-8951-9484fa28833c
diff --git a/lib/webpay_rails/transaction.rb b/lib/webpay_rails/transaction.rb index abc1234..def5678 100644 --- a/lib/webpay_rails/transaction.rb +++ b/lib/webpay_rails/transaction.rb @@ -5,11 +5,10 @@ def initialize(params) @token = params[:token] @url = params[:url] - @valid_cert = params[:valid_cert] end def success? - @token + !@token.blank? end end end
Remove unused variable and fix success? method on Transaction
diff --git a/lib/worth_saving/form/record.rb b/lib/worth_saving/form/record.rb index abc1234..def5678 100644 --- a/lib/worth_saving/form/record.rb +++ b/lib/worth_saving/form/record.rb @@ -37,7 +37,7 @@ def rescued_record if record.is_a? Array rescued_record = record.dup - rescued_record.last = rescued_object + rescued_record[-1] = rescued_object else rescued_record = rescued_object end
Correct assignment to array's last element