diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/vagrant-proxyconf.gemspec b/vagrant-proxyconf.gemspec index abc1234..def5678 100644 --- a/vagrant-proxyconf.gemspec +++ b/vagrant-proxyconf.gemspec @@ -10,7 +10,7 @@ spec.email = ["teemu.matilainen@iki.fi"] spec.description = "A Vagrant Plugin that configures the virtual machine to use proxies" spec.summary = spec.description - spec.homepage = "https://github.com/tmatilai/vagrant-proxyconf" + spec.homepage = "http://tmatilai.github.io/vagrant-proxyconf/" spec.license = "MIT" spec.files = `git ls-files`.split($/)
Update home page link to gemspec
diff --git a/app/services/benchmark_pool.rb b/app/services/benchmark_pool.rb index abc1234..def5678 100644 --- a/app/services/benchmark_pool.rb +++ b/app/services/benchmark_pool.rb @@ -3,7 +3,7 @@ case repo_name when 'ruby' RemoteServerJob.perform_later(commit_sha, 'ruby_trunk') - RemoteServerJob.perform_later(commit_sha, 'ruby_trunk_discourse') + # RemoteServerJob.perform_later(commit_sha, 'ruby_trunk_discourse') when 'rails' # ... else
Disable Discourse per commit benchmarks.
diff --git a/test/functional/admin/generic_editions_controller_tests/attachments_workflow_test.rb b/test/functional/admin/generic_editions_controller_tests/attachments_workflow_test.rb index abc1234..def5678 100644 --- a/test/functional/admin/generic_editions_controller_tests/attachments_workflow_test.rb +++ b/test/functional/admin/generic_editions_controller_tests/attachments_workflow_test.rb @@ -39,4 +39,8 @@ attachment = edition.attachments.first assert_select 'span.title', attachment.title end + + view_test 'GET :show lists attachments on the edition' do + skip 'TODO' + end end
Add unimplemented test for display of attachments This test replaces some of the tests that we've just removed...
diff --git a/db/migrate/20141208152336_update_eastern_area.rb b/db/migrate/20141208152336_update_eastern_area.rb index abc1234..def5678 100644 --- a/db/migrate/20141208152336_update_eastern_area.rb +++ b/db/migrate/20141208152336_update_eastern_area.rb @@ -0,0 +1,22 @@+class UpdateEasternArea < Mongoid::Migration + def self.up + updated = [] + BusinessSupportEdition.where(:state.ne => "archived", :areas.in => ["east-of-england"]).each do |edition| + unless edition.artefact.state == "archived" + edition.areas[edition.areas.index("east-of-england")] = "eastern" + updated << edition.slug if edition.save!(validate: false) + end + end + puts "Updated #{updated.size} editions:" + puts updated.join(", ") + end + + def self.down + BusinessSupportEdition.where(:state.ne => "archived", :areas.in => ["eastern"]).each do |edition| + unless edition.artefact.state == "archived" + edition.areas[edition.areas.index("eastern")] = "east-of-england" + edition.save!(validate: false) + end + end + end +end
Update bsf area east-of-england to eastern
diff --git a/app/controllers/achievements_controller.rb b/app/controllers/achievements_controller.rb index abc1234..def5678 100644 --- a/app/controllers/achievements_controller.rb +++ b/app/controllers/achievements_controller.rb @@ -5,9 +5,6 @@ include ActionView::Helpers::TextHelper def index - # Use created at becuase that's what the table is displaying in the view - @achievements = @game.achievements.order(:updated_at).reverse_order - @title = 'Achievements' - @subtitle = pluralize(@achievements.size, 'achievement') + @achievements = Achievement.all.order(:updated_at).reverse_order end end
Load achievements on achievement index page
diff --git a/app/controllers/api/v1/tasks_controller.rb b/app/controllers/api/v1/tasks_controller.rb index abc1234..def5678 100644 --- a/app/controllers/api/v1/tasks_controller.rb +++ b/app/controllers/api/v1/tasks_controller.rb @@ -1,6 +1,6 @@ class Api::V1::TasksController < ApplicationController before_action :authenticate_user! - before_action :find_task, only: [:show, :update] + before_action :find_task, only: [:show, :update, :destroy] def show respond_with @task @@ -20,6 +20,10 @@ respond_with @task end + def destroy + respond_with @task.destroy + end + private def task_params @@ -29,6 +33,7 @@ :expiration, :completed_on, :position, + tag_list: [] ]) end
Add task list to params and add destroy action
diff --git a/spec/lita/handler_spec.rb b/spec/lita/handler_spec.rb index abc1234..def5678 100644 --- a/spec/lita/handler_spec.rb +++ b/spec/lita/handler_spec.rb @@ -0,0 +1,21 @@+require "spec_helper" + +describe Lita::Handler do + let(:robot) do + robot = double("Robot") + allow(robot).to receive(:name).and_return("Lita") + robot + end + + describe "#command?" do + it "is true when the message is addressed to the Robot" do + subject = described_class.new(robot, "#{robot.name}: hello") + expect(subject).to be_a_command + end + + it "is false when the message is not addressed to the Robot" do + subject = described_class.new(robot, "hello") + expect(subject).not_to be_a_command + end + end +end
Add partial coverage for Handler.
diff --git a/spec/models/label_spec.rb b/spec/models/label_spec.rb index abc1234..def5678 100644 --- a/spec/models/label_spec.rb +++ b/spec/models/label_spec.rb @@ -5,4 +5,27 @@ it { label.should be_valid } it { should belong_to(:project) } + + describe 'Validation' do + it 'should validate color code' do + build(:label, color: 'G-ITLAB').should_not be_valid + build(:label, color: 'AABBCC').should_not be_valid + build(:label, color: '#AABBCCEE').should_not be_valid + build(:label, color: '#GGHHII').should_not be_valid + build(:label, color: '#').should_not be_valid + build(:label, color: '').should_not be_valid + + build(:label, color: '#AABBCC').should be_valid + end + + it 'should validate title' do + build(:label, title: 'G,ITLAB').should_not be_valid + build(:label, title: 'G?ITLAB').should_not be_valid + build(:label, title: 'G&ITLAB').should_not be_valid + build(:label, title: '').should_not be_valid + + build(:label, title: 'GITLAB').should be_valid + build(:label, title: 'gitlab').should be_valid + end + end end
Add spec on labels validation
diff --git a/spec/support/functions.rb b/spec/support/functions.rb index abc1234..def5678 100644 --- a/spec/support/functions.rb +++ b/spec/support/functions.rb @@ -1,4 +1,12 @@+# Problems with temporary files being unlinked. +# Manually controlling garbage collection solves +# this +GC.disable + def generate_rules(sequences,annotations = [],options = Hash.new) + + GC.start + scaffold,sequence = generate_scaffold_files(sequences) rules = Genomer::RulesDSL.new
Fix temporary file unlinking problem: manual GC
diff --git a/app/controllers/static_pages_controller.rb b/app/controllers/static_pages_controller.rb index abc1234..def5678 100644 --- a/app/controllers/static_pages_controller.rb +++ b/app/controllers/static_pages_controller.rb @@ -3,7 +3,7 @@ def home @song = Song.includes(playings: :user).pickup - @lives = Live.includes(:songs).published.order_by_date.limit(5) + @lives = Live.published.order_by_date.limit(5) end def donate; end
Remove unnecessary `includes` in the home
diff --git a/lib/cassanity/retry_strategies/exponential_backoff.rb b/lib/cassanity/retry_strategies/exponential_backoff.rb index abc1234..def5678 100644 --- a/lib/cassanity/retry_strategies/exponential_backoff.rb +++ b/lib/cassanity/retry_strategies/exponential_backoff.rb @@ -6,7 +6,7 @@ ForeverSentinel = :forever # Taken from https://github.com/twitter/kestrel-client's blocking client. - SLEEP_TIMES = [[0] * 1, [0.01] * 2, [0.1] * 2, [0.5] * 2, [1.0] * 1].flatten + SleepTimes = [[0] * 1, [0.01] * 2, [0.1] * 2, [0.5] * 2, [1.0] * 1].flatten # Private: the maxmimum number of times to retry or -1 to try forever. attr_reader :retries @@ -27,12 +27,12 @@ sleep_for_count(attempts) end - # Private: sleep a randomized amount of time from the - # SLEEP_TIMES mostly-exponential distribution. + # Private: sleep a randomized amount of time from the SleepTimes + # mostly-exponential distribution. # # count - the index into the distribution to pull the base sleep time from def sleep_for_count(count) - base = SLEEP_TIMES[count] || SLEEP_TIMES.last + base = SleepTimes[count] || SleepTimes.last time = ((rand * base) + base) / 2 sleep time if time > 0
Change sleep times to be same case as other constants.
diff --git a/app/serializers/task_comment_serializer.rb b/app/serializers/task_comment_serializer.rb index abc1234..def5678 100644 --- a/app/serializers/task_comment_serializer.rb +++ b/app/serializers/task_comment_serializer.rb @@ -1,5 +1,5 @@ class TaskCommentSerializer < ActiveModel::Serializer - attributes :id, :comment, :created_at, :comment_by + attributes :id, :comment, :created_at, :comment_by, :recipient_id, :is_new def comment_by object.user.name
NEW: Add recipient_id and is_new to comment serializer
diff --git a/lib/model_patches.rb b/lib/model_patches.rb index abc1234..def5678 100644 --- a/lib/model_patches.rb +++ b/lib/model_patches.rb @@ -14,4 +14,13 @@ "information" end end + + OutgoingMessage.class_eval do + def default_letter + _("Under the right of access to documents as enshrined in Article 15 on the " + + "Treaty on the Functioning of the EU and Article 42 of the European Charter of " + + "Fundamental Rights, and as developed in Regulation 1049/2001, I am requesting " + + "documents which contain the following information:\n\n") + end + end end
Add intro paragraph to new request template
diff --git a/lib/punchblock/protocol/rayo/event/dtmf.rb b/lib/punchblock/protocol/rayo/event/dtmf.rb index abc1234..def5678 100644 --- a/lib/punchblock/protocol/rayo/event/dtmf.rb +++ b/lib/punchblock/protocol/rayo/event/dtmf.rb @@ -9,6 +9,10 @@ read_attr :signal end + def signal=(other) + write_attr :signal, other + end + def inspect_attributes # :nodoc: [:signal] + super end
Allow setting the signal on a DTMF event
diff --git a/lib/services.rb b/lib/services.rb index abc1234..def5678 100644 --- a/lib/services.rb +++ b/lib/services.rb @@ -4,7 +4,8 @@ def self.publishing_api @publishing_api ||= GdsApi::PublishingApiV2.new( Plek.find('publishing-api'), - bearer_token: ENV['PUBLISHING_API_BEARER_TOKEN'] || 'example' + bearer_token: (ENV['PUBLISHING_API_BEARER_TOKEN'] || 'example'), + timeout: 10, ) end end
Set publishing-api timeout to 10 seconds Publishing API is sometimes a bit slow when handling large linksets like the education taxonomy.
diff --git a/lib/services.rb b/lib/services.rb index abc1234..def5678 100644 --- a/lib/services.rb +++ b/lib/services.rb @@ -2,6 +2,9 @@ module Services def self.publishing_api - @publishing_api ||= GdsApi::PublishingApiV2.new(Plek.new.find('publishing-api')) + @publishing_api ||= GdsApi::PublishingApiV2.new( + Plek.new.find('publishing-api'), + bearer_token: ENV['PUBLISHING_API_BEARER_TOKEN'] || 'example' + ) end end
Add bearer_token for publishing API authentication
diff --git a/app/workers/send_contact_message_worker.rb b/app/workers/send_contact_message_worker.rb index abc1234..def5678 100644 --- a/app/workers/send_contact_message_worker.rb +++ b/app/workers/send_contact_message_worker.rb @@ -2,6 +2,6 @@ include Sidekiq::Worker def perform(contact_params) - ContactMailer.send_contact_message(contact_params[:name], contact_params[:email], contact_params[:message]).deliver_now! + ContactMailer.send_contact_message(contact_params["name"], contact_params["email"], contact_params["message"]).deliver_now! end end
Fix parameters when running Sidekiq job
diff --git a/lib/convergence/config.rb b/lib/convergence/config.rb index abc1234..def5678 100644 --- a/lib/convergence/config.rb +++ b/lib/convergence/config.rb @@ -15,7 +15,7 @@ end def self.load(yaml_path) - setting = YAML.load(ERB.new(File.read(yaml_path)).result) + setting = YAML.safe_load(ERB.new(File.read(yaml_path)).result, [], [], true) new(setting) end end
Modify to use `YAML.safe_load` instead of `YAML.load`
diff --git a/lib/poke/controls.rb b/lib/poke/controls.rb index abc1234..def5678 100644 --- a/lib/poke/controls.rb +++ b/lib/poke/controls.rb @@ -1,6 +1,11 @@ class Controls PARAMS_REQUIRED = [:window] + + BUTTONS = { up: Gosu::KbUp, + down: Gosu::KbDown, + left: Gosu::KbLeft, + right: Gosu::KbRight } def initialize(params) Params.check_params(params, PARAMS_REQUIRED)
Add BUTTONS constant hash to Controls
diff --git a/lib/extensions/ar_base.rb b/lib/extensions/ar_base.rb index abc1234..def5678 100644 --- a/lib/extensions/ar_base.rb +++ b/lib/extensions/ar_base.rb @@ -29,7 +29,7 @@ def self.connectable? connection && connected? - rescue ActiveRecord::NoDatabaseError, PG::ConnectionBad + rescue ActiveRecord::ConnectionNotEstablished, ActiveRecord::NoDatabaseError, PG::ConnectionBad false end end
Fix connectable? due to a new error type in Rails 6.1
diff --git a/lib/goodbye_translated.rb b/lib/goodbye_translated.rb index abc1234..def5678 100644 --- a/lib/goodbye_translated.rb +++ b/lib/goodbye_translated.rb @@ -13,4 +13,55 @@ return "Goodbye, #{people}!" end end + + def self.say_goodbye_in(language) + translator = Translator.new(language) + return translator.say_goodbye + end + + def self.say_goodbye_to_in(people, language) + translator = Translator.new(language) + return translator.say_goodbye_to(people) + end + + def self.say_goodbye_in_to(language, people) + return self.say_goodbye_to_in(people, language) + end end + +class GoodbyeTranslated::Translator + def initialize(language) + @language = language + end + + def say_goodbye + case @language + when "spanish" + return "Adios, Mundo!" + else # Assume english + return "Goodbye, World!" + end + end + + def say_goodbye_to(people) + case @language + when "spanish" + if people.nil? + return say_goodbye + elsif people.respond_to?("join") + # Join the list elements with commas + return "Adios, #{people.join(", ")}!" + else + return "Adios, #{people}!" + end + else + if people.nil? + return say_goodbye + elsif people.respond_to?("join") + return "Goodbye, #{people.join(", ")}!" + else + return "Goodbye, #{people}!" + end + end + end +end
Add some more code to this gem
diff --git a/lib/ruboty/action.rb b/lib/ruboty/action.rb index abc1234..def5678 100644 --- a/lib/ruboty/action.rb +++ b/lib/ruboty/action.rb @@ -1,7 +1,7 @@ module Ruboty class Action def self.prefix_pattern(robot_name) - /\A@?#{Regexp.escape(robot_name)}:?\s+/ + /\A@?#{Regexp.escape(robot_name)}:?[[:space:]]+/ end attr_reader :options, :pattern
Support unicode spaces like U+00a0 On some platform, spaces may be converted to Unicode spaces, and `\s+` is not matched with such Unicode spaces. This patch just changes regex pattern from `\s` to `[[:space:]]`. I confirmed that Slack on Mac OS X will convert `" "` to `" \u{00a0}"` automatically on copy-and-past.
diff --git a/lib/snmpjr/getter.rb b/lib/snmpjr/getter.rb index abc1234..def5678 100644 --- a/lib/snmpjr/getter.rb +++ b/lib/snmpjr/getter.rb @@ -14,6 +14,7 @@ get_request partial_oids }.flatten @session.close + #TODO: Make result be a single object if a single oid was requested result end
Add a todo to return a single resposne when a single string is requested
diff --git a/lib/keylime/credential.rb b/lib/keylime/credential.rb index abc1234..def5678 100644 --- a/lib/keylime/credential.rb +++ b/lib/keylime/credential.rb @@ -17,15 +17,6 @@ get || prompt(message) end - def prompt(message) - set UserInput.new( - message: message, - secret: true, - attempts: 3, - validation: /.+/ - ).ask - end - def set(value) get && delete keychain_segment.create(@options.merge(password: value)) @@ -36,6 +27,15 @@ end private + + def prompt(message) + set UserInput.new( + message: message, + secret: true, + attempts: 3, + validation: /.+/ + ).ask + end def keychain @keychain ||= if @options[:keychain]
Make .prompt a private method Because .get! wraps .prompt, we don't want to expose .prompt directly to the user
diff --git a/lib/thermite/util.rb b/lib/thermite/util.rb index abc1234..def5678 100644 --- a/lib/thermite/util.rb +++ b/lib/thermite/util.rb @@ -23,6 +23,9 @@ # Utility methods # module Util + # + # Logs a debug message to the specified `config.debug_filename`, if set. + # def debug(msg) # Should probably replace with a Logger if config.debug_filename
Add missing docs for debug
diff --git a/lib/w3clove/error.rb b/lib/w3clove/error.rb index abc1234..def5678 100644 --- a/lib/w3clove/error.rb +++ b/lib/w3clove/error.rb @@ -6,11 +6,8 @@ # message...... generic but descriptive text about the error # module W3Clove - class Error - attr_accessor :message_id, :line, :message + Error = Struct.new(:message_id, :line, :message) +end - def initialize(message_id, line, message) - @message_id, @line, @message = message_id, line, message - end - end -end+ +
Simplify Error implementation, only a struct is needed at this point
diff --git a/metadata.rb b/metadata.rb index abc1234..def5678 100644 --- a/metadata.rb +++ b/metadata.rb @@ -6,6 +6,9 @@ long_description 'Installs/Configures s3_dir' version '1.4.1' +source_url 'https://github.com/evertrue/s3_dir/' if respond_to?(:source_url) +issues_url 'https://github.com/evertrue/s3_dir/issues' if respond_to?(:issues_url) + supports 'ubuntu', '= 14.04' depends 's3_file', '>= 2.5.0'
Add source and issues URLs
diff --git a/metadata.rb b/metadata.rb index abc1234..def5678 100644 --- a/metadata.rb +++ b/metadata.rb @@ -6,5 +6,5 @@ long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version "2.0.3" -depends "application", "~> 3.0" +depends "application", "~> 4.0" depends "nginx"
Update dependency on app cookbook Refs #15
diff --git a/recipes/_deps.rb b/recipes/_deps.rb index abc1234..def5678 100644 --- a/recipes/_deps.rb +++ b/recipes/_deps.rb @@ -1,21 +1,24 @@ include_recipe 'build-essential' %w( - autoconf - libboost1.54-dev - libboost-context1.54-dev - libboost-filesystem1.54-dev - libboost-python1.54-dev - libboost-regex1.54-dev - libboost-system1.54-dev - libboost-thread1.54-dev + automake + autoconf-archive + libboost-all-dev libcap-dev libdouble-conversion-dev libevent-dev libgoogle-glog-dev + libgflags-dev + liblz4-dev + liblzma-dev + libsnappy-dev + zlib1g-dev + binutils-dev + libjemalloc-dev libssl-dev libtool ragel + libiberty-dev ).each do |pkg| package pkg end
Clean up & update dependency pkgs Folly & mcrouter have added some dependencies, and clarified others. Additionally, this list avoids duplicating deps that the build-essential cookbook provides.
diff --git a/ruby_event_store-rom/lib/ruby_event_store/rom/adapters/sql/changesets/update_events.rb b/ruby_event_store-rom/lib/ruby_event_store/rom/adapters/sql/changesets/update_events.rb index abc1234..def5678 100644 --- a/ruby_event_store-rom/lib/ruby_event_store/rom/adapters/sql/changesets/update_events.rb +++ b/ruby_event_store-rom/lib/ruby_event_store/rom/adapters/sql/changesets/update_events.rb @@ -19,7 +19,7 @@ private def commit_on_duplicate_key_update - relation.dataset.on_duplicate_key_update(:id).multi_insert(to_a) + relation.dataset.on_duplicate_key_update(*UPSERT_COLUMNS).multi_insert(to_a) end def commit_insert_conflict
Fix to indicate which columns to update
diff --git a/cmd/spree_cmd.gemspec b/cmd/spree_cmd.gemspec index abc1234..def5678 100644 --- a/cmd/spree_cmd.gemspec +++ b/cmd/spree_cmd.gemspec @@ -19,5 +19,5 @@ s.add_development_dependency 'rspec' # Temporary hack until https://github.com/wycats/thor/issues/234 is fixed - s.add_dependency 'thor', '~> 0.14' + s.add_dependency 'thor', '>= 0.14', '< 2.0' end
Update thor requirement from ~> 0.14 to >= 0.14, < 2.0 in /cmd Updates the requirements on [thor](https://github.com/wycats/thor) to permit the latest version. - [Release notes](https://github.com/wycats/thor/releases) - [Changelog](https://github.com/erikhuda/thor/blob/master/CHANGELOG.md) - [Commits](https://github.com/wycats/thor/commits) Signed-off-by: dependabot-preview[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@dependabot.com>
diff --git a/mongoid-sequence.gemspec b/mongoid-sequence.gemspec index abc1234..def5678 100644 --- a/mongoid-sequence.gemspec +++ b/mongoid-sequence.gemspec @@ -8,7 +8,7 @@ gem.summary = %q{Specify fields to behave like a sequence number (exactly like the "id" column in conventional SQL flavors).} gem.homepage = "https://github.com/goncalossilva/mongoid-sequence" - gem.add_dependency("mongoid", "~> 2.0") + gem.add_dependency("mongoid", "> 2.0") gem.add_dependency("activesupport", "~> 3.1") gem.add_development_dependency("rake", "~> 0.9")
Allow for mongoid 3 dependencies
diff --git a/json_spec.gemspec b/json_spec.gemspec index abc1234..def5678 100644 --- a/json_spec.gemspec +++ b/json_spec.gemspec @@ -22,5 +22,5 @@ s.add_dependency "rspec", "~> 2.0" s.add_development_dependency "rake", "~> 0.9" - s.add_development_dependency "cucumber", "~> 1.0" + s.add_development_dependency "cucumber", "~> 1.1", ">= 1.1.1" end
Update the Cucumber dependency so that the step helper is used rather than Given/When/Then substeps
diff --git a/knife-ec2.gemspec b/knife-ec2.gemspec index abc1234..def5678 100644 --- a/knife-ec2.gemspec +++ b/knife-ec2.gemspec @@ -17,7 +17,7 @@ s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) } s.required_ruby_version = ">= 2.3" - s.add_dependency "fog-aws", "~> 1.0" + s.add_dependency "fog-aws", ">= 1", "< 4" s.add_dependency "mime-types" s.add_dependency "knife-windows", "~> 1.0"
Allow for fog-aws 1.0 - 3.0 Give a range so this still works with older DK releases Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
diff --git a/lib/tasks/panopticon.rake b/lib/tasks/panopticon.rake index abc1234..def5678 100644 --- a/lib/tasks/panopticon.rake +++ b/lib/tasks/panopticon.rake @@ -14,7 +14,7 @@ slug: APP_SLUG, title: "UK Trade Tariff", description: "Search for import and export commodity codes and for tax, duty and licenses that apply to your goods", - need_id: "B659", + need_id: "100233", #Find out the correct trade tariffs for items I am importing or exporting section: "business/international-trade", paths: [], prefixes: ["/#{APP_SLUG}"],
Update need id to new format Using 100233: Find out the correct trade tariffs for items I am importing or exporting. Seems like the closest match as B659 is not longer there
diff --git a/lib/tasks/rich_tasks.rake b/lib/tasks/rich_tasks.rake index abc1234..def5678 100644 --- a/lib/tasks/rich_tasks.rake +++ b/lib/tasks/rich_tasks.rake @@ -2,7 +2,7 @@ desc "Create nondigest versions of all ckeditor digest assets" task "assets:precompile" do - fingerprint = /\-[0-9a-f]{32}\./ + fingerprint = /\-[0-9a-f]{32}\.|\-[0-9a-f]{64}\./ for file in Dir["public/assets/ckeditor/**/*"] next unless file =~ fingerprint nondigest = file.sub fingerprint, '.' @@ -21,4 +21,4 @@ # re-generate uri cache Rich::RichFile.find_each(&:save) end -end+end
Fix rich rake task assets:precompile, to store non digest versions of assets. Because of sprockets version 3 use fingerprints with 64 chars length
diff --git a/lib/tumblargh/api/base.rb b/lib/tumblargh/api/base.rb index abc1234..def5678 100644 --- a/lib/tumblargh/api/base.rb +++ b/lib/tumblargh/api/base.rb @@ -2,6 +2,9 @@ module API class Base + + # Needed by renderer for context propagation + attr_accessor :context def initialize(attrs={}) self.attributes = attrs @@ -30,6 +33,9 @@ end else return attributes[method_name] if attributes.include?(method_name) + + # propagating renderer context + return context.send(method_symbol, *arguments) unless context.nil? end end end
Allow resource objects to propagating rendering context
diff --git a/profile_test.rb b/profile_test.rb index abc1234..def5678 100644 --- a/profile_test.rb +++ b/profile_test.rb @@ -1,14 +1,9 @@ #!/usr/bin/env ruby -rprofile require ARGV[0]||"./core" require "./rijndael" -require "crypt/cbc" -puts "Encrypting a fairly big block of text...\n"; - -huge_ptext = File.open("bwulf10.txt", "r").read -big_ptext = huge_ptext[0, 10240] -#big_ptext="Oh, the grand old Duke of York,\nHe had ten thousand men;\nHe marched them up to the top of the hill\nAnd he marched them down again." +puts "Encrypting a block of text...\n"; cipher=Crypt::Rijndael.new("1234567890abcdef") -big_ctext=Crypt::CBC.new(cipher).encrypt("This is an IV...", big_ptext) +cipher.encrypt("This is an IV...")
Add a new (non-CBC) profiler script
diff --git a/config/initializers/rummager.rb b/config/initializers/rummager.rb index abc1234..def5678 100644 --- a/config/initializers/rummager.rb +++ b/config/initializers/rummager.rb @@ -4,6 +4,6 @@ Whitehall::SearchClient.search_uri = Rummageable.rummager_host + Whitehall.router_prefix + "/search" -unless Rails.env.production? +unless Rails.env.production? || ENV["RUMMAGER_HOST"] Rummageable.implementation = Rummageable::Fake.new end
Use real Rummageable implementation if the host has been set. This is more convenient when developing against a local rummager instance.
diff --git a/async_invocation.gemspec b/async_invocation.gemspec index abc1234..def5678 100644 --- a/async_invocation.gemspec +++ b/async_invocation.gemspec @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = 'evt-async_invocation' - s.version = '0.1.0.4' + s.version = '0.1.0.5' s.summary = "Return value for async method that is accidentally invoked synchronously" s.description = ' '
Package version is increased from 0.1.0.4 to 0.1.0.5
diff --git a/declarative_authorization.gemspec b/declarative_authorization.gemspec index abc1234..def5678 100644 --- a/declarative_authorization.gemspec +++ b/declarative_authorization.gemspec @@ -8,9 +8,7 @@ s.authors = ["Steffen Bartsch"] s.summary = "declarative_authorization is a Rails plugin for maintainable authorization based on readable authorization rules." s.email = "sbartsch@tzi.org" - s.files = %w[CHANGELOG MIT-LICENSE README.rdoc Rakefile authorization_rules.dist.rb garlic_example.rb init.rb] + Dir["app/**/*.rb"] + Dir["app/**/*.erb"] + Dir["config/*"] + Dir["lib/*.rb"] + Dir["lib/**/*.rb"] + Dir["lib/tasks/*"] + Dir["test/*"] - s.has_rdoc = true - s.extra_rdoc_files = ['README.rdoc', 'CHANGELOG'] + s.files = %w[CHANGELOG MIT-LICENSE Rakefile authorization_rules.dist.rb] + Dir["app/**/*.rb"] + Dir["app/**/*.erb"] + Dir["config/*"] + Dir["lib/*.rb"] + Dir["lib/**/*.rb"] + Dir["lib/tasks/*"] + Dir["test/*"] s.homepage = 'http://github.com/stffn/declarative_authorization' s.add_development_dependency('test-unit') s.add_development_dependency('ruby_parser', '~> 3.6.0')
Remove deprecated rdoc from gemspec
diff --git a/config/application.rb b/config/application.rb index abc1234..def5678 100644 --- a/config/application.rb +++ b/config/application.rb @@ -24,5 +24,11 @@ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '*.{rb,yml}').to_s] config.i18n.default_locale = :ja + + config.generators do |g| + g.assets false + g.helper false + g.view_specs false + end end end
Add setting not generate helper and assets
diff --git a/config/application.rb b/config/application.rb index abc1234..def5678 100644 --- a/config/application.rb +++ b/config/application.rb @@ -22,7 +22,7 @@ config.i18n.enforce_available_locales = true config.force_ssl = ENV["APPLICATION_HOST"] - config.middleware.insert_after ActionDispatch::SSL, Rack::CanonicalHost, ENV["APPLICATION_HOST"] if ENV["APPLICATION_HOST"] + config.middleware.insert_after ActionDispatch::SSL, Rack::CanonicalHost, ENV["APPLICATION_HOST"], ignore: 'docsdoctor.org' if ENV["APPLICATION_HOST"] config.middleware.insert_after ActionDispatch::Static, Rack::Deflater end end
Allow docsdoctor.org to serve codetriage content
diff --git a/Casks/4k-youtube-to-mp3.rb b/Casks/4k-youtube-to-mp3.rb index abc1234..def5678 100644 --- a/Casks/4k-youtube-to-mp3.rb +++ b/Casks/4k-youtube-to-mp3.rb @@ -1,7 +1,7 @@ cask :v1 => '4k-youtube-to-mp3' do # note: "3" is not a version number, but an intrinsic part of the product name version '2.9' - sha256 '07a558e3dddc957386d12f1a13880e6d02e86ccdabc64e3ac66c78eccde8fe09' + sha256 '8f62dead99131f7cb6936f07d95020f81fca6472d2a4d6bdd3ea37aefb5749ce' url "http://downloads.4kdownload.com/app/4kyoutubetomp3_#{version}.dmg" name '4K Youtube to MP3'
Fix checksum in "4K YouTube to MP3.app" Cask It seems that the download package has recently been changed, although the version number has not been bumped. This commit corrects the sha256 hash.
diff --git a/lib/math24cli.rb b/lib/math24cli.rb index abc1234..def5678 100644 --- a/lib/math24cli.rb +++ b/lib/math24cli.rb @@ -0,0 +1,36 @@+class Math24CLI + attr_reader :operators + + def initialize + @operators = ["+", "-", "*", "/"] + end + + def run() + puts "Welcome to Math 24 solver! Please enter your numbers to see solution" + command = "" + solver = Math24.new(operators) + command = gets.chomp + while command.downcase != "exit" + if command.downcase == "help" + puts "Input four numbers, and Math24 solution will be printed" + else + number_entry = command + if number_entry.include?(",") + numbers =number_entry.gsub(" ", "").split(",") + else + number_entry.squeeze(" ") + numbers = number_entry.split(" ") + end + if numbers.size == 4 + solver.numbers = numbers + puts solver.solve() + else + puts "Please enter exactly four numbers" + end + end + + command = gets.chomp + end + + end +end
Add help option to command line. Refactor gsub/split combo.
diff --git a/pet.gemspec b/pet.gemspec index abc1234..def5678 100644 --- a/pet.gemspec +++ b/pet.gemspec @@ -24,6 +24,6 @@ s.add_runtime_dependency 'earth' s.add_dependency 'emitter', '~> 1.0.0' - s.add_development_dependency 'sniff', '~>0.11.3' + s.add_development_dependency 'sniff', '~> 1.0.0' s.add_development_dependency 'sqlite3' end
Update sniff dependency to 1.x
diff --git a/spec/unit/control/rescue_body_spec.rb b/spec/unit/control/rescue_body_spec.rb index abc1234..def5678 100644 --- a/spec/unit/control/rescue_body_spec.rb +++ b/spec/unit/control/rescue_body_spec.rb @@ -17,6 +17,10 @@ it "should have control flow edges between each pair of children" do expect(subject.internal_flow_edges).to eq([[1, 2], [2, 3]]) end + + it "should have control flow nodes only for statements, and not for ex types or variable" do + expect(subject.nodes).to eq([1, 2, 3]) + end end end end
Add missing test case for rescue body
diff --git a/spec/models/student_spec.rb b/spec/models/student_spec.rb index abc1234..def5678 100644 --- a/spec/models/student_spec.rb +++ b/spec/models/student_spec.rb @@ -1,7 +1,7 @@ require 'rails_helper' require 'shoulda-matchers' RSpec.describe Student, type: :model do - it { should belong_to :user } + it { should belong_to :teacher } it { should validate_presence_of :first_name } it { should validate_presence_of :last_name } it { should validate_presence_of :grade }
Fix student test so build passes
diff --git a/spec/reserved_words_spec.rb b/spec/reserved_words_spec.rb index abc1234..def5678 100644 --- a/spec/reserved_words_spec.rb +++ b/spec/reserved_words_spec.rb @@ -7,7 +7,7 @@ describe '.list' do it 'returns initial reserved words' do - expect(ReservedWords.list).to eq default_words + expect(ReservedWords.list).to eq default_words.sort! end it 'should not return duplicate reserved words' do
Fix spec to return sorted set
diff --git a/spec/support/api_helpers.rb b/spec/support/api_helpers.rb index abc1234..def5678 100644 --- a/spec/support/api_helpers.rb +++ b/spec/support/api_helpers.rb @@ -1,11 +1,14 @@ module NetHttp2 module ApiHelpers + WAIT_INTERVAL = 0.2 def wait_for(seconds=2, &block) - (0..seconds).each do + count = 1 / WAIT_INTERVAL + + (0..(count * seconds)).each do break if block.call - sleep 1 + sleep WAIT_INTERVAL end end end
Refactor wait for helper to speed up tests.
diff --git a/test/db.rb b/test/db.rb index abc1234..def5678 100644 --- a/test/db.rb +++ b/test/db.rb @@ -1,8 +1,18 @@ require 'sequelizer' DB = Object.new.extend(Sequelizer).db unless defined?(DB) -DB.run("use #{DB.opts[:database]}") if DB.opts[:adapter] =~ /(impala|hive)/ +if DB.database_type == :impala + # Make sure to issue USE statement for every new connection + ac = DB.pool.after_connect + DB.pool.after_connect = proc do |conn| + DB.send(:log_connection_execute, conn, "USE #{DB.opts[:database]}") + ac.call(conn) if ac + end + # Remove existing connnections, so that the next query will use a new connection + # that the USE statement has been executed on + DB.disconnect +end if %w(omopv4 omopv4_plus).include?(ENV['DATA_MODEL']) && !DB.table_exists?(:source_to_concept_map) $stderr.puts <<END
Fix USE statement execution when testing on impala/hive Issuing the USE query once via Datase#run only works if only one connection is ever created. While that may be true for the current tests, this will bite us later if we ever have multithreaded access in the tests or there is an accidental disconnect during testing. Also, instead of checking for an adapter via a regexp, just check the database_type. This code does not handle Sequel's sharding support for after_connect (where the proc takes a second argument).
diff --git a/install.rb b/install.rb index abc1234..def5678 100644 --- a/install.rb +++ b/install.rb @@ -16,6 +16,4 @@ FileUtils.cp(hoff_image, image_file_name.gsub(backup_dir, image_dir)) end -puts 'dir: ' -puts directory -#FileUtils.chmod(0755, File.join(directory, 'play'))+FileUtils.chmod(0755, File.join(File.dirname(__FILE__), 'play'))
Set play to be a binary executable git-svn-id: 9867ed3c45c5a294c22e66a9d3216297713dba95@202 ca9fbce6-ab17-0410-af20-b66f06baff09
diff --git a/ext/liquid_c/extconf.rb b/ext/liquid_c/extconf.rb index abc1234..def5678 100644 --- a/ext/liquid_c/extconf.rb +++ b/ext/liquid_c/extconf.rb @@ -1,5 +1,5 @@ require 'mkmf' -$CFLAGS << ' -Wall -Werror' +$CFLAGS << ' -Wall -Werror -Wextra -Wno-unused-parameter -Wno-missing-field-initializers' compiler = RbConfig::MAKEFILE_CONFIG['CC'] if ENV['DEBUG'] == 'true' && compiler =~ /gcc|g\+\+/ $CFLAGS << ' -fbounds-check'
Enable -Wextra and disable unused parameter and missing field initializer warnings
diff --git a/db/migrate/20151029191946_update_user_from_user_full_details.rb b/db/migrate/20151029191946_update_user_from_user_full_details.rb index abc1234..def5678 100644 --- a/db/migrate/20151029191946_update_user_from_user_full_details.rb +++ b/db/migrate/20151029191946_update_user_from_user_full_details.rb @@ -0,0 +1,18 @@+class UpdateUserFromUserFullDetails < ActiveRecord::Migration + def up + execute <<-SQL + CREATE TRIGGER update_user_from_user_details + INSTEAD OF UPDATE ON "1".user_full_details + FOR EACH ROW EXECUTE PROCEDURE + public.update_user_from_user_details(); + + GRANT UPDATE (deactivated_at) ON "1".user_full_details, public.users TO admin; + SQL + end + + def down + execute <<-SQL + DROP TRIGGER update_user_from_user_details ON "1".user_full_details; + SQL + end +end
Add trigger to update User from user_full_details
diff --git a/db/migrate/20220613132127_change_bookmarks_bookmarks_to_text.rb b/db/migrate/20220613132127_change_bookmarks_bookmarks_to_text.rb index abc1234..def5678 100644 --- a/db/migrate/20220613132127_change_bookmarks_bookmarks_to_text.rb +++ b/db/migrate/20220613132127_change_bookmarks_bookmarks_to_text.rb @@ -0,0 +1,28 @@+# frozen_string_literal: true + +# +# Copyright (C) 2022 - present Instructure, Inc. +# +# This file is part of Canvas. +# +# Canvas is free software: you can redistribute it and/or modify it under +# the terms of the GNU Affero General Public License as published by the Free +# Software Foundation, version 3 of the License. +# +# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +# details. +# +# You should have received a copy of the GNU Affero General Public License along +# with this program. If not, see <http://www.gnu.org/licenses/>. +# + +class ChangeBookmarksBookmarksToText < ActiveRecord::Migration[6.1] + tag :predeploy + + def change + change_column :bookmarks_bookmarks, :name, :text + change_column :bookmarks_bookmarks, :url, :text + end +end
Allow arbitrary length bookmark names and urls fixes FOO-2891 Change-Id: I9430b2ef463341739ac93fd0718f78c2a1e18c6e Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/293834 Tested-by: Service Cloud Jenkins <9144042a601061f88f1e1d7a1753ea3e2972119d@instructure.com> Reviewed-by: Alex Slaughter <11669a22a05ead38ed9badafd55ef4c5386724b6@instructure.com> Migration-Review: Alex Slaughter <11669a22a05ead38ed9badafd55ef4c5386724b6@instructure.com> QA-Review: Jacob Burroughs <8ecea6e385af5cf9f53123f5ca17fb5fd6a6d4b2@instructure.com> Product-Review: Jacob Burroughs <8ecea6e385af5cf9f53123f5ca17fb5fd6a6d4b2@instructure.com>
diff --git a/lib/elastic_record/config.rb b/lib/elastic_record/config.rb index abc1234..def5678 100644 --- a/lib/elastic_record/config.rb +++ b/lib/elastic_record/config.rb @@ -22,7 +22,21 @@ self.servers = settings['servers'] if settings['options'] - # Deprecated route + warn("**************************************", + "elasticsearch.yml/:options is deprecated. For example, the following:", + "development:", + " servers: 127.0.0.1:9200", + " options:", + " timeout: 10", + " retries: 2", + "", + "becomes:", + "", + "development:", + " servers: 127.0.0.1:9200", + " timeout: 10", + " retries: 2", + "**************************************") self.connection_options = settings['options'] else self.connection_options = settings
Add a nice big warning for the lazy people
diff --git a/recipes/php55.rb b/recipes/php55.rb index abc1234..def5678 100644 --- a/recipes/php55.rb +++ b/recipes/php55.rb @@ -0,0 +1,49 @@+include_recipe "applications::default" +include_recipe "applications::apache" + +if platform?('mac_os_x') + applications_tap "josegonzalez/php" + applications_tap "homebrew/dupes" + + package "php54" do |variable| + options "--with-mysql --with-pgsql" + end + + %w[ php55-apcu php55-memcached php55-inclued php55-http php55-xdebug php55-intl php55-yaml php55-imagick php55-solr php55-twig php55-mcrypt].each do |pkg| + package pkg do + action [:install, :upgrade] + end + end + + template "/usr/local/etc/php/5.5/conf.d/99-kunstmaan.ini" do + source "php90kunstmaan.erb" + owner node['current_user'] + mode "0644" + end + + template "/etc/apache2/other/php.conf" do + source "apache_php.erb" + owner node['current_user'] + mode "0755" + end +elsif platform_family?('debian') + packages = %w[ php5-mysqlnd php5-mcrypt php-apc php5-imagick php5-cli php5-gd php5-memcached php5-curl php5-intl php5-dev php5-sqlite php-pear libmagick++-dev ] + + packages.each do |pkg| + package pkg do + action [:install, :upgrade] + end + end + + template "/etc/php5/conf.d/99-kunstmaan.ini" do + source "php90kunstmaan.erb" + owner "root" + mode "0755" + end + + template "/etc/php5/conf.d/50-apc.ini" do + source "php50apc.erb" + owner "root" + mode "0755" + end +end
Create a PHP 5.5 recipe
diff --git a/lib/extensions/ar_process.rb b/lib/extensions/ar_process.rb index abc1234..def5678 100644 --- a/lib/extensions/ar_process.rb +++ b/lib/extensions/ar_process.rb @@ -1,7 +1,8 @@ class << Process - def pid_with_safe - warn "Remove me: #{__FILE__}:#{__LINE__}. Safe level 2-4 are no longer supported as of ruby 2.3!" if RUBY_VERSION >= "2.3" - $SAFE < 2 ? pid_without_safe : 0 - end - alias_method_chain :pid, :safe + prepend(Module.new { + def pid + warn "Remove me: #{__FILE__}:#{__LINE__}. Safe level 2-4 are no longer supported as of ruby 2.3!" if RUBY_VERSION >= "2.3" + $SAFE < 2 ? super : 0 + end + }) end
Remove alias_method_chain from Process override
diff --git a/red25519.gemspec b/red25519.gemspec index abc1234..def5678 100644 --- a/red25519.gemspec +++ b/red25519.gemspec @@ -8,7 +8,9 @@ gem.summary = "Red25519 provides both C and Java bindings to the Ed25519 public key signature system" gem.homepage = "https://github.com/tarcieri/red25519" - gem.files = `git ls-files`.split($\) + gem.files = `git ls-files`.split($\) + gem.files << "lib/red25519_engine.jar" if defined? JRUBY_VERSION + gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) } gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) gem.name = "red25519"
Include .jar in gem on JRuby
diff --git a/lib/firebolt/cache_worker.rb b/lib/firebolt/cache_worker.rb index abc1234..def5678 100644 --- a/lib/firebolt/cache_worker.rb +++ b/lib/firebolt/cache_worker.rb @@ -2,8 +2,8 @@ class CacheWorker include ::SuckerPunch::Worker - def perform(cache_warmer = nil) - results = ::Firebolt::CacheStore.warm(cache_warmer) + def perform(warmer_class) + results = warmer_class.warm return unless write_results_to_cache_file? write_results_to_cache_file(results)
Use the new warmer interface in the cache worker. `CacheWorker#perform` now takes a warmer class as an argument and uses the new warmer interface to warmer the cache.
diff --git a/lib/hearthstone_api/cards.rb b/lib/hearthstone_api/cards.rb index abc1234..def5678 100644 --- a/lib/hearthstone_api/cards.rb +++ b/lib/hearthstone_api/cards.rb @@ -1,7 +1,7 @@ module HearthstoneApi class Cards < BaseModel - def all - get "/cards" + def all(options = {}) + get "/cards", options end end end
Add options for GET request
diff --git a/lib/jarvis/github/project.rb b/lib/jarvis/github/project.rb index abc1234..def5678 100644 --- a/lib/jarvis/github/project.rb +++ b/lib/jarvis/github/project.rb @@ -22,6 +22,7 @@ end def git_url - return "https://github.com/#{@organization}/#{@name}" + #return "https://github.com/#{@organization}/#{@name}" + return "git@github.com:/#{@organization}/#{@name}.git" end end end end
Use ssh for git clones Fixes #56
diff --git a/lib/cli.rb b/lib/cli.rb index abc1234..def5678 100644 --- a/lib/cli.rb +++ b/lib/cli.rb @@ -3,9 +3,10 @@ class RuneCLI < Thor desc 'optimize', 'optimize runes' - option :scrape, type: :boolean, default: :false - def optimize(scrape: :false) - run_optimizer(scrape) + option :scrape, type: :boolean + option :page_number, type: :numeric, default: 2 + def optimize + run_optimizer(options[:scrape], options[:page_number]) end end
Enable setting scrape and page_number from CLI
diff --git a/services/appharbor.rb b/services/appharbor.rb index abc1234..def5678 100644 --- a/services/appharbor.rb +++ b/services/appharbor.rb @@ -7,8 +7,8 @@ create_build_url = "https://appharbor.com/application/#{application_slug}/build?authorization=#{token}" - raise_config_error 'Missing Create build URL' if create_build_url.to_s.empty? - raise_config_error 'Invalid Create build URL' unless create_build_url.starts_with? "https://appharbor.com/application/" + raise_config_error 'Missing application slug' if slug.to_s.empty? + raise_config_error 'Missing token' if token.to_s.empty? commit = distinct_commits.last appharbor_message = {
Raise configuration errors on missing token or slug
diff --git a/jktebop.rb b/jktebop.rb index abc1234..def5678 100644 --- a/jktebop.rb +++ b/jktebop.rb @@ -6,6 +6,7 @@ option "with-examples", "Install the examples into share/#{name}" depends_on :fortran + depends_on "jktld" => :optional def install system "#{ENV.fc} -O2 -o #{name} #{name}.f" @@ -20,4 +21,8 @@ share.install "#{name}" end end + + def caveats + "To compute limb darkening coefficients (task 1) install jktld" + end end
Add note and optional install dependency jktld
diff --git a/week-4/variables-methods.rb b/week-4/variables-methods.rb index abc1234..def5678 100644 --- a/week-4/variables-methods.rb +++ b/week-4/variables-methods.rb @@ -1,3 +1,6 @@+ +# Full name greeting mini-challenge + puts "What\'s your first name?" first_name = gets.chomp puts "What\'s your middle name?" @@ -5,3 +8,10 @@ puts "What\'s your last name?" last_name = gets.chomp puts "Hello #{first_name} #{middle_name} #{last_name}!" + +# Bigger, better, favorite number mini-challenge + +puts "What\'s your favorite number?" +favorite_num = gets.chomp.to_i + 1 + +puts "That\'s nice, but don\'t you think #{favorite_num} would be better? It is bigger you know."
Add variable-methods file with both finished mini-challenges from Chris Pine book
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 @@ -20,8 +20,7 @@ def list_last_commit(bz) depends_on_commits = Issue.where(:bz_id => bz.depends_on_ids).collect {|i| i.commits.all}.flatten commits = bz.commits.all | depends_on_commits - hash = commits.each_with_object({}) do |c, hash| - hash[c.branch] ||= 0 + hash = commits.each_with_object(Hash.new(0)) do |c, hash| hash[c.branch] += 1 end
Use Hash default value of 0 to simplify things.
diff --git a/app/helpers/friendships_helper.rb b/app/helpers/friendships_helper.rb index abc1234..def5678 100644 --- a/app/helpers/friendships_helper.rb +++ b/app/helpers/friendships_helper.rb @@ -0,0 +1,22 @@+module FriendshipsHelper + def friend_request_accept + # accepting a friend request is done by the recipient of the friend request. + # thus the current user is identified by friend_id. + friendship = Friendship.find(params[:id]) + friendship.update_attributes(status: 'confirm') + end + + # def friend_delete + # friendship = Friendship.where(friend_id: current_user.id, user_id: params[:id]).first + # friendship.destroy + # end + + def friend_request + @friendship.update_attribute(:status,'pending') + end + + def friend_request_ignore + friendship = Friendship.find(params[:id]) + @friendship.update_attribute(:status, 'ignore') + end +end
Add friend_request methods to friendship helpers file
diff --git a/app/services/steam_api_service.rb b/app/services/steam_api_service.rb index abc1234..def5678 100644 --- a/app/services/steam_api_service.rb +++ b/app/services/steam_api_service.rb @@ -1,12 +1,13 @@ class SteamApiService attr_reader :player + CSGO_APP_ID = 730 def initialize(_player) @player = _player end def download_player_stats - uri = URI("http://api.steampowered.com/ISteamUserStats/GetUserStatsForGame/v0002/?appid=#{app_id}&key=#{api_key}&steamid=#{player.steam_id}") + uri = URI("http://api.steampowered.com/ISteamUserStats/GetUserStatsForGame/v0002/?appid=#{CSGO_APP_ID}&key=#{api_key}&steamid=#{player.steam_id}") raw_stats = JSON.parse(Net::HTTP.get(uri))["playerstats"]["stats"] Stats.create(player_id: player.id, data: parse_stats(raw_stats)) end @@ -16,10 +17,6 @@ Rails.configuration.steam["api_key"] end - def app_id - 730 #CSGO - end - def parse_stats(data_hash) data_hash.each_with_object({}) { |stat, hsh| hsh[stat["name"]] = stat["value"] } end
Move app id to constant
diff --git a/install.rb b/install.rb index abc1234..def5678 100644 --- a/install.rb +++ b/install.rb @@ -1 +1,2 @@-# Install hook code here +# Copy the mock imap.rb to the project's test directory +File.copy(File.join(File.dirname(__FILE__), 'test/mocks/imap.rb'), File.join(File.dirname(__FILE__), '../../../test/mocks/test/'))
Copy mock to project mock directory
diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb index abc1234..def5678 100644 --- a/spec/controllers/users_controller_spec.rb +++ b/spec/controllers/users_controller_spec.rb @@ -1,7 +1,5 @@ require 'rails_helper' RSpec.describe UsersController, type: :controller do - it { should route(:get, '/users').to(action: :index) } - it { should route(:get, '/posts/1').to(action: :show, id: 1) } end
Remove irrelevant tests from users controller
diff --git a/spec/decorators/project_decorator_spec.rb b/spec/decorators/project_decorator_spec.rb index abc1234..def5678 100644 --- a/spec/decorators/project_decorator_spec.rb +++ b/spec/decorators/project_decorator_spec.rb @@ -1,6 +1,6 @@ require "rails_helper" -describe ProjectDecorator do +RSpec.describe ProjectDecorator, type: :decorator do using CapacityConverter Given(:project) { instance_double(Project, capacity: capacity, capacity_remaining: capacity_remaining) }
Upgrade to newest RSPEC syntax
diff --git a/spec/models/spree/gateway_tagging_spec.rb b/spec/models/spree/gateway_tagging_spec.rb index abc1234..def5678 100644 --- a/spec/models/spree/gateway_tagging_spec.rb +++ b/spec/models/spree/gateway_tagging_spec.rb @@ -1,27 +1,56 @@ require "spec_helper" -# An inheritance bug made these specs fail. -# See config/initializers/spree.rb -shared_examples "taggable" do |parameter| - it "uses the given parameter" do +# We extended Spree::PaymentMethod to be taggable. Unfortunately, an inheritance +# bug prevented the taggable code to be passed on to the descendants of +# PaymentMethod. We fixed that in config/initializers/spree.rb. +# +# This spec tests several descendants for their taggability. The tests are in +# a separate file, because they cover one aspect of several classes. +shared_examples "taggable" do |expected_taggable_type| + it "provides a tag list" do expect(subject.tag_list).to eq [] + end + + it "stores tags for the root taggable type" do + subject.tag_list.add("one") + subject.save! + + expect(subject.taggings.last.taggable_type).to eq expected_taggable_type end end module Spree - describe PaymentMethod do - it_behaves_like "taggable" - end + describe "PaymentMethod and descendants" do - describe Gateway do - it_behaves_like "taggable" - end + let(:shop) { create(:enterprise) } + let(:valid_subject) do + # Supply required parameters so that it can be saved to attach taggings. + described_class.new( + name: "Some payment method", + distributor_ids: [shop.id] + ) + end + subject { valid_subject } - describe Gateway::PayPalExpress do - it_behaves_like "taggable" - end + describe PaymentMethod do + it_behaves_like "taggable", "Spree::PaymentMethod" + end - describe Gateway::StripeConnect do - it_behaves_like "taggable" + describe Gateway do + it_behaves_like "taggable", "Spree::PaymentMethod" + end + + describe Gateway::PayPalExpress do + it_behaves_like "taggable", "Spree::PaymentMethod" + end + + describe Gateway::StripeConnect do + subject do + # StripeConnect needs an owner to be valid. + valid_subject.tap { |m| m.preferred_enterprise_id = shop.id } + end + + it_behaves_like "taggable", "Spree::PaymentMethod" + end end end
Test tagging polymorphism on a payment method
diff --git a/spec/unit/puppet/property/boolean_spec.rb b/spec/unit/puppet/property/boolean_spec.rb index abc1234..def5678 100644 --- a/spec/unit/puppet/property/boolean_spec.rb +++ b/spec/unit/puppet/property/boolean_spec.rb @@ -4,7 +4,7 @@ describe Puppet::Property::Boolean do subject { described_class.new(resource: resource) } - let(:resource) { mock('resource') } + let(:resource) { instance_double('resource') } [true, :true, 'true', :yes, 'yes'].each do |arg| it "should munge #{arg.inspect} as true" do
Use rspec-mocks instead of mocha
diff --git a/app/validators/array_validator.rb b/app/validators/array_validator.rb index abc1234..def5678 100644 --- a/app/validators/array_validator.rb +++ b/app/validators/array_validator.rb @@ -0,0 +1,27 @@+# frozen_string_literal: true + +class ArrayValidator < ActiveModel::EachValidator + # Taken from https://gist.github.com/justalever/73a1b36df8468ec101f54381996fb9d1 + + def validate_each(record, attribute, values) + Array(values).each do |value| + options.each do |key, args| + validator_options = {attributes: attribute} + validator_options.merge!(args) if args.is_a?(Hash) + + next if value.nil? && validator_options[:allow_nil] + next if value.blank? && validator_options[:allow_blank] + + validator_class_name = "#{key.to_s.camelize}Validator" + validator_class = begin + validator_class_name.constantize + rescue NameError + "ActiveModel::Validations::#{validator_class_name}".constantize + end + + validator = validator_class.new(validator_options) + validator.validate_each(record, attribute, value) + end + end + end +end
Add new validator for all elements of an array
diff --git a/week-9/ruby/fibonacci.rb b/week-9/ruby/fibonacci.rb index abc1234..def5678 100644 --- a/week-9/ruby/fibonacci.rb +++ b/week-9/ruby/fibonacci.rb @@ -8,13 +8,16 @@ # Initial Solution def is_fibonacci?(num) - if num <= 9 - true - elsif + plus_four = Math.sqrt( (num * 5) ** 2 + 4) +​ + minus_four = Math.sqrt( (num * 5) ** 2 - 4) +​ + if plus_four.is_a?(Float) || minus_four.is_a?(Float) + return false + else + return true end - end - # Refactored Solution
Add second trial to solution
diff --git a/lib/toy_robot_simulator/command/matcher/place.rb b/lib/toy_robot_simulator/command/matcher/place.rb index abc1234..def5678 100644 --- a/lib/toy_robot_simulator/command/matcher/place.rb +++ b/lib/toy_robot_simulator/command/matcher/place.rb @@ -1,6 +1,5 @@ require './lib/toy_robot_simulator/command/matcher/base' require './lib/toy_robot_simulator/pose' -require 'ostruct' module Command module Matcher @@ -20,7 +19,7 @@ place_args_extractor = lambda do |raw_command| x, y, f = raw_command.split.pop.split(',') - OpenStruct.new( + Pose.new( x: x.to_i, y: y.to_i, orientation: constantize_orientation.call(f)
Fix bug in Command::Matcher::Place args_extractor() args_extractor() should return a Pose object but was returning an OpenStruct instance. Ultimately this makes it dependant on Pose, a better solution would be to re-design the Pose class to accept a hash of attributes to mutate itself.
diff --git a/spec/practice_spec.rb b/spec/practice_spec.rb index abc1234..def5678 100644 --- a/spec/practice_spec.rb +++ b/spec/practice_spec.rb @@ -2,29 +2,31 @@ module Comptroller describe Practice do - it 'retrieves all pratices' do - expect(Practice.all.first).to eql(Practice.new(:export_url => 'https://optimis.duxware.com', :token => '12345', :external_id => 3)) - end + context 'crud api' do + it 'retrieves all pratices' do + expect(Practice.all.first).to eql(Practice.new(:export_url => 'https://optimis.duxware.com', :token => '12345', :external_id => 3)) + end - it 'creates new practices' do - practice = Practice.create(:external_id => 5, :export_url => 'http://hello.world', :token => '12345') - expect(practice).to eql(Practice.new(:external_id => 5, :export_url => 'http://hello.world', :token => '12345')) - end + it 'creates new practices' do + practice = Practice.create(:external_id => 5, :export_url => 'http://hello.world', :token => '12345') + expect(practice).to eql(Practice.new(:external_id => 5, :export_url => 'http://hello.world', :token => '12345')) + end - it 'retrieves practice by id' do - practice = Practice.find(1) - expect(practice).to eql(Practice.new(:external_id => 3, :export_url => 'https://optimis.duxware.com', :token => '12345')) - end + it 'retrieves practice by id' do + practice = Practice.find(1) + expect(practice).to eql(Practice.new(:external_id => 3, :export_url => 'https://optimis.duxware.com', :token => '12345')) + end - it 'updates practices' do - expect(Practice.save_existing(1, :export_url => 'https://optimis.webpt.com')).to be_true - expect(Practice.find(1).export_url).to eql('https://optimis.webpt.com') - end + it 'updates practices' do + expect(Practice.save_existing(1, :export_url => 'https://optimis.webpt.com')).to be_true + expect(Practice.find(1).export_url).to eql('https://optimis.webpt.com') + end - it 'deletes practices' do - Practice.destroy_existing(1) - practice_ids = Practice.all.map(&:id) - expect(practice_ids.include?(1)).to be_false + it 'deletes practices' do + Practice.destroy_existing(1) + practice_ids = Practice.all.map(&:id) + expect(practice_ids.include?(1)).to be_false + end end end end
Add context to practice specs
diff --git a/recipes/default.rb b/recipes/default.rb index abc1234..def5678 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -19,7 +19,7 @@ unicorn do port '8000' - worker_processes '2' + worker_processes 2 end end # Copyright (C) 2014 Erich Kaderka
Change value of worker_processes from String to Integer
diff --git a/gir_ffi-gtk.gemspec b/gir_ffi-gtk.gemspec index abc1234..def5678 100644 --- a/gir_ffi-gtk.gemspec +++ b/gir_ffi-gtk.gemspec @@ -13,10 +13,10 @@ s.files = Dir['{lib,test,tasks,examples}/**/*', "*.md", "Rakefile", "COPYING.LIB"] & `git ls-files -z`.split("\0") s.test_files = `git ls-files -z -- test`.split("\0") - s.add_runtime_dependency('gir_ffi', ["~> 0.6.0"]) + s.add_runtime_dependency('gir_ffi', ["~> 0.7.0"]) s.add_development_dependency('minitest', ["~> 5.0"]) - s.add_development_dependency('rr', ["~> 1.0.4"]) - s.add_development_dependency('rake', ["~> 10.0.3"]) + s.add_development_dependency('rr', ["~> 1.1.2"]) + s.add_development_dependency('rake', ["~> 10.1"]) s.require_paths = ["lib"] end
Update dependency on GirFFI and other gems
diff --git a/mysql_adapter.rb b/mysql_adapter.rb index abc1234..def5678 100644 --- a/mysql_adapter.rb +++ b/mysql_adapter.rb @@ -1,6 +1,6 @@ require Pathname(__FILE__).dirname.expand_path / 'data_objects_adapter' -gem 'do_mysql', '~>0.9.11' +gem 'do_mysql', '~>0.9.12' require 'do_mysql' module DataMapper
Bump dependency for data_objects to 0.9.12 and extlib to 0.9.11
diff --git a/lib/actionmailer_with_request.rb b/lib/actionmailer_with_request.rb index abc1234..def5678 100644 --- a/lib/actionmailer_with_request.rb +++ b/lib/actionmailer_with_request.rb @@ -4,15 +4,7 @@ mattr_accessor :defaults - self.defaults = lambda do - host = Thread.current[:request].try(:host) || "www.example.com" - port = Thread.current[:request].try(:port) || 80 - - returning({}) do |params| - params[:host] = host - params[:port] = port if port != 80 - end - end + self.defaults = lambda { Hash.new } def initialize(params = {}) @params = params @@ -42,6 +34,16 @@ module MailerMonkeyPatch def self.included(base) + ActionMailerWithRequest::OptionsProxy.defaults = lambda do + host = Thread.current[:request].try(:host) || "www.example.com" + port = Thread.current[:request].try(:port) || 80 + + returning({}) do |params| + params[:host] = host + params[:port] = port if port != 80 + end + end + base.default_url_options = ActionMailerWithRequest::OptionsProxy.new(base.default_url_options) end
Move ActionMailerWithRequest::OptionsProxy.defaults initialization outside the class
diff --git a/lib/femto/model/mongo_adapter.rb b/lib/femto/model/mongo_adapter.rb index abc1234..def5678 100644 --- a/lib/femto/model/mongo_adapter.rb +++ b/lib/femto/model/mongo_adapter.rb @@ -30,7 +30,9 @@ def find(cls, query) results = [] get_coll(cls).find(query).each do |res| - results << cls.new(symbolize_keys(res)) + model = cls.new(symbolize_keys(res)) + model.id = res['_id'] + results << model end results end
Set model id after finding
diff --git a/lib/gitlab/etag_caching/store.rb b/lib/gitlab/etag_caching/store.rb index abc1234..def5678 100644 --- a/lib/gitlab/etag_caching/store.rb +++ b/lib/gitlab/etag_caching/store.rb @@ -1,7 +1,7 @@ module Gitlab module EtagCaching class Store - EXPIRY_TIME = 10.minutes + EXPIRY_TIME = 20.minutes REDIS_NAMESPACE = 'etag:'.freeze def get(key)
Increase ETag cache expiry time As discussed in #29777.
diff --git a/lib/mspec/matchers/match_yaml.rb b/lib/mspec/matchers/match_yaml.rb index abc1234..def5678 100644 --- a/lib/mspec/matchers/match_yaml.rb +++ b/lib/mspec/matchers/match_yaml.rb @@ -30,7 +30,11 @@ def valid_yaml?(obj) require 'yaml' begin - YAML.load(obj) + if defined?(YAML.unsafe_load) + YAML.unsafe_load(obj) + else + YAML.load(obj) + end rescue false else
spec/ruby/library/yaml: Test YAML.unsafe_load instead of YAML.load in 3.1
diff --git a/lib/bot.rb b/lib/bot.rb index abc1234..def5678 100644 --- a/lib/bot.rb +++ b/lib/bot.rb @@ -0,0 +1,16 @@+#### +# +# ElectroCode Channel Welcomer and AutoAssigner +# +#### + +class WelcomePlugin + include Cinch::Plugin + listen_to :channel, method: :doWelcome + + def doWelcome(m) + if m.channel == "#debug" + Channel("#Situation_Room").send("A message was sent to #debug") + end + end +end
Add a Channel Registering Welcomer that auto assigns "Bots"
diff --git a/messaging.gemspec b/messaging.gemspec index abc1234..def5678 100644 --- a/messaging.gemspec +++ b/messaging.gemspec @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = 'evt-messaging' - s.version = '0.15.0.0' + s.version = '0.15.1.0' s.summary = 'Messaging primitives for Eventide' s.description = ' '
Package version is increased from 0.15.0.0 to 0.15.1.0
diff --git a/messaging.gemspec b/messaging.gemspec index abc1234..def5678 100644 --- a/messaging.gemspec +++ b/messaging.gemspec @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = 'evt-messaging' - s.version = '0.24.0.0' + s.version = '0.25.0.0' s.summary = 'Common primitives for platform-specific messaging implementations for Eventide' s.description = ' '
Package version increased from 0.24.0.0 to 0.25.0.0
diff --git a/lib/ort.rb b/lib/ort.rb index abc1234..def5678 100644 --- a/lib/ort.rb +++ b/lib/ort.rb @@ -23,7 +23,7 @@ @url = Mapotempo::Application.config.optimize_url def self.optimize(capacity, matrix, time_window) - key = {capacity: capacity, matrix: matrix.hash, time_window: time_window}.to_json + key = [capacity, matrix.hash, time_window.hash] result = @cache.read(key) if !result
Make optimizer cache key smaller
diff --git a/lib/toy.rb b/lib/toy.rb index abc1234..def5678 100644 --- a/lib/toy.rb +++ b/lib/toy.rb @@ -1,3 +1,4 @@+require 'forwardable' require 'simple_uuid' require 'active_model' require 'active_support/json' @@ -8,6 +9,8 @@ require File.expand_path('../../vendor/moneta/lib/moneta', __FILE__) module Toy + extend Forwardable + autoload :Attribute, 'toy/attribute' autoload :Attributes, 'toy/attributes' autoload :Callbacks, 'toy/callbacks' @@ -19,13 +22,7 @@ autoload :Querying, 'toy/querying' autoload :Version, 'toy/version' - def encode(obj) - ActiveSupport::JSON.encode(obj) - end - - def decode(json) - ActiveSupport::JSON.decode(json) - end + def_delegators ActiveSupport::JSON, :encode, :decode extend self end
Switch to delegation for json stuff. Nothing big.
diff --git a/historyable.gemspec b/historyable.gemspec index abc1234..def5678 100644 --- a/historyable.gemspec +++ b/historyable.gemspec @@ -21,5 +21,5 @@ s.require_paths = ['lib'] s.rubyforge_project = '[none]' - s.add_dependency 'active_record', '>= 3.0.0' + s.add_dependency 'activerecord', '>= 3.0.0' end
Fix typo: active_record -> activerecord
diff --git a/lib/webhookr/adapter_response.rb b/lib/webhookr/adapter_response.rb index abc1234..def5678 100644 --- a/lib/webhookr/adapter_response.rb +++ b/lib/webhookr/adapter_response.rb @@ -1,3 +1,3 @@ module Webhookr - class AdapterResponse < Struct.new(:event_type, :payload); end + class AdapterResponse < Struct.new(:service_name, :event_type, :payload); end end
Update AdapterResponse to carry service_name
diff --git a/tasks/check-if-bosh-lite-resource-exists/run.rb b/tasks/check-if-bosh-lite-resource-exists/run.rb index abc1234..def5678 100644 --- a/tasks/check-if-bosh-lite-resource-exists/run.rb +++ b/tasks/check-if-bosh-lite-resource-exists/run.rb @@ -9,11 +9,14 @@ state_object = StateOfBoshLites.new state_object.get_states!(resource_pools_dir: resource_pools_dir) +bosh_lite_name = deployment_id.split('.').first if state_object.bosh_lite_in_pool?(deployment_id) - bosh_lite_name = deployment_id.split('.').first puts "==========================================================================" puts "WARNING:" puts "You should trigger the #{bosh_lite_name} pipeline from the very beginning." puts "You should not be trying to re-run intermediate deploy/setup steps on an already functional BOSH Lite with CF and Diego successfully deployed to it." exit 1 +else + puts "#{bosh_lite_name} is not in the resource pool." + puts "Job proceeding." end
Add success message for check-if-bosh-lite-resource-exists [#129169949] Signed-off-by: James Wen <3b2f4c88287a5fcd7db73a67dd1ab82807db04ee@columbia.edu>
diff --git a/app/controllers/graphql_controller.rb b/app/controllers/graphql_controller.rb index abc1234..def5678 100644 --- a/app/controllers/graphql_controller.rb +++ b/app/controllers/graphql_controller.rb @@ -2,7 +2,7 @@ # If accessing from outside this domain, nullify the session # This allows for outside API access while preventing CSRF attacks, # but you'll have to authenticate your user separately - # protect_from_forgery with: :null_session + protect_from_forgery with: :null_session def execute variables = prepare_variables(params[:variables])
Enable protect_from_forgery with: :null_session for graphql controller
diff --git a/app/controllers/unlocks_controller.rb b/app/controllers/unlocks_controller.rb index abc1234..def5678 100644 --- a/app/controllers/unlocks_controller.rb +++ b/app/controllers/unlocks_controller.rb @@ -20,4 +20,8 @@ def after_sending_unlock_instructions_path_for(resource) after_devise_path end + + def after_unlock_path_for(resource) + root_path + end end
Fix JS Response for Unlocks Controller Show Update the UnlocksController show action to ensure that the return path when a user attempts to unlock their account via an email link is the root path with a flash message to login.
diff --git a/app/models/featured_products_block.rb b/app/models/featured_products_block.rb index abc1234..def5678 100644 --- a/app/models/featured_products_block.rb +++ b/app/models/featured_products_block.rb @@ -1,4 +1,6 @@ class FeaturedProductsBlock < Block + + attr_accessible :product_ids, :groups_of, :speed, :reflect settings_items :product_ids, :type => Array, :default => [] settings_items :groups_of, :type => :integer, :default => 3
Add att_accessible to FeaturedProductsBlock's setting_items (ActionItem3256)
diff --git a/app/models/observers/team_observer.rb b/app/models/observers/team_observer.rb index abc1234..def5678 100644 --- a/app/models/observers/team_observer.rb +++ b/app/models/observers/team_observer.rb @@ -1,3 +1,5 @@+# frozen_string_literal: true + class TeamObserver < ActiveRecord::Observer def after_destroy(team) Result.where(team_id: team.id).update_all(team_id: nil, team_name: nil, team_member: false) @@ -5,13 +7,14 @@ end def after_update(team) - if team.name_changed? || team.member_changed? - team.results.each do |result| - if result.team_name != team.name(result.year) || result.team_member? != team.member? - result.cache_attributes! :non_event - end - end + if team.member_changed? + Result.where(team_id: team.id).update_all(team_member: team.member) end + + if team.name_changed? + Result.where(team_id: team.id, year: RacingAssociation.current.year).update_all(team_name: team.name) + end + true end end
Optimize team name and member updates for teams with many results
diff --git a/releaf-core/spec/features/index_table_spec.rb b/releaf-core/spec/features/index_table_spec.rb index abc1234..def5678 100644 --- a/releaf-core/spec/features/index_table_spec.rb +++ b/releaf-core/spec/features/index_table_spec.rb @@ -13,18 +13,18 @@ visit admin_books_path within ".table.books thead tr" do - cells = ["Title", "Year", "Author", "Genre", "Summary html", "Active", "Published at", "Price", "Stars", "Cover image uid", "Description", "Author publisher title"] + cells = ["Title", "Year", "Author", "Genre", "Active", "Published at", "Price", "Stars", "Cover image uid", "Description", "Author publisher title"] expect(page).to have_cells_text(cells, type: "th") end within ".table.books tbody" do within "tr[data-id='#{@book_1.id}']" do - cells = ["good book", "", "Aleksandrs Lielais", "", "", "No", "", "", "", "", "", "ABC books"] + cells = ["good book", "", "Aleksandrs Lielais", "", "", "No", "", "", "", "", "ABC books"] expect(page).to have_cells_text(cells) end within "tr[data-id='#{@book_2.id}']" do - cells = ["steevs book", "", "Steve Lielais", "", "", "No", "", "", "", "", "", ""] + cells = ["steevs book", "", "Steve Lielais", "", "", "No", "", "", "", "", ""] expect(page).to have_cells_text(cells) end end
Index table feature test corrected
diff --git a/httparty-icebox.gemspec b/httparty-icebox.gemspec index abc1234..def5678 100644 --- a/httparty-icebox.gemspec +++ b/httparty-icebox.gemspec @@ -14,7 +14,7 @@ s.rubyforge_project = "httparty-icebox" - s.add_dependency("httparty", "~> 0.8.1") + s.add_dependency("httparty", "~> 0.9.0") s.files = `git ls-files`.split("\n") s.require_paths = ["lib"]
Update dependency to HTTParty 0.9.X
diff --git a/orientdb-schema-migrator.gemspec b/orientdb-schema-migrator.gemspec index abc1234..def5678 100644 --- a/orientdb-schema-migrator.gemspec +++ b/orientdb-schema-migrator.gemspec @@ -5,7 +5,7 @@ require 'rake' Gem::Specification.new do |spec| - spec.name = "orientdb_schema_migrator" + spec.name = "orientdb-schema-migrator" spec.version = OrientdbSchemaMigrator::VERSION spec.authors = ["CoPromote"] spec.email = ["info@copromote.com"]
Change gem name to use hyphens, not underscore. Not a big diff, but more consistent with general gem-naming conventions.