diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/config/initializers/vcr.rb b/config/initializers/vcr.rb
index abc1234..def5678 100644
--- a/config/initializers/vcr.rb
+++ b/config/initializers/vcr.rb
@@ -1,4 +1,5 @@ VCR.configure do |config|
config.cassette_library_dir = "spec/cassettes"
config.hook_into :webmock
+ config.ignore_hosts 'codeclimate.com'
end
|
Configure VCR to allow sending Code Climate reports
|
diff --git a/has_breadcrumb.gemspec b/has_breadcrumb.gemspec
index abc1234..def5678 100644
--- a/has_breadcrumb.gemspec
+++ b/has_breadcrumb.gemspec
@@ -6,16 +6,18 @@ Gem::Specification.new do |gem|
gem.name = "has_breadcrumb"
gem.version = HasBreadcrumb::VERSION
+ gem.platform = Gem::Platform::RUBY
gem.authors = ["Tim Harvey", "Matt Outten"]
gem.email = ["developers@squaremouth.com"]
gem.description = %q{Provides a simple and flexible way to create breadcrumbs with Rails active record models.}
gem.summary = %q{Setting has_breadcrumb on a model will enable a view method, breadcrumb(), which will show the links to the page and its parents in a breadcrumb format.}
gem.homepage = "https://github.com/sqm/has_breadcrumb"
+ gem.license = "MIT"
gem.files = `git ls-files`.split($/)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
- gem.require_paths = ["lib"]
+ gem.require_paths = ['lib']
gem.add_dependency 'activerecord', ['>= 3.0', '< 5.0']
gem.add_dependency 'activesupport', ['>= 3.0', '< 5.0']
|
Add license and platform to the gemspec
This commit adds the MIT license and platform to the gemspec. The missing license added due to a warning when building the gem. The platform was added on a whim by noticing it was missing.
|
diff --git a/log4jruby.gemspec b/log4jruby.gemspec
index abc1234..def5678 100644
--- a/log4jruby.gemspec
+++ b/log4jruby.gemspec
@@ -1,8 +1,6 @@ # -*- encoding: utf-8 -*-
lib = File.expand_path('../lib/', __FILE__)
$:.unshift lib unless $:.include?(lib)
-
-require 'capybara/version'
Gem::Specification.new do |s|
s.name = "log4jruby"
|
Remove reference to Capybara in gemspec(I started with a copy from that
procject)
|
diff --git a/tangent.rb b/tangent.rb
index abc1234..def5678 100644
--- a/tangent.rb
+++ b/tangent.rb
@@ -13,6 +13,6 @@ require "./app/reader"
class Tangent < Sinatra::Base
+ use Editor
use Reader
- use Editor
end
|
Switch Reader/Editor loading so redirect works
|
diff --git a/messaging.gemspec b/messaging.gemspec
index abc1234..def5678 100644
--- a/messaging.gemspec
+++ b/messaging.gemspec
@@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = 'evt-messaging'
- s.version = '0.8.0.1'
+ s.version = '0.8.1.0'
s.summary = 'Messaging primitives for Eventide'
s.description = ' '
|
Package version is increased from 0.8.0.1 to 0.8.1.0
|
diff --git a/lib/distance.rb b/lib/distance.rb
index abc1234..def5678 100644
--- a/lib/distance.rb
+++ b/lib/distance.rb
@@ -1,7 +1,7 @@ class Distance
# absents have low weighting, except where it is a strong vote
- STRONG_WEIGHT = 5.0
- ABSENT_WEIGHT = 0.2
+ STRONG_WEIGHT = 50.0
+ ABSENT_WEIGHT = 2.0
attr_reader :same, :samestrong, :differ, :differstrong, :absent, :absentstrong
@@ -15,11 +15,11 @@ end
def score
- same + STRONG_WEIGHT * samestrong + ABSENT_WEIGHT / 2 * absent + STRONG_WEIGHT / 2 * absentstrong
+ same * 10 + STRONG_WEIGHT * samestrong + ABSENT_WEIGHT / 2 * absent + STRONG_WEIGHT / 2 * absentstrong
end
def weight
- same + STRONG_WEIGHT * samestrong + differ + STRONG_WEIGHT * differstrong +
+ same * 10 + STRONG_WEIGHT * samestrong + differ * 10 + STRONG_WEIGHT * differstrong +
ABSENT_WEIGHT * absent + STRONG_WEIGHT * absentstrong
end
|
Scale scores by 10 to match point system
|
diff --git a/lib/mementus.rb b/lib/mementus.rb
index abc1234..def5678 100644
--- a/lib/mementus.rb
+++ b/lib/mementus.rb
@@ -1,19 +1,19 @@-require_relative 'mementus/graph'
-require_relative 'mementus/structure/adjacency_list'
-require_relative 'mementus/structure/incidence_list'
-require_relative 'mementus/node'
-require_relative 'mementus/edge'
-require_relative 'mementus/node_proxy'
-require_relative 'mementus/pipeline'
-require_relative 'mementus/depth_first_search'
-require_relative 'mementus/breadth_first_search'
-require_relative 'mementus/query/traversal'
-require_relative 'mementus/query/source'
-require_relative 'mementus/query/step'
-require_relative 'mementus/query/traversal'
-require_relative 'mementus/integer_id'
-require_relative 'mementus/element_builder'
-require_relative 'mementus/graph_builder'
-require_relative 'mementus/node_builder'
-require_relative 'mementus/edge_builder'
-require_relative 'mementus/direction'
+require 'mementus/graph'
+require 'mementus/structure/adjacency_list'
+require 'mementus/structure/incidence_list'
+require 'mementus/node'
+require 'mementus/edge'
+require 'mementus/node_proxy'
+require 'mementus/pipeline'
+require 'mementus/depth_first_search'
+require 'mementus/breadth_first_search'
+require 'mementus/query/traversal'
+require 'mementus/query/source'
+require 'mementus/query/step'
+require 'mementus/query/traversal'
+require 'mementus/integer_id'
+require 'mementus/element_builder'
+require 'mementus/graph_builder'
+require 'mementus/node_builder'
+require 'mementus/edge_builder'
+require 'mementus/direction'
|
Change `require_relative` to `require` in base Gem include
|
diff --git a/looksee.gemspec b/looksee.gemspec
index abc1234..def5678 100644
--- a/looksee.gemspec
+++ b/looksee.gemspec
@@ -7,8 +7,7 @@ s.authors = ["George Ogata"]
s.email = ["george.ogata@gmail.com"]
s.date = Time.now.strftime('%Y-%m-%d')
- s.summary = "Inspect method lookup paths in ways not possible in plain ruby."
- s.description = "Inspect method lookup paths in ways not possible in plain ruby."
+ s.summary = "Supercharged method introspection in IRB."
s.homepage = 'http://github.com/oggy/looksee'
s.platform = Gem::Platform::CURRENT if RUBY_PLATFORM == 'java'
|
Make gem description consistent with Github.
|
diff --git a/web/lib/assets/umakadata/lib/umakadata/logging/criteria_log.rb b/web/lib/assets/umakadata/lib/umakadata/logging/criteria_log.rb
index abc1234..def5678 100644
--- a/web/lib/assets/umakadata/lib/umakadata/logging/criteria_log.rb
+++ b/web/lib/assets/umakadata/lib/umakadata/logging/criteria_log.rb
@@ -11,10 +11,6 @@ def initialize
@list = Array.new
@result = nil
- end
-
- def push(log)
- @list.push log
end
def to_h
|
Remove unnecessary function of push
|
diff --git a/lib/hdo/webhook_deployer/deployer.rb b/lib/hdo/webhook_deployer/deployer.rb
index abc1234..def5678 100644
--- a/lib/hdo/webhook_deployer/deployer.rb
+++ b/lib/hdo/webhook_deployer/deployer.rb
@@ -54,8 +54,10 @@ rescue ChildProcess::TimeoutError => ex
log ex.message
process.stop
+ end
- raise "timed out"
+ if process.exit_code != 0
+ raise "command failed with code #{process.exit_code}: #{command.inspect}"
end
end
|
Raise if exit code is not 0
|
diff --git a/db/migrate/20190318115000_fix_page_file_ids.rb b/db/migrate/20190318115000_fix_page_file_ids.rb
index abc1234..def5678 100644
--- a/db/migrate/20190318115000_fix_page_file_ids.rb
+++ b/db/migrate/20190318115000_fix_page_file_ids.rb
@@ -28,6 +28,7 @@ end
def mysql2?
- connection.instance_of?(ActiveRecord::ConnectionAdapters::Mysql2Adapter)
+ Object.const_defined?("ActiveRecord::ConnectionAdapters::Mysql2Adapter") &&
+ connection.instance_of?(ActiveRecord::ConnectionAdapters::Mysql2Adapter)
end
end
|
Fix FixPageFileIds again for postgres
|
diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb
index abc1234..def5678 100644
--- a/config/initializers/sidekiq.rb
+++ b/config/initializers/sidekiq.rb
@@ -1,7 +1,7 @@-if Rails.env.development?
- require 'sidekiq/testing'
- Sidekiq::Testing.inline!
-end
+# if Rails.env.development?
+# require 'sidekiq/testing'
+# Sidekiq::Testing.inline!
+# end
# Old behaviour, we should look at moving to ActiveJob instead probably to get this
# https://github.com/mperham/sidekiq/blob/master/5.0-Upgrade.md
|
Disable Sidekiq inline testing in development
|
diff --git a/db/migrate/20200129160520_add_visibility_level_to_gdata_datasets.rb b/db/migrate/20200129160520_add_visibility_level_to_gdata_datasets.rb
index abc1234..def5678 100644
--- a/db/migrate/20200129160520_add_visibility_level_to_gdata_datasets.rb
+++ b/db/migrate/20200129160520_add_visibility_level_to_gdata_datasets.rb
@@ -3,5 +3,7 @@ class AddVisibilityLevelToGdataDatasets < ActiveRecord::Migration[5.2]
def change
add_column :gdata_datasets, :visibility_level, :integer, null: false, default: 0
+
+ GobiertoData::Dataset.update_all(visibility_level: 1)
end
end
|
Add task to publish datasets on migration to add visibility_level
|
diff --git a/axiom.gemspec b/axiom.gemspec
index abc1234..def5678 100644
--- a/axiom.gemspec
+++ b/axiom.gemspec
@@ -17,10 +17,10 @@ gem.test_files = `git ls-files -- spec/{unit,integration}`.split($/)
gem.extra_rdoc_files = %w[LICENSE README.md CONTRIBUTING.md TODO]
+ gem.add_runtime_dependency('abstract_type', '~> 0.0.5')
gem.add_runtime_dependency('adamantium', '~> 0.0.8')
gem.add_runtime_dependency('descendants_tracker', '~> 0.0.1')
gem.add_runtime_dependency('equalizer', '~> 0.0.5')
- gem.add_runtime_dependency('abstract_type', '~> 0.0.5')
gem.add_development_dependency('bundler', '~> 1.3', '>= 1.3.5')
end
|
Update gem order to be alphabetical
|
diff --git a/railties/lib/rails/generators/rails/plugin/templates/rails/application.rb b/railties/lib/rails/generators/rails/plugin/templates/rails/application.rb
index abc1234..def5678 100644
--- a/railties/lib/rails/generators/rails/plugin/templates/rails/application.rb
+++ b/railties/lib/rails/generators/rails/plugin/templates/rails/application.rb
@@ -7,6 +7,7 @@ <%= comment_if :skip_active_record %>require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
+require "action_view/railtie"
<%= comment_if :skip_sprockets %>require "sprockets/railtie"
<%= comment_if :skip_test_unit %>require "rails/test_unit/railtie"
<% end -%>
|
Include AV railtie when we're not loading full rails stack
|
diff --git a/app/repositories/marshallers/document_association_marshaller.rb b/app/repositories/marshallers/document_association_marshaller.rb
index abc1234..def5678 100644
--- a/app/repositories/marshallers/document_association_marshaller.rb
+++ b/app/repositories/marshallers/document_association_marshaller.rb
@@ -1,7 +1,7 @@ class DocumentAssociationMarshaller
- def initialize(dependencies = {})
- @decorator = dependencies.fetch(:decorator)
- @manual_specific_document_repository_factory = dependencies.fetch(:manual_specific_document_repository_factory)
+ def initialize(decorator:, manual_specific_document_repository_factory:)
+ @decorator = decorator
+ @manual_specific_document_repository_factory = manual_specific_document_repository_factory
end
def load(manual, record)
|
Use Ruby keyword args in DocumentAssociationMarshaller
I think that using language features instead of custom code makes this
easier to understand.
|
diff --git a/jqgrid_rails.gemspec b/jqgrid_rails.gemspec
index abc1234..def5678 100644
--- a/jqgrid_rails.gemspec
+++ b/jqgrid_rails.gemspec
@@ -12,5 +12,5 @@ s.has_rdoc = true
s.extra_rdoc_files = ['README.rdoc', 'LICENSE.rdoc', 'CHANGELOG.rdoc']
s.add_dependency 'rails', '>= 2.3'
- s.files = %w(LICENSE README.rdoc CHANGELOG.rdoc init.rb) + Dir.glob("{app,files,lib,rails}/**/*")
+ s.files = %w(README.rdoc CHANGELOG.rdoc init.rb) + Dir.glob("{app,files,lib,rails}/**/*")
end
|
Remove reference to deleted file
|
diff --git a/spec/unit/tomcat_spec.rb b/spec/unit/tomcat_spec.rb
index abc1234..def5678 100644
--- a/spec/unit/tomcat_spec.rb
+++ b/spec/unit/tomcat_spec.rb
@@ -1,7 +1,15 @@ require 'spec_helper'
describe 'tomcat', :type => :class do
- context "When on unsupported operating system family" do
+
+ let :params_data do
+ {
+ :tomcat_version => '7.0.50',
+ :java_home => '/usr/lib/jvm/jre-1.7.0-openjdk.x86_64'
+ }
+ end
+
+ context 'When on an unsupported operating system family' do
let :facts do
{
:osfamily => 'Gentoo'
@@ -13,5 +21,34 @@ end
end
+ context 'When on a future supported operating system family' do
+ let :facts do
+ {
+ :osfamily => 'debian'
+ }
+ end
+
+ it 'should send a "coming soon" message' do
+ expect { should compile }.to raise_error(Puppet::Error, /coming soon/)
+ end
+ end
+
+ describe 'On RedHat-ish' do
+ let :facts do
+ { :osfamily => 'redhat', :operatingsystemrelease => '6.4'}
+ end
+
+ context 'When installing/managing java' do
+ let :hiera_data do
+ { tomcat::install_java => true }
+ end
+
+ it 'should install a java package' do
+ should contain_package('java-1.7.0-openjdk')
+ should contain_package('java-1.7.0-openjdk-devel')
+ end
+
+ end
+ end # End RedHat-ish
end
|
Put in some tests for installing java
|
diff --git a/core/spec/filters/spree/products/find_spec.rb b/core/spec/filters/spree/products/find_spec.rb
index abc1234..def5678 100644
--- a/core/spec/filters/spree/products/find_spec.rb
+++ b/core/spec/filters/spree/products/find_spec.rb
@@ -0,0 +1,90 @@+require 'spec_helper'
+
+module Spree
+ describe Products::Find do
+ let!(:product) { create(:product) }
+ let!(:product_2) { create(:product, discontinue_on: Time.current + 1.day) }
+ let!(:deleted_product) { create(:product, deleted_at: Time.current - 1.day) }
+ let!(:discontinued_product) { create(:product, discontinue_on: Time.current - 1.day) }
+
+ context 'include deleted' do
+ it 'returns products with discontinued' do
+ params = {
+ filter: {
+ ids: '',
+ skus: '',
+ price: '',
+ currency: false,
+ taxons: '',
+ name: false,
+ options: false,
+ show_deleted: false,
+ show_discontinued: true
+ }
+ }
+
+ expect(
+ Spree::Products::Find.new(
+ scope: Spree::Product.all,
+ params: params,
+ current_currency: 'USD'
+ ).execute
+ ).to include(product, product_2, discontinued_product)
+ end
+ end
+
+ context 'include deleted' do
+ it 'returns products with deleted' do
+ params = { filter: { show_deleted: true } }
+
+ params = {
+ filter: {
+ ids: '',
+ skus: '',
+ price: '',
+ currency: false,
+ taxons: '',
+ name: false,
+ options: false,
+ show_deleted: true,
+ show_discontinued: false
+ }
+ }
+
+ expect(
+ Spree::Products::Find.new(
+ scope: Spree::Product.all,
+ params: params,
+ current_currency: 'USD'
+ ).execute
+ ).to include(product, product_2, deleted_product)
+ end
+ end
+
+ context 'exclude discontinued and deleted' do
+ it 'returns not discontinued and not deleted products' do
+ params = {
+ filter: {
+ ids: '',
+ skus: '',
+ price: '',
+ currency: false,
+ taxons: '',
+ name: false,
+ options: false,
+ show_deleted: false,
+ show_discontinued: false
+ }
+ }
+
+ expect(
+ Spree::Products::Find.new(
+ scope: Spree::Product.all,
+ params: params,
+ current_currency: 'USD'
+ ).execute
+ ).to include(product, product_2)
+ end
+ end
+ end
+end
|
Create find spec with test for deleted and discontinued filters
|
diff --git a/app/controllers/page.rb b/app/controllers/page.rb
index abc1234..def5678 100644
--- a/app/controllers/page.rb
+++ b/app/controllers/page.rb
@@ -2,6 +2,7 @@
get :index, :map => '/hit/:page_name' do
@page_name = params[:page_name]
+ deliver(:hit_notifier, :hit_email, "#{@page_name} was Hit", ENV['EMAIL_DESTINATION'])
render 'index'
end
|
Send the email on hit.
|
diff --git a/db/migrate/20121008153758_create_rule_sets.rb b/db/migrate/20121008153758_create_rule_sets.rb
index abc1234..def5678 100644
--- a/db/migrate/20121008153758_create_rule_sets.rb
+++ b/db/migrate/20121008153758_create_rule_sets.rb
@@ -2,7 +2,7 @@ def change
create_table :qwester_rule_sets do |t|
t.string :title
- t.string :description
+ t.text :description
t.string :url
t.timestamps
end
|
Change rule set description to string
|
diff --git a/kernel/bootstrap/global.rb b/kernel/bootstrap/global.rb
index abc1234..def5678 100644
--- a/kernel/bootstrap/global.rb
+++ b/kernel/bootstrap/global.rb
@@ -1,10 +1,15 @@+load_path = ["runtime/compiler", "lib", "stdlib", "."]
+loaded_features = []
+
Globals = {
:$; => nil,
:$/ => "\n", # Input record separator
:$\ => nil, # Output record separator
:$> => STDOUT,
- :$: => [".", "runtime/compiler", "lib", "stdlib"],
- :$" => [],
+ :$: => load_path,
+ :$LOAD_PATH => load_path,
+ :$" => loaded_features,
+ :$LOADED_FEATURES => loaded_features,
:$, => '', # Output field separator
:$stderr => STDERR,
:$stdout => STDOUT,
|
Set $LOADED_FEATURES and $LOAD_PATH aliases. Move '.' to end of $:.
|
diff --git a/spec/pptx/smoke/api_drawing_spec.rb b/spec/pptx/smoke/api_drawing_spec.rb
index abc1234..def5678 100644
--- a/spec/pptx/smoke/api_drawing_spec.rb
+++ b/spec/pptx/smoke/api_drawing_spec.rb
@@ -2,16 +2,18 @@ describe 'ApiDrawing section tests' do
it 'ApiDrawing | GetClassType method' do
pptx = DocBuilderWrapper.new.build_doc_and_parse('asserts/js/pptx/smoke/api_drawing/get_class_type.js')
- expect(pptx).to be_with_data
+ expect(pptx.slides[0].elements.first.text_body.paragraphs.last.characters.first.text).to eq('Class Type = shape')
end
it 'ApiDrawing | SetPosition method' do
pptx = DocBuilderWrapper.new.build_doc_and_parse('asserts/js/pptx/smoke/api_drawing/set_position.js')
- expect(pptx).to be_with_data
+ expect(pptx.slides.first.elements.first.shape_properties.shape_size.offset.x).to eq(OoxmlParser::OoxmlSize.new(608400, :emu))
+ expect(pptx.slides.first.elements.first.shape_properties.shape_size.offset.y).to eq(OoxmlParser::OoxmlSize.new(1267200, :emu))
end
it 'ApiDrawing | SetSize method' do
pptx = DocBuilderWrapper.new.build_doc_and_parse('asserts/js/pptx/smoke/api_drawing/set_size.js')
- expect(pptx).to be_with_data
+ expect(pptx.slides.first.elements.first.shape_properties.shape_size.extent.x).to eq(OoxmlParser::OoxmlSize.new(300 * 36000, :emu))
+ expect(pptx.slides.first.elements.first.shape_properties.shape_size.extent.y).to eq(OoxmlParser::OoxmlSize.new(130 * 36000, :emu))
end
end
|
Add drawing tests for presentation.
|
diff --git a/spec/features/user_sees_revert_modal_spec.rb b/spec/features/user_sees_revert_modal_spec.rb
index abc1234..def5678 100644
--- a/spec/features/user_sees_revert_modal_spec.rb
+++ b/spec/features/user_sees_revert_modal_spec.rb
@@ -17,12 +17,14 @@ end
it 'shows the revert modal' do
- expect(page).to have_content('Revert this merge request')
+ page.within('.modal-header') do
+ expect(page).to have_content 'Revert this merge request'
+ end
end
it 'closes the revert modal with escape keypress' do
find('#modal-revert-commit').send_keys(:escape)
- expect(page).not_to have_content('Revert this merge request')
+ expect(page).not_to have_selector('#modal-revert-commit', visible: true)
end
end
|
Fix broken spec for Merge request > Revert modal
|
diff --git a/buildhosts.rb b/buildhosts.rb
index abc1234..def5678 100644
--- a/buildhosts.rb
+++ b/buildhosts.rb
@@ -9,12 +9,12 @@ ipv6 = '::1 '
home = '127.0.0.1 '
-config = readFile("config").split("&").each {|x| x.strip!}
+config = readFile('config').split('&').each {|x| x.strip!}
hosts = sanitize config[0]
ips = sanitize config[1]
out = File.open('newhosts', 'w+')
-out.write readFile "header"
+out.write readFile 'header'
hosts.each do |host|
out.write "#{ipv6}#{host}\n"
out.write "#{home}#{host}\n"
|
Use single quotes where appropriate.
|
diff --git a/spec/controllers/custom_bigbluebutton_servers_controller_spec.rb b/spec/controllers/custom_bigbluebutton_servers_controller_spec.rb
index abc1234..def5678 100644
--- a/spec/controllers/custom_bigbluebutton_servers_controller_spec.rb
+++ b/spec/controllers/custom_bigbluebutton_servers_controller_spec.rb
@@ -0,0 +1,23 @@+require "spec_helper"
+
+describe CustomBigbluebuttonServersController do
+ include ActionController::AuthenticationTestHelper
+ render_views
+
+ before(:each) do
+ @superuser = Factory(:superuser)
+ end
+
+ describe 'a Superadmin' do
+ before(:each) do
+ login_as(@superuser)
+ end
+
+ it "should show servers" do
+ get :index
+
+ assert_response 200
+ end
+ end
+
+end
|
Test to verify the authorization filter on custom bbb servers controller.
|
diff --git a/Casks/iterm2-beta.rb b/Casks/iterm2-beta.rb
index abc1234..def5678 100644
--- a/Casks/iterm2-beta.rb
+++ b/Casks/iterm2-beta.rb
@@ -1,8 +1,8 @@ cask :v1 => 'iterm2-beta' do
- version '2.1.1'
- sha256 'b8f1bbd11cdb3e26fd9fab6971c28ebeb422361b2cc5fd6e4a843836d5dedeb0'
+ version '2.9.20150626'
+ sha256 '18cf11393ed81d351d739257185bc33414c440c4281e576f9d0b54405970f902'
- url 'https://iterm2.com/downloads/beta/iTerm2-2_1_1.zip'
+ url 'https://iterm2.com/downloads/beta/iTerm2-2_9_20150626.zip'
homepage 'http://www.iterm2.com/'
license :oss
|
Update iTerm2 Beta to 2.9.20150626
|
diff --git a/Casks/sketch-beta.rb b/Casks/sketch-beta.rb
index abc1234..def5678 100644
--- a/Casks/sketch-beta.rb
+++ b/Casks/sketch-beta.rb
@@ -1,8 +1,8 @@ class SketchBeta < Cask
- version '3.1.1'
- sha256 '4d4785f3356079f224bd64302ab17e651ba00752e364f08f146e67196a0a0fbc'
+ version '3.2'
+ sha256 'b6211a6d9d80ace4e9b315fa676800bebbf502c6da5541e473c21e0105f1a153'
- url 'https://rink.hockeyapp.net/api/2/apps/0172d48cceec171249a8d850fb16276b/app_versions/49?format=zip&avtoken=2ab011a5b37200a2947be20cb2dd21af7af9265c'
+ url 'https://rink.hockeyapp.net/api/2/apps/0172d48cceec171249a8d850fb16276b/app_versions/52?format=zip&avtoken=0073114b9e08a31f185c4d0ebf024275946fd465'
homepage 'http://bohemiancoding.com/sketch/beta/'
license :unknown
|
Update Sketch Beta.app to version 3.2
|
diff --git a/Casks/vagrant-bar.rb b/Casks/vagrant-bar.rb
index abc1234..def5678 100644
--- a/Casks/vagrant-bar.rb
+++ b/Casks/vagrant-bar.rb
@@ -1,6 +1,6 @@ cask :v1 => 'vagrant-bar' do
- version '1.13'
- sha256 '161ad4f4b7acbeaa76352e7a19849dd5275e4b1811caba8b853fa7964812169a'
+ version '1.14'
+ sha256 '6cf9a2bf9fbe41237a7afa2621d9c1e94ad225e59aa3969b8408b9adbd956334'
url "https://github.com/BipSync/VagrantBar/releases/download/#{version}/Vagrant.Bar.zip"
homepage 'https://github.com/BipSync/VagrantBar'
|
Upgrade Vagrant Bar.app to v1.14
|
diff --git a/lib/abracadabra/version.rb b/lib/abracadabra/version.rb
index abc1234..def5678 100644
--- a/lib/abracadabra/version.rb
+++ b/lib/abracadabra/version.rb
@@ -1,5 +1,5 @@ module Abracadabra
module Rails
- VERSION = "1.0.4"
+ VERSION = "1.0.5"
end
end
|
Update gemspec to reflect Rails 3.2 compatibility
|
diff --git a/lib/aws/core/connection.rb b/lib/aws/core/connection.rb
index abc1234..def5678 100644
--- a/lib/aws/core/connection.rb
+++ b/lib/aws/core/connection.rb
@@ -29,8 +29,24 @@
module AWS
+ ##
+ # Custom response parser to handle the various craziness of the AWS API
+ ##
+ class SimpleAWSParser < HTTParty::Parser
+ def parse
+ if supports_format?
+ super
+ elsif body =~ %r{<\?xml}
+ xml
+ else
+ body
+ end
+ end
+ end
+
class HTTP
include HTTParty
+ parser SimpleAWSParser
end
##
|
Add custom parser for the times where XML doesn't have Content-Type
|
diff --git a/lib/postgres_db_driver.rb b/lib/postgres_db_driver.rb
index abc1234..def5678 100644
--- a/lib/postgres_db_driver.rb
+++ b/lib/postgres_db_driver.rb
@@ -16,6 +16,9 @@
def create_database(database, configuration)
execute("CREATE DATABASE #{quote_table_name(configuration.catalog_name)}")
+ unless database.version.nil?
+ execute("COMMENT ON DATABASE #{quote_table_name(configuration.catalog_name)} IS 'Database Schema Version #{database.version}'")
+ end
end
def drop(database, configuration)
|
Add version to comment in database
|
diff --git a/lib/weekly_commits/cli.rb b/lib/weekly_commits/cli.rb
index abc1234..def5678 100644
--- a/lib/weekly_commits/cli.rb
+++ b/lib/weekly_commits/cli.rb
@@ -5,7 +5,7 @@ module WeeklyCommits
class CLI < Thor
package_name 'Weekly Commits'
- default_task :get_weekly_commits
+ default_task :weekly_commits
desc 'weekly_commits', 'Lists commits for a specified week'
method_option :week, {
|
Set default CLI task to weekly_commits method
forgot to change it on rename
|
diff --git a/lib/wicked_pdf/railtie.rb b/lib/wicked_pdf/railtie.rb
index abc1234..def5678 100644
--- a/lib/wicked_pdf/railtie.rb
+++ b/lib/wicked_pdf/railtie.rb
@@ -6,10 +6,8 @@ if defined?(Rails.env)
class WickedRailtie < Rails::Railtie
initializer 'wicked_pdf.register', :after => 'remotipart.controller_helper' do |_app|
- ActiveSupport.on_load(:action_controller) do
- ActionController::Base.send :prepend, PdfHelper
- ActionView::Base.send :include, WickedPdfHelper::Assets
- end
+ ActiveSupport.on_load(:action_controller) { ActionController::Base.send :prepend, PdfHelper }
+ ActiveSupport.on_load(:action_view) { include WickedPdfHelper::Assets }
end
end
|
Include view helper on view load.
|
diff --git a/lib/configuration.rb b/lib/configuration.rb
index abc1234..def5678 100644
--- a/lib/configuration.rb
+++ b/lib/configuration.rb
@@ -1,6 +1,6 @@ class Configuration
def self.db_dir
- "db/"
+ 'db/'
end
def self.log_file
|
Change idouble to single quotes
|
diff --git a/lib/fog/utilities.rb b/lib/fog/utilities.rb
index abc1234..def5678 100644
--- a/lib/fog/utilities.rb
+++ b/lib/fog/utilities.rb
@@ -1,7 +1,7 @@ class Hash
def symbolize_keys!
keys.each do |key|
- self[(key.to_sym rescue key)] = delete(key) if key.respond_to?(:to_sym) && !key.is_a?(Fixnum)
+ self[key.to_sym] = delete(key) if key.respond_to?(:to_sym)
end
self
end
|
Remove test on Fixnum since it has been removed from Ruby 2.4
|
diff --git a/weave.gemspec b/weave.gemspec
index abc1234..def5678 100644
--- a/weave.gemspec
+++ b/weave.gemspec
@@ -15,8 +15,10 @@ gem.require_paths = ["lib"]
gem.version = Weave::VERSION
+ gem.add_dependency "net-ssh", ">= 2.2.0"
+
# For running integration tests.
- gem.add_development_dependency "vagrant"
+ gem.add_development_dependency "vagrant", "~> 1.0.5"
gem.add_development_dependency "scope"
gem.add_development_dependency "rake"
# For generating the docs
|
Add net-ssh as an explicit dependency.
|
diff --git a/lib/job_processor.rb b/lib/job_processor.rb
index abc1234..def5678 100644
--- a/lib/job_processor.rb
+++ b/lib/job_processor.rb
@@ -1,6 +1,6 @@ require_relative 'job_serializer'
+require_relative 'statistics'
require_relative 'job_retry'
-require_relative 'statistics'
module Workerholic
class JobProcessingError < StandardError; end
|
Change statistic hash to object
|
diff --git a/lib/model_patches.rb b/lib/model_patches.rb
index abc1234..def5678 100644
--- a/lib/model_patches.rb
+++ b/lib/model_patches.rb
@@ -20,4 +20,13 @@ def nswcouncil?
return self.has_tag?('NSW_council')
end
+ # NT
+ #NT State
+ def ntstate?
+ return self.has_tag?('NT_state')
+ end
+ # NT Council
+ def ntcouncil?
+ return self.has_tag?('NT_council')
+ end
end
|
Define NT in the PublicBody Module
|
diff --git a/lib/motion_record.rb b/lib/motion_record.rb
index abc1234..def5678 100644
--- a/lib/motion_record.rb
+++ b/lib/motion_record.rb
@@ -20,7 +20,7 @@
# RubyMotion for Android can't infer file dependencies so we must explicitly
# declare their compilation order
- (base_files + trait_files + action_files + prep_files).reverse.each do |file|
+ (base_files + schema_files + connection_files + serializer_files).reverse.each do |file|
app.files.unshift(file)
end
|
Fix RubyMotion app config integration
|
diff --git a/lib/pacto/version.rb b/lib/pacto/version.rb
index abc1234..def5678 100644
--- a/lib/pacto/version.rb
+++ b/lib/pacto/version.rb
@@ -1,4 +1,4 @@ # -*- encoding : utf-8 -*-
module Pacto
- VERSION = '0.4.0.pre'
+ VERSION = '0.4.0.rc1'
end
|
Create first 0.4.0 release candidate
|
diff --git a/Casks/pycharm-eap.rb b/Casks/pycharm-eap.rb
index abc1234..def5678 100644
--- a/Casks/pycharm-eap.rb
+++ b/Casks/pycharm-eap.rb
@@ -1,6 +1,6 @@ class PycharmEap < Cask
- version '138.2401'
- sha256 '801378fffeee50f0933a309a1187f94f0bd49a3f9fc861c8144c78b57d224f38'
+ version '139.113'
+ sha256 '2df8db23f5da041e6c30c787c6cf4fc2864f197d639aba05785fc49009750c67'
url "http://download.jetbrains.com/python/pycharm-professional-#{version}.dmg"
homepage 'http://confluence.jetbrains.com/display/PYH/JetBrains+PyCharm+Preview+(EAP)'
|
Upgrade PyCharm EAP to v139.113
|
diff --git a/spec/classes/repo_spec.rb b/spec/classes/repo_spec.rb
index abc1234..def5678 100644
--- a/spec/classes/repo_spec.rb
+++ b/spec/classes/repo_spec.rb
@@ -3,11 +3,20 @@ describe 'marathon::repo' do
on_supported_os.each do |os, facts|
context "on #{os}" do
- let(:facts) do
- facts
+ let(:facts) { facts }
+
+ it { is_expected.to compile }
+
+ describe 'with default options' do
+ it do
+ is_expected.to contain_class('mesos::repo').with_source('mesosphere')
+ end
end
- it { is_expected.to compile }
+ describe 'when manage is false' do
+ let(:params) { {:manage => false} }
+ it { is_expected.not_to contain_class('mesos::repo') }
+ end
end
end
end
|
Add tests for repo class
|
diff --git a/app/controllers/applications_controller.rb b/app/controllers/applications_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/applications_controller.rb
+++ b/app/controllers/applications_controller.rb
@@ -10,7 +10,7 @@ redirect_to settings_path, notice: 'Application created! :)'
else
error_text = @application.errors.full_messages.to_sentence
- redirect_to new_application_path, alert: ":( Failed to create application: #{error_text}."
+ redirect_to new_application_path, alert: ":( Failed to create application: #{error_text.chomp('.')}."
end
end
|
Fix a double period in an error message
|
diff --git a/spec/git_tracker/commit_message_spec.rb b/spec/git_tracker/commit_message_spec.rb
index abc1234..def5678 100644
--- a/spec/git_tracker/commit_message_spec.rb
+++ b/spec/git_tracker/commit_message_spec.rb
@@ -7,10 +7,10 @@ end
describe "#contains?" do
- subject { described_class.new(commit_message_file) }
- let(:commit_message_file) { "COMMIT_EDITMSG" }
+ subject { described_class.new(file) }
+ let(:file) { "COMMIT_EDITMSG" }
before do
- File.stub(:read).with(commit_message_file) { EXAMPLE_COMMIT_EDITMSG }
+ File.stub(:read).with(file) { example_commit_message("[#8675309]") }
end
context "commit message contains the special Pivotal Tracker story syntax" do
@@ -18,10 +18,11 @@ end
end
- EXAMPLE_COMMIT_EDITMSG = <<-EXAMPLE
+ def example_commit_message(pattern_to_match)
+ return <<-EXAMPLE
Got Jenny's number, gonna' make her mine!
-[#8675309]
+#{pattern_to_match}
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch get_jennys_number_#8675309
@@ -32,4 +33,5 @@ #
EXAMPLE
+ end
end
|
Refactor specs to DRY them up a bit
[#26437519]
|
diff --git a/lib/gems/pending/util/extensions/miq-class.rb b/lib/gems/pending/util/extensions/miq-class.rb
index abc1234..def5678 100644
--- a/lib/gems/pending/util/extensions/miq-class.rb
+++ b/lib/gems/pending/util/extensions/miq-class.rb
@@ -1,26 +1,15 @@ class Class
def hierarchy
- sc = self.superclass
- return [self] if sc.nil?
- return sc.hierarchy.unshift(self)
+ ancestors.grep(Class)
end
- def subclass_of?(c)
- return false if self == c
- hierarchy.include?(c)
- end
+ alias subclass_of? <
alias is_subclass_of? subclass_of?
- def is_or_subclass_of?(c)
- hierarchy.include?(c)
- end
+ alias is_or_subclass_of? <=
- def superclass_of?(c)
- c.subclass_of?(self)
- end
+ alias superclass_of? >
alias is_superclass_of? superclass_of?
- def is_or_superclass_of?(c)
- c.is_or_subclass_of?(self)
- end
+ alias is_or_superclass_of? >=
end
|
Simplify Class extensions using existing methods
|
diff --git a/lib/harvester_core/modifiers/find_replacer.rb b/lib/harvester_core/modifiers/find_replacer.rb
index abc1234..def5678 100644
--- a/lib/harvester_core/modifiers/find_replacer.rb
+++ b/lib/harvester_core/modifiers/find_replacer.rb
@@ -4,7 +4,7 @@ attr_reader :regexp, :replacement_rules
def initialize(original_value, replacement_rules={})
- @original_value = original_value
+ @original_value = original_value.map(&:dup)
@replacement_rules = replacement_rules
end
|
FIX BUG: Dup the values in the find and replacer so it doesn't affect other values
|
diff --git a/lib/integrity/migrations/001_initial_state.rb b/lib/integrity/migrations/001_initial_state.rb
index abc1234..def5678 100644
--- a/lib/integrity/migrations/001_initial_state.rb
+++ b/lib/integrity/migrations/001_initial_state.rb
@@ -6,9 +6,9 @@ primary_key :id
varchar :name
varchar :permalink, :unique => true
- varchar :repo_kind
- varchar :repo_uri
- varchar :repo_branch
+ varchar :kind
+ varchar :uri
+ varchar :branch
text :build_script
timestamp :created_at
timestamp :updated_at
|
Correct Project's schema so it conforms better to Bob::Buildable's API
|
diff --git a/homeBase/app/controllers/rewards_controller.rb b/homeBase/app/controllers/rewards_controller.rb
index abc1234..def5678 100644
--- a/homeBase/app/controllers/rewards_controller.rb
+++ b/homeBase/app/controllers/rewards_controller.rb
@@ -1,13 +1,13 @@ class RewardsController < ApplicationController
before_action :require_login
def index
- rewards = Reward.where(family_id: 1)
+ rewards = Reward.where(family_id: current_user.id)
render json: rewards
end
def create
@reward = Reward.new(reward_params)
- @reward.family_id = 1
+ @reward.family_id = current_user.id
render json: @reward
end
@@ -25,7 +25,7 @@
def destroy
reward = Reward.find_by(id: params[:id])
- if current_user.family == reward.family
+ if current_user == reward.family
if reward.destroy
all_rewards = Reward.all
render json: all_rewards
|
Update Rewards controller with new logic
|
diff --git a/Casks/gog-downloader.rb b/Casks/gog-downloader.rb
index abc1234..def5678 100644
--- a/Casks/gog-downloader.rb
+++ b/Casks/gog-downloader.rb
@@ -5,8 +5,17 @@ url "http://static.gog.com/download/d3/mac-stable/GOG_Downloader_#{version}.zip"
appcast 'https://api.gog.com/en/downloader2/status/mac-stable',
:sha256 => '91f8021f41c170428d3ff18770356284c0239c8d8a47f2eccb2d5d1c222829c5'
+ name 'GOG Downloader'
homepage 'http://www.gog.com/downloader'
- license :unknown # todo: change license and remove this comment; ':unknown' is a machine-generated placeholder
+ license :gratis
+ tags :vendor => 'GOG'
+
+ zap :delete => [
+ '~/Library/Application Support/GOG Downloader',
+ '~/Library/Caches/com.gog.downloader',
+ '~/Library/Preferences/com.gog.downloader.plist',
+ '~/Library/Saved Application State/com.gog.downloader.savedState'
+ ]
app 'GOG Downloader.app'
end
|
Add name, license, vendor and zap stanzas for GOG Downloader.app
|
diff --git a/app/workers/activitypub/synchronize_featured_collection_worker.rb b/app/workers/activitypub/synchronize_featured_collection_worker.rb
index abc1234..def5678 100644
--- a/app/workers/activitypub/synchronize_featured_collection_worker.rb
+++ b/app/workers/activitypub/synchronize_featured_collection_worker.rb
@@ -3,7 +3,7 @@ class ActivityPub::SynchronizeFeaturedCollectionWorker
include Sidekiq::Worker
- sidekiq_options queue: 'pull'
+ sidekiq_options queue: 'pull', unique: :until_executed
def perform(account_id)
ActivityPub::FetchFeaturedCollectionService.new.call(Account.find(account_id))
|
Make Execution of SynchronizeFeaturedCollectionWorker unique
See: https://github.com/tootsuite/mastodon/pull/7043/commits/b759b0564fc17ddf1bca06142c32d8b55578f9b4
|
diff --git a/spec/features/backend/users/destroy_spec.rb b/spec/features/backend/users/destroy_spec.rb
index abc1234..def5678 100644
--- a/spec/features/backend/users/destroy_spec.rb
+++ b/spec/features/backend/users/destroy_spec.rb
@@ -17,7 +17,7 @@
user_page.submit_with('Martha', 'Kauffman', 'martha@kauffman.be', 'martha')
- page.find(:path, '//table/tbody/tr[1]/td[4]/a[2]').click
+ page.find('tbody td:last a:last').click
expect(page).to have_current_path(backend_users_path)
expect(page).to have_content('Gebruiker werd verwijderd.')
|
Use a more readable syntax for clicking the user destroy button.
|
diff --git a/spec/requests/tool_integration/pacs_spec.rb b/spec/requests/tool_integration/pacs_spec.rb
index abc1234..def5678 100644
--- a/spec/requests/tool_integration/pacs_spec.rb
+++ b/spec/requests/tool_integration/pacs_spec.rb
@@ -3,6 +3,14 @@ "/cy/tools/#{ToolMountPoint::Pacs::CY_ID}"].each do |path|
describe path do
before do
+ allow(Pacs::PaymentAccountCollection)
+ .to receive(:latest).and_return(
+ instance_double(
+ Pacs::PaymentAccountCollection,
+ updated_at: Time.current,
+ payment_accounts: []
+ )
+ )
get(path)
end
|
Update request spec for pacs engine
We need to stub some class methods which the pacs engine controller
calls in order to assign variables for the root view.
This is a short term solution and we may want to revisit how
we assign these variables in pacs longer term.
|
diff --git a/test/functional/petitions_controller_test.rb b/test/functional/petitions_controller_test.rb
index abc1234..def5678 100644
--- a/test/functional/petitions_controller_test.rb
+++ b/test/functional/petitions_controller_test.rb
@@ -7,8 +7,29 @@ assert_not_nil assigns(:petition)
end
def test_get_json
- get(:show, { :id => WeThePeopleHelper::EXAMPLE_PETITION_ID, :format => 'json'})
+ get(:show, {:id => WeThePeopleHelper::EXAMPLE_PETITION_ID, :format => 'json'})
assert_response :success
assert_not_nil assigns(:petition)
end
+ def test_index
+ get(:index)
+ assert_response :success
+ assert_not_nil assigns(:collection)
+ assert_not_nil assigns(:issues)
+ assert_not_nil assigns(:statuses)
+ assert_not_nil assigns(:signatures)
+ end
+ def test_index_json
+ get(:index, {:format => 'json'})
+ assert_response :success
+ assert_not_nil assigns(:collection)
+ end
+ def test_index_with_all_criteria
+ get(:index, {:issues => ['Health Care'], :statuses => ['responded'], :signatures => 1000})
+ assert_response :success
+ assert_not_nil assigns(:collection)
+ assert_not_nil assigns(:issues)
+ assert_not_nil assigns(:statuses)
+ assert_not_nil assigns(:signatures)
+ end
end
|
Add tests for the petitions index page with and without criteria.
|
diff --git a/test/lib/trlo/actions/test_create_comment.rb b/test/lib/trlo/actions/test_create_comment.rb
index abc1234..def5678 100644
--- a/test/lib/trlo/actions/test_create_comment.rb
+++ b/test/lib/trlo/actions/test_create_comment.rb
@@ -0,0 +1,13 @@+require_relative "../../test_helper"
+
+module Trlo
+ describe CreateComment do
+ describe ".for" do
+ subject { CreateComment.for(card_id) }
+
+ it "creates a comment on the card" do
+ skip("Please write spec.")
+ end
+ end
+ end
+end
|
Add test file for CreateComment.
|
diff --git a/rake/env.rb b/rake/env.rb
index abc1234..def5678 100644
--- a/rake/env.rb
+++ b/rake/env.rb
@@ -1,9 +1,9 @@-def append_env(name, value)
+def append_env(name, value, delim=';')
env_name = name.to_s.upcase
sane_value = value.gsub(File::SEPARATOR, File::ALT_SEPARATOR)
old_value = ENV[env_name] || ''
unless old_value.include?(sane_value)
- ENV[env_name] = "#{sane_value};" + old_value
+ ENV[env_name] = "#{sane_value}#{delim}" + old_value
end
end
@@ -11,11 +11,15 @@ vars = {
:path => File.join(RubyInstaller::ROOT, path, 'bin'),
:cpath => File.join(RubyInstaller::ROOT, path, 'include'),
- :library_path => File.join(RubyInstaller::ROOT, path, 'lib')
- }
+ :ldflags => File.join(RubyInstaller::ROOT, path, 'lib')
+ }.reject { |k, v| !File.directory?(v) }
- vars.delete_if { |k, v| !File.directory?(v) }
vars.each do |k, v|
- append_env(k, v)
+ case k
+ when :ldflags
+ append_env(k, "-L#{v}", ' ')
+ else
+ append_env(k, v)
+ end
end
end
|
Use LDFLAGS rather than LIBRARY_PATH.
The MinGW-w64 toolchain currently ignores LIBRARY_PATH, causing
build failures because the autotools aren't able to find the
required libraries. This patch explicitly sets the library search
paths via -L options in the LDFLAGS env var.
|
diff --git a/pronto-shellcheck.gemspec b/pronto-shellcheck.gemspec
index abc1234..def5678 100644
--- a/pronto-shellcheck.gemspec
+++ b/pronto-shellcheck.gemspec
@@ -2,7 +2,6 @@
$LOAD_PATH.push File.expand_path('../lib', __FILE__)
require 'pronto/shellcheck_version'
-require 'rake'
Gem::Specification.new do |s|
s.name = 'pronto-shellcheck'
@@ -16,13 +15,12 @@ s.required_ruby_version = '>= 2.0.0'
s.rubygems_version = '2.5.1'
- s.files = FileList['README.md', 'lib/**/*']
- s.extra_rdoc_files = ['README.md']
- s.require_paths = ['lib']
+ s.files = Dir['lib/**/*'] + %w(README.md)
+ s.extra_rdoc_files = %w(README.md)
+ s.require_paths = %w(lib)
s.requirements << 'shellcheck (in PATH)'
s.add_dependency('pronto', '> 0.9.0', '< 0.12.0')
- s.add_development_dependency('rake', '> 11.0', '<= 13.0')
s.add_development_dependency('rspec', '~> 3.4')
s.add_development_dependency('pry-byebug')
end
|
Remove rake as a dep
|
diff --git a/lib/destiny/account.rb b/lib/destiny/account.rb
index abc1234..def5678 100644
--- a/lib/destiny/account.rb
+++ b/lib/destiny/account.rb
@@ -4,6 +4,10 @@ # The Destiny::Account class is for acceessing information about a user's
# account via the Destiny API
class Account
+ def initialize(client)
+ @client = client
+ end
+
# Returns Destiny account information for the supplied membership in a
# compact summary form. Will return vault information even if you're not
# that account. Don't you want to be a cool kid and use this service
|
Fix failing tests by adding initialization method
|
diff --git a/pry-vterm_aliases.gemspec b/pry-vterm_aliases.gemspec
index abc1234..def5678 100644
--- a/pry-vterm_aliases.gemspec
+++ b/pry-vterm_aliases.gemspec
@@ -1,15 +1,15 @@ require File.expand_path("../lib/pry-vterm_aliases", __FILE__)
Gem::Specification.new do |spec|
- spec.name = "pry-vterm_aliases"
spec.version = Pry::Plugins::VTerm.version
spec.email = ["jordon@envygeeks.com"]
spec.authors = ["Jordon Bedwell"]
- spec.add_dependency("pry", "~> 0.9.8")
- spec.description = "Enable your Bash and ZSH alises in Pry."
+ spec.name = "pry-vterm_aliases"
spec.files = Dir["**/*"]
- spec.homepage = "https://github.com/envygeeks/pry-vterm_aliases"
spec.licenses = ["MIT"]
spec.require_paths = ["lib"]
+ spec.add_dependency("pry", "~> 0.9.8")
spec.summary = "Enable your Bash and ZSH alises in Pry."
+ spec.description = "Enable your Bash and ZSH alises in Pry."
+ spec.homepage = "http://envygeeks.com/projects/pry-vterm_aliases/"
end
|
Change the homepage to my site.
|
diff --git a/app/controllers/railsyard_authentication_devise/registrations_controller.rb b/app/controllers/railsyard_authentication_devise/registrations_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/railsyard_authentication_devise/registrations_controller.rb
+++ b/app/controllers/railsyard_authentication_devise/registrations_controller.rb
@@ -1,4 +1,5 @@ class RailsyardAuthenticationDevise::RegistrationsController < Devise::RegistrationsController
layout "railsyard_authentication_devise/devise"
+
+ skip_before_filter :require_no_authentication
end
-
|
Fix require_no_authentication error on user creation
|
diff --git a/lib/feature_definitions.rb b/lib/feature_definitions.rb
index abc1234..def5678 100644
--- a/lib/feature_definitions.rb
+++ b/lib/feature_definitions.rb
@@ -1,11 +1,16 @@-require 'lazy_const'
-
class FeatureDefinitions
- extend LazyConst
attr_reader :test_proc
- def self.define_feature(name, &block)
- lazy_const(name) { new(&block) }
+ def self.define_feature(name, &feature_test_block)
+ feature = new(&feature_test_block)
+ meta_class = class << self; self end
+ meta_class.send(:define_method, name) do |&feature_impl_block|
+ if feature_impl_block.nil?
+ feature
+ else
+ feature.enabled?(&feature_impl_block)
+ end
+ end
end
PASSTHROUGH = Proc.new { |arg| arg }
|
Add declarative feature block support
Closes #1
|
diff --git a/lib/form_input/r18n.rb b/lib/form_input/r18n.rb
index abc1234..def5678 100644
--- a/lib/form_input/r18n.rb
+++ b/lib/form_input/r18n.rb
@@ -7,26 +7,34 @@ include R18n::Helpers
class Parameter
+
include R18n::Helpers
-
- # Localized version of error message formatting. See original implementation for details.
- def format_error_message( msg, count = nil, singular = nil, *rest )
- return super unless msg.is_a?( Symbol ) and r18n
- if limit = count and singular
- limit = t.form_input.units[ singular, count ].to_s
+
+ # R18n specific methods.
+ module R18nMethods
+
+ # Localized version of error message formatting. See original implementation for details.
+ def format_error_message( msg, count = nil, singular = nil, *rest )
+ return super unless msg.is_a?( Symbol ) and r18n
+ if limit = count and singular
+ limit = t.form_input.units[ singular, count ].to_s
+ end
+ text = t.form_input.errors[ msg, *limit ]
+ super( text )
end
- text = t.form_input.errors[ msg, *limit ]
- super( text )
+
+ # Automatically attempt to translate available parameter options.
+ def []( name )
+ if form and opts[ name ].is_a?( String ) and r18n
+ text = t.forms[ form.class.translation_name ][ self.name ][ name ]
+ return text.to_s if text.translated?
+ end
+ super
+ end
+
end
- # Automatically attempt to translate available parameter options.
- def []( name )
- if form and opts[ name ].is_a?( String ) and r18n
- text = t.forms[ form.class.translation_name ][ self.name ][ name ]
- return text.to_s if text.translated?
- end
- super
- end
+ include R18nMethods
end
|
Put R18n related methods into its own submodule to make it easy to override them again.
|
diff --git a/test/integration/users_index_test.rb b/test/integration/users_index_test.rb
index abc1234..def5678 100644
--- a/test/integration/users_index_test.rb
+++ b/test/integration/users_index_test.rb
@@ -18,6 +18,11 @@ assert_select 'a[href=?]', user_path(user), text: 'delete'
end
end
+ assert_difference 'User.count', -1 do
+ delete user_path(@non_admin)
+ end
+ assert_not flash.empty?
+ assert_redirected_to users_path
end
test "index as non-admin" do
|
Expand the users index test to test deletion
|
diff --git a/lib/nethack_utils/rumor.rb b/lib/nethack_utils/rumor.rb
index abc1234..def5678 100644
--- a/lib/nethack_utils/rumor.rb
+++ b/lib/nethack_utils/rumor.rb
@@ -11,7 +11,7 @@ def rumor(reliability=nil)
reliability ||= rand
rumors_file = reliability > 0.5 ? truthy_rumors_file : falsy_rumors_file
- open(rumors_file) {|io| io.lines.inject {|r, l| rand($.) < 1 ? l : r } }.chomp
+ open(rumors_file) {|io| io.each_line.inject {|r, l| rand($.) < 1 ? l : r } }.chomp
end
private
|
Use each_line instead of lines.
|
diff --git a/spec/generators/rails/helper_generator_spec.rb b/spec/generators/rails/helper_generator_spec.rb
index abc1234..def5678 100644
--- a/spec/generators/rails/helper_generator_spec.rb
+++ b/spec/generators/rails/helper_generator_spec.rb
@@ -0,0 +1,31 @@+require 'spec_helper'
+
+Rails::Generators.lookup(["rails:helper"])
+
+describe Rails::Generators::HelperGenerator, type: :generator do
+ destination File.expand_path('../../../../tmp/generator', __FILE__)
+ arguments %w(verbose)
+
+ before { prepare_destination }
+
+ shared_examples :rails_helper do |controller_name|
+ context controller_name do
+ let(:home_dir){ File.expand_path('../../../../tmp/generator', __FILE__) }
+ before{ allow(ModelBase.config).to receive(:home_dir).and_return(home_dir) }
+ after do
+ FileUtils.rm_rf(home_dir)
+ end
+
+ it 'creates a test initializer' do
+ run_generator [controller_name.dup]
+ assert_expectation_file "app/helpers/#{controller_name}_helper.rb"
+ end
+ end
+ end
+
+ it_behaves_like :rails_helper, 'projects'
+ it_behaves_like :rails_helper, 'project_assignments'
+ it_behaves_like :rails_helper, 'phases'
+ it_behaves_like :rails_helper, 'issues'
+ it_behaves_like :rails_helper, 'issue_comments'
+end
|
Add test of helper generator
|
diff --git a/spec/notifiers/publishing_api_notifier_spec.rb b/spec/notifiers/publishing_api_notifier_spec.rb
index abc1234..def5678 100644
--- a/spec/notifiers/publishing_api_notifier_spec.rb
+++ b/spec/notifiers/publishing_api_notifier_spec.rb
@@ -4,7 +4,7 @@ let(:publishing_api) { double(:publishing_api, put_content_item: nil) }
before do
- CollectionsPublisher.services(:publishing_api, publishing_api)
+ allow(CollectionsPublisher).to receive(:services).with(:publishing_api).and_return(publishing_api)
end
describe "#publish(sector_presenter)" do
|
Fix notifier spec to not leak state.
The replacing of the publishing_api client was not being reset after
this test, causing other tests run after this to fail.
|
diff --git a/spec/rrj/rabbit/publish/base_publisher_spec.rb b/spec/rrj/rabbit/publish/base_publisher_spec.rb
index abc1234..def5678 100644
--- a/spec/rrj/rabbit/publish/base_publisher_spec.rb
+++ b/spec/rrj/rabbit/publish/base_publisher_spec.rb
@@ -8,7 +8,7 @@
describe 'BasePublisher' do
describe '#new' do
- it { expect(publish).to have_attributes(response: nil) }
+ it { expect(publish).to have_attributes(response: []) }
end
end
end
|
Fix test response in publisher
|
diff --git a/app/controllers.rb b/app/controllers.rb
index abc1234..def5678 100644
--- a/app/controllers.rb
+++ b/app/controllers.rb
@@ -7,10 +7,10 @@ erb :about, :layout => :'layouts/main'
end
- post "/m" do
+ post %r{/m/?} do
text = params[:text].strip
raise "Text is empty." if text.empty?
- raise "Text is not valid Ascii Armored message." if not AsciiArmor.valid? text
+ raise "Text is not valid Ascii Armored message." if !AsciiArmor.valid? text
@msg = Message.new
@msg.text = text
@@ -24,7 +24,7 @@ post "/m/:id" do
text = params[:text].strip
raise "Text is empty." if text.empty?
- raise "Text is not valid Ascii Armored message." if not AsciiArmor.valid? text
+ raise "Text is not valid Ascii Armored message." if !AsciiArmor.valid? text
@msg = Message.get(params[:id])
@msg.append(text)
|
Fix routing to respond to both /m and /m/
|
diff --git a/db/data_migration/20140205133122_rename_cesg_device_guidance_slug.rb b/db/data_migration/20140205133122_rename_cesg_device_guidance_slug.rb
index abc1234..def5678 100644
--- a/db/data_migration/20140205133122_rename_cesg_device_guidance_slug.rb
+++ b/db/data_migration/20140205133122_rename_cesg_device_guidance_slug.rb
@@ -0,0 +1,10 @@+OLD_SLUG = 'end-user-devices-security-guidance--2'
+NEW_SLUG = 'end-user-devices-security-guidance'
+
+document = Document.find_by_slug(OLD_SLUG)
+document.update_attribute(:slug, NEW_SLUG)
+
+router = GdsApi::Router.new(Plek.current.find('router-api'))
+router.add_redirect_router("/government/collections/#{OLD_SLUG}",
+ 'exact',
+ "/government/collections/#{NEW_SLUG}")
|
Rename CESG device guidance slug
https://www.pivotaltracker.com/story/show/59541766
|
diff --git a/lib/group_cache_key.rb b/lib/group_cache_key.rb
index abc1234..def5678 100644
--- a/lib/group_cache_key.rb
+++ b/lib/group_cache_key.rb
@@ -1,5 +1,5 @@-require 'activerecord'
-require 'activesupport'
+require 'active_record'
+require 'active_support'
require 'digest/md5'
ActiveRecord::Base.class_eval {
@@ -15,4 +15,4 @@ end
end
}
-}+}
|
Use Rails3 names for ActiveRecord/Support
|
diff --git a/lib/hawk/model/base.rb b/lib/hawk/model/base.rb
index abc1234..def5678 100644
--- a/lib/hawk/model/base.rb
+++ b/lib/hawk/model/base.rb
@@ -24,6 +24,10 @@ }
"#<#{self.class.name}#{attributes}>"
end
+
+ def self.configure(&block)
+ instance_eval(&block)
+ end
end
end
|
Add Base.configure as instance_eval to access the DSL
|
diff --git a/lib/spanish_inquisition.rb b/lib/spanish_inquisition.rb
index abc1234..def5678 100644
--- a/lib/spanish_inquisition.rb
+++ b/lib/spanish_inquisition.rb
@@ -13,6 +13,8 @@ load
@surveys ||= {}
end
+
+ module Presenters; end
end
require 'spanish_inquisition/page'
|
Make sure the Presenters module/namespace is defined.
|
diff --git a/lib/spikor_forge/module.rb b/lib/spikor_forge/module.rb
index abc1234..def5678 100644
--- a/lib/spikor_forge/module.rb
+++ b/lib/spikor_forge/module.rb
@@ -13,7 +13,9 @@
def dependencies
@metadata['dependencies'].collect do |dep|
- [dep['name'], dep['version_requirement'] || '' ]
+ ret = [dep['name']]
+ ret << dep['version_requirement'] if dep['version_requirement']
+ ret
end
end
|
Handle dependencies without version spec better
|
diff --git a/lib/sslyze/key_exchange.rb b/lib/sslyze/key_exchange.rb
index abc1234..def5678 100644
--- a/lib/sslyze/key_exchange.rb
+++ b/lib/sslyze/key_exchange.rb
@@ -26,7 +26,7 @@ end
def generator_type
- @generator ||= @node['GeneratorType']
+ @generator ||= @node['GeneratorType'].to_sym
end
def group_size
|
Convert generator_type to a Symbol.
|
diff --git a/lib/tsheets/models/user.rb b/lib/tsheets/models/user.rb
index abc1234..def5678 100644
--- a/lib/tsheets/models/user.rb
+++ b/lib/tsheets/models/user.rb
@@ -1,7 +1,7 @@ class TSheets::Models::User < TSheets::Model
field :id, :integer
field :username, :string
- field :password
+ field :password, :string
field :email, :string
field :first_name, :string
field :last_name, :string
|
Add type to password field.
|
diff --git a/recipes/apt_repository.rb b/recipes/apt_repository.rb
index abc1234..def5678 100644
--- a/recipes/apt_repository.rb
+++ b/recipes/apt_repository.rb
@@ -23,9 +23,9 @@ case node['platform']
when 'debian'
# We need the mayor release number (e.g. 7)
- uri "http://downloads.opennebula.org/repo/Debian/#{node['lsb']['release'].to_i}"
+ uri "http://downloads.opennebula.org/repo/4.8/Debian/#{node['lsb']['release'].to_i}"
when 'ubuntu'
- uri "http://downloads.opennebula.org/repo/Ubuntu/#{node['lsb']['release']}"
+ uri "http://downloads.opennebula.org/repo/4.8/Ubuntu/#{node['lsb']['release']}"
else
Chef::Log.fatal!("Your platform (#{node['platform']}) is not supported.")
end
|
Use repositories for OpenNebula 4.8
|
diff --git a/lib/rubygems_plugin.rb b/lib/rubygems_plugin.rb
index abc1234..def5678 100644
--- a/lib/rubygems_plugin.rb
+++ b/lib/rubygems_plugin.rb
@@ -14,6 +14,7 @@ options[:document] << 'yardoc'
Gem.post_install do |installer|
+ YARD::Registry.clear
Gem::Commands::YardocCommand.run_yardoc(installer.spec)
end
end
|
Clear YARD Registroy before each documenting
|
diff --git a/app/models/user.rb b/app/models/user.rb
index abc1234..def5678 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -1,3 +1,9 @@+# NOTE: Application has "admin" user only
+# admin's password can be changed from browser, but user name "admin" can't be changed.
+# many clients can login at the same time (App has multiple active sessions)
+# raw password shouldn't be compromised (except default password)
+# you may find detail at https://github.com/treasure-data/fluentd-ui/pull/34
+
class User
include ActiveModel::Model
include ActiveModel::SecurePassword
|
Add NOTE for User model
|
diff --git a/test/integration/microposts_test.rb b/test/integration/microposts_test.rb
index abc1234..def5678 100644
--- a/test/integration/microposts_test.rb
+++ b/test/integration/microposts_test.rb
@@ -0,0 +1,52 @@+class MicropostsTest < ActionDispatch::IntegrationTest
+ include DatabaseConfiguration
+
+ setup do
+ @content = "This is micropost!!!"
+ @micropost = FactoryGirl.create(:micropost, content: @content)
+ end
+
+ sub_test_case "index" do
+ setup do
+ visit microposts_path
+ end
+
+ test "should show micropost content" do
+ assert { page.has_text?(@content) }
+ end
+
+ test "should include link for edit" do
+ assert { page.has_css?( "a[@href='#{micropost_path(@micropost)}']" ) }
+ end
+ end
+
+ sub_test_case "edit" do
+ setup do
+ visit edit_micropost_path(@micropost)
+ end
+
+ test "should update the micropost" do
+ updated_content = "#{@content} Tiny post!!!"
+ fill_in "micropost[content]", with: updated_content
+ find("input[type='submit']").click
+
+ within "#microposts" do
+ assert { page.has_text?(updated_content) }
+ end
+ end
+ end
+
+ sub_test_case "destroy" do
+ setup do
+ visit microposts_path
+ end
+
+ test "should update the micropost" do
+ click_link 'Destroy'
+
+ within "#microposts" do
+ assert { all(".content").empty? }
+ end
+ end
+ end
+end
|
test: Add integration test for Micropost
|
diff --git a/test/unit/filters/instagram_test.rb b/test/unit/filters/instagram_test.rb
index abc1234..def5678 100644
--- a/test/unit/filters/instagram_test.rb
+++ b/test/unit/filters/instagram_test.rb
@@ -2,7 +2,7 @@
class InstagramTest < Test::Unit::TestCase
def test_instagram_embed
- result = auto_html('http://instagr.am/p/WsQTLAGvx7/') { instagram }
+ result = auto_html('http://instagram.com/p/WsQTLAGvx7/') { instagram }
assert_equal '<iframe src="//instagram.com/p/WsQTLAGvx7/embed/" height="714" width="616" frameborder="0" scrolling="no"></iframe>', result
end
end
|
Fix test so it passes
|
diff --git a/test/centos_spec.rb b/test/centos_spec.rb
index abc1234..def5678 100644
--- a/test/centos_spec.rb
+++ b/test/centos_spec.rb
@@ -24,4 +24,11 @@ expect(file('/etc/resolv.conf').content).to match /single-request-reopen/
end
end
+
+ # https://www.chef.io/blog/2015/02/26/bento-box-update-for-centos-and-fedora/
+ describe 'test-cacert' do
+ it 'uses the vendor-supplied openssl certificates' do
+ expect(command('openssl s_client -CAfile /etc/pki/tls/certs/ca-bundle.crt -connect packagecloud-repositories.s3.amazonaws.com:443 </dev/null 2>&1 | grep -i "verify return code"').stdout).to match /\s+Verify return code: 0 \(ok\)/
+ end
+ end
end
|
Add test to verify that vendor-supplied openssl certs are being used
|
diff --git a/test/rake_test_setup.rb b/test/rake_test_setup.rb
index abc1234..def5678 100644
--- a/test/rake_test_setup.rb
+++ b/test/rake_test_setup.rb
@@ -18,7 +18,7 @@ end
module TestMethods
- def assert_exception(ex, msg=nil, &block)
+ def assert_exception(ex, msg="", &block)
assert_raise(ex, msg, &block)
end
end
|
Fix for weird exception error
|
diff --git a/core/lib/spree/core/version.rb b/core/lib/spree/core/version.rb
index abc1234..def5678 100644
--- a/core/lib/spree/core/version.rb
+++ b/core/lib/spree/core/version.rb
@@ -1,8 +1,10 @@ # frozen_string_literal: true
module Spree
+ VERSION = "2.9.0.alpha"
+
def self.solidus_version
- "2.9.0.alpha"
+ VERSION
end
def self.solidus_gem_version
|
Add VERSION constant to please gem-release
gem-release is looking for that constant to understand current version
and allow bump to the new one with a command.
|
diff --git a/debug_exceptions_json.gemspec b/debug_exceptions_json.gemspec
index abc1234..def5678 100644
--- a/debug_exceptions_json.gemspec
+++ b/debug_exceptions_json.gemspec
@@ -20,7 +20,7 @@ s.add_development_dependency "rspec", "~> 2.14.1"
s.add_development_dependency "rails", "~> 4.1.5"
s.add_development_dependency "sqlite3", "~> 1.3.9"
- s.add_development_dependency "rspec-rails"
+ s.add_development_dependency "rspec-rails", ">= 2.14.2"
s.add_development_dependency "pry-rails", "~> 0.3.2"
s.add_development_dependency "rspec-json_matcher", "~> 0.1.5"
end
|
Add vesion specification of rspec-rails for development dependency
|
diff --git a/dynamo_kickstarter.gemspec b/dynamo_kickstarter.gemspec
index abc1234..def5678 100644
--- a/dynamo_kickstarter.gemspec
+++ b/dynamo_kickstarter.gemspec
@@ -16,4 +16,5 @@ gem.version = DynamoKickstarter::VERSION
gem.add_dependency 'rails', '3.2.8'
+ gem.add_dependency 'heroku', '~>2.30.0'
end
|
Add Heroku as a dependency
|
diff --git a/app/controllers/admin/email_curation_queue_items_controller.rb b/app/controllers/admin/email_curation_queue_items_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/admin/email_curation_queue_items_controller.rb
+++ b/app/controllers/admin/email_curation_queue_items_controller.rb
@@ -9,7 +9,7 @@ end
def update
- if @email_curation_queue_item.update_attributes(params[:email_curation_queue_item])
+ if @email_curation_queue_item.update_attributes(email_curation_queue_item_params)
redirect_to [:admin, EmailCurationQueueItem], notice: 'Email curation queue item updated.'
else
render :edit
@@ -33,4 +33,8 @@ def load_email_curation_queue_item
@email_curation_queue_item = EmailCurationQueueItem.find(params[:id])
end
+
+ def email_curation_queue_item_params
+ params.require(:email_curation_queue_item).permit(:title, :summary)
+ end
end
|
Add strong params for email curation queue items
|
diff --git a/app/models/concerns/course/discussion/post/ordering_concern.rb b/app/models/concerns/course/discussion/post/ordering_concern.rb
index abc1234..def5678 100644
--- a/app/models/concerns/course/discussion/post/ordering_concern.rb
+++ b/app/models/concerns/course/discussion/post/ordering_concern.rb
@@ -19,10 +19,10 @@
private
- def sort(post)
- children_posts = @posts.select { |child_post| child_post.parent == post }
+ def sort(post_id)
+ children_posts = @posts.select { |child_post| child_post.parent_id == post_id }
children_posts.map do |child_post|
- [child_post].push(sort(child_post))
+ [child_post].push(sort(child_post.id))
end
end
end
|
Reduce the number of additional loads when doing topological ordering.
|
diff --git a/app/controllers/thredded/messageboards_controller.rb b/app/controllers/thredded/messageboards_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/thredded/messageboards_controller.rb
+++ b/app/controllers/thredded/messageboards_controller.rb
@@ -1,5 +1,3 @@-require 'pry'
-
module Thredded
class MessageboardsController < Thredded::ApplicationController
def index
|
[JRO] Remove unnecessary require of pry
|
diff --git a/frontend/app/controllers/spree/taxons_controller.rb b/frontend/app/controllers/spree/taxons_controller.rb
index abc1234..def5678 100644
--- a/frontend/app/controllers/spree/taxons_controller.rb
+++ b/frontend/app/controllers/spree/taxons_controller.rb
@@ -16,7 +16,7 @@ def product_carousel
if stale?(etag: carousel_etag, last_modified: last_modified, public: true)
load_products
- if @products.any?
+ if @products.reload.any?
render template: 'spree/taxons/product_carousel', layout: false
else
head :no_content
|
Add .reload in product_carousel method to prevent query errors while using postgres
|
diff --git a/test/test_helper.rb b/test/test_helper.rb
index abc1234..def5678 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -1,18 +1,14 @@-require "rubygems"
+require 'rubygems'
require "bundler/setup"
require "test/unit"
require "active_support/test_case"
-require 'action_mailer/test_helper'
Bundler.require(:default, :development)
require 'test/factories'
-
-# FIXME move SupportMailer into callbacks
-require File.join(File.dirname(__FILE__), 'support', 'support_mailer')
# Configure for test mode
require 'regentanz/test_helper'
setup_regentanz_test_configuration! do |config|
config.cache_dir = File.expand_path(File.join(File.dirname(__FILE__), '', 'support', 'tmp'))
config.retry_marker = File.expand_path(File.join(File.dirname(__FILE__), 'support', 'tmp', 'test_api_retry.txt'))
-end+end
|
Remove actionmailer in test setup
|
diff --git a/ruote-synchronize.gemspec b/ruote-synchronize.gemspec
index abc1234..def5678 100644
--- a/ruote-synchronize.gemspec
+++ b/ruote-synchronize.gemspec
@@ -8,8 +8,12 @@ spec.version = Ruote::Synchronize::VERSION
spec.authors = ["Adrien Kohlbecker"]
spec.email = ["adrien.kohlbecker@gmail.com"]
- spec.description = %q{Ruote 1-1 process synchronization}
- spec.summary = %q{Ruote 1-1 process synchronization}
+ spec.description = %q{A process synchronisation module for Ruote.}
+ spec.summary = %q{A process synchronisation module for Ruote.
+ Will define a synchronize :key => "my_unique_key" participant.
+ You can use it in two processes by defining the same synchronisation key.
+ The first process to reach the synchronization will wait for the other one.}.gsub(/^\s+/, '')
+
spec.homepage = "https://github.com/adrienkohlbecker/ruote-synchronize"
spec.license = "MIT"
|
Write gem description and summary
|
diff --git a/lib/adhearsion/call_controller/menu_dsl/array_match_calculator.rb b/lib/adhearsion/call_controller/menu_dsl/array_match_calculator.rb
index abc1234..def5678 100644
--- a/lib/adhearsion/call_controller/menu_dsl/array_match_calculator.rb
+++ b/lib/adhearsion/call_controller/menu_dsl/array_match_calculator.rb
@@ -3,9 +3,7 @@ module Adhearsion
class CallController
module MenuDSL
-
class ArrayMatchCalculator < MatchCalculator
- @array_type = nil
def initialize(pattern, match_payload)
if pattern.size == 0
@@ -26,7 +24,6 @@ return new_calculated_match :query => query, :exact_matches => nil, :potential_matches => nil
end
args = { :query => query, :exact_matches => [], :potential_matches => [] }
- exact_match, potential_match = nil
pattern.each do |pat|
next if pat.nil?
if @array_type == Fixnum
@@ -47,8 +44,7 @@ new_calculated_match args
end
- end # class ArrayMatchCalculator
-
+ end
end
end
-end+end
|
[CS] Remove redundant code from ArrayMatchCalculator
|
diff --git a/spec/api/v1/users_spec.rb b/spec/api/v1/users_spec.rb
index abc1234..def5678 100644
--- a/spec/api/v1/users_spec.rb
+++ b/spec/api/v1/users_spec.rb
@@ -2,9 +2,15 @@
describe "/api/v1/users" do
let(:url) { "/api/v1" }
+ let(:user) { create(:user) }
context "as an anonymous user" do
let(:token) { nil }
+
+ it "responds with an unauthorized error" do
+ get "#{url}/users/#{user.id}", auth_token: token
+ expect_unauthorized_failure(last_response)
+ end
it "adds a new user" do
expect {
|
Test API for unauthorized access to a user's hash.
|
diff --git a/spec/command/kill_spec.rb b/spec/command/kill_spec.rb
index abc1234..def5678 100644
--- a/spec/command/kill_spec.rb
+++ b/spec/command/kill_spec.rb
@@ -13,7 +13,7 @@
it 'terminates spawned process' do
is_expected.to eq signal
- expect { Process.kill(0, pid) }.to raise_error
+ expect { Process.kill(0, pid) }.to raise_error(Errno::ESRCH)
end
end
end
|
Fix the `raise_error` matcher without providing a specific error
|
diff --git a/middleman-slim.gemspec b/middleman-slim.gemspec
index abc1234..def5678 100644
--- a/middleman-slim.gemspec
+++ b/middleman-slim.gemspec
@@ -6,7 +6,7 @@ Gem::Specification.new do |spec|
spec.name = "middleman-slim"
spec.version = Middleman::Slim::VERSION
- spec.authors = ["yterajima"]
+ spec.authors = ["Yuya Terajima"]
spec.email = ["terra@e2esound.com"]
spec.description = %q{A Middleman template using Slim.}
spec.summary = %q{A Middleman template using Slim.}
|
Change author name in gemspec
|
diff --git a/DomainCheck.rb b/DomainCheck.rb
index abc1234..def5678 100644
--- a/DomainCheck.rb
+++ b/DomainCheck.rb
@@ -51,9 +51,9 @@ end
end
-username = 'gayan';
-password = 'eppo123'
-domainName = 'gayan.com'
+username = 'yourusername';
+password = 'yourpassword'
+domainName = 'gayan.com' # the domain name you look for
client = DomainCheck.new(username, password, domainName)
puts client.getText()
|
Change actual credential to fake one
|
diff --git a/spec/features/auth_signin_spec.rb b/spec/features/auth_signin_spec.rb
index abc1234..def5678 100644
--- a/spec/features/auth_signin_spec.rb
+++ b/spec/features/auth_signin_spec.rb
@@ -13,7 +13,7 @@ fill_in "user[username]", :with => "test_user"
fill_in "user[password]", :with => "password"
click_on "login"
- expect(page).to have_content("test_user")
+ expect(page).to have_content("Test_user")
end
end
|
Fix test to expect capitalized username
|
diff --git a/spec/helpers/named_maps_helper.rb b/spec/helpers/named_maps_helper.rb
index abc1234..def5678 100644
--- a/spec/helpers/named_maps_helper.rb
+++ b/spec/helpers/named_maps_helper.rb
@@ -1,5 +1,9 @@ module NamedMapsHelper
def bypass_named_maps
+ Carto::NamedMaps::Api.any_instance.stubs(show: nil, create: true, update: true, destroy: true)
+ end
+
+ def bypass_named_maps_requests
mocked_response = mock
mocked_response.stubs(code: 200, response_body: '{}')
|
Add a different named maps helper instead
|
diff --git a/spec/html/proofer/scripts_spec.rb b/spec/html/proofer/scripts_spec.rb
index abc1234..def5678 100644
--- a/spec/html/proofer/scripts_spec.rb
+++ b/spec/html/proofer/scripts_spec.rb
@@ -8,10 +8,22 @@ output.should match /External link http:\/\/www.asdo3IRJ395295jsingrkrg4.com\/asdo3IRJ.js? failed: 0 Couldn't resolve host name/
end
+ it "works for valid internal src" do
+ file = "#{FIXTURES_DIR}/script_valid_internal.html"
+ output = capture_stderr { HTML::Proofer.new(file).run }
+ output.should == ""
+ end
+
it "works for present content" do
file = "#{FIXTURES_DIR}/script_content.html"
output = capture_stderr { HTML::Proofer.new(file).run }
output.should == ""
end
+ it "fails for absent content" do
+ file = "#{FIXTURES_DIR}/script_content_absent.html"
+ output = capture_stderr { HTML::Proofer.new(file).run }
+ output.should match /script has no src attribute/
+ end
+
end
|
Add test for absent content and absent src
|
diff --git a/spec/integration/homepage_spec.rb b/spec/integration/homepage_spec.rb
index abc1234..def5678 100644
--- a/spec/integration/homepage_spec.rb
+++ b/spec/integration/homepage_spec.rb
@@ -1,4 +1,5 @@ require 'spec_helper'
+include Warden::Test::Helpers
describe 'homepage behaviour', :type => :feature do
before { visit '/' }
@@ -6,9 +7,17 @@ expect(page).to have_content 'No more ideas'
end
- it 'will display an upload field if logged in' do
- end
+ it 'will display an upload field ifand only if logged in' do
+ user = Invite.create(:description => 'Test')
+ .users
+ .create(:email => 'test@test.com', :password => 'panzer vor')
- it 'will not display an upload field if logged out' do
+ Warden.test_mode!
+ login_as(user, :scope => user)
+ expect(page).to have_content 'Upload images'
+
+ logout(:user)
+ expect(page).not_to have_content 'Upload images'
+ Warden.test_reset!
end
end
|
Check for upload widget on homepage when logged in
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.