diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/lib/highrise/kase.rb b/lib/highrise/kase.rb
index abc1234..def5678 100644
--- a/lib/highrise/kase.rb
+++ b/lib/highrise/kase.rb
@@ -4,5 +4,13 @@ self.closed_at = Time.now.utc
save
end
+
+ def self.open
+ Kase.find(:all, :from => "/kases/open.xml")
+ end
+
+ def self.closed
+ Kase.find(:all, :from => "/kases/closed.xml")
+ end
end
end
|
Add Kase.open and Kase.closed functions
|
diff --git a/lib/pronto/config.rb b/lib/pronto/config.rb
index abc1234..def5678 100644
--- a/lib/pronto/config.rb
+++ b/lib/pronto/config.rb
@@ -12,8 +12,10 @@ end
def consolidate_comments?
- consolidated = ENV['PRONTO_CONSOLIDATE_COMMENTS'] || @config_hash['consolidate_comments']
- !(consolidated).nil?
+ consolidated =
+ ENV['PRONTO_CONSOLIDATE_COMMENTS'] ||
+ @config_hash.fetch('consolidate_comments', false)
+ consolidated
end
def excluded_files
|
Allow for nil and false values for consolidation
|
diff --git a/LolayLocksmith.podspec b/LolayLocksmith.podspec
index abc1234..def5678 100644
--- a/LolayLocksmith.podspec
+++ b/LolayLocksmith.podspec
@@ -1,5 +1,4 @@ Pod::Spec.new do |s|
-
s.name = 'LolayLocksmith'
s.version = '1'
s.summary = 'iOS Wrapper for Keychain Utilities such as SecItemCopyMatching, SecItemAdd, SecItemUpdate and SecItemDelete.'
@@ -17,7 +16,6 @@ }
s.source_files = '*.{h,m}'
s.requires_arc = true
- s.frameworks = 'XCTest','Foundation', 'Security'
+ s.frameworks = 'Security'
s.ios.deployment_target = '7.0'
- s.xcconfig = { 'OTHER_LDFLAGS' => '-ObjC'}
end
|
Update podspec to remove XCTest
|
diff --git a/Casks/macpaw-gemini.rb b/Casks/macpaw-gemini.rb
index abc1234..def5678 100644
--- a/Casks/macpaw-gemini.rb
+++ b/Casks/macpaw-gemini.rb
@@ -3,10 +3,10 @@ sha256 :no_check
# devmate.com is the official download host per the vendor homepage
- url 'http://dl.devmate.com/download/com.macpaw.site.Gemini/macpaw%20gemini.dmg'
+ url 'http://dl.devmate.com/com.macpaw.site.Gemini/MacPawGemini.dmg'
appcast 'http://updates.devmate.com/com.macpaw.site.Gemini.xml'
homepage 'http://macpaw.com/gemini'
- license :unknown # todo: change license and remove this comment; ':unknown' is a machine-generated placeholder
+ license :commercial
app 'MacPaw Gemini.app'
end
|
Update url and license for MacPaw Gemini.app
|
diff --git a/Casks/music-manager.rb b/Casks/music-manager.rb
index abc1234..def5678 100644
--- a/Casks/music-manager.rb
+++ b/Casks/music-manager.rb
@@ -1,6 +1,6 @@ cask :v1 => 'music-manager' do
- version '1.0.104.6528'
- sha256 'a1e4e48e008958f9a725bfee1e2d8360dc8efad38ef2532fc1b3e4b9c3df8f0d'
+ version '1.0.216.5719'
+ sha256 '948967d9325bde3e7344504e965dbcd9f94bee01512f4c49ad3e4d9425798f11'
url "https://dl.google.com/dl/androidjumper/mac/#{version.sub(%r{^\d+\.\d+\.},'').delete('.')}/musicmanager.dmg"
name 'Google Play Music Manager'
|
Update Google Play Music Manager
Updated Music Manager from an old version that no longer works.
|
diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/messages_controller.rb
+++ b/app/controllers/messages_controller.rb
@@ -32,7 +32,7 @@ end
def validate_request_status
- unless (@request.responder && !@request.is_fulfilled)
+ unless @request.active?
flash[:error] = "This request is no longer active."
redirect_to request_messages_path(@request)
end
|
Refactor the validate_request_status callback to leverage the
request.active? logic.
|
diff --git a/app/controllers/readings_controller.rb b/app/controllers/readings_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/readings_controller.rb
+++ b/app/controllers/readings_controller.rb
@@ -3,7 +3,12 @@
def create
reading = Reading.create_from_params(strong_params)
- render json: reading
+
+ if reading[:error]
+ render json: reading, status: 500
+ else
+ render json: reading
+ end
end
private
|
Return 500 status when reading not created successfully
|
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/sessions_controller.rb
+++ b/app/controllers/sessions_controller.rb
@@ -2,11 +2,13 @@ def signin
@user = User.find_by(id: params[:id])
- if @user && @user.authenticate(password: params[:password])
+ if @user && @user.authenticate(email: params[:email], password: params[:password])
# redirect to members page
- "successful signin"
+ session[:user_id] = @user.id
+ redirect_to '/'
else
- "something went wrong"
+ flash[:error] = "Login error"
+ p "something went wrong"
end
end
|
Work on getting login to work
|
diff --git a/spec/acceptance/gitlab_spec.rb b/spec/acceptance/gitlab_spec.rb
index abc1234..def5678 100644
--- a/spec/acceptance/gitlab_spec.rb
+++ b/spec/acceptance/gitlab_spec.rb
@@ -19,7 +19,7 @@ it { is_expected.to be_installed }
end
- describe command('curl -s -S 0.0.0.0:80/users/sign_in') do
+ describe command('curl -s -S http://127.0.0.1:80/users/sign_in') do
its(:stdout) { is_expected.to match %r{.*reset_password_token=.*redirected.*} }
end
end
|
Make URL look like an URL
- Add scheme (http)
- Use 127.0.0.1 to address the node itself, not 0.0.0.0
This should fix:
```
ubuntu1604-64-1 06:39:31$ /bin/sh -c curl\ -s\ -S\ 0.0.0.0:80/users/sign_in
curl: (3) URL using bad/illegal format or missing URL
```
|
diff --git a/spec/freebsd/rootlogin_spec.rb b/spec/freebsd/rootlogin_spec.rb
index abc1234..def5678 100644
--- a/spec/freebsd/rootlogin_spec.rb
+++ b/spec/freebsd/rootlogin_spec.rb
@@ -11,3 +11,8 @@ it { should be_file }
it { should contain "PasswordAuthentication no" }
end
+
+describe file('/etc/ssh/sshd_config') do
+ it { should be_file }
+ it { should contain "PermitRootLogin yes" }
+end
|
Make sure root can log in
|
diff --git a/spec/lib/image_captcha_spec.rb b/spec/lib/image_captcha_spec.rb
index abc1234..def5678 100644
--- a/spec/lib/image_captcha_spec.rb
+++ b/spec/lib/image_captcha_spec.rb
@@ -0,0 +1,56 @@+require 'spec_helper'
+
+username = CREDENTIALS['username']
+password = CREDENTIALS['password']
+path2 = './captchas/2.jpg' # path of the captcha (Coordinates API)
+path3_grid = './captchas/3-grid.jpg' # path of the grid (Image Group API)
+path3_banner = './captchas/3-banner.jpg' # path of the grid (Image Group API)
+banner_text3 = 'Click all images with bananas'
+
+describe 'Solving an image based captcha' do
+ before(:all) { @client = DeathByCaptcha.new(username, password, :http) }
+
+ context 'Coordinates API' do
+ describe '#decode!' do
+ before(:all) { @captcha = @client.decode!(type: 2, path: path2) }
+ it { expect(@captcha).to be_a(DeathByCaptcha::Captcha) }
+ it { expect(@captcha.text).to match(/\A\[\[.*\]\]\Z/) }
+ it { expect(@captcha.coordinates).to be_a(Array) }
+ it { expect(@captcha.coordinates.size).to be > 0 }
+ it 'expect coordinates to be valid' do
+ @captcha.coordinates.each do |coordinate|
+ expect(coordinate).to be_a(Array)
+ expect(coordinate.size).to eq(2)
+ end
+ end
+ it { expect(@captcha.is_correct).to be true }
+ it { expect(@captcha.id).to be > 0 }
+ it { expect(@captcha.id).to eq(@captcha.captcha) }
+ end
+ end
+
+ context 'Image Group API' do
+ describe '#decode!' do
+ before(:all) do
+ @captcha = @client.decode!(
+ type: 3,
+ path: path3_grid,
+ banner: { path: path3_banner },
+ banner_text: banner_text3
+ )
+ end
+ it { expect(@captcha).to be_a(DeathByCaptcha::Captcha) }
+ it { expect(@captcha.text).to match(/\A\[.*\]\Z/) }
+ it { expect(@captcha.indexes).to be_a(Array) }
+ it { expect(@captcha.indexes.size).to be > 0 }
+ it 'expect indexes to be valid' do
+ @captcha.indexes.each do |index|
+ expect(index).to be_a(Numeric)
+ end
+ end
+ it { expect(@captcha.is_correct).to be true }
+ it { expect(@captcha.id).to be > 0 }
+ it { expect(@captcha.id).to eq(@captcha.captcha) }
+ end
+ end
+end
|
Add tests to image based captchas
|
diff --git a/spec/models/iep_storer_spec.rb b/spec/models/iep_storer_spec.rb
index abc1234..def5678 100644
--- a/spec/models/iep_storer_spec.rb
+++ b/spec/models/iep_storer_spec.rb
@@ -34,8 +34,29 @@ )
}
- it 'stores an object to the db' do
- expect { subject.store }.to change(IepDocument, :count).by 1
+ context 'no other document for that student' do
+ it 'stores an object to the db' do
+ expect { subject.store }.to change(IepDocument, :count).by 1
+ end
+ end
+
+ context 'other document exists for that student' do
+ let!(:other_iep) {
+ IepStorer.new(
+ file_name: 'Old Old IEP Document',
+ path_to_file: '/path/to/file',
+ local_id: 'abc_student_local_id',
+ client: FakeAwsClient,
+ logger: QuietLogger
+ )
+ }
+
+ it 'stores an object to the db' do
+ expect { subject.store }.to change(IepDocument, :count).by 1
+ end
+ it 'updates the filename' do
+ expect { subject.store }.to change(IepDocument, :count).by 1
+ end
end
end
|
Add more cases to Iep Storer spec
|
diff --git a/spec/requests/chapters_spec.rb b/spec/requests/chapters_spec.rb
index abc1234..def5678 100644
--- a/spec/requests/chapters_spec.rb
+++ b/spec/requests/chapters_spec.rb
@@ -3,6 +3,7 @@ describe 'chapters' do
let(:user) { create_user! }
before do
+ Resque.remove_queue("normal") # TODO: is there a better way than just putting this *everywhere*?
@book = Book.create(:title => "Rails 3 in Action",
:path => "http://github.com/radar/rails3book_test")
run_resque_job!
|
Add step for removing queue in chapters request spec
|
diff --git a/spec/integration/commands/addresses/assign_spec.rb b/spec/integration/commands/addresses/assign_spec.rb
index abc1234..def5678 100644
--- a/spec/integration/commands/addresses/assign_spec.rb
+++ b/spec/integration/commands/addresses/assign_spec.rb
@@ -0,0 +1,54 @@+require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
+
+describe "addresses:assign command" do
+ def cli
+ @cli ||= HP::Cloud::CLI.new
+ end
+
+ before(:all) do
+ @hp_svc = compute_connection
+ response, exit = run_command('addresses:add').stdout_and_exit_status
+ @public_ip = response.scan(/'([^']+)/)[0][0]
+ response2 = @hp_svc.run_instances('ami-00000005', 1, 1, {'InstanceType' => 'm1.small'})
+ @new_server_id = response2.body['instancesSet'][0]['instanceId']
+ end
+
+ context "when specifying a bad IP address" do
+ before(:all) do
+ @response, @exit = run_command('addresses:assign 111.111.111.111 11111').stderr_and_exit_status
+ end
+
+ it "should show error message" do
+ @response.should eql("You don't have an address with public IP '111.111.111.111', use `hpcloud addresses:add` to create one.\n")
+ end
+ its_exit_status_should_be(:not_found)
+ end
+ context "when specifying a bad server id" do
+ before(:all) do
+ @response, @exit = run_command("addresses:assign #{@public_ip} 11111").stderr_and_exit_status
+ end
+
+ it "should show error message" do
+ @response.should eql("You don't have a server with id '11111'.\n")
+ end
+ its_exit_status_should_be(:not_found)
+ end
+ context "when specifying a good IP address and server id" do
+ before(:all) do
+ @response, @exit = run_command("addresses:assign #{@public_ip} #{@new_server_id}").stdout_and_exit_status
+ end
+
+ it "should show success message" do
+ @response.should eql("Assigned address '#{@public_ip}' to server with id '#{@new_server_id}'.\n")
+ end
+ its_exit_status_should_be(:success)
+ end
+
+ after(:all) do
+ address = @hp_svc.addresses.select {|a| a.public_ip == @public_ip}.first
+ address.destroy if address
+ server = get_server(@hp_svc, @new_server_id)
+ server.destroy if server
+ end
+
+end
|
Add specs for addresses:assign command.
|
diff --git a/spec/support/raise_on_potential_false_positives.rb b/spec/support/raise_on_potential_false_positives.rb
index abc1234..def5678 100644
--- a/spec/support/raise_on_potential_false_positives.rb
+++ b/spec/support/raise_on_potential_false_positives.rb
@@ -0,0 +1,32 @@+module RSpec
+ module Matchers
+ module BuiltIn
+ class RaiseError
+ def warn_about_bare_error
+ raise %(
+ Using the `raise_error` matcher without providing a specific
+ error or message risks false positives, since `raise_error`
+ will match when Ruby raises a `NoMethodError`, `NameError` or
+ `ArgumentError`, potentially allowing the expectation to pass
+ without even executing the method you are intending to call.
+
+ Instead, provide a specific error class or message.
+ )
+ end
+
+ def warn_about_negative_false_positive(expression)
+ raise %(
+ Using #{expression} risks false positives, since literally
+ any other error would cause the expectation to pass,
+ including those raised by Ruby (e.g. NoMethodError, NameError
+ and ArgumentError), meaning the code you are intending to test
+ may not even get reached.
+
+ Instead, use:
+ `expect {}.not_to raise_error` or `expect { }.to raise_error(DifferentSpecificErrorClass)`.
+ )
+ end
+ end
+ end
+ end
+end
|
Patch in our own raise on potential false positives
|
diff --git a/core/db/migrate/20120530012000_rename_creditcards_to_credit_cards.rb b/core/db/migrate/20120530012000_rename_creditcards_to_credit_cards.rb
index abc1234..def5678 100644
--- a/core/db/migrate/20120530012000_rename_creditcards_to_credit_cards.rb
+++ b/core/db/migrate/20120530012000_rename_creditcards_to_credit_cards.rb
@@ -1,5 +1,11 @@ class RenameCreditcardsToCreditCards < ActiveRecord::Migration
def change
rename_table :spree_creditcards, :spree_credit_cards
+ execute("UPDATE spree_payments SET source_type = 'Spree::CreditCard' WHERE source_type = 'Spree::Creditcard'")
+ end
+
+ def down
+ execute("UPDATE spree_payments SET source_type = 'Spree::Creditcard' WHERE source_type = 'Spree::CreditCard'")
+ rename_table :spree_credit_cards, :spree_creditcards
end
end
|
Update Payment source_type to Spree::CreditCard in migration
|
diff --git a/db/migrate/20131218142013_add_display_aspect_ratio_to_master_file.rb b/db/migrate/20131218142013_add_display_aspect_ratio_to_master_file.rb
index abc1234..def5678 100644
--- a/db/migrate/20131218142013_add_display_aspect_ratio_to_master_file.rb
+++ b/db/migrate/20131218142013_add_display_aspect_ratio_to_master_file.rb
@@ -16,11 +16,11 @@ end
ensure
if ratio.nil?
- logger.warn("#{masterfile.pid} aspect ratio not found")
- else
- masterfile.display_aspect_ratio = ratio.split(/[x:]/).collect(&:to_f).reduce(:/).to_s
- masterfile.save(validate: false)
+ ratio = "4:3"
+ logger.warn("#{masterfile.pid} aspect ratio not found - setting to default 4:3")
end
+ masterfile.display_aspect_ratio = ratio.split(/[x:]/).collect(&:to_f).reduce(:/).to_s
+ masterfile.save(validate: false)
end
end
end
|
Set display_aspect_ratio to default of 4:3 if ratio can't be found.
|
diff --git a/BonMot.podspec b/BonMot.podspec
index abc1234..def5678 100644
--- a/BonMot.podspec
+++ b/BonMot.podspec
@@ -6,10 +6,10 @@ s.description = <<-DESC
BonMot removes all the mystery from creating beautiful, powerful attributed strings in Swift.
DESC
- s.homepage = "https://github.com/Raizlabs/BonMot"
+ s.homepage = "https://github.com/Rightpoint/BonMot"
s.license = 'MIT'
s.author = { "Zev Eisenberg" => "zeisenberg@rightpoint.com" }
- s.source = { :git => "https://github.com/Raizlabs/BonMot.git", :tag => s.version.to_s }
+ s.source = { :git => "https://github.com/Rightpoint/BonMot.git", :tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/ZevEisenberg'
s.requires_arc = true
|
Update reference to Raizlabs in podspec.
|
diff --git a/spec/ruzai2_spec.rb b/spec/ruzai2_spec.rb
index abc1234..def5678 100644
--- a/spec/ruzai2_spec.rb
+++ b/spec/ruzai2_spec.rb
@@ -22,4 +22,24 @@ end
end
end
+
+ describe ".banned?" do
+ before do
+ Ruzai2::RuzaiList.ban!(id_params)
+ end
+
+ let(:id_params) {
+ {
+ test_id1: 1,
+ test_id2: 2,
+ test_id3: 3,
+ }
+ }
+
+ subject { Ruzai2::RuzaiList.banned?(id_params) }
+
+ it "returns true" do
+ expect(subject).to be true
+ end
+ end
end
|
Add test for checking status.
|
diff --git a/spec/server_spec.rb b/spec/server_spec.rb
index abc1234..def5678 100644
--- a/spec/server_spec.rb
+++ b/spec/server_spec.rb
@@ -14,10 +14,10 @@ end
it 'should be able to tell HipChat what song is playing' do
- Robut::Plugin::Rdio::Server.reply_callback = lambda{ |message| @message = message }
+ Robut::Plugin::Rdio::Server.state_callback = lambda{ |message| @message = message }
get '/now_playing/The%20National%20-%20Bloodbuzz%20Ohio'
last_response.should be_ok
- @message.should == 'Now playing: The National - Bloodbuzz Ohio'
+ @message.should == 'is now playing: The National - Bloodbuzz Ohio'
end
it 'should degrade gracefully if a reply_callback has not been defined' do
|
FIX the spec to be in-line with the now playing functionality
|
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,8 +14,8 @@
# Renders the supplied template with Haml::Engine and assigns the
# @response instance variable
-def render(template)
- template = File.read(".#{template}")
+def render(template_path)
+ template = File.read("./#{template_path.sub(/^\//, '')}")
engine = Haml::Engine.new(template)
@response = engine.render(Object.new, assigns_for_template)
end
|
Update the render spec helper to work with view paths that do not start with an initial slash.
|
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,4 +1,3 @@-# TODO Load and unload particular backends for backend-specific tests
-require 'memdash/active_record'
+require "memdash/#{ENV['ADAPTER']}" if ENV['ADAPTER']
Dir[File.expand_path('../support/*.rb', __FILE__)].each{|f| require f }
|
Load the appropriate adapter depending on which tests are running
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index abc1234..def5678 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -11,6 +11,8 @@ SimpleCov.start
require 'active_support'
+# https://github.com/rails/rails/issues/28918
+require "active_support/core_ext/module/remove_method"
require 'active_support/deprecation'
require 'active_support/dependencies/autoload'
|
Work around Active Support load order bug
See https://github.com/rails/rails/issues/28918
|
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
@@ -4,7 +4,9 @@ require 'remote_database_cleaner'
RSpec.configure do |config|
-
+ config.mock_with :rspec do |c|
+ c.syntax = [:should, :expect]
+ end
end
def configure_remote_database_cleaner(remote_name: nil,
|
Allow old syntax for rspec-mock
|
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
@@ -20,4 +20,4 @@ config.shared_context_metadata_behavior = :apply_to_host_groups
end
-Dir['spec/em-midori/fixtures/*.rb'].each { |f| puts f; require_relative "../#{f}" }
+Dir['spec/em-midori/fixtures/*.rb'].each { |f| require_relative "../#{f}" }
|
Fix output on fixtures loading
|
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
@@ -9,7 +9,6 @@
require File.expand_path("../../spec/dummy/config/environment.rb", __FILE__)
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../spec/dummy/db/migrate", __FILE__)]
-require "rails/test_help"
# Load support files
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
Remove rails/test_help not to call Minitest.autorun
|
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,3 @@-# require 'codeclimate-test-reporter'
-# CodeClimate::TestReporter.start
-
require 'chefspec'
require 'chefspec/berkshelf'
|
Remove unused CodeClimate unit test comments
|
diff --git a/spree_prize.gemspec b/spree_prize.gemspec
index abc1234..def5678 100644
--- a/spree_prize.gemspec
+++ b/spree_prize.gemspec
@@ -7,9 +7,9 @@ s.description = 'Add a timed lottery/giveaway to Spree. Candidates submit their email to enter each giveaway.'
s.required_ruby_version = '>= 1.9.3'
- s.author = 'Boombotix'
- # s.email = 'you@example.com'
- s.homepage = 'http://www.boombotix.com'
+ s.author = 'Alto Labs'
+ s.email = 'edwin@altolabs.co'
+ s.homepage = 'http://www.altolabs.co'
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.require_path = 'lib'
|
Add author information to gemspec
|
diff --git a/DTXcodeUtils.podspec b/DTXcodeUtils.podspec
index abc1234..def5678 100644
--- a/DTXcodeUtils.podspec
+++ b/DTXcodeUtils.podspec
@@ -1,5 +1,6 @@ Pod::Spec.new do |s|
s.name = "DTXcodeUtils"
+ s.deprecated = true
s.version = "0.1.1"
s.summary = "Useful helper functions for writing Xcode plugins"
s.homepage = "https://github.com/thurn/DTXcodeUtils"
|
Mark as deprecated in podspec
|
diff --git a/Casks/visit.rb b/Casks/visit.rb
index abc1234..def5678 100644
--- a/Casks/visit.rb
+++ b/Casks/visit.rb
@@ -1,7 +1,7 @@ class Visit < Cask
- url 'http://portal.nersc.gov/svn/visit/trunk/releases/2.6.3/VisIt-2.6.3-x86_64-installer.dmg'
+ url 'http://portal.nersc.gov/svn/visit/trunk/releases/2.7.0/VisIt-2.7.0-x86_64-installer.dmg'
homepage 'https://wci.llnl.gov/codes/visit/home.html'
- version '2.6.3'
- sha1 '3091da14bdad48e4f0faa0f543743d5befde11f2'
+ version '2.7.0'
+ sha1 'be44ee53695553396895154e7c9916bb670f772c'
link 'VisIt.app'
end
|
Update VisIt cask version to 2.7.0.
Update VisIt cask version to 2.7.0, the current release.
|
diff --git a/OOPhotoBrowser.podspec b/OOPhotoBrowser.podspec
index abc1234..def5678 100644
--- a/OOPhotoBrowser.podspec
+++ b/OOPhotoBrowser.podspec
@@ -1,7 +1,7 @@ Pod::Spec.new do |s|
s.name = "OOPhotoBrowser"
s.summary = "Photo Browser / Viewer inspired by Facebook's and Tweetbot's with ARC support, swipe-to-dismiss, image progress and more."
- s.version = "2.0.3"
+ s.version = "2.0.4"
s.homepage = "https://github.com/oliveroneill/OOPhotoBrowser"
s.license = { :type => 'MIT', :file => 'LICENSE.txt' }
s.author = { "Oliver ONeill" => "oliveroneill@users.noreply.github.com" }
|
Update version for pods release
|
diff --git a/spec/exporters/formatters/esi_fund_publication_alert_formatter_spec.rb b/spec/exporters/formatters/esi_fund_publication_alert_formatter_spec.rb
index abc1234..def5678 100644
--- a/spec/exporters/formatters/esi_fund_publication_alert_formatter_spec.rb
+++ b/spec/exporters/formatters/esi_fund_publication_alert_formatter_spec.rb
@@ -9,7 +9,6 @@ }
let(:document) {
double(:document,
- alert_type: "drugs",
title: "Some title",
extra_fields: {},
document_type: "esi_fund",
|
Remove spurious line from ESI fund spec
This seems to have been copy-pasta'd from the medical safety alert spec.
|
diff --git a/MarqueeLabel.podspec b/MarqueeLabel.podspec
index abc1234..def5678 100644
--- a/MarqueeLabel.podspec
+++ b/MarqueeLabel.podspec
@@ -1,6 +1,6 @@ Pod::Spec.new do |s|
s.name = "MarqueeLabel"
- s.version = "3.1.0"
+ s.version = "3.1.3"
s.summary = "A drop-in replacement for UILabel, which automatically adds a scrolling marquee effect when needed."
s.homepage = "https://github.com/cbpowell/MarqueeLabel"
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
Update the outdated podspec file
|
diff --git a/abstract_class.gemspec b/abstract_class.gemspec
index abc1234..def5678 100644
--- a/abstract_class.gemspec
+++ b/abstract_class.gemspec
@@ -1,5 +1,3 @@-# -*- encoding: utf-8 -*-
-
require_relative 'lib/abstract_class/version'
Gem::Specification.new do |s|
|
Remove encoding comment from gemspec
|
diff --git a/abstract_class.gemspec b/abstract_class.gemspec
index abc1234..def5678 100644
--- a/abstract_class.gemspec
+++ b/abstract_class.gemspec
@@ -13,12 +13,12 @@ s.author = 'Sean Huber'
s.email = 'github@shuber.io'
s.homepage = 'https://github.com/shuber/abstract_class'
+ s.license = "MIT"
s.require_paths = ['lib']
s.files = Dir['{bin,lib}/**/*'] + %w(LICENSE README.rdoc)
s.test_files = Dir['test/**/*']
- s.license = "MIT"
s.add_development_dependency 'rake'
s.add_development_dependency 'rdoc'
|
Move license up higher in gemspec
|
diff --git a/app/controllers/admin/staff_members_controller.rb b/app/controllers/admin/staff_members_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/admin/staff_members_controller.rb
+++ b/app/controllers/admin/staff_members_controller.rb
@@ -7,4 +7,8 @@ staff_member = StaffMember.find(paramas[:id])
redirect_to [ :edit, :admin, staff_member ]
end
+
+ def new
+ @staff_member = StaffMember.new
+ end
end
|
Add new method in admin/staffmembers
|
diff --git a/SwiftSpinner.podspec b/SwiftSpinner.podspec
index abc1234..def5678 100644
--- a/SwiftSpinner.podspec
+++ b/SwiftSpinner.podspec
@@ -17,7 +17,7 @@
s.requires_arc = true
- s.source_files = 'Source/SwiftSpinner'
+ s.source_files = 'Sources/SwiftSpinner'
s.frameworks = 'UIKit'
end
|
Update podfile and demo app
|
diff --git a/.delivery/build_cookbook/recipes/setup_build.rb b/.delivery/build_cookbook/recipes/setup_build.rb
index abc1234..def5678 100644
--- a/.delivery/build_cookbook/recipes/setup_build.rb
+++ b/.delivery/build_cookbook/recipes/setup_build.rb
@@ -11,7 +11,7 @@ ## for the build user or the build nodes must have all the packages required for a build installed already.
## Either choice must be done outside of the actual build cookbook.
## It is, of course, recommended you use chef to manage any pre-reqs for your build nodes via a cookbook.
-execute "sudo yum install -y #{build_config['required_packages']}"
+execute "sudo yum install -y #{build_config['required_build_packages']}"
src_dir = "#{workflow_workspace_repo}/httpd" # Root directory for the source to go into on the build node
|
Correct name of hash key
|
diff --git a/chef-x86-mingw32.gemspec b/chef-x86-mingw32.gemspec
index abc1234..def5678 100644
--- a/chef-x86-mingw32.gemspec
+++ b/chef-x86-mingw32.gemspec
@@ -3,7 +3,7 @@
gemspec.platform = "x86-mingw32"
-gemspec.add_dependency "ffi", "1.3.1"
+gemspec.add_dependency "ffi", "1.5.0"
gemspec.add_dependency "rdp-ruby-wmi", "0.3.1"
gemspec.add_dependency "windows-api", "0.4.2"
gemspec.add_dependency "windows-pr", "1.2.2"
|
Resolve merge conflict with mixlib-shellout change
|
diff --git a/lib/tasks/cleanup.rake b/lib/tasks/cleanup.rake
index abc1234..def5678 100644
--- a/lib/tasks/cleanup.rake
+++ b/lib/tasks/cleanup.rake
@@ -7,6 +7,5 @@ Msw.unscoped.where('timestamp < now()').delete_all
Spitcast.unscoped.where('timestamp < now()').delete_all
ApiRequest.where.not(id: SurflineLola.unscoped.uniq.pluck(:api_request_id) + SurflineNearshore.unscoped.uniq.pluck(:api_request_id) + Msw.unscoped.uniq.pluck(:api_request_id) + Spitcast.unscoped.uniq.pluck(:api_request_id)).delete_all
- WaterQuality.unscoped.where('timestamp < now()').delete_all
end
end
|
Stop cleaning up water quality data
|
diff --git a/lib/tasks/plugins.rake b/lib/tasks/plugins.rake
index abc1234..def5678 100644
--- a/lib/tasks/plugins.rake
+++ b/lib/tasks/plugins.rake
@@ -5,17 +5,6 @@ namespace :plugins do
plugin_migration_dirs = Dir.glob(Rails.root.join('{baseplugins,config/plugins}', '*', 'db', 'migrate'))
-
- task :load_config do
- dirs = Dir.glob("{baseplugins,config/plugins}/*").uniq do |dir|
- File.basename(dir)
- end.map do |dir|
- File.join(dir, 'db/migrate')
- end
- dirs.each do |dir|
- ActiveRecord::Migrator.migrations_paths << dir
- end
- end
task :migrate do
plugin_migration_dirs.each do |path|
@@ -26,5 +15,3 @@ end
end
-task 'db:migrate' => 'noosfero:plugins:load_config'
-task 'db:schema:load' => 'noosfero:plugins:load_config'
|
Remove load_config as application.rb config is used
|
diff --git a/chef/lib/chef/monkey_patches/string.rb b/chef/lib/chef/monkey_patches/string.rb
index abc1234..def5678 100644
--- a/chef/lib/chef/monkey_patches/string.rb
+++ b/chef/lib/chef/monkey_patches/string.rb
@@ -21,9 +21,21 @@ # give the actual number of characters. In Chef::REST, we need the bytesize
# so we can correctly set the Content-Length headers, but ruby 1.8.6 and lower
# don't define String#bytesize. Monkey patching time!
+
+begin
+ require 'enumerator'
+rescue LoadError
+end
+
class String
unless method_defined?(:bytesize)
alias :bytesize :size
+ end
+
+ unless method_defined?(:lines)
+ def lines
+ enum_for(:each)
+ end
end
end
|
Allow to use "a\nb".lines.each syntax in ruby 1.8
|
diff --git a/integration-tests/spec/twitter_spec.rb b/integration-tests/spec/twitter_spec.rb
index abc1234..def5678 100644
--- a/integration-tests/spec/twitter_spec.rb
+++ b/integration-tests/spec/twitter_spec.rb
@@ -9,6 +9,8 @@ root: #{File.dirname(__FILE__)}/../apps/rails3/twitter
queues:
tweets:
+ web:
+ context: /twitter
END
before(:all) do
@@ -21,7 +23,7 @@
# Runs locally using capybara DSL
it "should retrieve the index using a Capybara DSL" do
- visit "/tweets"
+ visit "/twitter/tweets"
page.should have_content( "Last 20 tweets" )
page.find("h1").text.should == "Tweets"
if ( Capybara.current_driver == :browser )
|
Deploy twitter spec to its own context to reduce spec race conditions for root context
|
diff --git a/spec/govuk_seed_crawler/seeder_spec.rb b/spec/govuk_seed_crawler/seeder_spec.rb
index abc1234..def5678 100644
--- a/spec/govuk_seed_crawler/seeder_spec.rb
+++ b/spec/govuk_seed_crawler/seeder_spec.rb
@@ -0,0 +1,43 @@+require 'spec_helper'
+
+describe GovukSeedCrawler::Seeder do
+ subject { GovukSeedCrawler::Seeder }
+
+ let(:mock_get_urls) do
+ double(:mock_get_urls, :urls => true)
+ end
+
+ let(:mock_publish_urls) do
+ double(:mock_publish_urls, :publish => true)
+ end
+
+ let(:mock_topic_exchange) do
+ double(:mock_topic_exchange, :publish => true)
+ end
+
+
+ let(:urls) do
+ [
+ "https://example.com/foo",
+ "https://example.com/bar",
+ "https://example.com/baz",
+ ]
+ end
+
+ let (:options) do
+ {
+ :amqp_topic => "#"
+ }
+ end
+
+ context "under normal usage" do
+ it "calls GovukSeedCrawler::PublishUrls::publish with the correct arguments" do
+ allow(GovukSeedCrawler::GetUrls).to receive(:new).and_return(mock_get_urls)
+ allow(mock_get_urls).to receive(:urls).and_return(urls)
+ allow(GovukSeedCrawler::TopicExchange).to receive(:new).and_return(mock_topic_exchange)
+
+ expect(GovukSeedCrawler::PublishUrls).to receive(:publish).with(mock_topic_exchange, options[:amqp_topic], urls)
+ subject::seed(options)
+ end
+ end
+end
|
Add unit tests for Seeder class
|
diff --git a/spec/support/runnables_link_matcher.rb b/spec/support/runnables_link_matcher.rb
index abc1234..def5678 100644
--- a/spec/support/runnables_link_matcher.rb
+++ b/spec/support/runnables_link_matcher.rb
@@ -1,24 +1,13 @@+# require 'rspec/expectations'
+
module RunnablesLinkMatcher
- class BeLinkLike
- def initialize(href, css_class, image, link_text)
- @href, @css_class, @image, @link_text = href, css_class, image, link_text
+ extend RSpec::Matchers::DSL
+
+ matcher :be_link_like do |href, css_class, image, link_text|
+ match do |actual|
+ actual =~ /(.*)#{@href}(.*)#{@css_class}(.*)#{@image}(.*)(#{@link_text}(.*))?/i
end
-
- def matches?(target)
- @target = target
- @target.should =~ /(.*)#{@href}(.*)#{@css_class}(.*)#{@image}(.*)(#{@link_text}(.*))?/i
- end
-
- def failure_message
- "Expected a properly formed link."
- end
-
- def negative_failure_message
- "Expected an improperly formed link."
- end
- end
-
- def be_link_like(href, css_class, image, link_text="")
- BeLinkLike.new(href, css_class, image, link_text)
+ failure_message_for_should { 'Expected a properly formed link.' }
+ failure_message_for_should_not { 'Expected an improperly formed link.' }
end
end
|
Rewrite be_link_like matcher for rspec 3.x
|
diff --git a/db/migrate/20150501153708_fix_type_column_name.rb b/db/migrate/20150501153708_fix_type_column_name.rb
index abc1234..def5678 100644
--- a/db/migrate/20150501153708_fix_type_column_name.rb
+++ b/db/migrate/20150501153708_fix_type_column_name.rb
@@ -1,3 +1,5 @@+# Encoding: utf-8
+# Fix type column name
class FixTypeColumnName < ActiveRecord::Migration
def change
rename_column :documents, :type, :file_type
|
Clean up type-fixing migration script
|
diff --git a/app/models/bookmark.rb b/app/models/bookmark.rb
index abc1234..def5678 100644
--- a/app/models/bookmark.rb
+++ b/app/models/bookmark.rb
@@ -2,5 +2,6 @@ has_many :bookmark_tags
has_many :tags, through: :bookmark_tags
- enum source_type: { "Post" => 0, "Publication" => 1, "Video" => 2, "Thread" => 3, "Other" => 4}
+ # NOTE: possible name changes (post or blog)
+ enum source_type: { "Blog/Post" => 0, "Video" => 1, "Conversation Thread" => 2, "Book/Publication" => 3, "Other" => 4}
end
|
Add enum to Bookmark model for source_types
|
diff --git a/Casks/cdock.rb b/Casks/cdock.rb
index abc1234..def5678 100644
--- a/Casks/cdock.rb
+++ b/Casks/cdock.rb
@@ -1,10 +1,11 @@ cask :v1 => 'cdock' do
- version '9.5'
- sha256 'db92068d04b538bf1fb20f7b5d79151ce619befefb20929178a143a73f4e99cc'
+ version '0.9.7'
+ sha256 '45c87cd2dbed30038bc2ecefa2ddda2c27eb37eb7c3f3a11657d68f8cec16a32'
- url "https://github.com/w0lfschild/cDock/releases/download/v#{version}/cDock_v#{version}.zip"
+ url "https://github.com/w0lfschild/cDock/releases/download/cDock2-#{version}/cDock.zip"
appcast 'https://github.com/w0lfschild/cDock/releases.atom',
- :sha256 => '9a2877e8cf8c466b2dbf5e3e063f27b663c91b54bb2c108548d52fb18fabc010'
+ :sha256 => 'aee72070788692bd02336b610f77e2ac67a1d1a663fe6feda8414b953b63968d'
+ name 'cDock2'
name 'cDock'
homepage 'http://w0lfschild.github.io/pages/cdock.html'
license :bsd
|
Update cDock 9.5 -> cDock2 0.9.7
|
diff --git a/Casks/vectr.rb b/Casks/vectr.rb
index abc1234..def5678 100644
--- a/Casks/vectr.rb
+++ b/Casks/vectr.rb
@@ -0,0 +1,11 @@+cask :v1 => 'vectr' do
+ version '0.1.7'
+ sha256 '8416736f29f1b2e72d8d4595386bce554bb4ccbc49b27f92a86c6febabfbc35e'
+
+ url "http://download.vectr.com/desktop/vectr-mac-#{version}.zip"
+ name 'Vectr'
+ homepage 'https://vectr.com'
+ license :gratis
+
+ app 'Vectr.app'
+end
|
Create cask for Vectr 0.1.7 app
|
diff --git a/app/controllers/spree/admin/tax_rates_controller.rb b/app/controllers/spree/admin/tax_rates_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/spree/admin/tax_rates_controller.rb
+++ b/app/controllers/spree/admin/tax_rates_controller.rb
@@ -2,9 +2,6 @@ module Admin
class TaxRatesController < ResourceController
before_action :load_data
-
- update.after :update_after
- create.after :create_after
private
@@ -12,14 +9,6 @@ @available_zones = Zone.order(:name)
@available_categories = TaxCategory.order(:name)
@calculators = TaxRate.calculators.sort_by(&:name)
- end
-
- def update_after
- Rails.cache.delete('vat_rates')
- end
-
- def create_after
- Rails.cache.delete('vat_rates')
end
def permitted_resource_params
|
Delete dead code brought from spree
|
diff --git a/lib/rubygems/commands/ctags_command.rb b/lib/rubygems/commands/ctags_command.rb
index abc1234..def5678 100644
--- a/lib/rubygems/commands/ctags_command.rb
+++ b/lib/rubygems/commands/ctags_command.rb
@@ -22,7 +22,7 @@
Dir.chdir(spec.full_gem_path) do
- if !File.file?('tags') || File.read('tags', 1) != '!'
+ if !(File.file?('tags') && File.read('tags', 1) == '!') && !File.directory?('tags')
yield "Generating ctags for #{spec.full_name}" if block_given?
paths = spec.require_paths.select { |p| File.directory?(p) }
system('ctags', '-R', '--languages=ruby', *paths)
|
Fix commit for directory named tags
The previous commit was not working properly for all cases.
I have to admit I was drawing a boolean table to solve this issue :-)
|
diff --git a/lib/spree_amazon_mws/order_importer.rb b/lib/spree_amazon_mws/order_importer.rb
index abc1234..def5678 100644
--- a/lib/spree_amazon_mws/order_importer.rb
+++ b/lib/spree_amazon_mws/order_importer.rb
@@ -4,8 +4,11 @@
def import_recent_orders(since=1.day.ago)
@amazon_orders = order_fetcher.get_orders(import_recent_orders_options(since))
- @amazon_orders.map do |amazon_order|
- SpreeAmazonMws::Order.new(amazon_order).import
+ # put this into a transaction to make it atomic
+ Spree::Order.transaction do
+ @amazon_orders.map do |amazon_order|
+ SpreeAmazonMws::Order.new(amazon_order).import
+ end
end
end
|
Put the orders into a transaction so we do not double import upon errors
|
diff --git a/WakeFormula.rb b/WakeFormula.rb
index abc1234..def5678 100644
--- a/WakeFormula.rb
+++ b/WakeFormula.rb
@@ -1,9 +1,9 @@ require "formula"
class Wake < Formula
- url "https://github.com/MichaelRFairhurst/wake-compiler/archive/v0.2.0.tar.gz"
+ url "https://github.com/MichaelRFairhurst/wake-compiler/archive/v0.2.1.tar.gz"
homepage "http://www.wakelang.com"
- sha1 "0fefebc5c5c28f2adcabc44cc908155d2c655fd3"
+ sha1 "5488504a699937adc181c023e193ef14170cb0dc"
depends_on "boost" => 'c++11'
depends_on "flex"
|
Update wake formula for v0.2.1
|
diff --git a/config/routes.rb b/config/routes.rb
index abc1234..def5678 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -18,10 +18,10 @@ resources :vehicle_fuel_purchases, :as => "fuel_purchases"
end
resources :electricity_accounts, :except => [:index, :show] do
- resources :electricity_readings, :as => "readings"
+ resources :electricity_readings
end
resources :gas_accounts, :except => [:index, :show] do
- resources :gas_readings, :as => "readings"
+ resources :gas_readings
end
resources :notes
resource :report do
|
Remove route naming simplification - was confusing things
|
diff --git a/config/routes.rb b/config/routes.rb
index abc1234..def5678 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -21,5 +21,5 @@ match "send_message" => "messages#create"
# Jasmine test engine
- mount JasmineRails::Engine => "/specs" unless Rails.env.production?
+ mount JasmineRails::Engine => "/specs" if defined?(JasmineRails)
end
|
Update mount configuration for JasmimeRails engine.
|
diff --git a/db/migrate/20160822142816_add_cat3_to_mtb_novice.rb b/db/migrate/20160822142816_add_cat3_to_mtb_novice.rb
index abc1234..def5678 100644
--- a/db/migrate/20160822142816_add_cat3_to_mtb_novice.rb
+++ b/db/migrate/20160822142816_add_cat3_to_mtb_novice.rb
@@ -5,6 +5,8 @@ name = race.name.gsub("Novice", "Novice (Category 3)")
puts "#{race.name} => #{name}"
category = Category.find_or_create_by_normalized_name(name)
+ category.parent = race.category.parent
+ category.save!
race.category = category
race.save!
end
|
Set reasonable parent for new MTB Novice cats
|
diff --git a/lib/controller/posts_controller.rb b/lib/controller/posts_controller.rb
index abc1234..def5678 100644
--- a/lib/controller/posts_controller.rb
+++ b/lib/controller/posts_controller.rb
@@ -20,7 +20,7 @@ end
def delete(post_id, user)
- @post = Post.find_by(post_id: post_id)
+ @post = Post.find_by(id: post_id)
unless @post.nil?
if @post.is_owner?(user) or user.admin?
|
Fix the broken delete feature for posts
|
diff --git a/lib/govuk_seed_crawler/get_urls.rb b/lib/govuk_seed_crawler/get_urls.rb
index abc1234..def5678 100644
--- a/lib/govuk_seed_crawler/get_urls.rb
+++ b/lib/govuk_seed_crawler/get_urls.rb
@@ -5,7 +5,7 @@ attr_reader @urls
def initialize(:site_root)
- unless :site_root raise "No :site_root defined"
+ raise "No :site_root defined" unless :site_root
indexer = GovukMirrorer::Indexer.new(:site_root)
@urls = indexer.all_start_urls
|
Fix syntax when raising error message
|
diff --git a/lib/parsers/fms_contacts_parser.rb b/lib/parsers/fms_contacts_parser.rb
index abc1234..def5678 100644
--- a/lib/parsers/fms_contacts_parser.rb
+++ b/lib/parsers/fms_contacts_parser.rb
@@ -1,27 +1,45 @@ # Parser for loading FixMyStreet contacts data
-class Parsers::FmsContactsParser
+class Parsers::FmsContactsParser
def csv_options
- { :quote_char => '"',
- :col_sep => ",",
- :row_sep =>:auto,
+ { :quote_char => '"',
+ :col_sep => ",",
+ :row_sep =>:auto,
:return_headers => false,
:headers => :first_row,
:encoding => 'N' }
end
-
+
def parse_contacts filepath
csv_data = File.read(filepath)
FasterCSV.parse(csv_data, csv_options) do |row|
next if row['deleted'] == 't'
+ next if row['category'].blank?
confirmed = !row['confirmed'].nil?
- yield CouncilContact.new({:area_id => row['area_id'],
- :email => row['email'],
- :confirmed => confirmed,
- :category => row['category'],
- :notes => row['note']})
+ if row['area_id'] == '2225' and row['email'].strip == 'SPECIAL'
+ district_mappings = { 'eastarea' => [2315, 2312],
+ 'midarea' => [2317, 2314, 2316],
+ 'southarea' => [2319, 2320, 2310],
+ 'westarea' => [2309, 2311, 2318, 2313] }
+ district_mappings.each do |area_name, district_ids|
+ district_ids.each do |district_id|
+ yield CouncilContact.new({:area_id => row['area_id'],
+ :email => "highways.#{area_name}@essexcc.gov.uk",
+ :confirmed => confirmed,
+ :district_id => district_id,
+ :category => row['category'].strip,
+ :notes => row['note']})
+ end
+ end
+ else
+ yield CouncilContact.new({:area_id => row['area_id'],
+ :email => row['email'].strip,
+ :confirmed => confirmed,
+ :category => row['category'].strip,
+ :notes => row['note']})
+ end
end
end
-
+
end
|
Handle special case for Essex council
|
diff --git a/lib/thread_queues/string_buffer.rb b/lib/thread_queues/string_buffer.rb
index abc1234..def5678 100644
--- a/lib/thread_queues/string_buffer.rb
+++ b/lib/thread_queues/string_buffer.rb
@@ -18,7 +18,7 @@ begin
store_more_in_buffer
rescue EOFError => e
- return @buffer if @buffer.length > 0
+ return rest_of_buffer if @buffer.length > 0
raise e
end
end
@@ -35,7 +35,7 @@ begin
store_more_in_buffer
rescue EOFError => e
- return @buffer if @buffer.length > 0
+ return rest_of_buffer if @buffer.length > 0
raise e
end
end
@@ -43,6 +43,12 @@ end
private
+
+ def rest_of_buffer
+ buffer = @buffer
+ @buffer = ""
+ return buffer
+ end
def store_more_in_buffer
@mutex.synchronize do
|
Reset buffer when last is read.
|
diff --git a/app/models/api/v3/converter_stats_presenter.rb b/app/models/api/v3/converter_stats_presenter.rb
index abc1234..def5678 100644
--- a/app/models/api/v3/converter_stats_presenter.rb
+++ b/app/models/api/v3/converter_stats_presenter.rb
@@ -4,6 +4,7 @@ ATTRIBUTES = [
:demand,
:electricity_output_capacity,
+ :input_capacity,
:number_of_units
].freeze
|
Send input_capacity with the converter stats
|
diff --git a/spec/acceptance/sensu_check_spec.rb b/spec/acceptance/sensu_check_spec.rb
index abc1234..def5678 100644
--- a/spec/acceptance/sensu_check_spec.rb
+++ b/spec/acceptance/sensu_check_spec.rb
@@ -0,0 +1,23 @@+require 'spec_helper_acceptance'
+
+describe 'sensu_check', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
+ context 'default' do
+ it 'should work without errors' do
+ pp = <<-EOS
+ include ::sensu::backend
+ sensu_check { 'test':
+ command => 'check-http.rb',
+ subscriptions => ['demo'],
+ handlers => ['email'],
+ interval => 60,
+ }
+ EOS
+
+ # Run it twice and test for idempotency
+ apply_manifest(pp, :catch_failures => true)
+ apply_manifest(pp, :catch_changes => true)
+ end
+
+ end
+end
+
|
Add acceptance test for sensu_check
|
diff --git a/spec/app/models/mdm/service_spec.rb b/spec/app/models/mdm/service_spec.rb
index abc1234..def5678 100644
--- a/spec/app/models/mdm/service_spec.rb
+++ b/spec/app/models/mdm/service_spec.rb
@@ -6,8 +6,39 @@
it { should have_many(:task_services).class_name('Mdm::TaskService') }
it { should have_many(:tasks).class_name('Mdm::Task').through(:task_services) }
-
+ it { should have_many(:creds).class_name('Mdm::Cred').dependent(:destroy) }
+ it { should have_many(:exploited_hosts).class_name('Mdm::ExploitedHost').dependent(:destroy) }
+ it { should have_many(:notes).class_name('Mdm::Note').dependent(:destroy) }
+ it { should have_many(:vulns).class_name('Mdm::Vuln').dependent(:destroy) }
+ it { should have_many(:web_sites).class_name('Mdm::WebSite').dependent(:destroy) }
+ it { should have_many(:web_pages).class_name('Mdm::WebPage').through(:web_sites) }
+ it { should have_many(:web_forms).class_name('Mdm::WebForm').through(:web_sites) }
+ it { should have_many(:web_vulns).class_name('Mdm::WebVuln').through(:web_sites) }
it { should belong_to(:host).class_name('Mdm::Host') }
end
+ context "inactive" do
+ it "should exclude open services" do
+ open_service = FactoryGirl.create(:mdm_service, :state => 'open')
+ Mdm::Service.inactive.should_not include(open_service)
+ end
+ end
+
+ context "with_state open" do
+ it "should exclude closed services" do
+ closed_service = FactoryGirl.create(:mdm_service, :state => 'closed')
+ Mdm::Service.with_state('open').should_not include(closed_service)
+ end
+ end
+
+ context "search for 'snmp'" do
+ it "should find only services that match" do
+ snmp_service = FactoryGirl.create(:mdm_service)
+ ftp_service = FactoryGirl.create(:mdm_service, :proto => 'ftp')
+ search_results = Mdm::Service.search('snmp')
+ search_results.should include(snmp_service)
+ search_results.should_not include(ftp_service)
+ end
+ end
+
end
|
Add a few more specs to Mdm::Service
Mdm::Service had no specs, so added some additional coverage
Tests all associations and scopes on the model
[Story #49167601]
|
diff --git a/spec/support/macros/model_macros.rb b/spec/support/macros/model_macros.rb
index abc1234..def5678 100644
--- a/spec/support/macros/model_macros.rb
+++ b/spec/support/macros/model_macros.rb
@@ -1,5 +1,5 @@ module ModelMacros
- # Create a new emotional model
+ # Create a new followable model
def followable(klass_name, &block)
spawn_model klass_name, ActiveRecord::Base do
acts_as_followable
@@ -7,20 +7,20 @@ end
end
- # Create a new emotive model
+ # Create a new follower model
def follower(klass_name, &block)
spawn_model klass_name, ActiveRecord::Base do
acts_as_follower
- class_eval(&block) if block
+ instance_exec(&block) if block
end
end
- # Create a new emotive and emotionnal model
+ # Create a new followable and follower model
def followable_and_follower(klass_name, &block)
spawn_model klass_name, ActiveRecord::Base do
acts_as_followable
acts_as_follower
- class_eval(&block) if block
+ instance_exec(&block) if block
end
end
|
Fix typos in ModelMacros module
|
diff --git a/test/functional/value_conversion_test.rb b/test/functional/value_conversion_test.rb
index abc1234..def5678 100644
--- a/test/functional/value_conversion_test.rb
+++ b/test/functional/value_conversion_test.rb
@@ -0,0 +1,47 @@+require 'test_helper'
+
+class QueryTest < Test::Unit::TestCase
+
+ def setup
+ @connection = Vertica::Connection.new(TEST_CONNECTION_HASH.merge(:row_style => :array))
+
+ @connection.query <<-SQL
+ CREATE TABLE IF NOT EXISTS conversions_table (
+ "int_field" int,
+ "string_field" varchar(100),
+ "date_field" date,
+ "timestamp_field" timestamp,
+ "time_field" time,
+ "interval_field" interval,
+ "boolean_field" boolean
+ )
+ SQL
+ end
+
+
+ def teardown
+ @connection.query("DROP TABLE IF EXISTS conversions_table CASCADE;")
+ @connection.close
+ end
+
+ def test_value_conversions
+ @connection.query "INSERT INTO conversions_table VALUES (123, 'hello world', '2010-01-01', '2010-01-01 12:00:00', '12:00:00', INTERVAL '1 DAY', TRUE)"
+ result = @connection.query "SELECT * FROM conversions_table LIMIT 1"
+ assert_equal result.rows.length, 1
+ assert_equal [
+ 123,
+ 'hello world',
+ Date.parse('2010-01-01'),
+ DateTime.parse('2010-01-01 12:00:00'),
+ "12:00:00",
+ "1",
+ true], result.rows.first
+ end
+
+ def test_nil_conversions
+ @connection.query "INSERT INTO conversions_table VALUES (NULL, NULL, NULL, NULL, NULL, NULL, NULL)"
+ result = @connection.query "SELECT * FROM conversions_table LIMIT 1"
+ assert_equal result.rows.length, 1
+ assert_equal [nil, nil, nil, nil, nil, nil, nil], result.rows.first
+ end
+end
|
Add some functional tests for value conversions.
|
diff --git a/sonic-pi-cli.gemspec b/sonic-pi-cli.gemspec
index abc1234..def5678 100644
--- a/sonic-pi-cli.gemspec
+++ b/sonic-pi-cli.gemspec
@@ -1,7 +1,7 @@ Gem::Specification.new do |s|
s.name = 'sonic-pi-cli'
- s.version = '0.1.1'
- s.date = '2016-11-10'
+ s.version = '0.1.3'
+ s.date = '2019-08-26'
s.summary = "Sonic Pi CLI"
s.description = "A simple command line interface for Sonic Pi"
s.authors = ["Nick Johnstone"]
|
Update version number to 0.1.3
|
diff --git a/lib/cucumber/salad/widgets/document.rb b/lib/cucumber/salad/widgets/document.rb
index abc1234..def5678 100644
--- a/lib/cucumber/salad/widgets/document.rb
+++ b/lib/cucumber/salad/widgets/document.rb
@@ -1,23 +1,21 @@ module Cucumber
module Salad
module Widgets
- class Document < Widget
+ class Document
include WidgetContainer
-
- root 'body'
def initialize(options)
self.widget_lookup_scope =
options.delete(:widget_lookup_scope) or raise "No scope given"
-
- options[:root] ||= Capybara.current_session
-
- super options
end
def widget(name)
widget_class(name).in_node(root)
end
+
+ def root
+ Capybara.current_session
+ end
end
end
end
|
Define Document apart from Widget.
|
diff --git a/lib/irc_tools/messages/pong_message.rb b/lib/irc_tools/messages/pong_message.rb
index abc1234..def5678 100644
--- a/lib/irc_tools/messages/pong_message.rb
+++ b/lib/irc_tools/messages/pong_message.rb
@@ -8,7 +8,7 @@ protected
def build_message
- "PONG #{server}".strip
+ "PONG :#{server}".strip
end
end
end
|
Fix message format of pong message
|
diff --git a/app/controllers/backend/cells/quandl_cells_controller.rb b/app/controllers/backend/cells/quandl_cells_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/backend/cells/quandl_cells_controller.rb
+++ b/app/controllers/backend/cells/quandl_cells_controller.rb
@@ -5,8 +5,9 @@ finish = start >> 12 - 1
#params[:threshold] = 183.50
dataset = params[:dataset] || "CHRIS/LIFFE_EBM4"
- url = "https://www.quandl.com/api/v1/datasets/#{dataset}.json?trim_start=#{start}&trim_end=#{finish}"
- url = "https://www.quandl.com/api/v1/datasets/#{dataset}.json"
+ token = Identifier.where(nature: :quandl_token).first || "BwQESxTYjPRj58EbvzQA"
+ url = "https://www.quandl.com/api/v1/datasets/#{dataset}.json?auth_token=#{token}&trim_start=#{start}&trim_end=#{finish}"
+ url = "https://www.quandl.com/api/v1/datasets/#{dataset}.json?auth_token=#{token}"
data = JSON.load(open(url))
if data["errors"].any?
# TODO Prevent ?
|
Add demo token to quandl
|
diff --git a/app/serializers/api/admin/chapters/section_serializer.rb b/app/serializers/api/admin/chapters/section_serializer.rb
index abc1234..def5678 100644
--- a/app/serializers/api/admin/chapters/section_serializer.rb
+++ b/app/serializers/api/admin/chapters/section_serializer.rb
@@ -10,7 +10,9 @@
attributes :id, :numeral, :title, :position
- has_one :section_note, serializer: Api::Admin::Sections::SectionNoteSerializer
+ has_one :section_note, serializer: Api::Admin::Sections::SectionNoteSerializer, id_method_name: :id do |section|
+ section.section_note
+ end
end
end
end
|
Fix section note relation in admin section serializer
|
diff --git a/core/process/status/exitstatus_spec.rb b/core/process/status/exitstatus_spec.rb
index abc1234..def5678 100644
--- a/core/process/status/exitstatus_spec.rb
+++ b/core/process/status/exitstatus_spec.rb
@@ -11,7 +11,7 @@
describe "for a child that raised SignalException" do
before :each do
- ruby_exe("raise SignalException, 'SIGTERM'")
+ ruby_exe("Process.kill(:KILL, $$); exit(42)")
end
platform_is_not :windows do
|
Use a more direct way to signal the current process in Process::Status::exitstatus specs
|
diff --git a/arrow_payments.gemspec b/arrow_payments.gemspec
index abc1234..def5678 100644
--- a/arrow_payments.gemspec
+++ b/arrow_payments.gemspec
@@ -16,7 +16,7 @@
s.add_runtime_dependency 'faraday', '< 0.9'
s.add_runtime_dependency 'faraday_middleware', '~> 0.8'
- s.add_runtime_dependency 'hashie', '~> 2.0.0'
+ s.add_runtime_dependency 'hashie', '~> 2.0'
s.add_runtime_dependency 'json', '~> 1.8'
s.files = `git ls-files`.split("\n")
|
Bring back old hashie dependency
|
diff --git a/app/importers/rows/student_section_grade_row.rb b/app/importers/rows/student_section_grade_row.rb
index abc1234..def5678 100644
--- a/app/importers/rows/student_section_grade_row.rb
+++ b/app/importers/rows/student_section_grade_row.rb
@@ -18,7 +18,7 @@ student_section_assignment = StudentSectionAssignment.find_or_initialize_by(student: student,
section: section)
student_section_assignment.assign_attributes(
- grade: row[:grade]
+ grade: grade
)
student_section_assignment
end
@@ -32,4 +32,7 @@ return Section.find_by_section_number(row[:section_number]) if row[:section_number]
end
-end
+ def grade
+ return row[:grade] if row[:grade].is_a? Integer
+ end
+end
|
Add check for grade being an integer
|
diff --git a/exception_notification.gemspec b/exception_notification.gemspec
index abc1234..def5678 100644
--- a/exception_notification.gemspec
+++ b/exception_notification.gemspec
@@ -6,8 +6,8 @@ s.summary = "Exception notification by email for Rails apps"
s.email = "smartinez87@gmail.com"
- s.files = `git ls-files -- lib`.split("\n") + %w(Rakefile .gemtest README.md)
- s.test_files = Dir.glob "test/**/*_test.rb"
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- test`.split("\n")
s.require_path = 'lib'
s.add_dependency("actionmailer", ">= 3.0.4")
|
Refactor files inclusion on gemspec
|
diff --git a/library/readline/history/element_set_spec.rb b/library/readline/history/element_set_spec.rb
index abc1234..def5678 100644
--- a/library/readline/history/element_set_spec.rb
+++ b/library/readline/history/element_set_spec.rb
@@ -16,7 +16,7 @@ end
it "returns the new value for the passed index" do
- (Readline::HISTORY[1] = "second test").should == "second test"
+ Readline::HISTORY.[]=(1, "second test").should == "second test"
end
it "raises an IndexError when there is no item at the passed positive index" do
|
Make Readline::HISTORY.[]= spec test return value
|
diff --git a/plan_executor.gemspec b/plan_executor.gemspec
index abc1234..def5678 100644
--- a/plan_executor.gemspec
+++ b/plan_executor.gemspec
@@ -6,7 +6,7 @@ s.description = "A Gem for handling FHIR test executions"
s.email = "jwalonoski@mitre.org"
s.homepage = "https://github.com/hl7-fhir/fhir-svn"
- s.authors = ["Andre Quina", "Jason Walonoski", "Janoo Fernandes", "Michael O'Keefe"]
+ s.authors = ["Andre Quina", "Jason Walonoski", "Janoo Fernandes", "Michael O'Keefe", "Robert Scanlon"]
s.version = '1.8.0'
s.license = 'Apache-2.0'
|
Add Rob to gem authors.
|
diff --git a/spec/features/create_a_team_spec.rb b/spec/features/create_a_team_spec.rb
index abc1234..def5678 100644
--- a/spec/features/create_a_team_spec.rb
+++ b/spec/features/create_a_team_spec.rb
@@ -0,0 +1,48 @@+require 'rails_helper'
+
+describe "Create a team", type: :feature do
+ let(:team) { build(:team) }
+ before do
+ login_as create(:user)
+ visit new_team_url
+ end
+
+ context "whit valid attributes" do
+ subject do
+ fill_in "team_name", with: team.name
+ fill_in "team_password", with: team.password
+ fill_in "team_password_confirmation", with: team.password
+ click_on "Criar"
+ end
+
+ it "creates the team" do
+ expect{ subject }.to change(Team, :count).by(1)
+ expect(page).to have_current_path(team_path(Team.first.id))
+ end
+ end
+
+ context "whit invalid attributes -->" do
+ subject do
+ click_on "Criar"
+ end
+
+ it "doesn't create the exercise" do
+ expect{ subject }.to change(Team, :count).by(0)
+ expect(page).to have_selector("div.alert.alert-danger")
+ end
+
+ context "when password confirmation doesn't match" do
+ subject do
+ fill_in "team_name", with: team.name
+ fill_in "team_password", with: team.password
+ fill_in "team_password_confirmation", with: "wrongpass"
+ click_on "Criar"
+ end
+
+ it "doesn't create the exercise" do
+ expect{ subject }.to change(Team, :count).by(0)
+ expect(page).to have_selector("div.alert.alert-danger")
+ end
+ end
+ end
+end
|
Add 'team create' feature test
|
diff --git a/spec/workers/geocode_worker_spec.rb b/spec/workers/geocode_worker_spec.rb
index abc1234..def5678 100644
--- a/spec/workers/geocode_worker_spec.rb
+++ b/spec/workers/geocode_worker_spec.rb
@@ -4,6 +4,8 @@ describe '#perform' do
it "should geocode the object's address", :vcr do
user = FactoryGirl.create(:user)
+ user.coordinates = nil
+ user.save!
GeocodeWorker.new.perform(user.id)
expect(user.reload.to_coordinates).to eq [40.7195898, -73.9998334]
end
|
Fix false positive due to factory
#74
|
diff --git a/lib/procedo/engine/intervention/working_period.rb b/lib/procedo/engine/intervention/working_period.rb
index abc1234..def5678 100644
--- a/lib/procedo/engine/intervention/working_period.rb
+++ b/lib/procedo/engine/intervention/working_period.rb
@@ -29,7 +29,7 @@ end
def to_hash
- { started_at: @started_at.strftime('%Y-%m-%d %H:%M %z'), stopped_at: @stopped_at.strftime('%Y-%m-%d %H:%M %z') }
+ { started_at: @started_at.strftime('%Y-%m-%dT%H:%M:%S.%L%z'), stopped_at: @stopped_at.strftime('%Y-%m-%dT%H:%M:%S.%L%z') }
end
alias to_attributes to_hash
|
Make Procedo serialize dates using ISO8601 standard
|
diff --git a/db/migrate/20160628140841_fix_service_order_placed_at.rb b/db/migrate/20160628140841_fix_service_order_placed_at.rb
index abc1234..def5678 100644
--- a/db/migrate/20160628140841_fix_service_order_placed_at.rb
+++ b/db/migrate/20160628140841_fix_service_order_placed_at.rb
@@ -2,11 +2,8 @@ class ServiceOrder < ActiveRecord::Base; end
def up
- update <<-SQL
- UPDATE "service_orders"
- SET "placed_at" = "updated_at"
- WHERE "state" = 'ordered'
- AND "placed_at" IS NULL
- SQL
+ say_with_time('Update placed_at in ordered ServiceOrders') do
+ ServiceOrder.where(:state => 'ordered', :placed_at => nil).update_all('placed_at = updated_at')
+ end
end
end
|
Use ActiveRecord instead of sql
|
diff --git a/recipes/rpm_package.rb b/recipes/rpm_package.rb
index abc1234..def5678 100644
--- a/recipes/rpm_package.rb
+++ b/recipes/rpm_package.rb
@@ -0,0 +1,38 @@+include_recipe 'omnibus_updater::set_remote_path'
+
+remote_file "chef omnibus_package[#{File.basename(node[:omnibus_updater][:full_uri])}]" do
+ path File.join(node[:omnibus_updater][:cache_dir], File.basename(node[:omnibus_updater][:full_uri]))
+ source node[:omnibus_updater][:full_uri]
+ backup false
+ not_if do
+ File.exists?(
+ File.join(node[:omnibus_updater][:cache_dir], File.basename(node[:omnibus_updater][:full_uri]))
+ ) || (
+ Chef::VERSION.to_s.scan(/\d+\.\d+\.\d+/) == node[:omnibus_updater][:version].scan(/\d+\.\d+\.\d+/) && OmnibusChecker.is_omnibus?
+ )
+ end
+end
+
+# NOTE: We do not use notifications to trigger the install
+# since they are broken with remote_file in 0.10.10
+execute "chef omnibus_install[#{node[:omnibus_updater][:version]}]" do
+ command "rpm -Uvh #{File.join(node[:omnibus_updater][:cache_dir], File.basename(node[:omnibus_updater][:full_uri]))}"
+ only_if do
+ (File.exists?(
+ File.join(node[:omnibus_updater][:cache_dir], File.basename(node[:omnibus_updater][:full_uri]))
+ ) &&
+ Chef::VERSION.to_s.scan(/\d+\.\d+\.\d+/) != node[:omnibus_updater][:version].scan(/\d+\.\d+\.\d+/)) ||
+ !OmnibusChecker.is_omnibus?
+ end
+end
+
+ruby_block "omnibus_updater[remove old rpms]" do
+ block do
+ Dir.glob(File.join(node[:omnibus_updater][:cache_dir], 'chef*.rpm')).each do |file|
+ unless(file.include?(node[:omnibus_updater][:version]))
+ Chef::Log.info "Deleting stale omnibus package: #{file}"
+ File.delete(file)
+ end
+ end
+ end
+end
|
Add support for RPM based install
|
diff --git a/bonus-blast.rb b/bonus-blast.rb
index abc1234..def5678 100644
--- a/bonus-blast.rb
+++ b/bonus-blast.rb
@@ -35,10 +35,15 @@ end
options[:points].times do
- RestClient.post(
+ response = RestClient.post(
"https://bonus.ly/api/v1/bonuses?access_token=#{ENV['TOKEN']}",
{ reason: "+1 #{options[:to]} #{options[:reason]}" }.to_json,
content_type: :json,
accept: :json,
)
+ unless response.code == 200
+ puts 'Oh no got a bad response!'
+ puts response
+ exit
+ end
end
|
Break early on bad response
|
diff --git a/db/migrations/17_migrate_json_content_to_pact_version_content_table.rb b/db/migrations/17_migrate_json_content_to_pact_version_content_table.rb
index abc1234..def5678 100644
--- a/db/migrations/17_migrate_json_content_to_pact_version_content_table.rb
+++ b/db/migrations/17_migrate_json_content_to_pact_version_content_table.rb
@@ -4,7 +4,7 @@ Sequel.migration do
change do
self[:pacts].each do | row |
- sha = Digest::SHA1.hexdigest(row[:json_content].to_s)
+ sha = Digest::SHA1.hexdigest(row[:json_content])
if self[:pact_version_contents].where(sha: sha).count == 0
self[:pact_version_contents].insert(sha: sha, content: row[:json_content], created_at: row[:created_at], updated_at: row[:updated_at])
end
|
Revert "migration 17 now runs against sqlite3 backend"
This reverts commit 090b836162e84cb311f59cf9389dc67b31c9ce2e.
|
diff --git a/app/controllers/api/search_controller.rb b/app/controllers/api/search_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/api/search_controller.rb
+++ b/app/controllers/api/search_controller.rb
@@ -19,6 +19,10 @@ end
private
+
+ def allowed_sorts
+ ['rank', 'stars', 'dependents_count', 'latest_release_published_at', 'created_at']
+ end
def format_sort
return nil unless params[:sort].present?
|
Fix sorting on search api
|
diff --git a/app/controllers/api/status_controller.rb b/app/controllers/api/status_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/api/status_controller.rb
+++ b/app/controllers/api/status_controller.rb
@@ -11,6 +11,10 @@ else
@projects = []
end
+ fields = Project::API_FIELDS
+ if params[:score]
+ fields.push :score
+ end
render json: @projects.to_json({
only: Project::API_FIELDS,
methods: [:package_manager_url, :stars, :forks, :keywords, :latest_stable_release],
|
Add a param (?score) to get project score v2 in the bulk check api
|
diff --git a/app/controllers/jodel_city_controller.rb b/app/controllers/jodel_city_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/jodel_city_controller.rb
+++ b/app/controllers/jodel_city_controller.rb
@@ -7,7 +7,7 @@ handler = JodelHandler.new("a44549e5-8f61-4db7-acbf-d9c4673f53ff")
cities = JodelCity.all
cities.each do |city|
- city.jodel_posts.delete_all
+ city.jodel_posts.destroy_all
response = handler.get_posts(city.latitude, city.longitude)
top_posts = response["voted"]
top_posts.each do |post|
|
Fix Posts not being deleted
|
diff --git a/spec/aruba/fixtures/migrations/56/20171115195229_add_temporal_extension_to_impressions.rb b/spec/aruba/fixtures/migrations/56/20171115195229_add_temporal_extension_to_impressions.rb
index abc1234..def5678 100644
--- a/spec/aruba/fixtures/migrations/56/20171115195229_add_temporal_extension_to_impressions.rb
+++ b/spec/aruba/fixtures/migrations/56/20171115195229_add_temporal_extension_to_impressions.rb
@@ -1,4 +1,4 @@-class AddTemporalExtensionToImpressions < ActiveRecord::Migration[5.1]
+class AddTemporalExtensionToImpressions < ActiveRecord::Migration[5.0]
def self.up
enable_extension 'btree_gist' unless extension_enabled?('btree_gist')
change_table :impressions, temporal: true, copy_data: true
|
Make migrations Rails 5.0 compatible
|
diff --git a/app/decorators/georgia/post_decorator.rb b/app/decorators/georgia/post_decorator.rb
index abc1234..def5678 100644
--- a/app/decorators/georgia/post_decorator.rb
+++ b/app/decorators/georgia/post_decorator.rb
@@ -1,30 +1,4 @@ module Georgia
class PostDecorator < Georgia::PageDecorator
-
- def template_path
- "posts/templates/#{model.template}"
- end
-
- def url options={}
- localized_slug(options) + blog_slug + categorized_url
- end
-
- def localized_slug options={}
- if options[:locale].present?
- "/#{options[:locale]}/"
- else
- (I18n.available_locales.length > 1) ? "/#{I18n.locale.to_s}/" : '/'
- end
- end
-
- def categorized_url options={}
- category = options[:category] || source.categories.first
- [category.try(:slug), source.slug].compact.join('/')
- end
-
- def blog_slug
- 'blog/'
- end
-
end
end
|
Remove all legacy category-related methods in PostDecorator
|
diff --git a/code_metrics.gemspec b/code_metrics.gemspec
index abc1234..def5678 100644
--- a/code_metrics.gemspec
+++ b/code_metrics.gemspec
@@ -3,13 +3,19 @@ require "code_metrics/version"
Gem::Specification.new do |s|
+ s.platform = Gem::Platform::RUBY
s.name = "code_metrics"
s.version = CodeMetrics::VERSION
- s.authors = ["Benjamin Fleischer"]
- s.email = ["dev@benjaminfleischer.com"]
+ s.author = "David Heinemeier Hansson"
+ s.email = "david@loudthinking.com"
s.homepage = "https://github.com/bf4/code_statistics"
s.summary = "Extraction of the rails rake stats task as a gem and rails plugin"
s.description = "rake stats is great for looking at statistics on your code, displaying things like KLOCs (thousands of lines of code) and your code to test ratio."
+
+ s.required_ruby_version = '>= 1.9.3'
+ s.required_rubygems_version = '>= 1.8.11'
+
+ s.license = 'MIT'
s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"]
s.test_files = Dir["test/**/*"]
|
Bring gemspec in line with rails.gemspec
|
diff --git a/lib/miq_automation_engine/service_models/miq_ae_service_physical_server.rb b/lib/miq_automation_engine/service_models/miq_ae_service_physical_server.rb
index abc1234..def5678 100644
--- a/lib/miq_automation_engine/service_models/miq_ae_service_physical_server.rb
+++ b/lib/miq_automation_engine/service_models/miq_ae_service_physical_server.rb
@@ -0,0 +1,10 @@+module MiqAeMethodService
+ class MiqAeServicePhysicalServer < MiqAeServiceModelBase
+ expose :ext_management_system, :association => true
+
+ expose :turn_on_loc_led
+ expose :turn_off_loc_led
+ expose :power_on
+ expose :power_off
+ end
+end
|
Create automate service for Lenovo
|
diff --git a/test/tests/test_json_output.rb b/test/tests/test_json_output.rb
index abc1234..def5678 100644
--- a/test/tests/test_json_output.rb
+++ b/test/tests/test_json_output.rb
@@ -0,0 +1,30 @@+JSON_REPORT = JSON.parse(Brakeman.run("#{TEST_PATH}/apps/rails3.2").report.to_json)
+
+class JSONOutputTests < Test::Unit::TestCase
+ def setup
+ @json = JSON_REPORT
+ end
+
+ def test_for_render_path
+ assert @json["warnings"].all? { |warning|
+ warning.keys.include?("render_path") and
+ (warning["render_path"].nil? or warning["render_path"].is_a? Array)
+ }
+ end
+
+ def test_for_expected_keys
+ assert (@json.keys - ["warnings", "scan_info", "errors"]).empty?
+ end
+
+ def test_for_expected_warning_keys
+ expected = ["warning_type", "message", "file", "link", "code", "location", "render_path", "user_input", "confidence", "line"]
+
+ @json["warnings"].each do |warning|
+ assert (warning.keys - expected).empty?, "#{warning.keys - expected} did not match expected keys"
+ end
+ end
+
+ def test_for_errors
+ assert @json["errors"].is_a? Array
+ end
+end
|
Add simple tests for JSON reports
|
diff --git a/features/step_definitions/crudecumber_steps.rb b/features/step_definitions/crudecumber_steps.rb
index abc1234..def5678 100644
--- a/features/step_definitions/crudecumber_steps.rb
+++ b/features/step_definitions/crudecumber_steps.rb
@@ -3,11 +3,12 @@ key = capture_key
unless skipped?(key)
unless pass?(key)
- print "\nDescribe the problem:\n"
- puts "Notes: " + STDIN.gets.chomp
+ print "\n Describe the problem: "
+ puts " Notes: " + STDIN.gets.chomp
fail
end
else
- pending("Step skipped")
+ puts " Step skipped by tester"
+ pending
end
end
|
Fix terminal message spacing to make everything aligned
|
diff --git a/test/writers/html/tc_html_document.rb b/test/writers/html/tc_html_document.rb
index abc1234..def5678 100644
--- a/test/writers/html/tc_html_document.rb
+++ b/test/writers/html/tc_html_document.rb
@@ -23,8 +23,6 @@ writer: 'html', showAllTags: false)
got = metadata[:writerOutput]
- File.write('/mnt/hgfs/ShareDrive/writeOut.html', got)
-
refute_empty got
|
Remove file write script from html mini test
|
diff --git a/Casks/handbrakecli-nightly.rb b/Casks/handbrakecli-nightly.rb
index abc1234..def5678 100644
--- a/Casks/handbrakecli-nightly.rb
+++ b/Casks/handbrakecli-nightly.rb
@@ -1,6 +1,6 @@ cask :v1 => 'handbrakecli-nightly' do
- version '7073svn'
- sha256 '50a374f8b8984735e8f2b49d5be78f2dc713d433e3982ce539697c31fea190de'
+ version '7105svn'
+ sha256 '302b9310b11a7397fcf68b608d62ad592d71241c357638e346883711d41fa014'
url "http://download.handbrake.fr/nightly/HandBrake-#{version}-MacOSX.6_CLI_x86_64.dmg"
homepage 'http://handbrake.fr'
|
Update HandbrakeCLI Nightly to v7105svn
HandBrakeCLI Nightly v7105svn built 2015-04-20.
|
diff --git a/Casks/webstorm-bundled-jdk.rb b/Casks/webstorm-bundled-jdk.rb
index abc1234..def5678 100644
--- a/Casks/webstorm-bundled-jdk.rb
+++ b/Casks/webstorm-bundled-jdk.rb
@@ -1,6 +1,6 @@ cask :v1 => 'webstorm-bundled-jdk' do
- version '10.0.4'
- sha256 '539e8505c47e1f96349316ebc6441ef8f87c8b461fd6db88608a2269ba95246d'
+ version '11.0.0'
+ sha256 'aecc26c2cb95d610bcb60d1224b4f8e80031cd8dd1430256173ecc35f7464f40'
url "https://download.jetbrains.com/webstorm/WebStorm-#{version}-custom-jdk-bundled.dmg"
name 'WebStorm'
|
Update WebStorm Bundled to 11.0.0
|
diff --git a/db/migrate/20161111114955_add_submitted_timestamps_for_epix_users_to_annual_report_uploads.rb b/db/migrate/20161111114955_add_submitted_timestamps_for_epix_users_to_annual_report_uploads.rb
index abc1234..def5678 100644
--- a/db/migrate/20161111114955_add_submitted_timestamps_for_epix_users_to_annual_report_uploads.rb
+++ b/db/migrate/20161111114955_add_submitted_timestamps_for_epix_users_to_annual_report_uploads.rb
@@ -0,0 +1,6 @@+class AddSubmittedTimestampsForEpixUsersToAnnualReportUploads < ActiveRecord::Migration
+ def change
+ add_column :trade_annual_report_uploads, :epix_submitted_by, :integer
+ add_column :trade_annual_report_uploads, :epix_submitted_at, :datetime
+ end
+end
|
Add submitted timestamps for epix users in report uploads
|
diff --git a/rename_params.gemspec b/rename_params.gemspec
index abc1234..def5678 100644
--- a/rename_params.gemspec
+++ b/rename_params.gemspec
@@ -9,9 +9,12 @@ s.description = 'Simple params renaming for Rails applications'
s.authors = ['Marcelo Casiraghi']
s.email = 'marcelo@paragon-labs.com'
- s.files = ['lib/rename_params.rb']
s.homepage = 'http://rubygems.org/gems/rename_params'
s.license = 'MIT'
+
+ s.files = `git ls-files`.split('\n')
+ s.test_files = `git ls-files -- spec/*`.split('\n')
+ s.require_paths = ['lib']
s.add_dependency 'activesupport'
s.add_dependency 'actionpack'
|
Update file specs in gemspec
|
diff --git a/app/controllers/api/users/tasks_controller.rb b/app/controllers/api/users/tasks_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/api/users/tasks_controller.rb
+++ b/app/controllers/api/users/tasks_controller.rb
@@ -12,8 +12,11 @@ def create
@task = current_user.tasks.new(create_task_params)
@task.sync_state_with_project
- @task.sync_order
- @task.save!
+ lock_name = "sync_order_for_user_#{current_user.id}"
+ Task.with_advisory_lock(lock_name) do
+ @task.sync_order
+ @task.save!
+ end
NotificationsChannel.broadcast_to(
current_user,
|
Put sync_order and save within a lock
In order to make sure the task is saved with the highest order possible,
we must be sure `sync_order` and `save!` are thread-safe.
The lock is acquired for a given user since order can be duplicated for
two different users.
|
diff --git a/app/controllers/api/v1/versions_controller.rb b/app/controllers/api/v1/versions_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/api/v1/versions_controller.rb
+++ b/app/controllers/api/v1/versions_controller.rb
@@ -14,6 +14,12 @@ end
def reverse_dependencies
- respond_with(Version.reverse_dependencies(params[:id]), :yamlish => true)
+ versions = Version.reverse_dependencies(params[:id])
+
+ respond_to do |format|
+ format.json { render :json => versions.map { |v| v.as_json.merge("full_name" => v.full_name) } }
+ format.xml { render :xml => versions.map { |v| v.payload.merge("full_name" => v.full_name) } }
+ format.yaml { render :text => versions.map { |v| v.payload.merge("full_name" => v.full_name) }.to_yaml }
+ end
end
end
|
Add full_name field to the reverse_dependencies payload
|
diff --git a/app/controllers/authentications_controller.rb b/app/controllers/authentications_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/authentications_controller.rb
+++ b/app/controllers/authentications_controller.rb
@@ -31,7 +31,7 @@ @authentication = current_user.authentications.find(params[:id])
@authentication.destroy
flash[:notice] = "Successfully destroyed authentication."
- redirect_to user_edit_path
+ redirect_to edit_user_registration_path
end
end
|
Fix pahts in for OA links
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.