diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/Timepiece.podspec b/Timepiece.podspec
index abc1234..def5678 100644
--- a/Timepiece.podspec
+++ b/Timepiece.podspec
@@ -1,6 +1,6 @@ Pod::Spec.new do |s|
s.name = "Timepiece"
- s.version = "0.3.4"
+ s.version = `git describe --tags --abbrev=0`
s.summary = "Intuitive NSDate extensions in Swift"
s.homepage = "https://github.com/naoty/Timepiece"
s.license = { :type => "MIT", :file => "LICENSE" }
| Use git tag at podspec
|
diff --git a/lib/groonga_packages_regression_test/subcommand/install.rb b/lib/groonga_packages_regression_test/subcommand/install.rb
index abc1234..def5678 100644
--- a/lib/groonga_packages_regression_test/subcommand/install.rb
+++ b/lib/groonga_packages_regression_test/subcommand/install.rb
@@ -13,7 +13,7 @@ Dir.mktmpdir(tag) do |dir|
FileUtils.cd(dir) do
system("dockerfiroonga #{platform} > Dockerfile")
- system("sudo docker build -t #{tag} .")
+ system("sudo docker build -no-cache -t #{tag} .")
end
end
end
| Use -no-cache option to docker build
|
diff --git a/lib/metasploit_data_models/active_record_models/session.rb b/lib/metasploit_data_models/active_record_models/session.rb
index abc1234..def5678 100644
--- a/lib/metasploit_data_models/active_record_models/session.rb
+++ b/lib/metasploit_data_models/active_record_models/session.rb
@@ -17,9 +17,8 @@ before_destroy :stop
def upgradeable?
- return true if (self.stype == 'shell' and self.platform =~ /win/)
- else return false
- end
+ (self.platform =~ /win/ and self.stype == 'shell')
+ end
private
| Fix to the upgradeable? method to be all around better
|
diff --git a/spec/requests/quizzes_spec.rb b/spec/requests/quizzes_spec.rb
index abc1234..def5678 100644
--- a/spec/requests/quizzes_spec.rb
+++ b/spec/requests/quizzes_spec.rb
@@ -33,9 +33,11 @@
it 'does validation' do
login
+ stub_out_plus_discovery_document
+ stub_out_current_user_profile
visit new_quiz_path
click_button 'Create Quiz'
- ['Name', 'Owner', 'Playlist', 'Country alpha2'].each do |field|
+ ['Name', 'Playlist', 'Country alpha2'].each do |field|
page.should have_content("#{field} can't be blank")
end
end
| Set the quiz owner to the user's Google+ profile ID
|
diff --git a/lib/mr_mongo/loader.rb b/lib/mr_mongo/loader.rb
index abc1234..def5678 100644
--- a/lib/mr_mongo/loader.rb
+++ b/lib/mr_mongo/loader.rb
@@ -9,7 +9,7 @@ def load(file)
dsl_script = ::File.read(file).sub!(/^__END__\n.*\Z/m, '')
- map_reduce = load_from_string(dsl_script)
+ map_reduce = load_from_string(dsl_script, file)
InlineTemplateLoader.load(file).each do |key, val|
map_reduce.send("#{key}=".to_sym, val)
| Fix to set DSL file path as __FILE__
|
diff --git a/example/spec/views/project_assignments/index.html.erb_spec.rb b/example/spec/views/project_assignments/index.html.erb_spec.rb
index abc1234..def5678 100644
--- a/example/spec/views/project_assignments/index.html.erb_spec.rb
+++ b/example/spec/views/project_assignments/index.html.erb_spec.rb
@@ -6,7 +6,7 @@ before(:each) do
assign(:project_assignments, [
FactoryGirl.create(:project_assignment, project: project, user: user),
- FactoryGirl.create(:project_assignment, project: project, user: user)
+ FactoryGirl.create(:project_assignment, project: project, user: user),
])
end
| Add comma to even the last line of Hash/Array
|
diff --git a/lib/pay_dirt/result.rb b/lib/pay_dirt/result.rb
index abc1234..def5678 100644
--- a/lib/pay_dirt/result.rb
+++ b/lib/pay_dirt/result.rb
@@ -1,4 +1,5 @@ module PayDirt
+ # Provides developers with a [re]usable result object for their service objects to return.
class Result
# The response from a use case execution
#
| Work on documentation for the PayDirt::Result class
|
diff --git a/spec/integration/veritas/self_referential/one_to_many_spec.rb b/spec/integration/veritas/self_referential/one_to_many_spec.rb
index abc1234..def5678 100644
--- a/spec/integration/veritas/self_referential/one_to_many_spec.rb
+++ b/spec/integration/veritas/self_referential/one_to_many_spec.rb
@@ -1,6 +1,6 @@ require 'spec_helper_integration'
-describe 'Relationship - Self referential Many To One' do
+describe 'Relationship - Self referential One To Many' do
include_context 'Models and Mappers'
before(:all) do
| Fix example description for self referential 1:N specs
|
diff --git a/lib/happy-cli.rb b/lib/happy-cli.rb
index abc1234..def5678 100644
--- a/lib/happy-cli.rb
+++ b/lib/happy-cli.rb
@@ -24,7 +24,7 @@ if options[:git]
run "git init"
run "git add ."
- run "git commit -m 'Created new Schnitzelpress blog'"
+ run "git commit -m 'Created new Happy application using the '#{options[:template]}' template'"
end
end
end
| Fix message for first git commit |
diff --git a/lib/livereload-rails/middleware.rb b/lib/livereload-rails/middleware.rb
index abc1234..def5678 100644
--- a/lib/livereload-rails/middleware.rb
+++ b/lib/livereload-rails/middleware.rb
@@ -8,10 +8,11 @@ @app = app
@clients = WeakObservable.new
+ assets.digest = false
assets.configure do |environment|
@watcher = Watcher.new(environment.paths) do |path, event|
asset = environment.find_asset(path, bundle: false)
- @clients.notify("#{assets.prefix}/#{asset.digest_path}")
+ @clients.notify("#{assets.prefix}/#{asset.logical_path}")
end
@watcher_thread = Thread.new do
| Disable digests to help LiveReload find the file to reload! |
diff --git a/lib/vagrant/ansible_auto/cap/guest/posix/gateway_addresses.rb b/lib/vagrant/ansible_auto/cap/guest/posix/gateway_addresses.rb
index abc1234..def5678 100644
--- a/lib/vagrant/ansible_auto/cap/guest/posix/gateway_addresses.rb
+++ b/lib/vagrant/ansible_auto/cap/guest/posix/gateway_addresses.rb
@@ -17,39 +17,21 @@ def with_default_gateway_addresses(machine)
return enum_for(__method__, machine) unless block_given?
- seen_addresses = Set.new
- yield_unseen_address = lambda do |a|
- yield a unless seen_addresses.include? a
- seen_addresses << a
- end
-
machine.communicate.execute('ip route show', error_check: false) do |type, data|
if type == :stdout
- data.lines.each do |line|
- if line.start_with?('default')
- yield_unseen_address.call(line.split[2])
- end
- end
+ data.each_line { |l| yield l.split[2] if l.start_with? 'default' }
end
end
machine.communicate.execute('route -n', error_check: false) do |type, data|
if type == :stdout
- data.lines.each do |line|
- if line.start_with?('0.0.0.0')
- yield_unseen_address.call(line.split[1])
- end
- end
+ data.each_line { |l| yield l.split[1] if l.start_with? '0.0.0.0' }
end
end
machine.communicate.execute('netstat -rn', error_check: false) do |type, data|
if type == :stdout
- data.lines.each do |line|
- if line.start_with?('0.0.0.0')
- yield_unseen_address.call(line.split[1])
- end
- end
+ data.each_line { |l| yield l.split[1] if l.start_with? '0.0.0.0' }
end
end
end
| Simplify iteration over candidate gateway IP addresses
|
diff --git a/php_session-rails.gemspec b/php_session-rails.gemspec
index abc1234..def5678 100644
--- a/php_session-rails.gemspec
+++ b/php_session-rails.gemspec
@@ -10,7 +10,7 @@ spec.email = ["shinpeim@gmail.com"]
spec.description = %q{Read/write php session file from Ruby on Rails}
spec.summary = %q{Read/write php session file from Ruby on Rails. Multibyte strings are spported.}
- spec.homepage = ""
+ spec.homepage = "https://github.com/Shinpeim/php_session-rails"
spec.license = "MIT"
spec.files = `git ls-files`.split($/)
| Add homepage url to gemspec
|
diff --git a/lib/swoop/formatter.rb b/lib/swoop/formatter.rb
index abc1234..def5678 100644
--- a/lib/swoop/formatter.rb
+++ b/lib/swoop/formatter.rb
@@ -4,7 +4,7 @@ if Swoop.colorize?
"#{ severity[0].bold.send(severity_color(severity)) } #{ datetime.iso8601.bold.black } #{ (progname || "mytvh-web").bold }: #{ msg.strip }\n"
else
- "#{ severity[0] } #{ datetime.iso8601 } #{ progname || "mytvh-web" }: #{ msg.strip }\n"
+ "#{ severity[0] } #{ datetime.iso8601 } #{ progname || "rails" }: #{ msg.strip }\n"
end
end
| Use "rails" as default progname
|
diff --git a/lib/tasks/release.rake b/lib/tasks/release.rake
index abc1234..def5678 100644
--- a/lib/tasks/release.rake
+++ b/lib/tasks/release.rake
@@ -0,0 +1,12 @@+desc "Create git tag with version"
+task release: :environment do
+ sh "git tag -m \"Version #{version}\" #{version_tag}"
+end
+
+def version
+ DockerRails::Application::VERSION
+end
+
+def version_tag
+ "v#{version}"
+end
| Add simple task task for tagging
|
diff --git a/lib/web_game_engine.rb b/lib/web_game_engine.rb
index abc1234..def5678 100644
--- a/lib/web_game_engine.rb
+++ b/lib/web_game_engine.rb
@@ -2,12 +2,13 @@
class WebGameEngine
- attr_reader :ttt_board
- attr_accessor :comp_player
+ attr_accessor :ttt_board, :comp_player
def initialize(args)
@ttt_board = args.fetch(:ttt_board, nil)
@comp_player = args.fetch(:comp_player, nil)
+ @rules = args.fetch(:rules, nil)
end
+
end | Add accessors and rules to web game engine
|
diff --git a/lib/generators/templates/ie_conditional_tag.rb b/lib/generators/templates/ie_conditional_tag.rb
index abc1234..def5678 100644
--- a/lib/generators/templates/ie_conditional_tag.rb
+++ b/lib/generators/templates/ie_conditional_tag.rb
@@ -18,7 +18,7 @@
# For all other browsers
# Note: Don't remove this line-- or other browsers won't get a
- # visible body tag!
+ # visible tag!
config.on '!IE'
end
| Remove mention of body tag
|
diff --git a/activefile.gemspec b/activefile.gemspec
index abc1234..def5678 100644
--- a/activefile.gemspec
+++ b/activefile.gemspec
@@ -1,19 +1,19 @@ Gem::Specification.new do |s|
- s.name = 'activefile'
- s.version = '0.1'
- s.authors = 'David Heinemeier Hansson'
- s.email = 'david@basecamp.com'
- s.summary = 'Store files in Rails applications'
- s.homepage = 'https://github.com/rails/activefile'
- s.license = 'MIT'
+ s.name = "activefile"
+ s.version = "0.1"
+ s.authors = "David Heinemeier Hansson"
+ s.email = "david@basecamp.com"
+ s.summary = "Store files in Rails applications"
+ s.homepage = "https://github.com/rails/activefile"
+ s.license = "MIT"
- s.required_ruby_version = '>= 1.9.3'
+ s.required_ruby_version = ">= 1.9.3"
- s.add_dependency 'activesupport', '>= 5.1'
- s.add_dependency 'activerecord', '>= 5.1'
- s.add_dependency 'activejob', '>= 5.1'
+ s.add_dependency "activesupport", ">= 5.1"
+ s.add_dependency "activerecord", ">= 5.1"
+ s.add_dependency "activejob", ">= 5.1"
- s.add_development_dependency 'bundler', '~> 1.15'
+ s.add_development_dependency "bundler", "~> 1.15"
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- test/*`.split("\n")
| Switch to double quotes for Rails linter
|
diff --git a/app/models/manageiq/providers/ansible_tower/configuration_manager/configured_system.rb b/app/models/manageiq/providers/ansible_tower/configuration_manager/configured_system.rb
index abc1234..def5678 100644
--- a/app/models/manageiq/providers/ansible_tower/configuration_manager/configured_system.rb
+++ b/app/models/manageiq/providers/ansible_tower/configuration_manager/configured_system.rb
@@ -0,0 +1,17 @@+class ManageIQ::Providers::AnsibleTower::ConfigurationManager::ConfiguredSystem < ::ConfiguredSystem
+ include ProviderObjectMixin
+
+ def provider_object(connection = nil)
+ (connection || connection_source.connect).host(manager_ref)
+ end
+
+ def ext_management_system
+ configuration_manager
+ end
+
+ private
+
+ def connection_source(options = {})
+ options[:connection_source] || configuration_manager
+ end
+end
| Add Ansible Tower ConfiguredSystem subclass
|
diff --git a/google.rb b/google.rb
index abc1234..def5678 100644
--- a/google.rb
+++ b/google.rb
@@ -6,17 +6,17 @@ class Google
include Cinch::Plugin
plugin "google"
- help "!g(oogle) [number] <query> - search Google"
- match /g(?:oogle)? (.+)/
+ help "!g(oogle) [number] <query> - search Google (5 default results; give number for less)"
+ match /g(?:oogle)? (?:(\d+) )?(.+)/
- def execute(m, query)
- stop = 4
+ def execute(m, number, query)
+ number ||= 5
query = query.split(/\s+/).join(" ")
url = "http://www.google.com/search?q=#{CGI.escape(query)}"
doc = Nokogiri::HTML(open(url))
- results = doc.css('h3.r a.l')[0..(stop)]
+ results = doc.css('h3.r a.l')[0..(number - 1)]
if results[0].nil?
m.reply "No results found."
| Tweak regex following dominikh's advice
|
diff --git a/lib/usesthis/api/endpoint.rb b/lib/usesthis/api/endpoint.rb
index abc1234..def5678 100644
--- a/lib/usesthis/api/endpoint.rb
+++ b/lib/usesthis/api/endpoint.rb
@@ -25,12 +25,16 @@ item_count: @pagination[:item_count]
}
+ links = @pagination[:links].transform_values do |path|
+ 'https://usesthis.com' + path if path
+ end
+
hash[:links] = {
- self: @pagination[:links][:current_page],
- first: @pagination[:links][:first_page],
- last: @pagination[:links][:last_page],
- prev: @pagination[:links][:previous_page] || '',
- next: @pagination[:links][:next_page] || ''
+ self: links[:current_page],
+ first: links[:first_page],
+ last: links[:last_page],
+ prev: links[:previous_page] || '',
+ next: links[:next_page] || ''
}
end
end
| Switch pagination links to absolute URLs.
|
diff --git a/lib/carto/visualization_migrator.rb b/lib/carto/visualization_migrator.rb
index abc1234..def5678 100644
--- a/lib/carto/visualization_migrator.rb
+++ b/lib/carto/visualization_migrator.rb
@@ -8,6 +8,7 @@
layer_selector_migration(vis)
mapcap_creation(vis)
+ google_basemap_migration(vis)
end
def version_needs_migration?(version, new_version)
@@ -32,5 +33,14 @@
vis.overlays.select { |o| o.type == 'layer_selector' }.each(&:destroy)
end
+
+ def google_basemap_migration(vis)
+ # Editor gmaps were saved with base_type attribute in options, but, in builder, baseType is expected
+ vis.layers.select{ |l| l.gmapsbase? && l.options.has_key?(:base_type) }.each do |l|
+ l.options[:baseType] = l.options[:base_type]
+ l.options.delete(:base_type)
+ l.save!
+ end
+ end
end
end
| Fix editor -> builder migrations
Gmaps visualizations migrated from v2 to v3 were breaking JS
|
diff --git a/db/migrate/20190520142857_create_infrastructure_voltage_types.rb b/db/migrate/20190520142857_create_infrastructure_voltage_types.rb
index abc1234..def5678 100644
--- a/db/migrate/20190520142857_create_infrastructure_voltage_types.rb
+++ b/db/migrate/20190520142857_create_infrastructure_voltage_types.rb
@@ -1,7 +1,7 @@ class CreateInfrastructureVoltageTypes < ActiveRecord::Migration[5.2]
def change
create_table :infrastructure_voltage_types do |t|
- t.name :string
+ t.string :name
t.boolean :active
end
| Fix infrastructure voltage type db migration.
|
diff --git a/lib/netsuite/records/member_list.rb b/lib/netsuite/records/member_list.rb
index abc1234..def5678 100644
--- a/lib/netsuite/records/member_list.rb
+++ b/lib/netsuite/records/member_list.rb
@@ -2,8 +2,6 @@ module Records
class MemberList < Support::Sublist
include Namespaces::ListAcct
-
- fields :replace_all
sublist :item_member, ItemMember
| Remove duplicate definition of replace_all field on MemberList
Support::Sublist already defines the replace_all field.
|
diff --git a/config/initializers/date_formats.rb b/config/initializers/date_formats.rb
index abc1234..def5678 100644
--- a/config/initializers/date_formats.rb
+++ b/config/initializers/date_formats.rb
@@ -1,4 +1,4 @@ Time::DATE_FORMATS[:appointment_date] = lambda { |time| time.strftime("%A, %B #{time.day.ordinalize}") }
Time::DATE_FORMATS[:appointment_date_short] = "%d %b %y" #th Nov 09
Time::DATE_FORMATS[:appointment_time] = "%l %p"
-Time::DATE_FORMATS[:slot] = lambda { |time| time.strftime("%A at #{time.hour > 12 ? time.hour - 12 : time.hour}#{time.hour > 11 ? "pm" : "am"}") } # Thursday at 9am
+Time::DATE_FORMATS[:slot] = lambda { |time| time.strftime("%b #{time.day.ordinalize} at #{time.hour > 12 ? time.hour - 12 : time.hour}#{time.hour > 11 ? "pm" : "am"}") } # Nov 5th at 9am
| Tweak the slot date format
|
diff --git a/test/test_bad_schema_ref.rb b/test/test_bad_schema_ref.rb
index abc1234..def5678 100644
--- a/test/test_bad_schema_ref.rb
+++ b/test/test_bad_schema_ref.rb
@@ -29,7 +29,7 @@ schema = {
"$schema" => "http://json-schema.org/draft-04/schema#",
"type" => "array",
- "items" => { "$ref" => "http://ppcheesecheseunicornnuuuurrrrr.com/json.schema"}
+ "items" => { "$ref" => "http://ppcheesecheseunicornnuuuurrrrr.example.invalid/json.schema"}
}
data = [1,2,3]
| Use RFC 2606 reserved invalid DNS name in tests.
This test used a DNS name which, while currently not existing, is not
actually reserved. This can manifest as a test failure on poorly
configured (like Time Warner Cable) networks. This changes said DNS
name to one using a reserved invalid top level name as specified in
RFC 2606.
|
diff --git a/lib/toshi/web.rb b/lib/toshi/web.rb
index abc1234..def5678 100644
--- a/lib/toshi/web.rb
+++ b/lib/toshi/web.rb
@@ -17,8 +17,8 @@ @available_peers = Toshi::Models::Peer.count
@connected_peers = Toshi::Models::Peer.connected.count
@database_size = Toshi::Utils.database_size
- @tx_count = Toshi.db[:transactions].count()
- @unconfirmed_tx_count = Toshi.db[:unconfirmed_transactions].count()
+ @tx_count = Toshi::Models::Transaction.total_count,
+ @unconfirmed_tx_count = Toshi::Models::UnconfirmedTransaction.total_count,
@blocks_count = Toshi.db[:blocks].where(branch: 0).count()
@side_blocks_count = Toshi.db[:blocks].where(branch: 1).count()
@orphan_blocks_count = Toshi.db[:blocks].where(branch: 2).count()
| Use the faster total_count method here too
|
diff --git a/Library/Homebrew/test/livecheck/strategy/github_latest_spec.rb b/Library/Homebrew/test/livecheck/strategy/github_latest_spec.rb
index abc1234..def5678 100644
--- a/Library/Homebrew/test/livecheck/strategy/github_latest_spec.rb
+++ b/Library/Homebrew/test/livecheck/strategy/github_latest_spec.rb
@@ -7,7 +7,7 @@ subject(:github_latest) { described_class }
let(:github_release_artifact_url) {
- "https://github.com/example/example/releases/download/1.2.3/example-1.2.3.zip"
+ "https://github.com/example/example/releases/download/1.2.3/example-1.2.3.tar.gz"
}
let(:github_tag_archive_url) { "https://github.com/example/example/archive/v1.2.3.tar.gz" }
let(:github_repository_upload_url) { "https://github.com/downloads/example/example/example-1.2.3.tar.gz" }
| GithubLatest: Align test URL with example
|
diff --git a/Library/Homebrew/compat/tap.rb b/Library/Homebrew/compat/tap.rb
index abc1234..def5678 100644
--- a/Library/Homebrew/compat/tap.rb
+++ b/Library/Homebrew/compat/tap.rb
@@ -16,6 +16,8 @@ old_remote = path.git_origin
super(new_user, new_repo)
+
+ @repo_var = nil
new_initial_revision_var = "HOMEBREW_UPDATE_BEFORE#{repo_var}"
new_current_revision_var = "HOMEBREW_UPDATE_AFTER#{repo_var}"
| Reset `repo_var` so it actually is re-computed.
|
diff --git a/libraries/aws.rb b/libraries/aws.rb
index abc1234..def5678 100644
--- a/libraries/aws.rb
+++ b/libraries/aws.rb
@@ -26,7 +26,7 @@
chef_gem 'aws-sdk' do
version node['aws']['aws_sdk_version']
- compile_time true if Chef::Resource::ChefGem.method_defined?(:compile_time)
+ compile_time true
action :install
end
| Remove Chef 11 compatibility code
Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
|
diff --git a/db/migrate/20181102125923_add_constraints_to_most_recent_for_form_answer_transitions.rb b/db/migrate/20181102125923_add_constraints_to_most_recent_for_form_answer_transitions.rb
index abc1234..def5678 100644
--- a/db/migrate/20181102125923_add_constraints_to_most_recent_for_form_answer_transitions.rb
+++ b/db/migrate/20181102125923_add_constraints_to_most_recent_for_form_answer_transitions.rb
@@ -2,6 +2,7 @@ disable_ddl_transaction!
def up
+ system('bundle exec rake statesman:backfill_most_recent[FormAnswer]')
add_index :form_answer_transitions, [:form_answer_id, :most_recent], unique: true, where: "most_recent", name: "index_form_answer_transitions_parent_most_recent", algorithm: :concurrently
change_column_null :form_answer_transitions, :most_recent, false
end
| Add missing rake task which should run before migration.
|
diff --git a/Casks/intel-haxm.rb b/Casks/intel-haxm.rb
index abc1234..def5678 100644
--- a/Casks/intel-haxm.rb
+++ b/Casks/intel-haxm.rb
@@ -1,22 +1,20 @@ cask :v1 => 'intel-haxm' do
- version '1.1.1'
- sha256 'dd6dabfc34ebf73a19bc34eecfb5d8c4269773e3108ee6ef71ae2a5eacfd37d2'
+ version '1.1.4'
+ sha256 '41ec5833015b17f147e2c9cc623f0dfc7ea33592f876f049bb11e69d6144ddc7'
- url 'https://software.intel.com/sites/default/files/managed/21/5f/haxm-macosx_r05.zip'
+ url 'https://software.intel.com/sites/default/files/haxm-macosx_r05.zip'
name 'Intel HAXM'
homepage 'https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager'
- license :unknown # todo: change license and remove this comment; ':unknown' is a machine-generated placeholder
+ license :closed
- if MacOS.release <= :mountain_lion
- container :nested => "haxm-macosx_r05/IntelHAXM_#{version}_for_below_10_9.dmg"
- else
- container :nested => "haxm-macosx_r05/IntelHAXM_#{version}_for_10_9_and_above.dmg"
- end
-
- pkg "IntelHAXM_#{version}.mpkg"
+ installer :script => 'silent_install.sh',
+ :sudo => true,
+ :must_succeed => true
uninstall :script => {
- :executable => '/System/Library/Extensions/intelhaxm.kext/Contents/Resources/uninstall.sh',
- :input => ['y']
+ :sudo => true,
+ :must_succeed => true,
+ :executable => 'silent_install.sh',
+ :args => ['-u']
}
end
| Upgrade Intel HAXM to 1.1.4
Previous download URL returns a 404 error (not found)
Uses the provided install and uninstall script (silent_install.sh)
|
diff --git a/Casks/opera-beta.rb b/Casks/opera-beta.rb
index abc1234..def5678 100644
--- a/Casks/opera-beta.rb
+++ b/Casks/opera-beta.rb
@@ -1,6 +1,6 @@ cask :v1 => 'opera-beta' do
- version '29.0.1795.41'
- sha256 'e7f013637993189ee96409fd647bbc00fa94bde544e2604c36cde230ad717063'
+ version '30.0.1835.18'
+ sha256 '7c27bfd506a5d3a9a41eabd27908344269d1d4f5a85d451d2d2ce0a9ee602993'
url "http://get.geo.opera.com/pub/opera-beta/#{version}/mac/Opera_beta_#{version}_Setup.dmg"
homepage 'http://www.opera.com/computer/beta'
| Upgrade Opera Beta.app to v30.0.1835.18
|
diff --git a/lingohub.gemspec b/lingohub.gemspec
index abc1234..def5678 100644
--- a/lingohub.gemspec
+++ b/lingohub.gemspec
@@ -1,3 +1,5 @@+# -*- encoding: utf-8 -*-
+
require File.expand_path("../lib/lingohub/version", __FILE__)
Gem::Specification.new do |gem|
| Add encoding declaration to the gemspec file |
diff --git a/everyday.gemspec b/everyday.gemspec
index abc1234..def5678 100644
--- a/everyday.gemspec
+++ b/everyday.gemspec
@@ -17,7 +17,7 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]
- spec.add_development_dependency "bundler", "~> 1.7"
+ spec.add_development_dependency "bundler", "~> 1.8"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "minitest", "~> 5.5"
end
| Update bundler version from 1.7 to 1.8
|
diff --git a/analysand.gemspec b/analysand.gemspec
index abc1234..def5678 100644
--- a/analysand.gemspec
+++ b/analysand.gemspec
@@ -23,6 +23,7 @@ gem.add_dependency 'rack'
gem.add_dependency 'yajl-ruby'
+ gem.add_development_dependency 'rake'
gem.add_development_dependency 'rspec'
gem.add_development_dependency 'vcr'
gem.add_development_dependency 'webmock'
| Add Rake as a development dependency.
|
diff --git a/app/models/user.rb b/app/models/user.rb
index abc1234..def5678 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -2,17 +2,25 @@ #
# Table name: users
#
-# id :integer not null, primary key
-# first_name :string
-# last_name :string
-# ssn :string
-# dob :date
-# created_at :datetime not null
-# updated_at :datetime not null
-# phone_number :string
-# sex :string
-# vet_status :boolean
-# grade :decimal(8, 5)
+# id :integer not null, primary key
+# first_name :string
+# last_name :string
+# ssn :string
+# dob :date
+# created_at :datetime not null
+# updated_at :datetime not null
+# phone_number :string
+# grade :decimal(8, 5)
+# fleeing :boolean
+# incarcerated :boolean
+# welfare :boolean
+# insufficent_income :boolean
+# alcohol_or_drug_abuse :boolean
+# physical_health_issue :boolean
+# mental_health_issue :boolean
+# exchange_for_sex :boolean
+# sex :string
+# vet_status :boolean
#
class User < ApplicationRecord
| Update Users model attribute comment
|
diff --git a/app/models/user.rb b/app/models/user.rb
index abc1234..def5678 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -11,7 +11,6 @@ def init
self.first_name ||= ""
self.last_name ||= ""
- self.username ||= ""
self.password ||= ""
self.role ||= ""
self.manager_id ||= 0.0
| Change models to reflect the changes in the db
|
diff --git a/app/decorators/manageiq/providers/network_manager_decorator.rb b/app/decorators/manageiq/providers/network_manager_decorator.rb
index abc1234..def5678 100644
--- a/app/decorators/manageiq/providers/network_manager_decorator.rb
+++ b/app/decorators/manageiq/providers/network_manager_decorator.rb
@@ -0,0 +1,42 @@+class ManageIQ::Providers::NetworkManagerDecorator < MiqDecorator
+ def self.fonticon
+ 'pficon pficon-server'
+ end
+
+ def fonticon
+ nil
+ end
+
+ def fileicon
+ "svg/vendor-#{image_name}.svg"
+ end
+
+ def quadicon
+ icon = {
+ :top_left => {
+ :text => t = cloud_networks.size,
+ :tooltip => n_("%{number} Cloud Network", "%{number} Cloud Networks", t) % {:number => t}
+ },
+ :top_right => {
+ :text => t = security_groups.size,
+ :tooltip => n_("%{number} Security Group", "%{number} Security Groups", t) % {:number => t}
+ },
+ :bottom_left => {
+ :fileicon => fileicon,
+ :tooltip => ui_lookup(:model => type)
+ },
+ :bottom_right => {
+ :fileicon => QuadiconHelper.status_img(authentication_status),
+ :tooltip => authentication_status
+ }
+ }
+ icon[:middle] = { :fileicon => '100/shield.png' } if get_policies.present?
+ icon
+ end
+
+ def single_quad
+ {
+ :fileicon => fileicon
+ }
+ end
+end
| Add a separate decorator for Network Providers
|
diff --git a/lib/App/Support/Scheduler.rb b/lib/App/Support/Scheduler.rb
index abc1234..def5678 100644
--- a/lib/App/Support/Scheduler.rb
+++ b/lib/App/Support/Scheduler.rb
@@ -43,6 +43,8 @@ if @config['cleanup_frequency'] > 0
pid = fork do
trap("INT") { exit }
+ trap("EXIT") { exit }
+ trap("QUIT") { exit }
while true
sleep @config['cleanup_frequency']
@tasks.each do |task|
| Exit on any of the exit statuses
|
diff --git a/lib/catarse_stripe/engine.rb b/lib/catarse_stripe/engine.rb
index abc1234..def5678 100644
--- a/lib/catarse_stripe/engine.rb
+++ b/lib/catarse_stripe/engine.rb
@@ -7,7 +7,7 @@ class Mapper
def mount_catarse_stripe_at(catarse_stripe)
namespace CatarseStripe do
- namespeace :payment do
+ namespace :payment do
get '/stripe/:id/review' => 'stripe#review', :as => 'review_stripe'
post '/stripe/notifications' => 'stripe#ipn', :as => 'ipn_stripe'
match '/stripe/:id/notifications' => 'stripe#notifications', :as => 'notifications_stripe'
| Change route to share application
|
diff --git a/lib/catarse_stripe/engine.rb b/lib/catarse_stripe/engine.rb
index abc1234..def5678 100644
--- a/lib/catarse_stripe/engine.rb
+++ b/lib/catarse_stripe/engine.rb
@@ -6,7 +6,7 @@ module ActionDispatch::Routing
class Mapper
def mount_catarse_stripe_at(catarse_stripe)
- namespace :payment do
+ scope :payment do
get '/stripe/:id/review' => 'stripe#review', :as => 'review_stripe'
post '/stripe/notifications' => 'stripe#ipn', :as => 'ipn_stripe'
match '/stripe/:id/notifications' => 'stripe#notifications', :as => 'notifications_stripe'
| Change route to share application
|
diff --git a/prawn-emoji.gemspec b/prawn-emoji.gemspec
index abc1234..def5678 100644
--- a/prawn-emoji.gemspec
+++ b/prawn-emoji.gemspec
@@ -19,7 +19,7 @@ spec.require_path = 'lib'
spec.add_runtime_dependency 'prawn', '~> 2.3'
- spec.add_runtime_dependency 'unicode-emoji', '~> 3.1.0'
+ spec.add_runtime_dependency 'unicode-emoji', '~> 3.1'
spec.add_development_dependency 'rake'
spec.add_development_dependency 'test-unit', '>= 3.3.9'
| Exclude patch version from version constraints
|
diff --git a/unchanged_validator.gemspec b/unchanged_validator.gemspec
index abc1234..def5678 100644
--- a/unchanged_validator.gemspec
+++ b/unchanged_validator.gemspec
@@ -18,6 +18,8 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]
+ spec.add_runtime_dependency "activemodel", ">= 3.1"
+
spec.add_development_dependency "bundler", "~> 1.6"
spec.add_development_dependency "rake", "~> 10.0"
end
| Add runtime dependency on activmodel (>= 3.1)
|
diff --git a/git_diff.gemspec b/git_diff.gemspec
index abc1234..def5678 100644
--- a/git_diff.gemspec
+++ b/git_diff.gemspec
@@ -7,7 +7,7 @@ spec.name = "git_diff"
spec.version = GitDiff::VERSION
spec.authors = ["Andrew Olson"]
- spec.email = ["aolson@geezeo.com"]
+ spec.email = ["anolson@gmail.com"]
spec.summary = %q{A Ruby library for parsing git diffs.}
spec.license = "MIT"
| Update email in Gem spec. |
diff --git a/lib/dimples/configuration.rb b/lib/dimples/configuration.rb
index abc1234..def5678 100644
--- a/lib/dimples/configuration.rb
+++ b/lib/dimples/configuration.rb
@@ -18,13 +18,13 @@
def self.default_generation
{
- paginated_posts: true,
categories: true,
post_feeds: true,
category_feeds: true,
archive_feeds: true,
+ archives: true,
year_archives: true,
month_archives: true,
day_archives: true
@@ -41,12 +41,10 @@
def self.default_layouts
{
- posts: 'posts',
post: 'post',
category: 'category',
- year_archives: 'year_archives',
- month_archives: 'month_archives',
- day_archives: 'day_archives'
+ archives: 'archives',
+ date_archives: 'archives'
}
end
@@ -60,6 +58,7 @@
def self.default_pagination
{
+ page_prefix: 'page',
per_page: 10
}
end
| Tweak the archive configs, add the page_prefix
|
diff --git a/lib/ntee/search_dimension.rb b/lib/ntee/search_dimension.rb
index abc1234..def5678 100644
--- a/lib/ntee/search_dimension.rb
+++ b/lib/ntee/search_dimension.rb
@@ -1,13 +1,13 @@ require 'search_dimensions'
module NTEE
- class SearchDimension < SearchDimensions::HierarchicalDimension
+ class HierarchicalDimension < SearchDimensions::HierarchicalDimension
def value_class
- NTEE::DimensionValue
+ NTEE::HierarchicalDimensionValue
end
end
- class DimensionValue < SearchDimensions::HierarchicalValue
+ class HierarchicalDimensionValue < SearchDimensions::HierarchicalValue
def category
NTEE.category(leaf_value)
end
@@ -24,4 +24,24 @@ super.sort_by(&:label)
end
end
+
+ class FlatDimension < SearchDimensions::Dimension
+ def value_class
+ NTEE::FlatDimensionValue
+ end
+ end
+
+ class FlatDimensionValue < SearchDimensions::DimensionValue
+ def category
+ NTEE.category(value)
+ end
+
+ def label
+ category ? category.name : super
+ end
+
+ def param_value
+ category ? category.code : super
+ end
+ end
end | Allow hierarchical or flat NTEE dimensions (because Thoth client receives flattened values)
|
diff --git a/lib/resque/metrics_logger.rb b/lib/resque/metrics_logger.rb
index abc1234..def5678 100644
--- a/lib/resque/metrics_logger.rb
+++ b/lib/resque/metrics_logger.rb
@@ -11,7 +11,7 @@ Resque::Metrics.on_job_complete do |job_class, queue, time|
CartoDB::Resque::Metrics.logger.info(
{:event => :job_complete,
- :job_class => job_class,
+ :job_class => job_class.class,
:queue => queue,
:time => time}.to_json
)
@@ -20,7 +20,7 @@ Resque::Metrics.on_job_enqueue do |job_class, queue, time|
CartoDB::Resque::Metrics.logger.info(
{:event => :job_enqueue,
- :job_class => job_class,
+ :job_class => job_class.class,
:queue => queue,
:time => time}.to_json
)
@@ -29,7 +29,7 @@ Resque::Metrics.on_job_fork do |job_class, queue|
CartoDB::Resque::Metrics.logger.info(
{:event => :job_fork,
- :job_class => job_class,
+ :job_class => job_class.class,
:queue => queue}.to_json
)
end
@@ -37,7 +37,7 @@ Resque::Metrics.on_job_failure do |job_class, queue, time|
CartoDB::Resque::Metrics.logger.info(
{:event => :job_failure,
- :job_class => job_class,
+ :job_class => job_class.class,
:queue => queue,
:time => time}.to_json
)
| Use import job class name instead of to_json
|
diff --git a/week-4/4-2/simple-string.rb b/week-4/4-2/simple-string.rb
index abc1234..def5678 100644
--- a/week-4/4-2/simple-string.rb
+++ b/week-4/4-2/simple-string.rb
@@ -0,0 +1,26 @@+# Solution Below
+old_string = "Ruby is cool"
+new_string = old_string.reverse.upcase
+
+# RSpec Tests. They are included in this file because the local variables you are creating are not accessible across files. If we try to run these files as a separate file per normal operation, the local variable checks will return nil.
+
+
+describe "old_string" do
+ it 'is defined as a local variable' do
+ expect(defined?(old_string)).to eq 'local-variable'
+ end
+
+ it "has the value 'Ruby is cool'" do
+ expect(old_string).to eq "Ruby is cool"
+ end
+end
+
+describe 'new_string' do
+ it 'is defined as a local variable' do
+ expect(defined?(new_string)).to eq 'local-variable'
+ end
+
+ it 'has the value "LOOC SI YBUR"' do
+ expect(new_string).to eq "LOOC SI YBUR"
+ end
+end | Test files for 4.2 submission
|
diff --git a/harness.gemspec b/harness.gemspec
index abc1234..def5678 100644
--- a/harness.gemspec
+++ b/harness.gemspec
@@ -26,4 +26,5 @@ gem.add_development_dependency "sidekiq"
gem.add_development_dependency "active_model_serializers"
gem.add_development_dependency "rails"
+ gem.add_development_dependency "minitest"
end
| Add minitest as a development_dependency
|
diff --git a/veil.gemspec b/veil.gemspec
index abc1234..def5678 100644
--- a/veil.gemspec
+++ b/veil.gemspec
@@ -12,6 +12,7 @@
spec.summary = %q{Veil is a Ruby Gem for generating secure secrets from a shared secret}
spec.description = spec.summary
+ spec.license = "Apache-2.0"
spec.homepage = "https://github.com/chef/chef-server/"
spec.files = Find.find("./").select { |f| !File.directory?(f) }
| Add licensing information for the transitive dependencies of Chef Server.
|
diff --git a/test/test_helper.rb b/test/test_helper.rb
index abc1234..def5678 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -32,6 +32,7 @@
def setup
DatabaseCleaner.start
+ I18n.locale = I18n.default_locale
end
def teardown
| Set default locale before each test
app/views/selection_notification/make_notification.text.erb overwrites
locale, leading to flip flopping tests.
|
diff --git a/Forecastr.podspec b/Forecastr.podspec
index abc1234..def5678 100644
--- a/Forecastr.podspec
+++ b/Forecastr.podspec
@@ -1,11 +1,11 @@ Pod::Spec.new do |s|
s.name = "Forecastr"
- s.version = "0.0.1"
- s.summary = "A simple Objective-C wrapper for the Forecast.io API"
+ s.version = "0.0.2"
+ s.summary = "A simple Objective-C wrapper for the Forecast.io API."
s.homepage = "https://github.com/iwasrobbed/Forecastr"
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = 'Rob Phillips'
- s.source = { :git => "https://github.com/iwasrobbed/Forecastr.git", :commit => "4638d7b2f6" }
+ s.source = { :git => "https://github.com/iwasrobbed/Forecastr.git", :tag => "v0.0.2" }
s.platform = :ios, '5.0'
s.source_files = 'Forecastr'
s.resources = "Forecastr/*.plist"
| Update cocoapod spec to 0.0.2
|
diff --git a/Formula/gqview.rb b/Formula/gqview.rb
index abc1234..def5678 100644
--- a/Formula/gqview.rb
+++ b/Formula/gqview.rb
@@ -0,0 +1,14 @@+require 'formula'
+
+class Gqview <Formula
+ url 'http://downloads.sourceforge.net/project/gqview/gqview/2.0.4/gqview-2.0.4.tar.gz'
+ homepage 'http://gqview.sourceforge.net'
+ md5 '7196deab04db94cec2167637cddc02f9'
+
+ depends_on 'gtk+'
+
+ def install
+ system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}", "--mandir=#{man}"
+ system "make install"
+ end
+end
| Add formula for GQview, a gtk-based image browser.
Signed-off-by: Adam Vandenberg <34c2b6407fd5a10249a15d699d40f9ed1782e98c@gmail.com>
|
diff --git a/HRLEngine.podspec b/HRLEngine.podspec
index abc1234..def5678 100644
--- a/HRLEngine.podspec
+++ b/HRLEngine.podspec
@@ -1,10 +1,10 @@ Pod::Spec.new do |s|
s.name = 'HRLEngine'
- s.version = '0.2.6'
- s.summary = 'Use Machine Learning to predict if a person is working out based of his/her heart rate.'
+ s.version = '0.2.8'
+ s.summary = '(DEPRECATED) Use Machine Learning to predict if a person is working out based of his/her heart rate.'
s.description = <<-DESC
-Use Machine Learning to predict if a person is working out based of his/her heart rate.
+(DEPRECATED) Use Machine Learning to predict if a person is working out based of his/her heart rate.
DESC
s.homepage = 'https://github.com/HeartRateLearning/HRLEngine'
| Update README: repo is deprecated ... again :)
|
diff --git a/InstagramSimpleOAuth.podspec b/InstagramSimpleOAuth.podspec
index abc1234..def5678 100644
--- a/InstagramSimpleOAuth.podspec
+++ b/InstagramSimpleOAuth.podspec
@@ -9,7 +9,7 @@ s.requires_arc = true
s.platform = :ios
s.ios.deployment_target = '8.0'
- s.public_header_files = 'InstagramaSimpleOAuth/Source/InstagramSimpleOAuth.h', 'InstagramSimpleOAuth/Source/InstagramSimpleOAuthViewController.h',
+ s.public_header_files = 'InstagramSimpleOAuth/Source/InstagramSimpleOAuth.h', 'InstagramSimpleOAuth/Source/InstagramSimpleOAuthViewController.h',
'InstagramSimpleOAuth/Source/InstagramLoginResponse.h', 'InstagramSimpleOAuth/Source/InstagramUser.h'
s.source_files = 'InstagramSimpleOAuth/Source/*.{h,m}'
s.resources = 'InstagramSimpleOAuth/Source/*.xib'
| Fix really dumb podspec error
|
diff --git a/MGCommand.podspec b/MGCommand.podspec
index abc1234..def5678 100644
--- a/MGCommand.podspec
+++ b/MGCommand.podspec
@@ -1,11 +1,11 @@ Pod::Spec.new do |s|
s.name = "MGCommand"
- s.version = "0.0.1"
+ s.version = "0.0.2"
s.summary = "This library provides a lightweight way for executing commands sequentially or concurrently."
s.homepage = "https://github.com/MattesGroeger/MGCommand"
s.license = 'MIT'
s.author = { "Mattes Groeger" => "info@mattes-groeger.de" }
- s.source = { :git => "https://github.com/MattesGroeger/MGCommand.git", :tag => "0.0.1" }
+ s.source = { :git => "https://github.com/MattesGroeger/MGCommand.git", :tag => "0.0.2" }
s.source_files = 'MGCommand/Classes/**/*.{h,m}'
s.requires_arc = true
end
| Set podspec version to 0.0.2
|
diff --git a/lib/rom/session.rb b/lib/rom/session.rb
index abc1234..def5678 100644
--- a/lib/rom/session.rb
+++ b/lib/rom/session.rb
@@ -21,7 +21,7 @@ # @yieldparam [Session::Environment]
#
# @api public
- def self.start(environment, &block)
+ def self.start(environment)
yield(new(Environment.new(environment, Tracker.new)))
end
| Simplify Session.start signature and kill mutation
|
diff --git a/recipes/default.rb b/recipes/default.rb
index abc1234..def5678 100644
--- a/recipes/default.rb
+++ b/recipes/default.rb
@@ -26,4 +26,5 @@
git "#{ENV['HOME']}/.janus" do
repository 'git@github.com:pr0d1r2/dotjanus.git'
+ user node['current_user']
end
| Add user for git retrieval
|
diff --git a/lib/arena_api.rb b/lib/arena_api.rb
index abc1234..def5678 100644
--- a/lib/arena_api.rb
+++ b/lib/arena_api.rb
@@ -4,6 +4,7 @@
module ArenaApi
API_VERSION = 'v1'
+ COLLECTION_LIMIT = 400
end
require 'arena_api/resource'
require 'arena_api/bom_item'
| Add the maximum collection return as a constant
So users of the items-search API can retrieve the maximum
|
diff --git a/db/data_migration/20210225103359_update_pa_ur_translations_to_pa_pk.rb b/db/data_migration/20210225103359_update_pa_ur_translations_to_pa_pk.rb
index abc1234..def5678 100644
--- a/db/data_migration/20210225103359_update_pa_ur_translations_to_pa_pk.rb
+++ b/db/data_migration/20210225103359_update_pa_ur_translations_to_pa_pk.rb
@@ -0,0 +1,9 @@+translations = Edition::Translation.where(locale: "pa-ur")
+
+translations.update_all(locale: "pa-pk")
+
+document_ids = Edition.distinct.where(id: translations.select(:edition_id)).pluck(:document_id)
+
+document_ids.each do |id|
+ PublishingApiDocumentRepublishingWorker.perform_async_in_queue("bulk_republishing", id)
+end
| Migrate translations from unsupported pa-ur locale to pa-pk
Co-authored-by: Peter Hartshorn <1117c31d7ee48714d5fa71842e06c8443afb8c81@digital.cabinet-office.gov.uk>
|
diff --git a/lib/mdss/init.rb b/lib/mdss/init.rb
index abc1234..def5678 100644
--- a/lib/mdss/init.rb
+++ b/lib/mdss/init.rb
@@ -2,6 +2,8 @@ require_relative 'extra'
class MDSSInit
+ @@helper = MDSSExtra.new
+
def self.mdss_init(name)
MDSSExtra.new.puts_err("Directory exists") if File.exists?(name)
@@ -10,35 +12,19 @@ File.open("#{name}/.mdss.cfg", 'w+') do |cfg|
cfg.write("name=#{name}")
end
+ FileUtils.touch("#{name}/index.md")
- self.css(name)
- self.img(name)
- self.js(name)
+ self.init_dir(name, "css", "CSS", "styles.css")
+ self.init_dir(name, "js", "JavaScript", "scripts.js")
+ self.init_dir(name, "img", "Image")
end
- def self.css(name)
- if File.exists?("#{name}/css")
- MDSSExtra.new.puts_warn("CSS folder exists, skipping")
+ def self.init_dir(name, dirname, warn, file = nil)
+ if File.exists?("#{name}/#{dirname}")
+ helper.puts_warn("#{warn} folder exists, skipping")
else
- Dir.mkdir("#{name}/css")
- FileUtils.touch("#{name}/css/styles.css")
- end
- end
-
- def self.img(name)
- if File.exists?("#{name}/img")
- MDSSExtra.new.puts_warn("Image folder exists, skipping")
- else
- Dir.mkdir("#{name}/img")
- end
- end
-
- def self.js(name)
- if File.exists?("#{name}/js")
- MDSSExtra.new.puts_warn("JavaScript folder exists, skipping")
- else
- Dir.mkdir("#{name}/js")
- FileUtils.touch("#{name}/js/scripts.js")
+ Dir.mkdir("#{name}/#{dirname}")
+ FileUtils.touch("#{name}/#{dirname}/#{file}") unless file.nil?
end
end
end
| Create index.md in new sites
|
diff --git a/Casks/handbrakecli-nightly.rb b/Casks/handbrakecli-nightly.rb
index abc1234..def5678 100644
--- a/Casks/handbrakecli-nightly.rb
+++ b/Casks/handbrakecli-nightly.rb
@@ -1,6 +1,6 @@ cask :v1 => 'handbrakecli-nightly' do
- version '6822svn'
- sha256 '06b3024888643041779f4ac301266739ef6a6c4a30972a951aec881fb28f50c3'
+ version '6859svn'
+ sha256 '656a716c4c75d325cdfda874db4215ba280355b672c6f19ae5dd01325955d5af'
url "http://download.handbrake.fr/nightly/HandBrake-#{version}-MacOSX.6_CLI_x86_64.dmg"
homepage 'http://handbrake.fr'
| Update HandbrakeCLI Nightly to v6859svn
HandBrakeCLI Nightly v6859svn built 2015-02-02.
|
diff --git a/spanner/spec/quickstart_spec.rb b/spanner/spec/quickstart_spec.rb
index abc1234..def5678 100644
--- a/spanner/spec/quickstart_spec.rb
+++ b/spanner/spec/quickstart_spec.rb
@@ -33,7 +33,7 @@
expect {
load File.expand_path("../quickstart.rb", __dir__)
- }.to output("1").to_stdout
+ }.to output(/1/).to_stdout
end
end
| Fix spec test for spanner quickstart
|
diff --git a/db/migrate/20161014085122_add_builder_enabled_to_organizations.rb b/db/migrate/20161014085122_add_builder_enabled_to_organizations.rb
index abc1234..def5678 100644
--- a/db/migrate/20161014085122_add_builder_enabled_to_organizations.rb
+++ b/db/migrate/20161014085122_add_builder_enabled_to_organizations.rb
@@ -4,8 +4,8 @@ add_column :builder_enabled, :boolean, null: false, default: false
end
+ Rails::Sequel.connection.run('UPDATE users SET builder_enabled = true WHERE builder_enabled IS NULL')
alter_table :users do
- Rails::Sequel.connection.run('UPDATE users SET builder_enabled = true WHERE builder_enabled IS NULL')
set_column_default :builder_enabled, false
set_column_not_null :builder_enabled
end
| Move alter outside of migration block
|
diff --git a/spec/models/reservation_spec.rb b/spec/models/reservation_spec.rb
index abc1234..def5678 100644
--- a/spec/models/reservation_spec.rb
+++ b/spec/models/reservation_spec.rb
@@ -7,10 +7,24 @@
context 'with schedule item starting in the past' do
subject { build(:reservation, schedule_item: build(:schedule_item, start: DateTime.now - 1.day ))}
+
it 'is invalid' do
is_expected.to be_invalid
expect(subject.errors[:schedule_item]).to include('can\'t make reservations for items from the past')
end
end
+
+ context 'with schedule_items that can\'t accept any more users' do
+ before :each do
+ @full_schedule_item = create(:schedule_item, capacity: 1)
+ create(:reservation, schedule_item: @full_schedule_item)
+ end
+
+ subject { build(:reservation, schedule_item: @full_schedule_item) }
+ it 'is invalid' do
+ is_expected.to be_invalid
+ expect(subject.errors[:schedule_item]).to include('schedule_item capacity exceeded')
+ end
+ end
end
end
| Add checking for full schedule items to specs
|
diff --git a/spec/requests/rails_api_spec.rb b/spec/requests/rails_api_spec.rb
index abc1234..def5678 100644
--- a/spec/requests/rails_api_spec.rb
+++ b/spec/requests/rails_api_spec.rb
@@ -4,7 +4,9 @@ let(:params) {}
let(:headers) {}
- describe 'GET articles index' do
+ describe 'GET request' do
+ before { pending }
+
subject(:api_call) { get '/rails_api/articles', params, headers }
it_should_behave_like 'a warden authenticatable api'
| Mark rails API specs as pending
|
diff --git a/spec/support/shared_examples.rb b/spec/support/shared_examples.rb
index abc1234..def5678 100644
--- a/spec/support/shared_examples.rb
+++ b/spec/support/shared_examples.rb
@@ -1,4 +1,4 @@-shared_examples :node_set do |options|
+RSpec.shared_examples :node_set do |options|
example 'return a NodeSet instance' do
@set.is_a?(Oga::XML::NodeSet).should == true
end
@@ -8,7 +8,7 @@ end
end
-shared_examples :empty_node_set do
+RSpec.shared_examples :empty_node_set do
example 'return a NodeSet instance' do
@set.is_a?(Oga::XML::NodeSet).should == true
end
| Use RSpec.shared_example vs just shared_example.
|
diff --git a/sparkle_formation.gemspec b/sparkle_formation.gemspec
index abc1234..def5678 100644
--- a/sparkle_formation.gemspec
+++ b/sparkle_formation.gemspec
@@ -10,7 +10,7 @@ s.description = 'Ruby DSL for programmatic orchestration API template generation'
s.license = 'Apache-2.0'
s.require_path = 'lib'
- s.required_ruby_version = '>= 2.0'
+ s.required_ruby_version = '>= 2.1'
s.add_runtime_dependency 'attribute_struct', '>= 0.3.0', '< 0.5'
s.add_runtime_dependency 'multi_json'
s.add_runtime_dependency 'bogo'
| Increase the minimum ruby version constraint to 2.1
|
diff --git a/spec/lib/construi_spec.rb b/spec/lib/construi_spec.rb
index abc1234..def5678 100644
--- a/spec/lib/construi_spec.rb
+++ b/spec/lib/construi_spec.rb
@@ -0,0 +1,20 @@+require 'spec_helper'
+
+RSpec.describe Construi do
+ describe 'run' do
+ let(:targets) { ['target1', 'target2'] }
+ let(:config) { { 'image' => 'image:latest' } }
+
+ let(:runner) { instance_double(Construi::Runner).as_null_object }
+ let(:runner_class) { class_double(Construi::Runner).as_stubbed_const }
+
+ before { allow(Construi::Config).to receive(:load_file).with('construi.yml').and_return(config) }
+ before { allow(runner_class).to receive(:new).with(config).and_return runner }
+
+ subject! { Construi.run(targets) }
+
+ it { expect(runner_class).to have_received(:new).with(config) }
+ it { expect(runner).to have_received(:run).with(targets) }
+ end
+end
+
| Add tests for Construi module
|
diff --git a/GSKStretchyHeaderView.podspec b/GSKStretchyHeaderView.podspec
index abc1234..def5678 100644
--- a/GSKStretchyHeaderView.podspec
+++ b/GSKStretchyHeaderView.podspec
@@ -3,11 +3,9 @@ s.version = "0.1.0"
s.summary = "A short description of GSKStretchyHeaderView."
- s.description = <<-DESC
- DESC
-
+ s.description = "A generic, easy to use stretchy header view for UITableView and UICollectionView"
s.homepage = "https://github.com/gskbyte/GSKStretchyHeaderView"
- # s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
+ s.screenshots = "https://github.com/gskbyte/GSKStretchyHeaderView/screenshots/spoty_default.jpg", "https://github.com/gskbyte/GSKStretchyHeaderView/screenshots/gradient.jpg"
s.license = 'MIT'
s.author = { "Jose Alcalá Correa" => "jose.alcala@xing.com" }
s.source = { :git => "https://github.com/gskbyte/GSKStretchyHeaderView.git", :tag => s.version.to_s }
@@ -20,6 +18,4 @@ s.resource_bundles = {
'GSKStretchyHeaderView' => ['Pod/Assets/*.png']
}
-
- # s.public_header_files = 'Pod/Classes/**/*.h'
end
| Update podspec and add screenshots
|
diff --git a/db/data/20150714110820_remove_ontology_from_proof_attempt_configuration.rb b/db/data/20150714110820_remove_ontology_from_proof_attempt_configuration.rb
index abc1234..def5678 100644
--- a/db/data/20150714110820_remove_ontology_from_proof_attempt_configuration.rb
+++ b/db/data/20150714110820_remove_ontology_from_proof_attempt_configuration.rb
@@ -1,14 +1,14 @@ class RemoveOntologyFromProofAttemptConfiguration < MigrationWithData
def up
ProofAttemptConfiguration.find_each do |pac|
- pac.send(:generate_locid)
+ pac.send(:generate_locid) if pac.respond_to?(:generate_locid)
pac.save!
end
end
def down
ProofAttemptConfiguration.find_each do |pac|
- pac.send(:generate_locid)
+ pac.send(:generate_locid) if pac.respond_to?(:generate_locid)
pac.save!
end
end
| Fix data migration not finding a method.
|
diff --git a/lib/best_boy.rb b/lib/best_boy.rb
index abc1234..def5678 100644
--- a/lib/best_boy.rb
+++ b/lib/best_boy.rb
@@ -19,16 +19,16 @@ end
def self.in_test_mode(&block)
- executute_with_test_mode_set_to(true, &block)
+ execute_with_test_mode_set_to(true, &block)
end
def self.in_real_mode(&block)
- executute_with_test_mode_set_to(false, &block)
+ execute_with_test_mode_set_to(false, &block)
end
private
- def self.executute_with_test_mode_set_to(test_mode, &block)
+ def self.execute_with_test_mode_set_to(test_mode, &block)
Mutex.new.synchronize do
test_mode_before = self.test_mode
self.test_mode = test_mode
| Fix typo in method name
|
diff --git a/Casks/obs.rb b/Casks/obs.rb
index abc1234..def5678 100644
--- a/Casks/obs.rb
+++ b/Casks/obs.rb
@@ -6,7 +6,7 @@ url "https://github.com/jp9000/obs-studio/releases/download/#{version}/obs-#{version}-installer.dmg"
appcast 'https://github.com/jp9000/obs-studio/releases.atom'
name 'OBS'
- homepage 'http://obsproject.com/'
+ homepage 'https://obsproject.com/'
license :gpl
pkg 'OBS.mpkg'
| Fix homepage to use SSL in OBS Cask
The HTTP URL is already getting redirected to HTTPS. Using the HTTPS URL directly
makes it more secure and saves a HTTP round-trip.
|
diff --git a/lib/goku/cli.rb b/lib/goku/cli.rb
index abc1234..def5678 100644
--- a/lib/goku/cli.rb
+++ b/lib/goku/cli.rb
@@ -24,7 +24,7 @@ end
map "module" => "m"
- map "class" => "m"
+ map "class" => "c"
private
| Fix class -> c alias
|
diff --git a/lib/json_vat.rb b/lib/json_vat.rb
index abc1234..def5678 100644
--- a/lib/json_vat.rb
+++ b/lib/json_vat.rb
@@ -44,7 +44,13 @@ end
def country(country)
- self.rates.select { |r| r.country_code == country.to_s.upcase }.first
+ code = country.to_s.upcase
+
+ # Fix ISO-3166-1-alpha2 exceptions
+ if code == 'UK' then code = 'GB' end
+ if code == 'EL' then code = 'GR' end
+
+ self.rates.find { |r| r.country_code == code }
end
def [](country)
@@ -53,5 +59,4 @@
end
-
end
| Fix ISO-3166-1-alpha2 exceptions for GB/UK and GR/EL
|
diff --git a/lib/capistrano-resque.rb b/lib/capistrano-resque.rb
index abc1234..def5678 100644
--- a/lib/capistrano-resque.rb
+++ b/lib/capistrano-resque.rb
@@ -1,6 +1,6 @@ require "capistrano-resque/version"
-if Gem::Version.new(Capistrano::VERSION).release >= Gem::Version.new("3.0.0")
+if defined?(Capistrano::VERSION) && Gem::Version.new(Capistrano::VERSION).release >= Gem::Version.new("3.0.0")
load File.expand_path("../capistrano-resque/tasks/capistrano-resque.rake", __FILE__)
else
require "capistrano-resque/capistrano_integration"
| Check if Capistrano::VERSION is defined
V2 uses Capistrano::Version, not ::VERSION, so this would have thrown
an error when used in V2. (Thanks to @avaranovich for pointing this out)
|
diff --git a/lib/capistrano/ec2tag.rb b/lib/capistrano/ec2tag.rb
index abc1234..def5678 100644
--- a/lib/capistrano/ec2tag.rb
+++ b/lib/capistrano/ec2tag.rb
@@ -12,7 +12,7 @@ @ec2 ||= AWS::EC2.new({access_key_id: fetch(:aws_access_key_id), secret_access_key: fetch(:aws_secret_access_key)}.merge! fetch(:aws_params, {}))
@ec2.instances.filter('tag-key', 'deploy').filter('tag-value', which).each do |instance|
- server instance.dns_name || instance.ip_address, *args if instance.status == :running
+ server instance.ip_address || instance.private_ip_address, *args if instance.status == :running
end
end
| Check for the private ip if public ip is empty
|
diff --git a/lib/catalog/organizer.rb b/lib/catalog/organizer.rb
index abc1234..def5678 100644
--- a/lib/catalog/organizer.rb
+++ b/lib/catalog/organizer.rb
@@ -1,7 +1,7 @@ module Catalog
class Organizer
- def initialize(base_path:)
- @base_path = base_path
+ def initialize(base_path: nil)
+ @base_path = base_path || '~/Downloads/*'
end
def run!
@@ -12,6 +12,8 @@ DocumentMover.new(document: document, drawer: matcher.drawer).move!
end
end
+
+ true
end
private
| Add a default base_path for Organizer
|
diff --git a/db/migrate/20110626150056_add_updated_at_and_count_to_views.rb b/db/migrate/20110626150056_add_updated_at_and_count_to_views.rb
index abc1234..def5678 100644
--- a/db/migrate/20110626150056_add_updated_at_and_count_to_views.rb
+++ b/db/migrate/20110626150056_add_updated_at_and_count_to_views.rb
@@ -1,6 +1,6 @@ class AddUpdatedAtAndCountToViews < ActiveRecord::Migration
def change
add_column :forem_views, :updated_at, :datetime
- add_column :forem_views, :count, :integer
+ add_column :forem_views, :count, :integer, :default => 0
end
end
| [views] Make view count default to 0
|
diff --git a/nodenv.rb b/nodenv.rb
index abc1234..def5678 100644
--- a/nodenv.rb
+++ b/nodenv.rb
@@ -11,6 +11,9 @@ def caveats; <<-EOS.undent
To enable shims and autocompletion add to your profile:
if which nodenv > /dev/null; then eval "$(nodenv init -)"; fi
+
+ To use Homebrew's directories rather than ~/.nodenv add to your profile:
+ export NODENV_ROOT=#{opt_prefix}/nodenv
EOS
end
end
| Add caveat about setting NODENV_ROOT
|
diff --git a/core/app/interactors/interactors/feed/global_discussions.rb b/core/app/interactors/interactors/feed/global_discussions.rb
index abc1234..def5678 100644
--- a/core/app/interactors/interactors/feed/global_discussions.rb
+++ b/core/app/interactors/interactors/feed/global_discussions.rb
@@ -0,0 +1,27 @@+module Interactors
+ module Feed
+ class GlobalDiscussions
+ include Pavlov::Interactor
+
+ arguments :timestamp, :count
+
+ def authorized?
+ true
+ end
+
+ def execute
+ Backend::Activities.activities_older_than(activities_set: activities,
+ timestamp: timestamp, count: count)
+ end
+
+ def activities
+ GlobalFeed.instance.all_discussions
+ end
+
+ def validate
+ validate_string :timestamp, timestamp unless timestamp.nil?
+ validate_string :count, count unless count.nil?
+ end
+ end
+ end
+end
| Create interactor for global discussions
|
diff --git a/db/migrate/20110602193842_add_post_login_action_to_users.rb b/db/migrate/20110602193842_add_post_login_action_to_users.rb
index abc1234..def5678 100644
--- a/db/migrate/20110602193842_add_post_login_action_to_users.rb
+++ b/db/migrate/20110602193842_add_post_login_action_to_users.rb
@@ -0,0 +1,9 @@+class AddPostLoginActionToUsers < ActiveRecord::Migration
+ def self.up
+ add_column :users, :post_login_action, :string
+ end
+
+ def self.down
+ remove_column :users, :post_login_action
+ end
+end
| Add field for post-login action.
|
diff --git a/test/dummy/config/routes.rb b/test/dummy/config/routes.rb
index abc1234..def5678 100644
--- a/test/dummy/config/routes.rb
+++ b/test/dummy/config/routes.rb
@@ -3,9 +3,9 @@ mount Calligraph::Engine => "/"
devise_for :calligraph_admin_users, {
- :class_name => "Calligraph::AdminUser",
+ class_name: "Calligraph::AdminUser",
path_names: {sign_in: "login", sign_out: "logout"},
- :path => "/admin",
+ path: "/admin",
module: :devise
}
| Migrate old hash syntax to new ruby style
|
diff --git a/test/version_sorter_test.rb b/test/version_sorter_test.rb
index abc1234..def5678 100644
--- a/test/version_sorter_test.rb
+++ b/test/version_sorter_test.rb
@@ -1,10 +1,18 @@ require 'test/unit'
require 'version_sorter'
+require 'rubygems/version'
class VersionSorterTest < Test::Unit::TestCase
def test_sorts_versions_correctly
versions = %w(1.0.9 1.0.10 2.0 3.1.4.2 1.0.9a)
sorted_versions = %w( 1.0.9a 1.0.9 1.0.10 2.0 3.1.4.2 )
+
+ assert_equal sorted_versions, VersionSorter.sort(versions)
+ end
+
+ def test_sorts_versions_like_rubygems
+ versions = %w(1.0.9.b 1.0.9 1.0.10 2.0 3.1.4.2 1.0.9a 2.0rc2 2.0-rc1)
+ sorted_versions = versions.sort_by { |v| Gem::Version.new(v) }
assert_equal sorted_versions, VersionSorter.sort(versions)
end
| Verify that we sort version numbers the same way RubyGems does
|
diff --git a/spec/graphql/execution/typecast_spec.rb b/spec/graphql/execution/typecast_spec.rb
index abc1234..def5678 100644
--- a/spec/graphql/execution/typecast_spec.rb
+++ b/spec/graphql/execution/typecast_spec.rb
@@ -22,6 +22,10 @@ end
it "resolve correctly when potential type is an Interface and current type implements it" do
+ assert GraphQL::Execution::Typecast.compatible?(CHEESES[1], EdibleInterface, CheeseType, context)
+ end
+
+ it "resolve correctly when potential type is an Interface and current type implements it" do
assert GraphQL::Execution::Typecast.compatible?(MILKS[1], EdibleInterface, CheeseType, context)
end
| Add an additional test for the missing case
|
diff --git a/spec/image_templates/shared_examples.rb b/spec/image_templates/shared_examples.rb
index abc1234..def5678 100644
--- a/spec/image_templates/shared_examples.rb
+++ b/spec/image_templates/shared_examples.rb
@@ -8,8 +8,14 @@ end
describe '#erb_template' do
- it 'is a valid erb template' do
+ it 'is a valid file' do
expect(File).to exist(image_template.erb_template)
+ end
+ end
+
+ describe '#css_stylesheet' do
+ it 'is a valid file' do
+ expect(File).to exist(image_template.css_stylesheet)
end
end
| Add valid file check for shared template examples
|
diff --git a/app/models/concerns/likable.rb b/app/models/concerns/likable.rb
index abc1234..def5678 100644
--- a/app/models/concerns/likable.rb
+++ b/app/models/concerns/likable.rb
@@ -9,7 +9,7 @@ base.has_many likes, dependent: :destroy
base.has_many :likers, through: likes, source: :user
- base.scope :popular, -> { joins(:users).order('liked_count DESC') }
+ base.scope :popular, -> { joins(:users).order('likes_count DESC') }
base.scope :liked, -> (user) {
joins(:likers).where(users: { id: user.id }).order("#{likes}.created_at DESC")
}
| Fix typo: liked_count -> likes_count
|
diff --git a/lib/scorm2004/sequencing/evaluate_rollup_conditions_subprocess.rb b/lib/scorm2004/sequencing/evaluate_rollup_conditions_subprocess.rb
index abc1234..def5678 100644
--- a/lib/scorm2004/sequencing/evaluate_rollup_conditions_subprocess.rb
+++ b/lib/scorm2004/sequencing/evaluate_rollup_conditions_subprocess.rb
@@ -3,6 +3,11 @@
module Scorm2004
module Sequencing
+ # Evaluate Rollup Conditions Subprocess [RB.1.4.1]
+ #
+ # @example
+ # EvaluateRollupConditionsSubprocess.new(rollup_rule).call(child)
+ #
class EvaluateRollupConditionsSubprocess
extend Forwardable
def_delegators :@rule, :conditions, :condition_combination
| Add a comment on the EvaluateRollupConditionsSubprocess class.
|
diff --git a/webapp/db/migrate/20120320040150_allow_nulls_in_participation_entity_ids.rb b/webapp/db/migrate/20120320040150_allow_nulls_in_participation_entity_ids.rb
index abc1234..def5678 100644
--- a/webapp/db/migrate/20120320040150_allow_nulls_in_participation_entity_ids.rb
+++ b/webapp/db/migrate/20120320040150_allow_nulls_in_participation_entity_ids.rb
@@ -0,0 +1,57 @@+class AllowNullsInParticipationEntityIds < ActiveRecord::Migration
+ def self.up
+ execute <<-SQL
+CREATE OR REPLACE FUNCTION validate_participation() RETURNS TRIGGER AS $validate_participation$
+DECLARE
+ msg TEXT;
+BEGIN
+ IF NEW.type = 'Jurisdiction' OR NEW.type = 'AssociatedJurisdiction' THEN
+ IF NEW.secondary_entity_id IS NULL THEN
+ RETURN NULL;
+ END IF;
+ PERFORM 1
+ FROM places
+ JOIN places_types ON places_types.place_id = places.id
+ JOIN codes ON places_types.type_id = codes.id AND codes.the_code = 'J'
+ WHERE places.entity_id = NEW.secondary_entity_id;
+ msg := 'Participation types Jurisdiction and AssociatedJurisdiction must have a jurisdiction in their secondary_entity_id';
+ ELSIF NEW.type IN ('Lab', 'ActualDeliveryFacility', 'ReportingAgency', 'DiagnosticFacility', 'ExpectedDeliveryFacility', 'InterestedPlace', 'HospitalizationFacility') THEN
+ IF NEW.secondary_entity_id IS NULL THEN
+ RETURN NULL;
+ END IF;
+ PERFORM 1 FROM places WHERE places.entity_id = NEW.secondary_entity_id;
+ msg := 'Participation types Lab, ActualDeliveryFacility, ReportingAgency, DiagnosticFacility, ExpectedDeliveryFacility, InterestedPlace, and HospitalizationFacility must have places in their secondary_entity_id';
+ ELSIF NEW.type = 'InterestedParty' THEN
+ IF NEW.primary_entity_id IS NULL THEN
+ RETURN NULL;
+ END IF;
+ PERFORM 1 FROM people WHERE people.entity_id = NEW.primary_entity_id;
+ msg := 'InterestedParty participations must have a person in their primary_entity_id';
+ ELSIF NEW.type = 'Clinician' OR NEW.type = 'HealthCareProvider' OR NEW.type = 'Reporter' THEN
+ IF NEW.secondary_entity_id IS NULL THEN
+ RETURN NULL;
+ END IF;
+ PERFORM 1 FROM people WHERE people.entity_id = NEW.secondary_entity_id;
+ msg := 'Participation types Clinician, HealthCareProvider, and Reporter must have people in their secondary_entity_ids';
+ ELSE
+ IF NEW.secondary_entity_id IS NULL THEN
+ RETURN NULL;
+ END IF;
+ RAISE EXCEPTION 'Participation is invalid -- unknown type %', NEW.type;
+ END IF;
+ IF NOT FOUND THEN
+ RAISE EXCEPTION 'Validation error on participation %: %', NEW.id, msg;
+ END IF;
+ RETURN NEW;
+END;
+$validate_participation$ LANGUAGE plpgsql;
+
+DROP TRIGGER IF EXISTS validate_participations ON participations;
+CREATE TRIGGER validate_participations BEFORE INSERT OR UPDATE
+ ON participations FOR EACH ROW EXECUTE PROCEDURE validate_participation();
+ SQL
+ end
+
+ def self.down
+ end
+end
| Fix participation validation to allow nulls in entity_id fields
|
diff --git a/features/step_definitions/admin_broken_link_reporting_steps.rb b/features/step_definitions/admin_broken_link_reporting_steps.rb
index abc1234..def5678 100644
--- a/features/step_definitions/admin_broken_link_reporting_steps.rb
+++ b/features/step_definitions/admin_broken_link_reporting_steps.rb
@@ -13,6 +13,6 @@ end
Then(/^I should a list of the broken links$/) do
- assert page.has_content?("We've found some links that may not be responding:")
+ assert page.has_content?("some links that may not be responding:")
assert page.has_link?(@broken_link, href: @broken_link)
end
| Fix feature broken by copy change
|
diff --git a/parallel.gemspec b/parallel.gemspec
index abc1234..def5678 100644
--- a/parallel.gemspec
+++ b/parallel.gemspec
@@ -7,6 +7,12 @@ s.authors = ["Michael Grosser"]
s.email = "michael@grosser.it"
s.homepage = "https://github.com/grosser/#{name}"
+ s.metadata = {
+ "bug_tracker_uri" => "https://github.com/grosser/#{name}/issues",
+ "documentation_uri" => "https://www.rubydoc.info/gems/#{name}/#{s.version}",
+ "source_code_uri" => "https://github.com/grosser/#{name}/tree/v#{s.version}",
+ "wiki_uri" => "https://github.com/grosser/#{name}/wiki",
+ }
s.files = `git ls-files lib MIT-LICENSE.txt`.split("\n")
s.license = "MIT"
s.required_ruby_version = '>= 2.2'
| Add project metadata to the gemspec
As per https://guides.rubygems.org/specification-reference/#metadata,
add metadata to the gemspec file. This'll allow people to more easily
access the source code, raise issues and read the wiki. These
`bug_tracker_uri`, `wiki_uri`, `documentation_uri` and `source_code_uri`
links will appear on the rubygems page at
https://rubygems.org/gems/parallel and be available via the rubygems API
after the next release.
|
diff --git a/lib/coinmux/http.rb b/lib/coinmux/http.rb
index abc1234..def5678 100644
--- a/lib/coinmux/http.rb
+++ b/lib/coinmux/http.rb
@@ -1,16 +1,17 @@ require 'httpclient'
class Coinmux::Http
- include Singleton
+ include Singleton, Coinmux::Facades
- def get(host, path)
+ def get(host, path, options = {:disable_cache => false})
begin
- with_cache(host, path) do
- response = client.get("#{host}#{path}")
-
- raise Coinmux::Error, "Invalid response code: #{response.code}" if response.code.to_s != '200'
-
- response.content
+ info "HTTP GET Request #{host}#{path}"
+ if options[:disable_cache]
+ do_get(host, path)
+ else
+ with_cache(host, path) do
+ do_get(host, path)
+ end
end
rescue Coinmux::Error => e
raise e
@@ -24,6 +25,16 @@
private
+ def do_get(host, path)
+ response = client.get("#{host}#{path}")
+
+ info "HTTP GET Response #{response.code}"
+ raise Coinmux::Error, "Invalid response code: #{response.code}" if response.code.to_s != '200'
+
+ debug "HTTP GET Response Content #{response.content}"
+ response.content
+ end
+
def cache
@cache ||= {}
end
@@ -35,8 +46,12 @@ def with_cache(host, path, &block)
key = [host, path]
- if (result = @cache[key]).nil?
- result = @cache[key] = yield
+ result = cache[key]
+
+ info "HTTP cached? #{!result.nil?}"
+
+ if result.nil?
+ result = cache[key] = yield
end
result
| Allow GET requests that do not cache. |
diff --git a/db/data_migration/20130321100108_remove_world_editions_from_rummager.rb b/db/data_migration/20130321100108_remove_world_editions_from_rummager.rb
index abc1234..def5678 100644
--- a/db/data_migration/20130321100108_remove_world_editions_from_rummager.rb
+++ b/db/data_migration/20130321100108_remove_world_editions_from_rummager.rb
@@ -0,0 +1,12 @@+edition_types_to_remove = [WorldwidePriority]
+if ! Whitehall.world_location_news_feature?
+ edition_types_to_remove << WorldLocationNewsArticle
+end
+
+edition_types_to_remove.each do |klass|
+ klass.all.each do |edition|
+ next unless edition.latest_edition
+ edition.remove_from_search_index
+ puts "#{edition.title} removed from Rummager"
+ end
+end
| Remove world priorities and news from search
They won't get added back in due to 2ae3439, but we also need existing
ones to be removed.
|
diff --git a/actionpack/test/template/safe_buffer_test.rb b/actionpack/test/template/safe_buffer_test.rb
index abc1234..def5678 100644
--- a/actionpack/test/template/safe_buffer_test.rb
+++ b/actionpack/test/template/safe_buffer_test.rb
@@ -26,7 +26,7 @@ end
test "Should not mess with a previously escape test" do
- @buffer << CGI.escapeHTML("<script>")
+ @buffer << ERB::Util.html_escape("<script>")
assert_equal "<script>", @buffer
end
| Fix failing safe buffer test. We don't patch CGI.escapeHTML, only ERB:Util.
|
diff --git a/app/channels/application_cable/connection.rb b/app/channels/application_cable/connection.rb
index abc1234..def5678 100644
--- a/app/channels/application_cable/connection.rb
+++ b/app/channels/application_cable/connection.rb
@@ -14,7 +14,7 @@ if (verified_user = env["warden"].user)
verified_user
else
- reject_unauthorized_connection
+ # reject_unauthorized_connection
end
end
end
| Allow visitors to receive action cable broadcasts
|
diff --git a/app/controllers/abuse_comments_controller.rb b/app/controllers/abuse_comments_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/abuse_comments_controller.rb
+++ b/app/controllers/abuse_comments_controller.rb
@@ -3,7 +3,6 @@ class AbuseCommentsController < ApplicationController
before_action :verify_core
before_action :set_comment, except: [:create]
- before_action :verify_access, except: [:create]
skip_before_action :verify_authenticity_token, only: [:update]
def create
@@ -43,9 +42,4 @@ def set_comment
@comment = AbuseComment.find params[:id]
end
-
- def verify_access
- return if current_user == @comment.user || current_user.has_role?(:admin)
- not_found
- end
end
| Allow all core to edit abuse reports - 1 |
diff --git a/recipes/_user.rb b/recipes/_user.rb
index abc1234..def5678 100644
--- a/recipes/_user.rb
+++ b/recipes/_user.rb
@@ -25,10 +25,23 @@ mode 0700
end
-file "#{home_dir}/.ssh/authorized_keys" do
- owner user
- group group
- mode 0700
- backup false
- content public_key
-end if public_key+authorized_keys_file = "#{home_dir}/.ssh/authorized_keys"
+if File.exist?(authorized_keys_file)
+ ruby_block "Add Rolling Restart User's public key" do
+ block do
+ file = Chef::Util::FileEdit.new(authorized_keys_file)
+ file.insert_line_if_no_match(public_key, public_key)
+ file.write_file
+ only_if { public_key }
+ end
+ end
+else
+ file authorized_keys_file do
+ owner user
+ group user
+ mode 0600
+ backup false
+ content public_key
+ only_if { public_key }
+ end
+end
| Update user's authorized_keys file to only append if the file exists
|
diff --git a/recipes/rspec.rb b/recipes/rspec.rb
index abc1234..def5678 100644
--- a/recipes/rspec.rb
+++ b/recipes/rspec.rb
@@ -10,9 +10,9 @@
generate "rspec:install"
- append_file("spec/spec_helper.rb") { "\nDatabaseCleaner.strategy = :truncation" }
+ append_file("spec/spec_helper.rb") { "\nDatabaseCleaner.strategy = :truncation\n" }
- append_file(".rspec") { "\n--tty" }
+ append_file(".rspec") { "\n--tty\n format documentation\n" }
git :add => ".", :rm => "test/*", :commit => "-m 'Use rspec for testing'"
end
| Add some closing newlines and documentation formatter for RSpec |
diff --git a/ResearchKit.podspec b/ResearchKit.podspec
index abc1234..def5678 100644
--- a/ResearchKit.podspec
+++ b/ResearchKit.podspec
@@ -8,7 +8,7 @@ s.source = { :git => 'https://github.com/ResearchKit/ResearchKit.git', :tag => "v#{s.version}"}
s.source_files = 'ResearchKit/**/*'
s.private_header_files = 'ResearchKit/**/*Private.h'
- s.resources = 'ResearchKit/Animations/**/*.m4v', 'ResearchKit/Artwork.xcassets', 'ResearchKit/Localized/*.lproj'
+ s.resources = 'ResearchKit/**/*.{fsh,vsh}', 'ResearchKit/Animations/**/*.m4v', 'ResearchKit/Artwork.xcassets', 'ResearchKit/Localized/*.lproj'
s.platform = :ios, '8.0'
s.requires_arc = true
end
| Add shader files to resources
|
diff --git a/lib/genomer/rules_dsl.rb b/lib/genomer/rules_dsl.rb
index abc1234..def5678 100644
--- a/lib/genomer/rules_dsl.rb
+++ b/lib/genomer/rules_dsl.rb
@@ -4,30 +4,27 @@ @types = Array.new
end
- def scaffold_file(location=nil)
- return @scaffold if location.nil?
- @scaffold = location
+ private
+
+ def self.attribute(name)
+ define_method(name) do |*arg|
+ var = "@#{name}"
+ unless arg.first # Is an argument is passed to the method?
+ value = instance_variable_get(var)
+ return value if value
+ end
+ instance_variable_set(var,arg.first)
+ end
end
- def sequence_file(location=nil)
- return @sequence if location.nil?
- @sequence = location
- end
+ attribute :scaffold_file
+ attribute :sequence_file
+ attribute :annotation_file
- def annotation_file(location=nil)
- return @annotation_file if location.nil?
- @annotation_file = location
- end
+ attribute :out_file_name
+ attribute :out_dir_name
- def out_file_name(name=nil)
- return @out_file_name if name.nil?
- @out_file_name = name
- end
-
- def out_dir_name(name=nil)
- return @out_dir_name if name.nil?
- @out_dir_name = name
- end
+ public
def output(*types)
return @types if types.empty?
| Refactor DSL methods using helper method
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.