seniruk/qwen2.5coder-0.5B_commit_msg
Text Generation
•
0.5B
•
Updated
•
18
diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
---|---|
diff --git a/config/initializers/refile.rb b/config/initializers/refile.rb
index abc1234..def5678 100644
--- a/config/initializers/refile.rb
+++ b/config/initializers/refile.rb
@@ -7,5 +7,5 @@ }
Refile.cache = Refile::S3.new prefix: "cache", **aws
Refile.store = Refile::S3.new prefix: "store", **aws
- Refile.cdn_host = '//files.brother.ly'
+ # Refile.cdn_host = '//files.brother.ly'
end
|
Disable CDN host until we can figure things out
|
diff --git a/app/helpers/pubdraft_helper.rb b/app/helpers/pubdraft_helper.rb
index abc1234..def5678 100644
--- a/app/helpers/pubdraft_helper.rb
+++ b/app/helpers/pubdraft_helper.rb
@@ -6,4 +6,8 @@ def pubdraft_state_options(klass)
options_for_select pubdraft_states_for_select(klass)
end
+
+ def state_label(state)
+ content_tag :span, state, class: "state-label #{state.downcase}"
+ end
end
|
Add state label helper here
|
diff --git a/lib/rack/locale-root-redirect.rb b/lib/rack/locale-root-redirect.rb
index abc1234..def5678 100644
--- a/lib/rack/locale-root-redirect.rb
+++ b/lib/rack/locale-root-redirect.rb
@@ -14,13 +14,13 @@ def call(env)
status, headers, response = @app.call(env)
- if env["REQUEST_URI"] == "/"
+ if match_data = %r[\A/(?<query_string>\?.*|\Z)].match(env["REQUEST_URI"])
language_matcher = env['rack-accept.request'].language
language_matcher.first_level_match = true
redirect_lang = language_matcher.best_of(@available_locales) || @default_locale
status = 302
- headers["Location"] = @locales[redirect_lang.to_sym]
+ headers["Location"] = @locales[redirect_lang.to_sym] + match_data[:query_string]
end
[status, headers, response]
|
Add support for query string in root URL
|
diff --git a/lib/redirector/path_detection.rb b/lib/redirector/path_detection.rb
index abc1234..def5678 100644
--- a/lib/redirector/path_detection.rb
+++ b/lib/redirector/path_detection.rb
@@ -34,19 +34,19 @@
# Path needs to contain 3 components
+ return false unless path_parts.count == 3
+
# parts 1 and 2 need to be numbers
- return false unless path_parts.count == 3
- return false unless is_number? path_parts[0]
- return false unless is_number? path_parts[1]
+ # We need 4 digits
+ return false unless path_parts[0] =~ /[0-9]{4}/
+
+ # We need 2 digits
+ return false unless path_parts[1] =~ /[0-9]{2}/
# We have a blog post
true
end
- def is_number? val
- !val.to_i.zero?
- end
-
end
end
|
Use a regexp, better/faster than casting to integer. (plus we didn't check for number of digits before)
|
diff --git a/app/models/version_observer.rb b/app/models/version_observer.rb
index abc1234..def5678 100644
--- a/app/models/version_observer.rb
+++ b/app/models/version_observer.rb
@@ -1,9 +1,14 @@ class VersionObserver < ActiveRecord::Observer
- # Cache latest version in the package record
def after_create(version)
+ # Cache latest version in the package record
version.package.latest_version = version
version.package.save # no need to explicitly update updated_at
+
+ # Update the author's updated_at attribute
+ if version.maintainer
+ version.maintainer.update_attribute(:updated_at, Time.now)
+ end
end
end
|
Update the author's updated_at attribute when new versions are released
|
diff --git a/lib/tasks/i18n_missing_keys.rake b/lib/tasks/i18n_missing_keys.rake
index abc1234..def5678 100644
--- a/lib/tasks/i18n_missing_keys.rake
+++ b/lib/tasks/i18n_missing_keys.rake
@@ -0,0 +1,92 @@+# Invoke this task with "rake i18n:missing_keys"
+
+namespace :i18n do
+ desc "Find and list translation keys that do not exist in all locales"
+ task :missing_keys => :environment do
+ finder = MissingKeysFinder.new(I18n.backend)
+ finder.find_missing_keys
+ end
+end
+
+
+class MissingKeysFinder
+
+ def initialize(backend)
+ @backend = backend
+ self.load_translations
+ end
+
+ # Returns an array with all keys from all locales
+ def all_keys
+ I18n.backend.send(:translations).collect do |check_locale, translations|
+ collect_keys([], translations).sort
+ end.flatten.uniq
+ end
+
+ def find_missing_keys
+ output_available_locales
+ output_unique_key_stats(all_keys)
+
+ missing_keys = {}
+ all_keys.each do |key|
+
+ I18n.available_locales.each do |locale|
+ unless key_exists?(key, locale)
+ if missing_keys[key]
+ missing_keys[key] << locale
+ else
+ missing_keys[key] = [locale]
+ end
+ end
+ end
+ end
+
+ output_missing_keys(missing_keys)
+ return missing_keys
+ end
+
+ def output_available_locales
+ puts "#{I18n.available_locales.size} #{I18n.available_locales.size == 1 ? 'locale' : 'locales'} available: #{I18n.available_locales.join(', ')}"
+ end
+
+ def output_missing_keys(missing_keys)
+ puts "#{missing_keys.size} #{missing_keys.size == 1 ? 'key is missing' : 'keys are missing'} from one or more locales:"
+ missing_keys.keys.sort.each do |key|
+ puts "'#{key}': Missing from #{missing_keys[key].join(', ')}"
+ end
+ end
+
+ def output_unique_key_stats(keys)
+ number_of_keys = keys.size
+ puts "#{number_of_keys} #{number_of_keys == 1 ? 'unique key' : 'unique keys'} found."
+ end
+
+ def collect_keys(scope, translations)
+ full_keys = []
+ translations.to_a.each do |key, translations|
+ new_scope = scope.dup << key
+ if translations.is_a?(Hash)
+ full_keys += collect_keys(new_scope, translations)
+ else
+ full_keys << new_scope.join('.')
+ end
+ end
+ return full_keys
+ end
+
+ # Returns true if key exists in the given locale
+ def key_exists?(key, locale)
+ I18n.locale = locale
+ I18n.translate(key, :raise => true)
+ return true
+ rescue I18n::MissingInterpolationArgument
+ return true
+ rescue I18n::MissingTranslationData
+ return false
+ end
+
+ def load_translations
+ # Make sure we’ve loaded the translations
+ I18n.backend.send(:init_translations)
+ end
+end
|
[i18n] Add rake task for finding missing_keys
|
diff --git a/lib/wordlist/builders/website.rb b/lib/wordlist/builders/website.rb
index abc1234..def5678 100644
--- a/lib/wordlist/builders/website.rb
+++ b/lib/wordlist/builders/website.rb
@@ -26,9 +26,11 @@ #
# Builds the wordlist file by spidering the +host+ and parsing the
# inner-text from all HTML pages. If a _block_ is given, it will be
- # called after all HTML pages on the +host+ have been parsed.
+ # called before all HTML pages on the +host+ have been parsed.
#
def build!(&block)
+ super(&block)
+
Spidr.host(@host) do |spidr|
spidr.every_page do |page|
if page.html?
@@ -38,8 +40,6 @@ end
end
end
-
- super(&block)
end
end
|
Call the given block before, the site is spidered.
|
diff --git a/spec/github/validation_spec.rb b/spec/github/validation_spec.rb
index abc1234..def5678 100644
--- a/spec/github/validation_spec.rb
+++ b/spec/github/validation_spec.rb
@@ -0,0 +1,61 @@+require 'spec_helper'
+
+describe Github::Validation, :type => :base do
+
+ context '#_validate_inputs' do
+ before do
+ @required = ['param_a', 'param_c']
+ @provided = { 'param_a' => true, 'param_c' => true }
+ end
+
+ it 'detect missing parameter' do
+ github._validate_inputs(@required, @provided.except('param_c')).should be_false
+ end
+
+ it 'asserts correct required parameters' do
+ github._validate_inputs(@required, @provided).should be_true
+ end
+ end
+
+ context '#_validate_presence_of' do
+ it 'throws error if passed param is nil' do
+ gist_id = nil
+ expect {
+ github._validate_presence_of gist_id
+ }.to raise_error(ArgumentError)
+ end
+ end
+
+ context '#_validate_params_values' do
+ let(:permitted) {
+ {
+ 'param_a' => ['a', 'b'],
+ 'param_b' => /^github$/
+ }
+ }
+
+ it 'fails to accept unkown value for a given parameter key' do
+ actual = { 'param_a' => 'x' }
+ expect {
+ github._validate_params_values(permitted, actual)
+ }.to raise_error(ArgumentError)
+ end
+
+ it 'accepts known value for a given parameter key' do
+ actual = { 'param_a' => 'a'}
+ github._validate_params_values(permitted, actual)
+ end
+
+ it 'fails to match regex value for a given parameter key' do
+ actual = { 'param_b' => 'xgithub' }
+ expect {
+ github._validate_params_values(permitted, actual)
+ }.to raise_error(ArgumentError)
+ end
+
+ it 'matches regex value for a given parameter key' do
+ actual = { 'param_b' => 'github'}
+ github._validate_params_values(permitted, actual)
+ end
+ end
+end # Github::Validation
|
Add specs for new validations module.
|
diff --git a/spec/lib/i18n/core_ext_spec.rb b/spec/lib/i18n/core_ext_spec.rb
index abc1234..def5678 100644
--- a/spec/lib/i18n/core_ext_spec.rb
+++ b/spec/lib/i18n/core_ext_spec.rb
@@ -29,7 +29,7 @@ I18n.backend.load_translations(filename)
end
- it 'loads data from a yml.erb file and interpolates the ERB' do
+ it 'loads the data into a hash and interpolates the ERB' do
expect(translations).to eq(erb_interpolated_hash)
end
end
|
Change the wording the i18n spec
|
diff --git a/spec/node/node_version_spec.rb b/spec/node/node_version_spec.rb
index abc1234..def5678 100644
--- a/spec/node/node_version_spec.rb
+++ b/spec/node/node_version_spec.rb
@@ -10,7 +10,7 @@ # Node 4.x
if property[:name] =~ /v4./
describe command('node -v') do
- its(:stdout) { should contain('v4.4.5') }
+ its(:stdout) { should contain('v4.4.4') }
end
end
|
Revert test for Node.js v4.4.4
|
diff --git a/Casks/witch.rb b/Casks/witch.rb
index abc1234..def5678 100644
--- a/Casks/witch.rb
+++ b/Casks/witch.rb
@@ -1,10 +1,17 @@ cask :v1 => 'witch' do
- version :latest
- sha256 :no_check
+ if MacOS.release == :snow_leopard
+ version '3.9.1'
+ sha256 '5e46508e150ff16be14b9955abdcd15098376230ef71e3de6f15a056eec75e45'
+ url 'http://manytricks.com/download/witch/3.9.1'
+ else
+ version :latest
+ sha256 :no_check
- url 'http://manytricks.com/download/witch'
+ url 'http://manytricks.com/download/witch'
+ end
+
homepage 'http://manytricks.com/witch/'
- license :unknown # todo: improve this machine-generated value
+ license :commercial
prefpane 'Witch.prefPane'
|
Add Witch 3.9.1 (Snow Leopard compatible)
Closes #8095.
|
diff --git a/spec/support/test_user_type.rb b/spec/support/test_user_type.rb
index abc1234..def5678 100644
--- a/spec/support/test_user_type.rb
+++ b/spec/support/test_user_type.rb
@@ -9,7 +9,7 @@ description "The test name"
end
- assoc :posts, Kanji::Types::Array.member(TestPost).default([]), "All of the posts for the user"
+ assoc :posts, Kanji::Types::Array.member(Types::TestPost).default([]), "All of the posts for the user"
register :repo, Repositories::TestUsers
|
Fix bad type name in support file
|
diff --git a/app/services/ak_user_params.rb b/app/services/ak_user_params.rb
index abc1234..def5678 100644
--- a/app/services/ak_user_params.rb
+++ b/app/services/ak_user_params.rb
@@ -1,12 +1,15 @@ require 'browser'
class AkUserParams
- def self.create(params)
- # I'm assuming that the form params will come in with names that correspond to the AK API:
+ def self.create(params, browser)
+ # I'm assuming that the form params will come with a field called signature
+ # that will contain the petition form data with names that correspond to the AK API:
+ # USER:
# akid
# email
+ # prefix
+ # suffix
# name
- # name gets split to prefix, first name, middle name, last name and suffix automagically by AK ...
# address1
# address2
# city
@@ -21,13 +24,36 @@ # plus4
# lang - get from current page session
# source - fwd, fb, tw, pr, mtl, taf
+
+ # PETITION ACTION:
+ # action_ptr - Action
+ # created_at - DateTimeField
+ # created_user - BooleanField
+ # id - AutoField
+ # ip_address - CharField
+ # is_forwarded - BooleanField
+ # link - IntegerField
+ # mailing - Mailing
+ # opq_id - CharField
+ # page - Page
+ # referring_mailing - Mailing
+ # referring_user - User
+ # source - CharField
+ # status - CharField
+ # subscribed_user - BooleanField
+ # taf_emails_sent - IntegerField
+ # targeted - Target (ManyToManyField)
+ # updated_at - DateTimeField
+ # user - User
@user_params = params[:signature]
- @user_params[:user_agent] = browser.user_agent
- @user_params[:browser_detected] = browser.known?
- @user_params[:mobile] = browser.mobile?
- @user_params[:tablet] = browser.tablet?
- @user_params[:platform] = browser.platform
+ @user_params.merge({
+ user_agent: browser.user_agent,
+ browser_detected: browser.known?,
+ mobile: browser.mobile?,
+ tablet: browser.tablet?,
+ platform: browser.platform
+ })
@user_params
end
-end+end
|
Add basic class for building objects to pass for the message queue for storing user actions.
|
diff --git a/_scripts/update-and-preprocess.rb b/_scripts/update-and-preprocess.rb
index abc1234..def5678 100644
--- a/_scripts/update-and-preprocess.rb
+++ b/_scripts/update-and-preprocess.rb
@@ -0,0 +1,21 @@+# go through projects and clean and update
+
+require 'yaml'
+
+$basedir = Dir.pwd
+config = YAML.load_file("_config.yml")
+
+config["projects"].each do |repo|
+ name = repo.split('/').drop(1).join('')
+ Dir.chdir($basedir + "/projects")
+ if !Dir.exists?(name) # clone project repo
+ `git clone https://github.com/#{repo}.git`
+ end
+ Dir.chdir($basedir + "/projects/" + name) # drop into blotter dir
+ `git clean -f` # remove untracked files, but keep directories
+ `git reset --hard HEAD` # bring back to head state
+ `git pull origin master` # git pull
+end
+
+Dir.chdir($basedir)
+`ruby _scripts/preprocess-markdown.rb`
|
Include project clone and pull script.
|
diff --git a/cabinet.gemspec b/cabinet.gemspec
index abc1234..def5678 100644
--- a/cabinet.gemspec
+++ b/cabinet.gemspec
@@ -9,8 +9,8 @@ s.authors = ["Sebastian von Conrad"]
s.email = ["[email protected]"]
s.homepage = "http://github.com/vonconrad/cabinet"
- s.summary = %q{}
- s.description = %q{}
+ s.summary = %q{Wrapper for local and cloud file handling via fog}
+ s.description = %q{Cabinet is a wrapper for fog to add a simplified way of handling files, both in the cloud and on the local filesystem}
s.rubyforge_project = "cabinet"
|
Add gem description and summary
|
diff --git a/blinkbox-common_config.gemspec b/blinkbox-common_config.gemspec
index abc1234..def5678 100644
--- a/blinkbox-common_config.gemspec
+++ b/blinkbox-common_config.gemspec
@@ -1,5 +1,5 @@ # -*- encoding: utf-8 -*-
-$LOAD_PATH.unshift(File.join(__dir__, "lib"))
+$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "lib"))
Gem::Specification.new do |gem|
gem.name = "blinkbox-common_config"
|
Fix Travis using 1.9.3 to build gems
|
diff --git a/config/initializers/carrierwave.rb b/config/initializers/carrierwave.rb
index abc1234..def5678 100644
--- a/config/initializers/carrierwave.rb
+++ b/config/initializers/carrierwave.rb
@@ -14,6 +14,6 @@ config.fog_attributes = {'Cache-Control' => 'max-age=315576000'}
else
config.storage = :file
- config.enable_processing = false
+ config.enable_processing = true
end
end
|
Enable image processing in development.
|
diff --git a/config/initializers/carrierwave.rb b/config/initializers/carrierwave.rb
index abc1234..def5678 100644
--- a/config/initializers/carrierwave.rb
+++ b/config/initializers/carrierwave.rb
@@ -3,13 +3,23 @@ config.fog_directory = ENV['AWS_BUCKET']
config.fog_public = false
config.fog_attributes = {}
- config.fog_credentials = {
- provider: 'AWS',
- aws_access_key_id: ENV['AWS_ACCESS_KEY_ID'],
- aws_secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'],
- region: ENV['AWS_REGION'] || 'us-east-1',
- path_style: true
- }
+
+ if (ENV['AWS_ACCESS_KEY_ID'] && ENV['AWS_SECRET_ACCESS_KEY'])
+ config.fog_credentials = {
+ provider: 'AWS',
+ aws_access_key_id: ENV['AWS_ACCESS_KEY_ID'],
+ aws_secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'],
+ region: ENV['AWS_REGION'] || 'us-east-1',
+ path_style: true
+ }
+ else
+ config.fog_credentials = {
+ provider: 'AWS',
+ use_iam_profile: true,
+ region: ENV['AWS_REGION'] || 'us-east-1',
+ path_style: true
+ }
+ end
config.remove_previously_stored_files_after_update = false
end
|
Use IAM profile when key isn't available
|
diff --git a/cookbooks/homebrew/recipes/brew.rb b/cookbooks/homebrew/recipes/brew.rb
index abc1234..def5678 100644
--- a/cookbooks/homebrew/recipes/brew.rb
+++ b/cookbooks/homebrew/recipes/brew.rb
@@ -28,6 +28,7 @@ brew 'neovim' { head true }
brew 'node'
brew 'packer'
+brew 'php'
brew 'pinentry-mac'
brew 'pstree'
brew 'python' { use_cellar_option true }
|
Install php for macOS Monterey
PHP requires in alfred-github-workflow
|
diff --git a/core_gem/spec/char_cover/module.rb b/core_gem/spec/char_cover/module.rb
index abc1234..def5678 100644
--- a/core_gem/spec/char_cover/module.rb
+++ b/core_gem/spec/char_cover/module.rb
@@ -1,6 +1,7 @@ ### Empty module
- module A
+ x = module A
end.to_s
+ assert_equal '', x
#### Explicit global module
module ::B
@@ -39,8 +40,9 @@ #> xxxxx
### Empty class
- class C
+ x = class C
end.to_s
+ assert_equal '', x
#### Explicit global module
class ::N
|
Make sure of result of Module/Class
|
diff --git a/test/fixtures/cookbooks/install_varnish/recipes/full_stack.rb b/test/fixtures/cookbooks/install_varnish/recipes/full_stack.rb
index abc1234..def5678 100644
--- a/test/fixtures/cookbooks/install_varnish/recipes/full_stack.rb
+++ b/test/fixtures/cookbooks/install_varnish/recipes/full_stack.rb
@@ -1,4 +1,4 @@-apt_update
+apt_update 'full_stack'
include_recipe 'yum-epel'
include_recipe 'varnish::default'
|
Fix tests for apt platforms
|
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index abc1234..def5678 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -1,5 +1,7 @@ # Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
+ include ActionView::Helpers::NumberHelper
+
def sort_header(column, label = nil)
label ||= column.humanize
content_tag('th', label.html_safe + ' '.html_safe + link_to(image_tag('up.png', :class => 'edit_controls'), :order => column) + link_to(image_tag('down.png', :class => 'edit_controls'), :order => column + ' DESC'))
|
Include ActionView::Helpers::NumberHelper in ApplicationHelper for number_with_precision.
|
diff --git a/app/presenters/project_request.rb b/app/presenters/project_request.rb
index abc1234..def5678 100644
--- a/app/presenters/project_request.rb
+++ b/app/presenters/project_request.rb
@@ -10,6 +10,7 @@ # TODO validate project isn't already member of project
validates :project_uri, :nature_uri, presence: true
+ validate :organisation_is_not_already_member_of_project
def attributes=(values)
sanitize_for_mass_assignment(values).each do |attr, value|
@@ -22,7 +23,7 @@ end
# Owner of the organisation that created the project
- def organisation_membership
+ def creator_organisation_owner_membership
OrganisationMembership.owners.where(organisation_uri: self.project.creator.to_s).first
end
@@ -30,7 +31,7 @@ @request ||= Request.new do |r|
r.requestable = self.project
r.sender = self.sender
- r.receiver = self.organisation_membership
+ r.receiver = self.creator_organisation_owner_membership
r.request_type = 'project_request'
r.data = { project_membership_nature_uri: self.nature_uri }
end
@@ -46,8 +47,24 @@ false
end
- def persisted?
- false
+ def persisted?
+ false
+ end
+
+ def existing_project_membership?
+ project_membership_org_predicate = ProjectMembership.fields[:organisation].predicate.to_s
+ project_membership_project_predicate = ProjectMembership.fields[:project].predicate.to_s
+
+ ProjectMembership
+ .where("?uri <#{project_membership_org_predicate}> <#{self.sender.organisation_resource.uri}>")
+ .where("?uri <#{project_membership_project_predicate}> <#{self.project_uri}>")
+ .count > 0
+ end
+
+ private
+
+ def organisation_is_not_already_member_of_project
+ errors.add(:project_uri, "already a member of this project") if existing_project_membership?
end
end
|
Validate project request is not made for an existing project membership
|
diff --git a/Mortar.podspec b/Mortar.podspec
index abc1234..def5678 100644
--- a/Mortar.podspec
+++ b/Mortar.podspec
@@ -13,7 +13,7 @@ s.author = { "Jason Fieldman" => "[email protected]" }
s.social_media_url = 'http://fieldman.org'
- s.ios.deployment_target = "10.0"
+ s.ios.deployment_target = "8.0"
#s.osx.deployment_target = "10.10"
#s.tvos.deployment_target = "9.0"
|
Revert "update podspec deployment target"
This reverts commit 8ad13386b051b00d9ba91cc44c573bc0999737e3.
|
diff --git a/spec/watirspec/labels_spec.rb b/spec/watirspec/labels_spec.rb
index abc1234..def5678 100644
--- a/spec/watirspec/labels_spec.rb
+++ b/spec/watirspec/labels_spec.rb
@@ -14,7 +14,7 @@ end
describe "#[]" do
- it "returns the pre at the given index" do
+ it "returns the label at the given index" do
browser.labels[1].id.should == "first_label"
end
end
|
Correct element name in spec description
|
diff --git a/db/migrations/001_create_things.rb b/db/migrations/001_create_things.rb
index abc1234..def5678 100644
--- a/db/migrations/001_create_things.rb
+++ b/db/migrations/001_create_things.rb
@@ -0,0 +1,41 @@+Sequel.migration do
+ string_size = 2048
+
+ up do
+ create_table(:things) do
+ primary_key :id
+ String :type, :null=>false, :default=>"Thing"
+ String :license, :size=>string_size
+ String :name, :size=>string_size
+ String :url, :size=>string_size
+ end
+
+ create_table(:creative_works) do
+ primary_key :id
+ foreign_key :thing_id, :things
+ foreign_key :about, :things
+ String :creator, :size=>string_size
+ Date :date_created
+ String :publisher, :size=>string_size
+ end
+
+ create_table(:creative_work_has_part) do
+ primary_key :id
+ foreign_key :creative_work_id, :creative_works
+ foreign_key :has_part_id, :creative_works
+ end
+
+ create_table(:media_objects) do
+ primary_key :id
+ foreign_key :creative_work_id, :creative_works
+ String :content_url, :size=>string_size
+ end
+ end
+
+ down do
+ drop_table(:media_objects)
+ drop_table(:creative_work_has_part)
+ drop_table(:creative_works)
+ drop_table(:things)
+ end
+end
|
Add draft migration for a relational data model
|
diff --git a/server/roles/src/nginx/spec/boot-script.rb b/server/roles/src/nginx/spec/boot-script.rb
index abc1234..def5678 100644
--- a/server/roles/src/nginx/spec/boot-script.rb
+++ b/server/roles/src/nginx/spec/boot-script.rb
@@ -8,11 +8,21 @@ ansiblevars = MakeServer::Ansible.load_variables
v = ansiblevars['role']['nginx']
- describe service(v['initscript']) do
- it { should be_enabled } if v['enabled']
- it { should_not be_enabled } unless v['enabled']
- it { should be_running } if v['started']
- it { should_not be_running } unless v['started']
+ describe 'nginx service status' do
+ describe service(v['initscript']) do
+ it { should be_enabled } if v['enabled']
+ it { should_not be_enabled } unless v['enabled']
+ it { should be_running } if v['started']
+ it { should_not be_running } unless v['started']
+ end
+ end
+
+ describe 'nginx process status' do
+ if v['started'] then
+ describe process('nginx') do
+ its(:user) { should eq v['user']['username'] }
+ end
+ end
end
end
|
Add test code for checking nginx service
|
diff --git a/rails-better-filters.gemspec b/rails-better-filters.gemspec
index abc1234..def5678 100644
--- a/rails-better-filters.gemspec
+++ b/rails-better-filters.gemspec
@@ -16,5 +16,5 @@ s.require_paths = ['lib']
s.files = Dir.glob('lib/**/*.rb')
- s.add_development_dependency 'rspec'
+ s.add_development_dependency 'rspec', '~> 2.14'
end
|
Resolve open-ended dependency on rspec to fix the warning.
|
diff --git a/refinerycms-products.gemspec b/refinerycms-products.gemspec
index abc1234..def5678 100644
--- a/refinerycms-products.gemspec
+++ b/refinerycms-products.gemspec
@@ -18,6 +18,8 @@ s.add_dependency 'refinerycms-core', '~> 3.0.0'
s.add_dependency 'refinerycms-page-images', '~> 3.0.0'
s.add_dependency 'refinerycms-acts-as-indexed', '~> 2.0.0'
+ s.add_dependency 'friendly_id', '~> 5.1.0'
+ s.add_dependency 'globalize', ['>= 4.0.0', '< 5.2']
s.add_dependency 'awesome_nested_set', '~> 3.0.0'
# Development dependencies (usually used for testing)
|
Add friendly_id and globalize dependencies in gempsec
|
diff --git a/spec/features/worker_picks_project_spec.rb b/spec/features/worker_picks_project_spec.rb
index abc1234..def5678 100644
--- a/spec/features/worker_picks_project_spec.rb
+++ b/spec/features/worker_picks_project_spec.rb
@@ -1,6 +1,7 @@ require 'rails_helper'
-feature 'worker picks project' do
+feature 'Logging time' do
+
Given!(:current_account) { FactoryGirl.create(:account) }
Given!(:project_to_work_on) { FactoryGirl.create(:project) }
Given!(:project_not_to_work_on) { FactoryGirl.create(:project) }
@@ -15,8 +16,15 @@ When { select("1 half-day", from: "Amount") }
When { select("4", from: "Quality") }
When { fill_in("Worked at", with: "2015-05-06") }
- When { check( "Do Not Bill")}
- When { click_link_or_button "Log Capacity" }
- Then { expect(Capacity.find_by(worker: current_account, amount: 4, quality: 4, worked_at: "2015-05-06", do_not_bill: true, project: project_to_work_on)).to be_present }
-end+ context "when tracking time as not do not bill" do
+ When { click_link_or_button "Log Capacity" }
+ Then { expect(Capacity.find_by(worker: current_account, amount: 4, quality: 4, worked_at: "2015-05-06", do_not_bill: true, project: project_to_work_on)).to be_present }
+ end
+
+ context "when tracking time as do not bill" do
+ When { check("Do Not Bill")}
+ When { click_link_or_button "Log Capacity" }
+ Then { expect(Capacity.find_by(worker: current_account, amount: 4, quality: 4, worked_at: "2015-05-06", do_not_bill: true, project: project_to_work_on)).to be_present }
+ end
+end
|
Test logging capacity when do not bill isn't checked
We appear to be requiring Do Not Bill to be set instead of letting it default
to false. This is causing the capacity not to be saved unless it's marked as DNB
|
diff --git a/spec/routing/network_ports_routing_spec.rb b/spec/routing/network_ports_routing_spec.rb
index abc1234..def5678 100644
--- a/spec/routing/network_ports_routing_spec.rb
+++ b/spec/routing/network_ports_routing_spec.rb
@@ -0,0 +1,16 @@+describe "routes for Network Ports" do
+ let(:controller_name) { "network_port" }
+ describe "#listnav_search_selected" do
+ it "routes with POST" do
+ expect(post("/#{controller_name}/listnav_search_selected")).to route_to(
+ "#{controller_name}#listnav_search_selected")
+ end
+ end
+
+ describe "#save_default_search" do
+ it "routes with POST" do
+ expect(post("/#{controller_name}/save_default_search")).to route_to(
+ "#{controller_name}#save_default_search")
+ end
+ end
+end
|
Test for listnav saved search routes
|
diff --git a/spec/toy_robot_simulator/simulator_spec.rb b/spec/toy_robot_simulator/simulator_spec.rb
index abc1234..def5678 100644
--- a/spec/toy_robot_simulator/simulator_spec.rb
+++ b/spec/toy_robot_simulator/simulator_spec.rb
@@ -1,4 +1,19 @@ require 'spec_helper'
describe ToyRobotSimulator::Simulator do
+ describe "#initialize" do
+ let(:simulator) { ToyRobotSimulator::Simulator }
+
+ it 'puts welcome message when it starts' do
+ allow($stdin).to receive(:gets).and_return(false)
+ expect_any_instance_of(simulator).to receive(:welcome_message)
+ simulator.new
+ end
+
+ it 'ends when user type QUIT' do
+ allow_any_instance_of(simulator).to receive(:welcome_message)
+ allow($stdin).to receive(:gets).and_return("QUIT")
+ simulator.new
+ end
+ end
end
|
Add first specs for Simulator to accept commands
|
diff --git a/server/spec/challenge_spec.rb b/server/spec/challenge_spec.rb
index abc1234..def5678 100644
--- a/server/spec/challenge_spec.rb
+++ b/server/spec/challenge_spec.rb
@@ -37,19 +37,25 @@ subject.play
end
- context 'when there was no such challenge'
+ context 'but there was no such challenge'
- context 'when the challenge was issued' do
+ context 'and the challenge was issued' do
- context 'when the team name is not supplied'
+ context 'and answered with' do
- context 'when the answer is correct'
+ context 'no team name'
- context 'when the discount is not applied'
+ context 'everything correct'
- context 'when the sales tax is not added'
+ context 'tax but no discount'
- context 'when the answer is completely undecipherable'
+ context 'discount but no tax'
+
+ context 'neither tax nor discount'
+
+ context 'an unfathomable answer'
+
+ end
end
|
Clarify the test plan a litte
|
diff --git a/test/support.rb b/test/support.rb
index abc1234..def5678 100644
--- a/test/support.rb
+++ b/test/support.rb
@@ -15,7 +15,7 @@ require 'minitest/autorun'
FIXTURES_PATH = File.absolute_path("#{File.dirname(__FILE__)}/fixtures")
-TEST_KEY = '74c608b61192dd78076fc97af82bbe808415355e'
+TEST_KEY = 'a20f4aeeb7b77c37981b61153076ace5c88893db'
Minitest::Reporters.use! [
Minitest::Reporters::DefaultReporter.new(color: true)
|
Update new test API key
|
diff --git a/db/migrate/20121112213825_remove_default_from_comments.rb b/db/migrate/20121112213825_remove_default_from_comments.rb
index abc1234..def5678 100644
--- a/db/migrate/20121112213825_remove_default_from_comments.rb
+++ b/db/migrate/20121112213825_remove_default_from_comments.rb
@@ -0,0 +1,9 @@+class RemoveDefaultFromComments < ActiveRecord::Migration
+ def up
+ change_column_default(:comments, :commenter, nil)
+ end
+
+ def down
+ change_column_default(:comments, :commenter, "Anonymus")
+ end
+end
|
Add missing migration from 3297c389a1d4976f671
|
diff --git a/config/initializers/twitter.rb b/config/initializers/twitter.rb
index abc1234..def5678 100644
--- a/config/initializers/twitter.rb
+++ b/config/initializers/twitter.rb
@@ -1,7 +1,7 @@ Twitter.configure do |config|
- config.consumer_key = ENV['twitter_consumer_key']
- config.consumer_secret = ENV['twitter_consumer_secret']
+ config.consumer_key = ENV['TWITTER_CONSUMER_KEY']
+ config.consumer_secret = ENV['TWITTER_CONSUMER_SECRET']
- config.consumer_key = ENV['twitter_oauth_token']
- config.consumer_secret = ENV['twitter_oauth_token_secret']
+ config.oauth_key = ENV['TWITTER_OAUTH_TOKEN']
+ config.oauth_secret = ENV['TWITTER_OAUTH_TOKEN_SECRET']
end
|
Use environment variables, the way grown ups do it today
|
diff --git a/lib/generators/express_admin/install/install_generator.rb b/lib/generators/express_admin/install/install_generator.rb
index abc1234..def5678 100644
--- a/lib/generators/express_admin/install/install_generator.rb
+++ b/lib/generators/express_admin/install/install_generator.rb
@@ -18,7 +18,7 @@ Bundler.clean_system("bundle install")
Bundler.clean_system("rails generate rails_admin:install admin/manage")
git add: "."
- git commit: "'-m [express_admin] install express_rails_admin'"
+ git commit: "-m '[express_admin] install express_rails_admin'"
end
|
Fix install generator commit failure
|
diff --git a/plugins/push_notification/test/helpers/observers_test_helper.rb b/plugins/push_notification/test/helpers/observers_test_helper.rb
index abc1234..def5678 100644
--- a/plugins/push_notification/test/helpers/observers_test_helper.rb
+++ b/plugins/push_notification/test/helpers/observers_test_helper.rb
@@ -9,7 +9,8 @@ end
def create_add_member_task
- person = fast_create(Person)
+ user = fast_create(User)
+ person = fast_create(Person, :user_id => user.id)
community = fast_create(Community)
return AddMember.create!(:requestor => person, :target => community)
end
|
Fix addMember task creation for push_notification plugin
|
diff --git a/array_lists.rb b/array_lists.rb
index abc1234..def5678 100644
--- a/array_lists.rb
+++ b/array_lists.rb
@@ -1,8 +1,13 @@ class ArrayList
- def initialize
+ attr_accessor :size, :array
+ def initialize(size)
+ @size = size
+ @array = Array.new(size)
end
def add(element)
+ @array.push(element)
+ return @array.last
end
def get(index)
|
Create initialize method, create add(element) method
|
diff --git a/lib/generators/spree_gateway/install/install_generator.rb b/lib/generators/spree_gateway/install/install_generator.rb
index abc1234..def5678 100644
--- a/lib/generators/spree_gateway/install/install_generator.rb
+++ b/lib/generators/spree_gateway/install/install_generator.rb
@@ -8,7 +8,7 @@
def run_migrations
res = ask "Would you like to run the migrations now? [Y/n]"
- if res == "" || res.downcase == "y"
+ if res.nil? || res == "" || res.downcase == "y"
run 'bundle exec rake db:migrate'
else
puts "Skiping rake db:migrate, don't forget to run it!"
|
Allow res to be nil in InstallGenerator's run_migrations
Fixes: http://ci.spreecommerce.com/viewLog.html?buildId=5911&buildTypeId=bt14&tab=buildLog#_focus=123
|
diff --git a/app/controllers/gobierto_budgets/featured_budget_lines_controller.rb b/app/controllers/gobierto_budgets/featured_budget_lines_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/gobierto_budgets/featured_budget_lines_controller.rb
+++ b/app/controllers/gobierto_budgets/featured_budget_lines_controller.rb
@@ -18,7 +18,7 @@ if @code.present?
render pick_template, layout: false
else
- render head: :success
+ head :ok
end
end
|
Fix response when code is not present
The blank response of featured_budgets_lines_controller was failing with
a 500 error
|
diff --git a/test/integration/instance/instance_spec.rb b/test/integration/instance/instance_spec.rb
index abc1234..def5678 100644
--- a/test/integration/instance/instance_spec.rb
+++ b/test/integration/instance/instance_spec.rb
@@ -15,10 +15,8 @@ it { should be_running }
end
-describe service('memcached_painful_cache') do
- it { should be_installed }
- it { should be_enabled }
- it { should be_running }
+describe command('ps aux | grep -q /va[r]/run/memcached_painful_cache.pid') do
+ it { should exist }
end
describe port(11_212) do
|
Switch back to command for process checking
InSpec fails to find the init services on Ubuntu
Signed-off-by: Tim Smith <[email protected]>
|
diff --git a/test/lib/restforce/db/runner_cache_test.rb b/test/lib/restforce/db/runner_cache_test.rb
index abc1234..def5678 100644
--- a/test/lib/restforce/db/runner_cache_test.rb
+++ b/test/lib/restforce/db/runner_cache_test.rb
@@ -32,7 +32,7 @@ end
before do
- cache.collection(mapping, :database_record_type) { next }
+ cache.collection(mapping, :database_record_type)
end
it "does not re-invoke the original method call" do
|
Remove obsolete block invocation in Cache spec
|
diff --git a/rails_event_store-rspec/lib/rails_event_store/rspec/have_applied.rb b/rails_event_store-rspec/lib/rails_event_store/rspec/have_applied.rb
index abc1234..def5678 100644
--- a/rails_event_store-rspec/lib/rails_event_store/rspec/have_applied.rb
+++ b/rails_event_store-rspec/lib/rails_event_store/rspec/have_applied.rb
@@ -8,7 +8,7 @@ end
def matches?(aggregate_root)
- @events = aggregate_root.__send__(:unpublished_events)
+ @events = aggregate_root.unpublished_events.to_a
@matcher.matches?(@events) && matches_count(@events, @expected, @count)
end
|
Use new public API correctly.
https://github.com/RailsEventStore/rails_event_store/pull/114/
|
diff --git a/lib/infoblox_client/client/zones.rb b/lib/infoblox_client/client/zones.rb
index abc1234..def5678 100644
--- a/lib/infoblox_client/client/zones.rb
+++ b/lib/infoblox_client/client/zones.rb
@@ -15,8 +15,7 @@ end
def create_zone(attrs={})
- body = attrs.merge({'view' => 'default'})
- body_json = JSON.dump(body)
+ body_json = JSON.dump(attrs)
post_request = -> { post('zone_auth', body_json) }
handle_response(&post_request)
end
|
Remove hardcoding view from create_zone method
|
diff --git a/lib/php_serialization/serializer.rb b/lib/php_serialization/serializer.rb
index abc1234..def5678 100644
--- a/lib/php_serialization/serializer.rb
+++ b/lib/php_serialization/serializer.rb
@@ -13,7 +13,7 @@ when Float then
"d:#{object};"
when String, Symbol then
- "s:#{object.to_s.length}:\"#{object}\";"
+ "s:#{object.to_s.bytesize}:\"#{object}\";"
when Array then
idx = -1
items = object.map { |item| "#{run(idx += 1)}#{run(item)}" }.join
@@ -23,14 +23,14 @@ "a:#{object.length}:{#{items}}"
else
klass_name = object.class.name
-
+
if klass_name =~ /^Struct::/ && php_klass = object.instance_variable_get("@_php_class")
klass_name = php_klass
end
-
+
attributes = object.instance_variables.map { |var_name| "#{run(var_name.gsub(/^@/, ''))}#{run(object.instance_variable_get(var_name))}" }
"O:#{klass_name.length}:\"#{klass_name}\":#{object.instance_variables.length}:{#{attributes}}"
end
- end
+ end
end
-end+end
|
Fix serializing multibyte character length issue.
When developer serialize multibyte character, it seems serialized, but
unserialize it through php fails. It is because php serialization
expects sting byte length, but `String#length` is just length of string
in ruby >= 1.9.
To fix the issue, changed to use `String#bytesize` in `Serializer#run`.
|
diff --git a/config/initializers/doorkeeper.rb b/config/initializers/doorkeeper.rb
index abc1234..def5678 100644
--- a/config/initializers/doorkeeper.rb
+++ b/config/initializers/doorkeeper.rb
@@ -2,7 +2,15 @@ orm :active_record
resource_owner_authenticator do
- env[:clearance].try(:current_user)
+ clearance_session = env[:clearance] # session = Clearance::Session.new(env)
+ user = clearance_session && clearance_session.current_user
+
+ if user
+ user
+ else
+ session[:return_to] = request.fullpath
+ redirect_to(sign_in_url)
+ end
end
admin_authenticator do
|
Bring back redirect_to or sign in on oauth flow won't work!
|
diff --git a/db/migrate/20140210121403_add_unique_index_to_trade_permits.rb b/db/migrate/20140210121403_add_unique_index_to_trade_permits.rb
index abc1234..def5678 100644
--- a/db/migrate/20140210121403_add_unique_index_to_trade_permits.rb
+++ b/db/migrate/20140210121403_add_unique_index_to_trade_permits.rb
@@ -1,5 +1,5 @@ class AddUniqueIndexToTradePermits < ActiveRecord::Migration
def change
- add_index "trade_permits", :number, :name => "trade_permits_number_idx"
+ add_index "trade_permits", :number, :name => "trade_permits_number_idx", :unique => true
end
end
|
Set the index to be actually unique
|
diff --git a/gas.gemspec b/gas.gemspec
index abc1234..def5678 100644
--- a/gas.gemspec
+++ b/gas.gemspec
@@ -20,7 +20,6 @@ s.add_dependency 'thor', '~> 0.14.6'
s.add_development_dependency 'rspec'
- s.add_development_dependency 'rr'
s.add_development_dependency 'bundler'
s.files = Dir.glob("{bin,lib,spec,config}/**/*") + ['LICENSE', 'README.textile']
|
Remove rr as development dependency
|
diff --git a/lib/extensions/deferred_workflow_state_persistence/workflow.rb b/lib/extensions/deferred_workflow_state_persistence/workflow.rb
index abc1234..def5678 100644
--- a/lib/extensions/deferred_workflow_state_persistence/workflow.rb
+++ b/lib/extensions/deferred_workflow_state_persistence/workflow.rb
@@ -1,10 +1,12 @@ # frozen_string_literal: true
+require 'workflow_activerecord'
+
module Extensions::DeferredWorkflowStatePersistence::Workflow; end
module Extensions::DeferredWorkflowStatePersistence::Workflow::Adapter; end
module Extensions::DeferredWorkflowStatePersistence::Workflow::Adapter::DeferredActiveRecord
extend ActiveSupport::Concern
included do
- include Workflow::Adapter::ActiveRecord
+ include WorkflowActiverecord::Adapter::ActiveRecord
include InstanceMethods
end
|
Include WorkflowActiverecord in the state persistence extension.
|
diff --git a/spec/lib/column_spec.rb b/spec/lib/column_spec.rb
index abc1234..def5678 100644
--- a/spec/lib/column_spec.rb
+++ b/spec/lib/column_spec.rb
@@ -0,0 +1,72 @@+require 'spec_helper'
+
+describe MightyGrid::Column do
+
+ describe '#new' do
+ describe 'with attribute' do
+ context 'without options' do
+ subject { MightyGrid::Column.new(:name) }
+ context 'parameters' do
+ its(:attribute) { should == :name }
+ its(:render_value) { should == :name }
+ its(:title) { should == '' }
+ its(:attrs) { should == {} }
+ its(:th_attrs) { should == {} }
+ end
+ end
+
+ context 'with html option' do
+ let(:options) { {html: {class: 'column'}} }
+ subject { MightyGrid::Column.new(:name, options) }
+ its(:options) { should == options }
+ its(:attrs) { should == options[:html] }
+ end
+
+ context 'with title option' do
+ let(:options) { {title: 'Name'} }
+ subject { MightyGrid::Column.new(:name, options) }
+ its(:options) { should == options }
+ its(:title) { should == options[:title] }
+ end
+
+ context 'with th_html option' do
+ let(:options) { {th_html: {class: 'active'}} }
+ subject { MightyGrid::Column.new(:name, options) }
+ its(:options) { should == options }
+ its(:th_attrs) { should == {class: 'active'} }
+ end
+ end
+
+ describe 'with block' do
+ context 'without options' do
+ subject { MightyGrid::Column.new {:test} }
+ context 'parameters' do
+ its(:attribute) { should == nil }
+ its(:title) { should == '' }
+ its(:render_value) { should be_an_instance_of Proc }
+ its(:attrs) { should == {} }
+ its(:th_attrs) { should == {} }
+ end
+ end
+ end
+ end
+
+ describe '.render' do
+ let(:product){ Product.create(name: 'product name') }
+
+ describe 'with attribute' do
+ subject(:column){ MightyGrid::Column.new(:name) }
+ it 'should return attribute value' do
+ column.render(product).should == product[:name]
+ end
+ end
+
+ describe 'with block' do
+ subject(:column){ MightyGrid::Column.new { "#{product.name} 1" } }
+ it 'should return attribute value' do
+ column.render(product).should == "#{product[:name]} 1"
+ end
+ end
+ end
+
+end
|
Add specs for MightyGrid::Column class
|
diff --git a/spec/sawarineko_spec.rb b/spec/sawarineko_spec.rb
index abc1234..def5678 100644
--- a/spec/sawarineko_spec.rb
+++ b/spec/sawarineko_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Sawarineko do
subject(:sawarineko) { described_class }
- describe '#nya' do
+ describe '.nya' do
it { is_expected.to respond_to(:nya) }
it 'converts string passed as an argument' do
|
Fix description for class method
It's `Sawarineko.nya`, not `Sawarineko#nya`.
|
diff --git a/authem.gemspec b/authem.gemspec
index abc1234..def5678 100644
--- a/authem.gemspec
+++ b/authem.gemspec
@@ -12,8 +12,7 @@
spec.required_ruby_version = ">= 1.9.3"
- spec.files = `git ls-files`.split($/)
- spec.test_files = spec.files.grep("spec")
+ spec.files = Dir["CHANGELOG.md", "README.md", "LICENSE", "lib/**/**"]
spec.require_path = "lib"
spec.add_dependency "activesupport", ">= 4.0.4"
|
Clean up gemspec a bit
|
diff --git a/lib/inch/cli/command/output/stats.rb b/lib/inch/cli/command/output/stats.rb
index abc1234..def5678 100644
--- a/lib/inch/cli/command/output/stats.rb
+++ b/lib/inch/cli/command/output/stats.rb
@@ -32,27 +32,6 @@
puts JSON.pretty_generate(hash)
end
-
- private
-
- def display_stats
- all_size = objects.size
- @ranges.each do |range|
- size = range.objects.size
- percent = all_size > 0 ? ((size/all_size.to_f) * 100).to_i : 0
- trace "#{size.to_s.rjust(5)} objects #{percent.to_s.rjust(3)}% #{range.description}".method(range.color).call
- end
- end
-
- def good_percent
- total = objects.size
- if total > 0
- percent = good_count/total.to_f
- (percent * 100).to_i
- else
- 0
- end
- end
end
end
end
|
Remove dead code from Command::Output::Stats
|
diff --git a/lib/markety/authentication_header.rb b/lib/markety/authentication_header.rb
index abc1234..def5678 100644
--- a/lib/markety/authentication_header.rb
+++ b/lib/markety/authentication_header.rb
@@ -1,7 +1,7 @@ module Markety
# This class exists only to encapsulate the authentication header part of a soap request to marketo
class AuthenticationHeader
- DIGEST = OpenSSL::Digest::Digest.new('sha1')
+ DIGEST = OpenSSL::Digest.new('sha1')
def initialize(access_key, secret_key, time = DateTime.now)
@access_key = access_key
|
Use OpenSSL::Digest rather than OpenSSL::Digest::Digest
This eliminates the `Digest::Digest is deprecated; use Digest` warning
when markety is required.
|
diff --git a/lib/metasploit/credential/version.rb b/lib/metasploit/credential/version.rb
index abc1234..def5678 100644
--- a/lib/metasploit/credential/version.rb
+++ b/lib/metasploit/credential/version.rb
@@ -7,7 +7,7 @@ # The minor version number, scoped to the {MAJOR} version number.
MINOR = 4
# The patch number, scoped to the {MINOR} version number.
- PATCH = 1
+ PATCH = 2
# The prerelease name of the given {MAJOR}.{MINOR}.{PATCH} version number. Will not be defined on master.
PRERELEASE = 'originating-host-id-scope-sucks'
|
Use correct branch name in PR.
|
diff --git a/lib/poloxy/item_merge/per_address.rb b/lib/poloxy/item_merge/per_address.rb
index abc1234..def5678 100644
--- a/lib/poloxy/item_merge/per_address.rb
+++ b/lib/poloxy/item_merge/per_address.rb
@@ -0,0 +1,41 @@+class Poloxy::ItemMerge::PerAddress < Poloxy::ItemMerge::Base
+
+ private
+
+ # @param data [Hash] nested Hash of {Poloxy::DataModel::Item}
+ # @return [<Poloxy::MessageContainer>]
+ def merge_items data
+ mcontainer = Poloxy::MessageContainer.new @config
+ data.each_pair do |type, _data|
+ _data.each_pair do |addr, tree|
+ _mcontainer = merge_tree(tree)
+ _mcontainer.unify
+ mcontainer.merge _mcontainer
+ end
+ end
+ mcontainer
+ end
+
+ # @param tree [Hash] nested Hash of {Poloxy::DataModel::Item}
+ def merge_tree tree
+ mcontainer = Poloxy::MessageContainer.new @config
+ tree.each_pair do |key, stash|
+ next if key == :items
+ mcontainer.merge( merge_tree(stash) )
+ end
+ if tree.has_key? :items
+ mcontainer.merge( items_to_messages(tree[:items]) )
+ end
+ mcontainer
+ end
+
+ # @param items [Hash{String => Hash}]
+ def items_to_messages items
+ mcontainer = Poloxy::MessageContainer.new @config
+ items.each_pair do |name, stash|
+ mcontainer.append items2msg(name, stash)
+ end
+ mcontainer
+ end
+end
+
|
Implement 'PerAddress' config option for deliver.item.merger
|
diff --git a/spec/lib/lasp/params_builder_spec.rb b/spec/lib/lasp/params_builder_spec.rb
index abc1234..def5678 100644
--- a/spec/lib/lasp/params_builder_spec.rb
+++ b/spec/lib/lasp/params_builder_spec.rb
@@ -2,6 +2,14 @@
module Lasp
describe ParamsBuilder do
+ it "creates a Params object for normal params" do
+ expect(described_class.build([:a, :b])).to be_a Params
+ end
+
+ it "creates a VariadicParams object when there is an ampersand" do
+ expect(described_class.build([:a, :b, :&, :c])).to be_a VariadicParams
+ end
+
it "fails when params are not passed as a list" do
expect {
described_class.build(:a)
|
Add happy path tests for ParamsBuilder
|
diff --git a/app/helpers/orgs_helper.rb b/app/helpers/orgs_helper.rb
index abc1234..def5678 100644
--- a/app/helpers/orgs_helper.rb
+++ b/app/helpers/orgs_helper.rb
@@ -1,19 +1,17 @@ module OrgsHelper
+ # frozen_string_literal: true
- DEFAULT_EMAIL = '%{organisation_email}'.freeze
+ DEFAULT_EMAIL = '%{organisation_email}'
# Tooltip string for Org feedback form.
#
# @param org [Org] The current Org we're updating feedback form for.
# @return [String] The tooltip message
def tooltip_for_org_feedback_form(org)
- output = <<~TEXT
- Someone will respond to your request within 48 hours. If you have
- questions pertaining to this action please contact us at
- %{email}.
- TEXT
- email = org.contact_email.present? ? org.contact_email : DEFAULT_EMAIL
- _(output % { email: email })
+ email = org.contact_email.presence || DEFAULT_EMAIL
+ _("Someone will respond to your request within 48 hours. If you have \
+ questions pertaining to this action please contact us at %{email}") % {
+ email: email
+ }
end
-
end
|
Fix how strings are wrapped in translation helper
|
diff --git a/app/mailers/load_mailer.rb b/app/mailers/load_mailer.rb
index abc1234..def5678 100644
--- a/app/mailers/load_mailer.rb
+++ b/app/mailers/load_mailer.rb
@@ -8,7 +8,7 @@ end
def send_notification(email, load_event)
- subject_line="AACT #{ENV['RAILS_ENV']} #{load_event.event_type} Status: #{load_event.status}. To add: #{load_event.should_add} To update: #{load_event.should_change} Total processed: #{load_event.processed}"
+ subject_line="AACT #{ENV['S3_BUCKET_NAME']} #{load_event.event_type} Status: #{load_event.status}. To add: #{load_event.should_add} To update: #{load_event.should_change} Total processed: #{load_event.processed}"
mail(from: '<[email protected]>', to: email, subject: subject_line, body: load_event.description)
end
end
|
Update subject line to reveal environment. In Heroku, RAILS_ENV is defined as production, even in dev environment, so use the S3_Bucket_Name which reveals the actual environment.
|
diff --git a/react-native-lookback.podspec b/react-native-lookback.podspec
index abc1234..def5678 100644
--- a/react-native-lookback.podspec
+++ b/react-native-lookback.podspec
@@ -14,5 +14,4 @@ s.source_files = "ios/*"
s.platform = :ios, "8.0"
s.dependency "Lookback", "1.4.1"
- s.vendored_frameworks = "Lookback.framework"
end
|
Revert and remove lookback as a vendored framework
|
diff --git a/core/app/controllers/spree/admin/return_authorizations_controller.rb b/core/app/controllers/spree/admin/return_authorizations_controller.rb
index abc1234..def5678 100644
--- a/core/app/controllers/spree/admin/return_authorizations_controller.rb
+++ b/core/app/controllers/spree/admin/return_authorizations_controller.rb
@@ -1,7 +1,7 @@ module Spree
module Admin
class ReturnAuthorizationsController < ResourceController
- belongs_to :order, :find_by => :number
+ belongs_to 'spree/order', :find_by => :number
update.after :associate_inventory_units
create.after :associate_inventory_units
|
Correct reference to order model in ReturnAuthorizationsController
|
diff --git a/Casks/spotifybeta.rb b/Casks/spotifybeta.rb
index abc1234..def5678 100644
--- a/Casks/spotifybeta.rb
+++ b/Casks/spotifybeta.rb
@@ -1,6 +1,6 @@ cask :v1 => 'spotifybeta' do
- version '1.0.0.1093.g2eba9b4b-1679'
- sha256 'ac5e99bfb448d3f4ee46b1a95bd428c5d8f27e193b44895754ac4150a0f56a60'
+ version '1.0.0.1212.gc1771003-2016'
+ sha256 '7e702d08520e4ff8569afb12504788321f3e81b436685a72e0336f10f05720b8'
url "http://download.spotify.com/beta/spotify-app-#{version}.dmg"
name 'Spotify Beta'
|
Update SpotifyBeta.app to latest version.
|
diff --git a/tool/remove_old_guards.rb b/tool/remove_old_guards.rb
index abc1234..def5678 100644
--- a/tool/remove_old_guards.rb
+++ b/tool/remove_old_guards.rb
@@ -1,4 +1,6 @@-# Remove old version guards in ruby/spec
+# Removes old version guards in ruby/spec.
+# Run it from the ruby/spec repository root.
+# The argument is the new minimum supported version.
def dedent(line)
if line.start_with?(" ")
@@ -10,7 +12,7 @@
def remove_guards(guard, keep)
Dir["*/**/*.rb"].each do |file|
- contents = File.read(file)
+ contents = File.binread(file)
if contents =~ guard
puts file
lines = contents.lines.to_a
@@ -31,11 +33,11 @@ lines[first..last] = []
end
end
- File.write file, lines.join
+ File.binwrite file, lines.join
end
end
end
-version = (ARGV[0] || "2.3")
+version = ARGV.fetch(0)
remove_guards(/ruby_version_is ["']#{version}["'] do/, true)
remove_guards(/ruby_version_is ["'][0-9.]*["']...["']#{version}["'] do/, false)
|
Improve tool to remove old guards
|
diff --git a/rforce-wrapper.gemspec b/rforce-wrapper.gemspec
index abc1234..def5678 100644
--- a/rforce-wrapper.gemspec
+++ b/rforce-wrapper.gemspec
@@ -18,6 +18,8 @@ s.add_development_dependency 'mocha'
else
s.add_dependency 'rforce'
+ s.add_dependency 'rspec'
+ s.add_dependency 'mocha'
end
s.files = `git ls-files`.split("\n")
|
Add rspec and mocha as dependencies for older Gem::Versions
|
diff --git a/spec/jobs/renalware/hd/generate_monthly_statistics_job_spec.rb b/spec/jobs/renalware/hd/generate_monthly_statistics_job_spec.rb
index abc1234..def5678 100644
--- a/spec/jobs/renalware/hd/generate_monthly_statistics_job_spec.rb
+++ b/spec/jobs/renalware/hd/generate_monthly_statistics_job_spec.rb
@@ -15,6 +15,7 @@ travel_to Date.new(2017, 02, 01) do
create(:hd_closed_session, patient: patient, signed_off_at: Time.zone.now - 1.month)
+ pending
expect{ subject.perform }.to change{ Delayed::Job.count }.by(1)
end
end
|
Mark failing test as pending for now
Until we can get to the bottom of the issue
|
diff --git a/spec/acceptances/manage_spec.rb b/spec/acceptances/manage_spec.rb
index abc1234..def5678 100644
--- a/spec/acceptances/manage_spec.rb
+++ b/spec/acceptances/manage_spec.rb
@@ -34,4 +34,15 @@ expect(page).to have_content('Guirec Corbel2')
end
end
+
+ scenario 'Delete a user', js: true do
+ User.create!(name: 'Guirec Corbel', age: 29)
+
+ visit users_path
+ click_on 'Delete'
+
+ within('#users_table') do
+ expect(page).to_not have_content('Guirec Corbel')
+ end
+ end
end
|
Add a scenario to delete users
|
diff --git a/spec/sonar/registration_spec.rb b/spec/sonar/registration_spec.rb
index abc1234..def5678 100644
--- a/spec/sonar/registration_spec.rb
+++ b/spec/sonar/registration_spec.rb
@@ -28,11 +28,11 @@ context 'POSTing an invalid product key' do
let (:resp) { client.register_metasploit("DDXXXX") }
- xit 'responds that the license is invalid' do
+ it 'responds that the license is invalid' do
expect(resp).to have_key('valid')
expect(resp['valid']).to be(false)
end
- xit 'responds with an error message' do
+ it 'responds with an error message' do
expect(resp).to have_key('error')
expect(resp['error']).to match(/not appear to be valid/)
end
|
Add the live MS registration specs
|
diff --git a/Casks/divvy.rb b/Casks/divvy.rb
index abc1234..def5678 100644
--- a/Casks/divvy.rb
+++ b/Casks/divvy.rb
@@ -3,5 +3,5 @@ homepage 'http://mizage.com/divvy/'
version 'latest'
no_checksum
- link :app, 'Divvy.app'
+ link 'Divvy.app'
end
|
Remove :app designation from link
|
diff --git a/Casks/slack.rb b/Casks/slack.rb
index abc1234..def5678 100644
--- a/Casks/slack.rb
+++ b/Casks/slack.rb
@@ -8,7 +8,7 @@ :sha256 => 'e7af629495c52f3082dd4d7dca917a5a21921031b871461045e204bcc6d8fe03'
name 'Slack'
homepage 'http://slack.com'
- license :unknown # todo: change license and remove this comment; ':unknown' is a machine-generated placeholder
+ license :gratis
app 'Slack.app'
end
|
Add license info for Slack
|
diff --git a/test/integration/test_mws_headers.rb b/test/integration/test_mws_headers.rb
index abc1234..def5678 100644
--- a/test/integration/test_mws_headers.rb
+++ b/test/integration/test_mws_headers.rb
@@ -11,6 +11,11 @@ res = client.get_lowest_priced_offers_for_asin(client.marketplace.id,
'1780935374', 'New')
refute_nil res.mws_quota_max
+ refute_nil res.mws_quota_remaining
+ refute_nil res.mws_quota_resets_on
+ refute_nil res.mws_request_id
+ refute_nil res.mws_timestamp
+ refute_nil res.mws_response_context
end
end
end
|
Add all accessors to test
|
diff --git a/Clappr.podspec b/Clappr.podspec
index abc1234..def5678 100644
--- a/Clappr.podspec
+++ b/Clappr.podspec
@@ -1,30 +1,11 @@-#
-# Be sure to run `pod lib lint Clappr.podspec' to ensure this is a
-# valid spec before submitting.
-#
-# Any lines starting with a # are optional, but their use is encouraged
-# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
-#
-
Pod::Spec.new do |s|
s.name = "Clappr"
s.version = "0.1.0"
- s.summary = "A short description of Clappr."
-
-# This description is used to generate tags and improve search results.
-# * Think: What does it do? Why did you write it? What is the focus?
-# * Try to keep it short, snappy and to the point.
-# * Write the description between the DESC delimiters below.
-# * Finally, don't worry about the indent, CocoaPods strips it!
- s.description = <<-DESC
- DESC
-
- s.homepage = "https://github.com/<GITHUB_USERNAME>/Clappr"
- # s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
+ s.summary = "An extensible media player for iOS"
+ s.homepage = "http://clappr.io"
s.license = 'MIT'
s.author = { "Diego Marcon" => "[email protected]" }
- s.source = { :git => "https://github.com/<GITHUB_USERNAME>/Clappr.git", :tag => s.version.to_s }
- # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
+ s.source = { :git => "https://github.com/clappr/clappr-ios.git", :tag => s.version.to_s }
s.platform = :ios, '8.0'
s.requires_arc = true
@@ -33,8 +14,4 @@ s.resource_bundles = {
'Clappr' => ['Pod/Assets/*.png']
}
-
- # s.public_header_files = 'Pod/Classes/**/*.h'
- # s.frameworks = 'UIKit', 'MapKit'
- # s.dependency 'AFNetworking', '~> 2.3'
end
|
Update podspec homepage and description
|
diff --git a/app/controllers/detailed_guides_controller.rb b/app/controllers/detailed_guides_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/detailed_guides_controller.rb
+++ b/app/controllers/detailed_guides_controller.rb
@@ -2,7 +2,7 @@ layout "detailed-guidance"
skip_before_filter :set_search_path
before_filter :set_search_index
- before_filter :set_artefact, only: [:show]
+ before_filter :set_breadcrumb_trail, only: [:show]
before_filter :set_expiry, only: [:show]
before_filter :set_analytics_format, only: [:show]
@@ -28,7 +28,7 @@ set_slimmer_headers(proposition: "specialist")
end
- def set_artefact
+ def set_breadcrumb_trail
breadcrumb_trail = BreadcrumbTrail.for(@document)
set_slimmer_artefact breadcrumb_trail if breadcrumb_trail.valid?
end
|
Rename filter method to set detailed guide breadcrumbs
|
diff --git a/app/controllers/shipit/webhooks_controller.rb b/app/controllers/shipit/webhooks_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/shipit/webhooks_controller.rb
+++ b/app/controllers/shipit/webhooks_controller.rb
@@ -42,7 +42,8 @@ end
def repository_owner
- params.dig('repository', 'owner', 'login')
+ # Fallback to the organization sub-object if repository isn't included in the payload
+ params.dig('repository', 'owner', 'login') || params.dig('organization', 'login')
end
end
end
|
Handle more payload types in WebhookController calls
|
diff --git a/Cassette.podspec b/Cassette.podspec
index abc1234..def5678 100644
--- a/Cassette.podspec
+++ b/Cassette.podspec
@@ -14,7 +14,7 @@ spec.source_files = 'Cassette/*.{h,m}'
spec.ios.deployment_target = '8.0'
- spec.osx.deployment_target = '10.9'
+ spec.osx.deployment_target = '10.11'
spec.requires_arc = true
end
|
Support back to macOS 10.11
|
diff --git a/config.ru b/config.ru
index abc1234..def5678 100644
--- a/config.ru
+++ b/config.ru
@@ -12,6 +12,7 @@ map "/api/tiramisu/v1" do
use Rack::PostBodyContentTypeParser
use Rack::MethodOverride
+ use Pebbles::Cors
run TiramisuV1
end
|
Add Pebbles::Cors to endpoint too
|
diff --git a/ruby-jwt.gemspec b/ruby-jwt.gemspec
index abc1234..def5678 100644
--- a/ruby-jwt.gemspec
+++ b/ruby-jwt.gemspec
@@ -6,7 +6,6 @@ spec.name = 'jwt'
spec.version = JWT.gem_version
spec.authors = [
- 'Jeff Lindsay',
'Tim Rudat'
]
spec.email = '[email protected]'
@@ -14,6 +13,7 @@ spec.description = 'A pure ruby implementation of the RFC 7519 OAuth JSON Web Token (JWT) standard.'
spec.homepage = 'http://github.com/jwt/ruby-jwt'
spec.license = 'MIT'
+ spec.required_ruby_version = '~> 2.1'
spec.files = `git ls-files -z`.split("\x0")
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
Add minimum required ruby version to gemspec
|
diff --git a/db/migrate/20140618224954_add_fingerprint_to_gitolite_public_keys.rb b/db/migrate/20140618224954_add_fingerprint_to_gitolite_public_keys.rb
index abc1234..def5678 100644
--- a/db/migrate/20140618224954_add_fingerprint_to_gitolite_public_keys.rb
+++ b/db/migrate/20140618224954_add_fingerprint_to_gitolite_public_keys.rb
@@ -1,7 +1,9 @@ class AddFingerprintToGitolitePublicKeys < ActiveRecord::Migration
def self.up
- add_column :gitolite_public_keys, :fingerprint, :string, :null => false, :after => 'key'
+ add_column :gitolite_public_keys, :fingerprint, :string, :after => 'key'
+ GitolitePublicKey.update_all("fingerprint = ''")
+ change_column :gitolite_public_keys, :fingerprint, :string, :null => false
end
|
Fix db migration to v0.8 for Postgres
|
diff --git a/config/initializers/devise_custom_flash_messages.rb b/config/initializers/devise_custom_flash_messages.rb
index abc1234..def5678 100644
--- a/config/initializers/devise_custom_flash_messages.rb
+++ b/config/initializers/devise_custom_flash_messages.rb
@@ -11,7 +11,7 @@ if kind == :signed_up || (kind == :signed_in && resource.completeness_progress < 100)
options = { link: edit_user_path(resource) }
end
- kind = :signed_in_custom if kind == :signed_in
+ kind = :signed_in_custom if kind == :signed_in && resource.completeness_progress < 100
orifinal_find_message kind, options
end
|
Fix devise custom flash messages
|
diff --git a/metadata.rb b/metadata.rb
index abc1234..def5678 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -4,7 +4,7 @@ license 'All rights reserved'
description 'Installs/Configures local_apt'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version '0.1.0'
+version '0.2.0'
supports 'ubuntu'
depends 'apt'
|
Bump version on master after 0.1.0 release
|
diff --git a/metadata.rb b/metadata.rb
index abc1234..def5678 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -4,7 +4,7 @@ license 'MIT'
description 'Installs/Configures dokku'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version '1.0.0'
+version '0.2.0'
supports 'ubuntu', '= 13.04'
|
Make cookbook version 0.2.0 to match dokku's version
|
diff --git a/metadata.rb b/metadata.rb
index abc1234..def5678 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -6,12 +6,12 @@ long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
source_url 'https://github.com/stevenhaddox/cookbook-rvm_fw'
issues_url 'https://github.com/stevenhaddox/cookbook-rvm_fw/issues'
-version '0.5.0'
+version '1.0.0'
recipe 'rvm_fw::default', 'Install RVM via RVM::FW server'
-depends 'build-essential', '~> 7.0'
-depends 'apt', '~> 6.0.1'
+depends 'build-essential'
+depends 'apt'
supports 'centos'
supports 'fedora'
|
Remove dependency version locking for flexibility
|
diff --git a/spec/classes/example_spec.rb b/spec/classes/example_spec.rb
index abc1234..def5678 100644
--- a/spec/classes/example_spec.rb
+++ b/spec/classes/example_spec.rb
@@ -10,7 +10,6 @@
context "netrc class without any parameters" do
it { is_expected.to compile.with_all_deps }
-
end
end
end
|
Remove empty line in spec test
|
diff --git a/spec/support/vault_server.rb b/spec/support/vault_server.rb
index abc1234..def5678 100644
--- a/spec/support/vault_server.rb
+++ b/spec/support/vault_server.rb
@@ -7,6 +7,9 @@ class VaultServer
include Singleton
+ TOKEN_PATH = File.expand_path("~/.vault-token").freeze
+ TOKEN_PATH_BKUP = "#{TOKEN_PATH}.bak".freeze
+
def self.method_missing(m, *args, &block)
self.instance.public_send(m, *args, &block)
end
@@ -14,6 +17,15 @@ attr_reader :token
def initialize
+ # If there is already a vault-token, we need to move it so we do not
+ # clobber!
+ if File.exist?(TOKEN_PATH)
+ FileUtils.mv(TOKEN_PATH, TOKEN_PATH_BKUP)
+ at_exit do
+ FileUtils.mv(TOKEN_PATH_BKUP, TOKEN_PATH)
+ end
+ end
+
io = Tempfile.new("vault-server")
pid = Process.spawn({}, "vault server -dev", out: io.to_i, err: io.to_i)
@@ -26,19 +38,7 @@ end
wait_for_ready do
- output = ""
-
- while
- io.rewind
- output = io.read
- break if !output.empty?
- end
-
- if output.match(/Root Token: (.+)/)
- @token = $1.strip
- else
- raise "Vault did not return a token!"
- end
+ @token = File.read(TOKEN_PATH)
end
end
@@ -48,14 +48,7 @@
def wait_for_ready(&block)
Timeout.timeout(5) do
- while
- begin
- open(address)
- rescue SocketError, Errno::ECONNREFUSED, EOFError
- rescue OpenURI::HTTPError => e
- break if e.message =~ /404/
- end
-
+ while !File.exist?(TOKEN_PATH)
sleep(0.25)
end
end
|
Update Vault server spec to use local token
|
diff --git a/epicify.gemspec b/epicify.gemspec
index abc1234..def5678 100644
--- a/epicify.gemspec
+++ b/epicify.gemspec
@@ -8,7 +8,7 @@ s.platform = Gem::Platform::RUBY
s.authors = ["Gordon McCreight", "Kaushik Gopal", "Guilherme Moura"]
s.email = ["gordon@weddingparty"]
- s.homepage = ""
+ s.homepage = "https://github.com/weddingparty/epicify"
s.summary = %q{Add epic reporting to Asana projects}
s.description = %q{Add epic reporting to Asana projects}
s.license = "MIT"
|
Add a homepage to the gem spec
|
diff --git a/ZettaKit.podspec b/ZettaKit.podspec
index abc1234..def5678 100644
--- a/ZettaKit.podspec
+++ b/ZettaKit.podspec
@@ -1,6 +1,6 @@ Pod::Spec.new do |s|
s.name = "ZettaKit"
- s.version = "0.0.6"
+ s.version = "0.0.7"
s.summary = "A Reactive Hypermedia Client for the Zetta HTTP API."
s.description = <<-DESC
This library allows you to harness the power of Reactive Programming to interact with the Zetta HTTP API.
|
Update to podspec to bump version.
|
diff --git a/app/helpers/sessions_helper.rb b/app/helpers/sessions_helper.rb
index abc1234..def5678 100644
--- a/app/helpers/sessions_helper.rb
+++ b/app/helpers/sessions_helper.rb
@@ -19,4 +19,11 @@ def signed_in?
!current_user.nil?
end
+
+ # remembers a user in a persistent session (secure cookie)
+ def remember(user)
+ user.remember
+ cookies.permanent.signed[:user_id] = user.id
+ cookies.permanent[:remember_token] = user.remember_token
+ end
end
|
Add remember method to sessions helper to call user remember method, and set secure cookies for user id and remember token. Add call to remember helper in session controller create action.
|
diff --git a/jekyll-crosspost-to-medium.gemspec b/jekyll-crosspost-to-medium.gemspec
index abc1234..def5678 100644
--- a/jekyll-crosspost-to-medium.gemspec
+++ b/jekyll-crosspost-to-medium.gemspec
@@ -22,7 +22,7 @@ s.homepage = 'http://rubygems.org/gems/jekyll-crosspost-to-medium'
s.license = 'MIT'
- s.add_runtime_dependency "jekyll", ">= 2.0", "< 4.0"
+ s.add_runtime_dependency "jekyll", ">= 2.0", "< 5.0"
s.add_runtime_dependency "json", "~> 2.0"
s.add_runtime_dependency "http", "~> 2.0"
-end+end
|
Bump the jekyll version dependency
The gem runs fine currently on 4.0.1 so we can probably safely bump the max or remove it altogether
|
diff --git a/Casks/coreclr.rb b/Casks/coreclr.rb
index abc1234..def5678 100644
--- a/Casks/coreclr.rb
+++ b/Casks/coreclr.rb
@@ -7,5 +7,7 @@ license :mit
pkg "dotnet-osx-x64.#{version}.pkg"
+ depends_on macos: '>= :yosemite'
+
uninstall pkgutil: 'com.microsoft.dotnet.cli.pkg.dotnet-osx-x64.*'
end
|
Add depends_on >= :yosemite (10.10)
|
diff --git a/app/controllers/components/course/duplication_component.rb b/app/controllers/components/course/duplication_component.rb
index abc1234..def5678 100644
--- a/app/controllers/components/course/duplication_component.rb
+++ b/app/controllers/components/course/duplication_component.rb
@@ -6,7 +6,7 @@ end
def sidebar_items
- return [] unless current_user.administrator?
+ return [] unless can?(:duplicate, current_course)
[
{
key: :duplication,
|
Allow course managers to duplicate their course.
Use the previously defined :duplicate ability to check.
Coursemology administrators can still duplicate courses as
administrators have all abilities.
|
diff --git a/Formula/tsuru.rb b/Formula/tsuru.rb
index abc1234..def5678 100644
--- a/Formula/tsuru.rb
+++ b/Formula/tsuru.rb
@@ -11,6 +11,12 @@ zsh_completion.install "misc/zsh-completion" => "tsuru"
end
+ devel do
+ url "https://github.com/tsuru/tsuru-client/releases/download/1.7.0/tsuru_1.7.0_macOS_amd64.tar.gz"
+ version "1.7.0"
+ sha256 "e6032cdcc3c29c05c62f0b9dc8d7b38cfba9e9383f1f8850c930a4fd9ec1e081"
+ end
+
test do
end
|
Add devel release pointing to stable version
No surprises or errors for people using install --devel by default.
|
diff --git a/cookbooks/travis_ci_cookiecat/attributes/default.rb b/cookbooks/travis_ci_cookiecat/attributes/default.rb
index abc1234..def5678 100644
--- a/cookbooks/travis_ci_cookiecat/attributes/default.rb
+++ b/cookbooks/travis_ci_cookiecat/attributes/default.rb
@@ -22,7 +22,6 @@ openjdk7
openjdk8
oraclejdk7
- oraclejdk9
)
override['leiningen']['home'] = '/home/travis'
|
Remove oraclejdk9 from list of java alternate versions
for now? Because travis-ci/travis-ci#7778
|
diff --git a/db/migrate/20150803165102_add_choice_foreign_key.rb b/db/migrate/20150803165102_add_choice_foreign_key.rb
index abc1234..def5678 100644
--- a/db/migrate/20150803165102_add_choice_foreign_key.rb
+++ b/db/migrate/20150803165102_add_choice_foreign_key.rb
@@ -1,5 +1,6 @@ class AddChoiceForeignKey < ActiveRecord::Migration
def change
+ remove_foreign_key "choices", "answers" rescue "No key to remove..."
add_foreign_key "choices", "answers"
end
end
|
2283: Fix previous migration (remove FK before adding it).
This is necessary because the staging database already have it. Since
the local one will not have it, a rescue is also needed.
|
diff --git a/db/migrate/20190811191846_rename_entry_content_hash_to_unique_hash.rb b/db/migrate/20190811191846_rename_entry_content_hash_to_unique_hash.rb
index abc1234..def5678 100644
--- a/db/migrate/20190811191846_rename_entry_content_hash_to_unique_hash.rb
+++ b/db/migrate/20190811191846_rename_entry_content_hash_to_unique_hash.rb
@@ -4,7 +4,7 @@ change_column_default :entries, :unique_hash, ''
# Calculate unique_hash for older entries
- Entry.all.order(published: :asc, created_at: :asc).each do |e|
+ Entry.all.order(published: :asc, created_at: :asc, id: :asc).each do |e|
unique = ''
unique += e.content if e.content.present?
unique += e.summary if e.summary.present?
|
Use id to order entries in migration
When deleting entries with duplicate hashes in this migration it is
important to leave the oldest entry alone and delete any newer
duplicates. The id attribute is used in the case of duplicate entries
with the same publish date and created_at date; in this case the entry
with the lowest id will be left alone and the rest will be considered
duplicates and deleted.
|
diff --git a/smiling.gemspec b/smiling.gemspec
index abc1234..def5678 100644
--- a/smiling.gemspec
+++ b/smiling.gemspec
@@ -15,6 +15,7 @@ gem.require_paths = ["lib"]
gem.version = Smiling::VERSION
+ gem.add_development_dependency 'rake', '~> 0.9.0'
gem.add_development_dependency 'rdoc', '~> 3.0'
gem.add_development_dependency 'rspec', '~> 2.10.0'
gem.add_development_dependency 'simplecov', '~> 0.6.0'
@@ -23,3 +24,5 @@ gem.add_dependency 'nokogiri', '~> 1.5.0'
gem.add_dependency 'httparty', '~> 0.8.0'
end
+
+
|
Add rake to development dependencies
|
diff --git a/common/test/rb/spec/error_spec.rb b/common/test/rb/spec/error_spec.rb
index abc1234..def5678 100644
--- a/common/test/rb/spec/error_spec.rb
+++ b/common/test/rb/spec/error_spec.rb
@@ -11,6 +11,16 @@ end
it "should show stack trace information" do
- pending
+ driver.navigate.to url_for("xhtmlTest.html")
+ rescued = false
+ ex = nil
+
+ begin
+ driver.find_element(:id, "nonexistant")
+ rescue => ex
+ rescued = true
+ end
+
+ ex.backtrace.first.should include("[remote server]")
end
end
|
JariBakken: Implement pending spec for server backtrace.
git-svn-id: aa1aa1384423cb28c2b1e29129bb3a91de1d9196@9511 07704840-8298-11de-bf8c-fd130f914ac9
|
diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb
index abc1234..def5678 100644
--- a/config/initializers/mime_types.rb
+++ b/config/initializers/mime_types.rb
@@ -3,3 +3,4 @@ # Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
# Mime::Type.register_alias "text/html", :iphone
+Mime::Type.register "image/svg+xml", :svg
|
Add SVG mime type support
|
diff --git a/app/controllers/api/clef_tasks_controller.rb b/app/controllers/api/clef_tasks_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/api/clef_tasks_controller.rb
+++ b/app/controllers/api/clef_tasks_controller.rb
@@ -15,7 +15,7 @@ ensure
Rails.logger.info "API: #{message}"
render :json => {message:message}, :include =>
- {:participant => {:only => [:email,:affiliation,:first_name,:last_name,:address,:city,:country_cd]}},
+ {:participant => {:only => [:email,:name,:affiliation,:first_name,:last_name,:address,:city,:country_cd]}},
:except => [:created_at, :updated_at, :eua_file, :id, :approved], status:status
end
end
|
Add missing field 'name' to JSON output
|
diff --git a/app/controllers/mixins/generic_form_mixin.rb b/app/controllers/mixins/generic_form_mixin.rb
index abc1234..def5678 100644
--- a/app/controllers/mixins/generic_form_mixin.rb
+++ b/app/controllers/mixins/generic_form_mixin.rb
@@ -3,7 +3,7 @@ def cancel_action(message)
session[:edit] = nil
flash_to_session(message, :warning)
- javascript_redirect previous_breadcrumb_url
+ javascript_redirect(previous_breadcrumb_url)
end
def delete_action
|
Fix rubocop warnings in GenericFormMixin
|
diff --git a/spec/lib/gitlab/background_migration/populate_external_pipeline_source_spec.rb b/spec/lib/gitlab/background_migration/populate_external_pipeline_source_spec.rb
index abc1234..def5678 100644
--- a/spec/lib/gitlab/background_migration/populate_external_pipeline_source_spec.rb
+++ b/spec/lib/gitlab/background_migration/populate_external_pipeline_source_spec.rb
@@ -1,3 +1,5 @@+# frozen_string_literal: true
+
require 'spec_helper'
describe Gitlab::BackgroundMigration::PopulateExternalPipelineSource, :migration, schema: 20180916011959 do
|
Add frozen string literal comment
|