diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/pronto-jshint.gemspec b/pronto-jshint.gemspec index abc1234..def5678 100644 --- a/pronto-jshint.gemspec +++ b/pronto-jshint.gemspec @@ -1,7 +1,8 @@ # -*- encoding: utf-8 -*- +# $LOAD_PATH.push File.expand_path('../lib', __FILE__) - require 'pronto/jshint/version' +require 'English' Gem::Specification.new do |s| s.name = 'pronto-jshint' @@ -12,11 +13,23 @@ s.homepage = 'http://github.org/mmozuras/pronto-jshint' s.summary = 'Pronto runner for JSHint, JavaScript code quality tool' - s.required_rubygems_version = '>= 1.3.6' - s.license = 'MIT' + s.licenses = ['MIT'] + s.required_ruby_version = '>= 1.9.3' + s.rubygems_version = '1.8.23' - s.files = Dir.glob('{lib}/**/*') + %w(LICENSE README.md) - s.test_files = `git ls-files -- {spec}/*`.split("\n") + s.files = `git ls-files`.split($RS).reject do |file| + file =~ %r{^(?: + spec/.* + |Gemfile + |Rakefile + |\.rspec + |\.gitignore + |\.rubocop.yml + |\.travis.yml + )$}x + end + s.test_files = [] + s.extra_rdoc_files = ['LICENSE', 'README.md'] s.require_paths = ['lib'] s.add_dependency 'pronto', '~> 0.4.0'
Reduce size of the gem by only including the necessary files via gemspec
diff --git a/core/app/controllers/tour_controller.rb b/core/app/controllers/tour_controller.rb index abc1234..def5678 100644 --- a/core/app/controllers/tour_controller.rb +++ b/core/app/controllers/tour_controller.rb @@ -5,7 +5,7 @@ # search for @step_in_signup_process = :account def create_your_first_factlink - render layout: "one_column" + render layout: "tour" end def install_extension
Use tour layout for create_your_first_factlink.
diff --git a/lib/vagrant-notify.rb b/lib/vagrant-notify.rb index abc1234..def5678 100644 --- a/lib/vagrant-notify.rb +++ b/lib/vagrant-notify.rb @@ -2,6 +2,10 @@ require 'socket' require 'erb' require 'ostruct' + +if File.exists?(File.join(File.expand_path('../../', __FILE__), '.git')) + $:.unshift(File.expand_path('../../lib', __FILE__)) +end require 'vagrant-notify/middleware' require 'vagrant-notify/server'
Allow running the gem from source
diff --git a/lib/wombat/crawler.rb b/lib/wombat/crawler.rb index abc1234..def5678 100644 --- a/lib/wombat/crawler.rb +++ b/lib/wombat/crawler.rb @@ -30,6 +30,7 @@ parsed = parse(@metadata_dup, url) instance_eval do alias :method_missing :old_method_missing + undef :old_method_missing remove_instance_variable :@metadata_dup end parsed
Remove unnecessary `old_method_missing` method after crawled
diff --git a/make.rb b/make.rb index abc1234..def5678 100644 --- a/make.rb +++ b/make.rb @@ -2,16 +2,24 @@ include Config require "fileutils" include FileUtils::Verbose +require "generate-initial-keys.rb" loop do puts "Do you want to install the binary (b) or pure-ruby (r) core? (b/r)?" answer=STDIN.gets if(answer=~/^b/i) + begin + File.rm("core.rb") + rescue Errno::ENOENT + end require "./extconf.rb" exit system(ENV["MAKE"]||"make") elsif(answer=~/^r/i) + begin File.rm("Makefile") + rescue Errno::ENOENT + end File.copy("pr-core.rb", "core.rb") exit end
Clean up better when switching cores
diff --git a/StateView.podspec b/StateView.podspec index abc1234..def5678 100644 --- a/StateView.podspec +++ b/StateView.podspec @@ -14,6 +14,5 @@ s.requires_arc = true s.source_files = 'StateView/*.swift' - s.dependency 'Dwifft' s.dependency 'SnapKit' end
Remove Dwifft from podspec dependencies
diff --git a/bldr.gemspec b/bldr.gemspec index abc1234..def5678 100644 --- a/bldr.gemspec +++ b/bldr.gemspec @@ -24,6 +24,6 @@ s.add_development_dependency 'json_pure' s.add_development_dependency 'sinatra', '~>1.2.6' s.add_development_dependency 'tilt', '~>1.3.2' - s.add_development_dependency 'yajl-ruby' + s.add_development_dependency 'yajl-ruby', '>= 1.0' s.add_development_dependency 'actionpack', '~> 3.0.7' end
Update yajl gemspec to >= 1.0
diff --git a/app/models/locality.rb b/app/models/locality.rb index abc1234..def5678 100644 --- a/app/models/locality.rb +++ b/app/models/locality.rb @@ -13,7 +13,7 @@ if contact_id.nil? '--' else - User.find(contact_id).name + contact.name end end
Update to follow Rails convention Call send name message to contact instead of searching by contact-id
diff --git a/lib/watir-get-image-content/image.rb b/lib/watir-get-image-content/image.rb index abc1234..def5678 100644 --- a/lib/watir-get-image-content/image.rb +++ b/lib/watir-get-image-content/image.rb @@ -7,13 +7,13 @@ def to_x_base64(target) assert_exists js = %Q{var canvas = document.createElement("canvas"); - canvas.width = arguments[0].width; - canvas.height = arguments[0].height; + canvas.width = arguments[1]; + canvas.height = arguments[2]; var ctx = canvas.getContext("2d"); ctx.drawImage(arguments[0], 0, 0); var dataURL = canvas.toDataURL("image/#{target}"); return dataURL.replace(/^data:image\\/(png|jpg|gif);base64,/, "");} - driver.execute_script js, @element + driver.execute_script js, @element, natural_width, natural_height end def to_png_base64
Use natural width and natural height Use natural width and natural height to make sure we get the whole image for those that are scaled
diff --git a/demo/consumer_unit_test.rb b/demo/consumer_unit_test.rb index abc1234..def5678 100644 --- a/demo/consumer_unit_test.rb +++ b/demo/consumer_unit_test.rb @@ -0,0 +1,98 @@+#!/usr/bin/env ruby + +require 'rubygems' +require 'bundler/setup' + +require 'aviator' + +class AviatorConsumer + + def do_one_thing + session = authenticate + + keystone = session.identity_service + response = keystone.request(:list_tenants) + response.body + end + + def do_another_thing + session = authenticate + + response = session.compute_service.request(:create_server) + response.status + end + + private + + def authenticate + openstack = Aviator::Session.new( + config_file: 'path/to/aviator.yml', + environment: :production, + log_file: 'path/to/aviator.log' + ) + openstack.authenticate + openstack + end + +end + + +gem 'mocha' +require 'minitest/unit' +require 'minitest/autorun' +require 'mocha/mini_test' + + +describe AviatorConsumer do + + # Shared objects + + def consumer + @consumer ||= AviatorConsumer.new + end + + def mock_session + @mock ||= mock('Aviator::Session') + end + + # Common expectation for session auth + + def expects_authentication + options = { + config_file: 'path/to/aviator.yml', + environment: :production, + log_file: 'path/to/aviator.log' + } + Aviator::Session.expects(:new).with(options).returns(mock_session) + mock_session.expects(:authenticate) + end + + # Expectations + + it "must do one thing" do + mock_keystone = mock('Aviator::Service') + mock_response = mock('Aviator::Response') + mock_body = { id: 'something' } + + expects_authentication + mock_session.expects(:identity_service).returns(mock_keystone) + mock_keystone.expects(:request).with(:list_tenants).returns(mock_response) + mock_response.expects(:body).returns(mock_body) + + consumer.do_one_thing.must_equal mock_body + end + + it "must do another thing" do + mock_nova = mock('Aviator::Service') + mock_response = mock('Aviator::Response') + mock_status = 200 + + expects_authentication + mock_session.expects(:compute_service).returns(mock_nova) + mock_nova.expects(:request).with(:create_server).returns(mock_response) + mock_response.expects(:status).returns(mock_status) + + consumer.do_another_thing.must_equal mock_status + end + +end
Add sample unit testing of a hypothetical Aviator consumer
diff --git a/test/controllers/users_controller_test.rb b/test/controllers/users_controller_test.rb index abc1234..def5678 100644 --- a/test/controllers/users_controller_test.rb +++ b/test/controllers/users_controller_test.rb @@ -1,8 +1,10 @@ require 'test_helper' class UsersControllerTest < ActionController::TestCase - test "should get show" do - get :show + test "should get user profile without error" do + test_user = User.create(email: 'test+test@test.test', password: 'testtesttest') + + get :show, id: test_user.id assert_response :success end
Add test for hitting author profile page successfully
diff --git a/Casks/macid.rb b/Casks/macid.rb index abc1234..def5678 100644 --- a/Casks/macid.rb +++ b/Casks/macid.rb @@ -1,11 +1,15 @@ cask :v1 => 'macid' do - version '1.2b' - sha256 '71dd713f6090b0c6038c274fa32bdb59bb8cfe7f39ec06c252f71dcae932e6a6' + version '1.2.2' + sha256 '6dd7ad1992355be510df33ee6c0209690c6d3522a93afa9d6750b999b36c67be' - url "http://macid.co/app/#{version.sub(%r{b.*},'')}/#{version.sub(%r{.*b},'')}/MacID-for-OS-X.zip" + url "http://macid.co/app/#{version}/MacID-for-OS-X.zip" name 'MacID' homepage 'http://macid.co/' license :gratis app 'MacID.app' + + depends_on :macos => '>= :yosemite' + + zap :delete => '~/Library/Preferences/com.kanecheshire.MacIDOSX.plist' end
Upgrade MacID.app to 1.2.2, add MacOS dependency and zap
diff --git a/Formula/dwm.rb b/Formula/dwm.rb index abc1234..def5678 100644 --- a/Formula/dwm.rb +++ b/Formula/dwm.rb @@ -17,12 +17,12 @@ end def caveats - <<EOF - In order to use the Mac OS X command key '⌘' for dwm commands + <<-EOS + In order to use the Mac OS X command key for dwm commands, change the X11 keyboard modifier map using xmodmap (1). e.g. by running the following command from $HOME/.xinitrc xmodmap -e 'remove Mod2 = Meta_L' -e 'add Mod1 = Meta_L'& -EOF + EOS end end
Remove command-key character for compatibility.
diff --git a/Fusuma.podspec b/Fusuma.podspec index abc1234..def5678 100644 --- a/Fusuma.podspec +++ b/Fusuma.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Fusuma" - s.version = "0.2.5" + s.version = "0.5" s.summary = "Instagram-like photo browser with a few line of code written in Swift" s.homepage = "https://github.com/ytakzk/Fusuma" s.license = 'MIT'
Upgrade to 0.5 in podspec
diff --git a/test/react-native/features/support/env.rb b/test/react-native/features/support/env.rb index abc1234..def5678 100644 --- a/test/react-native/features/support/env.rb +++ b/test/react-native/features/support/env.rb @@ -1,5 +1,6 @@ BeforeAll do - Maze.config.receive_no_requests_wait = 15 if Maze.config.respond_to? :receive_no_requests_wait= + Maze.config.receive_no_requests_wait = 15 + Maze.config.receive_requests_wait = 60 # Theoretical maximum on Android end Before('@android_only') do |scenario|
Allow 60s for report deliveries
diff --git a/test/minitest_shared_examples/shared_examples_test.rb b/test/minitest_shared_examples/shared_examples_test.rb index abc1234..def5678 100644 --- a/test/minitest_shared_examples/shared_examples_test.rb +++ b/test/minitest_shared_examples/shared_examples_test.rb @@ -1,5 +1,5 @@ require 'test_helper' -describe "test that use SharedExamples" do +class TestThatUsesSharedExamples < Minitest::Test include SharedExampleSpec end
Fix problem with not running the shared examples. We should use minitest syntax to define class instead of describe
diff --git a/app/controllers/misc_controller.rb b/app/controllers/misc_controller.rb index abc1234..def5678 100644 --- a/app/controllers/misc_controller.rb +++ b/app/controllers/misc_controller.rb @@ -1,3 +1,5 @@+require "fluent/version" + class MiscController < ApplicationController def show redirect_to misc_information_path
Fix system information page didn't load fluent/version
diff --git a/config/schedule.rb b/config/schedule.rb index abc1234..def5678 100644 --- a/config/schedule.rb +++ b/config/schedule.rb @@ -2,7 +2,7 @@ rake 'cron:minutely' end -every 30.minutes do +every 1.hour do rake 'cron:send_undeployed_commits_reminders' end
Change walrus to run every hour instead of every 30 minutes
diff --git a/attributes/defaults.rb b/attributes/defaults.rb index abc1234..def5678 100644 --- a/attributes/defaults.rb +++ b/attributes/defaults.rb @@ -8,7 +8,7 @@ default["sabnzbd"]["directories"]["install"] = '/opt/sabnzbd' default["sabnzbd"]["directories"]["logs"] = '/var/log/sabnzbd' -default["sabnzbd"]["directories"]["config"] = '/etc/sabnzbd' +default["sabnzbd"]["directories"]["config"] = '/vagrant/etc/sabnzbd' default["sabnzbd"]["host"] = '0.0.0.0' default["sabnzbd"]["port"] = '6000'
Make default config folder be /vagrant/etc/config
diff --git a/app/helpers/spree/payment_methods_helper.rb b/app/helpers/spree/payment_methods_helper.rb index abc1234..def5678 100644 --- a/app/helpers/spree/payment_methods_helper.rb +++ b/app/helpers/spree/payment_methods_helper.rb @@ -1,9 +1,13 @@ module Spree module PaymentMethodsHelper - def payment_method_name(payment) + def payment_method(payment) # hack to allow us to retrieve the name of a "deleted" payment method id = payment.payment_method_id - Spree::PaymentMethod.find_with_destroyed(id).name + Spree::PaymentMethod.find_with_destroyed(id) + end + + def payment_method_name(payment) + payment_method(payment).name end end end
Add method payment_method to get the payment method from a payment - Method `payment_method_name` now use `payment_method`
diff --git a/features/step_definitions/salt_steps.rb b/features/step_definitions/salt_steps.rb index abc1234..def5678 100644 --- a/features/step_definitions/salt_steps.rb +++ b/features/step_definitions/salt_steps.rb @@ -0,0 +1,9 @@+# Copyright 2015 SUSE LLC + +When(/^I get a content of a file "(.*?)"$/) do |filename| + $output = sshcmd("cat #{filename}") +end + +Then(/^it should contain "(.*?)" text$/) do |content| + fail if not $output[:stdout].include? content +end
Add Salt Master and Salt API step definitions
diff --git a/lib/active_interaction/filters/model_filter.rb b/lib/active_interaction/filters/model_filter.rb index abc1234..def5678 100644 --- a/lib/active_interaction/filters/model_filter.rb +++ b/lib/active_interaction/filters/model_filter.rb @@ -21,8 +21,7 @@ def cast(value, reconstantize = true) @klass ||= klass - # rubocop:disable CaseEquality - if @klass === value || value.is_a?(@klass) || value.instance_of?(@klass) + if matches?(value) value else return super(value) unless reconstantize @@ -43,5 +42,14 @@ rescue NameError raise InvalidClassError, klass_name.inspect end + + # @param value [Object] + # + # @return [Boolean] + def matches?(value) + @klass === value || # rubocop:disable CaseEquality + value.is_a?(@klass) || + value.instance_of?(@klass) + end end end
Move class matching logic into helper function
diff --git a/lib/smart_answer/predicate/variable_matches.rb b/lib/smart_answer/predicate/variable_matches.rb index abc1234..def5678 100644 --- a/lib/smart_answer/predicate/variable_matches.rb +++ b/lib/smart_answer/predicate/variable_matches.rb @@ -3,18 +3,15 @@ class VariableMatches < Base attr_reader :variable_name, :acceptable_responses - def initialize(variable_name, acceptable_responses, match_description = nil) + def initialize(variable_name, acceptable_responses, match_description = nil, label = nil) @variable_name = variable_name @acceptable_responses = [*acceptable_responses] @match_description = match_description + @label = label end def call(state, response) @acceptable_responses.include?(state.send(@variable_name)) - end - - def match_description - @match_description || "{ #{@acceptable_responses.join(" | ")} }" end def or(other) @@ -27,8 +24,16 @@ alias_method :|, :or + def match_description + @match_description || if acceptable_responses.size == 1 + acceptable_responses.first + else + "{ #{@acceptable_responses.join(" | ")} }" + end + end + def label - "#{@variable_name} == #{match_description}" + @label || "#{@variable_name} == #{match_description}" end end end
Allow overriding of entire label for VariableMatches predicate
diff --git a/lib/analysis/analyze_assessments_table.rb b/lib/analysis/analyze_assessments_table.rb index abc1234..def5678 100644 --- a/lib/analysis/analyze_assessments_table.rb +++ b/lib/analysis/analyze_assessments_table.rb @@ -29,7 +29,7 @@ end def assessment_subject_summary - assessment_subject.each_with_object(Hash.new(0)) { |subj, counts| counts[subj] += 1 } + assessment_subject.each_with_object(Hash.new(0)) { |subj, memo| memo[subj] += 1 } end def assessment_test @@ -37,7 +37,17 @@ end def assessment_test_summary - assessment_test.each_with_object(Hash.new(0)) { |subj, counts| counts[subj] += 1 } + assessment_test.each_with_object(Hash.new(0)) { |test, memo| memo[test] += 1 } + end + + def assessment_test_subject_crosstabs + data.each_with_object(Hash.new(0)) do |row, memo| + crosstab = [ + row.fetch(:assessment_test, 'NIL'), row.fetch(:assessment_subject, 'NIL') + ].join('+') + + memo[crosstab] += 1 + end end def nil_converter(value)
Add method to print crosstabs
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 @@ -6,14 +6,13 @@ def create user = User.new(user_params) - if @user.save + if user.save session[:user_id] = user.id redirect_to :root else flash.now[:error] = user.errors.full_messages render :new end - end def show @@ -23,24 +22,24 @@ end def edit - # TODO: Make sure user == current user @user = User.find_by(id: params[:id]) end def update - # TODO: Make sure user == current user user = User.find_by(id: params[:id]) - user.update(user_params) + user.update_attributes(user_params) if user.save flash[:success] = "Your profile has been updated!" + redirect_to user_path(user) else flash[:error] = user.errors.full_messages + redirect_to edit_user_path(user) end - redirect_to user end private def user_params - params.require(:user).permit(:username, :first_name, :last_name, :email, :username, :password, :password_cofirmation, :zip_code) + params.require(:user).permit(:username, :first_name, :last_name, :email, :username, :zip_code, + :bio, :github_link, :website_link) end end
Implement update user route, remove password and add profile attrs to strong params
diff --git a/lib/embulk/input/presto/explain_parser.rb b/lib/embulk/input/presto/explain_parser.rb index abc1234..def5678 100644 --- a/lib/embulk/input/presto/explain_parser.rb +++ b/lib/embulk/input/presto/explain_parser.rb @@ -6,7 +6,7 @@ explain_text = explain_result.flatten.last.lines.first column_name_raw, column_type_raw = explain_text.split(' => ') names = column_name_raw.split('[').last.split(']').first.split(',').map{ |name| name.strip } - types = column_type_raw.split('[').last.split(']').first.gsub(/\(.+?, .+?\)/, "").split(',').map{ |info| info.split(':').last } + types = column_type_raw.split('[').last.split(']').first.gsub(/\(.+?\)/, "").split(',').map{ |info| info.split(':').last } names.zip(types) end end
FIX an incorrect regular expression.
diff --git a/lib/fix_db_schema_conflicts/tasks/db.rake b/lib/fix_db_schema_conflicts/tasks/db.rake index abc1234..def5678 100644 --- a/lib/fix_db_schema_conflicts/tasks/db.rake +++ b/lib/fix_db_schema_conflicts/tasks/db.rake @@ -8,7 +8,7 @@ "#{Rails.root}/db/schema.rb" end rubocop_yml = File.expand_path('../../../../.rubocop_schema.yml', __FILE__) - `rubocop --auto-correct --config #{rubocop_yml} #{filename}` + `bundle exec rubocop --auto-correct --config #{rubocop_yml} #{filename}` `sed -E -e 's/, +/, /g' #{filename} > db/schema.fixed.rb` `mv db/schema.fixed.rb #{filename}` end
Use bundled version of rubocop
diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb index abc1234..def5678 100644 --- a/config/initializers/mime_types.rb +++ b/config/initializers/mime_types.rb @@ -1,8 +1,16 @@+# Video +Mime::Type.register 'video/mp4', :mp4 +Mime::Type.register 'video/mp4', :m4v +Mime::Type.register 'video/webm', :webm +Mime::Type.register 'video/ogg', :ogv Mime::Type.register 'application/ogg', :ogg Mime::Type.register 'application/ogg', :ogx -Mime::Type.register 'video/ogg', :ogv -Mime::Type.register 'audio/ogg', :oga -Mime::Type.register 'video/mp4', :mp4 -Mime::Type.register 'video/mp4', :m4v + +# Audio Mime::Type.register 'audio/mpeg', :mp3 Mime::Type.register 'audio/mpeg', :m4a +Mime::Type.register 'audio/ogg', :oga + +# Subtitle +Mime::Type.register 'text/srt', :srt +Mime::Type.register 'text/vtt', :vtt
Add support for srt mimetype
diff --git a/lib/paper_trail_scrapbook/life_history.rb b/lib/paper_trail_scrapbook/life_history.rb index abc1234..def5678 100644 --- a/lib/paper_trail_scrapbook/life_history.rb +++ b/lib/paper_trail_scrapbook/life_history.rb @@ -6,6 +6,14 @@ class LifeHistory def initialize(object) @versions = object.versions + + if object.respond_to?(:trailed_related_content) + object.trailed_related_content.each do |trc| + @versions |= trc.versions + end + end + + @versions.sort_by!(&:created_at) end # Retries textual historical analysis of versions
Add ability to incorporate history of related content
diff --git a/lib/waves/utilities/eligibility_status.rb b/lib/waves/utilities/eligibility_status.rb index abc1234..def5678 100644 --- a/lib/waves/utilities/eligibility_status.rb +++ b/lib/waves/utilities/eligibility_status.rb @@ -8,5 +8,18 @@ ["(d) A local authority in the United Kingdom.", :status_d], ] end + + def part_4_non_fishing + [ + ["(a) British citizens or non-United Kingdom nationals exercising their right of freedom of movement of workers or right of establishment under Article 48 or 52 of the EEC Treaty or Article 28 or 31 of the EEA Agreement", :status_a], + ["(b) British Dependent Territories citizens", :status_b], + ["(c) British Overseas citizens", :status_c], + ["(d) Persons who under the British Nationality Order 1981 are British subjects", :status_d], + ["(e) Persons who under the Hong Kong (British Nationality) Order 1986 are British Nationals (Overseas)", :status_e], + ["(f) Bodies corporate incorporated in an EEA state", :status_f], + ["(g) Bodies corporate incorporated in any relevant British Possession and having their principal place of business in the UK or in any such possession", :status_g], + ["(h) European Economic Interest Groupings being groupings formed in pursuance of Article 1 of Council Regulation (EEC) No. 2137/85 and registered in the UK", :status_h], + ] + end end end
Add eligibility status for part 4 non-fishing
diff --git a/lib/commands/test_command.rb b/lib/commands/test_command.rb index abc1234..def5678 100644 --- a/lib/commands/test_command.rb +++ b/lib/commands/test_command.rb @@ -7,7 +7,7 @@ class TestCommand < Command def apply(mod) reset_counts(mod) - file_action "Testing", :other, mod, "some files" do + file_action "Running", :other, mod, "testsuite" do # Otherwise YaST will not find fast_gettext.gem disable_bundler do Dir.chdir mod.result_dir do
Fix message displayed when running "yk test" Before this commit, the message was: * Testing some files... After this commit, it is: * Running testsuite... Much better.
diff --git a/rakefiles/wait_for.rb b/rakefiles/wait_for.rb index abc1234..def5678 100644 --- a/rakefiles/wait_for.rb +++ b/rakefiles/wait_for.rb @@ -1,5 +1,4 @@-def wait_for(cmd) - sleep_secs = 20 +def wait_for(cmd, sleep_secs=20) ready = false until ready sh cmd do |ok, res|
Make sleep_secs an arg (with default).
diff --git a/recipes/diff_merge.rb b/recipes/diff_merge.rb index abc1234..def5678 100644 --- a/recipes/diff_merge.rb +++ b/recipes/diff_merge.rb @@ -12,9 +12,9 @@ to "/Applications/DiffMerge.app/Contents/Resources/diffmerge.sh" end -# Configure git if requested +# Configure git unless otherwise requested node["diffmerge"] ||= {} -node["diffmerge"]["configure-git"] ||= 0 +node["diffmerge"]["configure-git"] ||= 1 if node["diffmerge"]["configure-git"] != 0 [
Enable diffmerge git configuration by default (turn off with attribute)
diff --git a/recommendable.gemspec b/recommendable.gemspec index abc1234..def5678 100644 --- a/recommendable.gemspec +++ b/recommendable.gemspec @@ -10,6 +10,7 @@ EOF s.files = Dir['lib/**/*'] + s.test_files = Dir['test/**/*'] s.has_rdoc = 'yard'
Update gemspec to include test_files Signed-off-by: David Celis <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@davidcel.is>
diff --git a/lib/pacer/neo4j.rb b/lib/pacer/neo4j.rb index abc1234..def5678 100644 --- a/lib/pacer/neo4j.rb +++ b/lib/pacer/neo4j.rb @@ -3,16 +3,29 @@ import com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jVertex import com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jEdge - def self.neo4j(path) - graph = Neo4jGraph.new(File.expand_path(path)) - at_exit do - begin - graph.shutdown - rescue Exception, StandardError => e - pp e + class << self + def neo4j(path) + path = File.expand_path(path) + return neo_graphs[path] if neo_graphs[path] + graph = Neo4jGraph.new(path) + neo_graphs[path] = graph + register_neo_shutdown(path) + graph + end + + def neo_graphs + @neo_graphs ||= {} + end + + def register_neo_shutdown(path) + at_exit do + begin + neo_graphs[path].shutdown if neo_graphs[path] + rescue Exception, StandardError => e + pp e + end end end - graph end
Fix problem of lost references to open neo graphs.
diff --git a/lib/kaminari/mongo_mapper.rb b/lib/kaminari/mongo_mapper.rb index abc1234..def5678 100644 --- a/lib/kaminari/mongo_mapper.rb +++ b/lib/kaminari/mongo_mapper.rb @@ -1,7 +1,7 @@ require "kaminari/mongo_mapper/version" -module Kaminari - module MongoMapper - # Your code goes here... - end +ActiveSupport.on_load :mongo_mapper do + require 'kaminari/models/mongo_mapper_extension' + ::MongoMapper::Document.send :include, Kaminari::MongoMapperExtension::Document + ::Plucky::Query.send :include, Kaminari::PluckyCriteriaMethods end
Copy MongoMapper initialization from kaminari/hooks.rb
diff --git a/tasks/configuration.rake b/tasks/configuration.rake index abc1234..def5678 100644 --- a/tasks/configuration.rake +++ b/tasks/configuration.rake @@ -2,6 +2,7 @@ require 'yaml' namespace :configuration do + desc 'Updates the default configuration file when smell defaults change' task :update_default_configuration do DEFAULT_SMELL_CONFIGURATION = 'config/defaults.reek' content = Reek::Smells::SmellRepository.smell_types.each_with_object({}) do |klass, hash|
Add missing description to Rake task.
diff --git a/lib/peddler/parsers/model.rb b/lib/peddler/parsers/model.rb index abc1234..def5678 100644 --- a/lib/peddler/parsers/model.rb +++ b/lib/peddler/parsers/model.rb @@ -37,6 +37,10 @@ str = text_at_xpath(path) Time.parse(CGI.unescape(str)) if str end + + def attribute(name) + document.attribute(name).text + end end end end
Add an attribute parser helper to Model
diff --git a/lib/tic_tac_toe.rb b/lib/tic_tac_toe.rb index abc1234..def5678 100644 --- a/lib/tic_tac_toe.rb +++ b/lib/tic_tac_toe.rb @@ -12,4 +12,8 @@ puts " #{@board[6]} " + " #{@board[7]} " + " #{@board[8]} " end + def move(idx_pos, symbol) + @board[idx_pos - 1] = symbol + end + end
Create method to take in the index_position and symbol and place it on the TTT board
diff --git a/lib/rails/generators/run_template/run_template_generator.rb b/lib/rails/generators/run_template/run_template_generator.rb index abc1234..def5678 100644 --- a/lib/rails/generators/run_template/run_template_generator.rb +++ b/lib/rails/generators/run_template/run_template_generator.rb @@ -1,4 +1,6 @@ class RunTemplateGenerator < Rails::Generators::Base + source_root File.expand_path('../templates', __FILE__) + argument :template_path, :desc => "Path to an application template" def apply_template
Include a redundant templates folder in generator
diff --git a/rakelib/package.rb b/rakelib/package.rb index abc1234..def5678 100644 --- a/rakelib/package.rb +++ b/rakelib/package.rb @@ -32,7 +32,7 @@ BUILDPACK_VERSION = JavaBuildpack::BuildpackVersion.new(false).freeze - PLATFORMS = %w(centos6 lucid mountainlion precise).freeze + PLATFORMS = %w(centos6 lucid mountainlion precise trusty).freeze STAGING_DIR = "#{BUILD_DIR}/staging".freeze
Add trust to list of platforms This change adds ubuntu Trust (14.04) to the list of packaged platform artifacts.
diff --git a/spec/support/setup.rb b/spec/support/setup.rb index abc1234..def5678 100644 --- a/spec/support/setup.rb +++ b/spec/support/setup.rb @@ -1,5 +1,6 @@ RSpec.configure do |config| config.before :suite do `docker build --tag nibtest:latest .` + `cd spec/dummy && docker-compose build` end end
Build dummy docker images before spec run
diff --git a/recipes/default.rb b/recipes/default.rb index abc1234..def5678 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -11,10 +11,10 @@ puma_config application do directory deploy[:deploy_to] environment deploy[:rails_env] - logrotate node[:puma][:logrotate] - thread_min node[:puma][:thread_min] - thread_max node[:puma][:thread_min] - workers node[:puma][:workers] + logrotate deploy[:puma][:logrotate] + thread_min deploy[:puma][:thread_min] + thread_max deploy[:puma][:thread_max] + workers deploy[:puma][:workers] end end
Fix issue with puma attributes, they should be defined per application not globally
diff --git a/spec/features/private_courses_spec.rb b/spec/features/private_courses_spec.rb index abc1234..def5678 100644 --- a/spec/features/private_courses_spec.rb +++ b/spec/features/private_courses_spec.rb @@ -0,0 +1,28 @@+# frozen_string_literal: true + +require 'rails_helper' + +describe 'Private courses' do + let(:course) { create(:course, private: true) } + let(:user) { create(:user) } + before do + login_as user + stub_oauth_edit + end + + context 'when the can edit the course the course' do + before do + JoinCourse.new(course: course, user: user, role: CoursesUsers::Roles::INSTRUCTOR_ROLE) + end + + it 'renders the course normally' do + visit "/courses/#{course.slug}" + expect(page.status_code).to eq(200) + end + end + context 'when the user is not participating in the course' do + it 'raises a 404 error' do + expect { visit "/courses/#{course.slug}" }.to raise_error(ActionController::RoutingError) + end + end +end
Add basic feature spec for private courses
diff --git a/spec/support/authentication_helper.rb b/spec/support/authentication_helper.rb index abc1234..def5678 100644 --- a/spec/support/authentication_helper.rb +++ b/spec/support/authentication_helper.rb @@ -8,6 +8,6 @@ end def stub_login user - ApplicationController.any_instance.stub(:current_user) { user } + ApplicationController.any_instance.stubs(:current_user).returns(user) end end
Modify stub_login to use mocha mocks
diff --git a/spec/support/contexts/api_requests.rb b/spec/support/contexts/api_requests.rb index abc1234..def5678 100644 --- a/spec/support/contexts/api_requests.rb +++ b/spec/support/contexts/api_requests.rb @@ -10,7 +10,7 @@ name = described_class.name.split(/::/).last.downcase vcr_options = { - record: ENV['VCR_RECORD'] || :none, + record: (ENV['VCR_RECORD'] || :none).to_sym, erb: { api_key: client.config.api_key, domain: client.config.domain } }
Fix VCR record mode overriding.
diff --git a/schema.gemspec b/schema.gemspec index abc1234..def5678 100644 --- a/schema.gemspec +++ b/schema.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = 'schema' s.summary = "Primitives for schema and structure" - s.version = '0.4.5.1' + s.version = '0.4.5.2' s.description = ' ' s.authors = ['The Eventide Project']
Package version increased from 0.4.5.1 to 0.4.5.2
diff --git a/app/decorators/meals/signup_decorator.rb b/app/decorators/meals/signup_decorator.rb index abc1234..def5678 100644 --- a/app/decorators/meals/signup_decorator.rb +++ b/app/decorators/meals/signup_decorator.rb @@ -26,7 +26,7 @@ else form.select(:household_id, household&.decorate&.selected_option_tag || "", {}, {class: "form-control", data: {"select2-src" => h.households_path, - "select2-label-attr" => "name_with_prefix", + "select2-label-attr" => "nameWithPrefix", "select2-prompt" => t("select2.prompts.household"), "select2-placeholder" => t("select2.placeholders.household"), "select2-context" => "meal_form",
821: Fix select2 label attr for signup households
diff --git a/app/helpers/budget_investments_helper.rb b/app/helpers/budget_investments_helper.rb index abc1234..def5678 100644 --- a/app/helpers/budget_investments_helper.rb +++ b/app/helpers/budget_investments_helper.rb @@ -16,8 +16,15 @@ end def set_sorting_icon(direction, sort_by) - icon = direction == "desc" ? "icon-arrow-top" : "icon-arrow-down" - icon = sort_by.to_s == params[:sort_by] ? icon : "" + if sort_by.to_s == params[:sort_by] + if direction == "desc" + "icon-arrow-top" + else + "icon-arrow-down" + end + else + "" + end end def set_direction(current_direction)
Use `if` blocks instead of two ternary operators Using a simple ternary operator is usually fine; however, code combining two ternary operator is a bit hard to follow.
diff --git a/app/helpers/orchid/application_helper.rb b/app/helpers/orchid/application_helper.rb index abc1234..def5678 100644 --- a/app/helpers/orchid/application_helper.rb +++ b/app/helpers/orchid/application_helper.rb @@ -1,7 +1,10 @@ module Orchid::ApplicationHelper def copy_params + # Remove Rails internal parameters "action" and "controller" from URLs + # They are always accessible via params["action"] and params["controller"] return params.to_unsafe_h + .reject { |param| param[/^(?:action|controller)$/] } end def clear_search_text
Drop "action" and "controller" params from URLs Always accessible via `params["action"]` and `params["controller"]`
diff --git a/spec/requests_spec.rb b/spec/requests_spec.rb index abc1234..def5678 100644 --- a/spec/requests_spec.rb +++ b/spec/requests_spec.rb @@ -55,8 +55,8 @@ context 'Printing body' do let(:body) { 'Request Body' } - it 'prints body on post request' do - expect { post '/', body }.to output(/Request Body/).to_stdout + it 'prints body on a request' do + expect { get '/', body }.to output(/Request Body/).to_stdout end end end
Use a get request rather than post request in spec.
diff --git a/TinyConstraints.podspec b/TinyConstraints.podspec index abc1234..def5678 100644 --- a/TinyConstraints.podspec +++ b/TinyConstraints.podspec @@ -3,6 +3,7 @@ s.version = '3.1.0' s.ios.deployment_target = '9.0' s.tvos.deployment_target = '9.0' + s.osx.deployment_target = '10.11' s.summary = 'Nothing but sugar.' s.description = <<-DESC Tiny Constraints is the syntactic sugar that makes NSLayoutConstraint sweeter for human use.
Add osx deployment target to podspec.
diff --git a/test/test_gem_install.rb b/test/test_gem_install.rb index abc1234..def5678 100644 --- a/test/test_gem_install.rb +++ b/test/test_gem_install.rb @@ -17,12 +17,4 @@ end assert_match(/GNU ed/, out) end - - def test_gem_install_nokogiri - msys = RubyInstaller::Runtime.msys2_installation - msys.with_msys_apps_enabled do - assert system("pacman -S #{msys.mingw_package_prefix}-libxslt --needed --noconfirm") - assert system("gem inst nokogiri --platform ruby -- --use-system-libraries") - end - end end
Remove test for "gem install nokogiri" The remaining gem install test already tests everything, so that nokogiri is not very valuable here.
diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index abc1234..def5678 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -11,6 +11,6 @@ # end # These inflection rules are supported but not enabled by default: -# ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.acronym "RESTful" -# end +ActiveSupport::Inflector.inflections(:en) do |inflect| + inflect.acronym "JSON" +end
Add JSON as an inflection Rails camel cases the filename to work out the expected class name. In this case, `symbolize_json.rb` was expected to be `SymbolizeJson`. Adding an acronym as an inflection will resolve this.
diff --git a/lib/order.rb b/lib/order.rb index abc1234..def5678 100644 --- a/lib/order.rb +++ b/lib/order.rb @@ -3,8 +3,13 @@ @order_hash = order_hash end + def address + address_type = @config['twilio.address_type'] || "billing" + @order_hash["#{address_type}_address"] + end + def customer_phone - @order_hash['billing_address']['phone'] + address['phone'] end def number @@ -12,6 +17,6 @@ end def customer_name - @order_hash['billing_address']['firstname'] + address['firstname'] end end
Bring back address picking via param Originally checked in 753c650e1e471f21215e480d198384c61856eb61 and lost later on in 7c5e414b083b41253fbb19fcb08dcc6e8345e1c9
diff --git a/acceptance/henson_install_spec.rb b/acceptance/henson_install_spec.rb index abc1234..def5678 100644 --- a/acceptance/henson_install_spec.rb +++ b/acceptance/henson_install_spec.rb @@ -28,7 +28,7 @@ end it "should have ssh module" do - expect(Pathname.new("#{project}/shared/ssh")).to be_directory + expect(Pathname.new("#{project}/shared/ssh")).to be_symlink end it "should have stdlib module" do
Update henson install spec to check if path sourced modules use symlinks
diff --git a/actionpack-action_caching.gemspec b/actionpack-action_caching.gemspec index abc1234..def5678 100644 --- a/actionpack-action_caching.gemspec +++ b/actionpack-action_caching.gemspec @@ -13,6 +13,7 @@ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) } gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) gem.require_paths = ['lib'] + gem.license = 'MIT' gem.add_dependency 'actionpack', '>= 4.0.0', '< 5.0'
Add license information to gemspec.
diff --git a/core/spec/acceptance/add_channel_spec.rb b/core/spec/acceptance/add_channel_spec.rb index abc1234..def5678 100644 --- a/core/spec/acceptance/add_channel_spec.rb +++ b/core/spec/acceptance/add_channel_spec.rb @@ -8,6 +8,5 @@ visit channel_path(user, channel) page.should have_content(channel.title) - 1.should == 0 end end
Revert "break acceptance spec, this should make a screenshot" This reverts commit c40f2556e42fc8f84dae00983051aec74bc81ae6.
diff --git a/core/spec/models/comable/address_spec.rb b/core/spec/models/comable/address_spec.rb index abc1234..def5678 100644 --- a/core/spec/models/comable/address_spec.rb +++ b/core/spec/models/comable/address_spec.rb @@ -13,4 +13,15 @@ it { is_expected.to validate_length_of(:city).is_at_most(255) } it { is_expected.to validate_length_of(:detail).is_at_most(255) } it { is_expected.to validate_length_of(:phone_number).is_at_most(255) } + + describe 'ransacker' do + describe ':full_name' do + it 'returns all required addresses' do + family_name = 'foo' + first_name = 'bar' + address = create(:address, family_name: family_name, first_name: first_name) + expect(subject.class.ransack(full_name: address.full_name).result).to eq([address]) + end + end + end end
Add test code for `ransacker :full_name`
diff --git a/db/fixtures/development/07_milestones.rb b/db/fixtures/development/07_milestones.rb index abc1234..def5678 100644 --- a/db/fixtures/development/07_milestones.rb +++ b/db/fixtures/development/07_milestones.rb @@ -1,5 +1,3 @@-ActiveRecord::Base.observers.disable(:milestone_observer) - Milestone.seed(:id, [ { id: 1, project_id: 1, title: 'v' + Faker::Address.zip_code }, { id: 2, project_id: 1, title: 'v' + Faker::Address.zip_code }, @@ -18,5 +16,3 @@ ml.set_iid ml.save end - -ActiveRecord::Base.observers.enable(:milestone_observer)
Remove milestone observer from db fixture.
diff --git a/core/file/socket_spec.rb b/core/file/socket_spec.rb index abc1234..def5678 100644 --- a/core/file/socket_spec.rb +++ b/core/file/socket_spec.rb @@ -19,15 +19,20 @@ rm_r filename end +end + +describe "File.socket?" do + before :each do + @name = tmp("i_am_a_socket") + @server = UNIXServer.new @name + end + + after :each do + @server.close + rm_r @name + end it "returns true if the file is a socket" do - filename = tmp("i_am_a_socket") - server = UNIXServer.new filename - begin - File.socket?(filename).should == true - ensure - server.close - rm_r filename - end + File.socket?(@name).should == true end end
Add proper before/after blocks for a File.socket? spec
diff --git a/spec/features/nodes_spec.rb b/spec/features/nodes_spec.rb index abc1234..def5678 100644 --- a/spec/features/nodes_spec.rb +++ b/spec/features/nodes_spec.rb @@ -0,0 +1,56 @@+require 'rails_helper' + +describe "Nodes Feature" do + + describe 'Find, update and create nodes via API' do + + before do + # Given a provider "stiftung" exists with name: "Stiftung Gesundheit" + provider = FactoryGirl.create(:provider, name: "Stiftung Gesundheit") + # And 1 valid pois exist + poi = FactoryGirl.create(:poi) + # And the following provided_pois exist + FactoryGirl.create(:provided_poi, wheelchair: "yes", url: "http://www.arzt-auskunft.de", poi: poi, provider: provider ) + # When I am on the last poi's page + visit(node_path(poi)) + end + + # Scenario: I want to see a decent title on the poi detail page + it "has a decent title on the poi detail page" do + # Then I should see "Dieser Ort ist auf Wheelmap.org: name, Bar, Essen & Trinken, Berlin" within "title" + expect(page.title).to eq("Dieser Ort ist auf Wheelmap.org: name, Bar, Essen & Trinken, Berlin") + end + + # Scenario: I want to see a link to a landing page on the poi detail page + it "has a link to a landing page on the poi detail page" do + # Then I should see "Alle Orte vom Typ" + expect(page).to have_link('Alle Orte vom Typ', href: "/map/berlin/bar/wheelchair/yes") + end + + # Scenario: I want to see a back link to the root page + it "has a back link to the root page" do + save_page + # When I follow "zurück" + click_link('zurück') + # Then I should be on the home page + expect(current_path).to eq(root_path) + end + + # Scenario: I want to see a link to provider's detail page + # Then I should see "Stiftung Gesundheit" + it "shows 'Stiftung Gesundheit' on provider's detail page" do + expect(page).to have_content("Stiftung Gesundheit") + end + + # And I should see "Voll Rollstuhlgerecht" + it "shows 'voll rollstuhlgerecht' on 'Stiftung Gesundheit' detail page" do + expect(page).to have_content("Voll Rollstuhlgerecht") + end + + # Scenario: I want to see a wheelchair description + it "has a wheelchair description" do + # Then I should see "Yes, we have a ramp." + expect(page).to have_content("Yes, we have a ramp.") + end + end +end
Convert cucumber nodes-feature to rspec-feature
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index abc1234..def5678 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -32,11 +32,11 @@ icon = "" case vote when 'yes' - icon = "thumbs-o-up" + icon = "check" when 'no' - icon = "hand-stop-o" + icon = "times" when 'block' - icon = "thumbs-o-down" + icon = "ban" when 'participating' icon = "comments-o" end
Change to new icons again accidentally regressed in merge
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index abc1234..def5678 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,10 +1,10 @@ module ApplicationHelper def set_title(title) - content_for :title, title + content_for :title, strip_tags(title) end def page_heading(tag, heading) set_title heading - content_tag tag, heading + content_tag tag, heading.html_safe end end
Handle html tags in page_heading helper.
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index abc1234..def5678 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -6,7 +6,8 @@ end def width_override(width) - width.nil? ? nil : "width: #{width}px !important;" + width = 695 if width.empty? + "width: #{width}px !important;" end def full_title(page_title = '')
Fix table.content width rendering bug in application helper
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index abc1234..def5678 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,5 +1,5 @@ module ApplicationHelper def is_ramsar_instance? - Rails.root.to_s.include?('API') + Rails.root.to_s.include?('ramsar') end end
Make sure methods checks for ramsar instance
diff --git a/spec/models/ability_spec.rb b/spec/models/ability_spec.rb index abc1234..def5678 100644 --- a/spec/models/ability_spec.rb +++ b/spec/models/ability_spec.rb @@ -7,4 +7,4 @@ roles.should == ['admin', 'accountant'] roles_collection.should == [['Administrator', 'admin'], ['Buchhalter', 'accountant']] end -end+end
Add EOL to ability spec.
diff --git a/spec/rabbitmq/basic_spec.rb b/spec/rabbitmq/basic_spec.rb index abc1234..def5678 100644 --- a/spec/rabbitmq/basic_spec.rb +++ b/spec/rabbitmq/basic_spec.rb @@ -0,0 +1,31 @@+# +# Copyright (C) 2015 Red Hat, Inc. +# +# Author: Martin Magr <mmagr@redhat.com> +# +# 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. +# +require 'spec_helper' + +describe package('rabbitmq-server') do + it { should be_installed } +end + +describe service('rabbitmq-server') do + it { should be_enabled } + it { should be_running } +end + +describe port(5672) do + it { should be_listening } +end
Add a basic test for RabbitMQ Basic test to see if RabbitMQ is up and running.
diff --git a/rb/spec/integration/selenium/webdriver/opera/driver_spec.rb b/rb/spec/integration/selenium/webdriver/opera/driver_spec.rb index abc1234..def5678 100644 --- a/rb/spec/integration/selenium/webdriver/opera/driver_spec.rb +++ b/rb/spec/integration/selenium/webdriver/opera/driver_spec.rb @@ -3,6 +3,9 @@ module Opera describe Driver do + + before(:all) { GlobalTestEnv.quit_driver rescue nil } + it 'raises ArgumentError if sent an unknown capability as an argument' do lambda { Selenium::WebDriver.for :opera, :foo => 'bar'
AndreasTolfTolfsen: Make sure remote server is shut down before running specs on Selenium::WebDriver::Opera git-svn-id: aa1aa1384423cb28c2b1e29129bb3a91de1d9196@13920 07704840-8298-11de-bf8c-fd130f914ac9
diff --git a/encrypted_params.gemspec b/encrypted_params.gemspec index abc1234..def5678 100644 --- a/encrypted_params.gemspec +++ b/encrypted_params.gemspec @@ -10,7 +10,7 @@ spec.email = ["support@cloversites.com"] spec.summary = "Provides a simple method to send and receive encrypted data." spec.description = "" - spec.homepage = "" + spec.homepage = "https://github.com/cloversites/encrypted_params" spec.license = "MIT" spec.files = `git ls-files -z`.split("\x0") @@ -21,5 +21,5 @@ spec.add_development_dependency "bundler", "~> 1.7" spec.add_development_dependency "rake", "~> 10.0" - sepc.add_dependency "symmetric-encryption", "~> 3.6" + sepc.add_runtime_dependency "symmetric-encryption", "~> 3.6" end
Add homepage and fix dependecy call
diff --git a/db/migrate/20160713130940_remove_type_template_and_vms_filters_from_miq_search.rb b/db/migrate/20160713130940_remove_type_template_and_vms_filters_from_miq_search.rb index abc1234..def5678 100644 --- a/db/migrate/20160713130940_remove_type_template_and_vms_filters_from_miq_search.rb +++ b/db/migrate/20160713130940_remove_type_template_and_vms_filters_from_miq_search.rb @@ -0,0 +1,33 @@+class RemoveTypeTemplateAndVmsFiltersFromMiqSearch < ActiveRecord::Migration[5.0] + class MiqSearch < ActiveRecord::Base + serialize :filter + end + + TEMPLATE_FITLER_EXPR = MiqExpression.new("=" => {"field" => "VmInfra-template", "value" => "true"}) + TEMPLATE_TYPE_FILTER = {:name => "default_Type / Template", :description => "Type / Template", + :filter => TEMPLATE_FITLER_EXPR, :search_type => "default", + :db => "ManageIQ::Providers::InfraManager::Vm"}.freeze + + VMS_FITLER_EXPR = MiqExpression.new("not" => {"ENDS WITH" => {"field" => "VmInfra-location", "value" => ".vmtx"}}) + VMS_TYPE_FILTER = {:name => "default_Type / VM", :description => "Type / VM", :filter => VMS_FITLER_EXPR, + :search_type => "default", :db => "ManageIQ::Providers::InfraManager::Vm"}.freeze + + def up + say_with_time('Remove Type / Template and Type / VM from VMs filters') do + template_filter = TEMPLATE_TYPE_FILTER.dup + template_filter.except!(:filter, :search_type) + MiqSearch.where(template_filter).delete_all + + vms_filter = VMS_TYPE_FILTER.dup + vms_filter.except!(:filter, :search_type) + MiqSearch.where(vms_filter).delete_all + end + end + + def down + say_with_time('Add Type / Template and Type / VM to VMs filters') do + MiqSearch.create!(TEMPLATE_TYPE_FILTER) + MiqSearch.create!(VMS_TYPE_FILTER) + end + end +end
Create migration for removing Type / Template/VMs filters https://bugzilla.redhat.com/show_bug.cgi?id=1351210 Migration for removing Type / Template/VMs filters from MiqSearch to fix the bug because the filters were useless in VMS filters.
diff --git a/kernel/common/loadedfeatures.rb b/kernel/common/loadedfeatures.rb index abc1234..def5678 100644 --- a/kernel/common/loadedfeatures.rb +++ b/kernel/common/loadedfeatures.rb @@ -67,6 +67,14 @@ self end + def pop(*v) + Rubinius.synchronize(self) do + ret = super + identity_map + ret + end + end + def replace(other) Rubinius.synchronize(self) do super
Handle pop for loaded_features properly
diff --git a/frontend/test/controllers/artist_controller_test.rb b/frontend/test/controllers/artist_controller_test.rb index abc1234..def5678 100644 --- a/frontend/test/controllers/artist_controller_test.rb +++ b/frontend/test/controllers/artist_controller_test.rb @@ -4,8 +4,8 @@ test "list of artists" do get "index" assert_response 200 - assert_select %Q[a:contains("Steve Argyle")] - assert_select %Q[li:contains("Steve Argyle\n(99 cards)")] + assert_select %Q[a:contains("Yang Hong")] + assert_select %Q[li:contains("Yang Hong\n(8 cards)")] assert_equal "Artists - mtg.wtf", html_document.title end
Use less frequently updated artist
diff --git a/features/steps/eventbrite_steps.rb b/features/steps/eventbrite_steps.rb index abc1234..def5678 100644 --- a/features/steps/eventbrite_steps.rb +++ b/features/steps/eventbrite_steps.rb @@ -11,4 +11,12 @@ # Poll eventbrite API for details # Find the relevant user and check the order type field pending # express the regexp above with the code you wish you had -end+end + +Given /^I have asked to be invoiced$/ do + pending # express the regexp above with the code you wish you had +end + +Then /^an invoice should be raised in Xero$/ do + pending # express the regexp above with the code you wish you had +end
Add missing steps as pending 0:05
diff --git a/init.rb b/init.rb index abc1234..def5678 100644 --- a/init.rb +++ b/init.rb @@ -1,7 +1,7 @@ require_relative './lib/scraper.rb' require_relative './lib/parser.rb' -# years = (2002..2014) +years = (2005..2014) # years.each_with_index do |yr, i| # rush = Scraper.new('rushing', yr) # pass = Scraper.new('passing', yr) @@ -17,13 +17,18 @@ # end -# rush = Scraper.new('rushing', '2014') -# puts rush.array_of_count -par = Parser.new -par.open_pages -par.row_length -par.write_to_csv -blah = Parser.new('receiving') -blah.open_pages -blah.row_length -blah.write_to_csv +years.each_with_index do |yr, i| + rush = Parser.new('rushing', yr) + pass = Parser.new('passing', yr) + rec = Parser.new('receiving', yr) +## Run methods once each instance has been instantiated + rush.open_pages + rush.row_length + rush.write_to_csv + pass.open_pages + pass.row_length + pass.write_to_csv + rec.open_pages + rec.row_length + rec.write_to_csv +end
Add code to run the Parser
diff --git a/lib/collect_user_photos.rb b/lib/collect_user_photos.rb index abc1234..def5678 100644 --- a/lib/collect_user_photos.rb +++ b/lib/collect_user_photos.rb @@ -17,12 +17,12 @@ current_photo_location = "#{Rails.root}/public/uploads/images/#{photo.image_filename}" new_photo_location = "#{album_dir}/#{photo.image_filename}" - `cp #{current_photo_location} #{new_photo_location}` + FileUtils::cp current_photo_location new_photo_location end end - `tar cf #{user.id}.tar #{user.id}` - `rm -r #{user.id}` + system("tar", "cf #{user.id}.tar #{user.id}") + FileUtils::rm_r user.id, :secure => true, :force => true "#{Rails.root}/#{temp_dir}.tar" end
Use FileUtils for all file operations. Also uses Kernel.system to execute shell commands in a secure fashion.
diff --git a/config/initializers/ar_speed_up_migration_checking.rb b/config/initializers/ar_speed_up_migration_checking.rb index abc1234..def5678 100644 --- a/config/initializers/ar_speed_up_migration_checking.rb +++ b/config/initializers/ar_speed_up_migration_checking.rb @@ -10,7 +10,7 @@ # it reads + parses `db/migrate/*` each time. Memoizing it can save 0.5 # seconds per spec. def migrations(paths) - @migrations ||= migrations_unmemoized(paths) + (@migrations ||= migrations_unmemoized(paths)).dup end end end
Make `ActiveRecord::Migrator` idempotent again in test env
diff --git a/lib/diversity_dashboard.rb b/lib/diversity_dashboard.rb index abc1234..def5678 100644 --- a/lib/diversity_dashboard.rb +++ b/lib/diversity_dashboard.rb @@ -5,7 +5,7 @@ (load_metric 'diversity-gender')['value']['total'].each_pair do |gender, value| data << {label: gender, value: value} end - data + data.sort_by { |d| d[:label] } end def self.gender_board @@ -37,7 +37,7 @@ (load_metric 'diversity-gender')['value']['teams'][name].each_pair do |gender, value| data << {label: gender, value: value} end - data + data.sort_by { |d| d[:label] } end end
Sort legend on diversity pies alphabetically
diff --git a/lib/spinoza/calvin/node.rb b/lib/spinoza/calvin/node.rb index abc1234..def5678 100644 --- a/lib/spinoza/calvin/node.rb +++ b/lib/spinoza/calvin/node.rb @@ -14,6 +14,13 @@ @meta_log = meta_log @sequencer = sequencer || Calvin::Sequencer.new(node: self) @scheduler = scheduler || Calvin::Scheduler.new(node: self) + + on_transaction_finish &method(:default_output) + end + + def default_output transaction, result + r = result.map {|rr| [rr.op.table, rr.val].join(":")}.join(", ") + puts "%07.6f [RESULT] #{transaction} => #{r}" % timeline.now end def recv **opts @@ -24,8 +31,14 @@ log.read batch_id, node: self end + def on_transaction_finish &b + @finished_transaction_handler = b + end + + # Override this to put the result somewhere. def finished_transaction transaction, result - ### pass result back to client - puts "[RESULT] #{transaction} => #{result}" + if @finished_transaction_handler + @finished_transaction_handler[transaction, result] + end end end
Allow client-specified handling of results.
diff --git a/loadable_component.gemspec b/loadable_component.gemspec index abc1234..def5678 100644 --- a/loadable_component.gemspec +++ b/loadable_component.gemspec @@ -19,6 +19,6 @@ s.require_paths = ["lib"] # specify any dependencies here; for example: - # s.add_development_dependency "rspec" + s.add_development_dependency "rake" # s.add_runtime_dependency "rest-client" end
Add rake as dev dependency.
diff --git a/app/models/georgia/concerns/contentable.rb b/app/models/georgia/concerns/contentable.rb index abc1234..def5678 100644 --- a/app/models/georgia/concerns/contentable.rb +++ b/app/models/georgia/concerns/contentable.rb @@ -14,11 +14,9 @@ @content ||= contents.select{|c| c.locale == I18n.locale.to_s}.first || Georgia::Content.new end - delegate :title, :text, :excerpt, :keywords, :keyword_list, :image, to: :content + delegate :title, :text, :excerpt, :keywords, :keyword_list, :image, :locale, to: :content end - module ClassMethods - end end end end
Add locale to the delegated method list
diff --git a/nanoc-core/spec/meta_spec.rb b/nanoc-core/spec/meta_spec.rb index abc1234..def5678 100644 --- a/nanoc-core/spec/meta_spec.rb +++ b/nanoc-core/spec/meta_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true describe 'meta', chdir: false do - example do + it 'is covered by specs' do regular_files = Dir['lib/nanoc/core/**/*.rb'] regular_file_base_names = regular_files.map { |fn| fn.gsub(/^lib\/nanoc\/core\/|\.rb$/, '') } @@ -29,4 +29,14 @@ expect(regular_file_base_names - ignored).to match_array(spec_file_base_names) end + + it 'doesn’t log anything' do + # TODO: don’t have any exceptions + regular_files = Dir['lib/nanoc/core/**/*.rb'] - ['lib/nanoc/core/data_source.rb'] + + expect(regular_files).to all(satisfy do |fn| + content = File.read(fn) + !content.match?(/\b(puts|warn)\b/) && !content.match?(/\$std(err|out)/) + end) + end end
Add test to ensure Core does not log
diff --git a/script/imported_filesize_reporter.rb b/script/imported_filesize_reporter.rb index abc1234..def5678 100644 --- a/script/imported_filesize_reporter.rb +++ b/script/imported_filesize_reporter.rb @@ -3,8 +3,14 @@ include ActionView::Helpers::NumberHelper -total_attachment_size = AttachmentData.sum(:file_size) -per_attachment = total_attachment_size / AttachmentData.count - -puts "Total uploaded attachments: #{number_to_human_size(total_attachment_size)}" -puts "Size per attachment: #{number_to_human_size(per_attachment)}" +query = ActiveRecord::Base.connection.execute(%Q{ +SELECT e.type, SUM(ad.file_size) FROM attachment_data ad + LEFT JOIN attachments a ON a.attachment_data_id = ad.id + LEFT JOIN edition_attachments ea ON ea.attachment_id = a.id + LEFT JOIN editions e ON e.id = ea.edition_id +GROUP BY e.type; + }) +query.each do |row| + next if row.first.nil? + puts "#{row.first} -> #{number_to_human_size(row[1].to_f)}" +end
Speed up counting by using a JOIN Note this will double count disk usage as it doesn't take into account the fact that attachments are re-attached to each subsequent edition.
diff --git a/app/views/products/who_bought.atom.builder b/app/views/products/who_bought.atom.builder index abc1234..def5678 100644 --- a/app/views/products/who_bought.atom.builder +++ b/app/views/products/who_bought.atom.builder @@ -0,0 +1,43 @@+atom_feed do |feed| + feed.title "Who bought #{@product.title}" + + feed.updated @latest_order.try(:updated_at) + + @product.orders.each do |order| + feed.entry(order) do |entry| + entry.title "Order #{order.id}" + entry.summary type: 'xhtml' do |xhtml| + xhtml.p "Shipped to #{order.address}" + + xhtml.table do + xhtml.tr do + xhtml.th 'Product' + xhtml.th 'Quantity' + xhtml.th 'Total Price' + end + + order.line_items.each do |item| + xhtml.tr do + xhtml.td item.product.title + xhtml.td item.quantity + xhtml.td number_to_currency item.total_price + end + end + + xhtml.tr do + xhtml.th 'total', colspan: 2 + xhtml.th number_to_currency \ + order.line_items.map(&:total_price).sum + end + end + + xhtml.p "Paid by #{order.pay_type}" + end + + entry.author do |author| + author.name order.name + author.email order.email + end + end + end +end
Define an Atom view (using the Atom builder)
diff --git a/lib/discordrb/events/generic.rb b/lib/discordrb/events/generic.rb index abc1234..def5678 100644 --- a/lib/discordrb/events/generic.rb +++ b/lib/discordrb/events/generic.rb @@ -1,6 +1,15 @@ require 'discordrb/events/utility' +def not(object) + Negated.new(object) +end + module Discordrb::Events + class Negated + attr_reader :object + def initialize(object); @object = object; end + end + class EventHandler include Discordrb::Events::Utility def initialize(attributes, block)
Add a class to represent negated objects for events
diff --git a/lib/gutentag/tag_validations.rb b/lib/gutentag/tag_validations.rb index abc1234..def5678 100644 --- a/lib/gutentag/tag_validations.rb +++ b/lib/gutentag/tag_validations.rb @@ -37,6 +37,11 @@ def add_length_validation? klass.table_exists? && limit.present? rescue *DATABASE_ERROR_CLASSES + warn <<-MESSAGE +The database is not currently available, and so Gutentag was not able to set up +tag validations completely (in particular: adding a length limit to match +database constraints). + MESSAGE false end
Add warning for missing validation if database isn't present.
diff --git a/lib/halfday/nginx/capistrano.rb b/lib/halfday/nginx/capistrano.rb index abc1234..def5678 100644 --- a/lib/halfday/nginx/capistrano.rb +++ b/lib/halfday/nginx/capistrano.rb @@ -10,7 +10,6 @@ conf = File.open(File.expand_path('../templates/app.conf', __FILE__)).read run "echo \"#{conf}\" > /etc/nginx/apps.conf.d/#{application}.conf" - run "cd #{conf_path} && ln -fsn *.conf /etc/nginx/apps.conf.d/" run "sudo service nginx reload" end end
Remove old command to run for nginx
diff --git a/lib/mailsocio_rails/delivery.rb b/lib/mailsocio_rails/delivery.rb index abc1234..def5678 100644 --- a/lib/mailsocio_rails/delivery.rb +++ b/lib/mailsocio_rails/delivery.rb @@ -8,6 +8,8 @@ def deliver!(mail) addrs = addresses mail mail.to = settings[:mailsocio_recipient] + mail.cc = nil + mail.bcc = nil mail['X-To'] = Hash[addrs.map {|(addr, name)| [addr, {'name' => name}]}].to_json mail['X-Account-Id'] = settings[:account_id] @@ -28,7 +30,7 @@ end def addresses(mail) - addresses_from(mail, :to) + addresses_from(mail, :cc) + addresses_from(mail, :to) + addresses_from(mail, :cc) + addresses_from(mail, :bcc) end def addresses_from(mail, method)
Remove cc and bcc. Use bcc.
diff --git a/spec/lib/regexp_preview/multi_line_spec.rb b/spec/lib/regexp_preview/multi_line_spec.rb index abc1234..def5678 100644 --- a/spec/lib/regexp_preview/multi_line_spec.rb +++ b/spec/lib/regexp_preview/multi_line_spec.rb @@ -5,16 +5,16 @@ subject { RegexpPreview::MultiLine.new(File.expand_path("./spec/support/fixtures/error0.log", Rails.root), "multiline", params).matches_json } let :params do - tmp = { + params = { format_firstline: ".+", time_format: "time_format", } - tmp["format1"] = "(?<foo>foo)" - tmp["format2"] = "(?<bar>bar)" + params["format1"] = "(?<foo>foo)" + params["format2"] = "(?<bar>bar)" 3.upto(Fluentd::Setting::InTail::MULTI_LINE_MAX_FORMAT_COUNT) do |i| - tmp["format#{i}"] = "" + params["format#{i}"] = "" end - { params: tmp } + { params: params } end it 'should not have regexp and time_format in [:params][:setting]' do
Use more meaningful variable name tmp -> params
diff --git a/lib/multi_json/adapters/gson.rb b/lib/multi_json/adapters/gson.rb index abc1234..def5678 100644 --- a/lib/multi_json/adapters/gson.rb +++ b/lib/multi_json/adapters/gson.rb @@ -8,6 +8,7 @@ ParseError = ::Gson::DecodeError def load(string, options={}) + string = string.read if StringIO === string ::Gson::Decoder.new(options).decode(string) end
Make Gson adapter explicitly read StringIO object
diff --git a/lib/rspec-rayo/tropo1/driver.rb b/lib/rspec-rayo/tropo1/driver.rb index abc1234..def5678 100644 --- a/lib/rspec-rayo/tropo1/driver.rb +++ b/lib/rspec-rayo/tropo1/driver.rb @@ -1,5 +1,6 @@ module RSpecRayo class Tropo1Driver + require 'drb' require 'net/http' require 'uri' require 'countdownlatch' @@ -8,10 +9,18 @@ def initialize(uri = nil, latch_timeout = 5) @uri = uri || "druby://0.0.0.0:8787" - @drb = DRb.start_service @uri, self @latch_timeout = latch_timeout @config = {} + start_drb reset! + end + + def start_drb + @drb = DRb.start_service @uri, self + end + + def stop_drb + @drb.stop_service end def reset!
Allow a third party to stop and start Tropo1's DRb service
diff --git a/rack-dev-mark.gemspec b/rack-dev-mark.gemspec index abc1234..def5678 100644 --- a/rack-dev-mark.gemspec +++ b/rack-dev-mark.gemspec @@ -16,7 +16,7 @@ gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } gem.require_paths = ['lib'] - gem.required_ruby_version = ['>= 2.2', '< 2.7'] + gem.required_ruby_version = ['>= 2.2'] gem.add_dependency "rack", ['>= 1.1', '< 2.1']
Remove upper limit for ruby It's not very useful but a hassle to update yearly.
diff --git a/lib/waves/utilities/customer.rb b/lib/waves/utilities/customer.rb index abc1234..def5678 100644 --- a/lib/waves/utilities/customer.rb +++ b/lib/waves/utilities/customer.rb @@ -21,7 +21,9 @@ :registration_number, :managing_owner, :correspondent, - :shares_held + :shares_held, + :entity_type, + :eligibility_status ) def initialize(params = {})
Add attributes to the Customer class
diff --git a/features/step_definitions/login_steps.rb b/features/step_definitions/login_steps.rb index abc1234..def5678 100644 --- a/features/step_definitions/login_steps.rb +++ b/features/step_definitions/login_steps.rb @@ -1,9 +1,10 @@ Given(/^I am logged in$/) do - ENV['PDS_HANDLE'] = 'PDS_HANDLE' + OmniAuth.config.mock_auth[:nyulibraries] = omniauth_hash + visit '/users/auth/nyulibraries' end Given(/^I am not logged in$/) do - ENV['PDS_HANDLE'] = nil + OmniAuth.config.mock_auth[:nyulibraries] = nil end Then(/^I should see a login link$/) do @@ -27,8 +28,5 @@ end Then(/^I should see the login page in the current window$/) do - pending - # Poltergiest can't always redirect to external HTTPS page - # Will change with OAuth2 - # expect(page).to have_text 'Login with an NYU NetID' + expect(page).to have_text 'Select your affiliation' end
Update the login step definitions for out new way to fake a login
diff --git a/Library/Formula/gist.rb b/Library/Formula/gist.rb index abc1234..def5678 100644 --- a/Library/Formula/gist.rb +++ b/Library/Formula/gist.rb @@ -3,7 +3,7 @@ class Gist < Formula url 'https://github.com/defunkt/gist/tarball/v2.0.3' homepage 'https://github.com/defunkt/gist' - md5 '5b9bfa8255e5f488b78a9d37a317b12a' + md5 '0b99159635df2083651d2ff9db8abb25' def install system "rake", "install", "prefix=#{prefix}"
Fix MD5 sum for Gist Signed-off-by: Adam Vandenberg <34c2b6407fd5a10249a15d699d40f9ed1782e98c@gmail.com>
diff --git a/db/migrate/20111216163449_add_deleted_tweets_table.rb b/db/migrate/20111216163449_add_deleted_tweets_table.rb index abc1234..def5678 100644 --- a/db/migrate/20111216163449_add_deleted_tweets_table.rb +++ b/db/migrate/20111216163449_add_deleted_tweets_table.rb @@ -0,0 +1,10 @@+class AddDeletedTweetsTable < ActiveRecord::Migration + def self.up + execute "CREATE TABLE `deleted_tweets` LIKE `tweets`" + execute "INSERT INTO `deleted_tweets` SELECT * FROM `tweets` WHERE `deleted` = 1 AND content IS NOT NULL" + end + + def self.down + drop_table :deleted_tweets + end +end
Add migration for deleted tweets table.
diff --git a/db/migrate/20120307143553_create_ontology_versions.rb b/db/migrate/20120307143553_create_ontology_versions.rb index abc1234..def5678 100644 --- a/db/migrate/20120307143553_create_ontology_versions.rb +++ b/db/migrate/20120307143553_create_ontology_versions.rb @@ -4,6 +4,7 @@ t.references :user, :null => false t.references :ontology, :null => false t.references :previous_version + t.references :logic t.string :source_url t.string :raw_file t.string :xml_file
Add reference to logic to ontology version
diff --git a/db/migrate/20181106135939_add_index_to_deployments.rb b/db/migrate/20181106135939_add_index_to_deployments.rb index abc1234..def5678 100644 --- a/db/migrate/20181106135939_add_index_to_deployments.rb +++ b/db/migrate/20181106135939_add_index_to_deployments.rb @@ -8,8 +8,6 @@ disable_ddl_transaction! def up - remove_concurrent_index :deployments, [:project_id, :status] - remove_concurrent_index :deployments, [:environment_id, :status] add_concurrent_index :deployments, [:project_id, :status, :id] add_concurrent_index :deployments, [:project_id, :status, :iid] add_concurrent_index :deployments, [:environment_id, :status, :id] @@ -18,8 +16,6 @@ end def down - add_concurrent_index :deployments, [:project_id, :status] - add_concurrent_index :deployments, [:environment_id, :status] remove_concurrent_index :deployments, [:project_id, :status, :id] remove_concurrent_index :deployments, [:project_id, :status, :iid] remove_concurrent_index :deployments, [:environment_id, :status, :id]
Revert add action follow up 2
diff --git a/app/controllers/spree/admin/product_imports_controller.rb b/app/controllers/spree/admin/product_imports_controller.rb index abc1234..def5678 100644 --- a/app/controllers/spree/admin/product_imports_controller.rb +++ b/app/controllers/spree/admin/product_imports_controller.rb @@ -1,10 +1,6 @@ module Spree module Admin class ProductImportsController < BaseController - - #Sorry for not using resource_controller railsdog - I wanted to, but then... I did it this way. - #Verbosity is nice? - #Feel free to refactor and submit a pull request. def index @product_import = Spree::ProductImport.new @@ -17,7 +13,7 @@ def create @product_import = Spree::ProductImport.create(params[:product_import]) - Delayed::Job.enqueue ImportProducts::ImportJob.new(@product_import, @current_user) + Delayed::Job.enqueue ImportProducts::ImportJob.new(@product_import, current_user) flash[:notice] = t('product_import_processing') redirect_to admin_product_imports_path end
Remove extra comments, and use current_user instead of @current_user
diff --git a/base/lib/flow/actions/if_match.rb b/base/lib/flow/actions/if_match.rb index abc1234..def5678 100644 --- a/base/lib/flow/actions/if_match.rb +++ b/base/lib/flow/actions/if_match.rb @@ -1,4 +1,6 @@ class Flow::Action::IfMatch < Flow::Action + attr_reader :block_children + def setup_with_flow!(field, value=Flow::DEFAULT_ARGUMENT, &block) @field = field @value = value
Add access to block_children of if/unless_match