diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/Casks/port-map.rb b/Casks/port-map.rb
index abc1234..def5678 100644
--- a/Casks/port-map.rb
+++ b/Casks/port-map.rb
@@ -2,6 +2,6 @@ url 'http://tcmportmapper.googlecode.com/files/PortMap-1.3.1-r46.zip'
homepage 'http://www.codingmonkeys.de/portmap'
version '1.3.1-r46'
- sha1 'bc294028f665a2e42cc32a6dc69493fd34542d8c'
+ sha256 '50e29f121139ee2f68ad978cb3921ef52f2dbfb5a0131c417516e4e5f1fa64af'
link 'Port Map.app'
end
| Update Portmap checksum to SHA256 |
diff --git a/FuzzySearch.podspec b/FuzzySearch.podspec
index abc1234..def5678 100644
--- a/FuzzySearch.podspec
+++ b/FuzzySearch.podspec
@@ -5,7 +5,7 @@ spec.homepage = 'https://github.com/rahulnadella/FuzzySearch'
spec.authors = { 'Rahul Nadella' => 'rahulnadella@yahoo.com' }
spec.summary = 'Utility class to find an approximate match for specific String'
- spec.source = { :git => 'https://github.com/rahulnadella/FuzzySearch.git', :tag => 'v1.1.0' }
+ spec.source = { :git => 'https://github.com/rahulnadella/FuzzySearch.git', :tag => '1.1.0' }
spec.platform = :ios, '8.0'
spec.requires_arc = true
spec.source_files = 'FuzzySearch.swift'
| Correct the format of the git tag specified in the podspec file. |
diff --git a/lib/custom/pdftk.rb b/lib/custom/pdftk.rb
index abc1234..def5678 100644
--- a/lib/custom/pdftk.rb
+++ b/lib/custom/pdftk.rb
@@ -6,7 +6,7 @@ "pdftk"
end
def source_url
- "http://s3.amazonaws.com/source_url_here"
+ "https://s3-eu-west-1.amazonaws.com/opg-lpa-test/pdftk.tar.gz"
end
def used?
File.exist?("#{build_path}/bin/pdftk") && File.exist?("#{build_path}/bin/lib/libgcj.so.12")
@@ -25,4 +25,4 @@ File.delete("#{build_path}/bin/pdftk") if File.exist?("#{build_path}/bin/pdftk")
end
-end+end
| Add pdtkf source S3 url
|
diff --git a/lib/doccy/config.rb b/lib/doccy/config.rb
index abc1234..def5678 100644
--- a/lib/doccy/config.rb
+++ b/lib/doccy/config.rb
@@ -12,7 +12,7 @@ self.endpoints = {
:development => "http://localhost:3000",
:staging => "http://staging.doccyapp.com",
- :production => "https://doccyapp.com"
+ :production => "https://www.doccyapp.com"
}
self.prefix = "/1"
| Change path for prod url
|
diff --git a/lib/idobata/hook.rb b/lib/idobata/hook.rb
index abc1234..def5678 100644
--- a/lib/idobata/hook.rb
+++ b/lib/idobata/hook.rb
@@ -8,6 +8,12 @@ require 'active_support/core_ext/object/to_param'
require 'active_support/core_ext/object/to_query'
require 'active_support/core_ext/string/inflections'
+
+begin
+ require 'linguist'
+rescue LoadError
+ # linguist doesn't work on Heroku, so ignore it
+end
require 'idobata/hook/html_safe_haml' unless defined?(Rails)
require 'idobata/hook/version'
| Enable syntax highlighting on local environment
|
diff --git a/lib/loaf/railtie.rb b/lib/loaf/railtie.rb
index abc1234..def5678 100644
--- a/lib/loaf/railtie.rb
+++ b/lib/loaf/railtie.rb
@@ -17,18 +17,18 @@ end
end
else
+ class Railtie
+ class << self
+ def insert_view
+ ActionController::Base.helper Loaf::ViewExtensions
+ end
+ def insert_controller
+ ActionController::Base.send :include, Loaf::ControllerExtensions
+ end
+ end
+ end # Railtie
+
Loaf::Railtie.insert_controller
Loaf::Railtie.insert_view
end
-
- class Railtie
- class << self
- def insert_view
- ActionController::Base.helper Loaf::ViewExtensions
- end
- def insert_controller
- ActionController::Base.send :include, Loaf::ControllerExtensions
- end
- end
- end # Railtie
end # Loaf
| Change to scope class before inclusion
|
diff --git a/lib/neo4j_helper.rb b/lib/neo4j_helper.rb
index abc1234..def5678 100644
--- a/lib/neo4j_helper.rb
+++ b/lib/neo4j_helper.rb
@@ -4,11 +4,11 @@ Neo4j::Session.query.match(:n).where(n: { id: id }).pluck(:n).last
end
- def normalize(str)
+ def normalize(str, is_key: true)
return str unless str.is_a?(String)
sanitized_str = str
- sanitized_str = str.tr('@', '') if str.start_with?('@')
+ sanitized_str = str.tr('-', '_').tr('@', '') if is_key
sanitized_str = str.split(':').last if str.start_with?('ceterms', 'ceasn')
sanitized_str
end
@@ -16,7 +16,7 @@ def cleanup(properties)
{}.tap do |clean_props|
properties.except('@context').each do |key, value|
- clean_props[normalize(key).to_sym] = normalize(value)
+ clean_props[normalize(key).to_sym] = normalize(value, is_key: false)
end
end
end
| Tweak behaviour of sanitize when target is a key
|
diff --git a/lib/atchu.rb b/lib/atchu.rb
index abc1234..def5678 100644
--- a/lib/atchu.rb
+++ b/lib/atchu.rb
@@ -11,6 +11,7 @@ end
def generate_models_at output_folder
+ Pathname.new(dir_path).children.each { |p| p.unlink }
tables = Connection.get.tables
models = tables.map{|table| Model.for_table(table)}
models.each{|model|ModelFileMaker.new(model).write_to output_folder}
| [DD] Clean up the output repo before re-loading active records
|
diff --git a/SNSServices.podspec b/SNSServices.podspec
index abc1234..def5678 100644
--- a/SNSServices.podspec
+++ b/SNSServices.podspec
@@ -1,6 +1,6 @@ Pod::Spec.new do |spec|
spec.name = 'SNSServices'
- spec.version = '0.1.0'
+ spec.version = '0.2.0'
spec.license = { :type => 'BSD' }
spec.homepage = 'https://github.com/Joohae/SNSServices'
spec.authors = { 'Joohae Kim' => 'joohaek@gmail.com' }
| Update pod version to 0.2
- add flickr
|
diff --git a/db/migrate/20090430122009_rename_license_agreement_version_to_tos_accepted.rb b/db/migrate/20090430122009_rename_license_agreement_version_to_tos_accepted.rb
index abc1234..def5678 100644
--- a/db/migrate/20090430122009_rename_license_agreement_version_to_tos_accepted.rb
+++ b/db/migrate/20090430122009_rename_license_agreement_version_to_tos_accepted.rb
@@ -1,8 +1,7 @@ class RenameLicenseAgreementVersionToTosAccepted < ActiveRecord::Migration
def self.up
- rename_column :users, :accepted_license_agreement_version, :terms_of_use
- change_column :users, :terms_of_use, :boolean
- User.update_all(["terms_of_use = ?", false])
+ remove_column :users, :accepted_license_agreement_version
+ add_column :users, :terms_of_use, :boolean, :default => false
end
def self.down
| Fix error with migration on PostgreSQL
In PostgreSQL, changing a column type from varchar to boolean doesn't
automatically convert the contents as MySQL does. Therefore we remove
the old column and add the new one instead of changing the type.
|
diff --git a/core/thread/exclusive_spec.rb b/core/thread/exclusive_spec.rb
index abc1234..def5678 100644
--- a/core/thread/exclusive_spec.rb
+++ b/core/thread/exclusive_spec.rb
@@ -1,15 +1,13 @@ require_relative '../../spec_helper'
describe "Thread.exclusive" do
- verbose = Object
-
before :each do
ScratchPad.clear
- verbose, $VERBOSE = $VERBOSE, nil
+ $VERBOSE, @verbose = nil, $VERBOSE
end
after :each do
- $VERBOSE = verbose
+ $VERBOSE = @verbose
end
it "yields to the block" do
| Use an ivar to save state in before/after like other specs
|
diff --git a/schemap.gemspec b/schemap.gemspec
index abc1234..def5678 100644
--- a/schemap.gemspec
+++ b/schemap.gemspec
@@ -6,8 +6,8 @@ Gem::Specification.new do |spec|
spec.name = "schemap"
spec.version = Schemap::VERSION
- spec.authors = ["Nathaniel Wroblewski"]
- spec.email = ["nathanielwroblewski@gmail.com"]
+ spec.authors = ["Nathaniel Wroblewski", "Kenneth Rettberg"]
+ spec.email = ["nathanielwroblewski@gmail.com", "kenrettberg@gmail.com"]
spec.description = %q{Visualize your Rails schema}
spec.summary = %q{Converts your Rails schema to a D3 force graph}
spec.homepage = "https://github.com/NathanielWroblewski/schemap"
| Add Ken to authors in gemspec
|
diff --git a/lisp_test.rb b/lisp_test.rb
index abc1234..def5678 100644
--- a/lisp_test.rb
+++ b/lisp_test.rb
@@ -2,4 +2,6 @@
program = "(begin (define r 10) (* pi (* r r)))"
puts tokenize(program) == ['(', 'begin', '(', 'define', 'r', '10', ')', '(', '*', 'pi', '(', '*', 'r', 'r', ')', ')', ')']
-puts parse(program) == [:begin, [:define, :r, 10], [:*, :pi, [:*, :r, :r]]]+puts parse(program) == [:begin, [:define, :r, 10], [:*, :pi, [:*, :r, :r]]]
+puts eval(parse("(+ 3 5)")) == 8
+puts eval(parse("(+ 3 5 8)")) == 16 | Add tests for + operator
|
diff --git a/spec/lib/open_food_network/orders_and_fulfillments_report/distributor_totals_by_supplier_report_spec.rb b/spec/lib/open_food_network/orders_and_fulfillments_report/distributor_totals_by_supplier_report_spec.rb
index abc1234..def5678 100644
--- a/spec/lib/open_food_network/orders_and_fulfillments_report/distributor_totals_by_supplier_report_spec.rb
+++ b/spec/lib/open_food_network/orders_and_fulfillments_report/distributor_totals_by_supplier_report_spec.rb
@@ -0,0 +1,37 @@+require "spec_helper"
+
+RSpec.describe OpenFoodNetwork::OrdersAndFulfillmentsReport::DistributorTotalsBySupplierReport do
+ let!(:distributor) { create(:distributor_enterprise) }
+
+ let!(:order) do
+ create(:completed_order_with_totals, line_items_count: 1, distributor: distributor)
+ end
+
+ let(:current_user) { distributor.owner }
+ let(:permissions) { OpenFoodNetwork::Permissions.new(current_user) }
+
+ let(:report) do
+ report_options = { report_type: described_class::REPORT_TYPE }
+ OpenFoodNetwork::OrdersAndFulfillmentsReport.new(permissions, report_options, true)
+ end
+
+ let(:report_table) do
+ OpenFoodNetwork::OrderGrouper.new(report.rules, report.columns).table(report.table_items)
+ end
+
+ it "generates the report" do
+ expect(report_table.length).to eq(2)
+ end
+
+ it "has a variant row under the distributor" do
+ distributor_name_field = report_table.first[0]
+ expect(distributor_name_field).to eq distributor.name
+
+ supplier = order.line_items.first.variant.product.supplier
+ supplier_name_field = report_table.first[1]
+ expect(supplier_name_field).to eq supplier.name
+
+ total_field = report_table.last[1]
+ expect(total_field).to eq I18n.t("admin.reports.total")
+ end
+end
| Add smoke test for Distributor Totals by Supplier report
|
diff --git a/spec/draper/model_support_spec.rb b/spec/draper/model_support_spec.rb
index abc1234..def5678 100644
--- a/spec/draper/model_support_spec.rb
+++ b/spec/draper/model_support_spec.rb
@@ -1,6 +1,6 @@ require 'spec_helper'
-describe Draper::ActiveModelSupport do
+describe Draper::ModelSupport do
subject { Product.new }
describe '#decorator' do
| Correct name of specced module
|
diff --git a/spec/features/environment_spec.rb b/spec/features/environment_spec.rb
index abc1234..def5678 100644
--- a/spec/features/environment_spec.rb
+++ b/spec/features/environment_spec.rb
@@ -0,0 +1,9 @@+require 'spec_helper'
+
+describe 'environmet', type: :feature do
+ it 'should show server environmet' do
+ visit '/env'
+
+ page.should have_content('Environment Variables')
+ end
+end
| Test loading of env page
|
diff --git a/railties/lib/rails_generator/generators/components/model/templates/unit_test.rb b/railties/lib/rails_generator/generators/components/model/templates/unit_test.rb
index abc1234..def5678 100644
--- a/railties/lib/rails_generator/generators/components/model/templates/unit_test.rb
+++ b/railties/lib/rails_generator/generators/components/model/templates/unit_test.rb
@@ -5,6 +5,6 @@
# Replace this with your real tests.
def test_truth
- assert_kind_of <%= class_name %>, <%= table_name %>(:first)
+ assert true
end
end
| Stop annoying me when Im changing fixtures for other tests first
git-svn-id: afc9fed30c1a09d8801d1e4fbe6e01c29c67d11f@3709 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
diff --git a/db/migrate/20140413152201_fix_issues_column_types.rb b/db/migrate/20140413152201_fix_issues_column_types.rb
index abc1234..def5678 100644
--- a/db/migrate/20140413152201_fix_issues_column_types.rb
+++ b/db/migrate/20140413152201_fix_issues_column_types.rb
@@ -0,0 +1,9 @@+class FixIssuesColumnTypes < ActiveRecord::Migration
+ def up
+ remove_column :issues, :bug_id
+ add_column :issues, :bug_id, :integer
+ change_column :issues, :cc, :text
+ change_column :issues, :release_notes, :text
+ change_column :issues, :resolution, :text
+ end
+end
| [cfme_bz] Fix column types on Issues table
|
diff --git a/0_code_wars/character_concatenation.rb b/0_code_wars/character_concatenation.rb
index abc1234..def5678 100644
--- a/0_code_wars/character_concatenation.rb
+++ b/0_code_wars/character_concatenation.rb
@@ -8,3 +8,8 @@ left, right = word.slice!(0...word.size/2), word
left.chars.zip(right.chars.reverse).zip(1..word_size_orig/2).join
end
+
+# --- iteration 2 ---
+def char_concat(str)
+ (1..str.size/2).reduce(""){ |a, n| a << str[n-1] << str[-n] << n.to_s }
+end
| Add character concatenation iteration 2
|
diff --git a/ep.rb b/ep.rb
index abc1234..def5678 100644
--- a/ep.rb
+++ b/ep.rb
@@ -8,11 +8,13 @@
osm_file = 'map.osm'
node_start = '3167844735'
-node_end = '2999413127'
+node_end = '2999412925'
loader = Mormon::OSM::Loader.new(osm_file)
router = Mormon::OSM::Router.new(loader)
res = router.find_route(node_start, node_end, :foot)
+
+raise 'No route found' if res[1].empty?
# Reverse coords since KML uses <lon,lat> instead of <lat,lon>
placemark = KML::Placemark.new(
| Raise on no route found
|
diff --git a/core/string/equal_value_spec.rb b/core/string/equal_value_spec.rb
index abc1234..def5678 100644
--- a/core/string/equal_value_spec.rb
+++ b/core/string/equal_value_spec.rb
@@ -24,4 +24,8 @@
('hello' == obj).should == true
end
+
+ it "is not fooled by NUL characters" do
+ "abc\0def".should_not == "abc\0xyz"
+ end
end
| Test for equality with embedded NUL chars
Signed-off-by: Brian Ford <31227094f3baea959abbdb82d34f0bc93c1f3b36@engineyard.com>
|
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 = 'evt-log'
- s.version = '0.4.3.3'
+ s.version = '0.4.3.4'
s.summary = 'Logging to STD IO with levels, tagging, and coloring'
s.description = ' '
| Package version is increased from 0.4.3.3 to 0.4.3.4
|
diff --git a/collection_data/extracter.rb b/collection_data/extracter.rb
index abc1234..def5678 100644
--- a/collection_data/extracter.rb
+++ b/collection_data/extracter.rb
@@ -19,7 +19,12 @@ in_path = File.join('tmp', File.basename(entry.name))
entry.extract(in_path)
processor = CollectionData::ImageProcessor.new
- processor.process_image(filename: filename, in_path: in_path, out_path: out_path)
+ begin
+ processor.process_image(filename: filename, in_path: in_path, out_path: out_path)
+ rescue Exception => e
+ Raven.capture_exception(e, extra: { in_path: in_path })
+ end
+
FileUtils.rm(in_path)
end
| Change the image importer to be more lenient with errors, sending an error report rather than just stopping the importer in its tracks.
|
diff --git a/run.rb b/run.rb
index abc1234..def5678 100644
--- a/run.rb
+++ b/run.rb
@@ -1,5 +1,3 @@-require "formula"
-
class Run < Formula
homepage "http://runscripts.org"
url "https://github.com/runscripts/run/archive/0.3.6.tar.gz"
@@ -18,6 +16,6 @@ end
test do
- system "#{bin}/run", "--help"
+ system "#{bin}/run", "pt-summary"
end
end
| Remove require and add better test
|
diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb
index abc1234..def5678 100644
--- a/config/initializers/paperclip.rb
+++ b/config/initializers/paperclip.rb
@@ -3,3 +3,9 @@ Paperclip.interpolates :safe_filename do |attachment, style|
filename(attachment, style).gsub(/#/, '-')
end
+
+# XLS files created by the spreadsheet gem have problems with their filetypes
+# https://github.com/zdavatz/spreadsheet/issues/97
+Paperclip.options[:content_type_mappings] = {
+ xls: "CDF V2 Document, No summary info"
+}
| Allow xls files created via spreadsheet gem
|
diff --git a/config/initializers/redcarpet.rb b/config/initializers/redcarpet.rb
index abc1234..def5678 100644
--- a/config/initializers/redcarpet.rb
+++ b/config/initializers/redcarpet.rb
@@ -32,8 +32,11 @@
github_link_host = "#{@package.url}/blob/master/"
+ link_sub_string = 'target="_blank" href="'
+ link_sub_string += github_link_host
+
readme_markdown.gsub! \
- /(?<=\<a href=")(?!http)/, github_link_host
+ /(?<=\<a )href="(?!http)/, link_sub_string
readme_markdown
end
| Make sure readme markdown links open in new tab |
diff --git a/lib/childprocess/unix/process.rb b/lib/childprocess/unix/process.rb
index abc1234..def5678 100644
--- a/lib/childprocess/unix/process.rb
+++ b/lib/childprocess/unix/process.rb
@@ -30,6 +30,7 @@
assert_started
pid, status = ::Process.waitpid2(@pid, ::Process::WNOHANG)
+ pid = nil if pid == 0 # may happen on jruby
log(:pid => pid, :status => status)
| Fix JRuby issue with posix spawn.
Process.waitpid2 can apparently return 0 instead of nil on JRuby, if the process is still alive.
|
diff --git a/active_model_exporters.gemspec b/active_model_exporters.gemspec
index abc1234..def5678 100644
--- a/active_model_exporters.gemspec
+++ b/active_model_exporters.gemspec
@@ -19,5 +19,5 @@
spec.required_ruby_version = '>= 2.0.0'
- spec.add_dependency 'activemodel', '>= 3.0'
+ spec.add_dependency 'activemodel', '>= 4.0'
end
| Fix active model version in gemspec
|
diff --git a/lib/omniauth/strategies/slack.rb b/lib/omniauth/strategies/slack.rb
index abc1234..def5678 100644
--- a/lib/omniauth/strategies/slack.rb
+++ b/lib/omniauth/strategies/slack.rb
@@ -6,7 +6,7 @@
option :name, "slack"
- option :authorize_options, [ :scope, :team ]
+ option :authorize_options, [ :scope, :team ]
option :client_options, {
site: "https://slack.com",
@@ -22,6 +22,13 @@
info do
{
+ name: user_info['user']['profile']['real_name_normalized'],
+ email: user_info['user']['profile']['email'],
+ nickname: raw_info['user'],
+ first_name: user_info['user']['profile']['first_name'],
+ last_name: user_info['user']['profile']['last_name'],
+ description: user_info['user']['profile']['title'],
+ image: user_info['user']['profile']['image_192'],
team: raw_info['team'],
user: raw_info['user'],
team_id: raw_info['team_id'],
@@ -30,13 +37,17 @@ end
extra do
- {:raw_info => raw_info}
+ {:raw_info => raw_info, :user_info => user_info}
+ end
+
+ def user_info
+ @user_info ||= access_token.get("/api/users.info?user=#{raw_info['user_id']}").parsed
end
def raw_info
- @raw_info ||= access_token.get('/api/auth.test').parsed
+ @raw_info ||= access_token.get("/api/auth.test").parsed
end
end
end
-end+end
| Add some profile information to info block
I needed to access some profile informations for my app, so I modified
the info block to include some information returned from the users.info
API call (https://api.slack.com/methods/users.info)
To retrieve this information I also added a user_info function, that
requires the user_id provided by raw_info, and therefore cannot replace
it.
|
diff --git a/metadata.rb b/metadata.rb
index abc1234..def5678 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -14,5 +14,5 @@
depends 'apt', '~> 2.5'
depends 'ark', '~> 4.0'
-depends 'java', '~> 1.27'
+depends 'java', '~> 4.3'
depends 'chef_nginx', '~> 5.0'
| Upgrade to java cookbook v4.x
|
diff --git a/metadata.rb b/metadata.rb
index abc1234..def5678 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -3,7 +3,7 @@ maintainer_email "chris@educreations.com"
license "Apache 2.0"
description "Sets up an environment for statsd instances."
-long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "0.0.1"
%w{ debian ubuntu }.each do |os|
| Read the correct readme file
|
diff --git a/spec/sweet_spec.rb b/spec/sweet_spec.rb
index abc1234..def5678 100644
--- a/spec/sweet_spec.rb
+++ b/spec/sweet_spec.rb
@@ -3,8 +3,8 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
describe "SweetJS" do
- it "compiles macros" do
- source = (<<-JS)
+ let(:source) {
+ (<<-JS)
macro def {
case $name:ident $params $body => {
function $name $params $body
@@ -14,21 +14,14 @@ console.log("Macros are sweet!");
}
JS
+ }
+
+ it "compiles macros" do
compiled = SweetJS.new.compile(source)
compiled.should =~ /function sweet/
end
it "has a class method to compile macros" do
- source = (<<-JS)
- macro def {
- case $name:ident $params $body => {
- function $name $params $body
- }
- }
- def sweet(a) {
- console.log("Macros are sweet!");
- }
- JS
compiled = SweetJS.compile(source)
compiled.should =~ /function sweet/
end
@@ -40,4 +33,11 @@ JS
}.should raise_error(SweetJS::Error)
end
+
+ it "compiles IO objects as well as strings" do
+ io = StringIO.new(source)
+ lambda {
+ SweetJS.compile(io).should =~ /function sweet/
+ }.should_not raise_error(SweetJS::Error)
+ end
end
| Add test for compiling IO objects
|
diff --git a/metadata.rb b/metadata.rb
index abc1234..def5678 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -8,5 +8,6 @@ long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.1.2'
depends 'magic_shell', '>= 1.0.0'
-supports 'centos'
-supports 'debian'
+supports 'centos', '~> 6.0'
+supports 'centos', '~> 7.0'
+supports 'debian', '~> 8.0'
| Add versions for centos and debian.
|
diff --git a/lib/smartsheet/api/net_client.rb b/lib/smartsheet/api/net_client.rb
index abc1234..def5678 100644
--- a/lib/smartsheet/api/net_client.rb
+++ b/lib/smartsheet/api/net_client.rb
@@ -0,0 +1,60 @@+require_relative 'headers'
+require_relative 'urls'
+
+module Smartsheet
+ module API
+ class RequestBuilder
+ def initialize(token, endpoint_spec, request_spec, req)
+ @token = token
+ @endpoint_spec = endpoint_spec
+ @request_spec = request_spec
+ @req = req
+ end
+
+ def apply
+ build_url
+ build_headers
+
+ request_spec.attach_params(req)
+ request_spec.attach_body(req)
+ end
+
+ private
+
+ attr_accessor
+ attr_reader :token, :endpoint_spec, :request_spec, :req
+
+ def build_url
+ Smartsheet::API::UrlBuilder
+ .new
+ .for_endpoint(endpoint_spec)
+ .for_request(request_spec)
+ .apply(req)
+ end
+
+ def build_headers
+ Smartsheet::API::HeaderBuilder
+ .new(token)
+ .for_endpoint(endpoint_spec)
+ .for_request(request_spec)
+ .apply(req)
+ end
+ end
+
+ class NetClient
+ def initialize(token)
+ @token = token
+ end
+
+ def send(endpoint_spec:, request_spec:)
+ Faraday.send(endpoint_spec.method) do |req|
+ RequestBuilder.new(token, endpoint_spec, request_spec, req).apply
+ end
+ end
+
+ private
+
+ attr_reader :token
+ end
+ end
+end | Create a net client that composes and executes requests. (Partial Commit)
|
diff --git a/dev/irb_tools.rb b/dev/irb_tools.rb
index abc1234..def5678 100644
--- a/dev/irb_tools.rb
+++ b/dev/irb_tools.rb
@@ -15,8 +15,8 @@ end
class String
- def from_transit
+ def from_transit(format=:json)
sio = StringIO.new(self)
- Transit::Reader.new(:json).read(sio)
+ Transit::Reader.new(format).read(sio)
end
end
| Make json optional on read
|
diff --git a/metadata.rb b/metadata.rb
index abc1234..def5678 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -4,7 +4,7 @@ license 'Apache 2.0'
description 'Installs/Configures TYPO3'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version '0.5.0'
+version '0.6.0'
%w{
| Increase version number to 0.6.0
Support MailCatcher in Vagrant setups
|
diff --git a/spec/feature/dashboard_account_settings_spec.rb b/spec/feature/dashboard_account_settings_spec.rb
index abc1234..def5678 100644
--- a/spec/feature/dashboard_account_settings_spec.rb
+++ b/spec/feature/dashboard_account_settings_spec.rb
@@ -2,16 +2,26 @@
feature 'Dashboard' do
background do
- @user = create(:user) # create a new user
- @user_changed = build(:user) # build an alternative user
+ @user = create :user # create a new user
+ @user_changed = build :user # build an alternative user
# login as @user
- visit '/login'
+ visit '/users/sign_in'
within('#new_user') do
fill_in 'Email', with: @user.email
fill_in 'Password', with: @user.password
end
click_button 'Log in'
+ end
+
+ scenario 'fail to change username on incorrect password' do
+ visit '/dashboard/account'
+ within '#edit_user' do
+ fill_in 'Username', with: @user_changed.username
+ fill_in 'Current password', with: "incorrect_#{@user.password}"
+ end
+ click_button 'Update'
+ expect(page).to have_content 'password is invalid'
end
context 'in account settings' do
@@ -24,15 +34,5 @@ click_button 'Update'
expect(page).to have_content 'Your account has been updated successfully.'
end
-
- scenario 'fail to change username on incorrect password' do
- visit '/dashboard/account'
- within '#edit_user' do
- fill_in 'Username', with: @user_changed.username
- fill_in 'Current password', with: "incorrect_#{@user.password}"
- end
- click_button 'Update'
- expect(page).to have_content 'password is invalid'
- end
end
end
| Make account settings tests work
|
diff --git a/week-6/nested_data_solution.rb b/week-6/nested_data_solution.rb
index abc1234..def5678 100644
--- a/week-6/nested_data_solution.rb
+++ b/week-6/nested_data_solution.rb
@@ -0,0 +1,67 @@+# RELEASE 2: NESTED STRUCTURE GOLF
+# Hole 1
+# Target element: "FORE"
+
+array = [[1,2], ["inner", ["eagle", "par", ["FORE", "hook"]]]]
+
+# attempts: 2
+# ============================================================
+p array[1][1][2][0]
+
+
+# ============================================================
+
+# Hole 2
+# Target element: "congrats!"
+
+hash = {outer: {inner: {"almost" => {3 => "congrats!"}}}}
+
+# attempts: 1
+# ============================================================
+p hash[:outer][:inner]["almost"][3]
+
+
+# ============================================================
+
+
+# Hole 3
+# Target element: "finished"
+
+nested_data = {array: ["array", {hash: "finished"}]}
+
+# attempts:
+# ============================================================
+p nested_data[:array][1][:hash]
+
+
+# ============================================================
+
+# RELEASE 3: ITERATE OVER NESTED STRUCTURES
+
+number_array.map! do |element|
+ if element.kind_of?(Array)
+ element.map! {|inner| inner + 5}
+ else
+ element + 5
+ end
+end
+p number_array
+
+
+# Bonus:
+=begin
+startup_names = ["bit", ["find", "fast", ["optimize", "scope"]]]
+startup_names[1][2].map! {|name| name <<"ly"}
+p startup_names
+=end
+#Reflection
+=begin
+What are some general rules you can apply to nested arrays?
+In the preview video for this week she goes over the importance of the different levels. If it helps to space it out, that
+could be something to look out. Essentially, the rules are the same it's just looking at the different depths to the nested arrays.
+What are some ways you can iterate over nested arrays?
+Using each or map ( in our case map! for destructive) and flow control in order to see if the element is an array and then iterate through it as well.
+Did you find any good new methods to implement or did you re-use one you were already familiar with? What was it and why did you decide that was a good option?
+We Iterated using the destructive method (!) of map. This allowed us to affect the element in the original directly.
+
+=end | Add solution and reflection to nested data challenge
|
diff --git a/app/helpers/sessions_helper.rb b/app/helpers/sessions_helper.rb
index abc1234..def5678 100644
--- a/app/helpers/sessions_helper.rb
+++ b/app/helpers/sessions_helper.rb
@@ -4,7 +4,7 @@ end
def redirect_back_or(default)
- redirect_to(session[:original_url]||default)
+ redirect_to(session[:original_url] || default)
end
end
| Add a white space after/before of || operator in SessionsHelper
|
diff --git a/app/models/installer_report.rb b/app/models/installer_report.rb
index abc1234..def5678 100644
--- a/app/models/installer_report.rb
+++ b/app/models/installer_report.rb
@@ -9,24 +9,54 @@ find /^Local jar url: (.*)$/
end
- def local_address
- find /^local_socket_address = (.*)$ /
+ def local_socket_address
+ find /^local_socket_address = (.*)$/
+ end
+
+ def local_host_address
+ find /^local_host_address = (.*)$/
+ end
+
+ def os
+ find(/^os.name = (.*)$/) || "Mac"
+ end
+
+ def java
+ find /^java.runtime.version = (.*)$/
end
def using_temp_dir?
find(/^Writing to a (temp directory)!$/) == "temp directory"
end
+ def already_existed?
+ find(/^Local jar already (existed)!$/) == "existed"
+ end
+
+ def learner_id
+ id = find(/^Not found URL: .*\/portal\/learners\/(\d+).jnlp.*$/)
+ return (id ? id.to_i : nil)
+ end
+
def learner
- learner_id = find(/^Not found URL: .*\/portal\/learners\/(\d+).jnlp.*$/)
- l = nil
- l = Portal::Learner.find(learner_id.to_i)
+ lid = learner_id
+ l = (lid ? Portal::Learner.find_by_id(lid) : nil)
+ puts "Learner id existed: #{lid}, but learner not found (ir: #{self.id})." if !lid.nil? && l.nil?
return l
+ end
+
+ def local_user
+ find /^user.name = (.*)$/
+ end
+
+ def install_level
+ return "failed" unless success
+ return (find(/^Trying (temp) folder/) || find(/^Trying (user) folder/) || find(/^Trying (system) folder/))
end
# expects a regular expression with at least one capture group.
# if more than one capture group is present, only the first group value will be reported
def find(regexp)
- self.body[regexp] ? $1 : "not found"
+ self.body[regexp] ? $1 : nil
end
end
| Add helper methods for InstallerReport
|
diff --git a/app/models/tiny_mce_article.rb b/app/models/tiny_mce_article.rb
index abc1234..def5678 100644
--- a/app/models/tiny_mce_article.rb
+++ b/app/models/tiny_mce_article.rb
@@ -3,11 +3,11 @@ class TinyMceArticle < TextArticle
def self.short_description
- _('Text article with visual editor')
+ _('Article')
end
def self.description
- _('Not accessible for visually impaired users.')
+ _('Add a new text article.')
end
xss_terminate :only => [ ]
| Make a more inviting text for new text articles.
|
diff --git a/app/services/notify_service.rb b/app/services/notify_service.rb
index abc1234..def5678 100644
--- a/app/services/notify_service.rb
+++ b/app/services/notify_service.rb
@@ -14,10 +14,27 @@
private
+ def blocked_mention?
+ FeedManager.instance.filter?(:mentions, @notification.mention.status, @recipient)
+ end
+
+ def blocked_favourite?
+ false
+ end
+
+ def blocked_follow?
+ false
+ end
+
+ def blocked_reblog?
+ false
+ end
+
def blocked?
- blocked = false
+ blocked = false
blocked ||= @recipient.id == @notification.from_account.id
blocked ||= @recipient.blocking?(@notification.from_account)
+ blocked ||= send("blocked_#{@notification.type}?")
blocked
end
| Use old rules for mention notifications as for mentions timeline
|
diff --git a/color-theme-solarized.rb b/color-theme-solarized.rb
index abc1234..def5678 100644
--- a/color-theme-solarized.rb
+++ b/color-theme-solarized.rb
@@ -0,0 +1,10 @@+require 'formula'
+
+class ColorThemeSolarized < Formula
+ homepage 'https://github.com/sellout/emacs-color-theme-solarized'
+ head 'https://github.com/sellout/emacs-color-theme-solarized.git'
+
+ def install
+ (share+'emacs/themes/solarized').install Dir['*.el']
+ end
+end
| Add the solarized color theme
|
diff --git a/app/behaviour/reservation_server_information.rb b/app/behaviour/reservation_server_information.rb
index abc1234..def5678 100644
--- a/app/behaviour/reservation_server_information.rb
+++ b/app/behaviour/reservation_server_information.rb
@@ -27,7 +27,7 @@
def rcon_string
if server
- "rcon_address #{public_ip}:#{public_port}; rcon_password \"#{rcon}\""
+ "rcon_address #{server.ip}:#{server.port}; rcon_password \"#{rcon}\""
else
"rcon_password \"#{rcon}\""
end
| Use real IP and port for RCON string
|
diff --git a/app/controllers/operator/messages_controller.rb b/app/controllers/operator/messages_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/operator/messages_controller.rb
+++ b/app/controllers/operator/messages_controller.rb
@@ -8,21 +8,21 @@ #
# If no `Processor` can be found, a 404 will be raised.
#
- # If any of the `Processor`s raise an exception, a 500 error will be
- # raised and the processing wilt stop immediately
+ # If any of the `Processor`s raise an exception, a 500 error will be
+ # raised and the processing wilt stop immediately
def create
processors = Processor.subscribers_for(params[:queue])
-
+
if processors.empty?
render :status => 404, :nothing => true
return
end
-
+
processors.each do |processor|
processor.process(params[:message])
end
-
- render :status => 200, :nothing => true
+
+ head :ok
end
end
end
| Update `Operator::MessagesController` so it works in later rails versions
|
diff --git a/mrbgem.rake b/mrbgem.rake
index abc1234..def5678 100644
--- a/mrbgem.rake
+++ b/mrbgem.rake
@@ -3,4 +3,6 @@ spec.author = 'Hiroshi Mimaki'
spec.summary = 'Tiny IO library for mruby'
spec.version = '0.1.0'
+
+ spec.add_test_dependency('mruby-string-ext', :core => 'mruby-string-ext')
end
| Fix test for mruby 2.1.0.
|
diff --git a/ellen-syoboi_calendar.gemspec b/ellen-syoboi_calendar.gemspec
index abc1234..def5678 100644
--- a/ellen-syoboi_calendar.gemspec
+++ b/ellen-syoboi_calendar.gemspec
@@ -17,7 +17,7 @@ spec.require_paths = ["lib"]
spec.add_dependency "ellen", ">= 0.2.0"
- spec.add_dependency "syoboi_calendar", ">= 0.2.1"
+ spec.add_dependency "syoboi_calendar", "0.2.1"
spec.add_development_dependency "bundler", "~> 1.6"
spec.add_development_dependency "rake"
spec.add_development_dependency "rspec", "2.14.1"
| Fix syoboi_calendar gem version for safety
|
diff --git a/spec/centos/corepackages_spec.rb b/spec/centos/corepackages_spec.rb
index abc1234..def5678 100644
--- a/spec/centos/corepackages_spec.rb
+++ b/spec/centos/corepackages_spec.rb
@@ -1,10 +1,15 @@ require 'spec_helper'
+
+describe package('cron') do
+ it { should be_installed }
+end
describe package('iputils') do
it { should be_installed }
end
-describe package('curl') do
+# The @core installation does not include 'man'...
+describe package('man') do
it { should be_installed }
end
@@ -12,7 +17,14 @@ it { should be_installed }
end
-# The @core installation does not include 'man'...
-describe package('man') do
+describe package('sudo') do
it { should be_installed }
end
+
+describe package('vim-minimal') do
+ it { should be_installed }
+end
+
+describe package('which') do
+ it { should be_installed }
+end
| Make sure cron, sudo which and vim-minimal are installed
|
diff --git a/spec/models/text_message_spec.rb b/spec/models/text_message_spec.rb
index abc1234..def5678 100644
--- a/spec/models/text_message_spec.rb
+++ b/spec/models/text_message_spec.rb
@@ -0,0 +1,10 @@+require 'rails_helper'
+
+describe TextMessage do
+
+ context "::client" do
+ it "should return a twilio client object" do
+ expect(TextMessage.client).to be_a(Twilio::REST::Client)
+ end
+ end
+end
| Add spec for TextMessage model
|
diff --git a/spec/rails_app/lib/mailer_previews/mailer_preview.rb b/spec/rails_app/lib/mailer_previews/mailer_preview.rb
index abc1234..def5678 100644
--- a/spec/rails_app/lib/mailer_previews/mailer_preview.rb
+++ b/spec/rails_app/lib/mailer_previews/mailer_preview.rb
@@ -13,7 +13,7 @@ def send_batch_notification_email
target = User.find_by_name('Ichiro')
target_notifications = target.notification_index_with_attributes(filtered_by_key: 'comment.default')
- ActivityNotification::Mailer.send_batch_notification_email(target, target_notifications)
+ ActivityNotification::Mailer.send_batch_notification_email(target, target_notifications, 'batch.comment.default')
end
end | Fix batch email preview in test rails app
|
diff --git a/examples/long_line_checker.rb b/examples/long_line_checker.rb
index abc1234..def5678 100644
--- a/examples/long_line_checker.rb
+++ b/examples/long_line_checker.rb
@@ -13,3 +13,17 @@ end
puts
end
+
+__END__
+app/controllers/blogs_controller.rb
+ 8: Line length 169 should be less than 128 characters
+
+app/models/blog.rb
+ 4: Line length 169 should be less than 128 characters
+
+spec/controllers/blogs_controller_spec.rb
+ 6: Line length 139 should be less than 128 characters
+ 10: Line length 194 should be less than 128 characters
+ 16: Line length 145 should be less than 128 characters
+ 17: Line length 139 should be less than 128 characters
+ 21: Line length 194 should be less than 128 characters
| Add example output of long line checker
|
diff --git a/bootstrap-haml-helpers.gemspec b/bootstrap-haml-helpers.gemspec
index abc1234..def5678 100644
--- a/bootstrap-haml-helpers.gemspec
+++ b/bootstrap-haml-helpers.gemspec
@@ -16,12 +16,11 @@ s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"]
s.add_dependency "rails", "~> 3.2.12"
+ s.add_dependency "haml", "~> 3.1.7"
- s.add_dependency "bootstrap-sass", "2.3.1.0"
- s.add_dependency "compass-rails", "~> 1.0.3"
- s.add_dependency "compass", "~> 0.12.0"
- s.add_dependency "haml", "~> 3.1.7"
- s.add_dependency "sass-rails", "~> 3.2.5"
-
+ s.add_development_dependency "bootstrap-sass", "2.3.1.0"
+ s.add_development_dependency "compass-rails", "~> 1.0.3"
+ s.add_development_dependency "compass", "~> 0.12.0"
+ s.add_development_dependency "sass-rails", "~> 3.2.5"
s.add_development_dependency "sqlite3"
end
| Make sass, compass, etc. development dependencies instead.
|
diff --git a/app/models/topic.rb b/app/models/topic.rb
index abc1234..def5678 100644
--- a/app/models/topic.rb
+++ b/app/models/topic.rb
@@ -25,9 +25,7 @@ end
def guide_content_ids
- topic_sections.map do |topic_section|
- topic_section.guides.map(&:content_id)
- end.flatten
+ guides.pluck(:content_id).uniq
end
private
| Refactor guide_content_ids to use guides has_many
|
diff --git a/fastly-deploy.gemspec b/fastly-deploy.gemspec
index abc1234..def5678 100644
--- a/fastly-deploy.gemspec
+++ b/fastly-deploy.gemspec
@@ -1,9 +1,9 @@ Gem::Specification.new do |s|
s.name = 'fastly-deploy'
- s.version = ENV['VERSION']
+ s.version = ENV['VERSION'] || '0.0.0'
s.date = '2016-07-06'
s.summary = "Automated deploys for Fastly vcl configs"
- s.description = "Automated deploys for Fastly vcl configs"
+ s.description = "Automated deploys for Fastly vcl configs. Also supports splitting up configs via include statements."
s.authors = ["7digital"]
s.email = 'developers@7digital.com'
s.files = ["lib/detect_includes.rb", "lib/methods.rb"]
| Add default version to gemspec
Doing 'bundle install' now parses the gemspec and without a valid
version it would blow up, so use 0.0.0 as a default version when used
locally.
|
diff --git a/spec/policies/admin/journals_policy_spec.rb b/spec/policies/admin/journals_policy_spec.rb
index abc1234..def5678 100644
--- a/spec/policies/admin/journals_policy_spec.rb
+++ b/spec/policies/admin/journals_policy_spec.rb
@@ -7,7 +7,7 @@ context "admin" do
let(:user) { FactoryGirl.create(:user, :admin) }
- it { expect(policy.authorized?).to be(true) }
+ it { expect(policy.authorization?).to be(true) }
it { expect(policy.index?).to be(true) }
it { expect(policy.update?).to be(true) }
end
@@ -15,7 +15,7 @@ context "non admin who does not administer the journal" do
let(:user) { FactoryGirl.create(:user) }
- it { expect(policy.authorized?).to be(false) }
+ it { expect(policy.authorization?).to be(false) }
it { expect(policy.index?).to be(false) }
it { expect(policy.update?).to be(false) }
end
@@ -27,7 +27,7 @@ assign_journal_role(journal, user, :admin)
end
- it { expect(policy.authorized?).to be(true) }
+ it { expect(policy.authorization?).to be(true) }
it { expect(policy.index?).to be(true) }
it { expect(policy.update?).to be(true) }
end
| Correct names in policy spec.
|
diff --git a/app/models/drink.rb b/app/models/drink.rb
index abc1234..def5678 100644
--- a/app/models/drink.rb
+++ b/app/models/drink.rb
@@ -3,7 +3,7 @@ validates_presence_of :name, :bottle_size, :price
has_attached_file :logo, :styles => { :thumb => "100x100#" }, :default_style => :thumb
- validates_attachment_content_type :logo, :content_type => %w(image/jpeg image/jpg image/png)
+ validates_attachment_content_type :logo, :content_type => %w(image/jpeg image/jpg image/png)
before_post_process :normalize_filename
after_initialize :set_defaults, unless: :persisted?
| Replace " " with " ".
|
diff --git a/app/models/skill.rb b/app/models/skill.rb
index abc1234..def5678 100644
--- a/app/models/skill.rb
+++ b/app/models/skill.rb
@@ -12,7 +12,6 @@ def end_current_streak
self.current_streak = 0
self.save
- "Chain broken"
end
def refresh_expiration_time
| Remove string return from end_current_streak
|
diff --git a/source_code.gemspec b/source_code.gemspec
index abc1234..def5678 100644
--- a/source_code.gemspec
+++ b/source_code.gemspec
@@ -8,8 +8,8 @@ spec.version = SourceCode::VERSION
spec.authors = ["Darren Cauthon"]
spec.email = ["darren@cauthon.com"]
- spec.summary = %q{TODO: Write a short summary. Required.}
- spec.description = %q{TODO: Write a longer description. Optional.}
+ spec.summary = %q{Add a source_location to method, allowing you to see the source code.}
+ spec.description = %q{Add a source_location to method, allowing you to see the source code.}
spec.homepage = ""
spec.license = "MIT"
| Add a description of the gem.
|
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
@@ -23,9 +23,14 @@ end
config.after do
+ [ROM::Relation, ROM::Mapper].each { |klass| clear_descendants(klass) }
+
added_constants = Object.constants - @constants
added_constants.each { |name| Object.send(:remove_const, name) }
- ROM::Relation.instance_variable_set('@descendants', [])
- ROM::Mapper.instance_variable_set('@descendants', [])
+ end
+
+ def clear_descendants(klass)
+ klass.descendants.each { |d| clear_descendants(d) }
+ klass.instance_variable_set('@descendants', [])
end
end
| Build Mapper sub-classes when using mapper DSL
|
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,8 +1,4 @@-# this is needed for guard to work, not sure why :(
-require "bundler"
-Bundler.setup
-
-if ENV['COVERAGE'] == 'true' && RUBY_ENGINE == 'ruby' && RUBY_VERSION='2.3.1'
+if ENV['COVERAGE'] == 'true' && RUBY_ENGINE == 'ruby' && RUBY_VERSION == '2.3.1'
require "simplecov"
SimpleCov.start do
add_filter '/spec/'
| Remove bundler setup from spec helper
|
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
@@ -6,5 +6,6 @@ Dir[File.expand_path("../support/**/*.rb", __FILE__)].each { |f| require f }
RSpec.configure do |config|
+ config.order = :random
config.include NetHttp2::ApiHelpers
end
| Use random order in 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
@@ -1,6 +1,6 @@ if ENV['CODECLIMATE_REPO_TOKEN']
- require "codeclimate-test-reporter"
- CodeClimate::TestReporter.start
+ require 'simplecov'
+ SimpleCov.start
end
require 'konjak'
| Use SimpleCov to follow Code Climate update
|
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
@@ -23,24 +23,3 @@ PuppetlabsSpec::Files.cleanup
end
end
-
-require 'pathname'
-dir = Pathname.new(__FILE__).parent
-Puppet[:modulepath] = File.join(dir, 'fixtures', 'modules')
-
-# There's no real need to make this version dependent, but it helps find
-# regressions in Puppet
-#
-# 1. Workaround for issue #16277 where default settings aren't initialised from
-# a spec and so the libdir is never initialised (3.0.x)
-# 2. Workaround for 2.7.20 that now only loads types for the current node
-# environment (#13858) so Puppet[:modulepath] seems to get ignored
-# 3. Workaround for 3.5 where context hasn't been configured yet,
-# ticket https://tickets.puppetlabs.com/browse/MODULES-823
-#
-ver = Gem::Version.new(Puppet.version.split('-').first)
-if Gem::Requirement.new("~> 2.7.20") =~ ver || Gem::Requirement.new("~> 3.0.0") =~ ver || Gem::Requirement.new("~> 3.5") =~ ver
- puts "augeasproviders: setting Puppet[:libdir] to work around broken type autoloading"
- # libdir is only a single dir, so it can only workaround loading of one external module
- Puppet[:libdir] = "#{Puppet[:modulepath]}/augeasproviders_core/lib"
-end
| Use modulesync to manage meta files
|
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
@@ -17,5 +17,5 @@
def match_words(*words)
regexp = words.map! { |word| "(?=.*#{Regexp.escape(word)})" }.join
- ->(obj) { obj.match(/#{regexp}/) }
+ ->(obj) { obj.match(/#{regexp}/m) }
end
| Make custom bacon matcher `match_words` multiline
|
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,13 +8,11 @@ ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../dummy/config/environment.rb', __FILE__)
+load Rails.root.join('db/schema.rb')
+
FactoryGirl.find_definitions
RSpec.configure do |config|
- config.before(:suite) do
- load Rails.root.join('db/schema.rb')
- end
-
config.around do |example|
ActiveRecord::Base.transaction do
example.run
| Load database schema earlier to prevent failures
|
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
@@ -14,7 +14,7 @@ c.cassette_library_dir = "spec/fixtures/vcr_cassettes"
c.hook_into :webmock
c.configure_rspec_metadata!
- c.default_cassette_options = { :record => :once }
+ c.default_cassette_options = { record: :once }
c.before_record do |i|
i.response.headers.delete('Set-Cookie')
| Remove old skool hash rocket
|
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
@@ -0,0 +1,75 @@+unless defined?(SPEC_HELPER_IS_LOADED)
+ SPEC_HELPER_IS_LOADED = 1
+
+ dir = File.expand_path(File.dirname(__FILE__))
+
+ $LOAD_PATH.unshift("#{dir}/")
+ $LOAD_PATH.unshift("#{dir}/lib") # a spec-specific test lib dir
+ $LOAD_PATH.unshift("#{dir}/../lib")
+
+ # Don't want puppet getting the command line arguments for rake or autotest
+ ARGV.clear
+
+ require 'puppet'
+ require 'mocha'
+ gem 'rspec', '>=2.0.0'
+
+
+ # So everyone else doesn't have to include this base constant.
+ module PuppetSpec
+ FIXTURE_DIR = File.join(dir = File.expand_path(File.dirname(__FILE__)), "fixtures") unless defined?(FIXTURE_DIR)
+ end
+
+ module PuppetTest
+ end
+
+ RSpec.configure do |config|
+ config.mock_with :mocha
+
+ config.after :each do
+ Puppet.settings.clear
+ Puppet::Node::Environment.clear
+ Puppet::Util::Storage.clear
+
+ if defined?($tmpfiles)
+ $tmpfiles.each do |file|
+ file = File.expand_path(file)
+ if Puppet.features.posix? and file !~ /^\/tmp/ and file !~ /^\/var\/folders/
+ puts "Not deleting tmpfile #{file} outside of /tmp or /var/folders"
+ next
+ elsif Puppet.features.microsoft_windows?
+ tempdir = File.expand_path(File.join(Dir::LOCAL_APPDATA, "Temp"))
+ if file !~ /^#{tempdir}/
+ puts "Not deleting tmpfile #{file} outside of #{tempdir}"
+ next
+ end
+ end
+ if FileTest.exist?(file)
+ system("chmod -R 755 '#{file}'")
+ system("rm -rf '#{file}'")
+ end
+ end
+ $tmpfiles.clear
+ end
+
+ Puppet::Util::Log.close_all
+ end
+
+ config.before :each do
+ # these globals are set by Application
+ $puppet_application_mode = nil
+ $puppet_application_name = nil
+
+ # Set the confdir and vardir to gibberish so that tests
+ # have to be correctly mocked.
+ Puppet[:confdir] = "/dev/null"
+ Puppet[:vardir] = "/dev/null"
+
+ # Avoid opening ports to the outside world
+ Puppet.settings[:bindaddress] = "127.0.0.1"
+
+ @logs = []
+ Puppet::Util::Log.newdestination(Puppet::Test::LogCollector.new(@logs))
+ end
+ end
+end
| Add a spec helper for running the rspec tests
|
diff --git a/suspenders.gemspec b/suspenders.gemspec
index abc1234..def5678 100644
--- a/suspenders.gemspec
+++ b/suspenders.gemspec
@@ -29,5 +29,5 @@ s.add_dependency 'bundler', '>= 1.8.4'
s.add_dependency 'rails', Suspenders::RAILS_VERSION
- s.add_development_dependency 'rspec', '~> 3.6'
+ s.add_development_dependency 'rspec', '~> 3.7'
end
| Increase rspec versione for gem
|
diff --git a/lib/overcommit/hook_context/run_all.rb b/lib/overcommit/hook_context/run_all.rb
index abc1234..def5678 100644
--- a/lib/overcommit/hook_context/run_all.rb
+++ b/lib/overcommit/hook_context/run_all.rb
@@ -7,7 +7,7 @@ # which is useful for automated CI scripts.
class RunAll < Base
def modified_files
- all_files
+ @modified_files ||= Overcommit::GitRepo.all_files
end
# Returns all lines in the file since in this context the entire repo is
@@ -34,10 +34,6 @@
private
- def all_files
- @all_files ||= Overcommit::GitRepo.all_files
- end
-
def count_lines(file)
result = Overcommit::Utils.execute(%w[wc -l] + [file])
result.success? ? result.stdout.to_i : 0
| Remove unnecessary level of indirection from RunAll
This extra hop doesn't benefit us in any particular way. Simplify.
Change-Id: Ib0bd984b93f0301862c356c7ab408fd9a2bc990b
Reviewed-on: http://gerrit.causes.com/46486
Tested-by: jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@brigade.com>
Reviewed-by: Shane da Silva <67fb7bfe39f841b16a1f86d3928acc568d12c716@brigade.com>
|
diff --git a/lib/tasks/check_route_consistency.rake b/lib/tasks/check_route_consistency.rake
index abc1234..def5678 100644
--- a/lib/tasks/check_route_consistency.rake
+++ b/lib/tasks/check_route_consistency.rake
@@ -1,7 +1,7 @@ require "route_consistency_checker"
def report_errors(errors)
- Airbrake.notify(
+ Airbrake.notify_sync(
"Inconsistent routes",
parameters: {
errors: errors,
| Use Airbrake.notify_sync instead of Airbrake.notify
When running in a rake task, Airbrake.notify doesn't properly
finish triggering before the rake task ends and therefore the
message never makes it to Airbrake.
|
diff --git a/csv_to_xero.rb b/csv_to_xero.rb
index abc1234..def5678 100644
--- a/csv_to_xero.rb
+++ b/csv_to_xero.rb
@@ -0,0 +1,33 @@+require 'csv'
+
+puts "Which csv file would you like to XeroProof?"
+file = gets.chomp
+
+file_name = File.basename(file, ".*")
+
+transactions_csv = CSV.read(file, headers:true)
+
+# Remove some unwanted columns
+transactions_csv.delete('Rekening')
+transactions_csv.delete('Tegenrekening')
+transactions_csv.delete('Code')
+transactions_csv.delete('MutatieSoort')
+
+CSV.open(file_name + "_XeroProof.csv", 'wb') do |csv|
+ csv << ['Date', 'Payee', 'Transaction Type', 'Transaction Amount', 'Description', 'Reference'] # Add new headers
+ transactions_csv.each do |row|
+ # Replace comma for dots
+ amount = row['Bedrag (EUR)']
+ amount.sub!(',', '.')
+
+ if (row['Af Bij'] == 'Af')
+ row['Bedrag (EUR)'] = amount.to_f * -1
+ end
+
+ #row['Reference'] = row['Mededelingen'].split(/\bOmschrijving: \b/).last
+
+ csv << row
+ end
+end
+
+puts "All set! #{file_name}_XeroProof.csv has been created." | Add the CSV converter like magic
|
diff --git a/config/deploy/sparks-common.rb b/config/deploy/sparks-common.rb
index abc1234..def5678 100644
--- a/config/deploy/sparks-common.rb
+++ b/config/deploy/sparks-common.rb
@@ -1,14 +1,15 @@ # some common tasks, hooks and definitions for sparks deploys
-after 'deploy:symlink', 'import:create_or_update_sparks_content'
after 'deploy:make_directory_structure', 'deploy:make_sparks_directory_structure'
-after 'deploy:shared_symlinks', 'deploy:sparks_shared_symlink'
+before 'deploy:create_symlink', 'import:create_or_update_sparks_content'
+before 'import:create_or_update_sparks_content', 'deploy:sparks_shared_symlink'
+after 'import:create_or_update_sparks_content', 'deploy:sparks_qucs_symlink'
namespace :import do
# 01/27/2010
desc "create or update a git svn clone of sparks-content"
task :create_or_update_sparks_content, :roles => :app do
- run "cd #{deploy_to}/#{current_dir} && " +
+ run "cd #{release_path} && " +
"bundle exec rake RAILS_ENV=#{rails_env} app:import:create_or_update_sparks_content --trace"
end
end
@@ -16,11 +17,14 @@ namespace :deploy do
task :make_sparks_directory_structure do
run "mkdir -p #{shared_path}/public/sparks-content"
- run "mkdir -p #{shared_path}/public/sparks/qucsator"
end
task :sparks_shared_symlink do
run "ln -nfs #{shared_path}/public/sparks-content #{release_path}/public/sparks-content"
+ end
+
+ task :sparks_qucs_symlink do
+ run "mkdir -p #{release_path}/public/sparks/qucsator"
run "ln -nfs #{shared_path}/public/sparks-content/lib/qucsator/solve #{release_path}/public/sparks/qucsator/solve"
end
end
| Fix sparks extra deploy tasks
|
diff --git a/config/initializers/logging.rb b/config/initializers/logging.rb
index abc1234..def5678 100644
--- a/config/initializers/logging.rb
+++ b/config/initializers/logging.rb
@@ -4,7 +4,7 @@ session_key = (Rails.application.config.session_options || {})[:key]
session_data = request.cookie_jar.encrypted[session_key] || {}
- # warden.user.user.key で User#id を取得
- session_data.dig("warden.user.user.key", 0, 0)
+ user_id = session_data.dig("warden.user.user.key", 0, 0)
+ "user_id=#{user_id}" if user_id
}
]
| Add 'user_id=' to the log tag
|
diff --git a/authpds-nyu.gemspec b/authpds-nyu.gemspec
index abc1234..def5678 100644
--- a/authpds-nyu.gemspec
+++ b/authpds-nyu.gemspec
@@ -24,4 +24,5 @@ s.add_development_dependency "rake", "~> 10.1.0"
s.add_development_dependency "vcr", "~> 2.5.0"
s.add_development_dependency "webmock", "~> 1.13.0"
+ s.add_development_dependency "rdoc"
end
| Add rdoc for rbx :rainbow:
|
diff --git a/axiom-types.gemspec b/axiom-types.gemspec
index abc1234..def5678 100644
--- a/axiom-types.gemspec
+++ b/axiom-types.gemspec
@@ -10,7 +10,7 @@ gem.description = 'Abstract types for logic programming'
gem.summary = 'Define types with optional constraints for use within axiom and other libraries.'
gem.homepage = 'https://github.com/dkubb/axiom-types'
- gem.licenses = %w[MIT]
+ gem.license = 'MIT'
gem.require_paths = %w[lib]
gem.files = `git ls-files`.split($/)
| Change gemspec to use the singular license option
|
diff --git a/youtube-dl-gui.rb b/youtube-dl-gui.rb
index abc1234..def5678 100644
--- a/youtube-dl-gui.rb
+++ b/youtube-dl-gui.rb
@@ -1,7 +1,7 @@ class YoutubeDlGui < Formula
- homepage "https://github.com/pr0d1r2/youtube-dl-gui"
- url "https://github.com/pr0d1r2/youtube-dl-gui.git",
- :branch => "osx"
+ homepage "https://github.com/MrS0m30n3/youtube-dl-gui"
+ url "https://github.com/MrS0m30n3/youtube-dl-gui.git",
+ :revision => "36c8147a0ba4da01215d92957246527285cca710"
version "0.3.7"
depends_on "python"
| Change git source to original gem creator.
As my pull request got merged.
|
diff --git a/data-aggregation-index.gemspec b/data-aggregation-index.gemspec
index abc1234..def5678 100644
--- a/data-aggregation-index.gemspec
+++ b/data-aggregation-index.gemspec
@@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = 'data_aggregation-index'
- s.version = '0.2.0.0'
+ s.version = '0.2.1.0'
s.summary = 'Event store data aggregation index library'
s.description = ' '
| Package version is increased from 0.2.0.0 to 0.2.1.0
|
diff --git a/gemdiff.gemspec b/gemdiff.gemspec
index abc1234..def5678 100644
--- a/gemdiff.gemspec
+++ b/gemdiff.gemspec
@@ -24,5 +24,5 @@ spec.add_development_dependency "bundler", "~> 1.6"
spec.add_development_dependency "minitest", "~> 5.4"
spec.add_development_dependency "mocha", "~> 1.1"
- spec.add_development_dependency "rake", "~> 11.0"
+ spec.add_development_dependency "rake", "~> 12.0"
end
| Update rake dependency to 12.0
|
diff --git a/Formula/gambit-scheme.rb b/Formula/gambit-scheme.rb
index abc1234..def5678 100644
--- a/Formula/gambit-scheme.rb
+++ b/Formula/gambit-scheme.rb
@@ -16,9 +16,8 @@ # Gambit Scheme currently fails to build with llvm-gcc
# (ld crashes during the build process)
ENV.gcc_4_2
- # Gambit Scheme will not build with heavy optimizations. Disable all
- # optimizations until safe values can be figured out.
- ENV.no_optimization
+ # Gambit Scheme doesn't like full optimizations
+ ENV.O2
configure_args = [
"--prefix=#{prefix}",
| Enable O2 optimizations for Gambit Scheme
|
diff --git a/committee.gemspec b/committee.gemspec
index abc1234..def5678 100644
--- a/committee.gemspec
+++ b/committee.gemspec
@@ -25,5 +25,6 @@ s.add_development_dependency "rr", "~> 1.1"
s.add_development_dependency "pry"
s.add_development_dependency "pry-byebug"
+ s.add_development_dependency "rubocop"
s.add_development_dependency "simplecov"
end
| Add rubocop to dev dependencies
|
diff --git a/brew/cask/awsaml.rb b/brew/cask/awsaml.rb
index abc1234..def5678 100644
--- a/brew/cask/awsaml.rb
+++ b/brew/cask/awsaml.rb
@@ -1,6 +1,6 @@ cask 'awsaml' do
version '1.5.0'
- sha256 '3f3aa01510627eafead8a205dda2423b3f5c8b36afd4dfc777cdb5781b30fe6b'
+ sha256 'fd1d22780e47dd13ba2507c9a4661aa259d77e606fb9527a680342414dc6a2aa'
url "https://github.com/rapid7/awsaml/releases/download/v#{version}/awsaml-v#{version}-darwin-x64.zip"
appcast 'https://github.com/rapid7/awsaml/releases.atom',
| Update the SHA256 checksum in the Homebrew cask for the v1.5.0 binary.
|
diff --git a/lib/blockcypher/client/api.rb b/lib/blockcypher/client/api.rb
index abc1234..def5678 100644
--- a/lib/blockcypher/client/api.rb
+++ b/lib/blockcypher/client/api.rb
@@ -29,9 +29,12 @@ end
class Call
+
+ attr_reader :http_client
+
def initialize(config)
@config = config
- @http = HTTPClient.new(
+ @http_client = HTTPClient.new(
base_url: @config.base_uri.to_s,
default_header: { Accept: 'application/json' }
)
@@ -49,7 +52,7 @@
def perform(verb, path, options = {})
options.merge!(query: params)
- response = @http.public_send(verb.to_s, path, options)
+ response = http_client.public_send(verb.to_s, path, options)
if not response.ok?
raise "Http error #{response.status} while calling '#{response.header.request_uri.to_s}'"
else
| Rename to allow mocking later on
|
diff --git a/lib/closeio/resources/lead.rb b/lib/closeio/resources/lead.rb
index abc1234..def5678 100644
--- a/lib/closeio/resources/lead.rb
+++ b/lib/closeio/resources/lead.rb
@@ -2,11 +2,14 @@ class Client
module Lead
- def list_leads(options = {}, paginate = false)
+ def list_leads(options = {}, paginate = false, fields = nil)
+ params = { query: options }
+ params.merge!( _fields: fields ) if fields
+
if paginate
- paginate(lead_path, query: options)
+ paginate(lead_path, params)
else
- get(lead_path, query: options)
+ get(lead_path, params)
end
end
| Add support for only wanting to return certain fields
|
diff --git a/app/models/spree/also_bought.rb b/app/models/spree/also_bought.rb
index abc1234..def5678 100644
--- a/app/models/spree/also_bought.rb
+++ b/app/models/spree/also_bought.rb
@@ -2,5 +2,12 @@ class AlsoBought < ActiveRecord::Base
belongs_to :product1, class_name: 'Spree::Product'
belongs_to :product2, class_name: 'Spree::Product'
+
+ def self.update(products)
+ products.combination(2).each do |product1,product2|
+ also = Spree::AlsoBought.where("product1_id IN (?) AND product2_id IN (?)", [product1.id,product2.id], [product1.id,product2.id]).first
+ also ? also.increment!(:count) : Spree::AlsoBought.create(product1: product1, product2: product2)
+ end
+ end
end
end
| Update all also_bougth combinations count
* Create mehtod on AlsoBought
|
diff --git a/app/controllers/francis_cms/webmentions_controller.rb b/app/controllers/francis_cms/webmentions_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/francis_cms/webmentions_controller.rb
+++ b/app/controllers/francis_cms/webmentions_controller.rb
@@ -35,7 +35,7 @@ if webmention.verify
redirect_to @webmention, notice: 'This webmention was successfully verified!'
else
- redirect_to webmentions_path, notice: 'That webmention appeared to be invalid and was deleted.'
+ redirect_to webmentions_path, alert: 'That webmention appears to be invalid.'
end
end
| Update invalid webmention flash message.
|
diff --git a/lib/jefferies_tube/railtie.rb b/lib/jefferies_tube/railtie.rb
index abc1234..def5678 100644
--- a/lib/jefferies_tube/railtie.rb
+++ b/lib/jefferies_tube/railtie.rb
@@ -1,5 +1,6 @@ require 'jefferies_tube'
require 'rails'
+
module JefferiesTube
class Railtie < ::Rails::Railtie
railtie_name :jefferies_tube
@@ -9,7 +10,7 @@ end
config.after_initialize do |args|
- begin
+ begin
# if this route exists, it means the app already defined its own catchall route
# if not, this will raise an exception and we will install our catchall instead
::Rails.application.routes.recognize_path("/jefferies_tube_404_test_route_test_supertest")
@@ -30,9 +31,9 @@
initializer "fix spring + figaro" do |config|
if defined?(Spring) && File.exists?("config/application.yml")
- Spring.watch "config/application.yml"
+ require 'spring/watcher'
+ Spring.watch "config/application.yml"
end
end
-
end
end
| Fix undefined method for Spring:Module
|
diff --git a/buttons_for.gemspec b/buttons_for.gemspec
index abc1234..def5678 100644
--- a/buttons_for.gemspec
+++ b/buttons_for.gemspec
@@ -13,9 +13,10 @@ s.summary = "Easily create Bootstrap buttons in Rails."
s.description = "ActionView Helper for generating Bootstrap buttons."
s.license = "MIT"
+ s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"]
+ s.test_files = Dir["test/**/*"]
- s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"]
- s.test_files = Dir["test/**/*"]
+ s.required_ruby_version = '>= 1.9.3'
s.add_dependency "rails", ">= 3.2", "< 5.0"
s.add_dependency "font-awesome-rails"
| gemspec: Set required minimum ruby version
|
diff --git a/teifacsimile_to_jekyll.gemspec b/teifacsimile_to_jekyll.gemspec
index abc1234..def5678 100644
--- a/teifacsimile_to_jekyll.gemspec
+++ b/teifacsimile_to_jekyll.gemspec
@@ -12,7 +12,7 @@ s.homepage = 'https://github.com/emory-libraries-ecds/teifacsimile-to-jekyll'
# 'http://rubygems.org/gems/hola'
s.license = 'Apache-2.0'
- s.add_runtime_dependency "nokogiri", ["~> 1.6"]
- s.add_runtime_dependency "fastimage"
- s.add_development_dependency "rake"
+ s.add_runtime_dependency "nokogiri", "~> 1.6"
+ s.add_runtime_dependency 'fastimage', '~> 1.8', '>= 1.8.1'
+ s.add_development_dependency 'rake', '~> 10.4', '>= 10.4.2'
end | Update gemspec with current versions of requirements
|
diff --git a/lib/asana/resource.rb b/lib/asana/resource.rb
index abc1234..def5678 100644
--- a/lib/asana/resource.rb
+++ b/lib/asana/resource.rb
@@ -44,5 +44,9 @@ raise ActiveResource::MethodNotAllowed.new(__method__)
end
+ def to_json(options={})
+ super({ :root => 'data' }.merge(options))
+ end
+
end
end
| Use "data" as the default JSON root
|
diff --git a/lib/brainstem/dsl/base_block.rb b/lib/brainstem/dsl/base_block.rb
index abc1234..def5678 100644
--- a/lib/brainstem/dsl/base_block.rb
+++ b/lib/brainstem/dsl/base_block.rb
@@ -37,7 +37,7 @@ def deprecated_description_warning
ActiveSupport::Deprecation.warn(
'DEPRECATION_WARNING: Specifying description as the last parameter will be deprecated in the next version.' \
- 'Description can be specified with the `info` key in a hash. e.g. { info: "My description" }',
+ 'Description can be specified with the `info` key in the options hash. e.g. { info: "My description" }',
caller
)
end
| Update deprecation warning to specify info key on the options hash
|
diff --git a/acts_as_taggable.gemspec b/acts_as_taggable.gemspec
index abc1234..def5678 100644
--- a/acts_as_taggable.gemspec
+++ b/acts_as_taggable.gemspec
@@ -19,5 +19,5 @@
s.add_dependency "activerecord", [">= 4.2.0", "< 7"]
s.add_development_dependency "rspec-rails", "~> 3"
- s.add_development_dependency "sqlite3", '~> 1.4'
+ s.add_development_dependency "sqlite3"
end
| Remove explicit sqlite version dependency
|
diff --git a/site-cookbooks/dna/recipes/osx_apps.rb b/site-cookbooks/dna/recipes/osx_apps.rb
index abc1234..def5678 100644
--- a/site-cookbooks/dna/recipes/osx_apps.rb
+++ b/site-cookbooks/dna/recipes/osx_apps.rb
@@ -7,7 +7,7 @@ include_recipe "sprout-osx-apps::android_sdk"
include_recipe "pivotal_workstation::sublime_text"
include_recipe "sprout-osx-apps::chrome_canary"
-# include_recipe "dna-osx-apps::keepassx"
+include_recipe "dna-osx-apps::keepassx"
# include_recipe "sprout-osx-apps::charles_proxy"
# include_recipe "dna-osx-apps::vmwarefusion"
# include_recipe "dna-osx-apps::imageoptim"
@@ -15,4 +15,4 @@ include_recipe "sprout-osx-apps::viscosity"
include_recipe "sprout-osx-apps::1password"
include_recipe "sprout-osx-apps::evernote"
-include_recipe "sprout-osx-apps::vlc"+include_recipe "sprout-osx-apps::vlc"
| Use keepass on the machines.
|
diff --git a/lib/cucumber/salad.rb b/lib/cucumber/salad.rb
index abc1234..def5678 100644
--- a/lib/cucumber/salad.rb
+++ b/lib/cucumber/salad.rb
@@ -16,4 +16,8 @@ require 'cucumber/salad/widgets/document'
require 'cucumber/salad/dsl'
-class UnknownWidgetError < StandardError; end
+module Cucumber
+ module Salad
+ class UnknownWidgetError < StandardError; end
+ end
+end
| Move UnknownWidgetError to Cucumber::Salad module.
|
diff --git a/spec/datasets/minutes_dataset.rb b/spec/datasets/minutes_dataset.rb
index abc1234..def5678 100644
--- a/spec/datasets/minutes_dataset.rb
+++ b/spec/datasets/minutes_dataset.rb
@@ -3,7 +3,7 @@
def load
create_page 'minutes', :slug => 'minutes', :class_name => 'MinutesPage', :parent_id => pages(:home).id do
- create_page 'general.minutes', :slug => '1331010000', :class_Name => 'MinutesPage' do
+ create_page 'general.minutes', :slug => '1331010000', :class_name => 'MinutesPage' do
create_page_part 'general_minutes_body', :name => 'General', :content => 'General Minutes'
end
end
| Fix broken dataset so specs will run
|
diff --git a/spec/lib/flapjack/logger_spec.rb b/spec/lib/flapjack/logger_spec.rb
index abc1234..def5678 100644
--- a/spec/lib/flapjack/logger_spec.rb
+++ b/spec/lib/flapjack/logger_spec.rb
@@ -14,7 +14,8 @@ ::Logger.should_receive(:new).with(STDOUT).and_return(logger)
if Syslog.const_defined?('Logger', false)
- sys_logger.should_receive(:warn).with(an_instance_of(String))
+ sys_logger.should_receive(:formatter=).with(an_instance_of(Proc))
+ sys_logger.should_receive(:warn).with("Yowza!")
Syslog.const_get('Logger', false).should_receive(:new).with('flapjack').and_return(sys_logger)
else
syslog.should_receive(:log).with(Syslog::Constants::LOG_WARNING, /\[WARN\] :: spec :: %m/, "Yowza!")
@@ -28,4 +29,4 @@ flogger.warn "Yowza!"
end
-end+end
| Fix test under Ruby 2 |
diff --git a/spec/support/downloads_helper.rb b/spec/support/downloads_helper.rb
index abc1234..def5678 100644
--- a/spec/support/downloads_helper.rb
+++ b/spec/support/downloads_helper.rb
@@ -0,0 +1,38 @@+module DownloadsHelper
+ TIMEOUT = 10
+ PATH = Rails.root.join("tmp", "downloads")
+
+ def downloaded_filename
+ wait_for_download
+ downloaded_filenames.first
+ end
+
+ def downloaded_content
+ wait_for_download
+ File.read(downloaded_filename)
+ end
+
+ def clear_downloads
+ FileUtils.rm_f(downloaded_filenames)
+ end
+
+ private
+
+ def downloaded_filenames
+ Dir[PATH.join("*")]
+ end
+
+ def wait_for_download
+ Timeout.timeout(TIMEOUT) do
+ sleep 0.1 until downloaded?
+ end
+ end
+
+ def downloaded?
+ !downloading? && downloaded_filenames.any?
+ end
+
+ def downloading?
+ downloaded_filenames.grep(/\.crdownload$/).any?
+ end
+end
| Add spec DownloadsHelper to support testing csv downloads with headless chrome
|
diff --git a/lib/finicity/v1/response/mfa.rb b/lib/finicity/v1/response/mfa.rb
index abc1234..def5678 100644
--- a/lib/finicity/v1/response/mfa.rb
+++ b/lib/finicity/v1/response/mfa.rb
@@ -8,6 +8,8 @@ #
attribute :text
attribute :choice, :elements => true, :as => :choices
+ attribute :image
+ attribute :imageChoice, :elements => true, :as => :image_choices
end
class Mfa
| Support image MFA challenges too (pass-thru to a client which has graphical capability)
|
diff --git a/lib/github_api/paged_request.rb b/lib/github_api/paged_request.rb
index abc1234..def5678 100644
--- a/lib/github_api/paged_request.rb
+++ b/lib/github_api/paged_request.rb
@@ -33,7 +33,7 @@ params[PARAM_PAGE] = default_page
end
- current_api.get_request(path, params)
+ current_api.get_request(path, ParamsHash.new(params))
end
end # PagedRequest
| Change pagination to return params hash.
|
diff --git a/spec/helpers/gift_codes_helper_spec.rb b/spec/helpers/gift_codes_helper_spec.rb
index abc1234..def5678 100644
--- a/spec/helpers/gift_codes_helper_spec.rb
+++ b/spec/helpers/gift_codes_helper_spec.rb
@@ -13,11 +13,11 @@ describe GiftCodesHelper do
it "should generate options for gift code selection properly" do
- helper.gift_code_options_for_select.should == [
- [ "3 Months - £18.00", 3 ],
- [ "6 Months - £34.20", 6 ],
- [ "9 Months - £48.60", 9 ],
- ["12 Months - £61.20", 12],
+ helper.gift_code_length_options_for_select.should == [
+ [ "3 Months", 3 ],
+ [ "6 Months", 6 ],
+ [ "9 Months", 9 ],
+ ["12 Months", 12],
]
end
| Fix test for gift code helper
|
diff --git a/spec/stoplight/data_store/base_spec.rb b/spec/stoplight/data_store/base_spec.rb
index abc1234..def5678 100644
--- a/spec/stoplight/data_store/base_spec.rb
+++ b/spec/stoplight/data_store/base_spec.rb
@@ -9,8 +9,10 @@ attempts
clear_attempts
clear_failures
+ delete
failures
names
+ purge
record_attempt
record_failure
set_state
| Test for new data store methods
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.