diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/probe.gemspec b/probe.gemspec
index abc1234..def5678 100644
--- a/probe.gemspec
+++ b/probe.gemspec
@@ -8,8 +8,8 @@ spec.version = Probe::VERSION
spec.authors = ["Gustav Jonsson"]
spec.email = ["gustav@invoke.se"]
- spec.description = %q{TODO: Write a gem description}
- spec.summary = %q{TODO: Write a gem summary}
+ spec.description = %q{Send notification about certain events to given endpoint}
+ spec.summary = %q{Event notifier}
spec.homepage = ""
spec.license = "MIT"
|
Update gemspec to get rid of warnings
|
diff --git a/qwestioned.rb b/qwestioned.rb
index abc1234..def5678 100644
--- a/qwestioned.rb
+++ b/qwestioned.rb
@@ -8,7 +8,6 @@
get '/client' do
# build up a response
-
response = Twilio::TwiML::Response.new do |r|
r.Dial do |d|
d.Client params[:PhoneNumber]
@@ -17,6 +16,7 @@
# print the result
puts response.text
+ response.text
end
def generate_auth(client = 'ryan')
|
Set to display in browser
|
diff --git a/rich.gemspec b/rich.gemspec
index abc1234..def5678 100644
--- a/rich.gemspec
+++ b/rich.gemspec
@@ -18,7 +18,7 @@
s.add_dependency "rails", ">= 3.2.0"
s.add_dependency "jquery-rails"
- s.add_dependency "paperclip", '~> 3.5.2' # Possible to upgrade, but will need a fix. See https://github.com/gwincr11/rich/commit/1262a3225c20229f4b28eb3784cb60c14fb8b969
+ s.add_dependency "paperclip"
s.add_dependency "rack-raw-upload"
s.add_dependency "sass-rails"
s.add_dependency "mime-types"
|
Revert "Fixe la version de Paperclip pour éviter un bug corrigé dans une future version de Rich"
This reverts commit 023f472a73e9dd84d5be602ffa9dd3bdda3f9209.
|
diff --git a/rocx.gemspec b/rocx.gemspec
index abc1234..def5678 100644
--- a/rocx.gemspec
+++ b/rocx.gemspec
@@ -12,7 +12,7 @@ gem.summary = %q{Using a simple API, create docx files programmatically, including bullet points, titles, headings, page breaks and tables!}
gem.homepage = "https://github.com/southcitygene/rocx"
- gem.add_dependency "libxml"
+ gem.add_dependency "libxml-ruby"
gem.add_dependency "rubyzip"
gem.add_dependency "active_support"
|
[fix] Fix dependency with libxml (to libxml-ruby)
|
diff --git a/app/controllers/error_response_controller.rb b/app/controllers/error_response_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/error_response_controller.rb
+++ b/app/controllers/error_response_controller.rb
@@ -2,7 +2,7 @@ class ErrorResponseController < ApplicationController
def index
if Rails::VERSION::MAJOR > 4
- render(:plain => request.env['exception_handler.response'], :layout => request.env['exception_handler.layout'])
+ render(:html => request.env['exception_handler.response'].html_safe, :layout => request.env['exception_handler.layout'])
else
render(:text => @_env['exception_handler.response'], :layout => @_env['exception_handler.layout'])
end
|
Fix Rails 5 html rendering issue
|
diff --git a/app/controllers/group_requests_controller.rb b/app/controllers/group_requests_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/group_requests_controller.rb
+++ b/app/controllers/group_requests_controller.rb
@@ -22,7 +22,7 @@ private
def using_commercial_page?
- ENV['SHOW_PAYMENT_PAGE'].present?
+ ENV['SHOW_COMMERCIAL_PAGE'].present?
end
helper_method :using_commercial_page?
|
Change name of ENV variable to SHOW_COMMERCIAL_PAGE
|
diff --git a/app/models/alumni.rb b/app/models/alumni.rb
index abc1234..def5678 100644
--- a/app/models/alumni.rb
+++ b/app/models/alumni.rb
@@ -8,14 +8,28 @@ before_destroy { |record| TieAlumniWithStudentMember.destroy_all "alumni_id = #{record.id}" }
comma do
- id
+ id "ID"
name
year "Graduation year"
department
hall "Hall"
- AlumniData :company
- AlumniData :designation
+ AlumniData :company
+ AlumniData :designation
+ AlumniData :home_address => "Home Address"
+ AlumniData :office_address
+ AlumniData :home_phone
+ AlumniData :office_phone
+ AlumniData :mobile_phone
+ AlumniData :email1 => "Primary Email"
+ AlumniData :email2 => "Secondary Email"
+ AlumniData :payment_details
+ AlumniData :call_next_at
+
+ AlumniStatus :search
+ AlumniStatus :response
+
+ TieAlumniWithStudentMember :studentmember_id
end
private
|
Add the comma gem DSL for the Alumni record
- Include Alumni Data
- Include Alumni status
- Include TieAlumni details
Signed-off-by: Siddharth Kannan <805f056820c7a1cecc4ab591b8a0a604b501a0b7@gmail.com>
|
diff --git a/app/models/upload.rb b/app/models/upload.rb
index abc1234..def5678 100644
--- a/app/models/upload.rb
+++ b/app/models/upload.rb
@@ -1,5 +1,4 @@ class Upload < ActiveRecord::Base
- #attr_accessible :upload
has_attached_file :upload
validates_attachment_content_type :upload, :content_type => ["image/jpg", "image/jpeg", "image/png", "image/gif", "application/pdf"]
|
Delete comment from Upload model
|
diff --git a/spin.gemspec b/spin.gemspec
index abc1234..def5678 100644
--- a/spin.gemspec
+++ b/spin.gemspec
@@ -11,4 +11,6 @@ By preloading your Rails environment for testing you don't load the same code over and over and over... Spin works best for an autotest(ish) workflow.}
s.executables = ['spin']
+ s.files = ["README.md"] + Dir["lib/**/*"]
+ s.test_files = Dir["spec/**/*"]
end
|
Add proper file listings to gemspec
|
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,6 @@ class UserMailer < ActionMailer::Base
- default :from => "Test <oursolutionis@gmail.com>",
+ default :from => "oursolutionis <oursolutionis@gmail.com>",
:return_path => "oursolutionis@gmail.com"
def password_reset(user)
|
Set oursolution as default from in mailer
|
diff --git a/app/models/node_edition.rb b/app/models/node_edition.rb
index abc1234..def5678 100644
--- a/app/models/node_edition.rb
+++ b/app/models/node_edition.rb
@@ -37,8 +37,8 @@
def latlng=(latlng)
ll = latlng.split(',')
- location[0] = ll[0]
- location[1] = ll[1]
+ location[0] = ll[0].to_f
+ location[1] = ll[1].to_f
end
end
|
Convert lat/lng to floats before saving
|
diff --git a/db/data_migration/20161110141524_remove_orphaned_related_policies.rb b/db/data_migration/20161110141524_remove_orphaned_related_policies.rb
index abc1234..def5678 100644
--- a/db/data_migration/20161110141524_remove_orphaned_related_policies.rb
+++ b/db/data_migration/20161110141524_remove_orphaned_related_policies.rb
@@ -0,0 +1,5 @@+#This removes related policies that do not exist within the publishing api
+EditionPolicy.where(edition_id: 438411, policy_content_id: '5d5e9d5a-7631-11e4-a3cb-005056011aef').first.destroy
+EditionPolicy.where(edition_id: 441853, policy_content_id: '5d5ea079-7631-11e4-a3cb-005056011aef').first.destroy
+EditionPolicy.where(edition_id: 324040, policy_content_id: '5d3bf7fb-7631-11e4-a3cb-005056011aef').first.destroy
+EditionPolicy.where(edition_id: 456453, policy_content_id: '5f52615a-7631-11e4-a3cb-005056011aef').first.destroy
|
Remove related policies that do not exist within the publishing api
- In response to Sync Check error: "the links key 'related_policies' is not present"
|
diff --git a/rgot.gemspec b/rgot.gemspec
index abc1234..def5678 100644
--- a/rgot.gemspec
+++ b/rgot.gemspec
@@ -14,14 +14,6 @@ spec.homepage = "https://github.com/ksss/rgot"
spec.license = "MIT"
- # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
- # delete this section to allow pushing this gem to any host.
- if spec.respond_to?(:metadata)
- spec.metadata['allowed_push_host'] = "Set to 'http://mygemserver.com'"
- else
- raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
- end
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
spec.bindir = "bin"
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
Allow pushing any gem server
|
diff --git a/plugins/aws/autoscaling-instance-count-metrics.rb b/plugins/aws/autoscaling-instance-count-metrics.rb
index abc1234..def5678 100644
--- a/plugins/aws/autoscaling-instance-count-metrics.rb
+++ b/plugins/aws/autoscaling-instance-count-metrics.rb
@@ -0,0 +1,72 @@+#!/usr/bin/env ruby
+#
+# AutoScaling Group Instance Metrics
+# ===
+#
+# Get a count of instances in a given AutoScaling group
+#
+# Copyright 2013 Bashton Ltd http://www.bashton.com/
+#
+# Released under the same terms as Sensu (the MIT license); see LICENSE
+# for details.
+#
+# Needs fog gem
+
+require 'rubygems' if RUBY_VERSION < '1.9.0'
+require 'sensu-plugin/metric/cli'
+require 'fog'
+
+class AutoScalingInstanceCountMetrics < Sensu::Plugin::Metric::CLI::Graphite
+
+ option :groupname,
+ :description => "Name of the AutoScaling group",
+ :short => "-g GROUP_NAME",
+ :long => "--autoscaling-group GROUP_NAME"
+
+ option :scheme,
+ :description => "Metric naming scheme, text to prepend to metric",
+ :short => "-s SCHEME",
+ :long => "--scheme SCHEME",
+ :default => ""
+
+ option :aws_access_key,
+ :short => '-a AWS_ACCESS_KEY',
+ :long => '--aws-access-key AWS_ACCESS_KEY',
+ :description => "AWS Access Key. Either set ENV['AWS_ACCESS_KEY_ID'] or provide it as an option",
+ :required => true
+
+ option :aws_secret_access_key,
+ :short => '-k AWS_SECRET_ACCESS_KEY',
+ :long => '--aws-secret-access-key AWS_SECRET_ACCESS_KEY',
+ :description => "AWS Secret Access Key. Either set ENV['AWS_SECRET_ACCESS_KEY'] or provide it as an option",
+ :required => true
+
+ option :aws_region,
+ :short => '-r AWS_REGION',
+ :long => '--aws-region REGION',
+ :description => "AWS Region (such as eu-west-1).",
+ :default => 'us-east-1'
+
+ def run
+ if config[:scheme] == ""
+ graphitepath = "#{config[:groupname]}.autoscaling.instance_count"
+ else
+ graphitepath = config[:scheme]
+ end
+ begin
+ as = Fog::AWS::AutoScaling.new(
+ :aws_access_key_id => config[:aws_access_key],
+ :aws_secret_access_key => config[:aws_secret_access_key],
+ :region => config[:aws_region])
+
+ count = as.groups.get(config[:groupname]).instances.map{|i| i.life_cycle_state}.count('InService')
+ output graphitepath, count
+
+ rescue Exception => e
+ puts "Error: exception: #{e}"
+ critical
+ end
+ ok
+ end
+
+end
|
Add metric for count of instances in AWS AutoScaling group
|
diff --git a/app/api/users.rb b/app/api/users.rb
index abc1234..def5678 100644
--- a/app/api/users.rb
+++ b/app/api/users.rb
@@ -15,18 +15,18 @@ end
desc "Get user"
- get '/user/:id' do
+ get '/users/:id' do
#TODO: authorise!
@user = User.find(params[:id])
end
desc "Get convenors"
- get '/convenors' do
+ get '/users/convenors' do
@user_roles = User.convenors
end
desc "Get tutors"
- get '/tutors' do
+ get '/users/tutors' do
@user_roles = User.tutors
end
end
|
Change Users api to be more consistent with the new addition of convenors and tutors endpoints.
|
diff --git a/fog_pry.rb b/fog_pry.rb
index abc1234..def5678 100644
--- a/fog_pry.rb
+++ b/fog_pry.rb
@@ -8,18 +8,22 @@ require 'fog/compute'
require 'fog/aws'
require 'pry'
-require 'chef_metal/aws_credentials' # Cheat on how to get credentials
+require 'inifile'
-aws_credentials = ChefMetal::AWSCredentials.new
-aws_credentials.load_default
+aws_credentials = IniFile.load(
+ File.join(File.expand_path('~'), ".aws", "config"))
-creds = aws_credentials.default
-# creds = aws_credentials["profile"]
+if ARGV[0].nil?
+ creds = aws_credentials['default']
+else
+ creds = aws_credentials["profile #{ARGV[0]}"]
+end
compute = Fog::Compute.new({
:provider => "AWS",
- :aws_access_key_id => creds[:access_key_id],
- :aws_secret_access_key => creds[:secret_access_key]
+ :aws_access_key_id => creds['aws_access_key_id'],
+ :aws_secret_access_key => creds['aws_secret_access_key'],
+ :region => creds['region'] || 'us-east-1'
})
# Gimme shell
|
Use inifile instead of chef-metal
|
diff --git a/week-4/math/math_methods_spec.rb b/week-4/math/math_methods_spec.rb
index abc1234..def5678 100644
--- a/week-4/math/math_methods_spec.rb
+++ b/week-4/math/math_methods_spec.rb
@@ -0,0 +1,41 @@+require_relative "my_solution"
+
+describe "add" do
+ it "is defined as a method" do
+ expect(defined?(add)).to eq 'method'
+ end
+
+ it "adds two numbers" do
+ expect(add(2,3)).to eq(5)
+ end
+end
+
+describe "subtract" do
+ it "is defined as a method" do
+ expect(defined?(subtract)).to eq 'method'
+ end
+
+ it "subtracts two numbers" do
+ expect(subtract(2,3)).to eq(-1)
+ end
+end
+
+describe "multiply" do
+ it "is defined as a method" do
+ expect(defined?(multiply)).to eq 'method'
+ end
+
+ it "multiplies two numbers" do
+ expect(multiply(2,3)).to eq(6)
+ end
+end
+
+describe "divide" do
+ it "is defined as a method" do
+ expect(defined?(divide)).to eq 'method'
+ end
+
+ it "divides two numbers" do
+ expect(divide(10,2)).to eq(5.0)
+ end
+end
|
Add rspec file for challenge 4.3 release 4
|
diff --git a/spec/controllers/flow_managers_controller_spec.rb b/spec/controllers/flow_managers_controller_spec.rb
index abc1234..def5678 100644
--- a/spec/controllers/flow_managers_controller_spec.rb
+++ b/spec/controllers/flow_managers_controller_spec.rb
@@ -28,14 +28,14 @@
it "includes papers with Assigned Admin tasks with no assignee" do
do_request_json
- unassigned_papers = assigns(:flows).first.last.map &:first
- expect(unassigned_papers).to include paper1
+ unassigned_papers = assigns(:flows).first.tasks
+ expect(unassigned_papers.flatten).to include paper1
end
it "does not include unassigned papers from journals the user is not an admin for" do
do_request_json
- unassigned_papers = assigns(:flows).first.last.map &:first
- expect(unassigned_papers).not_to include paper2
+ unassigned_papers = assigns(:flows).first.tasks
+ expect(unassigned_papers.flatten).not_to include paper2
end
end
end
|
Fix test for new data structure
|
diff --git a/lib/stylin.rb b/lib/stylin.rb
index abc1234..def5678 100644
--- a/lib/stylin.rb
+++ b/lib/stylin.rb
@@ -17,6 +17,8 @@ File.read( File.expand_path(File.join('config', 'stylin.yml'), Rails.root) )
)
).symbolize_keys
+ else
+ user_config = {}
end
APP_CONFIG = config.merge( user_config )
|
Add default blank user config
|
diff --git a/lib/twitch.rb b/lib/twitch.rb
index abc1234..def5678 100644
--- a/lib/twitch.rb
+++ b/lib/twitch.rb
@@ -10,8 +10,6 @@ end
class << self
- private
-
def get(login)
route(login).get
end
@@ -26,7 +24,7 @@ def self.followed_ids(login)
Rails.cache.fetch([:twitch, :follows, login]) do
JSON.parse(
- Twitch::Follows.get(login)
+ self.get(login)
)['follows'].map do |follow|
follow['channel']['_id']
end
@@ -34,21 +32,17 @@ end
class << self
- private
-
def get(login)
route(login).get
end
def route(login)
- Twitch::User.route(login)['/follows/channels?limit=500']
+ User.route(login)['/follows/channels?limit=500']
end
end
end
class << self
- private
-
def route
RestClient::Resource.new('https://api.twitch.tv/kraken')
end
|
Fix a 500 when getting follows
|
diff --git a/lib/vector.rb b/lib/vector.rb
index abc1234..def5678 100644
--- a/lib/vector.rb
+++ b/lib/vector.rb
@@ -31,11 +31,6 @@ end
def ==(other_value)
- @members == other_value.member
- end
-
- # TODO : remove compatibility method after usages are removed
- def member
- @members
+ @members == other_value.members
end
end
|
Remove compatibility method and fix its usages
|
diff --git a/spec/api/organization_spec.rb b/spec/api/organization_spec.rb
index abc1234..def5678 100644
--- a/spec/api/organization_spec.rb
+++ b/spec/api/organization_spec.rb
@@ -0,0 +1,27 @@+require 'spec_helper'
+require 'json'
+
+describe 'the organizations collection' do
+ include Rack::Test::Methods
+
+ before :all do
+ new_database
+ end
+
+ it 'requires authentication' do
+ get '/organizations'
+ expect(last_response.status).to eq(401)
+ end
+
+ it 'returns a list of organizations' do
+ authorize 'admin', 'password'
+ get '/organizations'
+ expect(last_response.status).to eq(200)
+
+ res_json = JSON.parse(last_response.body)
+ expect(res_json).to eq([{"id"=>1, "name"=>"admins", "owner_email"=>"admins@example.com"}])
+ end
+
+ context 'creating a new organization' do
+ end
+end
|
Add first tests for the organizations collection
|
diff --git a/spec/lib/configurator_spec.rb b/spec/lib/configurator_spec.rb
index abc1234..def5678 100644
--- a/spec/lib/configurator_spec.rb
+++ b/spec/lib/configurator_spec.rb
@@ -3,7 +3,7 @@ describe Configurator::Config do
it "sets and gets values assigned" do
config = Configurator::Config.new
- config.my_config = true
- expect(config.my_config).to eql(true)
+ config.my_config = 'abc'
+ expect(config.my_config).to eql('abc')
end
end
|
Use a string instead boolean
|
diff --git a/app/models/identity.rb b/app/models/identity.rb
index abc1234..def5678 100644
--- a/app/models/identity.rb
+++ b/app/models/identity.rb
@@ -1,6 +1,6 @@ class Identity <OmniAuth::Identity::Models::ActiveRecord
validates :name, presence: true
- validates :email, presence: true, uniqueness: true, allow_blank: true, format:
+ validates :email, presence: true, uniqueness: true, format:
{ with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i }
validates :password, confirmation: true, length: { in: 6..20 }
end
|
Remove allow_blank from user email validation
|
diff --git a/server.rb b/server.rb
index abc1234..def5678 100644
--- a/server.rb
+++ b/server.rb
@@ -32,9 +32,8 @@
def get_headers
array = []
- while true
- line = @client.gets
- break if line=="\r\n"
+ @client.each_line do |line|
+ break if line == "\r\n"
array << line.gsub("\r\n","")
end
array
|
Clean up get_headers by using "each_line"
|
diff --git a/test/appharbor_test.rb b/test/appharbor_test.rb
index abc1234..def5678 100644
--- a/test/appharbor_test.rb
+++ b/test/appharbor_test.rb
@@ -18,6 +18,7 @@
branch = branches[payload['ref'].sub(/\Arefs\/heads\//, '')]
assert_not_nil branch
+ assert_equal payload["after"], branch["commit_id"]
end
svc = service({"token" => token, "application_slug" => application_slug}, payload)
|
Verify that the "after" commit is the one posted
|
diff --git a/lib/generators/has_friendship_update/templates/update_friendships.rb b/lib/generators/has_friendship_update/templates/update_friendships.rb
index abc1234..def5678 100644
--- a/lib/generators/has_friendship_update/templates/update_friendships.rb
+++ b/lib/generators/has_friendship_update/templates/update_friendships.rb
@@ -1,18 +1,21 @@ class UpdateFriendships < ActiveRecord::Migration
def self.up
- HasFriendship::Friendship.where(status: 'pending').update_all(status: 0)
- HasFriendship::Friendship.where(status: 'requested').update_all(status: 1)
- HasFriendship::Friendship.where(status: 'accepted').update_all(status: 2)
- HasFriendship::Friendship.where(status: 'blocked').update_all(status: 3)
- change_column :friendships, :status, :integer
+ add_column :friendships, :status_temp, :integer, index: true
+ HasFriendship::Friendship.where(status: 'pending').update_all(status_temp: 0)
+ HasFriendship::Friendship.where(status: 'requested').update_all(status_temp: 1)
+ HasFriendship::Friendship.where(status: 'accepted').update_all(status_temp: 2)
+ HasFriendship::Friendship.where(status: 'blocked').update_all(status_temp: 3)
+ remove_column :friendships, :status
+ rename_column :friendships, :status_temp, :status
end
def self.down
- change_column :friendships, :status, :string
- HasFriendship::Friendship.where(status: 0).update_all(status: 'pending')
- HasFriendship::Friendship.where(status: 1).update_all(status: 'requested')
- HasFriendship::Friendship.where(status: 2).update_all(status: 'accepted')
- HasFriendship::Friendship.where(status: 3).update_all(status: 'blocked')
+ add_column :friendships, :status_temp, :string
+ HasFriendship::Friendship.where(status: 0).update_all(status_temp: 'pending')
+ HasFriendship::Friendship.where(status: 1).update_all(status_temp: 'requested')
+ HasFriendship::Friendship.where(status: 2).update_all(status_temp: 'accepted')
+ HasFriendship::Friendship.where(status: 3).update_all(status_temp: 'blocked')
+ remove_column :friendships, :status
+ rename_column :friendships, :status_temp, :status
end
-
end
|
Fix the template of update migration
|
diff --git a/spec/dummy/config/environments/development.rb b/spec/dummy/config/environments/development.rb
index abc1234..def5678 100644
--- a/spec/dummy/config/environments/development.rb
+++ b/spec/dummy/config/environments/development.rb
@@ -12,8 +12,11 @@ config.consider_all_requests_local = true
config.action_controller.perform_caching = false
- # Don't care if the mailer can't send
- config.action_mailer.raise_delivery_errors = false
+ # Use mailcatcher in development.
+ config.action_mailer.raise_delivery_errors = true
+ config.action_mailer.delivery_method = :smtp
+ config.action_mailer.smtp_settings = { :address => "localhost", :port => 1025 }
+
# Print deprecation notices to the Rails logger
config.active_support.deprecation = :log
|
Use mailcatcher SMTP in dev
|
diff --git a/completion_generator.rb b/completion_generator.rb
index abc1234..def5678 100644
--- a/completion_generator.rb
+++ b/completion_generator.rb
@@ -29,11 +29,11 @@ file = File.read(file)
doc = Nokogiri::XML(file)
- parse_functions(doc.css('function'))
+ # parse_functions(doc.css('function'))
parse_methods(doc.css('method'))
- parse_constants(doc.css('constant'))
+ # parse_constants(doc.css('constant'))
end
end
|
Comment out unused method calls
|
diff --git a/app/models/review_body.rb b/app/models/review_body.rb
index abc1234..def5678 100644
--- a/app/models/review_body.rb
+++ b/app/models/review_body.rb
@@ -15,18 +15,7 @@ output = HEADER
room_left = MAX_BODY_LENGTH - output.size
- errors.each do |error|
- error_details = build_error_details(error, room_left - 1)
-
- if error_details
- room_left -= (error_details.size + 1)
- output += "\n#{error_details}"
- else
- break
- end
- end
-
- output
+ output + build_errors(errors, room_left)
else
""
end
@@ -35,6 +24,21 @@ private
attr_reader :errors
+
+ def build_errors(errors, room_left)
+ head, *tail = errors
+ error_details = "\n" + build_error_details(head, room_left - 1)
+
+ if (room_left - error_details.size) >= 0
+ if tail.any?
+ error_details + build_errors(tail, room_left - error_details.size)
+ else
+ error_details
+ end
+ else
+ ""
+ end
+ end
def build_error_details(error, room_left)
summary = error_summary(error)
|
Use recursive algorithm to limit review comment
As an alternative, this commit uses recursion to limit the review body
comment.
|
diff --git a/spec/support/webmock_httmultiparty_monkey_path.rb b/spec/support/webmock_httmultiparty_monkey_path.rb
index abc1234..def5678 100644
--- a/spec/support/webmock_httmultiparty_monkey_path.rb
+++ b/spec/support/webmock_httmultiparty_monkey_path.rb
@@ -0,0 +1,82 @@+require 'webmock'
+require 'httmultiparty'
+
+class FakeUploadIO
+
+ attr_accessor :original_filename, :content_type, :body
+
+ def initialize(io)
+ io.rewind # make sure....
+
+ self.original_filename = io.original_filename || File.basename(io.local_path)
+ self.content_type = io.content_type
+ self.body = io.read
+
+ io.rewind # ...we don't mess up with the io
+ end
+
+end
+
+module WebMock
+ module NetHTTPUtility
+
+ def self.request_signature_from_request(net_http, request, body = nil)
+ protocol = net_http.use_ssl? ? "https" : "http"
+
+ path = request.path
+ path = WebMock::Util::URI.heuristic_parse(request.path).request_uri if request.path =~ /^http/
+
+ if request["authorization"] =~ /^Basic /
+ userinfo = WebMock::Util::Headers.decode_userinfo_from_header(request["authorization"])
+ userinfo = WebMock::Util::URI.encode_unsafe_chars_in_userinfo(userinfo) + "@"
+ else
+ userinfo = ""
+ end
+
+ uri = "#{protocol}://#{userinfo}#{net_http.address}:#{net_http.port}#{path}"
+ method = request.method.downcase.to_sym
+
+ headers = Hash[*request.to_hash.map {|k,v| [k, v]}.inject([]) {|r,x| r + x}]
+
+ headers.reject! {|k,v| k =~ /[Aa]uthorization/ && v.first =~ /^Basic / } #we added it to url userinfo
+
+ # changes happen here
+ if body != nil && body.respond_to?(:read)
+ request.set_body_internal body.read
+ else
+ request.set_body_internal body
+ end
+
+ _body = request.respond_to?(:body_footprint) ? request.body_footprint : request.body
+
+ WebMock::RequestSignature.new(method, uri, :body => _body, :headers => headers)
+ end
+ end
+end
+
+module HTTMultiParty::Multipartable::Webmock
+
+ def body_footprint
+ return self.body if @_body == nil || @_body == ""
+
+ Marshal.dump(@_body.map do |key, _value|
+ _value = FakeUploadIO.new(_value) if _value.is_a?(UploadIO)
+ [key, _value]
+ end)
+ end
+
+ def body=(value)
+ if value.is_a?(Array)
+ @_body = value.dup # save it for later
+ super(value)
+ else
+ # does this case exist for real ? Never observed so far
+ puts "[httmultiparty] not an array !!! #{value.class}."
+ raise 'STOP'
+ end
+ end
+end
+
+class HTTMultiParty::MultipartPost < Net::HTTP::Post
+ include HTTMultiParty::Multipartable::Webmock
+end
|
Add Webmock and HttpMultiParty monkey patch.
|
diff --git a/db/migrate/20150115212948_create_users.rb b/db/migrate/20150115212948_create_users.rb
index abc1234..def5678 100644
--- a/db/migrate/20150115212948_create_users.rb
+++ b/db/migrate/20150115212948_create_users.rb
@@ -1,8 +1,8 @@ class CreateUsers < ActiveRecord::Migration
def change
create_table :users do |t|
- t.string :name
- t.string :password_digest
+ t.string :name, null: false
+ t.string :password_digest, null: false
t.timestamps
end
end
|
Add not null db validations to users.
|
diff --git a/db/migrate/20150421010047_create_users.rb b/db/migrate/20150421010047_create_users.rb
index abc1234..def5678 100644
--- a/db/migrate/20150421010047_create_users.rb
+++ b/db/migrate/20150421010047_create_users.rb
@@ -5,6 +5,7 @@ t.string :last_name, null: false
t.string :email, null: false
t.string :password_digest
+ t.references :address
t.timestamps null: false
end
|
Add address reference to user migration
|
diff --git a/hi.gemspec b/hi.gemspec
index abc1234..def5678 100644
--- a/hi.gemspec
+++ b/hi.gemspec
@@ -18,7 +18,8 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]
- spec.add_development_dependency 'bundler', '~> 1.5'
- spec.add_development_dependency 'rake', '~> 10.1.1'
- spec.add_development_dependency 'rspec', '~> 2.14.1'
+ spec.add_development_dependency 'bundler', '~> 1.5'
+ spec.add_development_dependency 'rack-test', '~> 0.6.2'
+ spec.add_development_dependency 'rake', '~> 10.1.1'
+ spec.add_development_dependency 'rspec', '~> 2.14.1'
end
|
Add rack-test as development dependency
|
diff --git a/spec/features/profiles/preferences_spec.rb b/spec/features/profiles/preferences_spec.rb
index abc1234..def5678 100644
--- a/spec/features/profiles/preferences_spec.rb
+++ b/spec/features/profiles/preferences_spec.rb
@@ -1,6 +1,6 @@ require 'spec_helper'
-describe 'Profile > Preferences' do
+describe 'Profile > Preferences', :js do
let(:user) { create(:user) }
before do
@@ -8,9 +8,11 @@ visit profile_preferences_path
end
- describe 'User changes their syntax highlighting theme', js: true do
+ describe 'User changes their syntax highlighting theme' do
it 'creates a flash message' do
choose 'user_color_scheme_id_5'
+
+ wait_for_requests
expect_preferences_saved_message
end
@@ -18,17 +20,19 @@ it 'updates their preference' do
choose 'user_color_scheme_id_5'
- allowing_for_delay do
- visit page.current_path
- expect(page).to have_checked_field('user_color_scheme_id_5')
- end
+ wait_for_requests
+ refresh
+
+ expect(page).to have_checked_field('user_color_scheme_id_5')
end
end
- describe 'User changes their default dashboard', js: true do
+ describe 'User changes their default dashboard' do
it 'creates a flash message' do
select 'Starred Projects', from: 'user_dashboard'
click_button 'Save'
+
+ wait_for_requests
expect_preferences_saved_message
end
@@ -37,12 +41,12 @@ select 'Starred Projects', from: 'user_dashboard'
click_button 'Save'
- allowing_for_delay do
- find('#logo').click
+ wait_for_requests
- expect(page).to have_content("You don't have starred projects yet")
- expect(page.current_path).to eq starred_dashboard_projects_path
- end
+ find('#logo').click
+
+ expect(page).to have_content("You don't have starred projects yet")
+ expect(page.current_path).to eq starred_dashboard_projects_path
find('.shortcuts-activity').trigger('click')
|
Fix Profile > Preferences feature specs
Signed-off-by: Rémy Coutable <4ea0184b9df19e0786dd00b28e6daa4d26baeb3e@rymai.me>
|
diff --git a/lib/bricks.rb b/lib/bricks.rb
index abc1234..def5678 100644
--- a/lib/bricks.rb
+++ b/lib/bricks.rb
@@ -15,7 +15,11 @@ if @builders[key]
@builders[key]
elsif Class === key
- builder = self[key.superclass] and @builders[key] = builder.derive(key)
+ @builders[key] = if builder = @builders[key.superclass]
+ builder.derive(key)
+ else
+ builder(key)
+ end
end
end
|
Initialize builders for models that don't have one.
|
diff --git a/logger.rb b/logger.rb
index abc1234..def5678 100644
--- a/logger.rb
+++ b/logger.rb
@@ -23,6 +23,7 @@ bot = Cinch::Bot.new do
configure do |c|
c.server = Config['server']
+ c.port = Config['port'] if Config['port']
c.channels = Config['channels']
c.user = Config['username']
c.nick = Config['nickname']
|
Connect to port specified in configuration
Fixes #10.
|
diff --git a/lib/gitlab.rb b/lib/gitlab.rb
index abc1234..def5678 100644
--- a/lib/gitlab.rb
+++ b/lib/gitlab.rb
@@ -36,7 +36,7 @@ #
# @return [Array<Symbol>]
def self.actions
- hidden = /endpoint|private_token|user_agent|sudo|get|post|put|\Adelete\z|validate|set_request_defaults|httparty/
+ hidden = /endpoint|private_token|auth_token|user_agent|sudo|get|post|put|\Adelete\z|validate|set_request_defaults|httparty/
(Gitlab::Client.instance_methods - Object.methods).reject {|e| e[hidden]}
end
end
|
Hide auth_token method from CLI/shell.
|
diff --git a/lib/kaisya.rb b/lib/kaisya.rb
index abc1234..def5678 100644
--- a/lib/kaisya.rb
+++ b/lib/kaisya.rb
@@ -1,13 +1,15 @@ #!/usr/bin/env ruby
+$:.unshift File.dirname(__FILE__)
+
require 'twitter'
-require './time_messenger'
+require 'time_messenger'
-Twitter.configure do |config|
+client = Twitter::REST::Client.new do |config|
config.consumer_key = 'xxxxx'
config.consumer_secret = 'xxxxx'
- config.oauth_token = 'xxxxx'
- config.oauth_token_secret = 'xxxxx'
+ config.access_token = 'xxxxx'
+ config.access_token_secret = 'xxxxx'
end
now = Time.now
@@ -16,9 +18,9 @@ begin
puts message
if message
- client = Twitter::Client.new
client.update("#{message} #kaisya_bot")
end
rescue => e
p e
end
+
|
Fix Twitter gem usage changes.
|
diff --git a/lib/wowser.rb b/lib/wowser.rb
index abc1234..def5678 100644
--- a/lib/wowser.rb
+++ b/lib/wowser.rb
@@ -4,9 +4,9 @@
class Wowser < Sinatra::Base
- set :root, File.dirname(__FILE__) + '/../'
+ configure do
+ set :root, File.dirname(__FILE__) + '/../'
- configure do
register Sinatra::AssetPipeline
# Locate vendor assets installed through Bower
|
Move root into configuration block
|
diff --git a/tasks/metrics/yardstick.rake b/tasks/metrics/yardstick.rake
index abc1234..def5678 100644
--- a/tasks/metrics/yardstick.rake
+++ b/tasks/metrics/yardstick.rake
@@ -7,7 +7,7 @@ require 'yardstick/rake/verify'
# Enable the legacy parser for JRuby until ripper is fully supported
- if Devtools.jruby? && Devtools.ruby19?
+ if Devtools.jruby?
YARD::Parser::SourceParser.parser_type = :ruby18
end
|
Update YARD to use the 1.8 parser for jruby
* Without this the ripper parser is used, which is still too buggy.
|
diff --git a/content_manager.gemspec b/content_manager.gemspec
index abc1234..def5678 100644
--- a/content_manager.gemspec
+++ b/content_manager.gemspec
@@ -9,7 +9,7 @@ s.version = ContentManager::VERSION
s.authors = ["Jasper Lyons"]
s.email = ["jasper.lyons@gmail.com"]
- s.homepage = "content-manager.github.io"
+ s.homepage = "http://content-manager.github.io"
s.summary = "A super light weight, content manager for developers."
s.description = "Define groups of content, views, and versions of that content that can be swapped out at runtime. The driving force behind this was allowing customers to be able to update the copy on their pages and for us to A/B test versions fo that copy for them."
s.license = "MIT"
|
Fix invalid URI in gemspec
|
diff --git a/tasks/mongoid_search.rake b/tasks/mongoid_search.rake
index abc1234..def5678 100644
--- a/tasks/mongoid_search.rake
+++ b/tasks/mongoid_search.rake
@@ -1,11 +1,15 @@ namespace :mongoid_search do
desc 'Goes through all documents with search enabled and indexes the keywords.'
task :index => :environment do
- Mongoid::Search.classes.each do |klass|
- Log.silent = ENV['SILENT']
- Log.log "\nIndexing documents for #{klass.name}:\n"
- klass.index_keywords!
+ if Mongoid::Search.classes.blank?
+ Log.log "No model to index keywords.\n"
+ else
+ Mongoid::Search.classes.each do |klass|
+ Log.silent = ENV['SILENT']
+ Log.log "\nIndexing documents for #{klass.name}:\n"
+ klass.index_keywords!
+ end
+ Log.log "\n\nDone.\n"
end
- Log.log "\n\nDone.\n"
end
end
|
Stop if classes is blank.
|
diff --git a/clockwork.gemspec b/clockwork.gemspec
index abc1234..def5678 100644
--- a/clockwork.gemspec
+++ b/clockwork.gemspec
@@ -3,6 +3,7 @@ s.version = "0.5.5"
s.authors = ["Adam Wiggins", "tomykaira"]
+ s.license = 'MIT'
s.description = "A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler."
s.email = ["adam@heroku.com", "tomykaira@gmail.com"]
s.extra_rdoc_files = [
|
Add MIT License specification to gemspec
Thanks to @bf4's detailed description (#49).
|
diff --git a/cocoapods.gemspec b/cocoapods.gemspec
index abc1234..def5678 100644
--- a/cocoapods.gemspec
+++ b/cocoapods.gemspec
@@ -6,7 +6,7 @@ s.version = Pod::VERSION
s.date = "2011-09-17"
s.license = "MIT"
- s.summary = "A simple Objective-C library package manager."
+ s.summary = "A simple Objective-C library package manager. (Requires MacRuby.)"
s.email = "eloy.de.enige@gmail.com"
s.homepage = "https://github.com/alloy/cocoapods"
s.authors = ["Eloy Duran"]
|
Add MacRuby note to gemspec summary
|
diff --git a/test/functional/test-next.rb b/test/functional/test-next.rb
index abc1234..def5678 100644
--- a/test/functional/test-next.rb
+++ b/test/functional/test-next.rb
@@ -0,0 +1,85 @@+#!/usr/bin/env ruby
+require 'test/unit'
+require 'trace'
+require_relative 'fn_helper'
+
+class TestNext < Test::Unit::TestCase
+
+ include FnTestHelper
+
+ def test_next_same_level
+
+ # See that we can next with parameter which is the same as 'next 1'
+ cmds = %w(next continue)
+ d = strarray_setup(cmds)
+ d.start
+ x = 5
+ y = 6
+ d.stop
+ out = ['-- x = 5',
+ '-- y = 6']
+ compare_output(out, d, cmds)
+
+ # See that we can next with a computed count value
+ cmds = ['next 5-3', 'continue']
+ d = strarray_setup(cmds)
+ d.start
+ x = 5
+ y = 6
+ z = 7
+ d.stop # ({'remove': true})
+ out = ['-- x = 5',
+ '-- z = 7']
+ compare_output(out, d, cmds)
+ end
+
+ def test_next_between_fn
+
+ # Next over a function
+ def fact(x)
+ return 1 if x <= 1
+ return fact(x-1)
+ end
+ cmds = %w(next continue)
+ d = strarray_setup(cmds)
+ d.start
+ x = fact(4)
+ y = 5
+ d.stop # ({:remove => true})
+ out = ['-- x = fact(4)',
+ '-- y = 5']
+ compare_output(out, d, cmds)
+ end
+
+ # def test_next_in_exception
+ # def boom(x)
+ # y = 0/x
+ # end
+ # def buggy_fact(x)
+ # return boom(0) if x <= 1
+ # return buggy_fact(x-1)
+ # end
+ # cmds = ['next!', 'continue']
+ # d = strarray_setup(cmds)
+ # begin
+ # d.start
+ # x = buggy_fact(4)
+ # y = 5
+ # assert(false, 'should have raised an exception')
+ # rescue ZeroDivisionError
+ # assert(true, 'Got the exception')
+ # ensure
+ # d.stop # ({:remove => true})
+ # end
+
+ # out = ['-- x = buggy_fact(4)',
+ # '!! x = buggy_fact(4)']
+ # compare_output(out, d, cmds)
+ # end
+end
+
+
+
+
+
+
|
Add "next" command functional test.
|
diff --git a/script/cruise_build.rb b/script/cruise_build.rb
index abc1234..def5678 100644
--- a/script/cruise_build.rb
+++ b/script/cruise_build.rb
@@ -11,7 +11,7 @@ when "racing_on_rails"
exec("rake cruise")
when "aba", "atra", "obra", "wsba"
- exec(%Q{svn propset "svn:externals" "local svn+ssh://butlerpress.com/var/repos/#{project}/trunk" . && rake cruise})
+ exec(%Q{svn propset "svn:externals" "local svn+ssh://butlerpress.com/var/repos/#{project_name}/trunk" . && rake cruise})
else
raise "Don't know how to build project named: '#{project_name}'"
end
|
Change cc.rb variable to project_name
|
diff --git a/app/controllers/gobierto_participation/welcome_controller.rb b/app/controllers/gobierto_participation/welcome_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/gobierto_participation/welcome_controller.rb
+++ b/app/controllers/gobierto_participation/welcome_controller.rb
@@ -3,7 +3,7 @@ module GobiertoParticipation
class WelcomeController < GobiertoParticipation::ApplicationController
def index
- @processes = current_site.processes.process.open
+ @processes = current_site.processes.process.open.active
@issues = current_site.issues.alphabetically_sorted
@participation_events = find_participation_events.page(params[:page])
@participation_news = find_participation_news.page(params[:page])
|
Fix open and active processes in participation home
|
diff --git a/scripts/push-binary.rb b/scripts/push-binary.rb
index abc1234..def5678 100644
--- a/scripts/push-binary.rb
+++ b/scripts/push-binary.rb
@@ -3,7 +3,7 @@
binary_name = ENV['BINARY_NAME']
bucket_name= ENV['BUCKET_NAME']
-file_path = Dir.glob("binary-builder-artifacts/#{binary_name}-*.{tar.gz,tgz,phar}").first
+file_path = Dir.glob("binary-builder-artifacts/#{binary_name}*.{tar.gz,tgz,phar}").first
unless file_path
puts 'No binaries detected for upload.'
exit
|
Remove spurious dash from file path glob
- go .tar.gz files don't have a dash before the version,
e.g. go1.6.3.linux-amd64.tar.gz
[#127362389]
Signed-off-by: Sam Smith <03a07629efb0a02c7bbe7cc340a4243da1ab861a@gmail.com>
|
diff --git a/app/models/feed_import.rb b/app/models/feed_import.rb
index abc1234..def5678 100644
--- a/app/models/feed_import.rb
+++ b/app/models/feed_import.rb
@@ -35,10 +35,9 @@
def succeeded
self.update(success: true)
- t = Time.now
self.feed.update(
- last_fetched_at: t,
- last_imported_at: t,
+ last_fetched_at: self.created_at,
+ last_imported_at: self.updated_at,
last_sha1: self.sha1
)
end
|
Use FeedImport.created_at for Feed.last_fetched_at, FeedImport.updated_at for Feed.updated_at
|
diff --git a/prius.gemspec b/prius.gemspec
index abc1234..def5678 100644
--- a/prius.gemspec
+++ b/prius.gemspec
@@ -21,6 +21,6 @@ spec.required_ruby_version = ">= 2.2"
spec.add_development_dependency "rspec", "~> 3.1"
- spec.add_development_dependency "rubocop", "~> 0.64.0"
+ spec.add_development_dependency "rubocop", "~> 0.68.1"
spec.add_development_dependency "rspec_junit_formatter", "~> 0.4.0"
end
|
Update rubocop requirement from ~> 0.64.0 to ~> 0.68.1
Updates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.64.0...v0.68.1)
Signed-off-by: dependabot[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@dependabot.com>
|
diff --git a/test/stripe/reversal_test.rb b/test/stripe/reversal_test.rb
index abc1234..def5678 100644
--- a/test/stripe/reversal_test.rb
+++ b/test/stripe/reversal_test.rb
@@ -35,7 +35,7 @@ reversal.metadata['key'] = 'value'
reversal.save
assert_requested :post,
- "#{Stripe.api_base}/v1/transfers/#{@transfer.id}/reversals/#{reversal.id}"
+ "#{Stripe.api_base}/v1/transfers/#{reversal.transfer}/reversals/#{reversal.id}"
end
end
end
|
Work around idiosyncrasies of stripe-mock
|
diff --git a/db/migrate/20150423232750_create_documents.rb b/db/migrate/20150423232750_create_documents.rb
index abc1234..def5678 100644
--- a/db/migrate/20150423232750_create_documents.rb
+++ b/db/migrate/20150423232750_create_documents.rb
@@ -1,3 +1,5 @@+# Encoding: utf-8
+# Create document
class CreateDocuments < ActiveRecord::Migration
def change
create_table :documents do |t|
|
Clean up document migration script
|
diff --git a/lib/rails_development_boost/cached_templates_patch/base_patch.rb b/lib/rails_development_boost/cached_templates_patch/base_patch.rb
index abc1234..def5678 100644
--- a/lib/rails_development_boost/cached_templates_patch/base_patch.rb
+++ b/lib/rails_development_boost/cached_templates_patch/base_patch.rb
@@ -1,6 +1,11 @@ module RailsDevelopmentBoost
module CachedTemplatesPatch
module BasePatch
+
+ def initialize_with_view_path_cache_reset(view_paths = [], assigns_for_first_render = {}, controller = nil)
+ initialize_without_view_path_cache_reset(view_paths, assigns_for_first_render, controller)
+ @view_paths.map(&:new_request!)
+ end
module ClassMethods
def process_view_paths(value)
@@ -13,14 +18,12 @@ end
def self.included(action_view_base)
+ action_view_base.alias_method_chain :initialize, :view_path_cache_reset
+
action_view_base.metaclass.send :remove_method, :process_view_paths
action_view_base.extend ClassMethods
# convert already loaded view paths
ActionController::Base.view_paths.map! {|path| action_view_base.to_reloading_path(path)}
-
- ActionController::Dispatcher.to_prepare do
- ActionController::Base.view_paths.each(&:new_request!)
- end
end
end
|
Handle class level view_path changes, this should also avaid some weirdness in ActionMailer.
|
diff --git a/business.gemspec b/business.gemspec
index abc1234..def5678 100644
--- a/business.gemspec
+++ b/business.gemspec
@@ -23,5 +23,5 @@ spec.add_development_dependency "gc_ruboconfig", "~> 2.24.0"
spec.add_development_dependency "rspec", "~> 3.1"
spec.add_development_dependency "rspec_junit_formatter", "~> 0.4.1"
- spec.add_development_dependency "rubocop", "~> 1.9.1"
+ spec.add_development_dependency "rubocop", "~> 1.10.0"
end
|
Update rubocop requirement from ~> 1.9.1 to ~> 1.10.0
Updates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/compare/v1.9.1...v1.10.0)
Signed-off-by: dependabot-preview[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@dependabot.com>
|
diff --git a/nexmo.gemspec b/nexmo.gemspec
index abc1234..def5678 100644
--- a/nexmo.gemspec
+++ b/nexmo.gemspec
@@ -15,7 +15,7 @@ s.require_path = 'lib'
if RUBY_VERSION == '1.8.7'
- s.add_development_dependency('minitest', '>= 4.2.0')
- s.add_development_dependency('json', '>= 1.6.5')
+ s.add_development_dependency('minitest', '~> 4.2.0')
+ s.add_development_dependency('json', '~> 1.6')
end
end
|
Fix gemspec for 1.8 rubies (minitest 5 clashes with mocha 0.13.2)
|
diff --git a/smail.gemspec b/smail.gemspec
index abc1234..def5678 100644
--- a/smail.gemspec
+++ b/smail.gemspec
@@ -3,7 +3,7 @@ s.version = "0.0.5"
s.author = "Matthew Walker"
s.email = "matthew@walker.wattle.id.au"
- s.homepage = "http://gemcutter.org/gems/smail"
+ s.homepage = "http://github.com/mwalker/smail"
s.summary = "A simple RFC2822 email parser"
s.files = ["lib/smail.rb", "lib/smail/header.rb", "lib/smail/parser.rb", "lib/smail/smail.rb", "lib/smail/version.rb"]
s.require_path = "lib"
|
Make github project page the homepage again.
|
diff --git a/spec/controllers/heartbeat_controller_spec.rb b/spec/controllers/heartbeat_controller_spec.rb
index abc1234..def5678 100644
--- a/spec/controllers/heartbeat_controller_spec.rb
+++ b/spec/controllers/heartbeat_controller_spec.rb
@@ -3,18 +3,6 @@ RSpec.describe HeartbeatController, type: :controller do
describe '#ping' do
- describe 'does not force ssl' do
- before do
- allow(Rails).to receive(:env).and_return(double(development?: false, production?: true))
- end
-
- it 'ping the endpoint' do
- get :ping
- expect(response.status).not_to eq(301)
- end
-
- end
-
it 'returns JSON with app information' do
get :ping
|
Remove SSL test, this is done at nginx lvl
|
diff --git a/lib/overlord/connection/finalized_connection.rb b/lib/overlord/connection/finalized_connection.rb
index abc1234..def5678 100644
--- a/lib/overlord/connection/finalized_connection.rb
+++ b/lib/overlord/connection/finalized_connection.rb
@@ -4,8 +4,8 @@
class FinalizedConnection < ConnectionState
def handle_input(input)
- command_context = CommandContext.new(@conn)
- Parser.parse(input, command_context)
+ command_context = CommandContext.new(enacting_connection_id: @conn.id, command: input)
+ Parser.parse(command_context)
end
end
|
Update FinalizedConnection to new CommandContext format
|
diff --git a/lib/travis/logs/services/partman_maintenance.rb b/lib/travis/logs/services/partman_maintenance.rb
index abc1234..def5678 100644
--- a/lib/travis/logs/services/partman_maintenance.rb
+++ b/lib/travis/logs/services/partman_maintenance.rb
@@ -37,7 +37,7 @@ end
private def db
- Travis::Logs.database_connection.db
+ @db ||= Travis::Logs::Database.create_sequel
end
private def statement_timeout_ms
|
Create separate sequel connection to avoid settings leakage
|
diff --git a/lib/ahoy_email/engine.rb b/lib/ahoy_email/engine.rb
index abc1234..def5678 100644
--- a/lib/ahoy_email/engine.rb
+++ b/lib/ahoy_email/engine.rb
@@ -13,7 +13,9 @@ app.config
end
- creds.respond_to?(:secret_key_base) ? creds.secret_key_base : creds.secret_token
+ token = creds.respond_to?(:secret_key_base) ? creds.secret_key_base : creds.secret_token
+ token ||= app.secret_key_base # should come first, but need to maintain backward compatibility
+ token
end
end
end
|
Improve token logic for ENV var
|
diff --git a/lib/akephalos/console.rb b/lib/akephalos/console.rb
index abc1234..def5678 100644
--- a/lib/akephalos/console.rb
+++ b/lib/akephalos/console.rb
@@ -2,7 +2,7 @@ # 3000.
def session
Capybara.app_host ||= "http://localhost:3000"
- @session ||= Capybara::Session.new(:Akephalos)
+ @session ||= Capybara::Session.new(:akephalos)
end
alias page session
|
Use new registration name in bin/akephalos
|
diff --git a/Casks/clion-eap.rb b/Casks/clion-eap.rb
index abc1234..def5678 100644
--- a/Casks/clion-eap.rb
+++ b/Casks/clion-eap.rb
@@ -1,6 +1,6 @@ cask :v1 => 'clion-eap' do
- version '142.4859.12'
- sha256 'eb0eda15a615aea33a43acbb0efd23e24049e041aed68711f6e0319d0c987c93'
+ version '142.5047.10'
+ sha256 '2771157f117d455dd56051831bfcd9899ca1080a1b389cee89a177e7282bebef'
url "https://download.jetbrains.com/cpp/CLion-#{version}-custom-jdk-bundled.dmg"
name 'CLion'
|
Upgrade CLion EAP to v142.5047.10
|
diff --git a/config/unicorn.rb b/config/unicorn.rb
index abc1234..def5678 100644
--- a/config/unicorn.rb
+++ b/config/unicorn.rb
@@ -1,7 +1,7 @@ # config/unicorn.rb
worker_processes Integer(ENV['WEB_CONCURRENCY'] || 3)
-timeout Integer(ENV['WEB_TIMEOUT'] || 30)
+timeout Integer(ENV['WEB_TIMEOUT'] || 25)
preload_app true
before_fork do |server, worker|
|
Set timeout limit to 25s
|
diff --git a/src/cookbooks/base_windows/recipes/default.rb b/src/cookbooks/base_windows/recipes/default.rb
index abc1234..def5678 100644
--- a/src/cookbooks/base_windows/recipes/default.rb
+++ b/src/cookbooks/base_windows/recipes/default.rb
@@ -7,11 +7,6 @@ # Copyright 2017, P. van der Velde
#
-# Always make sure that apt is up to date
-apt_update 'update' do
- action :update
-end
-
#
# Include the local recipes
#
@@ -19,8 +14,17 @@ include_recipe 'base_windows::filesystem'
include_recipe 'base_windows::firewall'
+include_recipe 'base_windows::meta'
+
+include_recipe 'base_windows::seven_zip'
+include_recipe 'base_windows::winsw'
+
include_recipe 'base_windows::consul'
include_recipe 'base_windows::consul_template'
+
include_recipe 'base_windows::system'
+include_recipe 'base_windows::system_logs'
+include_recipe 'base_windows::system_metrics'
+
include_recipe 'base_windows::network'
include_recipe 'base_windows::provisioning'
|
Set all the recipes to be called in the right order
|
diff --git a/lib/dimples/frontable.rb b/lib/dimples/frontable.rb
index abc1234..def5678 100644
--- a/lib/dimples/frontable.rb
+++ b/lib/dimples/frontable.rb
@@ -3,7 +3,7 @@ module Dimples
# A mixin class that handles reading and parsing front matter from a file.
module Frontable
- METADATA_KEYS = %w[title layout extension summary categories].freeze
+ SKIPPED_METADATA_KEYS = %w[site path contents].freeze
def read_with_front_matter
@contents = File.read(@path)
@@ -11,10 +11,8 @@ matches = @contents.match(/^(-{3}\n.*?\n?)^(-{3}*$\n?)/m)
return if matches.nil?
- metadata = YAML.safe_load(matches[1])
-
- metadata.each_pair do |key, value|
- if METADATA_KEYS.include?(key) && respond_to?("#{key}=")
+ YAML.safe_load(matches[1]).each_pair do |key, value|
+ if !SKIPPED_METADATA_KEYS.include?(key) && respond_to?("#{key}=")
send("#{key}=", value)
end
end
|
Switch to a blacklist for metadata keys.
|
diff --git a/Formula/liftoff.rb b/Formula/liftoff.rb
index abc1234..def5678 100644
--- a/Formula/liftoff.rb
+++ b/Formula/liftoff.rb
@@ -8,7 +8,7 @@ depends_on 'xcproj' => :recommended
def install
- opoo 'This tap for Liftoff has been deprecated and will no longer be updated! Please move to the new tap at liftoffcli/formula as soon as possible.'
+ opoo 'This tap for Liftoff has been deprecated and will no longer be updated! Please move to the new tap at liftoffcli/formulae as soon as possible.'
prefix.install 'defaults', 'templates', 'vendor'
prefix.install 'lib' => 'rubylib'
|
Fix typo in repo name
|
diff --git a/Framezilla.podspec b/Framezilla.podspec
index abc1234..def5678 100644
--- a/Framezilla.podspec
+++ b/Framezilla.podspec
@@ -11,5 +11,5 @@
spec.ios.deployment_target = '8.4'
spec.source = { git: "https://github.com/Otbivnoe/Framezilla.git", tag: "#{spec.version}"}
- spec.source_files = "Sources/**/*.{h,swift}"
+ spec.source_files = "Sources/*.{h,swift}"
end
|
Change podspec file / spec.source_files
|
diff --git a/app/api/pushificator/v1.rb b/app/api/pushificator/v1.rb
index abc1234..def5678 100644
--- a/app/api/pushificator/v1.rb
+++ b/app/api/pushificator/v1.rb
@@ -40,9 +40,9 @@
def current_user
# Find token. Check if valid.
- token = ::ApiKey.where(access_token: params[:token]).first
- if token && !token.expired?
- @current_user = ::User.find(token.user_id)
+ apikey = ::ApiKey.where(access_token: params[:token]).first
+ if apikey && !apikey.expired? && apikey.active
+ @current_user = ::User.find(apikey.user_id)
else
false
end
|
Add active in apikey validation
|
diff --git a/heroku-request-id.gemspec b/heroku-request-id.gemspec
index abc1234..def5678 100644
--- a/heroku-request-id.gemspec
+++ b/heroku-request-id.gemspec
@@ -10,7 +10,7 @@ spec.email = ["jeremy@octolabs.com"]
spec.description = %q{Simple Rack middleware to log the heroku request id and write it to the end of html requests. Both optionally, of course.}
spec.summary = %q{Simple Rack middleware to log the heroku request id and write it to the end of html requests. Both optionally, of course.}
- spec.homepage = ""
+ spec.homepage = "https://github.com/Octo-Labs/heroku-request-id"
spec.license = "MIT"
spec.files = `git ls-files`.split($/)
|
Add github repo to gemspec as the homepage.
|
diff --git a/app/models/github_issue.rb b/app/models/github_issue.rb
index abc1234..def5678 100644
--- a/app/models/github_issue.rb
+++ b/app/models/github_issue.rb
@@ -11,6 +11,11 @@ scope :locked, -> { where(locked: true) }
scope :unlocked, -> { where(locked: false) }
scope :actionable, -> { open.issue.unlocked }
+
+ def url
+ path = pull_request ? 'pull' : 'issues'
+ "#{github_repository.url}/#{path}/#{number}"
+ end
def github_client(token = nil)
AuthToken.fallback_client(token)
|
Add url method to github issues
Fixes #567
|
diff --git a/app/models/news_edition.rb b/app/models/news_edition.rb
index abc1234..def5678 100644
--- a/app/models/news_edition.rb
+++ b/app/models/news_edition.rb
@@ -13,6 +13,8 @@
attaches :image
+ attaches :video
+
def whole_body
body
end
|
Add video asset to news items
|
diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb
index abc1234..def5678 100644
--- a/config/initializers/secret_token.rb
+++ b/config/initializers/secret_token.rb
@@ -9,4 +9,4 @@
# Make sure your secret_key_base is kept private
# if you're sharing your code publicly.
-Directory::Application.config.secret_key_base = ''
+Directory::Application.config.secret_key_base = 'REPLACE_WITH_A_REAL_SECRET_TOKEN'
|
Add a dummy string as a secret token
|
diff --git a/test/functional/campaign_controller_test.rb b/test/functional/campaign_controller_test.rb
index abc1234..def5678 100644
--- a/test/functional/campaign_controller_test.rb
+++ b/test/functional/campaign_controller_test.rb
@@ -42,4 +42,8 @@ assert_response :success
end
+ should "load the business support campaign" do
+ get :business_support
+ assert_response :success
+ end
end
|
Add a functional test for the business support campaign page
|
diff --git a/Casks/stay.rb b/Casks/stay.rb
index abc1234..def5678 100644
--- a/Casks/stay.rb
+++ b/Casks/stay.rb
@@ -10,4 +10,9 @@ license :commercial
app 'Stay.app'
+
+ postflight do
+ # Don't ask to move the app bundle to /Applications
+ suppress_move_to_applications
+ end
end
|
Remove question about moving Stay to /Applications
|
diff --git a/lib/nehm/path_manager.rb b/lib/nehm/path_manager.rb
index abc1234..def5678 100644
--- a/lib/nehm/path_manager.rb
+++ b/lib/nehm/path_manager.rb
@@ -14,7 +14,7 @@
def self.get_path(path)
unless Dir.exist?(path)
- UI.warning "This directory doesn't exist."
+ UI.warning "Directory #{path} doesn't exist."
wish = UI.ask('Want to create it? (Y/n):')
wish = 'y' if wish == ''
|
Make clarification in PathManager clearer
|
diff --git a/test/gir_ffi/receiver_argument_info_test.rb b/test/gir_ffi/receiver_argument_info_test.rb
index abc1234..def5678 100644
--- a/test/gir_ffi/receiver_argument_info_test.rb
+++ b/test/gir_ffi/receiver_argument_info_test.rb
@@ -0,0 +1,32 @@+# frozen_string_literal: true
+require 'gir_ffi_test_helper'
+require 'gir_ffi/receiver_argument_info'
+
+describe GirFFI::ReceiverArgumentInfo do
+ let(:dummy_type) { 'foo' }
+ let(:instance) { GirFFI::ReceiverArgumentInfo.new dummy_type}
+
+ describe '#argument_type' do
+ it 'returns the argument type' do
+ instance.argument_type.must_equal dummy_type
+ end
+ end
+
+ describe '#direction' do
+ it 'returns the correct value' do
+ instance.direction.must_equal :in
+ end
+ end
+
+ describe '#ownership_transfer' do
+ it 'returns the correct value' do
+ instance.ownership_transfer.must_equal :everything
+ end
+ end
+
+ describe '#name' do
+ it 'returns the correct value' do
+ instance.name.must_equal '_instance'
+ end
+ end
+end
|
Add unit tests for ReceiverArgumentInfo
|
diff --git a/test/controllers/authentication/registrations_controller_test.rb b/test/controllers/authentication/registrations_controller_test.rb
index abc1234..def5678 100644
--- a/test/controllers/authentication/registrations_controller_test.rb
+++ b/test/controllers/authentication/registrations_controller_test.rb
@@ -34,9 +34,9 @@ sign_up_request
end
- mail = ActionMailer::Base.deliveries.first
+ mail = ActionMailer::Base.deliveries.last
assert_equal User.administrators.pluck(:email), mail.to
- assert_equal 'New sign up', mail.subject
+ assert_equal 'New registration', mail.subject
end
end
end
|
Check last mail in deliveries instead of first cause it's appended not prepended.
|
diff --git a/roles/os-network.rb b/roles/os-network.rb
index abc1234..def5678 100644
--- a/roles/os-network.rb
+++ b/roles/os-network.rb
@@ -2,5 +2,9 @@ description "Configures OpenStack networking, managed by attribute for either nova-network or quantum"
run_list(
"role[os-base]",
- "recipe[openstack-network::common]"
+ "recipe[openstack-network::identity_registration]",
+ "recipe[openstack-network::server]",
+ "recipe[openstack-network::openvswitch]",
+ "recipe[openstack-network::l3_agent]",
+ "recipe[openstack-network::dhcp_agent]"
)
|
Enable all of the services required for networking.
This will probably get refactored later into more roles.
Change-Id: I303edfc8db1237acf507b0d5fe886dc66e0baeee
|
diff --git a/lib/parsley_simple_form/simple_form_adapt.rb b/lib/parsley_simple_form/simple_form_adapt.rb
index abc1234..def5678 100644
--- a/lib/parsley_simple_form/simple_form_adapt.rb
+++ b/lib/parsley_simple_form/simple_form_adapt.rb
@@ -1,6 +1,10 @@+# Provide a custom class of SimpleForm
module ParsleySimpleForm
class SimpleFormAdapt < SimpleForm::FormBuilder
+ map_type :presence_validation, to: ParsleySimpleForm::Validators::Presence
+ map_type :length_validation, to: ParsleySimpleForm::Validators::Length
+ # Add parsley attributes validation
def input(attribute_name, options = {}, &block)
options[:input_html] ||= {}
parsley_validations = validations_for(attribute_name)
@@ -19,8 +23,18 @@ end
end
+ # This method will search get custom method, whether don't find get validation from ParsleySimpleForm
def validate_constantize(validate_kind)
- ('parsley_simple_form/validators/' + validate_kind.to_s).camelize.constantize rescue false
+ get_custom_validation(validate_kind) || mappings["#{validate_kind}_validation".to_sym] || false
+ end
+
+ def get_custom_validation(klass)
+ camelized = klass.to_s.camelize
+ begin
+ Object.const_get(camelized)
+ rescue
+ false
+ end
end
def object_class
|
Add documentation SimpleFormAdapt; Add ability to search custom validation;
|
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
@@ -1,5 +1,7 @@ # frozen_string_literal: true
class SearchController < ApplicationController
+ include StringUtils
+
# GET /search
def search
@search = true
@@ -8,7 +10,7 @@
@id = params[:woeid_code]
- if @id.nil?
+ if !positive_integer?(@id)
redirect_to root_path, alert: I18n.t('nlt.no_location_specified')
else
@woeid = WoeidHelper.convert_woeid_name @id
|
Handle bad url error in errbit
In particular, this query string
`ad_type='2&q='Bolso+(coslada)&woeid='766273`.
No idea where it comes from but let's just handle it gracefully and not
crash.
|
diff --git a/sinatra-redis-cache.gemspec b/sinatra-redis-cache.gemspec
index abc1234..def5678 100644
--- a/sinatra-redis-cache.gemspec
+++ b/sinatra-redis-cache.gemspec
@@ -1,6 +1,6 @@ Gem::Specification.new do |s|
s.name = 'sinatra-redis-cache'
- s.version = '0.1'
+ s.version = '0.1.1'
s.licenses = ['MIT']
s.summary = 'A simple redis backed cache for Sinatra'
s.description = 'A simple redis backed cache for Sinatra'
@@ -8,7 +8,7 @@ s.email = 'warren@guy.net.au'
s.homepage = 'https://github.com/warrenguy/sinatra-redis-cache'
- s.files = Dir['README.md', 'lib/**/*']
+ s.files = Dir['README.md', 'LICENSE', 'Rakefile', 'lib/**/*']
s.add_dependency('sinatra', '~> 1.3')
s.add_dependency('rake', '~> 10.0')
|
Add Rakefile to the gem, oops. Bump version to 0.1.1
|
diff --git a/lib/tasks/live_flag.rake b/lib/tasks/live_flag.rake
index abc1234..def5678 100644
--- a/lib/tasks/live_flag.rake
+++ b/lib/tasks/live_flag.rake
@@ -0,0 +1,13 @@+namespace :live_flag do
+ task :populate => :environment do
+ # Disable the search observer to avoid a mass update of Rummager
+ Artefact.observers.disable :update_search_observer do
+ Artefact.where(:owning_app.ne => "publisher").
+ update_all({"$set" => { live: true }})
+ Artefact.where(owning_app: "publisher").each do |artefact|
+ artefact.live = artefact.any_editions_published?
+ artefact.save!
+ end
+ end
+ end
+end
|
Add a task to populate the artefact 'live' flag.
|
diff --git a/spec/acceptance/organizer/around_each_with_reduce_if_spec.rb b/spec/acceptance/organizer/around_each_with_reduce_if_spec.rb
index abc1234..def5678 100644
--- a/spec/acceptance/organizer/around_each_with_reduce_if_spec.rb
+++ b/spec/acceptance/organizer/around_each_with_reduce_if_spec.rb
@@ -0,0 +1,42 @@+require 'spec_helper'
+require 'test_doubles'
+
+RSpec.describe LightService::Organizer do
+ class TestReduceIfWithAroundEach
+ extend LightService::Organizer
+
+ def self.call(context)
+ with(context)
+ .around_each(TestDoubles::AroundEachLoggerHandler)
+ .reduce(actions)
+ end
+
+ def self.actions
+ [
+ TestDoubles::AddOneAction,
+ reduce_if(->(ctx) { ctx.number == 1 },
+ TestDoubles::AddOneAction)
+ ]
+ end
+ end
+
+ it 'can be used to log data' do
+ result =
+ TestReduceIfWithAroundEach
+ .call(:number => 0,
+ :logger => TestDoubles::TestLogger.new)
+
+ expect(result.fetch(:number)).to eq(2)
+ expect(result[:logger].logs).to eq(
+ [{
+ :action => TestDoubles::AddOneAction,
+ :before => 0,
+ :after => 1
+ }, {
+ :action => TestDoubles::AddOneAction,
+ :before => 1,
+ :after => 2
+ }]
+ )
+ end
+end
|
Test around_each logic with special organizer constructs
|
diff --git a/prius.gemspec b/prius.gemspec
index abc1234..def5678 100644
--- a/prius.gemspec
+++ b/prius.gemspec
@@ -21,5 +21,5 @@ spec.required_ruby_version = ">= 2.2"
spec.add_development_dependency "rspec", "~> 3.1"
- spec.add_development_dependency "rubocop", "~> 0.51.0"
+ spec.add_development_dependency "rubocop", "~> 0.52.0"
end
|
Update rubocop requirement to ~> 0.52.0
Updates the requirements on [rubocop](https://github.com/bbatsov/rubocop) to permit the latest version.
- [Release notes](https://github.com/bbatsov/rubocop/releases)
- [Changelog](https://github.com/bbatsov/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bbatsov/rubocop/commits/v0.52.0)
|
diff --git a/lib/travis/config/url.rb b/lib/travis/config/url.rb
index abc1234..def5678 100644
--- a/lib/travis/config/url.rb
+++ b/lib/travis/config/url.rb
@@ -18,6 +18,7 @@ super.reject { |key, value| key == :database }.merge(vhost: vhost)
end
end
+ Amqps = Amqp
class << self
def parse(url)
@@ -31,6 +32,7 @@ string.to_s.split('_').collect(&:capitalize).join
end
end
+
end
end
end
|
Patch in AMQPS support for travis-config
|
diff --git a/lib/overcommit/hook/pre_commit/author_name.rb b/lib/overcommit/hook/pre_commit/author_name.rb
index abc1234..def5678 100644
--- a/lib/overcommit/hook/pre_commit/author_name.rb
+++ b/lib/overcommit/hook/pre_commit/author_name.rb
@@ -7,8 +7,8 @@
unless name.split(' ').count >= 2
return :fail,
- "Author must have at least first and last name, but was: #{name}." \
- '\nSet your name with `git config --global user.name "Your Name"`'
+ "Author must have at least first and last name, but was: #{name}.\n" \
+ 'Set your name with `git config --global user.name "Your Name"`'
end
:pass
|
Fix unescaped newline in single-quoted string
|
diff --git a/app/workers/publishing_api_worker.rb b/app/workers/publishing_api_worker.rb
index abc1234..def5678 100644
--- a/app/workers/publishing_api_worker.rb
+++ b/app/workers/publishing_api_worker.rb
@@ -7,13 +7,17 @@ presenter = PublishingApiPresenters.presenter_for(model, update_type: update_type)
I18n.with_locale(locale) do
- Whitehall.publishing_api_client.put_content_item(
- presenter.base_path,
- presenter.as_json)
+ send_item(presenter.base_path, presenter.as_json)
end
end
+
+ private
def class_for(model_name)
model_name.constantize
end
+
+ def send_item(base_path, content)
+ Whitehall.publishing_api_client.put_content_item(base_path, content)
+ end
end
|
Allow overriding of action in PublishingApiWorker
|
diff --git a/api/app/controllers/spree/api/v1/inventory_units_controller.rb b/api/app/controllers/spree/api/v1/inventory_units_controller.rb
index abc1234..def5678 100644
--- a/api/app/controllers/spree/api/v1/inventory_units_controller.rb
+++ b/api/app/controllers/spree/api/v1/inventory_units_controller.rb
@@ -34,7 +34,7 @@
unless inventory_unit.respond_to?(can_event) &&
inventory_unit.send(can_event)
- render :text => { exception: "cannot transition to #{@event}" }.to_json,
+ render :text => { :exception => "cannot transition to #{@event}" }.to_json,
:status => 200
false
end
|
[api] Convert 1.9 hash syntax to hashrocket syntax within inventory_units
controller
Fixes #2398
Fixes #2400
|
diff --git a/config/config.rb b/config/config.rb
index abc1234..def5678 100644
--- a/config/config.rb
+++ b/config/config.rb
@@ -9,8 +9,8 @@ config.plugin_paths = ["#{PE_PATH}/vendor/plugins","#{RAILS_ROOT}/vendor/plugins"]
config.gem_paths = ["#{PE_PATH}/vendor/gems"]
- # config.gem "geokit"
- # config.gem "sinatra"
+ config.gem "geokit"
+ config.gem "sinatra"
config.gem "libxml-bindings"
config.gem "uuidtools"
|
Disable dependencies plugin (should be branched instead)
|
diff --git a/config/deploy.rb b/config/deploy.rb
index abc1234..def5678 100644
--- a/config/deploy.rb
+++ b/config/deploy.rb
@@ -18,19 +18,9 @@ task :restart do
on roles(:app), in: :sequence, wait: 5 do
# Your restart mechanism here, for example:
- # execute :touch, release_path.join('tmp/restart.txt')
+ invoke 'unicorn:restart'
end
end
after :publishing, :restart
-
- after :restart, :clear_cache do
- on roles(:web), in: :groups, limit: 3, wait: 10 do
- # Here we can do anything such as:
- # within release_path do
- # execute :rake, 'cache:clear'
- # end
- end
- end
-
end
|
Add actual restart step for Capistrano
|
diff --git a/lib/puppet/provider/rabbitmq_erlang_cookie/ruby.rb b/lib/puppet/provider/rabbitmq_erlang_cookie/ruby.rb
index abc1234..def5678 100644
--- a/lib/puppet/provider/rabbitmq_erlang_cookie/ruby.rb
+++ b/lib/puppet/provider/rabbitmq_erlang_cookie/ruby.rb
@@ -3,14 +3,6 @@ Puppet::Type.type(:rabbitmq_erlang_cookie).provide(:ruby) do
defaultfor :feature => :posix
-
- env_path = '/opt/puppetlabs/bin:/usr/local/bin:/usr/bin:/bin'
- puppet_path = Puppet::Util.withenv(:PATH => env_path) do
- Puppet::Util.which('puppet')
- end
-
- confine :false => puppet_path.nil?
- has_command(:puppet, puppet_path) unless puppet_path.nil?
def exists?
# Hack to prevent the create method from being called.
@@ -20,7 +12,7 @@
def content=(value)
if resource[:force] == :true # Danger!
- puppet('resource', 'service', resource[:service_name], 'ensure=stopped')
+ Puppet::Type.type(:service).new(:name => resource[:service_name], :ensure => 'stopped')
FileUtils.rm_rf(resource[:rabbitmq_home] + File::SEPARATOR + 'mnesia')
File.open(resource[:path], 'w') do |cookie|
cookie.chmod(0400)
@@ -28,7 +20,7 @@ end
FileUtils.chown(resource[:rabbitmq_user], resource[:rabbitmq_group], resource[:path])
else
- fail("The current erlang cookie needs to change. In order to do this the RabbitMQ database needs to be wiped. Please set force => true to allow this to happen automatically.")
+ fail('The current erlang cookie needs to change. In order to do this the RabbitMQ database needs to be wiped. Please set force => true to allow this to happen automatically.')
end
end
|
Fix rabbitmq_erlang_cookie provider under rbenv
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index abc1234..def5678 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -11,6 +11,8 @@ ENV['MONGOID_ENV'] = "test"
RSpec.configure do |config|
+ Mongo::Logger.logger.level = Logger::ERROR
+
config.include Mongoid::Matchers
config.before(:suite) do
DatabaseCleaner.strategy = :truncation
@@ -23,11 +25,5 @@ end
Mongoid.configure do |config|
- config.sessions = {
- default: {
- database: "mongoid_token_test",
- hosts: [ "localhost:#{ENV['BOXEN_MONGODB_PORT'] || 27017}" ],
- options: {}
- }
- }
+ config.connect_to("mongoid_token_test", {})
end
|
Remove deprecated way of setting up database
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index abc1234..def5678 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -3,7 +3,6 @@ require 'finland'
Finland.index_location = "index.txt"
-Finland.observed_dirs << Pathname(__FILE__).join('../../lib').to_s
RSpec.configure do |c|
c.around(:each) do |example|
|
Use default observed dirs instead of configuring
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index abc1234..def5678 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,6 +1,8 @@ $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'juggler'
+
+Juggler.logger.level = Logger::FATAL
require 'em-spec/rspec'
|
Remove logging output from tests
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index abc1234..def5678 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -5,7 +5,6 @@
RSpec.configure do |config|
config.color_enabled = true
- config.debug = true
config.filter_run :focus => true
config.run_all_when_everything_filtered = true
|
Remove debug from the spec config.
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index abc1234..def5678 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -8,15 +8,15 @@ RAILS_ROOT = "#{dir}/rails_root"
RAILS_DEFAULT_LOGGER = Logger.new(StringIO.new(""))
-require "test/unit"
+require "active_support"
+require "initializer"
+require "action_controller"
+
require "spec"
require "rr"
require "pp"
-require "active_support"
-require "initializer"
-require "action_controller"
+
require "desert"
-require "ruby-debug"
require "spec/spec_helpers/remove_project_constants_helper"
require "spec/spec_helpers/manager_fixture"
require "spec/spec_helpers/mock_connection"
|
Remove extraneous require to test/unit
git-svn-id: 982b67ca69bd6fc3726bc0f9388c1d3710924df8@1185 af276e61-6b34-4dac-905b-574b5f35ef33
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index abc1234..def5678 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,9 +1,16 @@ $LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+require 'rubygems'
+require 'ticketmaster'
require 'ticketmaster-github'
+require 'active_resource/http_mock'
require 'spec'
require 'spec/autorun'
Spec::Runner.configure do |config|
-
+
end
+
+def fixture_for(name)
+ File.read(File.dirname(__FILE__) + '/fixtures/' + name + '.xml')
+end
|
Add require gems, and fixtures path
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index abc1234..def5678 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,2 +1,5 @@ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
+require 'coveralls'
+Coveralls.wear!
+
require 'optioneer'
|
Add coveralls.io stats to gem
Signed-off-by: Seapagan <4ab1b2fdb7784a8f9b55e81e3261617f44fd0585@gmail.com>
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index abc1234..def5678 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -24,8 +24,8 @@ puppetversion: Puppet.version,
facterversion: Facter.version
}
- default_facts.merge!(YAML.load(File.read(File.expand_path('../default_facts.yml', __FILE__)))) if File.exist?(File.expand_path('../default_facts.yml', __FILE__))
- default_facts.merge!(YAML.load(File.read(File.expand_path('../default_module_facts.yml', __FILE__)))) if File.exist?(File.expand_path('../default_module_facts.yml', __FILE__))
+ default_facts.merge!(YAML.safe_load(File.read(File.expand_path('../default_facts.yml', __FILE__)))) if File.exist?(File.expand_path('../default_facts.yml', __FILE__))
+ default_facts.merge!(YAML.safe_load(File.read(File.expand_path('../default_module_facts.yml', __FILE__)))) if File.exist?(File.expand_path('../default_module_facts.yml', __FILE__))
c.default_facts = default_facts
end
|
Fix for Security/YAMLLoad rubocop warning
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.