diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/ConstructorAutocomplete.podspec b/ConstructorAutocomplete.podspec
index abc1234..def5678 100644
--- a/ConstructorAutocomplete.podspec
+++ b/ConstructorAutocomplete.podspec
@@ -6,7 +6,7 @@ spec.authors = { 'Zubin Tiku' => 'zubin@constructor.io', 'Christopher Gee' => 'christopher@constructor.io', 'Jimmy Li' => 'jimmy@constructor.io' }
spec.summary = 'Constructor.io iOS autosuggest client.'
spec.source = { :git => 'https://github.com/Constructor-io/constructorio-client-swift.git', :tag => 'v2.5.2' }
- spec.platform = :ios, '8.0'
+ spec.platform = :ios, '9.0'
spec.source_files = 'AutocompleteClient/**/*.swift'
spec.framework = 'UIKit'
spec.swift_versions = ['4.0', '4.1', '4.2', '5']
|
Update platform versio in podspec
|
diff --git a/tokaido-dns.gemspec b/tokaido-dns.gemspec
index abc1234..def5678 100644
--- a/tokaido-dns.gemspec
+++ b/tokaido-dns.gemspec
@@ -8,8 +8,8 @@ gem.version = Tokaido::DNS::VERSION
gem.authors = ["Yehuda Katz"]
gem.email = ["wycats@gmail.com"]
- gem.description = %q{TODO: Write a gem description}
- gem.summary = %q{TODO: Write a gem summary}
+ gem.description = %q{A simple DNS server to be used in OS X in conjunction with a Tokaido installed /etc/resolver entry}
+ gem.summary = gem.description
gem.homepage = ""
gem.files = `git ls-files`.split($/)
|
Add description and summary to gemspec.
|
diff --git a/lib/shopify_api/resources/shop.rb b/lib/shopify_api/resources/shop.rb
index abc1234..def5678 100644
--- a/lib/shopify_api/resources/shop.rb
+++ b/lib/shopify_api/resources/shop.rb
@@ -2,8 +2,16 @@ # Shop object. Use Shop.current to receive
# the shop.
class Shop < Base
- def self.current(options={})
- find(:one, options.merge({from: "/admin/shop.#{format.extension}"}))
+ if ActiveResource::VERSION::MAJOR >= 4
+ include ActiveResource::Singleton
+
+ def self.current(options={})
+ find(options)
+ end
+ else
+ def self.current(options={})
+ find(:one, options.merge({from: "/admin/shop.#{format.extension}"}))
+ end
end
def metafields(**options)
|
Change Shop to a singlton class to clean up the current call.
|
diff --git a/fpm-cookery.gemspec b/fpm-cookery.gemspec
index abc1234..def5678 100644
--- a/fpm-cookery.gemspec
+++ b/fpm-cookery.gemspec
@@ -19,5 +19,6 @@ s.require_paths = ["lib"]
s.add_development_dependency "fpm"
+ s.add_development_dependency "minitest"
s.add_runtime_dependency "fpm"
end
|
Add minitest as development dependency.
|
diff --git a/app/controllers/api/scores_api_controller.rb b/app/controllers/api/scores_api_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/api/scores_api_controller.rb
+++ b/app/controllers/api/scores_api_controller.rb
@@ -24,6 +24,14 @@ param_group :mode
param :limit, Integer, desc: 'Number of records which will be returned'
def map
+ if params[:map] == 'kool_woodtory'
+ if params[:key] == ENV['QLRACE_CUP_KEY']
+ render json: { records: Score.map_scores(params) }
+ else
+ render json: {records: []}
+ end
+ return
+ end
render json: { records: Score.map_scores(params) }
end
end
|
Add temporary key param to api/map/ to access kool_woodtory records.
|
diff --git a/rubicure_fuzzy_match.gemspec b/rubicure_fuzzy_match.gemspec
index abc1234..def5678 100644
--- a/rubicure_fuzzy_match.gemspec
+++ b/rubicure_fuzzy_match.gemspec
@@ -23,6 +23,6 @@ spec.add_dependency "fuzzy_match", "~> 2.1.0"
spec.add_development_dependency "bundler", "~> 1.12"
- spec.add_development_dependency "rake", "~> 11.3"
+ spec.add_development_dependency "rake", "~> 12.0"
spec.add_development_dependency "test-unit", "~> 3.2.1"
end
|
Upgrade Rake version from "~> 11.3" to "~> 12.0"
|
diff --git a/chef/attributes/client.rb b/chef/attributes/client.rb
index abc1234..def5678 100644
--- a/chef/attributes/client.rb
+++ b/chef/attributes/client.rb
@@ -24,4 +24,10 @@ chef[:client_version] = "0.7.4" unless chef.has_key?(:client_version)
chef[:client_interval] = "1800" unless chef.has_key?(:client_interval)
chef[:client_splay] = "20" unless chef.has_key?(:client_splay)
-chef[:client_log] = "STDOUT" unless chef.has_key?(:client_log)
+
+case platform
+when "redhat","centos"
+ chef[:client_log] = "/var/log/chef/client.log" unless chef.has_key?(:client_log)
+else
+ chef[:client_log] = "STDOUT" unless chef.has_key?(:client_log)
+end
|
Handle log file location for centos and rhel where runit isnt used
|
diff --git a/minions_rails.gemspec b/minions_rails.gemspec
index abc1234..def5678 100644
--- a/minions_rails.gemspec
+++ b/minions_rails.gemspec
@@ -17,7 +17,7 @@ s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"]
s.test_files = Dir["test/**/*"]
- s.add_development_dependency "rails", "~> 4.2.5.1"
+ s.add_development_dependency "rails", "~> 4.2.0"
s.add_development_dependency "sqlite3"
s.add_development_dependency "sass-rails"
end
|
Make Rails Dependency Less Specific
The current version that the rails dependency is locked to is restricting apps from updating for security patches. Locking to `~> 4.2.0` should allow for any non-breaking rails updates to be applied.
|
diff --git a/frontend/bin/make_frontend.rb b/frontend/bin/make_frontend.rb
index abc1234..def5678 100644
--- a/frontend/bin/make_frontend.rb
+++ b/frontend/bin/make_frontend.rb
@@ -0,0 +1,45 @@+# Make executable file to be located as ${PREFIX}/bin/nullarihyon
+# make_frontend.rb [bin dir path] [tool path] [lib prefix for clang (prefix/lib/nullarihyon/1.2.3/clang)] [frontend dir path])")
+# executable: [bin dir path]/nullarihyon
+# analyzer tool path: [tool path]
+# -resource-dir [lib prefix for clang]/3.8.0
+# frontend: [frontend dir path]/lib/..., [frontend dir path]/bundle/...
+
+require "pathname"
+require "fileutils"
+
+if ARGV.size == 4
+ pwd = Pathname(".").realpath
+ bin_dir_path = (pwd + ARGV[0]).cleanpath
+ analyzer_path = (pwd + ARGV[1]).cleanpath
+ resource_dir_base_path = (pwd + ARGV[2]).cleanpath
+ script_lib_dir_path = (pwd + ARGV[3]).cleanpath
+
+ resource_dir_path = resource_dir_base_path.children.select {|path|
+ path.basename.to_s =~ /\d/
+ }.last
+
+ bin_path = bin_dir_path + "nullarihyon"
+ bin_dir_path.mkpath
+
+ puts "Installing to #{bin_path}..."
+
+ bin_path.open("w") do |io|
+ io.puts <<EOS
+#!/usr/bin/ruby
+
+$ANALYZER_PATH = "#{analyzer_path}"
+$RESOURCE_DIR_PATH = "#{resource_dir_path}"
+
+$LOAD_PATH << "#{script_lib_dir_path + "lib"}"
+$LOAD_PATH << "#{script_lib_dir_path + "bundle"}"
+
+require 'nullarihyon/cli'
+Nullarihyon::CLI.start(ARGV)
+EOS
+
+ FileUtils.chmod 0755, bin_path.to_s
+ end
+else
+ puts "$ make_frontend.rb [AnalyzerPath] [ResourceDirPath] [ScriptLibDirPath]"
+end
|
Add script to make frontend command
|
diff --git a/muni_api.rb b/muni_api.rb
index abc1234..def5678 100644
--- a/muni_api.rb
+++ b/muni_api.rb
@@ -30,6 +30,7 @@ e = msg.sub(/No Elevator at/, '')
.sub(/ Station/, '')
.sub(/ Sta\.$/, '')
+ .sub(/ street level elevator Out of Service/i, '')
if e && e != ''
elevator_names << "Muni: #{e}".gsub(/\s+/, ' ')
else
|
Fix Van Ness parse error
(We had elevator (99, "Muni: Van Ness street elevator Out of Service")
|
diff --git a/test/integration/default/serverspec/default_spec.rb b/test/integration/default/serverspec/default_spec.rb
index abc1234..def5678 100644
--- a/test/integration/default/serverspec/default_spec.rb
+++ b/test/integration/default/serverspec/default_spec.rb
@@ -14,7 +14,7 @@ it do
is_expected.to(
match(
- /\{"pools": \{\s+"A": \{"servers": \["localhost:11811"\]\}\},\s+"route": "PoolRoute|A"}/
+ /\{\s+"pools": \{\s+"A": \{\s+"servers": \[\s+"localhost:11811"\s+\]\s+\}\s+\},\s+"route": "PoolRoute\|A"\s+\}/
)
)
end
|
Correct RegEx for assertion for mcrouter config
Damned whitespace
|
diff --git a/hephaestus/lib/resque/base.rb b/hephaestus/lib/resque/base.rb
index abc1234..def5678 100644
--- a/hephaestus/lib/resque/base.rb
+++ b/hephaestus/lib/resque/base.rb
@@ -7,6 +7,7 @@ def self.after_perform(*args)
logging('end', args)
store_status('end', args.first)
+ update_history(args.first)
Resque.enqueue(DocumentProcessBootstrapTask, *args)
end
@@ -15,7 +16,7 @@ begin
document = Document.find(id)
document.update_attribute :status, "FAILED"
- document.update_attribute :percentage, -1.0
+ document.update_attribute :percentage, -1
store_failure(e, args)
rescue Mongoid::Errors::DocumentNotFound
logging("Document not found. #{id}")
@@ -40,4 +41,10 @@ id = args[0]
DocumentFailure.create document_id: id, message: e.message, backtrace: e.backtrace.join("\n")
end
+
+ def self.update_history(document_id)
+ document = Document.find(document_id)
+ document.status_history << @queue
+ document.save
+ end
end
|
[aphrodite] Update status history and percentage
|
diff --git a/spec/timevalue_spec.rb b/spec/timevalue_spec.rb
index abc1234..def5678 100644
--- a/spec/timevalue_spec.rb
+++ b/spec/timevalue_spec.rb
@@ -1,9 +1,9 @@-require_relative 'spec_helper.rb'
+require_relative '../config/environment.rb'
describe 'timevalue' do
it 'should be initialized with 0 as defaults' do
time_value = TimeValue.new()
expect(time_value.n).to eq(0)
-
+
end
end
|
Update spec to use environment file
|
diff --git a/serialize.gemspec b/serialize.gemspec
index abc1234..def5678 100644
--- a/serialize.gemspec
+++ b/serialize.gemspec
@@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = 'serialize'
- s.version = '0.1.0.0'
+ s.version = '0.1.1.0'
s.summary = 'Common interface for serialization and deserialization, and serializer discovery'
s.description = ' '
|
Package version increased from 0.1.0.0 to 0.1.1.0
|
diff --git a/src/user.rb b/src/user.rb
index abc1234..def5678 100644
--- a/src/user.rb
+++ b/src/user.rb
@@ -17,13 +17,13 @@ end
def remove_purchased_item(items)
- items.delete_if do |item|
- purchased_items.include?(item)
+ purchased_items.delete_if do |item|
+ items.include?(item)
end
end
- def self.find_user(id)
- row = DB.find_user(id)
+ def self.find_user(user_id)
+ row = DB.find_user(user_id)
User.new(row[0].to_i, row[1])
end
|
Remove item from purchased items instead of items
|
diff --git a/capistrano-scrip.gemspec b/capistrano-scrip.gemspec
index abc1234..def5678 100644
--- a/capistrano-scrip.gemspec
+++ b/capistrano-scrip.gemspec
@@ -16,7 +16,7 @@ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = %w(lib)
- s.extra_rdoc_files = %w(LICENSE README.rdoc)
+ s.extra_rdoc_files = %w(LICENSE)
s.add_dependency "capistrano", ">= 2.5.9"
s.add_development_dependency "yard", "~> 0.8.4"
|
Remove missing file from gemspec
So that bundle does not complain each time.
|
diff --git a/config/projects/ganeti.rb b/config/projects/ganeti.rb
index abc1234..def5678 100644
--- a/config/projects/ganeti.rb
+++ b/config/projects/ganeti.rb
@@ -4,8 +4,7 @@ homepage 'https://code.google.com/p/ganeti/'
install_path '/opt/ganeti'
-#build_version Omnibus::BuildVersion.new.semver
-build_version '2.11.2'
+build_version "2.11.2-#{Time.now.strftime('%Y%m%d-%H%M%S')}"
build_iteration 1
# creates required build directories
|
Use a datestamp so each build has a different version
|
diff --git a/spec/hive_spec.rb b/spec/hive_spec.rb
index abc1234..def5678 100644
--- a/spec/hive_spec.rb
+++ b/spec/hive_spec.rb
@@ -11,9 +11,17 @@ end.converge(described_recipe)
end
- %w(mysql-connector-java postgresql-jdbc hive).each do |pkg|
+ it 'install hive package' do
+ expect(chef_run).to install_package('hive')
+ end
+
+ %w(mysql-connector-java postgresql-jdbc).each do |pkg|
it "install #{pkg} package" do
expect(chef_run).to install_package(pkg)
+ end
+ it "link #{pkg} jar" do
+ link = chef_run.link("/usr/lib/hive/lib/#{pkg}.jar")
+ expect(link).to link_to("/usr/share/java/#{pkg}.jar")
end
end
|
Move hive package check into its own section and do symlink test for CentOS
|
diff --git a/0_code_wars/number_pairs.rb b/0_code_wars/number_pairs.rb
index abc1234..def5678 100644
--- a/0_code_wars/number_pairs.rb
+++ b/0_code_wars/number_pairs.rb
@@ -0,0 +1,5 @@+# http://www.codewars.com/kata/563b1f55a5f2079dc100008a
+# --- iteration 1 ---
+def get_larger_numbers(a, b)
+ a.zip(b).map(&:max)
+end
|
Add code wars (7) - number pairs
|
diff --git a/apps/main/component/main/application.rb b/apps/main/component/main/application.rb
index abc1234..def5678 100644
--- a/apps/main/component/main/application.rb
+++ b/apps/main/component/main/application.rb
@@ -15,13 +15,15 @@
use Rack::Session::Cookie, key: "app_prototype.session", secret: AppPrototype::Container.settings.session_secret
use Rack::Csrf, raise: true
+ use Rack::MethodOverride
use Bugsnag::Rack
+ plugin :all_verbs
plugin :error_handler
plugin :flash
+ plugin :page
plugin :view
- plugin :page
def name
:main
|
Use the all_verbs roda plugin so we can use additional HTTP verbs
|
diff --git a/import_config.rb b/import_config.rb
index abc1234..def5678 100644
--- a/import_config.rb
+++ b/import_config.rb
@@ -10,6 +10,16 @@ end
if config_line.index("port")
@port = config_line.sub("port=", "")
+ change_port_in_angular(@port)
end
end
+end
+
+def change_port_in_angular (new_port)
+ file_name = "./public/assets/js/app.js"
+ text = File.read(file_name)
+ new_contents = text.gsub(/localhost:\d{4}/, "localhost:" + new_port)
+
+ # To write changes to the file, use:
+ File.open(file_name, "w") {|file| file.puts new_contents }
end
|
Change port also in app.js
|
diff --git a/SmartDeviceLink-iOS.podspec b/SmartDeviceLink-iOS.podspec
index abc1234..def5678 100644
--- a/SmartDeviceLink-iOS.podspec
+++ b/SmartDeviceLink-iOS.podspec
@@ -6,7 +6,7 @@ s.homepage = "https://github.com/smartdevicelink/SmartDeviceLink-iOS"
s.license = { :type => "New BSD", :file => "LICENSE" }
s.author = { "SmartDeviceLink Team" => "joel@livio.io" }
- s.platform = :ios, "7.0"
+ s.platform = :ios, "6.0"
s.source = { :git => "https://github.com/smartdevicelink/sdl_ios.git", :tag => "4.0.0-alpha.3" }
s.source_files = "SmartDeviceLink-iOS/SmartDeviceLink/*.{h,m}"
s.requires_arc = true
|
Declare our compatibility with iOS 6 to cocoapods
|
diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb
index abc1234..def5678 100644
--- a/app/helpers/home_helper.rb
+++ b/app/helpers/home_helper.rb
@@ -4,7 +4,10 @@ if !logged_in?
link_to t('ui.home'), home_path
else
- link_to t('ui.home'), conversation_messages_path(current_user.personal_conversation)
+ link_to t('ui.home'),
+ conversation_messages_path(current_user.personal_conversation),
+ :class => 'tip',
+ :title => "personal convo for " + current_user.login
end
end
|
Add a tooltip to the home link when the user is loged, so the user can know the login name of the current user and the personal convo
|
diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb
index abc1234..def5678 100644
--- a/app/mailers/user_mailer.rb
+++ b/app/mailers/user_mailer.rb
@@ -1,6 +1,5 @@ class UserMailer < ApplicationMailer
default from: "welcome@holyimage.baidu.com"
- layout "mailer"
def welcome(user, url)
@user = user
|
Remove layout on user mailer
|
diff --git a/app/models/housing_data.rb b/app/models/housing_data.rb
index abc1234..def5678 100644
--- a/app/models/housing_data.rb
+++ b/app/models/housing_data.rb
@@ -1,5 +1,4 @@ class HousingData < ActiveRecord::Base
- establish_connection :housing_data
self.table_name = 'hpp_view'
self.primary_key = :muni_id
|
Change connection in HousingData model
|
diff --git a/app/models/market_model.rb b/app/models/market_model.rb
index abc1234..def5678 100644
--- a/app/models/market_model.rb
+++ b/app/models/market_model.rb
@@ -2,7 +2,7 @@ include Privacy
FOUNDATIONS = %w(
- connections kWh kW_connection kW_max kW_contracted
+ connections kWh kWh_produced kWh_consumed kW_max kW_contracted
flex_realised flex_potential
)
|
Make kWh produced and kWh consumed available
|
diff --git a/lib/rspec-puppet/example/function_example_group.rb b/lib/rspec-puppet/example/function_example_group.rb
index abc1234..def5678 100644
--- a/lib/rspec-puppet/example/function_example_group.rb
+++ b/lib/rspec-puppet/example/function_example_group.rb
@@ -9,9 +9,36 @@ Puppet[:libdir] = Dir["#{Puppet[:modulepath]}/*/lib"].entries.join(File::PATH_SEPARATOR)
Puppet::Parser::Functions.autoloader.loadall
- scope = Puppet::Parser::Scope.new
+ # if we specify a pre_condition, we should ensure that we compile that code
+ # into a catalog that is accessible from the scope where the function is called
+ if self.respond_to? :pre_condition
+ Puppet[:code] = pre_condition
+ nodename = self.respond_to?(:node) ? node : Puppet[:certname]
+ facts_val = {
+ 'hostname' => nodename.split('.').first,
+ 'fqdn' => nodename,
+ 'domain' => nodename.split('.').last,
+ }
+ facts_val.merge!(munge_facts(facts)) if self.respond_to?(:facts)
+ # we need to get a compiler, b/c we can attach that to a scope
+ @compiler = build_compiler(nodename, facts_val)
+ else
+ @compiler = nil
+ end
+
+ scope = Puppet::Parser::Scope.new(:compiler => @compiler)
scope.method "function_#{function_name}".to_sym
end
+
+ def compiler
+ @compiler
+ end
+ # get a compiler with an attached compiled catalog
+ def build_compiler(node_name, fact_values)
+ compiler = Puppet::Parser::Compiler.new(Puppet::Node.new(node_name, :parameters => fact_values))
+ compiler.compile
+ compiler
+ end
end
end
|
Add support for pre_condition with functions
This commit adds support for using the pre_condition
hook to specify the source code that should be used to
compile a catalog that can be introspected by functions for
testing purposes.
This allows users to test functions that need access to
catalog contents.
This allows the following snippet to test a function that
needs access to the catalog generated by pre_condition:
describe 'defined_with_params' do
#describe 'when resource is passed as a string' do
let :pre_condition do
'user { "dan": }'
end
it { should run.with_params('User[dan]', {}).and_return('true') }
end
|
diff --git a/lib/tasks/taxonomy/register_email_signup_page.rake b/lib/tasks/taxonomy/register_email_signup_page.rake
index abc1234..def5678 100644
--- a/lib/tasks/taxonomy/register_email_signup_page.rake
+++ b/lib/tasks/taxonomy/register_email_signup_page.rake
@@ -0,0 +1,46 @@+namespace :taxonomy do
+ desc <<-DESC
+ Register a content item representing the email-alert-frontend endpoint that
+ handles taxonomy email alert subscriptions
+ DESC
+ task register_email_signup_page: :environment do
+ def base_path
+ '/taxonomy-email-signup'
+ end
+
+ def routes
+ [
+ { path: base_path, type: "exact" },
+ { path: "#{base_path}/confirm", type: "exact" },
+ ]
+ end
+
+ # The base_path and routes specified here are the only important values -
+ # we want to ensure the specified path is reserved correctly via the
+ # publishing-api. All other fields are populated with nominal values,
+ # particularly the details hash which needs to satisfy the schema
+ # definition for an email_alert_signup.
+ email_signup_page = {
+ base_path: base_path,
+ document_type: 'email_alert_signup',
+ schema_name: 'email_alert_signup',
+ title: 'Get email alerts',
+ description: '',
+ locale: 'en',
+ need_ids: [],
+ public_updated_at: DateTime.now.iso8601,
+ publishing_app: 'content-tagger',
+ rendering_app: 'email-alert-frontend',
+ routes: routes,
+ details: {
+ summary: '',
+ subscriber_list: { 'taxons' => [] },
+ },
+ }
+
+ content_id = 'e3bf851b-5df7-441b-8813-f0ec849da35f'
+
+ Services.publishing_api.put_content(content_id, email_signup_page)
+ Services.publishing_api.publish(content_id, 'major')
+ end
+end
|
Add rake task to register a taxonomy email signup page
Create a content item at the base path /taxonomy-email-signup. The
email-alert-frontend app will be updated to serve signup pages at this
endpoint, allowing users to subscribe to content changes in the
taxonomy.
|
diff --git a/Casks/lastpass-universal.rb b/Casks/lastpass-universal.rb
index abc1234..def5678 100644
--- a/Casks/lastpass-universal.rb
+++ b/Casks/lastpass-universal.rb
@@ -4,4 +4,5 @@ version 'latest'
no_checksum
install 'lpmacosx.pkg'
+ uninstall :pkgutil => 'com.lastpass.lpmacosx'
end
|
Add uninstall stanza to LastPass Universal
|
diff --git a/lib/active_touch/touch_job.rb b/lib/active_touch/touch_job.rb
index abc1234..def5678 100644
--- a/lib/active_touch/touch_job.rb
+++ b/lib/active_touch/touch_job.rb
@@ -1,7 +1,7 @@ module ActiveTouch
class TouchJob < ActiveJob::Base
- def perform(record, association, after_touch, is_async = ActiveTouch.configuration.async)
+ def perform(record, association, after_touch, is_async = false)
associated = association == 'self' ? record : record.send(association)
if associated.is_a? ActiveRecord::Base
|
Revert "use configuration to define default async touch job"
This reverts commit bc3d3fef7a0614e53ff8af419d8e3582be978218.
|
diff --git a/lib/coresys/commands/idiff.rb b/lib/coresys/commands/idiff.rb
index abc1234..def5678 100644
--- a/lib/coresys/commands/idiff.rb
+++ b/lib/coresys/commands/idiff.rb
@@ -0,0 +1,21 @@+formula = Coresys::Formula.find(ARGV[0]).new
+Coresys::Installer.new(formula).install do
+
+ # Create two identical directories and place the user in the second directory
+ # to make changes which the diff will be based on
+ quiet_system 'mkdir a && mv * .* a/'
+ quiet_system 'mkdir b && cp -Rap a/* a/.* b/'
+ Dir.chdir 'b' do
+
+ info Dir.pwd
+
+ system(ENV['SHELL'], '-l')
+ unless $?.success?
+ raise Corsys::Installer::AbortInstall, 'Interactive diff creation canceled'
+ end
+ end
+
+ quite_system "diff -rupN a b > ~/#{formula.name}.diff"
+ info "A diff has been generated in your home directory named #{formula.name}.diff"
+end
+
|
Add command to speed creation of diffs for patch
|
diff --git a/lib/nacre/order_collection.rb b/lib/nacre/order_collection.rb
index abc1234..def5678 100644
--- a/lib/nacre/order_collection.rb
+++ b/lib/nacre/order_collection.rb
@@ -21,7 +21,7 @@ end
end
- def each &block
+ def each(&block)
members.each do |member|
block.call(member)
end
|
Use parentheses to match coding style
|
diff --git a/lib/ritual/extension/jruby.rb b/lib/ritual/extension/jruby.rb
index abc1234..def5678 100644
--- a/lib/ritual/extension/jruby.rb
+++ b/lib/ritual/extension/jruby.rb
@@ -12,7 +12,7 @@ sh 'javac', '-g', '-classpath', class_path, *source_paths
Dir.chdir path do
mkdir_p File.dirname(relative_install_path)
- sh 'jar', 'cf', relative_install_path, *relative_compiled_paths
+ sh 'jar', 'cf', relative_install_path.to_s, *relative_compiled_paths.map(&:to_s)
end
end
end
|
Fix jar invocation when building jars in 1.9 mode.
|
diff --git a/lib/tasks/publishing_api.rake b/lib/tasks/publishing_api.rake
index abc1234..def5678 100644
--- a/lib/tasks/publishing_api.rake
+++ b/lib/tasks/publishing_api.rake
@@ -1,4 +1,17 @@ namespace :publishing_api do
+ desc "Publish all Policies to the Publishing API in reverse alphabetical order"
+ task publish_policies: :environment do
+ Policy.all.order("name DESC").each do |policy|
+ puts "Publishing #{policy.name}"
+
+ # Load the links from publishing-api, because we don't keep those in the
+ # application database.
+ policy.fetch_links!
+
+ Publisher.new(policy).publish!
+ end
+ end
+
desc "Publish the Policies Finder to the Publishing API"
task publish_policies_finder: :environment do
require "policies_finder_publisher"
|
Add rake task to republish all policies
We need this to populate `emphasised_organisations` for all policies.
|
diff --git a/lib/bootscale/entry.rb b/lib/bootscale/entry.rb
index abc1234..def5678 100644
--- a/lib/bootscale/entry.rb
+++ b/lib/bootscale/entry.rb
@@ -3,7 +3,7 @@ DL_EXTENSIONS = [
RbConfig::CONFIG['DLEXT'],
RbConfig::CONFIG['DLEXT2'],
- ].reject(&:empty?).map { |ext| ".#{ext}"}
+ ].reject { |ext| ext.nil? || ext.empty? }.map { |ext| ".#{ext}"}
FEATURE_FILES = "**/*{#{DOT_RB},#{DL_EXTENSIONS.join(',')}}"
NORMALIZE_NATIVE_EXTENSIONS = !DL_EXTENSIONS.include?(DOT_SO)
ALTERNATIVE_NATIVE_EXTENSIONS_PATTERN = /\.(o|bundle|dylib)\z/
@@ -30,4 +30,4 @@ end
end
end
-end+end
|
Fix load of DL_EXTENSIONS under rbx
|
diff --git a/lib/buckaruby/ideal.rb b/lib/buckaruby/ideal.rb
index abc1234..def5678 100644
--- a/lib/buckaruby/ideal.rb
+++ b/lib/buckaruby/ideal.rb
@@ -8,13 +8,13 @@ "BUNQNL2A" => "bunq",
"HANDNL2A" => "Handelsbanken",
"INGBNL2A" => "ING",
- "KNABNL2H" => "Knab bank",
+ "KNABNL2H" => "Knab",
"MOYONL21" => "Moneyou",
"RABONL2U" => "Rabobank",
- "RBRBNL21" => "RegioBank",
+ "RBRBNL21" => "Regiobank",
"REVOLT21" => "Revolut",
"SNSBNL2A" => "SNS Bank",
- "TRIONL2U" => "Triodos Bank",
+ "TRIONL2U" => "Triodos",
"FVLBNL22" => "Van Lanschot"
}.freeze
end
|
Change bank names to the names returned from the transaction specification.
|
diff --git a/deployment/puppet/nova/spec/classes/nova_volume_iscsi_spec.rb b/deployment/puppet/nova/spec/classes/nova_volume_iscsi_spec.rb
index abc1234..def5678 100644
--- a/deployment/puppet/nova/spec/classes/nova_volume_iscsi_spec.rb
+++ b/deployment/puppet/nova/spec/classes/nova_volume_iscsi_spec.rb
@@ -0,0 +1,45 @@+require 'spec_helper'
+
+describe 'nova::volume::iscsi' do
+
+ describe 'on debian platforms' do
+
+ let :facts do
+ { :osfamily => 'Debian' }
+ end
+ it { should contain_service('tgtd').with(
+ 'name' => 'tgt',
+ 'provider' => 'upstart',
+ # FIXME(fc): rspec complains this value is 'nil' in the catalog
+ #'ensure' => 'stopped',
+ 'enable' => true
+ )}
+ it { should contain_package('tgt').with_name('tgt') }
+
+ describe 'and more specifically on debian os' do
+ let :facts do
+ { :osfamily => 'Debian', :operatingsystem => 'Debian' }
+ end
+ it { should contain_service('tgtd').with(
+ 'provider' => nil
+ )}
+ end
+
+ it { should contain_nova_config('volume_group').with_value('nova-volumes') }
+ it { should_not contain_nova_config('iscsi_ip_address') }
+
+ end
+
+ describe 'on rhel' do
+ let :facts do
+ { :osfamily => 'RedHat' }
+ end
+ it { should contain_service('tgtd').with(
+ 'name' => 'tgtd',
+ # FIXME(fc): rspec complains this value is 'nil' in the catalog
+ #'ensure' => 'stopped',
+ 'enable' => true
+ )}
+ it { should contain_package('tgt').with_name('scsi-target-utils')}
+ end
+end
|
Add spec tests for nova::volume::iscsi
|
diff --git a/lib/debox_server/view_helpers.rb b/lib/debox_server/view_helpers.rb
index abc1234..def5678 100644
--- a/lib/debox_server/view_helpers.rb
+++ b/lib/debox_server/view_helpers.rb
@@ -3,25 +3,28 @@
def current_app
return @request_app if @request_app
- @request_app = params[:app]
- error!("App not found", 400) unless app_exists? @request_app
- return @request_app
+ @request_app = App.find_by_name! params[:app]
end
def current_env
return @request_env if @request_env
- @request_env = params[:env] || default_env
- error!("Environment not found.", 400) unless recipe_exists? current_app, @request_env
+ app = current_app
+
+ if params[:env]
+ @request_env = app.recipes.find_by_name! params[:env]
+ else
+ if app.recipes.count == 0
+ error!("#{current_app} hasn't configured enviments", 400)
+ elsif app.recipes.count > 1
+ availables = recipes.map(&:name).join(', ')
+ error!("Enviromnment must be set. Availables: #{availables}.\n", 400)
+ else
+ @request_env = app.recipes.first
+ end
+ end
+
return @request_env
- end
-
- # Return the default environment for a given app
- def default_env
- recipes = recipes_list current_app
- error!("#{current_app} hasn't configured enviments", 400) if recipes.count == 0
- error!("Enviromnment must be set. Availables: #{recipes.join(', ')}.\n", 400) if recipes.count > 1
- env = recipes.first
end
end
end
|
Move current_app and current_env to activerecord apps and env
|
diff --git a/lib/lita/handlers/karma/decay.rb b/lib/lita/handlers/karma/decay.rb
index abc1234..def5678 100644
--- a/lib/lita/handlers/karma/decay.rb
+++ b/lib/lita/handlers/karma/decay.rb
@@ -7,13 +7,13 @@ def call
return unless decay_enabled?
cutoff = Time.now.to_i - decay_interval
- terms = redis.zrangebyscore(:actions, '-inf', cutoff).map { |json| decay_action(json) }
- delete_decayed(terms, cutoff)
+ terms = redis.zrangebyscore(:actions, '-inf', cutoff).map { |json| decay_from_action(json) }
+ delete_old_actions_for(terms, cutoff)
end
private
- def decay_action(json)
+ def decay_from_action(json)
action = Action.from_json(json)
redis.zincrby(:terms, -action.delta, action.term)
redis.zincrby("modified:#{action.term}", -1, action.user_id) if action.user_id
@@ -28,8 +28,12 @@ config.decay_interval
end
- def delete_decayed(terms, cutoff)
+ def delete_old_actions_for(terms, cutoff)
redis.zremrangebyscore(:actions, '-inf', cutoff)
+ delete_zero_modifiers_for(terms)
+ end
+
+ def delete_zero_modifiers_for(terms)
terms.each { |term| redis.zremrangebyscore("modified:#{term}", '-inf', 0) }
end
end
|
Use clearer names in Decay.
|
diff --git a/lib/client_for_poslynx/net/em_connector/connection_handler.rb b/lib/client_for_poslynx/net/em_connector/connection_handler.rb
index abc1234..def5678 100644
--- a/lib/client_for_poslynx/net/em_connector/connection_handler.rb
+++ b/lib/client_for_poslynx/net/em_connector/connection_handler.rb
@@ -5,6 +5,7 @@ class EM_Connector
class ConnectionHandler < EM::Connection
+ include EM::Protocols::POSLynx
include EMC::HandlesConnection
end
|
Fix bug. Protocol not included in EM_Connector handler
|
diff --git a/spec/interactors/headlines/generate_scan_results_hash_spec.rb b/spec/interactors/headlines/generate_scan_results_hash_spec.rb
index abc1234..def5678 100644
--- a/spec/interactors/headlines/generate_scan_results_hash_spec.rb
+++ b/spec/interactors/headlines/generate_scan_results_hash_spec.rb
@@ -20,7 +20,7 @@ subject(:scan_results) { described_class.call(headers: headers).scan_results }
its(["x-xss-protection"]) { is_expected.to eq 2 }
- its(["x-frame-options"]) { is_expected.to eq 100 }
+ its(["x-frame-options"]) { is_expected.to eq 2 }
its(["strict-transport-security"]) { is_expected.to eq 0 }
its(["x-content-type-options"]) { is_expected.to eq 0 }
its(["content-security-policy"]) { is_expected.to eq 0 }
@@ -29,7 +29,7 @@ describe "calculates domain score" do
subject(:score) { described_class.call(headers: headers).score }
- it { is_expected.to eq 20.4 }
+ it { is_expected.to eq(0.8) }
end
end
end
|
Fix total scan result spec
|
diff --git a/lib/turkish_support/constants.rb b/lib/turkish_support/constants.rb
index abc1234..def5678 100644
--- a/lib/turkish_support/constants.rb
+++ b/lib/turkish_support/constants.rb
@@ -1,6 +1,6 @@ module TurkishSupport
- DOWNCASED_ALPHABET = 'abcçdefgğhıijklmnoöprsştuüvyz'
- UPCASED_ALPHABET = 'ABCÇDEFGĞHIİJKLMNOÖPRSŞTUÜVYZ'
+ DOWNCASED_ALPHABET = 'abcçdefgğhıijklmnoöpqrsştuüvwxyz'
+ UPCASED_ALPHABET = 'ABCÇDEFGĞHIİJKLMNOÖPQRSŞTUÜVWXYZ'
UNSUPPORTED_DOWNCASE_CHARS = 'çğıiöşü'
UNSUPPORTED_UPCASE_CHARS = 'ÇĞIİÖŞÜ'
|
Add english chars to pattern matching
|
diff --git a/app/helpers/admin_helper.rb b/app/helpers/admin_helper.rb
index abc1234..def5678 100644
--- a/app/helpers/admin_helper.rb
+++ b/app/helpers/admin_helper.rb
@@ -25,8 +25,6 @@ end
def check_lock_state
- if is_locked? && !is_admin?
- redirect_to root_url
- end
+ redirect_to root_url if is_locked? && !is_admin?
end
end
|
Use correct form of if statement
:D
|
diff --git a/app/controllers/api/docs/branches.rb b/app/controllers/api/docs/branches.rb
index abc1234..def5678 100644
--- a/app/controllers/api/docs/branches.rb
+++ b/app/controllers/api/docs/branches.rb
@@ -3,6 +3,44 @@ class Branches
# :nocov:
include Swagger::Blocks
+
+ swagger_schema :Branch do
+ key :required, [:id, :name, :order_id, :path, :created_at,
+ :updated_at, :count]
+ property :id do
+ key :type, :integer
+ key :format, :int64
+ key :description, 'Branch ID. e.g. "1" for "Sisyphus"'
+ end
+ property :name do
+ key :type, :string
+ key :description, 'Branch name. e.g. "Sisyphus"'
+ end
+ property :order_id do
+ key :type, :integer
+ key :format, :int64
+ key :description, 'Branch sort order id'
+ end
+ property :path do
+ key :type, :string
+ key :description, 'Branch path'
+ end
+ property :created_at do
+ key :type, :string
+ key :format, :'date-time'
+ key :description, 'Created at in ISO8601 format'
+ end
+ property :updated_at do
+ key :type, :string
+ key :format, :'date-time'
+ key :description, 'Updated at in ISO8601 format'
+ end
+ property :count do
+ key :type, :integer
+ key :format, :int64
+ key :description, 'Branch srpms count'
+ end
+ end
swagger_path '/branches' do
operation :get do
|
Add swagger schema for Branch
|
diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/people_controller.rb
+++ b/app/controllers/people_controller.rb
@@ -1,9 +1,15 @@ class PeopleController < ApplicationController
+ before_action :set_locale
+
def show
@person = Person.find!(request.path)
setup_content_item_and_navigation_helpers(@person)
- render :show, locals: {
- person: @person,
- }
+ render :show, locals: { person: @person }
+ end
+
+private
+
+ def set_locale
+ I18n.locale = params[:locale] || I18n.default_locale
end
end
|
Set locale in people controller
This matches the code in the organisations controller.
|
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/search_controller.rb
+++ b/app/controllers/search_controller.rb
@@ -4,7 +4,7 @@
def show
@post_records = Post.search(query_term).paginate(page: params[:page]).records
- @posts = @post_records.to_a
+ @posts = @post_records.to_a.select { |post| post.published? }
@users = User.search(query_term).records.to_a
@tags = Tag.search(query_term).records
end
|
Add filter to make sure search controller provides only published posts to the view
|
diff --git a/app/models/forem/ability.rb b/app/models/forem/ability.rb
index abc1234..def5678 100644
--- a/app/models/forem/ability.rb
+++ b/app/models/forem/ability.rb
@@ -27,8 +27,6 @@ end
end
end
-
- can :read, :forums
end
end
end
|
Remove erroneous can :read, :forums
|
diff --git a/app/controllers/skills_controller.rb b/app/controllers/skills_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/skills_controller.rb
+++ b/app/controllers/skills_controller.rb
@@ -2,6 +2,7 @@ def index
@new_skill = Skill.new
@skills = current_user.skills.order(:id)
+ @first_link = true
end
def new
|
Add flag so only the first skill has the active flag
|
diff --git a/app/models/word_document.rb b/app/models/word_document.rb
index abc1234..def5678 100644
--- a/app/models/word_document.rb
+++ b/app/models/word_document.rb
@@ -11,6 +11,6 @@ end
def to_s
- @_converted ||= parser.new(path, display: ':99').to_s
+ @_converted ||= parser.new(path, display: ':99', format: 'html:"HTML (StarWriter)"').to_s
end
end
|
Use StarWriter format to overcome word import issues on QA
|
diff --git a/db/migrate/20161006192505_rename_stripe_to_id.rb b/db/migrate/20161006192505_rename_stripe_to_id.rb
index abc1234..def5678 100644
--- a/db/migrate/20161006192505_rename_stripe_to_id.rb
+++ b/db/migrate/20161006192505_rename_stripe_to_id.rb
@@ -0,0 +1,6 @@+class RenameStripeToId < ActiveRecord::Migration
+ def change
+ rename_column :shoppe_subscribers, :stripe_token, :stripe_id
+ rename_column :shoppe_customers, :stripe_token, :stripe_id
+ end
+end
|
Rename stripe_token to stripe_id throughout
|
diff --git a/app/models/users_project.rb b/app/models/users_project.rb
index abc1234..def5678 100644
--- a/app/models/users_project.rb
+++ b/app/models/users_project.rb
@@ -9,13 +9,18 @@ validates_uniqueness_of :user_id, :scope => [:project_id]
validates_presence_of :user_id
validates_presence_of :project_id
-
+ validate :user_has_a_role_selected
+
delegate :name, :email, :to => :user, :prefix => true
def update_gitosis_project
Gitosis.new.configure do |c|
c.update_project(project.path, project.gitosis_writers)
end
+ end
+
+ def user_has_a_role_selected
+ errors.add(:base, "Please choose at least one Role in the Access list") unless read || write || admin
end
end
|
Add check to ensure that a team member has atleast one Access Role selected
|
diff --git a/deep_merge.gemspec b/deep_merge.gemspec
index abc1234..def5678 100644
--- a/deep_merge.gemspec
+++ b/deep_merge.gemspec
@@ -31,6 +31,7 @@ ]
s.add_development_dependency "rake", "~> 10.1"
+ s.add_development_dependency "test-unit-minitest"
end
|
Fix issues with testing on newer Ruby versions.
|
diff --git a/app/models/addresses/address.rb b/app/models/addresses/address.rb
index abc1234..def5678 100644
--- a/app/models/addresses/address.rb
+++ b/app/models/addresses/address.rb
@@ -4,7 +4,7 @@ belongs_to :addressable, polymorphic: true
validates :number, presence: true
- validates :zipcode_id, presence: true, if: Proc.new{|a| a.zipcode.street.blank? }
+ validates :zipcode_id, presence: true, if: Proc.new{|a| a.try(:zipcode).try(:street).blank? }
delegate :street, :neighborhood, :city, to: :zipcode
accepts_nested_attributes_for :zipcode, allow_destroy: false
|
Add try to zipcode and street.
|
diff --git a/app/models/concerns/srdc_run.rb b/app/models/concerns/srdc_run.rb
index abc1234..def5678 100644
--- a/app/models/concerns/srdc_run.rb
+++ b/app/models/concerns/srdc_run.rb
@@ -15,16 +15,15 @@ end
def set_runner_from_srdc
- return if srdc_id.nil? || user.present?
-
- srdc_run = SpeedrunDotCom.run(srdc_id)
- return if srdc_run.blank?
-
- srdc_runner = SpeedrunDotCom.user(srdc_run.players[0]['id'])
- return if srdc_runner.blank?
-
- update(user: User.find_by(srdc_runner.twitch_login))
- rescue SpeedrunDotCom::RunNotFound, SpeedrunDotCom::UserNotFound, SpeedrunDotCom::
+ return if srdc_id.nil?
+ update(user:
+ User.find_by(
+ name: SpeedrunDotCom.user(
+ SpeedrunDotCom.run(srdc_id).players[0]['id']
+ ).twitch_login
+ )
+ )
+ rescue SpeedrunDotCom::RunNotFound, SpeedrunDotCom::UserNotFound
end
end
end
|
Revert "Guard against speedrun.com failed calls"
This reverts commit caf7d4aab73883f63ab00013712050a9e781f014.
|
diff --git a/app/validators/run_validator.rb b/app/validators/run_validator.rb
index abc1234..def5678 100644
--- a/app/validators/run_validator.rb
+++ b/app/validators/run_validator.rb
@@ -10,7 +10,7 @@ return if record.video_url.nil?
URI.parse(record.video_url).tap do |uri|
- unless uri.host =~ /^(www\.)?(twitch\.tv|hitbox\.tv|youtube\.com)$/
+ unless uri.host =~ /^(www\.)?(twitch\.tv|hitbox\.tv|youtube\.com|youtu\.be)$/
record.errors[:base] << 'Your video URL must be a link to a Twitch, Hitbox, or YouTube video.'
end
end
|
Allow youtu.be links for proof
|
diff --git a/wateringServer/app/models/plant.rb b/wateringServer/app/models/plant.rb
index abc1234..def5678 100644
--- a/wateringServer/app/models/plant.rb
+++ b/wateringServer/app/models/plant.rb
@@ -7,7 +7,10 @@ end
def needs_water?
- # TODO handle no waterings
- Date.today() - self.latest_watering.date > self.days_per_watering
+ if self.latest_watering
+ Date.today() - self.latest_watering.date > self.days_per_watering
+ else
+ true
+ end
end
end
|
Add handling of no waterings to needs_water?
|
diff --git a/git-duet.rb b/git-duet.rb
index abc1234..def5678 100644
--- a/git-duet.rb
+++ b/git-duet.rb
@@ -4,10 +4,10 @@ version "0.5.0"
if OS.mac?
url "https://github.com/git-duet/git-duet/releases/download/0.5.0/darwin_amd64.tar.gz"
- sha256 "adc9fe97c99e92fdb160ad29413ec437e125d454590f41be1b91924a4c9efb09"
+ sha256 "88050ceb98480a7917106180c4d81764f94db5719ad3b458b90ac7af6cee9849"
elsif OS.linux?
url "https://github.com/git-duet/git-duet/releases/download/0.5.0/linux_amd64.tar.gz"
- sha256 "e4f767b4c41772641b9178ed3f1d45f6f5f1d3b9b8509fe7016f5376aa181474"
+ sha256 "37ddd1285b5a58c4c3f03cc310a5b0d4af7eaa7a24ce44fd69206fe25aabd949"
end
depends_on :arch => :x86_64
|
Update SHAs of 0.5.0 tarballs
The initial release of 0.5.0 contained the wrong binaries, see:
https://github.com/git-duet/git-duet/issues/40
|
diff --git a/app/exporters/formatters/manual_section_indexable_formatter.rb b/app/exporters/formatters/manual_section_indexable_formatter.rb
index abc1234..def5678 100644
--- a/app/exporters/formatters/manual_section_indexable_formatter.rb
+++ b/app/exporters/formatters/manual_section_indexable_formatter.rb
@@ -1,6 +1,8 @@-class ManualSectionIndexableFormatter
+require "formatters/abstract_indexable_formatter"
+
+class ManualSectionIndexableFormatter < AbstractIndexableFormatter
def initialize(section, manual)
- @section = section
+ @entity = section
@manual = manual
end
@@ -8,33 +10,36 @@ "manual_section"
end
- def id
- link
- end
+private
+ attr_reader :manual
- def indexable_attributes
+ def extra_attributes
{
- title: "#{manual.title}: #{section.title}",
- description: section.summary,
- link: link,
- indexable_content: section.body,
- organisations: [manual.organisation_slug],
manual: manual.slug,
}
end
-private
- attr_reader :section, :manual
+ def title
+ "#{manual.title}: #{entity.title}"
+ end
- def extra_attributes
- {}
+ def description
+ entity.summary
end
def link
- with_leading_slash(section.slug)
+ with_leading_slash(entity.slug)
end
- def with_leading_slash(slug)
- slug.start_with?("/") ? slug : "/#{slug}"
+ def indexable_content
+ entity.body
+ end
+
+ def last_update
+ nil
+ end
+
+ def organisation_slugs
+ [manual.organisation_slug]
end
end
|
Refactor ManualSectionIndexableFormatter to use abstract class
This avoids duplication of with_leading_slash, and makes this formatter more
consistent with the others.
The main change here is to override private methods from the superclass
instead of defining the attributes entirely in indexable_attributes. This
makes it clearer that the only attribute unique to this formatter is the
manual.
|
diff --git a/playground/.chef/knife.rb b/playground/.chef/knife.rb
index abc1234..def5678 100644
--- a/playground/.chef/knife.rb
+++ b/playground/.chef/knife.rb
@@ -1,6 +1,6 @@ chef_repo = File.join(File.dirname(__FILE__), "..")
-chef_server_url "http://127.0.0.1:4000"
+chef_server_url "http://127.0.0.1:8889"
node_name "stickywicket"
client_key File.join(File.dirname(__FILE__), "stickywicket.pem")
cookbook_path "#{chef_repo}/cookbooks"
|
Connect to chef zero default port in the playground
Fixes: #128
Signed-off-by: Thom May <b591b301ff4610f565a21bb050267ffd893cc83c@may.lt>
|
diff --git a/lib/redis_permalink.rb b/lib/redis_permalink.rb
index abc1234..def5678 100644
--- a/lib/redis_permalink.rb
+++ b/lib/redis_permalink.rb
@@ -1,5 +1,73 @@ require "redis_permalink/version"
+require "active_support"
+require "active_record"
module RedisPermalink
- # Your code goes here...
+ extend ActiveSupport::Concern
+
+ module ClassMethods
+ def redis_permalink_name
+ @redis_permalink_name
+ end
+
+ def redis_permalink_name=(v)
+ @redis_permalink_name = v
+ end
+
+ def redis_permalink_cache
+ @redis_permalink_cache
+ end
+
+ def redis_permalink_cache=(v)
+ @redis_permalink_cache = v
+ end
+
+ def permalink(name, cache=nil)
+ self.redis_permalink_name = name
+ self.redis_permalink_cache = cache
+
+ class_eval do
+ def generate_permalink
+ list = redis_permalink_name.split(/ /)
+
+ refined = []
+ list.size.times.each do |i|
+ w = list[i].gsub(/\W/, '')
+ refined << w if w != ""
+ end
+ return refined.join('-').downcase
+ end
+
+ def permalink=(perma)
+ ap "Permalink is only updated on creation"
+ end
+
+ def permalink
+ return self["permalink"] ? self["permalink"].downcase : ""
+ end
+
+ def get_link(prefix="")
+ (prefix != "" ? "/#{prefix}/#{permalink}" : "/" + permalink.to_s).downcase
+ end
+
+ def self.via_permalink(perma)
+ if redis_permalink_cache
+ key = "#{self.name.underscore}:#{perma}"
+ id = redis_permalink_cache.get(key)
+ return self.find(id) if id
+ end
+
+ # If not cached
+ obj = self.find_by_permalink(perma)
+ redis_permalink_cache.set(key, obj.id) if redis_permalink_cache
+ return obj
+ end
+
+ before_create { self['permalink'] = self.generate_permalink }
+ after_destroy { redis_permalink_cache.del(self['permalink']) if redis_permalink_cache }
+ end
+ end
+ end
end
+
+ActiveRecord::Base.send :include, RedisPermalink
|
Add Variant Redis Cache Store
|
diff --git a/lib/redshiftex/core.rb b/lib/redshiftex/core.rb
index abc1234..def5678 100644
--- a/lib/redshiftex/core.rb
+++ b/lib/redshiftex/core.rb
@@ -1,6 +1,6 @@ require 'yaml'
require 'logger'
-require 'timeout'
+require 'timeout' unless defined?(Timeout)
module Redshiftex
class Core
@@ -11,7 +11,7 @@ end
def connection(path, environment)
- @yaml = YAML.load(ERB.new(File.read(path)).result)
+ @yaml = YAML.load(ERB.new(File.read(path)).result)
@yaml = @yaml[environment] if environment
@yaml
end
|
Fix load error gem "timeout"
add condition when load gem.
|
diff --git a/lib/utils.rb b/lib/utils.rb
index abc1234..def5678 100644
--- a/lib/utils.rb
+++ b/lib/utils.rb
@@ -8,7 +8,7 @@ results = []
blocks.each do |b|
info = yield b
- results.concat [*info]
+ results.concat Array(info)
end
results
end
|
Use Array instead of [*info] for clarity
|
diff --git a/lib/sfn/callback.rb b/lib/sfn/callback.rb
index abc1234..def5678 100644
--- a/lib/sfn/callback.rb
+++ b/lib/sfn/callback.rb
@@ -26,5 +26,23 @@ @api = api
end
+ # Wrap action within status text
+ #
+ # @param msg [String] action text
+ # @yieldblock action to perform
+ # @return [Object] result of yield
+ def run_action(msg)
+ ui.info("#{msg}... ", :nonewline)
+ begin
+ result = yield
+ ui.puts ui.color('complete!', :green, :bold)
+ result
+ rescue => e
+ ui.puts ui.color('error!', :red, :bold)
+ ui.error "Reason - #{e}"
+ raise
+ end
+ end
+
end
end
|
Add UI helper to wrap actions
|
diff --git a/lib/thin/recipes.rb b/lib/thin/recipes.rb
index abc1234..def5678 100644
--- a/lib/thin/recipes.rb
+++ b/lib/thin/recipes.rb
@@ -15,7 +15,7 @@
Capistrano::Configuration.instance.load do
set :thin_cluster, "thin_cluster"
- set :thin_config, "#{release_path}/config/thin.yml"
+ set :thin_config, "#{current_path}/config/thin.yml"
namespace :deploy do
desc 'Start Thin processes on the app server.'
|
Use current_path to locate config file
git-svn-id: 1a7f608db5630264da01beecbf41f3f4b8b256b8@361 ab7993de-5426-0410-a80b-baa00616f331
|
diff --git a/lib/tdx/parsers/eod.rb b/lib/tdx/parsers/eod.rb
index abc1234..def5678 100644
--- a/lib/tdx/parsers/eod.rb
+++ b/lib/tdx/parsers/eod.rb
@@ -9,7 +9,7 @@
(file.size / 32).times do |line|
file.pos = line * 32
- quotes << Quote.read(file)
+ quotes << Quote.new.read(file)
end
return quotes
@@ -28,7 +28,7 @@ skip length: 4 # Reserved
def read(data)
- super(data)
+ super
return {
date: Date.parse(date.to_s),
|
Fix the bug that returns unparsed quotes
|
diff --git a/spec/app_manager/api_spec.rb b/spec/app_manager/api_spec.rb
index abc1234..def5678 100644
--- a/spec/app_manager/api_spec.rb
+++ b/spec/app_manager/api_spec.rb
@@ -8,8 +8,12 @@ end
describe "new" do
- it "should return a new Api instance" do
+ it "returns a new Api instance" do
ManageEngine::AppManager::Api.new("11").should be_instance_of(ManageEngine::AppManager::Api::Version11)
+ end
+
+ it "raises an error for an unknown version" do
+ expect{ ManageEngine::AppManager::Api.new("X") }.to raise_error
end
end
end
|
Add Spec for Unknown API Version
Update the API spec to include testing for an unknown version.
|
diff --git a/spec/models/activity_spec.rb b/spec/models/activity_spec.rb
index abc1234..def5678 100644
--- a/spec/models/activity_spec.rb
+++ b/spec/models/activity_spec.rb
@@ -1,5 +1,23 @@ require 'rails_helper'
RSpec.describe Activity, type: :model do
- pending "add some examples to (or delete) #{__FILE__}"
+
+ let(:activity) { Activity.new(description: "Here is a description.", itinerary_id: 1, location_id: 2) }
+
+ it "has a valid description" do
+ expect(activity.description).to eq("Here is a description.")
+ end
+
+ it "has a valid itinerary ID" do
+ expect(activity.itinerary_id).to eq(1)
+ end
+
+ it "has a valid location ID" do
+ expect(activity.location_id).to eq(2)
+ end
+
+ it { should belong_to(:itinerary) }
+
+ it { should belong_to(:location) }
+
end
|
Write tests for Activity model - all pass
|
diff --git a/lib/tinkoff/payment.rb b/lib/tinkoff/payment.rb
index abc1234..def5678 100644
--- a/lib/tinkoff/payment.rb
+++ b/lib/tinkoff/payment.rb
@@ -22,5 +22,13 @@ @original_amount = response['OriginalAmount']
@new_amount = response['NewAmount']
end
+
+ def failure?
+ !@success
+ end
+
+ def success?
+ !failure?
+ end
end
end
|
Add success? and failure? methods to Payment
|
diff --git a/spec/tests/base/base_spec.rb b/spec/tests/base/base_spec.rb
index abc1234..def5678 100644
--- a/spec/tests/base/base_spec.rb
+++ b/spec/tests/base/base_spec.rb
@@ -12,15 +12,3 @@ describe command("timeout 1 dig #{property[:vip_internal_fqdn]}") do
it { should return_exit_status 0 }
end
-
-describe command('edeploy role') do
- it { should return_exit_status 0 }
-end
-
-describe command('edeploy profile') do
- it { should return_exit_status 0 }
-end
-
-describe command('edeploy version') do
- it { should return_exit_status 0 }
-end
|
Revert "base: test eDeploy commands"
This reverts commit 4d3d626f50a1de24a08d89b64f0b0c511670d746.
|
diff --git a/fluent-plugin-kafka.gemspec b/fluent-plugin-kafka.gemspec
index abc1234..def5678 100644
--- a/fluent-plugin-kafka.gemspec
+++ b/fluent-plugin-kafka.gemspec
@@ -19,4 +19,5 @@ gem.add_dependency 'yajl-ruby'
gem.add_dependency 'msgpack'
gem.add_dependency 'zookeeper'
+ gem.add_dependency 'snappy'
end
|
Add new dependency to gemspec
|
diff --git a/core/spec/models/concerns/comable/cart_owner_spec.rb b/core/spec/models/concerns/comable/cart_owner_spec.rb
index abc1234..def5678 100644
--- a/core/spec/models/concerns/comable/cart_owner_spec.rb
+++ b/core/spec/models/concerns/comable/cart_owner_spec.rb
@@ -19,7 +19,7 @@ let(:stock) { create(:stock, :unstocked, :with_product) }
let(:cart_item) { subject.cart_items.first }
- before { allow(cart_item).to receive(:stock).and_return(stock) }
+ before { allow(cart_item).to receive(:variant).and_return(stock.variant) }
before { cart_item.valid? }
it 'has cart with errors' do
|
Fix a failed test case for CartOwner
|
diff --git a/app/models/request.rb b/app/models/request.rb
index abc1234..def5678 100644
--- a/app/models/request.rb
+++ b/app/models/request.rb
@@ -6,7 +6,7 @@
validates :content, presence: true
validates :requester, presence: true
- validates :isFulfilled, presence: true
+ validates :is_fulfilled, presence: true
private
def defaultly_unfulfilled
|
Fix another variable to use snakecase
|
diff --git a/lib/specinfra/command/redhat/base/yumrepo.rb b/lib/specinfra/command/redhat/base/yumrepo.rb
index abc1234..def5678 100644
--- a/lib/specinfra/command/redhat/base/yumrepo.rb
+++ b/lib/specinfra/command/redhat/base/yumrepo.rb
@@ -1,7 +1,7 @@ class Specinfra::Command::Redhat::Base::Yumrepo < Specinfra::Command::Linux::Base::Yumrepo
class << self
def check_exists(repository)
- "yum repolist all -C | grep ^#{escape(repository)}"
+ "yum repolist all -C | grep -E \"^#{escape(repository)}\(\\s\|$\)\""
end
def check_is_enabled(repository)
|
Use regexp to match exactly the repo name
If you have different repos with name like gvp-bi-common, gvp-bi-common-x86_64, gvp-bi-common-noarch, etc...and you want to verify if they exist or not, with the current code it fails even if the repo not exist because it matches only the beginning of the name. Matching the name exactly has the desired behavior.
|
diff --git a/user_api/com/mdi/storage/collection_definitions_mapping.rb b/user_api/com/mdi/storage/collection_definitions_mapping.rb
index abc1234..def5678 100644
--- a/user_api/com/mdi/storage/collection_definitions_mapping.rb
+++ b/user_api/com/mdi/storage/collection_definitions_mapping.rb
@@ -21,9 +21,20 @@
# return a collection definition structs array
def get_all()
- RagentApi::CollectionDefinitionMapping.get_all(user_api.account)
+ @all_definitions ||= RagentApi::CollectionDefinitionMapping.get_all(user_api.account)
end
+ def get_for_asset_with_type(imei, type)
+ asset_definitions = []
+ definitions = self.get_all()
+
+ definitions.each do |definition|
+ if (definition.assets == [] || definition.assets.include? imei) && definition.collects.include? type
+ asset_definitions << definition
+ end
+ end
+ asset_definitions
+ end
end
end #Storage
|
Add method to get definitions for an asset
|
diff --git a/app/views/renalware/api/ukrdc/patients/_clinic_visit_observation.xml.builder b/app/views/renalware/api/ukrdc/patients/_clinic_visit_observation.xml.builder
index abc1234..def5678 100644
--- a/app/views/renalware/api/ukrdc/patients/_clinic_visit_observation.xml.builder
+++ b/app/views/renalware/api/ukrdc/patients/_clinic_visit_observation.xml.builder
@@ -9,8 +9,7 @@ xml.ObservationTime visit.datetime
xml.ObservationCode do
- # xml.CodingStandard "2.16.840.1.113883.4.642.2.115"
- xml.CodingStandard "PV"
+ xml.CodingStandard "UKRR"
xml.Code I18n.t("loinc.#{i18n_key}.code")
xml.Description I18n.t("loinc.#{i18n_key}.description")
end
|
Use UKRR not PV coding standard for clinic observations
Had already changed HD observations but not those in clinic visits.
|
diff --git a/recipes/mod_cloudflare.rb b/recipes/mod_cloudflare.rb
index abc1234..def5678 100644
--- a/recipes/mod_cloudflare.rb
+++ b/recipes/mod_cloudflare.rb
@@ -18,7 +18,7 @@ #
apt_repository 'cloudflare' do
- uri 'http://pkg.cloudflare.com'
+ uri 'https://pkg.cloudflare.com/'
distribution node['lsb']['codename']
components ['main']
key 'http://pkg.cloudflare.com/pubkey.gpg'
|
Use the https cloudflare repo
Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
|
diff --git a/db/seeds/demo/160_patients_bookmarks.rb b/db/seeds/demo/160_patients_bookmarks.rb
index abc1234..def5678 100644
--- a/db/seeds/demo/160_patients_bookmarks.rb
+++ b/db/seeds/demo/160_patients_bookmarks.rb
@@ -1,7 +1,5 @@ module Renalware
log "--------------------Adding Bookmarks --------------------"
-
- file_path = File.join(demo_path, "patients_bookmarks.csv")
logcount=0
roger_rabbit = Patient.find_by(family_name: 'RABBIT', given_name: 'Roger')
@@ -12,5 +10,5 @@ patients_user.bookmarks.create!(patient: roger_rabbit)
end
- log "#{logcount} Bookmarks seeded"
+ log "#{logcount} Roger RABBIT Bookmarks seeded"
end
|
Remove unused .csv file and change log title
|
diff --git a/definitions/sn-centos-6.4/definition.rb b/definitions/sn-centos-6.4/definition.rb
index abc1234..def5678 100644
--- a/definitions/sn-centos-6.4/definition.rb
+++ b/definitions/sn-centos-6.4/definition.rb
@@ -12,7 +12,7 @@ ],
:memory_size => "512",
:iso_file => iso,
- :iso_md5 => "690138908de516b6e5d7d180d085c3f3",
+ :iso_md5 => "4a5fa01c81cc300f4729136e28ebe600",
:iso_src => "#{iso_url}" })
Veewee::Session.declare session
|
Update md5sum of the 6.4 iso
|
diff --git a/test/simplereactor_test.rb b/test/simplereactor_test.rb
index abc1234..def5678 100644
--- a/test/simplereactor_test.rb
+++ b/test/simplereactor_test.rb
@@ -12,7 +12,17 @@ it "sets reactor to a nio4r based reactor, if nio4r is available" do
SimpleReactor.use_engine :nio
- SimpleReactor.Reactor.must_be_same_as SimpleReactor::Nio if Object.const_defined? :NIO
+ if Object.const_defined? :NIO
+ SimpleReactor.Reactor.must_be_same_as SimpleReactor::Nio
+
+ SimpleReactor.use_engine :select
+
+ SimpleReactor.Reactor.must_be_same_as SimpleReactor::Select
+
+ SimpleReactor.use_engine :nio
+
+ SimpleReactor.Reactor.must_be_same_as SimpleReactor::Select
+ end
end
|
Add a basic test for toggling from one engine type to another, and back.
|
diff --git a/eclipse-plugins.rb b/eclipse-plugins.rb
index abc1234..def5678 100644
--- a/eclipse-plugins.rb
+++ b/eclipse-plugins.rb
@@ -5,7 +5,7 @@ MARKETPLACE_PLUGINS << { id: 2706327, human: 'Docker Tooling' }
MARKETPLACE_PLUGINS << { id: 1216155, human: 'm2e apt' }
MARKETPLACE_PLUGINS << { id: 264, human: 'ECL Emma' }
-MARKETPLACE_PLUGINS << { id: 1099, human: 'FindBugs' }
+MARKETPLACE_PLUGINS << { id: 3519199, human: 'SpotBugs' }
MARKETPLACE_PLUGINS << { id: 150, human: 'CheckStyle' }
# traditional plugins to install.
|
Use SpotBugs instead of FindBugs
* SpotBugs is under active development and FindBugs has effectively not moved for over a year.
|
diff --git a/mini_magick.gemspec b/mini_magick.gemspec
index abc1234..def5678 100644
--- a/mini_magick.gemspec
+++ b/mini_magick.gemspec
@@ -17,7 +17,6 @@ s.homepage = 'https://github.com/minimagick/minimagick'
s.files = Dir['README.rdoc', 'VERSION', 'MIT-LICENSE', 'Rakefile', 'lib/**/*']
- s.test_files = Dir['spec/**/*']
s.require_paths = ['lib']
s.add_development_dependency 'rake'
|
Remove test files from gemspec manifest
The images take up a lot of space, and there is no need to have test
files included in the gem.
|
diff --git a/core/lib/generators/spree/install/templates/config/initializers/spree.rb b/core/lib/generators/spree/install/templates/config/initializers/spree.rb
index abc1234..def5678 100644
--- a/core/lib/generators/spree/install/templates/config/initializers/spree.rb
+++ b/core/lib/generators/spree/install/templates/config/initializers/spree.rb
@@ -26,7 +26,7 @@ # Frontend:
# Custom logo for the frontend
- # config.logo = "logo/spree_50.png"
+ # config.logo = "logo/solidus_logo.png"
# Template to use when rendering layout
# config.layout = "spree/layouts/spree_application"
@@ -35,7 +35,7 @@ # Admin:
# Custom logo for the admin
- # config.admin_interface_logo = "logo/spree_50.png"
+ # config.admin_interface_logo = "logo/solidus_logo.png"
end
Spree.user_class = <%= (options[:user_class].blank? ? "Spree::LegacyUser" : options[:user_class]).inspect %>
|
Switch to solidus_logo.png in initializer template
|
diff --git a/config/initializers/cors.rb b/config/initializers/cors.rb
index abc1234..def5678 100644
--- a/config/initializers/cors.rb
+++ b/config/initializers/cors.rb
@@ -7,7 +7,7 @@
Rails.application.config.middleware.insert_before 0, Rack::Cors do
allow do
- origins 'tebukuro.shinosakarb.org', 'localhost:4000'
+ origins Rails.env.development? ? 'localhost:4000' : 'tebukuro.shinosakarb.org'
resource '*',
headers: :any,
|
Switch allowed frontend origin by rails environment
|
diff --git a/app/controllers/sms_controller.rb b/app/controllers/sms_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/sms_controller.rb
+++ b/app/controllers/sms_controller.rb
@@ -2,7 +2,7 @@ @user = User.find(session[:user_id])
reach = @user.reaches.find_by(main_reach: true)
to = reach.contact_phone
- message = reach.text
+ message = reach.text + " -- sent by: " + @user.username + " via Reach"
p client = Twilio::REST::Client.new(
ENV["TWILIO_ACCOUNT_SID"],
ENV["TWILIO_AUTH_TOKEN"]
|
Add sent by signature in text message
|
diff --git a/zoo-app/lib/zoo_app/animal_service_client.rb b/zoo-app/lib/zoo_app/animal_service_client.rb
index abc1234..def5678 100644
--- a/zoo-app/lib/zoo_app/animal_service_client.rb
+++ b/zoo-app/lib/zoo_app/animal_service_client.rb
@@ -5,6 +5,7 @@ base_uri 'http://animal-service.com'
def get_alligator
- # Yet to be implemented because we're doing Test First Development...
+ name = JSON.parse(self.class.get("/alligator").body)['name']
+ Alligator.new(name)
end
end
|
Implement the Animal Service client consumer methods
|
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
@@ -24,4 +24,15 @@ capture(&block)
end
end
+
+ def money(number, currency)
+ number_to_currency(number, unit: User::CURRENCIES[currency])
+ end
+
+ def hourly_rate(number, currency)
+ unit = "#{User::CURRENCIES[currency]}/hour"
+ number = number_with_precision(number, precision: 2, delimiter: ',')
+
+ "#{number} #{unit}"
+ end
end
|
Add money and hourly_rate helpers
|
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
@@ -9,7 +9,7 @@ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '#{Rails.application.config.google_analytics}', 'auto');
- ga('send', 'pageview');
+ ga('send', 'pageview', location.path + location.search + location.hash);
</script>"""
end
js.html_safe
|
Update default pageview to include url fragment/hash.
|
diff --git a/app/models/edi_ops_transaction.rb b/app/models/edi_ops_transaction.rb
index abc1234..def5678 100644
--- a/app/models/edi_ops_transaction.rb
+++ b/app/models/edi_ops_transaction.rb
@@ -26,11 +26,11 @@ state :assigned
state :resolved
- event assign: do
+ event :assign do
transitions from: :open, to: :assigned
end
- event resolve: do
+ event :resolve do
transitions from: :assigned, to: :resolved
end
end
|
Fix syntax error in event definitions
|
diff --git a/app/models/edi_ops_transaction.rb b/app/models/edi_ops_transaction.rb
index abc1234..def5678 100644
--- a/app/models/edi_ops_transaction.rb
+++ b/app/models/edi_ops_transaction.rb
@@ -1,6 +1,8 @@ class EdiOpsTransaction
include Mongoid::Document
include Mongoid::Timestamps
+ include AASM
+
field :qualifying_reason_uri, type: String
field :enrollment_group_uri, type: String
@@ -8,5 +10,28 @@ field :event_key, type: String
field :event_name, type: String
- field :status, type: String
+ field :assigned_to, type: String
+ field :resolved_by, type: String
+
+ field :aasm_state, type: String
+
+ embeds_many :comments, cascade_callbacks: true
+ accepts_nested_attributes_for :comments, reject_if: proc { |attribs| attribs['content'].blank? }, allow_destroy: true
+
+ index({aasm_state: 1})
+
+ aasm do
+ state :open, initial: true
+ state :assigned
+ state :resolved
+
+ event assign: do
+ transitions from: :open, to: :assigned
+ end
+
+ event resolve: do
+ transitions from: :assigned, to: :resolved
+ end
+ end
+
end
|
Add aasm, comments and assignment attributes
|
diff --git a/lib/lanes/api/default_routes.rb b/lib/lanes/api/default_routes.rb
index abc1234..def5678 100644
--- a/lib/lanes/api/default_routes.rb
+++ b/lib/lanes/api/default_routes.rb
@@ -10,8 +10,10 @@ get Lanes.config.mounted_at + '/file/*',
&API::Handlers::File.getter
- Extensions.each do | ext |
+
+ Extensions.each(reversed: true) do | ext |
ext.route(self)
end
+
end
end
|
Load routes in reverse order
This way the current route can override all previous
|
diff --git a/lib/morph/docker_maintenance.rb b/lib/morph/docker_maintenance.rb
index abc1234..def5678 100644
--- a/lib/morph/docker_maintenance.rb
+++ b/lib/morph/docker_maintenance.rb
@@ -17,7 +17,7 @@ private
def self.delete_container(container)
- Rails.logger.info "Deleting container #{container}..."
+ Rails.logger.info "Deleting container #{container.id}..."
container.delete
end
|
Fix typo - only output container ID
|
diff --git a/lib/fog/volume/openstack/requests/update_metadata.rb b/lib/fog/volume/openstack/requests/update_metadata.rb
index abc1234..def5678 100644
--- a/lib/fog/volume/openstack/requests/update_metadata.rb
+++ b/lib/fog/volume/openstack/requests/update_metadata.rb
@@ -9,7 +9,7 @@
request(
:body => Fog::JSON.encode(data),
- :expects => [200],
+ :expects => [200,202],
:method => 'POST',
:path => "volumes/#{volume_id}/metadata"
)
|
Update metadata update expected return code
Huawei FusionSphere OpenStack return a 202 HTTP code when updating volume metadata
|
diff --git a/Casks/appcode-eap.rb b/Casks/appcode-eap.rb
index abc1234..def5678 100644
--- a/Casks/appcode-eap.rb
+++ b/Casks/appcode-eap.rb
@@ -1,10 +1,32 @@ cask :v1 => 'appcode-eap' do
- version '3.2.0'
- sha256 'fa78dc8e2a7430e7173cecec7b6e369f3d2cf442facd7ee0df46592788b00715'
+ version '141.1399.2'
+ sha256 '2dd8a0a9246067ae6e092b9934cbadac6730a74fe400c8929b09792a0c0cda83'
- url 'http://download.jetbrains.com/objc/AppCode-141.1689.23.dmg'
- homepage 'http://confluence.jetbrains.com/display/OBJC/AppCode+EAP'
+ url "https://download.jetbrains.com/objc/AppCode-#{version}.dmg"
+ name 'AppCode'
+ homepage 'https://confluence.jetbrains.com/display/OBJC/AppCode+EAP'
license :commercial
app 'AppCode EAP.app'
+
+ zap :delete => [
+ '~/Library/Preferences/com.jetbrains.AppCode-EAP.plist',
+ '~/Library/Preferences/AppCode32',
+ '~/Library/Application Support/AppCode32',
+ '~/Library/Caches/AppCode32',
+ '~/Library/Logs/AppCode32',
+ ]
+
+ conflicts_with :cask => 'appcode-eap-bundled-jdk'
+
+ caveats <<-EOS.undent
+ #{token} requires Java 6 like any other IntelliJ-based IDE.
+ You can install it with
+
+ brew cask install caskroom/homebrew-versions/java6
+
+ The vendor (JetBrains) doesn't support newer versions of Java (yet)
+ due to several critical issues, see details at
+ https://intellij-support.jetbrains.com/entries/27854363
+ EOS
end
|
Improve cask for AppCode EAP
|
diff --git a/Casks/ninjablocks.rb b/Casks/ninjablocks.rb
index abc1234..def5678 100644
--- a/Casks/ninjablocks.rb
+++ b/Casks/ninjablocks.rb
@@ -2,8 +2,8 @@ version '0.2'
sha256 'f0ed94bc767a7f0059d08904f71c4266b6045ce4f7c194678e48b02a2d85eaeb'
- # dropboxusercontent.com is the official download host per the developer
- # Original discussion: https://twitter.com/ninjablocks/status/553339958606299136
+ # per https://twitter.com/ninjablocks/status/553339958606299136
+ # dropboxusercontent.com/u/428557 was verified as official when first introduced to the cask
url "https://dl.dropboxusercontent.com/u/428557/NinjaBlocks-#{version}.dmg"
name 'NinjaBlocks'
homepage 'https://discuss.ninjablocks.com/t/ninja-osx-client/1449'
|
Fix `url` stanza comment for NinjaBlocks.
|
diff --git a/Casks/simpholders.rb b/Casks/simpholders.rb
index abc1234..def5678 100644
--- a/Casks/simpholders.rb
+++ b/Casks/simpholders.rb
@@ -1,10 +1,10 @@ cask 'simpholders' do
- version '2.1'
- sha256 '68472926b108bc46b84fd2b6c1083b9fd1810f5fb70fc0924818d60f5bb8e668'
+ version '2.2'
+ sha256 '0f12b0076f2bef08cd3129916a6fbe6f92bd7601a96bc787bfc0c5feda4b4d4a'
- url "https://simpholders.com/site/assets/files/1115/simpholders_#{version.gsub('.', '_')}.dmg"
- appcast 'http://kfi-apps.com/appcasts/simpholders/',
- checkpoint: '07be0732567d5bc05c651e17af1276e2b29ab16f29b61dce3be4ee606833da92'
+ url "https://simpholders.com/downloads/SimPholders_#{version}.dmg"
+ appcast 'https://simpholders.com/updates/releases.xml',
+ checkpoint: '582a16dc0509a7294f58ac01668342159bcdcb3edb01a61a172d7fe8376a96c1'
name 'SimPholders'
homepage 'https://simpholders.com/'
license :commercial
|
Update SimPholders to version 2.2
This commit updates the version and sha256 stanzas.
|
diff --git a/ruby-puppetdb.gemspec b/ruby-puppetdb.gemspec
index abc1234..def5678 100644
--- a/ruby-puppetdb.gemspec
+++ b/ruby-puppetdb.gemspec
@@ -15,6 +15,7 @@ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
s.add_dependency('json')
+ s.add_dependency('chronic')
s.add_development_dependency 'rspec', '2.13'
s.add_development_dependency 'rake'
|
Add dependency on chronic to gemspec
|
diff --git a/lib/kosmos/package_attrs.rb b/lib/kosmos/package_attrs.rb
index abc1234..def5678 100644
--- a/lib/kosmos/package_attrs.rb
+++ b/lib/kosmos/package_attrs.rb
@@ -48,6 +48,10 @@ end
end
+ alias_method :prerequiste, :prerequisites
+ alias_method :pre_requisite, :prerequisites
+ alias_method :pre_requisites, :prerequisites
+
def postrequisites(*postrequisites)
@postrequisites ||= []
@@ -57,6 +61,10 @@ @postrequisites
end
end
+
+ alias_method :postrequiste, :postrequisites
+ alias_method :post_requisite, :postrequisites
+ alias_method :post_requisites, :postrequisites
def resolve_prerequisites
prerequisites.map { |package_name| find(package_name) }
|
Add some aliases for the requiste methods.
|
diff --git a/lib/rails-html-sanitizer.rb b/lib/rails-html-sanitizer.rb
index abc1234..def5678 100644
--- a/lib/rails-html-sanitizer.rb
+++ b/lib/rails-html-sanitizer.rb
@@ -5,5 +5,18 @@
module Rails
module Html
+ module Sanitizer
+ def full_sanitizer
+ Html::FullSanitizer
+ end
+
+ def link_sanitizer
+ Html::LinkSanitizer
+ end
+
+ def white_list_sanitizer
+ Html::WhiteListSanitizer
+ end
+ end
end
end
|
Add Sanitizer module responding to sanitizer_vendor interface.
|
diff --git a/lib/raygun/configuration.rb b/lib/raygun/configuration.rb
index abc1234..def5678 100644
--- a/lib/raygun/configuration.rb
+++ b/lib/raygun/configuration.rb
@@ -41,7 +41,7 @@ # set default attribute values
@ignore = IGNORE_DEFAULT
@custom_data = {}
- @silence_reporting = false
+ @silence_reporting = nil
@affected_user_method = :current_user
@affected_user_identifier_methods = [ :email, :username, :id ]
end
|
Change default value for config.silence_reporting to 'nil' as opposed to 'false' so it can be overridden by the Raltie
|
diff --git a/config/initializers/localeapp.rb b/config/initializers/localeapp.rb
index abc1234..def5678 100644
--- a/config/initializers/localeapp.rb
+++ b/config/initializers/localeapp.rb
@@ -1,3 +1,4 @@+require_relative '../application'
require 'localeapp/rails'
Localeapp.configure do |config|
|
Make sure `Rails` constant is defined
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.