diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/app/views/courses/course.json.jbuilder b/app/views/courses/course.json.jbuilder
index abc1234..def5678 100644
--- a/app/views/courses/course.json.jbuilder
+++ b/app/views/courses/course.json.jbuilder
@@ -13,7 +13,7 @@ json.edited_count number_to_human @course.article_count
json.edit_count number_to_human @course.revisions.count
json.student_count @course.user_count
- json.trained_count @course.students.trained.count
+ json.trained_count @course.students_without_instructor_students.trained.count
json.character_count number_to_human @course.character_sum
json.view_count number_to_human @course.view_sum
|
Update course header stats to use students_without_instructor_students
|
diff --git a/lib/torkify.rb b/lib/torkify.rb
index abc1234..def5678 100644
--- a/lib/torkify.rb
+++ b/lib/torkify.rb
@@ -1,4 +1,5 @@ require "torkify/version"
+require 'log4r'
# Listen to tork events and execute ruby code when they happen.
#
@@ -15,6 +16,7 @@ # # or listener.start_loop
# # or listener.start_with_tork
module Torkify
+ include Log4r
# Create a listener object and load all required files.
def self.listener(*args)
@@ -26,9 +28,6 @@ #
# Uses Log4r.
def self.logger
- require 'log4r'
- include Log4r
-
log = Logger['torkify']
unless log
log = Logger.new 'torkify'
|
Move file require out of method
|
diff --git a/language/file_spec.rb b/language/file_spec.rb
index abc1234..def5678 100644
--- a/language/file_spec.rb
+++ b/language/file_spec.rb
@@ -6,18 +6,32 @@ it "equals the current filename" do
File.basename(__FILE__).should == "file_spec.rb"
end
-
- it "equals the full path to the file when required" do
- $:.unshift File.dirname(__FILE__) + '/fixtures'
- begin
- require 'file.rb'
- ScratchPad.recorded.should == File.dirname(__FILE__) + '/fixtures/file.rb'
- ensure
- $:.shift
- end
- end
it "equals (eval) inside an eval" do
eval("__FILE__").should == "(eval)"
end
+
+ it "equals a relative path when required using a relative path" do
+ path = "language/fixtures/file.rb"
+ require path
+ ScratchPad.recorded.should == "./#{path}"
+ end
end
+
+
+describe "The __FILE__ constant" do
+ before(:each) do
+ path = fixture(__FILE__,"file.rb")
+ #puts "@@@@ Path is #{path} for fixture(#{__FILE__},'file.rb')"
+ $:.unshift File.dirname(path)
+ end
+ after(:each) do
+ $:.shift
+ end
+
+ it "equals the full path to the file when required" do
+ require 'file.rb'
+ ScratchPad.recorded.should == fixture(__FILE__, 'file.rb')
+ end
+
+end
|
Correct load path expectation and add relative path expectation for __FILE__
|
diff --git a/lib/foreman/kicker.rb b/lib/foreman/kicker.rb
index abc1234..def5678 100644
--- a/lib/foreman/kicker.rb
+++ b/lib/foreman/kicker.rb
@@ -23,6 +23,18 @@ @watchdog.start(*args.map(&:to_s))
end
+ def self.wait
+ loop do
+ begin
+ TCPSocket.open('127.0.0.1', self.port).close
+ break
+ rescue Errno::ECONNREFUSED
+ sleep 0.1
+ # ignored
+ end
+ end
+ end
+
def self.stop
@watchdog.stop
end
|
Add feature to wait until socket is open
|
diff --git a/db/migrate/20130703124306_add_archived_field_to_products.rb b/db/migrate/20130703124306_add_archived_field_to_products.rb
index abc1234..def5678 100644
--- a/db/migrate/20130703124306_add_archived_field_to_products.rb
+++ b/db/migrate/20130703124306_add_archived_field_to_products.rb
@@ -0,0 +1,9 @@+class AddArchivedFieldToProducts < ActiveRecord::Migration
+ def self.up
+ add_column :products, :archived, :boolean, :default => false
+ end
+
+ def self.down
+ remove_column :products, :archived
+ end
+end
|
Add archived field to products
|
diff --git a/lib/mips/assembler.rb b/lib/mips/assembler.rb
index abc1234..def5678 100644
--- a/lib/mips/assembler.rb
+++ b/lib/mips/assembler.rb
@@ -22,9 +22,8 @@ line.sub!(/#*/, "") # Remove comments.
line.strip!
- read_tag line
- return if line.empty? # Tag line.
-
+ line = read_tag(line)
+ return if line.empty? # Tag line, @current_addr stays the same.
end
@@ -41,6 +40,8 @@ fail MIPSSyntaxError, "Redeclaration of tag `#{tag}`"
else
@symbol_table[tag] = @current_addr
+ rest
end
+ end
end
end
|
Fix small bug in read_tag.
|
diff --git a/lib/mips/assembler.rb b/lib/mips/assembler.rb
index abc1234..def5678 100644
--- a/lib/mips/assembler.rb
+++ b/lib/mips/assembler.rb
@@ -1,12 +1,8 @@ module MIPS
+ SYNTAX = /^\s*((?<tag>[a-zA-Z]\w*)\s*:\s*)?((?<cmd>[a-z]+)\s*((?<arg1>\$?\w+)\s*(,\s*((?<arg2>\$?\w+)|((?<offset>\d+)\(\s*(?<arg2>\$\w+)\s*\)))\s*(,\s*(?<arg3>\$?\w+)\s*)?)?)?)?(#.*)?$/
+
+ # Represent a MIPS syntax error
class MIPSSyntaxError < StandardError
- def initialize(msg)
- @msg = msg
- end
-
- def to_s
- msg
- end
end
# Assembly MIPS codes into machine codes.
@@ -18,30 +14,33 @@ @current_addr = 0x0
end
- def assembly(line)
- line.sub!(/#*/, "") # Remove comments.
- line.strip!
-
- line = read_tag(line)
- return if line.empty? # Tag line, @current_addr stays the same.
-
+ def assembly(src)
+ src.each_line do |line|
+ fail MIPSSyntaxError, "#{line}: Syntax error." unless SYNTAX =~ line
+ read_tag tag
+ end
end
- def self.assembly(line)
- new.assembly(line)
+ def self.assembly(src)
+ new.assembly(src)
end
private
- def read_tag(line)
- return unless /^(?<tag>[a-zA-Z]\w*)\s*:\s*(?<rest>.*)/ =~ line
+ def read_tag(tag)
+ return if tag.nil? # No tag.
if @symbol_table.include? tag
fail MIPSSyntaxError, "Redeclaration of tag `#{tag}`"
else
@symbol_table[tag] = @current_addr
- rest
end
+ end
+
+ def parse_register
+ end
+
+ def parse_tag
end
end
end
|
Use regex to define syntax
|
diff --git a/app/controllers/spree/wished_products_controller.rb b/app/controllers/spree/wished_products_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/spree/wished_products_controller.rb
+++ b/app/controllers/spree/wished_products_controller.rb
@@ -19,7 +19,7 @@
def update
@wished_product = Spree::WishedProduct.find(params[:id])
- @wished_product.update_attributes(wished_product_attibutes)
+ @wished_product.update_attributes(wished_product_attributes)
respond_with(@wished_product) do |format|
format.html { redirect_to wishlist_url(@wished_product.wishlist) }
|
Fix typo for wished_product_attributes within WishedProductsController
Fixes #54
|
diff --git a/lib/isurvey.rb b/lib/isurvey.rb
index abc1234..def5678 100644
--- a/lib/isurvey.rb
+++ b/lib/isurvey.rb
@@ -1,30 +1,98 @@ require "isurvey/version"
module Isurvey
- attr_accessor :company_identifier, :survey_password
+ class SOAPClient
+ attr_accessor :company_identifier, :survey_password
- def savon_client
- @savon_client ||= Savon.client(
- wsdl: "https://isurveysoft.com/servicesv3/exportservice.asmx?WSDL"
- )
+ def self.savon_client
+ @savon_client ||= Savon.client(
+ wsdl: "https://isurveysoft.com/servicesv3/exportservice.asmx?WSDL"
+ )
+ end
+
+ def self.savon_call(operation)
+ self.savon_client.call(
+ operation,
+ message:
+ {
+ cp: company_identifier,
+ sp: survey_password
+ }
+ )
+ end
+
+ def self.export_survey
+ @export_survey ||= self.savon_call(:export_survey)
+ end
+
+ def self.export_survey_results
+ @export_survey_results ||= self.savon_call(:export_survey_results)
+ end
end
- def savon_call(operation)
- self.savon_client.call(
- operation,
- message:
- {
- cp: company_identifier,
- sp: survey_password
- }
- )
+ class API
+ def self.questions
+ unless @questions
+ @questions = []
+ screens.each do |question|
+ @questions << question
+ end
+ end
+ @questions
+ end
+
+ def self.result_ids
+ unless @result_ids
+ @result_ids = []
+ survey_results.each do |result|
+ @result_ids << result[:result_id]
+ end
+ end
+ @result_ids
+ end
+
+
+ def self.question_by_screen_id(id)
+ screens.each do |question|
+ if question[:screen_id] == id
+ return question[:screen_text]
+ end
+ end
+ end
+
+ def self.answer_by_screen_and_result_id(options)
+ answers_by_result_id(options[:result_id]) & answers_by_screen_id(options[:screen_id])
+ end
+
+ def self.answers_by_result_id(id)
+ survey_results.each do |result|
+ if result[:result_id] == id
+ return result[:screen_results][:result]
+ end
+ end
+ end
+
+ def self.answers_by_screen_id(id)
+ @answers = []
+ survey_results.each do |result|
+ result[:screen_results][:result].each do |question|
+ @answers << question if question[:screen_id] == id
+ end
+ end
+ @answers
+ end
end
- def export_survey
- @export_survey ||= self.savon_call(:export_survey)
+ private
+ def self.survey
+ SOAPClient.export_survey.body[:export_survey_response][:export_survey_result]
end
- def export_survey_results
- @export_survey_results ||= self.savon_call(:export_survey_results)
+ def self.survey_results
+ SOAPClient.export_survey_results.body[:export_survey_results_response][:export_survey_results_result][:survey_result]
+ end
+
+ def self.screens
+ survey[:screens][:screen]
end
end
|
Add question and answer wrappers
|
diff --git a/lib/simple_segment.rb b/lib/simple_segment.rb
index abc1234..def5678 100644
--- a/lib/simple_segment.rb
+++ b/lib/simple_segment.rb
@@ -1,5 +1,6 @@ require 'net/http'
require 'json'
+require 'time'
require 'simple_segment/version'
require 'simple_segment/client'
|
Make sure Time extensions are loaded
Time::iso8601 was not available in some cases when 'time' was not already
required, closes #17
|
diff --git a/lib/trello_standup.rb b/lib/trello_standup.rb
index abc1234..def5678 100644
--- a/lib/trello_standup.rb
+++ b/lib/trello_standup.rb
@@ -1,4 +1,7 @@ require "trello_standup/version"
+require "trello_standup/cli"
module TrelloStandup
+ APP_KEY = "bb958efe971bcf0f5d0fa920c9b377b3"
+ TRELLO_DOMAIN = "https://trello.com/1/"
end
|
Add Global Trello API app_key
|
diff --git a/db/migrate/20200304185300_add_external_id_to_gobierto_plans_nodes.rb b/db/migrate/20200304185300_add_external_id_to_gobierto_plans_nodes.rb
index abc1234..def5678 100644
--- a/db/migrate/20200304185300_add_external_id_to_gobierto_plans_nodes.rb
+++ b/db/migrate/20200304185300_add_external_id_to_gobierto_plans_nodes.rb
@@ -0,0 +1,7 @@+# frozen_string_literal: true
+
+class AddExternalIdToGobiertoPlansNodes < ActiveRecord::Migration[5.2]
+ def change
+ add_column :gplan_nodes, :external_id, :string
+ end
+end
|
Add migration to add external_id column to gplan_nodes
|
diff --git a/app/controllers/feedbacks_controller.rb b/app/controllers/feedbacks_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/feedbacks_controller.rb
+++ b/app/controllers/feedbacks_controller.rb
@@ -27,7 +27,7 @@ expire_fragment(reason)
end
- expire_fragment(post.link)
+ expire_fragment("post" + post.id.to_s)
@feedback.post = post
|
Fix cache expiration, it was broken by e94335
|
diff --git a/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule20.rb b/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule20.rb
index abc1234..def5678 100644
--- a/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule20.rb
+++ b/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule20.rb
@@ -0,0 +1,17 @@+module Sastrawi
+ module Morphology
+ module Disambiguator
+ class DisambiguatorPrefixRule20
+ def disambiguate(word)
+ contains = /^pe([wy])([aiueo])(.*)$/.match(word)
+
+ if contains
+ matches = contains.captures
+
+ return matches[0] << matches[1] << matches[2]
+ end
+ end
+ end
+ end
+ end
+end
|
Add implementation of twentieth rule of disambiguator prefix
|
diff --git a/app/policies/user_policy.rb b/app/policies/user_policy.rb
index abc1234..def5678 100644
--- a/app/policies/user_policy.rb
+++ b/app/policies/user_policy.rb
@@ -15,7 +15,8 @@ when 'admin'
!record.superadmin?
when 'organisation_admin'
- record.normal? && current_user.organisation.subtree.pluck(:id).include?(record.organisation_id)
+ current_user.id == record.id ||
+ (record.normal? && current_user.organisation.subtree.pluck(:id).include?(record.organisation_id))
when 'normal'
current_user.id == record.id
end
|
Allow organisation admins to edit themselves
|
diff --git a/test/integration/script-networking/inspec/open-development-environment-devbox-script-networking.rb b/test/integration/script-networking/inspec/open-development-environment-devbox-script-networking.rb
index abc1234..def5678 100644
--- a/test/integration/script-networking/inspec/open-development-environment-devbox-script-networking.rb
+++ b/test/integration/script-networking/inspec/open-development-environment-devbox-script-networking.rb
@@ -10,4 +10,22 @@ its('content') { should match('pre-up sleep 2') }
end
+ describe file("/etc/default/grub") do
+ it { should exist }
+ it { should be_owned_by 'root' }
+ it { should be_grouped_into 'root' }
+ it { should be_readable.by_user('root') }
+ its('mode') { should cmp '0644' }
+ its('content') { should match('GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0') }
+ end
+
+ describe file("/etc/netplan/01-netcfg.yaml") do
+ it { should exist }
+ it { should be_owned_by 'root' }
+ it { should be_grouped_into 'root' }
+ it { should be_readable.by_user('root') }
+ its('mode') { should cmp '0644' }
+ its('content') { should match('eth0') }
+ end
+
end
|
Update test for networking script
|
diff --git a/test/integration/default/serverspec/god_spec.rb b/test/integration/default/serverspec/god_spec.rb
index abc1234..def5678 100644
--- a/test/integration/default/serverspec/god_spec.rb
+++ b/test/integration/default/serverspec/god_spec.rb
@@ -0,0 +1,28 @@+require "spec_helper"
+
+describe "practicingruby::_god" do
+ it "installs god gem" do
+ expect(package "god").to be_installed.by "gem"
+ end
+
+ it "creates god config file" do
+ config_file = file "/etc/god/master.conf"
+ expect(config_file).to be_file
+
+ god_file = "/home/deploy/current/config/delayed_job.god"
+ content = /^God.load('#{god_file}') if File.file?('#{god_file}')$/
+ expect(config_file).to contain content
+ end
+
+ it "creates god startup script" do
+ expect(file "/etc/init/god.conf").to be_file
+ end
+
+ it "enables god service" do
+ expect(service "god").to be_enabled
+ end
+
+ it "starts god service" do
+ expect(command "status god").to return_stdout /^god start\/running$/
+ end
+end
|
Add integration test for God
|
diff --git a/session.gemspec b/session.gemspec
index abc1234..def5678 100644
--- a/session.gemspec
+++ b/session.gemspec
@@ -23,5 +23,6 @@ s.add_development_dependency('rspec', '~> 2.9.0.rc2')
s.add_development_dependency('mapper', '~> 0.0.2')
s.add_development_dependency('mongo', '~> 1.6.1')
+ s.add_development_dependency('bson_ext', '~> 1.6.1')
s.add_development_dependency('virtus', '~> 0.3.0')
end
|
Add bson ext as development dep
|
diff --git a/spec/class2/exercise4_spec.rb b/spec/class2/exercise4_spec.rb
index abc1234..def5678 100644
--- a/spec/class2/exercise4_spec.rb
+++ b/spec/class2/exercise4_spec.rb
@@ -4,22 +4,46 @@ end
before do
- stubs = %w(Samuel Leroy Jackson)
- allow_any_instance_of(Kernel).to receive(:gets).and_return(*stubs)
+ allow_any_instance_of(Kernel).to receive(:gets).and_return('anything')
end
it 'outputs to STDOUT' do
expect { exercise4 }.to output.to_stdout
end
- it "asks for a person's names and greets them with their full name" do
- message = <<END
+ context 'with Samuel Leroy Jackson' do
+ before do
+ stubs = %w(Samuel Leroy Jackson)
+ allow_any_instance_of(Kernel).to receive(:gets).and_return(*stubs)
+ end
+
+ it "asks for a person's names and greets them with their full name" do
+ message = <<END
What's your first name?
What's your middle name?
What's your last name?
Nice to meet you, Samuel Leroy Jackson.
END
- expect { exercise4 }.to output(message).to_stdout
+ expect { exercise4 }.to output(message).to_stdout
+ end
+ end
+
+ context 'with Melissa Joan Hart' do
+ before do
+ stubs = %w(Melissa Joan Hart)
+ allow_any_instance_of(Kernel).to receive(:gets).and_return(*stubs)
+ end
+
+ it "asks for a person's names and greets them with their full name" do
+ message = <<END
+What's your first name?
+What's your middle name?
+What's your last name?
+Nice to meet you, Melissa Joan Hart.
+END
+
+ expect { exercise4 }.to output(message).to_stdout
+ end
end
end
|
Improve specs for class 2 exercise 4
|
diff --git a/spec/models/assistant_spec.rb b/spec/models/assistant_spec.rb
index abc1234..def5678 100644
--- a/spec/models/assistant_spec.rb
+++ b/spec/models/assistant_spec.rb
@@ -33,7 +33,7 @@ end
it "should have a list of students" do
- create(:assistant, students: [create(:user)]).should have(1).students
+ create(:assistant, students: [create(:student)]).should have(1).students
end
end
end
|
Fix spec errors related to the Assistant model due to factory refactoring
|
diff --git a/app/models/search_indexer.rb b/app/models/search_indexer.rb
index abc1234..def5678 100644
--- a/app/models/search_indexer.rb
+++ b/app/models/search_indexer.rb
@@ -1,29 +1,30 @@ class SearchIndexer
def initialize(guide, rummager_index: RUMMAGER_INDEX)
@guide = guide
- @edition = guide.latest_published_edition
@rummager_index = rummager_index
end
def index
+ edition = guide.latest_published_edition
+
rummager_index.add_batch([{
"format": "service_manual_guide",
"_type": "service_manual_guide",
- "description": @edition.description,
- "indexable_content": @edition.body,
- "title": @edition.title,
- "link": @guide.slug,
+ "description": edition.description,
+ "indexable_content": edition.body,
+ "title": edition.title,
+ "link": guide.slug,
"manual": "service-manual",
"organisations": ["government-digital-service"],
}])
end
def delete
- rummager_index.delete(@guide.slug)
+ rummager_index.delete(guide.slug)
end
private
- attr_reader :rummager_index
+ attr_reader :guide, :rummager_index
end
|
Move loading of edition in SearchIndexer
We only need to load the edition when indexing new content. For deleting guides from the index we don't need it.
|
diff --git a/lib/rock/climbing/calculator/cost_per_climb_calculator.rb b/lib/rock/climbing/calculator/cost_per_climb_calculator.rb
index abc1234..def5678 100644
--- a/lib/rock/climbing/calculator/cost_per_climb_calculator.rb
+++ b/lib/rock/climbing/calculator/cost_per_climb_calculator.rb
@@ -16,7 +16,7 @@ end
def print_report
- puts "Your plan cost #{@pass_plan.price}"
+ puts "Your plan cost $#{@pass_plan.price}"
puts "You have climbed #{@climbing_sessions.size} different times, #{climbs_covered} of which were covered by your plan"
climbs_not_covered = @climbing_sessions.size - climbs_covered
puts "With your plan, it has cost you $#{cost_per_climb.round(2)} per climb"
|
Add a dollar sign in a reporter
|
diff --git a/app/models/spree/shipping_calculator_decorator.rb b/app/models/spree/shipping_calculator_decorator.rb
index abc1234..def5678 100644
--- a/app/models/spree/shipping_calculator_decorator.rb
+++ b/app/models/spree/shipping_calculator_decorator.rb
@@ -1,3 +1,7 @@ Spree::ShippingCalculator.class_eval do
preference :rate_daily_expiration_hour, :decimal, default: nil
+
+ def rate_daily_expiration_hour
+ preferred_rate_daily_expiration_hour
+ end
end
|
Return the preferred rate daily expiration hour by default
|
diff --git a/app_generators/ahn/templates/config/adhearsion.rb b/app_generators/ahn/templates/config/adhearsion.rb
index abc1234..def5678 100644
--- a/app_generators/ahn/templates/config/adhearsion.rb
+++ b/app_generators/ahn/templates/config/adhearsion.rb
@@ -16,6 +16,8 @@
Adhearsion.config do |config|
+ # config.platform.logging.level = :debug
+
# Overwrite default punchblock credentials
#config.punchblock.username = ""
#config.punchblock.password = ""
|
[FEATURE] Add commented out logging override to generated config file
|
diff --git a/TheSpot/app/controllers/users_controller.rb b/TheSpot/app/controllers/users_controller.rb
index abc1234..def5678 100644
--- a/TheSpot/app/controllers/users_controller.rb
+++ b/TheSpot/app/controllers/users_controller.rb
@@ -3,4 +3,8 @@ def new
@user = User.new
end
+
+ def user_params
+ params.require(:user).permit([:email, :username, :password, :password_confirmation])
+ end
end
|
Add strong params to user_controller
|
diff --git a/app/controllers/subscriptions_controller.rb b/app/controllers/subscriptions_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/subscriptions_controller.rb
+++ b/app/controllers/subscriptions_controller.rb
@@ -2,7 +2,7 @@ before_action :ensure_logged_in
def index
- @subscriptions = current_user.subscriptions.includes(:project).order('created_at DESC').paginate(page: params[:page])
+ @subscriptions = current_user.subscriptions.includes(:project).order('projects.latest_release_published_at DESC').paginate(page: params[:page])
@projects = Project.most_watched.limit(10)
end
|
Order subscriptions by most recently released
|
diff --git a/app/models/reports/total_inventory_value.rb b/app/models/reports/total_inventory_value.rb
index abc1234..def5678 100644
--- a/app/models/reports/total_inventory_value.rb
+++ b/app/models/reports/total_inventory_value.rb
@@ -4,7 +4,7 @@ if params[:category_id].present?
Reports::TotalInventoryValue::SingleCategory.new(params)
else
- Reports::TotalInventoryValue::AllCategories.new
+ Reports::TotalInventoryValue::AllCategories.new(params)
end
end
@@ -13,35 +13,51 @@
def initialize(params)
@category = Category.find(params[:category_id])
+ @params = params
end
def each
category.items.order(:description).each do |item|
- yield item.description, item.total_value
+ yield item.description, item.total_value(at: date)
end
end
def total_value
category.value
end
+
+ def date
+ if @params[:date].present?
+ Date.strptime(@params[:date], "%m/%d/%Y").end_of_day
+ end
+ end
+
end
class AllCategories
attr_reader :categories
- def initialize
+ def initialize(params)
@categories = Category.all
+ @params = params
end
def each
categories.each do |category|
- yield category.description, category.value
+ yield category.description, category.value(at: date)
end
end
def total_value
categories.to_a.sum(&:value)
end
+
+ def date
+ if @params[:date].present?
+ Date.strptime(@params[:date], "%m/%d/%Y").end_of_day
+ end
+ end
+
end
end
end
|
Update TotalInventoryValue to accept date
|
diff --git a/app/services/ci/pipeline_trigger_service.rb b/app/services/ci/pipeline_trigger_service.rb
index abc1234..def5678 100644
--- a/app/services/ci/pipeline_trigger_service.rb
+++ b/app/services/ci/pipeline_trigger_service.rb
@@ -7,6 +7,8 @@ def execute
if trigger_from_token
create_pipeline_from_trigger(trigger_from_token)
+ elsif job_from_token
+ create_pipeline_from_job(job_from_token)
end
end
@@ -35,6 +37,14 @@ end
end
+ def create_pipeline_from_job(job)
+ # overriden in EE
+ end
+
+ def job_from_token
+ # overriden in EE
+ end
+
def variables
params[:variables].to_h.map do |key, value|
{ key: key, value: value }
|
Reduce diff with EE in Ci::PipelineTriggerService
Signed-off-by: Rémy Coutable <4ea0184b9df19e0786dd00b28e6daa4d26baeb3e@rymai.me>
|
diff --git a/mustache-sinatra.gemspec b/mustache-sinatra.gemspec
index abc1234..def5678 100644
--- a/mustache-sinatra.gemspec
+++ b/mustache-sinatra.gemspec
@@ -21,5 +21,5 @@ spec.add_development_dependency "bundler", "~> 1.7"
spec.add_development_dependency "rake", "~> 10.0"
- spec.add_dependency "mustache", "<= 0.99.8"
+ spec.add_dependency "mustache", "~> 1.0"
end
|
Update the version of mustache.
|
diff --git a/app/controllers/data_sources_controller.rb b/app/controllers/data_sources_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/data_sources_controller.rb
+++ b/app/controllers/data_sources_controller.rb
@@ -23,6 +23,7 @@
def update(id, data_source)
@data_source = DataSource.find(id)
+ @data_source.reset_source_table_classes!
@data_source.assign_attributes(data_source_params(data_source))
@data_source.save! if @data_source.changed?
DatabaseMemo.import_data_source!(@data_source.id)
|
Reset data source table class before update
|
diff --git a/pco_api.gemspec b/pco_api.gemspec
index abc1234..def5678 100644
--- a/pco_api.gemspec
+++ b/pco_api.gemspec
@@ -19,7 +19,7 @@
s.add_dependency "faraday", "~> 0.9.1"
s.add_dependency "faraday_middleware", "~> 0.9.1"
- s.add_dependency "excon", "~> 0.30.0"
+ s.add_dependency "excon", "~> 0.45.3"
s.add_development_dependency "rspec", "~> 3.2"
s.add_development_dependency "webmock", "~> 1.21"
s.add_development_dependency "pry", "~> 0.10"
|
Use newer version of excon
|
diff --git a/lita_config.rb b/lita_config.rb
index abc1234..def5678 100644
--- a/lita_config.rb
+++ b/lita_config.rb
@@ -17,8 +17,8 @@ config.adapters.slack.token = ENV['SLACK_TOKEN']
# Configure redis using Redis To Go if on Heroku
- if ENV.has_key? 'REDISTOGO_URL'
- config.redis[:url] = ENV.fetch('REDISTOGO_URL', nil)
+ if ENV.has_key? 'REDIS_URL'
+ config.redis[:url] = ENV.fetch('REDIS_URL', nil)
config.http.port = ENV.fetch('PORT', nil)
end
end
|
Rename env var to REDIS_URL
|
diff --git a/quandl.gemspec b/quandl.gemspec
index abc1234..def5678 100644
--- a/quandl.gemspec
+++ b/quandl.gemspec
@@ -4,13 +4,13 @@ require 'quandl/version'
Gem::Specification.new do |spec|
- spec.name = 'quandl'
+ spec.name = 'quandl_ruby'
spec.version = Quandl::VERSION
spec.authors = ['Kash Nouroozi']
spec.email = ['hi@knrz.co']
spec.summary = %q{Ruby wrapper for the Quandl API (www.quandle.com)}
spec.description = ''
- spec.homepage = ''
+ spec.homepage = 'https://github.com/knrz/Quandl-Ruby'
spec.license = 'MIT'
spec.files = `git ls-files -z`.split("\x0")
|
Rename + homepage is now github
|
diff --git a/lib/cxml.rb b/lib/cxml.rb
index abc1234..def5678 100644
--- a/lib/cxml.rb
+++ b/lib/cxml.rb
@@ -4,18 +4,24 @@ require 'nokogiri'
module CXML
- autoload :Protocol, 'cxml/protocol'
- autoload :Document, 'cxml/document'
- autoload :Header, 'cxml/header'
- autoload :Credential, 'cxml/credential'
- autoload :CredentialMac, 'cxml/credential_mac'
- autoload :Sender, 'cxml/sender'
- autoload :Status, 'cxml/status'
- autoload :Request, 'cxml/request'
- autoload :Response, 'cxml/response'
- autoload :Parser, 'cxml/parser'
- autoload :PunchOutSetupRequest, 'cxml/punch_out_setup_request'
- autoload :PunchOutSetupResponse, 'cxml/punch_out_setup_response'
+ autoload :Protocol, 'cxml/protocol'
+ autoload :Document, 'cxml/document'
+ autoload :Header, 'cxml/header'
+ autoload :Credential, 'cxml/credential'
+ autoload :CredentialMac, 'cxml/credential_mac'
+ autoload :Sender, 'cxml/sender'
+ autoload :Status, 'cxml/status'
+ autoload :Request, 'cxml/request'
+ autoload :Response, 'cxml/response'
+ autoload :Parser, 'cxml/parser'
+ autoload :PunchOutSetupRequest, 'cxml/punch_out_setup_request'
+ autoload :PunchOutSetupResponse, 'cxml/punch_out_setup_response'
+ autoload :PunchOutOrderMessage, 'cxml/punch_out_order_message'
+ autoload :PunchOutOrderMessageHeader, 'cxml/punch_out_order_message_header'
+ autoload :ItemId, 'cxml/item_id'
+ autoload :ItemIn, 'cxml/item_in'
+ autoload :ItemDetail, 'cxml/item_detail'
+ autoload :Money, 'cxml/money'
def self.parse(str)
CXML::Parser.new.parse(str)
|
Add all the new node classes to the autoload
|
diff --git a/cookbooks/dotfiles/definitions/dotfile_install.rb b/cookbooks/dotfiles/definitions/dotfile_install.rb
index abc1234..def5678 100644
--- a/cookbooks/dotfiles/definitions/dotfile_install.rb
+++ b/cookbooks/dotfiles/definitions/dotfile_install.rb
@@ -9,7 +9,7 @@ log("dotfile '#{target}' does not exist") { level :warn } unless target_exists
link source do
- to target
+ to target_relative
owner REAL_USER
group REAL_GROUP
only_if { target_exists }
|
Use relative path for dotfiles symlink.
|
diff --git a/core/lib/spree/permission_sets/user_management.rb b/core/lib/spree/permission_sets/user_management.rb
index abc1234..def5678 100644
--- a/core/lib/spree/permission_sets/user_management.rb
+++ b/core/lib/spree/permission_sets/user_management.rb
@@ -2,7 +2,7 @@ module PermissionSets
class UserManagement < PermissionSets::Base
def activate!
- can [:admin, :display, :create, :update], Spree.user_class
+ can [:admin, :display, :create, :update, :save_in_address_book, :remove_from_address_book], Spree.user_class
# due to how cancancan filters by associations,
# we have to define this twice, once for `accessible_by`
|
Fix UserManagement permissions to allow saving and removing from address book
|
diff --git a/tasks/publish.rake b/tasks/publish.rake
index abc1234..def5678 100644
--- a/tasks/publish.rake
+++ b/tasks/publish.rake
@@ -24,7 +24,7 @@
def is_tag_on_candidate_branches?(tag, branches)
branches.each do |branch|
- return true if is_tag_on_branch?(tag, branch)
+ return true if is_tag_on_branch?(tag, branch) || is_tag_on_branch?(tag, "origin/#{branch}")
end
false
end
|
Check remote branches so that works on travisCI
|
diff --git a/irc-hipchat.rb b/irc-hipchat.rb
index abc1234..def5678 100644
--- a/irc-hipchat.rb
+++ b/irc-hipchat.rb
@@ -8,6 +8,7 @@
HIPCHAT_AUTH_TOKEN = ENV['HIPCHAT_AUTH_TOKEN']
IRC_CHANNEL = ENV['IRC_CHANNEL']
+SUPER_USERS = ENV['SUPER_IRC_USERS'].nil? ? [] : ENV['SUPER_IRC_USERS'].split(',') # comma separated list of users to highlight in hipchat (e.g. company employees)
hipchat_client = HipChat::Client.new(HIPCHAT_AUTH_TOKEN, :api_version => 'v2')
@@ -27,7 +28,7 @@ hipchat_client[HIPCHAT_ROOM].send('IRC',
"<strong>#{source}:</strong> #{message}",
:notify => true,
- :color => 'yellow',
+ :color => (SUPER_USERS.include? source) ? 'green' : 'yellow',
:message_format => 'html')
end
end
|
Add highlighting for super users
|
diff --git a/build_tools/compiler/mustache_processor.rb b/build_tools/compiler/mustache_processor.rb
index abc1234..def5678 100644
--- a/build_tools/compiler/mustache_processor.rb
+++ b/build_tools/compiler/mustache_processor.rb
@@ -14,6 +14,7 @@ footer_top: "{{{ footerTop }}}",
footer_support_links: "{{{ footerSupportLinks }}}",
inside_header: "{{{ insideHeader }}}",
+ header_class: "{{{ headerClass }}}",
proposition_header: "{{{ propositionHeader }}}",
after_header: "{{{ afterHeader }}}",
cookie_message: "{{{ cookieMessage }}}"
|
Add header class to mustache template
|
diff --git a/test/rails_root/config/environment.rb b/test/rails_root/config/environment.rb
index abc1234..def5678 100644
--- a/test/rails_root/config/environment.rb
+++ b/test/rails_root/config/environment.rb
@@ -1,6 +1,6 @@ # Specifies gem version of Rails to use when vendor/rails is not present
old_verbose, $VERBOSE = $VERBOSE, nil
-RAILS_GEM_VERSION = '2.1.0' unless defined? RAILS_GEM_VERSION
+RAILS_GEM_VERSION = '>= 2.1.0' unless defined? RAILS_GEM_VERSION
$VERBOSE = old_verbose
require File.join(File.dirname(__FILE__), 'boot')
@@ -10,5 +10,5 @@ config.cache_classes = false
config.whiny_nils = true
end
-
+
# Dependencies.log_activity = true
|
Use >= 2.1.0 so that gem installs of newer versions of rails can still run the shoulda tests
|
diff --git a/test/services/nitpick_message_test.rb b/test/services/nitpick_message_test.rb
index abc1234..def5678 100644
--- a/test/services/nitpick_message_test.rb
+++ b/test/services/nitpick_message_test.rb
@@ -3,7 +3,6 @@ require 'services/message'
require 'services/nitpick_message'
require 'exercism/exercise'
-
class NitpickMessageTest < MiniTest::Unit::TestCase
|
Add tests for the nitpick email template
|
diff --git a/week_4/simple_string.rb b/week_4/simple_string.rb
index abc1234..def5678 100644
--- a/week_4/simple_string.rb
+++ b/week_4/simple_string.rb
@@ -0,0 +1,29 @@+# Solution Below
+old_string = "Ruby is cool"
+new_string = old_string.reverse.upcase
+
+
+
+
+# RSpec Tests. They are included in this file because the local variables you are creating are not accessible across files. If we try to run these files as a separate file per normal operation, the local variable checks will return nil.
+
+
+describe "old_string" do
+ it 'is defined as a local variable' do
+ expect(defined?(old_string)).to eq 'local-variable'
+ end
+
+ it "has the value 'Ruby is cool'" do
+ expect(old_string).to eq "Ruby is cool"
+ end
+end
+
+describe 'new_string' do
+ it 'is defined as a local variable' do
+ expect(defined?(new_string)).to eq 'local-variable'
+ end
+
+ it 'has the value "LOOC SI YBUR"' do
+ expect(new_string).to eq "LOOC SI YBUR"
+ end
+end
|
Create a simple string with reverse and upcase method
|
diff --git a/spec/active_interaction/concerns/active_modelable_spec.rb b/spec/active_interaction/concerns/active_modelable_spec.rb
index abc1234..def5678 100644
--- a/spec/active_interaction/concerns/active_modelable_spec.rb
+++ b/spec/active_interaction/concerns/active_modelable_spec.rb
@@ -10,7 +10,7 @@ let(:model) { subject }
ActiveModel::Lint::Tests.public_instance_methods
- .grep(/\Atest/) { |m| example(m) { send(m) } }
+ .grep(/\Atest/) { |m| example(m) { public_send(m) } }
end
describe ActiveInteraction::ActiveModelable do
|
Use public_send instead of send
|
diff --git a/db/migrate/20100328212817_clear_remember_tokens_for_users.rb b/db/migrate/20100328212817_clear_remember_tokens_for_users.rb
index abc1234..def5678 100644
--- a/db/migrate/20100328212817_clear_remember_tokens_for_users.rb
+++ b/db/migrate/20100328212817_clear_remember_tokens_for_users.rb
@@ -0,0 +1,9 @@+class ClearRememberTokensForUsers < ActiveRecord::Migration
+ def self.up
+ User.update_all('remember_token = NULL, remember_token_expires_at = NULL')
+ end
+
+ def self.down
+ # No "down" migration possible because "up" removed obsolete data.
+ end
+end
|
MIGRATION: Clear the User remember_token and remember_token_expires_at.
|
diff --git a/recipes/init.rb b/recipes/init.rb
index abc1234..def5678 100644
--- a/recipes/init.rb
+++ b/recipes/init.rb
@@ -22,7 +22,7 @@ # We also need the configuration, so we can run HDFS commands
execute 'initaction-create-hdfs-cdap-dir' do
not_if "hdfs dfs -test -d #{node['cdap']['cdap_site']['hdfs.namespace']}", :user => 'hdfs'
- command "hdfs dfs -mkdir -p #{node['cdap']['cdap_site']['hdfs.namespace']} && hdfs dfs -chown yarn #{node['cdap']['cdap_site']['hdfs.namespace']}"
+ command "hdfs dfs -mkdir -p #{node['cdap']['cdap_site']['hdfs.namespace']} && hdfs dfs -chown #{node['cdap']['cdap_site']['hdfs.user']} #{node['cdap']['cdap_site']['hdfs.namespace']}"
timeout 300
user 'hdfs'
group 'hdfs'
|
Use attribute versus hard-coding yarn
|
diff --git a/methan.gemspec b/methan.gemspec
index abc1234..def5678 100644
--- a/methan.gemspec
+++ b/methan.gemspec
@@ -11,7 +11,7 @@
spec.summary = %q{Methan is a memo organizer.}
spec.description = %q{Methan is a memo organizer.}
- spec.homepage = "TODO: Put your gem's website or public repo URL here."
+ spec.homepage = "https://github.com/kamito/methan"
spec.license = "MIT"
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
Update `spec.homepage` to github repository.
|
diff --git a/db/migrate/20150109204655_fix_phone_number_fields.rb b/db/migrate/20150109204655_fix_phone_number_fields.rb
index abc1234..def5678 100644
--- a/db/migrate/20150109204655_fix_phone_number_fields.rb
+++ b/db/migrate/20150109204655_fix_phone_number_fields.rb
@@ -1,12 +1,7 @@ class FixPhoneNumberFields < ActiveRecord::Migration
def change
- Organization.all.each do |o|
- old_phone = o.phone
- new_phone = old_phone.gsub(/[^0-9]/, "")
- o.update(phone: new_phone)
- end
- puts Organization.pluck(:phone)
- change_column :organizations, :phone, :string, :limit => 10, :null => false
add_column :organizations, :phone_ext, :string, :limit => 6, :default => nil, :after => :phone
+ add_column :users, :phone_ext, :string, :limit => 6, :default => nil, :after => :phone
+ add_column :vendors, :phone_ext, :string, :limit => 6, :default => nil, :after => :phone
end
end
|
Fix phone number migration to add extension only wherever there is a phone number field
|
diff --git a/raygun_client.gemspec b/raygun_client.gemspec
index abc1234..def5678 100644
--- a/raygun_client.gemspec
+++ b/raygun_client.gemspec
@@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = 'raygun_client'
- s.version = '0.1.9'
+ s.version = '0.1.10'
s.summary = 'Client for the Raygun API using the Obsidian HTTP client'
s.description = ' '
|
Package version is increased from 0.1.9 to 0.1.10
|
diff --git a/metadata.rb b/metadata.rb
index abc1234..def5678 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -6,4 +6,4 @@ long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
source_url 'https://github.com/GSI-HPC/sys-chef-cookbook'
issues_url 'https://github.com/GSI-HPC/sys-chef-cookbook/issues'
-version '1.37.0'
+version '1.38.0'
|
Add test for fuse recipe
|
diff --git a/db/seeds.rb b/db/seeds.rb
index abc1234..def5678 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -3,6 +3,11 @@ require 'csv'
config = YAML.load_file((Rails.root.join("db", "seed", "seed.yml")))
+
+config.each do |key, value|
+ config[key] = Rails.root.join("db", "seed", value)
+end
+
GroupData::Importer.import(config)
puts "Creating Admin User..."
|
Set directory to the default one for each seed file
|
diff --git a/config/unicorn.rb b/config/unicorn.rb
index abc1234..def5678 100644
--- a/config/unicorn.rb
+++ b/config/unicorn.rb
@@ -6,7 +6,7 @@ stdout_path '/var/log/aaf/saml/unicorn/stdout.log'
stderr_path '/var/log/aaf/saml/unicorn/stderr.log'
-timeout 240
+timeout 600
before_fork do |server, _worker|
Sequel::Model.db.disconnect
|
Update request timeout to 10 minutes
Under load (generally relating to something upstream like the DB
cluster being pegged by a 3rd party service), valid but long running
queries can be timed out before practical.
This will allow us to continue to respond in these situations without
being hard terminated, albeit slowly.
|
diff --git a/the_merger.gemspec b/the_merger.gemspec
index abc1234..def5678 100644
--- a/the_merger.gemspec
+++ b/the_merger.gemspec
@@ -13,6 +13,9 @@ gem.homepage = "https://github.com/map7/the_merger"
# gem.add_development_dependency "mail"
+ gem.add_development_dependency "rails"
+ gem.add_development_dependency "rake"
+ gem.add_development_dependency "rspec"
gem.files = `git ls-files`.split($/)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
Add some dependencies for making my tests
|
diff --git a/grape-swagger-rails.gemspec b/grape-swagger-rails.gemspec
index abc1234..def5678 100644
--- a/grape-swagger-rails.gemspec
+++ b/grape-swagger-rails.gemspec
@@ -19,5 +19,5 @@ spec.add_development_dependency 'rake'
spec.add_dependency 'railties', '>= 3.2.12'
spec.add_dependency 'rubyzip', '~> 0.9.9'
- spec.add_dependency 'grape-swagger', '~> 0.5.0'
+ spec.add_dependency 'grape-swagger', '~> 0.6.0'
end
|
Update grape swagger dependency to 0.6
|
diff --git a/config/initializers/async.rb b/config/initializers/async.rb
index abc1234..def5678 100644
--- a/config/initializers/async.rb
+++ b/config/initializers/async.rb
@@ -1,3 +1,3 @@ # This file can be overwritten on deployment
-set :enable_queue, ! ENV["ENABLE_QUEUE"].nil?
+set :enable_queue, ! ENV["QUIRKAFLEEG_RUMMAGER_ENABLE_QUEUE"].nil?
|
Change enable queue variable to match our needs
|
diff --git a/example/spec/spec_helper.rb b/example/spec/spec_helper.rb
index abc1234..def5678 100644
--- a/example/spec/spec_helper.rb
+++ b/example/spec/spec_helper.rb
@@ -1,7 +1,7 @@ require 'turnip_formatter'
RSpec.configure do |config|
- c.add_setting :project_name, :default => "My project"
+ config.add_setting :project_name, :default => "My project"
config.add_formatter RSpecTurnipFormatter, 'report.html'
end
|
Fix variable name for RSpec.configure block GH-29
|
diff --git a/osm-rubocop.gemspec b/osm-rubocop.gemspec
index abc1234..def5678 100644
--- a/osm-rubocop.gemspec
+++ b/osm-rubocop.gemspec
@@ -15,10 +15,10 @@ spec.license = 'MIT'
spec.files = `git ls-files -z`.split("\x0").reject do |f|
- f.match(/^(test|spec|features)\//)
+ f.match(%r{^(test|spec|features)/})
end
spec.bindir = 'exe'
- spec.executables = spec.files.grep(/^exe\//) { |f| File.basename(f) }
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']
spec.add_dependency 'rubocop', '0.73.0'
|
Fix rubocop violations introduced by changing the defaults
|
diff --git a/kitchen/site-cookbooks/wordnet/recipes/default.rb b/kitchen/site-cookbooks/wordnet/recipes/default.rb
index abc1234..def5678 100644
--- a/kitchen/site-cookbooks/wordnet/recipes/default.rb
+++ b/kitchen/site-cookbooks/wordnet/recipes/default.rb
@@ -15,9 +15,9 @@ # By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.
#
-
-gem_package "rwordnet" do
- action :install
+bash 'install rwordnet' do
+ command 'gem install rwordnet'
+ user 'vagrant'
end
cookbook_file "/var/lib/wn_s.pl" do
|
Make vagrant install wordnet gem since he is the user that will use it
|
diff --git a/ruremai.gemspec b/ruremai.gemspec
index abc1234..def5678 100644
--- a/ruremai.gemspec
+++ b/ruremai.gemspec
@@ -17,6 +17,7 @@
gem.add_runtime_dependency 'launchy', '~> 2.1.0'
+ gem.add_development_dependency 'rake'
gem.add_development_dependency 'tapp', '~> 1.3.1'
gem.add_development_dependency 'rspec', '>= 2.10.0'
end
|
Add rake as development depencency
|
diff --git a/recipes/data_bag.rb b/recipes/data_bag.rb
index abc1234..def5678 100644
--- a/recipes/data_bag.rb
+++ b/recipes/data_bag.rb
@@ -26,7 +26,7 @@ end
Array(node['users']).each do |i|
- u = data_bag_item(bag, i)
+ u = data_bag_item(bag, i.gsub(/[.]/, '-'))
username = u['username'] || u['id']
user_account username do
|
Handle user names with periods in them.
|
diff --git a/redis-spawn.gemspec b/redis-spawn.gemspec
index abc1234..def5678 100644
--- a/redis-spawn.gemspec
+++ b/redis-spawn.gemspec
@@ -4,7 +4,7 @@ s.name = "redis-spawn"
s.version = Redis::SpawnServer::VERSION
s.summary = %{An extension to redis-rb to facilitate spawning a redis-server specifically for your app.}
- s.description = %Q{Insert something more verbose than the summary here.}
+ s.description = %Q{redis-spawn allows you to manage your own redis-server instances from within your Ruby application.}
s.authors = ["Phil Stewart"]
s.email = ["phil.stewart@lichp.co.uk"]
s.homepage = "http://github.com/lichp/redis-spawn"
|
Fix broken description in gemspec
|
diff --git a/Casks/skreenics.rb b/Casks/skreenics.rb
index abc1234..def5678 100644
--- a/Casks/skreenics.rb
+++ b/Casks/skreenics.rb
@@ -2,6 +2,7 @@ version '1.0.1'
sha256 'c4edd3cb8d066c5b5ce8ab78fe476776d04ad5b8e28eb7128bb183903f7dd8b9'
+ # googleapis.com/google-code-archive-downloads/v2/code.google.com/skreenics was verified as official when first introduced to the cask
url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/skreenics/Screeniks-#{version}.zip"
name 'Skreenics'
homepage 'https://code.google.com/archive/p/skreenics/'
|
Fix `url` stanza comment for Skreenics.
|
diff --git a/Casks/texstudio.rb b/Casks/texstudio.rb
index abc1234..def5678 100644
--- a/Casks/texstudio.rb
+++ b/Casks/texstudio.rb
@@ -1,6 +1,6 @@ cask :v1 => 'texstudio' do
version '2.8.8'
- sha256 'cd9fd18b0147f43db64af0bb9bb468c9532a8967aa64d1b0aaa09ea98980e91e'
+ sha256 'bc0212fe6897128982cbd7227ec10562fdb421ba8e127e45d79e9c766896665a'
url "http://downloads.sourceforge.net/sourceforge/texstudio/texstudio_#{version}_osx_qt5.zip"
homepage 'http://texstudio.sourceforge.net/'
|
Fix SHA checksum for Texstudio
|
diff --git a/files/default/tests/minitest/server_test.rb b/files/default/tests/minitest/server_test.rb
index abc1234..def5678 100644
--- a/files/default/tests/minitest/server_test.rb
+++ b/files/default/tests/minitest/server_test.rb
@@ -26,7 +26,7 @@ end
it 'runs the postgresql service' do
- service(node['postgresql']['server']['service_name']).must_be_running
+ service("postgresql").must_be_running
end
it 'can connect to postgresql' do
|
Use postgresql string as service name.
The minitest service assertion does not appear to use the status
command for the service, instead falling back to process table
inspection.
|
diff --git a/flextest.rb b/flextest.rb
index abc1234..def5678 100644
--- a/flextest.rb
+++ b/flextest.rb
@@ -0,0 +1,37 @@+require 'aws/s3'
+require 'pp'
+
+AWS::S3::Base.establish_connection!(
+ :access_key_id => "<Your S3 key>",
+ :secret_access_key => "<Your s3 secret> ",
+ :server => "<Server s3 eps is running on>",
+ :port => "8080"
+ )
+
+# File sizes (boundries)
+files = [
+# 0,
+ 1,
+ 15,
+ 16,
+ 17,
+ 32,
+ 48,
+ 64,
+ 80,
+ 2389
+ ]
+
+files.each do |file_size|
+ file = Array.new(file_size) {|i| i % 10}.join("")
+
+ puts "Uploading #{file_size}.txt ..."
+ AWS::S3::S3Object.store("#{file_size}.txt", StringIO.new(file), "contractually-vhodges-userphotos")
+
+ puts "Downloading #{file_size}.txt ..."
+ dl_file = AWS::S3::S3Object.value "#{file_size}.txt", "contractually-vhodges-userphotos"
+
+ puts "Compare: #{ (file.eql?(dl_file) ) ? "SUCCESS" : "FAIL" }"
+
+ sleep(0.5)
+end
|
Test the servers with many sizes of files
|
diff --git a/rails/app/models/repo.rb b/rails/app/models/repo.rb
index abc1234..def5678 100644
--- a/rails/app/models/repo.rb
+++ b/rails/app/models/repo.rb
@@ -1,4 +1,9 @@ class Repo < ApplicationRecord
belongs_to :user
has_many :branches
+
+ def url
+ "https://github.com/#{owner}/#{name}"
+ end
+
end
|
Add url to Repo model
|
diff --git a/command_line/dash_r_spec.rb b/command_line/dash_r_spec.rb
index abc1234..def5678 100644
--- a/command_line/dash_r_spec.rb
+++ b/command_line/dash_r_spec.rb
@@ -18,4 +18,11 @@ out.should include("REQUIRED")
out.should include("syntax error")
end
+
+ it "does not require the file if the main script file does not exist" do
+ out = `#{ruby_exe.to_a.join(' ')} -r #{@test_file} #{fixture(__FILE__, "does_not_exist.rb")} 2>&1`
+ $?.should_not.success?
+ out.should_not.include?("REQUIRED")
+ out.should.include?("No such file or directory")
+ end
end
|
Add spec for -r when the main script file does not exist
|
diff --git a/lib/billimatic/entities/invoice_rule.rb b/lib/billimatic/entities/invoice_rule.rb
index abc1234..def5678 100644
--- a/lib/billimatic/entities/invoice_rule.rb
+++ b/lib/billimatic/entities/invoice_rule.rb
@@ -16,7 +16,7 @@ attribute :cobrato_charge_config_name, String
attribute :cobrato_charge_template_id, Integer
attribute :cobrato_charge_template_name, String
- attribute :management_type, Integer
+ attribute :management_type, String
attribute :services, Array[Service]
attribute :additional_information, Hash
attribute :scheduled_update, Hash
|
Fix attribute type for management_type
|
diff --git a/db/migrate/20150423233715_create_images.rb b/db/migrate/20150423233715_create_images.rb
index abc1234..def5678 100644
--- a/db/migrate/20150423233715_create_images.rb
+++ b/db/migrate/20150423233715_create_images.rb
@@ -1,3 +1,5 @@+# Encoding: utf-8
+# Create images
class CreateImages < ActiveRecord::Migration
def change
create_table :images do |t|
|
Clean up images migration script
|
diff --git a/core/db/migrate/20130802022321_migrate_tax_categories_to_line_items.rb b/core/db/migrate/20130802022321_migrate_tax_categories_to_line_items.rb
index abc1234..def5678 100644
--- a/core/db/migrate/20130802022321_migrate_tax_categories_to_line_items.rb
+++ b/core/db/migrate/20130802022321_migrate_tax_categories_to_line_items.rb
@@ -0,0 +1,9 @@+class MigrateTaxCategoriesToLineItems < ActiveRecord::Migration
+ def change
+ Spree::LineItem.includes(:variant => { :product => :tax_category }).find_in_batches do |line_items|
+ line_items.each do |line_item|
+ line_item.update_column(:tax_category_id, line_item.product.tax_category.id)
+ end
+ end
+ end
+end
|
Add another migration to link existing line items with their tax categories
Related to #3481
|
diff --git a/lib/convection/model/template/resource/aws_logs_subscription_filter.rb b/lib/convection/model/template/resource/aws_logs_subscription_filter.rb
index abc1234..def5678 100644
--- a/lib/convection/model/template/resource/aws_logs_subscription_filter.rb
+++ b/lib/convection/model/template/resource/aws_logs_subscription_filter.rb
@@ -0,0 +1,28 @@+require_relative '../resource'
+
+module Convection
+ module Model
+ class Template
+ class Resource
+ ##
+ # AWS::Logs::SubscriptionFilter
+ #
+ # @example
+ # logs_subscription_filter 'TestSubscriptionFilter' do
+ # destination_arn 'arn:aws:logs:us-east-1:123456789012:destination:testDestination'
+ # filter_pattern '{$.userIdentity.type = Root}'
+ # log_group_name 'CloudTrail'
+ # role_arn 'arn:aws:iam::123456789012:role/Root'
+ # end
+ ##
+ class SubscriptionFilter < Resource
+ type 'AWS::Logs::SubscriptionFilter'
+ property :destination_arn, 'DestinationArn'
+ property :filter_pattern, 'FilterPattern'
+ property :log_group_name, 'LogGroupName'
+ property :role_arn, 'RoleArn'
+ end
+ end
+ end
+ end
+end
|
Add AWS::Logs::SubscriptionFilter resource for streaming AWS CloudWatch logs to Kinesis/Lambda
|
diff --git a/log.gemspec b/log.gemspec
index abc1234..def5678 100644
--- a/log.gemspec
+++ b/log.gemspec
@@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = 'log'
- s.version = '0.4.3.1'
+ s.version = '0.4.3.2'
s.summary = 'Logging to STD IO with levels, tagging, and coloring'
s.description = ' '
|
Package version is increased from 0.4.3.1 to 0.4.3.2
|
diff --git a/skooby.gemspec b/skooby.gemspec
index abc1234..def5678 100644
--- a/skooby.gemspec
+++ b/skooby.gemspec
@@ -22,4 +22,5 @@ gem.add_development_dependency "minitest"
gem.add_development_dependency "mocha"
gem.add_development_dependency "vcr"
+ gem.add_development_dependency "fakeweb"
end
|
Add fakeweb gem as dependency
|
diff --git a/spec/controllers/league_requests_controller_spec.rb b/spec/controllers/league_requests_controller_spec.rb
index abc1234..def5678 100644
--- a/spec/controllers/league_requests_controller_spec.rb
+++ b/spec/controllers/league_requests_controller_spec.rb
@@ -0,0 +1,30 @@+require 'spec_helper'
+
+describe LeagueRequestsController do
+ render_views
+
+ before do
+ @user = create :user
+ sign_in @user
+ end
+
+ describe '#new' do
+ context 'for non-admins' do
+ it 'redirect to root for non admins' do
+ get :new
+
+ response.should redirect_to(root_path)
+ end
+ end
+
+ context 'for admins' do
+ it 'shows the search form' do
+ @user.groups << Group.admin_group
+
+ get :new
+
+ assigns(:results).should be_nil
+ end
+ end
+ end
+end
|
Add basic spec for league requests page
|
diff --git a/lib/generators/admin/admin_generator.rb b/lib/generators/admin/admin_generator.rb
index abc1234..def5678 100644
--- a/lib/generators/admin/admin_generator.rb
+++ b/lib/generators/admin/admin_generator.rb
@@ -1,30 +1,28 @@ # Public: Generator for admin page controllers.
module CEO
- module Generators
- class AdminGenerator < Rails::Generators::NamedBase
- source_root File.expand_path('../templates', __FILE__)
+ class AdminGenerator < Rails::Generators::NamedBase
+ source_root File.expand_path('../templates', __FILE__)
- def create_admin_page_controller
- @controller = file_name
- template(
- 'admin_page_controller.rb.erb',
- "app/controllers/admin/#{@controller.underscore}_controller.rb"
- )
+ def create_admin_page_controller
+ @controller = file_name
+ template(
+ 'admin_page_controller.rb.erb',
+ "app/controllers/admin/#{@controller.underscore}_controller.rb"
+ )
+ end
+
+ def add_admin_route
+ route "admin_for :#{@controller.underscore}"
+ end
+
+ def add_form_view
+ unless Dir.exist?(Rails.root.join('app/views/admin'))
+ Dir.mkdir(Rails.root.join('app/views/admin'))
end
- def add_admin_route
- route "admin_for :#{@controller.underscore}"
- end
-
- def add_form_view
- unless Dir.exist?(Rails.root.join('app/views/admin'))
- Dir.mkdir(Rails.root.join('app/views/admin'))
- end
-
- create_file "app/views/admin/#{@controller.underscore}.html.erb", <<VIEW
+ create_file "app/views/admin/#{@controller.underscore}.html.erb", <<VIEW
<% # "f" is exposed as a form object %>
VIEW
- end
end
end
end
|
Remove an extra module namespacing
|
diff --git a/spec/models/matched_contribution_attributes_spec.rb b/spec/models/matched_contribution_attributes_spec.rb
index abc1234..def5678 100644
--- a/spec/models/matched_contribution_attributes_spec.rb
+++ b/spec/models/matched_contribution_attributes_spec.rb
@@ -0,0 +1,38 @@+require 'spec_helper'
+
+describe MatchedContributionAttributes do
+ subject { described_class.new(contribution, match) }
+ let(:contribution) do
+ Contribution.new(
+ project_id: 100,
+ state: :canceled,
+ value: 50
+ )
+ end
+
+ let(:match) do
+ Match.new(
+ user_id: 200,
+ value_unit: 3
+ )
+ end
+
+ describe 'attributes' do
+ it 'gets specific attributes from contribution object' do
+ expect(subject.attributes[:project_id]).to eql(100)
+ expect(subject.attributes[:state]).to eql(:canceled)
+ end
+
+ it 'gets specific attributes from match object' do
+ expect(subject.attributes[:user_id]).to eql(200)
+ end
+
+ it 'sets payment_method as matched' do
+ expect(subject.attributes[:payment_method]).to eql(:matched)
+ end
+
+ it 'defines its value as contribution times match\'s value unit' do
+ expect(subject.attributes[:value]).to eql(150)
+ end
+ end
+end
|
Define specs for implementation of MatchedContributionAttributes
|
diff --git a/app/controllers/context/admin/base_controller.rb b/app/controllers/context/admin/base_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/context/admin/base_controller.rb
+++ b/app/controllers/context/admin/base_controller.rb
@@ -8,7 +8,6 @@ private
def context_admin_required
- p "CALLING CONTEXT ADMIN REQUIRED"
if !current_user.try(:context_admin)
flash[:notice] = "You must be an admin to access that area."
redirect_to '/'
|
Remove debug statement from context_admin_required
|
diff --git a/spec/features/top_spec.rb b/spec/features/top_spec.rb
index abc1234..def5678 100644
--- a/spec/features/top_spec.rb
+++ b/spec/features/top_spec.rb
@@ -4,7 +4,7 @@ describe "GET /" do
scenario "Sponser links should be exist" do
visit "/"
- expect(page).to have_css 'section.sponsors_logo a[href]', count: 6
+ expect(page).to have_css 'section.sponsors_logo a[href]', count: 7
end
end
end
|
Fix test the number of sponsors
|
diff --git a/sluggi.gemspec b/sluggi.gemspec
index abc1234..def5678 100644
--- a/sluggi.gemspec
+++ b/sluggi.gemspec
@@ -13,8 +13,7 @@ spec.homepage = "https://github.com/neighborland/sluggi"
spec.license = "MIT"
- spec.files = `git ls-files`.split($/)
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
+ spec.files = `git ls-files`.split($/)
spec.test_files = spec.files.grep(%r{^(test)/})
spec.require_paths = ["lib"]
|
Remove unnecessary executables from gemspec
|
diff --git a/fluent-plugin-swift.gemspec b/fluent-plugin-swift.gemspec
index abc1234..def5678 100644
--- a/fluent-plugin-swift.gemspec
+++ b/fluent-plugin-swift.gemspec
@@ -7,6 +7,7 @@ gem.homepage = "https://github.com/yuuzi41/fluent-plugin-swift"
gem.summary = gem.description
gem.version = File.read("VERSION").strip
+ gem.license = "Apache-2.0"
gem.authors = ["yuuzi41"]
gem.email = ""
gem.has_rdoc = false
|
Add License Info to the gemspec
|
diff --git a/Formula/clojure.rb b/Formula/clojure.rb
index abc1234..def5678 100644
--- a/Formula/clojure.rb
+++ b/Formula/clojure.rb
@@ -13,8 +13,13 @@ def script
<<-EOS
#!/bin/sh
-# Run Clojure.
-exec java -cp "#{prefix}/#{jar}" clojure.main "$@"
+# Runs clojure.
+# With no arguments, runs Clojure's REPL.
+
+# resolve links - $0 may be a softlink
+CLOJURE=$CLASSPATH:$(brew --cellar)/#{name}/#{version}/#{jar}
+
+java -cp $CLOJURE clojure.main "$@"
EOS
end
|
Revert "Simplify `clj` script and fix some quoting."
This reverts commit fc6f2c88fd080025f128f300c98ce4a66ed3365b.
|
diff --git a/ILGHttpConstants.podspec b/ILGHttpConstants.podspec
index abc1234..def5678 100644
--- a/ILGHttpConstants.podspec
+++ b/ILGHttpConstants.podspec
@@ -5,7 +5,7 @@ s.homepage = "https://github.com/ilg/ILGHttpConstants"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "Isaac Greenspan" => "ilg@2718.us" }
- s.source = { :git => "https://github.com/ilg/ILGHttpConstants.git", :tag => "1.0.0" }
+ s.source = { :git => "https://github.com/ilg/ILGHttpConstants.git", :tag => s.version.to_s }
s.source_files = "HTTP*.{h,m}"
s.requires_arc = false
end
|
Set podspec tag to reference version.
|
diff --git a/lib/metasploit/model/search/operator.rb b/lib/metasploit/model/search/operator.rb
index abc1234..def5678 100644
--- a/lib/metasploit/model/search/operator.rb
+++ b/lib/metasploit/model/search/operator.rb
@@ -1,7 +1,59 @@ module Metasploit
module Model
module Search
- # Namespace for search operators
+ # # Declaring operator classes
+ #
+ # ## Interface
+ #
+ # Operators do not need to subclass any specific superclass, but they are expected to define certain methods.
+ #
+ # class MyOperator
+ # #
+ # # Instance Methods
+ # #
+ #
+ # # @param klass [Class] The klass on which `search_with` was called.
+ # def initialize(attributes={})
+ # # ...
+ # end
+ #
+ # # Description of what this operator searches for.
+ # #
+ # # @return [String]
+ # def help
+ # # ...
+ # end
+ #
+ # # Name of this operator. The name of the operator is matched to the string before the ':' in a formatted
+ # # operation.
+ # #
+ # # @return [Symbol]
+ # def name
+ # # ...
+ # end
+ #
+ # # Creates a one or more operations based on `formatted_value`.
+ # #
+ # # @return [#operator, Array<#operator>] Operation with this operator as the operation's `operator`.
+ # def operate_on(formatted_value)
+ # # ...
+ # end
+ # end
+ #
+ # ## Help
+ #
+ # Instead of having define your own `#help` method for your operator `Class`, you can `include`
+ # {Metasploit::Model::Search::Operator::Help}.
+ #
+ # {include:Metasploit::Model::Search::Operator::Help}
+ #
+ # ## {Metasploit::Model::Search::Operator::Base}
+ #
+ # {include:Metasploit::Model::Search::Operator::Base}
+ #
+ # ## {Metasploit::Model::Search::Operator::Single}
+ #
+ # {include:Metasploit::Model::Search::Operator::Single}
module Operator
end
|
Document interface in namespace docs
MSP-10826
|
diff --git a/erd.gemspec b/erd.gemspec
index abc1234..def5678 100644
--- a/erd.gemspec
+++ b/erd.gemspec
@@ -18,6 +18,7 @@ gem.add_runtime_dependency 'rails-erd', ['>= 0.4.5']
gem.add_runtime_dependency 'nokogiri'
+ gem.add_development_dependency 'rails', '>= 3.2'
gem.add_development_dependency 'rspec-rails'
gem.add_development_dependency 'capybara'
gem.add_development_dependency 'rr'
|
Test under Rails >= 3.2
|
diff --git a/lib/rom/repository/struct_attributes.rb b/lib/rom/repository/struct_attributes.rb
index abc1234..def5678 100644
--- a/lib/rom/repository/struct_attributes.rb
+++ b/lib/rom/repository/struct_attributes.rb
@@ -22,7 +22,7 @@ actual = values.keys
unknown, missing = actual - attributes, attributes - actual
- if unknown.any? || missing.any?
+ if unknown.size > 0 || missing.size > 0
raise ROM::Struct::InvalidAttributes.new(self.class, missing, unknown)
end
end
|
Check size instead of using .any?
|
diff --git a/plugin/pivo.rb b/plugin/pivo.rb
index abc1234..def5678 100644
--- a/plugin/pivo.rb
+++ b/plugin/pivo.rb
@@ -1,6 +1,6 @@ require 'pivotal-tracker'
-# Usage: ruby pivo.rb <operation> API_TOKEN PROJECT_ID [<params>]
+# Usage: ruby pivo.rb <operation> <api_token> <project_id> [<params>]
class Pivo
attr_reader :project
|
Fix comment with usage instructions
|
diff --git a/black_list.rb b/black_list.rb
index abc1234..def5678 100644
--- a/black_list.rb
+++ b/black_list.rb
@@ -3,6 +3,7 @@ # included in the error message.
BlackList = [
+ ["coq-compcert.2.5.0", "Error: Corrupted compiled interface"], # flaky Makefile
["coq-compcert.2.7.1", "Error: Corrupted compiled interface"], # flaky Makefile
["coq-compcert.3.0.0", "Error: Corrupted compiled interface"], # flaky Makefile
["coq-compcert.3.1.0", "Error: Corrupted compiled interface"], # flaky Makefile
|
Add compcert.2.5.0 to the black-list
|
diff --git a/rbczmq.gemspec b/rbczmq.gemspec
index abc1234..def5678 100644
--- a/rbczmq.gemspec
+++ b/rbczmq.gemspec
@@ -7,7 +7,7 @@ s.version = ZMQ::VERSION
s.summary = "Ruby extension for CZMQ - High-level C Binding for ØMQ (http://czmq.zeromq.org)"
s.description = "Ruby extension for CZMQ - High-level C Binding for ØMQ (http://czmq.zeromq.org)"
- s.authors = ["Lourens Naudé", "James Tucker"]
+ s.authors = ["Lourens Naudé", "James Tucker", "Matt Connolly"]
s.email = ["lourens@methodmissing.com", "jftucker@gmail.com"]
s.homepage = "http://github.com/methodmissing/rbczmq"
s.date = Time.now.utc.strftime('%Y-%m-%d')
|
Add Matt Connolly as author
|
diff --git a/rack-rejector.gemspec b/rack-rejector.gemspec
index abc1234..def5678 100644
--- a/rack-rejector.gemspec
+++ b/rack-rejector.gemspec
@@ -6,11 +6,12 @@ Gem::Specification.new do |spec|
spec.name = 'rack-rejector'
spec.version = Rack::Rejector::VERSION
- spec.authors = ['Tristan Druyen']
- spec.email = ['tristan.druyen@invision.de']
+ spec.authors = ['Tristan Druyen', 'Maik Röhrig']
+ spec.email = ['tristan.druyen@invision.de',
+ 'maik.roehrig@invision.de']
- spec.summary = 'Write a short summary, because Rubygems requires one.'
- spec.homepage = ''
+ spec.summary = 'This gem is a Rack Middleware to reject requests.'
+ spec.homepage = 'https://github.com/ivx/rack-rejector'
spec.files = `git ls-files -z`
.split("\x0")
|
Add author, Github link and description to gemspec
|
diff --git a/raygun_client.gemspec b/raygun_client.gemspec
index abc1234..def5678 100644
--- a/raygun_client.gemspec
+++ b/raygun_client.gemspec
@@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = 'raygun_client'
- s.version = '0.2.0.1'
+ s.version = '0.2.1.0'
s.summary = 'Client for the Raygun API using the Obsidian HTTP client'
s.description = ' '
|
Package version is increased from 0.2.0.1 to 0.2.1.0
(Tags can be optionally added to the Raygun data)
|
diff --git a/db/migrate/20121011083330_add_unique_index_to_session_keys.rb b/db/migrate/20121011083330_add_unique_index_to_session_keys.rb
index abc1234..def5678 100644
--- a/db/migrate/20121011083330_add_unique_index_to_session_keys.rb
+++ b/db/migrate/20121011083330_add_unique_index_to_session_keys.rb
@@ -1,23 +1,12 @@ class AddUniqueIndexToSessionKeys < ActiveRecord::Migration
def self.up
- if ENV['RACK_ENV'] != "production"
- # Remove duplicate session keys
- res = execute "SELECT sessions.id, sessions.identity_id, foo.key FROM sessions
- JOIN (SELECT identity_id, key, COUNT(identity_id)
- AS NumOccurIdentity, COUNT(key) as NumOccurKey
- FROM sessions
- GROUP BY identity_id, key
- HAVING ( COUNT(identity_id) > 1 ) AND ( COUNT(key) > 1)
- ) AS foo
- ON sessions.key = foo.key AND sessions.identity_id = foo.identity_id"
- if res.any? and res[0]['id'].to_i
- res.each do |session|
- id = session['id'].to_i
- execute "DELETE FROM SESSIONS WHERE ID = #{id}"
- puts "Deleted duplicate session key #{id}"
- end
- end
- end
+ # Delete any old sessions that might have duplicated (keep the latest).
+ execute "DELETE FROM sessions where id IN (SELECT first_id FROM
+ (SELECT min(id) as first_id, identity_id, key, COUNT(identity_id)
+ AS NumOccurIdentity, COUNT(key) as NumOccurKey
+ FROM sessions
+ GROUP BY identity_id, key
+ HAVING ( COUNT(identity_id) > 1 ) AND ( COUNT(key) > 1)) AS foo)"
add_index :sessions, [:key], :unique => true, :name => 'session_key_uniqueness_index'
end
|
Fix migration to delete the duplicate key which is oldest before adding the unique session key index
|
diff --git a/Ruby/sorting/selection.rb b/Ruby/sorting/selection.rb
index abc1234..def5678 100644
--- a/Ruby/sorting/selection.rb
+++ b/Ruby/sorting/selection.rb
@@ -9,7 +9,7 @@
# Returns a sorted copy of the array in parameter
def self.sort(a)
- sorted = Array.new(a)
+ sorted = a.dup
self.sort!(sorted)
return sorted
end
|
Use dup method to duplicate the array
|
diff --git a/temando.gemspec b/temando.gemspec
index abc1234..def5678 100644
--- a/temando.gemspec
+++ b/temando.gemspec
@@ -22,4 +22,5 @@
gem.add_development_dependency 'rspec', '~> 2.11.0'
gem.add_development_dependency 'faker'
+ gem.add_development_dependency 'rake'
end
|
Add rake as a dependency so bundler doesn't get confused
|
diff --git a/spec/support/rails.rb b/spec/support/rails.rb
index abc1234..def5678 100644
--- a/spec/support/rails.rb
+++ b/spec/support/rails.rb
@@ -2,13 +2,17 @@ def self.root
File.join(Dir.pwd, 'tmp')
end
-
+
def self.env
@@environment ||= 'development'
end
-
+
def self.env=(env)
@@environment = env
+ end
+
+ def self.application
+ @@application ||= Struct.new(:paths).new(Hash.new([]))
end
end
|
Handle calls to Rails' application method in specs.
|
diff --git a/takeout.gemspec b/takeout.gemspec
index abc1234..def5678 100644
--- a/takeout.gemspec
+++ b/takeout.gemspec
@@ -5,7 +5,7 @@
Gem::Specification.new do |spec|
spec.name = "takeout"
- spec.version = takeout::VERSION
+ spec.version = Takeout::VERSION
spec.authors = ["hubert"]
spec.email = ["hubert77@gmail.com"]
spec.description = %q{castlight puzzle}
|
Fix capitalization in gemspec version
;
|
diff --git a/controller/search_engine.rb b/controller/search_engine.rb
index abc1234..def5678 100644
--- a/controller/search_engine.rb
+++ b/controller/search_engine.rb
@@ -10,6 +10,9 @@
def add( uri_id, search_param = nil )
redirect_referrer if ! logged_in? || ! user.admin?
+ if ! inside_stack?
+ push request.referrer
+ end
@uri = Ramalytics::URI[ uri_id.to_i ]
if @uri.nil?
@@ -26,11 +29,12 @@ subdomain_path_id: @uri.subdomain_path_id,
search_param: search_param
)
+ flash[ :success ] = "Search engine added."
rescue DBI::ProgrammingError => e
Ramaze::Log.info e
flash[ :error ] = "Search engine already added."
end
- redirect r( :index )
+ answer
end
end
|
Use stack helper to jump back to stats page after learning a search engine.
|
diff --git a/pronto.gemspec b/pronto.gemspec
index abc1234..def5678 100644
--- a/pronto.gemspec
+++ b/pronto.gemspec
@@ -22,7 +22,7 @@
s.add_dependency 'rugged', '~> 0.19.0'
s.add_dependency 'thor', '~> 0.18.0'
- s.add_dependency 'octokit', '~> 2.3.0'
+ s.add_dependency 'octokit', '~> 2.4.0'
s.add_dependency 'grit', '~> 2.5.0'
s.add_development_dependency 'rake', '~> 10.1.0'
s.add_development_dependency 'rspec', '~> 2.14.0'
|
Update octokit dependency to 2.4.0
|
diff --git a/lib/bundler/cli/pristine.rb b/lib/bundler/cli/pristine.rb
index abc1234..def5678 100644
--- a/lib/bundler/cli/pristine.rb
+++ b/lib/bundler/cli/pristine.rb
@@ -16,6 +16,7 @@ next
end
+ FileUtils.rm_rf spec.full_gem_path
spec.source.install(spec, :force => true)
when Source::Git
git_source = spec.source
|
Remove gem folder and re-install
|
diff --git a/lib/ctdb/session_handler.rb b/lib/ctdb/session_handler.rb
index abc1234..def5678 100644
--- a/lib/ctdb/session_handler.rb
+++ b/lib/ctdb/session_handler.rb
@@ -1,6 +1,14 @@+require 'forwardable'
+
module CT
class SessionHandler
-
+
+ extend Forwardable
+
+ def_delegator :@session, :logout, :logout!
+ def_delegator :@session, :active?
+ def_delegator :@session, :locked?
+
# !@attribute [r] session
# @return [CT::Session] The active session
attr_reader :session
|
Add delegate methods to CT::SessionHandler
|
diff --git a/lib/envied/configuration.rb b/lib/envied/configuration.rb
index abc1234..def5678 100644
--- a/lib/envied/configuration.rb
+++ b/lib/envied/configuration.rb
@@ -15,8 +15,8 @@ end
end
- def enable_defaults!(value = nil, &block)
- @defaults_enabled = (value.nil? ? block : value)
+ def enable_defaults!(value = true, &block)
+ @defaults_enabled = block_given? ? block.call : value
end
def defaults_enabled?
|
Enable defaults by calling without parameters
|
diff --git a/lib/foodcritic/rake_task.rb b/lib/foodcritic/rake_task.rb
index abc1234..def5678 100644
--- a/lib/foodcritic/rake_task.rb
+++ b/lib/foodcritic/rake_task.rb
@@ -23,7 +23,7 @@ end
def define
- desc "Lint Chef cookbooks"
+ desc "Lint Chef cookbooks" unless ::Rake.application.last_comment
task(name) do
result = FoodCritic::Linter.new.check(options)
if result.warnings.any?
|
Allow to override description of Rake task
Example:
desc "Run Foodcritic lint checks"
FoodCritic::Rake::LintTask.new
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.