diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/lib/google_music_api/mobile_client.rb b/lib/google_music_api/mobile_client.rb
index abc1234..def5678 100644
--- a/lib/google_music_api/mobile_client.rb
+++ b/lib/google_music_api/mobile_client.rb
@@ -32,6 +32,16 @@ !subscribed.nil?
end
+ def get_genres(parent_id = nil)
+ url = 'explore/genres'
+
+ options = {}
+ options[:query] = {'parent-genre': parent_id} if parent_id
+
+
+ make_get_request(url, options)['genres']
+ end
+
private
def authorization_token
|
Add support for checking genres
|
diff --git a/lib/graphite_client/event_reporter.rb b/lib/graphite_client/event_reporter.rb
index abc1234..def5678 100644
--- a/lib/graphite_client/event_reporter.rb
+++ b/lib/graphite_client/event_reporter.rb
@@ -18,16 +18,10 @@ end
end
- def report(event)
- @req.body = EventValue.from(event)
+ def report(event={})
+ event[:tags] = Array(event[:tags]).join(',')
+ @req.body = event.to_json
@http.request(@req)
- end
-
- class EventValue
- def self.from(event={})
- event[:tags] = Array(event[:tags]).join(',')
- event.to_json
- end
end
end
end
|
Simplify EventReporter class by removing nested formatter class
|
diff --git a/capistrano-ec2tag.gemspec b/capistrano-ec2tag.gemspec
index abc1234..def5678 100644
--- a/capistrano-ec2tag.gemspec
+++ b/capistrano-ec2tag.gemspec
@@ -6,9 +6,9 @@ s.version = "0.0.1"
s.authors = ["Douglas Jarquin"]
s.email = ["douglasjarquin@gmail.com"]
- s.homepage = ""
- s.summary = %q{TODO: Write a gem summary}
- s.description = %q{TODO: Write a gem description}
+ s.homepage = "https://github.com/douglasjarquin/capistrano-ec2tag"
+ s.summary = "A Capistrano plugin aimed at easing the pain of deploying to Amazon EC2 instances by using a simple \"deploy\" tag."
+ s.description = "capistrano-ec2tag is a Capistrano plugin designed to simplify the task of deploying to infrastructure hosted on Amazon EC2. It was completely inspired by the capistrano-ec2group plugin, to which all credit is due."
s.rubyforge_project = "capistrano-ec2tag"
@@ -20,4 +20,3 @@ s.add_dependency "capistrano", ">=2.1.0"
s.add_dependency "right_aws"
end
-
|
Add updated summary and description to the .gemspec.
|
diff --git a/lib/intercom/user_collection_proxy.rb b/lib/intercom/user_collection_proxy.rb
index abc1234..def5678 100644
--- a/lib/intercom/user_collection_proxy.rb
+++ b/lib/intercom/user_collection_proxy.rb
@@ -38,14 +38,6 @@ end
end
- # yields each {User} to the block provided and collects the output in the same way as Enumerable#map
- # @return [Array<Object>]
- def map
- out = []
- each { |e| out << yield(e) }
- out
- end
-
- alias :collect :map
+ include Enumerable
end
end
|
Include Enumerable module into UserCollectionProxy instead of defining map
|
diff --git a/lib/libra2/app/models/generic_work.rb b/lib/libra2/app/models/generic_work.rb
index abc1234..def5678 100644
--- a/lib/libra2/app/models/generic_work.rb
+++ b/lib/libra2/app/models/generic_work.rb
@@ -5,6 +5,10 @@ include ::CurationConcerns::BasicMetadata
include Sufia::WorkBehavior
validates :title, presence: { message: 'Your work must have a title.' }
+
+ # work type definitions
+ WORK_TYPE_GENERIC = 'generic_work'.freeze
+ WORK_TYPE_THESIS = 'thesis'.freeze
# Custom Metadata
#
|
Add work type definitions to generic work model
|
diff --git a/flagship.gemspec b/flagship.gemspec
index abc1234..def5678 100644
--- a/flagship.gemspec
+++ b/flagship.gemspec
@@ -21,7 +21,7 @@ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
- spec.add_development_dependency "bundler", "~> 1.13"
+ spec.add_development_dependency "bundler", "> 1.13"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "rspec", "~> 3.5.0"
end
|
Allow to use the latest bundler
|
diff --git a/McPicker.podspec b/McPicker.podspec
index abc1234..def5678 100644
--- a/McPicker.podspec
+++ b/McPicker.podspec
@@ -5,11 +5,13 @@
Pod::Spec.new do |s|
s.name = 'McPicker'
- s.version = '0.2.0'
+ s.version = '0.3.0'
s.summary = 'McPicker is a UIPickerView drop-in solution with animations that is rotation ready.'
s.description = <<-DESC
-McPicker is a UIPickerView replacement with animations and rotation ready. The more string arrays you pass the more picker components you'll get. You can set custom label or use the default.
+McPicker is a UIPickerView drop-in solution with animations that is rotation ready. The more string arrays you pass, the more picker components you'll get. You can set custom label or use the defaults. McPicker can be presented as a Popover on iPhone or iPad using showAsPopover or use the default slide up and down style, show.
+
+showAsPopover can be used to display from a UIView or UIBarButtonItem. showAsPopover will always be presented as a Popover, even when used on an iPhone.
DESC
s.homepage = 'https://github.com/kmcgill88/McPicker-iOS'
|
Update pod spec to version 0.3.0
|
diff --git a/lib/engine_cart/gemfile_stanza.rb b/lib/engine_cart/gemfile_stanza.rb
index abc1234..def5678 100644
--- a/lib/engine_cart/gemfile_stanza.rb
+++ b/lib/engine_cart/gemfile_stanza.rb
@@ -20,7 +20,8 @@ Bundler.ui.warn e.message
end
else
- # we get here when we haven't yet generated the testing app via engine_cart
+ Bundler.ui.warn "[EngineCart] Unable to find test application dependencies in \#{file}, using placeholder dependencies"
+
gem 'rails', ENV['RAILS_VERSION'] if ENV['RAILS_VERSION']
if ENV['RAILS_VERSION'].nil? || ENV['RAILS_VERSION'] =~ /^4.2/
|
Add bundler logging when falling back on default dependencies
|
diff --git a/lib/sec_statement_parser/statement.rb b/lib/sec_statement_parser/statement.rb
index abc1234..def5678 100644
--- a/lib/sec_statement_parser/statement.rb
+++ b/lib/sec_statement_parser/statement.rb
@@ -42,6 +42,12 @@
def parse_link(link)
result = SecStatementFields.parse(link)
+
+ # Set parsed results to instance variables of Statement
+ result.each do |k, v|
+ instance_variable_set("@#{k}", v)
+ end
+
return result
end
|
Set parsed results to instance variables of Statement in parse_link()
|
diff --git a/lib/simplecov-console/output/block.rb b/lib/simplecov-console/output/block.rb
index abc1234..def5678 100644
--- a/lib/simplecov-console/output/block.rb
+++ b/lib/simplecov-console/output/block.rb
@@ -14,7 +14,8 @@ block << sprintf("%8.8s: %s", 'missed', missed(f.missed_lines).join(", "))
blocks << block.join("\n")
end
- "\n" << blocks.join("\n\n") << "\n\n"
+
+ "\n" + blocks.join("\n\n") + "\n\n"
end
end
|
Support for globally frozen string literals
|
diff --git a/lib/libvirt/ffi/libvirt.rb b/lib/libvirt/ffi/libvirt.rb
index abc1234..def5678 100644
--- a/lib/libvirt/ffi/libvirt.rb
+++ b/lib/libvirt/ffi/libvirt.rb
@@ -1,10 +1,10 @@ module FFI::Libvirt
- extend FFI::Library
- ffi_lib FFI::Libvirt::library_path
-
def self.library_path
'libvirt.so.0'
end
+
+ extend FFI::Library
+ ffi_lib FFI::Libvirt::library_path
#int virGetVersion(unsigned long * libVer, const char * type, unsigned long * typeVer)
attach_function :virGetVersion, [:pointer, :string, :pointer], :int
|
Declare methods before using it
|
diff --git a/lib/locotimezone/configuration.rb b/lib/locotimezone/configuration.rb
index abc1234..def5678 100644
--- a/lib/locotimezone/configuration.rb
+++ b/lib/locotimezone/configuration.rb
@@ -2,7 +2,7 @@ class Configuration
attr_accessor :google_api_key
attr_reader :attributes
-
+
def initialize
@attributes = {
latitude: :latitude,
@@ -12,9 +12,8 @@ end
def attributes=(value)
- if value.respond_to? :has_key?
- @attributes = attributes.merge value
- end
+ return unless value.respond_to? :has_key
+ @attributes = attributes.merge value
end
end
end
|
Use guard clause to check for hash
|
diff --git a/spec/devise/mailer/mailer_spec.rb b/spec/devise/mailer/mailer_spec.rb
index abc1234..def5678 100644
--- a/spec/devise/mailer/mailer_spec.rb
+++ b/spec/devise/mailer/mailer_spec.rb
@@ -0,0 +1,43 @@+require "spec_helper"
+
+describe Devise::Mailer do
+ let(:user) { mock_model(User, email: "foo@bar.com") }
+ describe "#confirmation_instructions" do
+ let(:mail) { Devise::Mailer.confirmation_instructions(user, "abc123") }
+
+ it { expect(mail.from).to eq ["contact@theyvoteforyou.org.au"] }
+ it { expect(mail.to).to eq ["foo@bar.com"] }
+ it { expect(mail.subject).to eq "Confirmation instructions" }
+ it { expect(mail).to_not be_multipart }
+ it do
+ expect(mail.body.to_s).to eq <<-EOF
+<p>Welcome foo@bar.com!</p>
+
+<p>You can confirm your account email through the link below:</p>
+
+<p><a href="http://pw.org.au/users/confirmation?confirmation_token=abc123">Confirm my account</a></p>
+ EOF
+ end
+ end
+
+ describe "#reset_password_instructions" do
+ let(:mail) { Devise::Mailer.reset_password_instructions(user, "abc123") }
+
+ it { expect(mail.from).to eq ["contact@theyvoteforyou.org.au"] }
+ it { expect(mail.to).to eq ["foo@bar.com"] }
+ it { expect(mail.subject).to eq "Reset password instructions" }
+ it { expect(mail).to_not be_multipart }
+ it do
+ expect(mail.body.to_s).to eq <<-EOF
+<p>Hello foo@bar.com!</p>
+
+<p>Someone has requested a link to change your password. You can do this through the link below.</p>
+
+<p><a href="http://pw.org.au/users/password/edit?reset_password_token=abc123">Change my password</a></p>
+
+<p>If you didn't request this, please ignore this email.</p>
+<p>Your password won't change until you access the link above and create a new one.</p>
+ EOF
+ end
+ end
+end
|
Add regression tests for devise emails
|
diff --git a/script/remove_server_info.rb b/script/remove_server_info.rb
index abc1234..def5678 100644
--- a/script/remove_server_info.rb
+++ b/script/remove_server_info.rb
@@ -0,0 +1,33 @@+#!/usr/bin/ruby
+
+
+require 'yaml'
+
+RAILS_ROOT = File.dirname(__FILE__) + "/.."
+
+# We may not have a workling Webiva install, so
+def run_db_command(command)
+ system("mysql",'-u',@username,"--password=#{@pw}","--host=#{@db_host}","--port=#{@db_port}",'-e',command,@db_name)
+end
+
+
+def remove_server_info
+
+ cms_yml_file = YAML.load_file("#{RAILS_ROOT}/config/cms.yml")['production']
+
+ @db_name= cms_yml_file['database']
+ @username = cms_yml_file['username']
+ @pw = cms_yml_file['password']
+ @db_host = cms_yml_file['host']
+ @db_port = 3306
+
+ server_yml_file = YAML.load_file("#{RAILS_ROOT}/config/server.yml")['server']
+
+ @server_name = server_yml_file['name']
+ run_db_command("DELETE FROM `#{@db_name}`.`servers` WHERE hostname='#{@server_name}'")
+
+end
+
+remove_server_info
+
+
|
Remove server information ruby script
|
diff --git a/lib/nikeplus/http_utils.rb b/lib/nikeplus/http_utils.rb
index abc1234..def5678 100644
--- a/lib/nikeplus/http_utils.rb
+++ b/lib/nikeplus/http_utils.rb
@@ -16,6 +16,8 @@
def build_url(options = {})
uri = URI.parse(self.class.const_get('API_URL'))
+ token = NikePlus.configuration[:access_token]
+ options.merge!(access_token: token) if token
uri.query = [uri.query, URI.encode_www_form(options)].compact.join('&')
uri.to_s
end
|
Add token to all get request via class variable on module
|
diff --git a/lib/npr_todays_news/cli.rb b/lib/npr_todays_news/cli.rb
index abc1234..def5678 100644
--- a/lib/npr_todays_news/cli.rb
+++ b/lib/npr_todays_news/cli.rb
@@ -1,23 +1,33 @@ class NprTodaysNews::CLI
def run
- get_newslist
print_stories
end
def get_newslist
puts "These are today's top stories on NPR:"
+ puts
NprTodaysNews::Scraper.new.scrape
end
def print_stories
get_newslist.stories.each.with_index(1) do |story, index|
- puts "#{index}. #{story.title} -- #{story.teaser}"
+ puts "#{index}. #{story.title}" #-- #{story.teaser}
+ #binding.pry
end
+ puts
+ get_user_input
+ end
+
+ def get_user_input
+ puts "Please select the story number (#1-3) or type 'exit' to quit."
+ input = gets.strip.to_i
+
+ if input == 1
+ puts "you chose the first story!"
+ end
+
+ #
end
- # this is where I want to receive input from the user to loop through his/her options.
-
-
-
end
|
Improve output readibility for featured stories.
|
diff --git a/lib/oakdex/pokedex/move.rb b/lib/oakdex/pokedex/move.rb
index abc1234..def5678 100644
--- a/lib/oakdex/pokedex/move.rb
+++ b/lib/oakdex/pokedex/move.rb
@@ -7,6 +7,10 @@ json_folder 'move'
translate :names, :name
translate :descriptions, :description
+
+ def pp
+ @attributes['pp']
+ end
end
end
end
|
Add support for ruby 2.5.0
|
diff --git a/test/distributed_persistence_control_commands_test.rb b/test/distributed_persistence_control_commands_test.rb
index abc1234..def5678 100644
--- a/test/distributed_persistence_control_commands_test.rb
+++ b/test/distributed_persistence_control_commands_test.rb
@@ -7,31 +7,28 @@
include RedisMock::Helper
-setup do
- log = StringIO.new
- init Redis::Distributed.new(NODES, :logger => ::Logger.new(log))
-end
+MOCK_NODES = ["redis://127.0.0.1:6380/15"]
test "SAVE" do
redis_mock(:save => lambda { "+SAVE" }) do
- redis = Redis.new(OPTIONS.merge(:port => 6380))
+ redis = Redis::Distributed.new(MOCK_NODES)
- assert "SAVE" == redis.save
+ assert ["SAVE"] == redis.save
end
end
test "BGSAVE" do
redis_mock(:bgsave => lambda { "+BGSAVE" }) do
- redis = Redis.new(OPTIONS.merge(:port => 6380))
+ redis = Redis::Distributed.new(MOCK_NODES)
- assert "BGSAVE" == redis.bgsave
+ assert ["BGSAVE"] == redis.bgsave
end
end
test "LASTSAVE" do |r|
redis_mock(:lastsave => lambda { "+LASTSAVE" }) do
- redis = Redis.new(OPTIONS.merge(:port => 6380))
+ redis = Redis::Distributed.new(MOCK_NODES)
- assert "LASTSAVE" == redis.lastsave
+ assert ["LASTSAVE"] == redis.lastsave
end
end
|
Test SAVE, BGSAVE and LASTSAVE going through Redis::Distributed
|
diff --git a/test/integration_test.rb b/test/integration_test.rb
index abc1234..def5678 100644
--- a/test/integration_test.rb
+++ b/test/integration_test.rb
@@ -0,0 +1,7 @@+require File.expand_path("../test_helper", __FILE__)
+
+describe "zeus-parallel_tests" do
+ it 'should be tested' do
+ skip("any ideas how to test this?")
+ end
+end
|
Add pending state in tests, any idea how to test integration with Zeus?
|
diff --git a/lib/jekyll/minibundle/mini_bundle_block.rb b/lib/jekyll/minibundle/mini_bundle_block.rb
index abc1234..def5678 100644
--- a/lib/jekyll/minibundle/mini_bundle_block.rb
+++ b/lib/jekyll/minibundle/mini_bundle_block.rb
@@ -1,4 +1,4 @@-require 'yaml'
+require 'safe_yaml/load'
require 'jekyll/minibundle/asset_file_registry'
module Jekyll::Minibundle
@@ -10,7 +10,7 @@
def render(context)
site = context.registers.fetch(:site)
- config = get_current_config(YAML.load(super), site)
+ config = get_current_config(SafeYAML.load(super), site)
file = AssetFileRegistry.bundle_file(site, config)
file.add_as_static_file_to(site)
file.destination_path_for_markup
|
Use safe_yaml to load user input from minibundle block
This is what Jekyll uses internally to load YAML input. It's good idea
to use it here as well for consistency and safety.
|
diff --git a/db/seeds.rb b/db/seeds.rb
index abc1234..def5678 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -1,5 +1,5 @@ # This file should contain all the record creation needed to seed the database with its default values.
-# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
+# The data can then be loaded with the rake db:seed.
def should_seed? model
empty = model.all.empty?
|
Remove misleading default comment about db:setup.
|
diff --git a/lib/scanny/checks/http_basic_auth_check.rb b/lib/scanny/checks/http_basic_auth_check.rb
index abc1234..def5678 100644
--- a/lib/scanny/checks/http_basic_auth_check.rb
+++ b/lib/scanny/checks/http_basic_auth_check.rb
@@ -0,0 +1,39 @@+module Scanny
+ module Checks
+ class HTTPBasicAuthCheck < Check
+ def pattern
+ [
+ pattern_basic_auth,
+ pattern_http_authentication
+ ].join("|")
+ end
+
+ def check(node)
+ issue :info, warning_message, :cwe => [301, 718]
+ end
+
+ private
+
+ def warning_message
+ "Basic HTTP authentication can lead to security problems"
+ end
+
+ # Net::HTTPHeader.basic_auth('user', 'password')
+ def pattern_basic_auth
+ <<-EOT
+ SendWithArguments<
+ arguments = ActualArguments<
+ array = [any{2}]
+ >,
+ name = :basic_auth
+ >
+ EOT
+ end
+
+ # HttpAuthentication
+ def pattern_http_authentication
+ "ConstantAccess<name = :HttpAuthentication>"
+ end
+ end
+ end
+end
|
Add implementation for HTTP basic auth
|
diff --git a/db/seeds.rb b/db/seeds.rb
index abc1234..def5678 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -1,6 +1,8 @@ u = User.new
u.email="user@example.com"
u.password=u.password_confirmation="password"
+u.save!
+u.roles=['admin', 'manager', 'translator', 'analyst', 'user']
u.save!
a = AdminUser.new
|
Add roles to user seed
|
diff --git a/test/models/repo_test.rb b/test/models/repo_test.rb
index abc1234..def5678 100644
--- a/test/models/repo_test.rb
+++ b/test/models/repo_test.rb
@@ -2,10 +2,10 @@
class RepoTest < ActiveSupport::TestCase
def test_sync_ranks
- Repo.new("#{Rails.root}/.git").send(:sync_ranks)
+ Repo.new.send(:sync_ranks)
{jeremy: 1, david: 2, jose: 3, xavier: 3, vijay: 3}.each do |c, r|
assert_equal r, contributors(c).rank
end
end
-end
+end
|
Revert "Fix test git path"
This reverts commit 0dabf67379b316d3a7267be22eca47f29890d287.
|
diff --git a/config/initializers/omniauth.rb b/config/initializers/omniauth.rb
index abc1234..def5678 100644
--- a/config/initializers/omniauth.rb
+++ b/config/initializers/omniauth.rb
@@ -1,6 +1,14 @@ OmniAuth.config.logger = Rails.logger
Rails.application.config.middleware.use OmniAuth::Builder do
- options = { scope: 'email,user_location', image_size: :normal }
+ options = {
+ scope: 'email,user_location',
+ image_size: :normal,
+ client_options: {
+ site: 'https://graph.facebook.com/v2.6',
+ authorize_url: "https://www.facebook.com/v2.6/dialog/oauth",
+ },
+ token_params: { parse: :json },
+ }
provider :facebook, ENV['FACEBOOK_APP_ID'], ENV['FACEBOOK_APP_SECRET'], options
provider :browser_id
provider :developer, fields: %i[name], uid_field: :name if Rails.env.development?
|
Use v2.6 of the Facebook Graph API.
We'd been using v2.0, which is getting shut down in a few months. We'll
see whether this helps.
|
diff --git a/Casks/one-password.rb b/Casks/one-password.rb
index abc1234..def5678 100644
--- a/Casks/one-password.rb
+++ b/Casks/one-password.rb
@@ -1,5 +1,5 @@ class OnePassword < Cask
- url 'https://d13itkw33a7sus.cloudfront.net/dist/1P/mac/1Password-3.8.17.zip'
+ url 'https://d13itkw33a7sus.cloudfront.net/dist/1P/mac/1Password-3.8.20.zip'
homepage 'https://agilebits.com/onepassword'
- version '3.8.17'
+ version '3.8.20'
end
|
Update OnePassword cask to latest version.
|
diff --git a/lib/tasks/investments.rake b/lib/tasks/investments.rake
index abc1234..def5678 100644
--- a/lib/tasks/investments.rake
+++ b/lib/tasks/investments.rake
@@ -0,0 +1,12 @@+namespace :investments do
+ namespace :internal_comments do
+ desc "Migrate internal_comments textarea to a first comment on internal thread"
+ task migrate_to_thread: :environment do
+ comments_author_id = Administrator.first.user.id
+ Budget::Investment.where.not(internal_comments: [nil, '']).find_each do |investment|
+ Comment.create(commentable: investment, user_id: comments_author_id,
+ body: investment.internal_comments, valuation: true)
+ end
+ end
+ end
+end
|
Add rake task to migrate investment's internal comments to thread
|
diff --git a/db/migrate/20120810112751_create_blog_comments.rb b/db/migrate/20120810112751_create_blog_comments.rb
index abc1234..def5678 100644
--- a/db/migrate/20120810112751_create_blog_comments.rb
+++ b/db/migrate/20120810112751_create_blog_comments.rb
@@ -5,7 +5,7 @@ t.string :name, :null => false, :limit => 200
t.string :email, :null => false, :limit => 200
t.string :body, :null => false, :limit => 2000
- t.boolean :approved, :null => false, :default => false
+ t.string :status, :null => false, :limit => 50, :default => 'pending'
t.timestamps
end
|
Add a status column to blog comments.
|
diff --git a/db/migrate/20200513105319_create_srg_histories.rb b/db/migrate/20200513105319_create_srg_histories.rb
index abc1234..def5678 100644
--- a/db/migrate/20200513105319_create_srg_histories.rb
+++ b/db/migrate/20200513105319_create_srg_histories.rb
@@ -12,7 +12,7 @@
execute(<<-SQL
INSERT INTO srg_histories(name, tooltip, created_at, updated_at)
- VALUES ('In consultation', NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP), ('Discussed at SRG (no decision taken)', NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)
+ VALUES ('In consultation', NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP), ('Discussed at SRG', 'no decision taken', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)
SQL
)
end
|
Move (no decision taken) to tooltip
|
diff --git a/lib/aws/xray/error_handlers.rb b/lib/aws/xray/error_handlers.rb
index abc1234..def5678 100644
--- a/lib/aws/xray/error_handlers.rb
+++ b/lib/aws/xray/error_handlers.rb
@@ -23,9 +23,11 @@
# Must be configured sentry-raven gem.
class ErrorHandlerWithSentry
+ ERROR_LEVEL = 'warning'.freeze
+
def call(error, payload, host:, port:)
if defined?(Raven)
- ::Raven.capture_exception(error)
+ ::Raven.capture_exception(error, level: ERROR_LEVEL)
else
$stderr.puts('ErrorHandlerWithSentry is configured but `Raven` is undefined.')
end
|
Set proper error level for setnry raven
|
diff --git a/lib/eventually_tracker/base.rb b/lib/eventually_tracker/base.rb
index abc1234..def5678 100644
--- a/lib/eventually_tracker/base.rb
+++ b/lib/eventually_tracker/base.rb
@@ -7,13 +7,13 @@ @buffer = buffer
end
- def track_action(controller_name, action_name, action_uid, data, cookies_data)
+ def track_action(controller_name, action_name, action_uid, data, session_data)
str =
"""Track controller action
action_uid:\t#{action_uid}
controller_name:\t#{controller_name}
action_name:\t#{action_name}
- session_data:\t#{cookies_data}
+ session_data:\t#{session_data}
data:\t\t#{data}
"""
@logger.info str
@@ -24,7 +24,7 @@ action_name: action_name,
action_uid: action_uid,
data: data,
- cookies_data: cookies_data
+ session_data: session_data
})
end
|
Fix typo with cookies and session data
|
diff --git a/app/models/concerns/versioned.rb b/app/models/concerns/versioned.rb
index abc1234..def5678 100644
--- a/app/models/concerns/versioned.rb
+++ b/app/models/concerns/versioned.rb
@@ -24,7 +24,7 @@ end
def created_from_result?
- !created_by.nil? && created_by.kind_of?(::Event)
+ created_by.present? && created_by.kind_of?(::Event)
end
def updated_after_created?
|
Use present, not not nil
|
diff --git a/lib/moneta/adapters/leveldb.rb b/lib/moneta/adapters/leveldb.rb
index abc1234..def5678 100644
--- a/lib/moneta/adapters/leveldb.rb
+++ b/lib/moneta/adapters/leveldb.rb
@@ -39,6 +39,26 @@ @backend.close
nil
end
+
+ # (see Proxy#each_key)
+ def each_key
+ return enum_for(:each_key) { @backend.size } unless block_given?
+ @backend.each { |key, _| yield key }
+ self
+ end
+
+ # (see Proxy#values_at)
+ def values_at(*keys, **options)
+ ret = nil
+ @backend.batch { ret = super }
+ ret
+ end
+
+ # (see Proxy#merge!)
+ def merge!(*keys, **options)
+ @backend.batch { super }
+ self
+ end
end
end
end
|
LevelDB: Add each_key and "multi" methods
|
diff --git a/lib/mongoid/finders/find_by.rb b/lib/mongoid/finders/find_by.rb
index abc1234..def5678 100644
--- a/lib/mongoid/finders/find_by.rb
+++ b/lib/mongoid/finders/find_by.rb
@@ -1,5 +1,4 @@ require 'mongoid'
-require 'pry'
module Mongoid::Finders::FindBy
extend ActiveSupport::Concern
|
Remove Pry from our production code
|
diff --git a/app/policies/volunteer_policy.rb b/app/policies/volunteer_policy.rb
index abc1234..def5678 100644
--- a/app/policies/volunteer_policy.rb
+++ b/app/policies/volunteer_policy.rb
@@ -2,7 +2,7 @@ class Scope < ApplicationScope
def resolve
return all if superadmin?
- return resolve_owner if department_manager_or_social_worker?
+ return seeking_clients if department_manager_or_social_worker?
none
end
alias :seeking_clients :resolve
|
Revert "only way to fix test for time being"
This reverts commit d77e7a92430dda4730680ca39e5a036865cbf186.
|
diff --git a/lib/rails2_ruby2/rails_init.rb b/lib/rails2_ruby2/rails_init.rb
index abc1234..def5678 100644
--- a/lib/rails2_ruby2/rails_init.rb
+++ b/lib/rails2_ruby2/rails_init.rb
@@ -8,3 +8,7 @@ :lib_const_string => 'ActionPack', :version_file => 'action_pack/version') do
require 'rails2_ruby2/named_route_collection_patch'
end
+
+when_library_loaded('ActiveRecord', :version_file => 'active_record/version') do
+ require 'rails2_ruby2/active_record/postgresql_adapter'
+end
|
Load the postgresql adapter extensions when ActiveRecord is available.
|
diff --git a/lib/ruboty/actions/fizzbuzz.rb b/lib/ruboty/actions/fizzbuzz.rb
index abc1234..def5678 100644
--- a/lib/ruboty/actions/fizzbuzz.rb
+++ b/lib/ruboty/actions/fizzbuzz.rb
@@ -2,7 +2,9 @@ module Fizzbuzz
module Actions
class Fizzbuzz < Ruboty::Actions::Base
-
+ def call
+ message.reply('dummy')
+ end
end
end
end
|
Add dummy call method in actions
|
diff --git a/lib/tanker_article_defaults.rb b/lib/tanker_article_defaults.rb
index abc1234..def5678 100644
--- a/lib/tanker_article_defaults.rb
+++ b/lib/tanker_article_defaults.rb
@@ -2,7 +2,7 @@ def self.included(base)
base.send(:include, ::Tanker)
- index = ENV['SEARCHIFY_API_INDEX']
+ index = 'hnlgovanswers'
base.tankit index, :as => 'Article' do
indexes :title
|
Fix broken environment variable in tanker config file
|
diff --git a/app/controllers/api/councillors_controller.rb b/app/controllers/api/councillors_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/api/councillors_controller.rb
+++ b/app/controllers/api/councillors_controller.rb
@@ -1,13 +1,13 @@ class Api::CouncillorsController < ApiController
def index
- @councillors = if @@query.empty?
- Councillor.all
- else
- Councillor.where("lower(first_name) LIKE ? OR
+ ward_id = params[:ward_id]
+ @councillors = Councillor.all
+
+ @councillors = @councillors.where("lower(first_name) LIKE ? OR
lower(last_name) LIKE ? OR
- lower(email) LIKE ?", @@query, @@query, @@query)
- end
-
+ lower(email) LIKE ?", @@query, @@query, @@query) unless @@query.empty?
+ @councillors = @councillors.where("ward_id = ?", ward_id) if ward_id.present?
+
paginate json: @councillors.order(change_query_order), per_page: change_per_page
end
|
Change API Councillors Query To Multiple Criteria
|
diff --git a/docs/training_module_scripts/yml_from_wikitext.rb b/docs/training_module_scripts/yml_from_wikitext.rb
index abc1234..def5678 100644
--- a/docs/training_module_scripts/yml_from_wikitext.rb
+++ b/docs/training_module_scripts/yml_from_wikitext.rb
@@ -0,0 +1,55 @@+# Take wikitext for a training module, convert it into yml files.
+
+module_number = 21
+suffix = 'fellows'
+module_slug = 'wikipedia-policies-fellows'
+# input = <<-STUFF
+
+require "#{Rails.root}/lib/training/wiki_slide_parser"
+base_path = "#{Rails.root}/training_content/wiki_ed/slides/#{module_number}-#{module_slug}"
+
+# Write to a .yml file, return the id and slug base for populating the module.
+def to_yml(wikitext, slide_id, suffix, base_path)
+ parser = WikiSlideParser.new(wikitext)
+ slug_base = parser.title.downcase.split(/\W+/).join('-')
+ slug = "#{slide_id}-#{slug_base}-#{suffix}"
+ filename = "#{base_path}/#{slug}.yml"
+ File.write filename, { 'title' => parser.title, 'content' => parser.content, 'id' => slide_id }.to_yaml
+ return [slide_id, "#{slug_base}-#{suffix}"]
+end
+
+# manually construct the module .yml file
+def write_module_file(slide_slugs, module_number, module_slug)
+ lines = []
+ lines << "name:"
+ lines << "id: #{module_number}"
+ lines << "description:"
+ lines << "estimated_ttc:"
+ lines << "slides:"
+ slide_slugs.each do |slug|
+ lines << " - slug: #{slug[1]} # #{slug[0]}"
+ end
+ path = "#{Rails.root}/training_content/wiki_ed/modules/#{module_slug}.yml"
+ File.open(path, 'w+') do |file|
+ file.puts(lines)
+ end
+end
+
+# Take a single page of wikitext, and break it into level 2 sections, one section per slide
+slide_wikitexts = input.split(/\n(?===)/);
+
+i = 0
+slide_slugs = []
+# write all the slides and collect the slugs and ids
+slide_wikitexts.each do |slide_wikitext|
+ next if slide_wikitext.blank?
+ i += 1
+ padded_slide_count = "%02d" % i
+ slide_id = "#{module_number}#{padded_slide_count}".to_i
+ slide_slugs << to_yml(slide_wikitext, slide_id, suffix, base_path)
+end;
+
+# write the module yml file
+write_module_file(slide_slugs, module_number, module_slug)
+
+# Now fill in the missing fields in the module .yml file and reload the trainings
|
Add script for generating training modules from wiki pages
This code can be used manually to take a wiki page of new training module content, and generate the slide and module .yml files for it.
|
diff --git a/core/spec/features/refinery/admin/menu_spec.rb b/core/spec/features/refinery/admin/menu_spec.rb
index abc1234..def5678 100644
--- a/core/spec/features/refinery/admin/menu_spec.rb
+++ b/core/spec/features/refinery/admin/menu_spec.rb
@@ -0,0 +1,102 @@+require "spec_helper"
+
+module Refinery
+ describe "menu", type: :feature do
+ refinery_login
+
+ before do
+ visit Refinery::Core.backend_path
+ end
+
+ describe "sidebar" do
+ before do
+ allow(Refinery::Core).to receive(:site_name).and_return('Company Name')
+ end
+
+ context "when hover", js: true do
+ before do
+ visit Refinery::Core.backend_path
+ page.execute_script('$("#sidebar-left").trigger("mouseenter")')
+ end
+
+ it "has site_name link" do
+ within('#sidebar-left') do
+ expect(page).to have_selector("a[href='/']")
+ expect(page).to have_content('Company Name')
+ end
+ end
+
+ describe "menu item" do
+ it "has a fullname" do
+ within('#sidebar-left') do
+ expect(page).to have_selector("a[href='/refinery/pages']")
+ expect(page).to have_selector("i.icon.icon-pages")
+ expect(page).to have_content("PAGES")
+ end
+ end
+ end
+
+ describe "logout link" do
+ let(:logout_path) { '/refinery/logout' }
+
+ context "when set" do
+ before do
+ allow(Refinery::Core).to receive(:refinery_logout_path).and_return(logout_path)
+ visit Refinery::Core.backend_path
+ page.execute_script('$("#sidebar-left").trigger("mouseenter")')
+ end
+
+ it "is present" do
+ within('#sidebar-left') do
+ expect(page).to have_selector("a[href='#{logout_path}']")
+ expect(page).to have_content("Log out")
+ end
+ end
+ end
+
+ context "when not set" do
+ it "is not present" do
+ within('#sidebar-left') do
+ expect(page).not_to have_content("Log out")
+ expect(page).not_to have_selector("a[href='#{logout_path}']")
+ end
+ end
+ end
+ end
+ end
+
+ context "when not hover" do
+ before do
+ visit Refinery::Core.backend_path
+ end
+
+ it "has no site_name link" do
+ within('#sidebar-left') do
+ expect(page).to have_selector("a[href='/']")
+ expect(page).to have_content('Company Name')
+ end
+ end
+
+ describe "menu item" do
+ it "has an icon only" do
+ within('#sidebar-left') do
+ expect(page).to have_selector("a[href='/refinery/pages']")
+ expect(page).to have_selector("i.icon.icon-pages")
+ expect(page).not_to have_content("PAGES")
+ end
+ end
+ end
+ end
+
+ describe "menu item" do
+ context "when backend root page" do
+ it "has one active link" do
+ within('#sidebar-left') do
+ expect(page).to have_selector("ul.menu-items li a.active", count: 1)
+ end
+ end
+ end
+ end
+ end
+ end
+end
|
Add admin menu feature spec
|
diff --git a/db/migrate/20130614090445_fix_part_ordering.rb b/db/migrate/20130614090445_fix_part_ordering.rb
index abc1234..def5678 100644
--- a/db/migrate/20130614090445_fix_part_ordering.rb
+++ b/db/migrate/20130614090445_fix_part_ordering.rb
@@ -0,0 +1,22 @@+class FixPartOrdering < Mongoid::Migration
+ def self.up
+ count = 0
+
+ Edition.skip_callback(:save, :before, :check_for_archived_artefact)
+
+ Edition.all.each do |edition|
+ next unless edition.is_a?(Parted)
+ if edition.parts.map(&:order).any?(&:nil?)
+ puts "Fixing nil parts order for #{edition.title}(v#{edition.version_number})"
+ puts " broken order was: #{edition.parts.map(&:order).inspect}"
+ edition.order_parts
+ edition.save! :validate => false # skip validations so that we can fix published and archived editions
+ count += 1
+ end
+ end
+ puts "#{count} Editions fixed"
+ end
+
+ def self.down
+ end
+end
|
Add migration to fix nil order values on existing editions
|
diff --git a/config.ru b/config.ru
index abc1234..def5678 100644
--- a/config.ru
+++ b/config.ru
@@ -2,4 +2,5 @@ require 'rack/static'
use Rack::Static, urls: %w(/favicon.ico /images /stylesheets), root: 'public'
+use ActiveRecord::ConnectionAdapters::ConnectionManagement
run Bouncer.new
|
Use middleware to release the database connection after each request
Without this, Active Record's pool of database connections gets exhausted
after a certain number of requests.
|
diff --git a/config.ru b/config.ru
index abc1234..def5678 100644
--- a/config.ru
+++ b/config.ru
@@ -11,6 +11,7 @@ r301 '/tutorial.html', '/guide'
r301 '/download.html', '/install'
r301 '/documentation', '/documentation/'
+ r301 '/documentation/_index.html', '/documentation/'
rewrite(%r{^(.*)/([^/.]+)$}, lambda do |match, rack_env|
path = "#{File.dirname(__FILE__)}/build#{match[0]}"
|
Add a redirect for the "index" link in the YARD docs.
|
diff --git a/config.ru b/config.ru
index abc1234..def5678 100644
--- a/config.ru
+++ b/config.ru
@@ -7,8 +7,8 @@ # Unicorn self-process killer
require 'unicorn/worker_killer'
- min = (ENV['GITLAB_UNICORN_MEMORY_MIN'] || 200 * 1 << 20).to_i
- max = (ENV['GITLAB_UNICORN_MEMORY_MAX'] || 250 * 1 << 20).to_i
+ min = (ENV['GITLAB_UNICORN_MEMORY_MIN'] || 300 * 1 << 20).to_i
+ max = (ENV['GITLAB_UNICORN_MEMORY_MAX'] || 350 * 1 << 20).to_i
# Max memory size (RSS) per worker
use Unicorn::WorkerKiller::Oom, min, max
|
Increase Unicorn memory limits to 300-350
Using this limit on GitLab.com it appears we're able to reduce response
timings by about 620 milliseconds compared to the previous limit.
See gitlab-org/gitlab-ce!2421 for more information.
|
diff --git a/core/process/setpgrp_spec.rb b/core/process/setpgrp_spec.rb
index abc1234..def5678 100644
--- a/core/process/setpgrp_spec.rb
+++ b/core/process/setpgrp_spec.rb
@@ -33,14 +33,5 @@ Process.wait pid
end
end
-
- end
-
- describe "Process.setpgrp" do
- platform_is_not :windows do
- it "returns zero" do
- Process.setpgrp.should == 0
- end
- end
end
end
|
Remove bad spec potentially changing the global process group
|
diff --git a/Casks/codekit.rb b/Casks/codekit.rb
index abc1234..def5678 100644
--- a/Casks/codekit.rb
+++ b/Casks/codekit.rb
@@ -1,7 +1,7 @@ class Codekit < Cask
- url 'http://incident57.com/codekit/files/codekit-16877.zip'
+ url 'http://incident57.com/codekit/files/codekit-16895.zip'
homepage 'http://incident57.com/codekit/'
- version '2.0.2 (16877)'
- sha256 '633a6baf3062a4e59951b025a1843cf8709de5ecf49e0ee819f4b560a6723353'
+ version '2.0.3 (16895)'
+ sha256 'd98ac91e4e44c833217f55b7dcb389f5730213bb7d801188b3823f695f00b741'
link 'CodeKit.app'
end
|
Update Codekit to version 2.0.3 (16895)
|
diff --git a/SMCalloutView.podspec b/SMCalloutView.podspec
index abc1234..def5678 100644
--- a/SMCalloutView.podspec
+++ b/SMCalloutView.podspec
@@ -1,6 +1,6 @@ Pod::Spec.new do |s|
s.name = "SMCalloutView"
- s.version = "1.1.1"
+ s.version = "1.1.2"
s.summary = "A lightweight callout view class for iOS mimicking UICalloutView."
s.description = <<-DESC
SMCalloutView aims to be an exact replica of the private UICalloutView system control.
@@ -10,7 +10,7 @@ s.homepage = "https://github.com/nfarina/calloutview"
s.license = 'Apache License, Version 2.0'
s.author = { "Nick Farina" => "nfarina@gmail.com" }
- s.source = { :git => "https://github.com/nfarina/calloutview.git", :tag => "1.1.1" }
+ s.source = { :git => "https://github.com/nfarina/calloutview.git", :tag => "1.1.2" }
s.platform = :ios
s.source_files = 'SMCalloutView.{h,m}'
s.requires_arc = true
|
Update to bug fix release 1.1.2
|
diff --git a/lib/flowaker/rspec.rb b/lib/flowaker/rspec.rb
index abc1234..def5678 100644
--- a/lib/flowaker/rspec.rb
+++ b/lib/flowaker/rspec.rb
@@ -8,14 +8,14 @@
def step(description, &block)
yield
- reporter.example_passed StepExample.new(description)
+ reporter.example_passed StepExample.new(description, example.execution_result)
end
def reporter
::RSpec.configuration.reporter
end
- class StepExample < Struct.new(:description); end
+ class StepExample < Struct.new(:description, :execution_result); end
end
end
|
Add support for TeamCity report formatter
RubyMine uses the TeamCity reporter formatter and requires
the execution result of the example.
|
diff --git a/lib/html_processor.rb b/lib/html_processor.rb
index abc1234..def5678 100644
--- a/lib/html_processor.rb
+++ b/lib/html_processor.rb
@@ -10,6 +10,7 @@ ACTION_FORM = '//form[@class="action-form"]'.freeze
DATATABLE_DEFAULT = '//table[contains(@class, "datatable-default")]'.freeze
INTRO_IMG = '//p[@class="intro"]/img'.freeze
+ INTRO_PARAGRAPH = '//p[@class="intro"]'.freeze
VIDEO_IFRAME = '//iframe[starts-with(@src, "https://www.youtube.com/embed")]'.freeze
COLLAPSIBLE_SPAN = '//span[@class="collapse"]'.freeze
|
Add xpath targeting the intro paragraph.
|
diff --git a/spec/unit/lib/puppet/parser/functions/docker_run_flags_spec.rb b/spec/unit/lib/puppet/parser/functions/docker_run_flags_spec.rb
index abc1234..def5678 100644
--- a/spec/unit/lib/puppet/parser/functions/docker_run_flags_spec.rb
+++ b/spec/unit/lib/puppet/parser/functions/docker_run_flags_spec.rb
@@ -0,0 +1,15 @@+require 'spec_helper'
+
+describe 'the "docker_run_flags" parser function' do
+ let :scope do
+ node = Puppet::Node.new('localhost')
+ compiler = Puppet::Parser::Compiler.new(node)
+ scope = Puppet::Parser::Scope.new(compiler)
+ allow(scope).to receive(:environment).and_return(nil)
+ scope
+ end
+
+ it 'env with special chars' do
+ expect(scope.function_docker_run_flags([{ 'env' => [%.MYSQL_PASSWORD='"$()[]{}<>.], 'extra_params' => [] }])).to match(/^-e MYSQL_PASSWORD\\=\\'\\"\\\$\\\(\\\)\\\[\\\]\\\{\\\}\\<\\> \\$/)
+ end
+end
|
Add unit test for new behavior
|
diff --git a/lib/karabiner/item.rb b/lib/karabiner/item.rb
index abc1234..def5678 100644
--- a/lib/karabiner/item.rb
+++ b/lib/karabiner/item.rb
@@ -10,6 +10,8 @@ only
config_not
config_only
+ device_not
+ device_only
].freeze
def initialize(name, options = {})
|
Support device_only and device_not options
|
diff --git a/lib/frenetic/resource.rb b/lib/frenetic/resource.rb
index abc1234..def5678 100644
--- a/lib/frenetic/resource.rb
+++ b/lib/frenetic/resource.rb
@@ -20,9 +20,12 @@ # of the subclass.
class << self
def api_client( client = nil )
- block_given? ? yield : client
+ metaclass.instance_eval do
+ define_method :api do
+ block_given? ? yield : client
+ end
+ end
end
- alias_method :api, :api_client
def schema
if self.respond_to? :api
@@ -34,6 +37,10 @@ "This Resource needs a class accessor defined as " +
"`.api` that references an instance of Frenetic."
end
+ end
+
+ def metaclass
+ metaclass = class << self; self; end
end
end
|
Revert "Removed dynamically generated `api` class method in favor a simple `alias_method` call"
This reverts commit 27579ec85be9c2eeee2b460a873d87d27d49c3ba.
|
diff --git a/lib/orchestrate-rails.rb b/lib/orchestrate-rails.rb
index abc1234..def5678 100644
--- a/lib/orchestrate-rails.rb
+++ b/lib/orchestrate-rails.rb
@@ -15,13 +15,13 @@ ==== {Try out the Tutorial!}[Rails/Tutorial.html]
=end
+ # include the 'hidden gem'
+ require "orchestrate-application"
+
module Rails
require 'active_support/core_ext'
extend ActiveSupport::Concern
-
- # include the 'hidden gem'
- require "orchestrate-application"
require "orchestrate/rails/document"
require "orchestrate/rails/schema"
|
Move Application module out of Rails module.
|
diff --git a/lib/potassium/assets/config/graphql_playground.rb b/lib/potassium/assets/config/graphql_playground.rb
index abc1234..def5678 100644
--- a/lib/potassium/assets/config/graphql_playground.rb
+++ b/lib/potassium/assets/config/graphql_playground.rb
@@ -1,18 +1,20 @@ # config/initializers/graphql_playground.rb
# All config options have a default that should work out of the box
-GraphqlPlayground::Rails.configure do |config|
- # config.headers = {
- # 'X-Auth-Header' => ->(view_context) { "123" }
- # }
- # config.title = "Playground"
- # config.csrf = true
- # config.playground_version = "latest"
- # # Ideally the assets would be added to your projects `vendor/assets` directories
- # config.favicon = "/assets/playground.ico"
- # config.playground_js_url = "/assets/playground.js"
- # config.playground_css_url = "/assets/playground.css"
- # # see: https://github.com/prisma-labs/graphql-playground#settings
- config.settings = {
- "schema.polling.enable": false
- }
+if Rails.env.development?
+ GraphqlPlayground::Rails.configure do |config|
+ # config.headers = {
+ # 'X-Auth-Header' => ->(view_context) { "123" }
+ # }
+ # config.title = "Playground"
+ # config.csrf = true
+ # config.playground_version = "latest"
+ # # Ideally the assets would be added to your projects `vendor/assets` directories
+ # config.favicon = "/assets/playground.ico"
+ # config.playground_js_url = "/assets/playground.js"
+ # config.playground_css_url = "/assets/playground.css"
+ # # see: https://github.com/prisma-labs/graphql-playground#settings
+ config.settings = {
+ "schema.polling.enable": false
+ }
+ end
end
|
fix(gql): Fix production server not running due to config of dev gem
|
diff --git a/lib/will_paginate_semantic_ui/generic_renderer.rb b/lib/will_paginate_semantic_ui/generic_renderer.rb
index abc1234..def5678 100644
--- a/lib/will_paginate_semantic_ui/generic_renderer.rb
+++ b/lib/will_paginate_semantic_ui/generic_renderer.rb
@@ -4,7 +4,7 @@
def to_html
list_items = pagination.map do |item|
- item.class == Fixnum ? page_number(item) : send(item)
+ item.class == Integer ? page_number(item) : send(item)
end.join(@options[:link_separator])
tag("div", list_items, class: ul_class)
|
Switch from deprecated class Fixnum to Integer
|
diff --git a/source/feed.xml.builder b/source/feed.xml.builder
index abc1234..def5678 100644
--- a/source/feed.xml.builder
+++ b/source/feed.xml.builder
@@ -9,7 +9,7 @@ xml.updated(blog.articles.first.date.to_time.iso8601) unless blog.articles.empty?
xml.author { xml.name "Nathan and Katelin Day" }
- blog.articles[0..5].each do |article|
+ blog.articles[0..0].each do |article|
xml.entry do
xml.title article.title
xml.link "rel" => "alternate", "href" => URI.join(site_url, article.url)
|
Change RSS feed to only include 1 item
|
diff --git a/spec/helpers/servers.rb b/spec/helpers/servers.rb
index abc1234..def5678 100644
--- a/spec/helpers/servers.rb
+++ b/spec/helpers/servers.rb
@@ -0,0 +1,9 @@+RSpec.configure do |config|
+
+ ### This helper is required because servers.get(id) does not work
+ def get_server(connection = nil, id)
+ connection ||= compute_connection
+ connection.servers.filters = {'instance-id' => ["#{id}"]}
+ connection.servers.first
+ end
+end
|
Add a helper method to get server with id.
|
diff --git a/spec/parentless_spec.rb b/spec/parentless_spec.rb
index abc1234..def5678 100644
--- a/spec/parentless_spec.rb
+++ b/spec/parentless_spec.rb
@@ -2,4 +2,11 @@ require 'compo'
describe Compo::Parentless do
+ describe '#url' do
+ specify { expect(subject.url).to eq('') }
+ end
+
+ describe '#child_url' do
+ specify { expect(subject.child_url(:id)).to eq('') }
+ end
end
|
Create specs for url and child_url.
|
diff --git a/spec/support/classes.rb b/spec/support/classes.rb
index abc1234..def5678 100644
--- a/spec/support/classes.rb
+++ b/spec/support/classes.rb
@@ -3,6 +3,18 @@
# Test::Alloy::Core
Test::Alloy.const_set("Core", Class.new)
+
+# Test::Alloy::Core::Run
+Test::Alloy::Core.const_set("Run", Class.new)
+Test::Alloy::Core::Run.send :extend, Alloy::Core::Base
+Test::Alloy::Core::Run.send :extend, Alloy::Core::Run
+Test::Alloy::Core::Run.send :extend, Alloy::Core::Size
+
+# Test::Alloy::Core::Schedule
+Test::Alloy::Core.const_set("Schedule", Class.new)
+Test::Alloy::Core::Schedule.send :extend, Alloy::Core::Base
+Test::Alloy::Core::Schedule.send :extend, Alloy::Core::Schedule
+Test::Alloy::Core::Schedule.send :extend, Alloy::Core::Size
# Test::Alloy::Core::Size
Test::Alloy::Core.const_set("Size", Class.new)
|
Test structure for new files.
|
diff --git a/spec/models/recipe_ingredient_spec.rb b/spec/models/recipe_ingredient_spec.rb
index abc1234..def5678 100644
--- a/spec/models/recipe_ingredient_spec.rb
+++ b/spec/models/recipe_ingredient_spec.rb
@@ -9,7 +9,7 @@ end
it "has a recipe" do
- expect(@ingredient1.recipes.first).to eq(@recipe)
+ expect(@ingredient1.recipes.unscoped.last).to eq(@recipe)
end
it "has an ingredient" do
|
Fix up rspec error caused by recipe ingredients default_scope.
|
diff --git a/rom-yesql.gemspec b/rom-yesql.gemspec
index abc1234..def5678 100644
--- a/rom-yesql.gemspec
+++ b/rom-yesql.gemspec
@@ -18,7 +18,7 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]
- spec.add_runtime_dependency 'rom', '~> 0.8', '>= 0.8.0'
+ spec.add_runtime_dependency 'rom', '~> 0.9', '>= 0.9.0'
spec.add_runtime_dependency 'sequel', '~> 4.19.0'
spec.add_development_dependency "bundler"
spec.add_development_dependency "rake", "~> 10.0"
|
Update rom dep in gemspec
|
diff --git a/CDZQRScanningViewController.podspec b/CDZQRScanningViewController.podspec
index abc1234..def5678 100644
--- a/CDZQRScanningViewController.podspec
+++ b/CDZQRScanningViewController.podspec
@@ -1,12 +1,12 @@ Pod::Spec.new do |s|
s.name = 'CDZQRScanningViewController'
- s.version = '1.0.2'
+ s.version = '1.0.3'
s.summary = 'Easy QR code scanning on iOS 7.'
s.homepage = 'https://github.com/cdzombak/CDZQRScanningViewController'
s.license = 'MIT'
s.author = { 'Chris Dzombak' => 'chris@chrisdzombak.net' }
- s.source = { :git => 'https://github.com/cdzombak/CDZQRScanningViewController.git', :tag => 'v1.0.2' }
+ s.source = { :git => 'https://github.com/cdzombak/CDZQRScanningViewController.git', :tag => 'v1.0.3' }
s.platform = :ios, '7.0'
s.source_files = '*.{h,m}'
|
Update pod spec to 1.0.3
|
diff --git a/templates/unicorn.rb b/templates/unicorn.rb
index abc1234..def5678 100644
--- a/templates/unicorn.rb
+++ b/templates/unicorn.rb
@@ -21,7 +21,8 @@ end
if defined? ActiveRecord::Base
- config = Rails.application.config.database_configuration[Rails.env]
+ config = ActiveRecord::Base.configurations[Rails.env] ||
+ Rails.application.config.database_configuration[Rails.env]
config['reaping_frequency'] = (ENV['DB_REAPING_FREQUENCY'] || 10).to_i
config['pool'] = (ENV['DB_POOL'] || 2).to_i
ActiveRecord::Base.establish_connection(config)
|
Update Unicorn template with new config for Heroku
* I recently ran into an issue after deploying to Heroku where
`Rails.application.config.database_configuration[Rails.env]` was
evaluating to `nil` in the staging environment. Updating
config/unicorn.rb to the latest configuration recommended by Heroku
fixed the problem.
* Reference:
https://devcenter.heroku.com/articles/concurrency-and-database-connections#multi-process-servers
|
diff --git a/ancestry.gemspec b/ancestry.gemspec
index abc1234..def5678 100644
--- a/ancestry.gemspec
+++ b/ancestry.gemspec
@@ -3,7 +3,7 @@ s.description = 'Organise ActiveRecord model into a tree structure'
s.summary = 'Ancestry allows the records of a ActiveRecord model to be organised in a tree structure, using a single, intuitively formatted database column. It exposes all the standard tree structure relations (ancestors, parent, root, children, siblings, descendants) and all of them can be fetched in a single sql query. Additional features are named_scopes, integrity checking, integrity restoration, arrangement of (sub)tree into hashes and different strategies for dealing with orphaned records.'
- s.version = '1.2.5'
+ s.version = '1.3'
s.author = 'Stefan Kroes'
s.email = 's.a.kroes@gmail.com'
@@ -22,5 +22,5 @@ 'README.rdoc'
]
- s.add_dependency 'activerecord', '>= 2.2.2'
+ s.add_dependency 'activerecord', '>= 2.3.14'
end
|
Upgrade version number to 1.3
|
diff --git a/ci_environment/phpbuild/attributes/default.rb b/ci_environment/phpbuild/attributes/default.rb
index abc1234..def5678 100644
--- a/ci_environment/phpbuild/attributes/default.rb
+++ b/ci_environment/phpbuild/attributes/default.rb
@@ -11,7 +11,7 @@ },
:custom => {
:php_ini => {
- :memory_limit => "512M",
+ :memory_limit => "1G",
:timezone => "UTC"
}
},
|
Increase memory_limit for PHP from 512M to 1G.
|
diff --git a/Casks/time-out.rb b/Casks/time-out.rb
index abc1234..def5678 100644
--- a/Casks/time-out.rb
+++ b/Casks/time-out.rb
@@ -2,9 +2,12 @@ if MacOS.release <= :snow_leopard
version '1.6.5'
sha256 '2ceec8d8938af0acf32af601337c129087bb3b8c132c1f18e6eb3581788b8a49'
- else
+ elsif MacOS.release <= :mavericks
version '1.7.1'
sha256 '3c9892344c8313b8ccf0a76cceb00834ddbe26e5114bcd674c4fd53aeb44e310'
+ else
+ version '2.0.1'
+ sha256 '2748f22d74cab6c468b2f6bed4d6ba06e702d34cbc2778b687262f27cf9e5350'
end
url "http://www.dejal.com/download/timeout-#{version}.zip"
|
Upgrade Time Out.app to v2.0.1
Time Out 2.0.1 is out for Yosemite or newer.
|
diff --git a/vagrant.rb b/vagrant.rb
index abc1234..def5678 100644
--- a/vagrant.rb
+++ b/vagrant.rb
@@ -3,6 +3,6 @@ config.vm.provision "shell", inline: <<-SHELL
sudo apt-get -qq update
sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y install chef
- sudo gem install chef-vault
+ sudo gem install chef-vault --version '< 4'
SHELL
end
|
Use old enough chef-vault to support Ruby < 2.4
|
diff --git a/spec/features/checklist_spec.rb b/spec/features/checklist_spec.rb
index abc1234..def5678 100644
--- a/spec/features/checklist_spec.rb
+++ b/spec/features/checklist_spec.rb
@@ -0,0 +1,28 @@+require "spec_helper"
+
+RSpec.feature "Checklists", type: :feature do
+ scenario "User answers questions" do
+ given_i_visit_the_checklist_question_and_answer_flow
+ and_i_say_that_i_sell_goods
+ and_i_say_that_i_am_a_eu_citizen
+ then_i_should_see_the_results_page
+ end
+
+ def given_i_visit_the_checklist_question_and_answer_flow
+ visit '/find-brexit-guidance'
+ end
+
+ def and_i_say_that_i_sell_goods
+ check "Sell goods or provide services in the UK"
+ click_on "Next"
+ end
+
+ def and_i_say_that_i_am_a_eu_citizen
+ choose "Yes"
+ click_on "Next"
+ end
+
+ def then_i_should_see_the_results_page
+ expect(page).to have_content "This is the actions page"
+ end
+end
|
Add basic feature test for checklists
This adds a feature test for the current implementation of the
checklists.
This application currently uses Cucumber for feature tests. We've
decided not to use cucumber, and use the preferred rspec-feature style.
It is much more readable and maintainable.
|
diff --git a/src/01-hola-mundo/hola-mundo.rb b/src/01-hola-mundo/hola-mundo.rb
index abc1234..def5678 100644
--- a/src/01-hola-mundo/hola-mundo.rb
+++ b/src/01-hola-mundo/hola-mundo.rb
@@ -1,6 +1,7 @@ # De igual manera que en Python, Ruby no tiene una función predeterminada
# como punto de entrada. Por lo tanto comparamos si la variable mágica
-# __FILE__ es igual al programa en ejecución
+# __FILE__, que contiene el nombre del archivo, es igual al nombre del programa
+# en ejecución
if __FILE__ == $PROGRAM_NAME
puts "Hola mundo"
|
Improve documentation on ruby hello world example
|
diff --git a/cookbooks/about_me/metadata.rb b/cookbooks/about_me/metadata.rb
index abc1234..def5678 100644
--- a/cookbooks/about_me/metadata.rb
+++ b/cookbooks/about_me/metadata.rb
@@ -9,3 +9,10 @@ depends "rightscale"
recipe "about_me::default","Prints my first name and several of my favorite things as output."
+
+# Required #
+attribute "about_me/favorite/hobby",
+ :display_name => "Hobby",
+ :description => "My favorite hobby.",
+ :required => "required",
+ :recipes => ["about_me::default"]
|
Convert a Static Attribute into an Input
|
diff --git a/lib/donottrack.rb b/lib/donottrack.rb
index abc1234..def5678 100644
--- a/lib/donottrack.rb
+++ b/lib/donottrack.rb
@@ -9,8 +9,7 @@
def call(env)
env['HTTP_DNT'] = @dnt_bit ? @dnt_bit : (env['HTTP_DNT'] || env['HTTP_X_DO_NOT_TRACK'] || DEFAULT_DNT_BIT)
- status, headers, response = @app.call(env)
- [status, headers, response]
+ @app.call(env)
end
end
end
|
Save yourself a line of code
|
diff --git a/test/i_repository_test.rb b/test/i_repository_test.rb
index abc1234..def5678 100644
--- a/test/i_repository_test.rb
+++ b/test/i_repository_test.rb
@@ -41,9 +41,10 @@ end
end
- context "Enumerating the infos" do
+ context "Enumerating the infos for Gtk" do
setup do
@gir = IRepository.default
+ @gir.require 'Gtk'
end
should "yield more than one object" do
|
Make sure Gtk gir data is loaded before getting its infos.
|
diff --git a/lib/smugsyncv2.rb b/lib/smugsyncv2.rb
index abc1234..def5678 100644
--- a/lib/smugsyncv2.rb
+++ b/lib/smugsyncv2.rb
@@ -14,7 +14,7 @@ ACCESS_TOKEN_PATH = '/services/oauth/1.0a/getAccessToken'
AUTHORIZE_PATH = '/services/oauth/1.0a/authorize'
- API_ORIGIN = 'http://api.smugmug.com'
+ API_ORIGIN = 'https://api.smugmug.com'
BASE_PATH = 'api/v2'
BASE_URL = File.join(API_ORIGIN, BASE_PATH)
USER_AGENT = "Ruby/#{RUBY_VERSION} (#{RUBY_PLATFORM}; #{RUBY_ENGINE}) Smugsyncv2/#{Smugsyncv2::VERSION} Faraday/#{Faraday::VERSION}".freeze
|
Change api origin to https
|
diff --git a/ve.gemspec b/ve.gemspec
index abc1234..def5678 100644
--- a/ve.gemspec
+++ b/ve.gemspec
@@ -1,3 +1,4 @@+# -*- coding: utf-8 -*-
Gem::Specification.new do |s|
s.name = 've'
s.version = '0.0.3'
|
Add encoding comment for emacs
|
diff --git a/RxAlamofire.podspec b/RxAlamofire.podspec
index abc1234..def5678 100644
--- a/RxAlamofire.podspec
+++ b/RxAlamofire.podspec
@@ -12,7 +12,7 @@ s.ios.deployment_target = "8.0"
s.osx.deployment_target = "10.10"
s.tvos.deployment_target = "9.0"
- s.watchos.deployment_target = "2.0"
+ s.watchos.deployment_target = "3.0"
s.requires_arc = true
|
Watch OS deployment target to meet RxSwift
Signed-off-by: Ryne Cheow <81ee06e819213c74a61ccd141a06617e0bd7ee99@gmail.com>
|
diff --git a/WNGLogger.podspec b/WNGLogger.podspec
index abc1234..def5678 100644
--- a/WNGLogger.podspec
+++ b/WNGLogger.podspec
@@ -1,7 +1,7 @@ Pod::Spec.new do |s|
s.name = "WNGLogger"
- s.version = "0.7.0"
+ s.version = "0.8.0"
s.summary = "WNGLogger is an iOS client library to record and log metric data to Weblog-NG."
s.description = <<-DESC
@@ -17,7 +17,7 @@
s.platform = :ios, '6.0'
- s.source = { :git => "https://github.com/weblogng/weblogng-client-iOS.git", :tag => "0.7.0" }
+ s.source = { :git => "https://github.com/weblogng/weblogng-client-iOS.git", :tag => "0.8.0" }
s.source_files = 'logger/*.{h,m}'
|
Update podspec to release 0.8.0.
|
diff --git a/actionpack/lib/action_dispatch/journey/gtg/simulator.rb b/actionpack/lib/action_dispatch/journey/gtg/simulator.rb
index abc1234..def5678 100644
--- a/actionpack/lib/action_dispatch/journey/gtg/simulator.rb
+++ b/actionpack/lib/action_dispatch/journey/gtg/simulator.rb
@@ -14,6 +14,8 @@ end
class Simulator # :nodoc:
+ INITIAL_STATE = [0].freeze
+
attr_reader :tt
def initialize(transition_table)
@@ -22,18 +24,17 @@
def memos(string)
input = StringScanner.new(string)
- state = [0]
+ state = INITIAL_STATE
+
while sym = input.scan(%r([/.?]|[^/.?]+))
state = tt.move(state, sym)
end
- acceptance_states = state.find_all { |s|
- tt.accepting? s
- }
+ acceptance_states = state.each_with_object([]) do |s, memos|
+ memos.concat(tt.memo(s)) if tt.accepting?(s)
+ end
- return yield if acceptance_states.empty?
-
- acceptance_states.flat_map { |x| tt.memo(x) }.compact
+ acceptance_states.empty? ? yield : acceptance_states
end
end
end
|
Build GTG::Simulator memos in a single loop
|
diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb
index abc1234..def5678 100644
--- a/config/initializers/paperclip.rb
+++ b/config/initializers/paperclip.rb
@@ -28,3 +28,12 @@ else
Rails.logger.warn "The Paperclip::GeometryDetector patch can now be removed."
end
+
+module UpdatedUrlGenerator
+ def escape_url(url)
+ (url.respond_to?(:escape) ? url.escape : URI::Parser.new.escape(url)).
+ gsub(/(\/.+)\?(.+\.)/, '\1%3F\2')
+ end
+end
+
+Paperclip::UrlGenerator.prepend(UpdatedUrlGenerator)
|
Fix deprecation warning in Paperclip
Fixes deprecation warnings in Paperclip::UrlGenerator#escape_url
On a side note: we shouldn't be using Paperclip at all, and should migrate to ActiveStorage.
|
diff --git a/Casks/firefoxdeveloperedition.rb b/Casks/firefoxdeveloperedition.rb
index abc1234..def5678 100644
--- a/Casks/firefoxdeveloperedition.rb
+++ b/Casks/firefoxdeveloperedition.rb
@@ -1,6 +1,6 @@ class Firefoxdeveloperedition < Cask
version '35.0a2'
- sha256 '9d5d504229aa30c96f528713df098cb6436df33fdb329243ccbb0a68b5cba4d5'
+ sha256 'f4fad137c894c0a1824195717a1252757e1fbb65192d4bb8ec8fc77083edb175'
url "https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/firefox-#{version}.en-US.mac.dmg"
homepage 'https://www.mozilla.org/en-US/firefox/developer/'
|
Fix SHA for Firefox Developer Edition
|
diff --git a/db/migrate/20220301101011_remove_scenario_title_and_description.rb b/db/migrate/20220301101011_remove_scenario_title_and_description.rb
index abc1234..def5678 100644
--- a/db/migrate/20220301101011_remove_scenario_title_and_description.rb
+++ b/db/migrate/20220301101011_remove_scenario_title_and_description.rb
@@ -0,0 +1,58 @@+class RemoveScenarioTitleAndDescription < ActiveRecord::Migration[7.0]
+ def up
+ scenarios = Scenario
+ .where.not(title: nil).and(Scenario.where.not(title: 'API'))
+ .or(Scenario.where.not(description: nil))
+
+ total = scenarios.count
+ changed = 0
+
+ scenarios.find_each.with_index do |scenario|
+ if scenario.title.presence && scenario.title != 'API'
+ scenario.metadata['title'] = scenario.title
+ end
+
+ if scenario.description.presence
+ scenario.metadata['description'] = scenario.description
+ end
+
+ scenario.save(validate: false, touch: false)
+ changed += 1
+
+ if index.positive? && ((index + 1) % 1000).zero?
+ say "#{index + 1}/#{total} (#{changed} migrated)"
+ end
+ end
+
+ remove_column(:scenarios, :title)
+ remove_column(:scenarios, :description)
+ end
+
+ def down
+ change_table :scenarios do |t|
+ t.string 'title', after: :author
+ t.text 'description', after: :title
+ end
+
+ Scenario.reset_column_information
+
+ scenarios = Scenario.where.not(metadata: nil)
+ total = scenarios.count
+ changed = 0
+
+ scenarios.find_each do |scenario|
+ if scenario.metadata.key?('title') || scenario.metadata.key('description')
+ scenario.title = scenario.metadata['title'].presence
+ scenario.description = scenario.metadata['description'].presence
+
+ scenario.save(validate: false, touch: false)
+
+ changed += 1
+
+ if index.positive? && ((index + 1) % 1000).zero?
+ say "#{index + 1}/#{total} (#{changed} migrated)"
+ end
+ end
+ end
+ end
+end
|
Move scenario title and description to metadata
|
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
@@ -7,8 +7,6 @@ require 'sample_rack_app/hey'
RSpec.configure do |config|
- Capybara.default_driver = :selenium
-
config.before(:all) do
DeferredGarbageCollection.start
end
|
Set Capybara driver to default.
|
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,6 +4,7 @@ Dir['./spec/support/**/*.rb'].each { |f| require f }
RSpec.configure do |config|
+ config.color = true
config.filter_run :focus => true
config.run_all_when_everything_filtered = true
config.exclusion_filter = {:ruby => lambda { |version|
|
Add color for RSpec output
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index abc1234..def5678 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -0,0 +1,19 @@+# This file was generated by the `rspec --init` command. Conventionally, all
+# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
+# Require this file using `require "spec_helper"` to ensure that it is only
+# loaded once.
+#
+# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
+RSpec.configure do |config|
+ config.treat_symbols_as_metadata_keys_with_true_values = true
+
+ # Run specs in random order to surface order dependencies. If you find an
+ # order dependency and want to debug it, you can fix the order by providing
+ # the seed, which is printed after each run.
+ # --seed 1234
+ config.order = 'random'
+end
+
+RSpec::Matchers.define :contain_duplicates do
+ match { |ary| Set.new(ary).size < ary.size }
+end
|
Add RSpec helper (and contains_duplicates matcher)
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index abc1234..def5678 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -8,6 +8,7 @@ SimpleCov::Formatter::HTMLFormatter,
CodeClimate::TestReporter::Formatter
])
+ add_filter "/spec/"
end
rescue LoadError
end
|
Stop showing coverage for spec files
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index abc1234..def5678 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -5,13 +5,7 @@ $:.unshift(File.dirname(__FILE__) + '/../lib')
require 'cucumber'
require 'cucumber/treetop_parser/feature_en'
-
-# Prevent CLI's exit hook from running
-class Cucumber::CLI
- def self.execute_called?
- true
- end
-end
+Cucumber.load_language('en')
# Open up the tree classes a little for easier inspection.
module Cucumber
|
Enable English by default when running specs
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index abc1234..def5678 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -5,7 +5,6 @@ ENV['AHN_ENV'] = 'production'
RSpec.configure do |config|
- config.color_enabled = true
config.tty = true
config.filter_run :focus => true
|
Fix for RSpec 3 - this option doesn't exist
|
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,3 +1,6 @@+require "codeclimate-test-reporter"
+CodeClimate::TestReporter.start
+
require 'bundler/setup'
Bundler.setup
|
Fix rspec code climate reporter
|
diff --git a/lib/diff.rb b/lib/diff.rb
index abc1234..def5678 100644
--- a/lib/diff.rb
+++ b/lib/diff.rb
@@ -1,15 +1,18 @@+##
+# Generically represent a Diff
+##
class Diff
include Reloadable
attr_accessor :chunks
- def initialize
+ def initialize(chunks)
+ @chunks = chunks
end
def inspect
self.chunks.join("\n")
end
-
class Chunk
attr_accessor :src, :dst, :lines
@@ -30,7 +33,4 @@ end
end
-
-
-
end
|
Add @chunks to Diff object
|
diff --git a/spec/requests/authentication_pages_spec.rb b/spec/requests/authentication_pages_spec.rb
index abc1234..def5678 100644
--- a/spec/requests/authentication_pages_spec.rb
+++ b/spec/requests/authentication_pages_spec.rb
@@ -20,7 +20,13 @@
it { should have_title('Sign in')}
it { should have_selector('div.alert.alert-danger')}
+ describe "after visiting another page" do
+ before { click_link "Home" }
+ it { should_not have_selector('div.alert.alert-danger') }
+ end
end
+
+
describe "with valid information" do
let(:user) { FactoryGirl.create(:user) }
|
Correct spec to detect flash message bug
|
diff --git a/ext/puma_http11/extconf.rb b/ext/puma_http11/extconf.rb
index abc1234..def5678 100644
--- a/ext/puma_http11/extconf.rb
+++ b/ext/puma_http11/extconf.rb
@@ -4,8 +4,8 @@
$defs.push "-Wno-deprecated-declarations"
-if %w'ssl ssleay'.find {|ssl| have_library(ssl, 'SSL_CTX_new')} and
- %w'crypto libeay'.find {|crypto| have_library(ssl, 'BIO_read')}
+if %w'ssl ssleay32'.find {|ssl| have_library(ssl, 'SSL_CTX_new')} and
+ %w'crypto libeay32'.find {|crypto| have_library(ssl, 'BIO_read')}
create_makefile("puma/puma_http11")
end
|
Use the correct Windows names for OpenSSL.
|
diff --git a/aho_corasick_matcher.gemspec b/aho_corasick_matcher.gemspec
index abc1234..def5678 100644
--- a/aho_corasick_matcher.gemspec
+++ b/aho_corasick_matcher.gemspec
@@ -12,7 +12,6 @@ s.homepage = 'https://github.com/altmetric/aho_corasick_matcher'
s.files = %w(README.md LICENSE lib/aho_corasick_matcher.rb)
s.test_files = Dir['spec/**/*.rb']
- s.require_paths = ['lib']
s.add_development_dependency('rspec', '~> 3.2')
end
|
Remove explicit require_paths as it's the default
By default, RubyGems will define `require_paths` to be `lib` [0] so we
can drop this from the gemspec.
[0]: http://guides.rubygems.org/specification-reference/#require_paths=
|
diff --git a/lib/http.rb b/lib/http.rb
index abc1234..def5678 100644
--- a/lib/http.rb
+++ b/lib/http.rb
@@ -15,7 +15,13 @@
def get(uri)
mutex.synchronize{ @@busy = true }
- response = open(uri).read
+ response = nil
+ begin
+ response = open(uri).read
+ rescue => e
+ LinerNotes.logger.error "Couldn't get #{uri}: #{e}"
+ end
+
mutex.synchronize{ @@busy = false }
response
|
Handle errors from remote URLs
|
diff --git a/lib/visa.rb b/lib/visa.rb
index abc1234..def5678 100644
--- a/lib/visa.rb
+++ b/lib/visa.rb
@@ -6,7 +6,7 @@ end
Visa.encryption_cost = 10
-Visa.request_header = 'Authentication'
+Visa.request_header = 'HTTP_AUTHENTICATION'
Visa.timeout = 14.days
require 'visa/engine'
|
Use Rack-ified HTTP header default.
|
diff --git a/Formula/bartycrouch.rb b/Formula/bartycrouch.rb
index abc1234..def5678 100644
--- a/Formula/bartycrouch.rb
+++ b/Formula/bartycrouch.rb
@@ -1,7 +1,7 @@ class Bartycrouch < Formula
desc "Incrementally update/translate your Strings files"
homepage "https://github.com/Flinesoft/BartyCrouch"
- url "https://github.com/Flinesoft/BartyCrouch.git", :tag => "4.1.1", :revision => "201b0b02c196dcda14c806a539ab963284abeeaf"
+ url "https://github.com/Flinesoft/BartyCrouch.git", :tag => "4.2.0", :revision => "49b4cf27d5b521abf615d4ccb7754d642205f802"
head "https://github.com/Flinesoft/BartyCrouch.git"
depends_on :xcode => ["11.4", :build]
|
Update Formula to version 4.2.0
|
diff --git a/recipes/config.rb b/recipes/config.rb
index abc1234..def5678 100644
--- a/recipes/config.rb
+++ b/recipes/config.rb
@@ -36,17 +36,18 @@ action :create
end
-template "#{home}/.ssh/authorized_keys" do
+file "#{home}/.ssh/authorized_keys" do
content "#{node["fossology"]["ssh_public_key"]}\n"
mode 0644
end
-template "#{home}/.ssh/id_rsa.pub" do
+file "#{home}/.ssh/id_rsa.pub" do
content "#{node["fossology"]["ssh_public_key"]}\n"
mode 0644
end
-template "#{home}/.ssh/id_rsa" do
+file "#{home}/.ssh/id_rsa" do
content "#{node["fossology"]["ssh_private_key"]}\n"
mode 0400
+ backup false
end
|
Fix incorrect use of template resource
|
diff --git a/ruby-wisp.gemspec b/ruby-wisp.gemspec
index abc1234..def5678 100644
--- a/ruby-wisp.gemspec
+++ b/ruby-wisp.gemspec
@@ -7,7 +7,7 @@ s.version = Wisp::VERSION
s.authors = ['Yuri Artemev']
s.email = ['i@artemeff.com']
- s.description = %q{Ruby Wisp is a bridge to the JS Wisp compiler}
+ s.description = %q{Ruby Wisp is a wrapper to the JS Wisp compiler}
s.summary = %q{Ruby Wisp compiler}
s.homepage = 'https://github.com/artemeff/ruby-wisp'
s.license = 'MIT'
@@ -17,5 +17,6 @@ s.add_dependency 'execjs'
s.add_dependency 'ruby-wisp-source'
- s.add_development_dependency 'railties', '>= 4.0.0.beta', '< 5.0'
+ s.add_development_dependency 'rails', '>= 4.0.0.beta', '< 5.0'
+ s.add_development_dependency 'rake'
end
|
Add rake to gemspec, change railties to rails
|
diff --git a/RNCryptor.podspec b/RNCryptor.podspec
index abc1234..def5678 100644
--- a/RNCryptor.podspec
+++ b/RNCryptor.podspec
@@ -5,7 +5,7 @@ s.authors = {'Rob Napier' => 'robnapier@gmail.com'}
s.social_media_url = 'https://twitter.com/cocoaphony'
s.license = 'MIT'
- s.source = { :git => 'https://github.com/rnapier/RNCryptor.git', :tag => "RNCryptor-#{s.version.to_s}" }
+ s.source = { :git => 'https://github.com/rnapier/RNCryptor.git', :tag => "#{s.version.to_s}" }
s.description = 'Implements a secure encryption format based on AES, PBKDF2, and HMAC.'
s.homepage = 'https://github.com/rnapier/RNCryptor'
s.source_files = 'Sources/RNCryptor/RNCryptor.swift', 'Sources/Cryptor/include/RNCryptor.h'
|
Update podspec to use semver tags
|
diff --git a/SUPSemVer.podspec b/SUPSemVer.podspec
index abc1234..def5678 100644
--- a/SUPSemVer.podspec
+++ b/SUPSemVer.podspec
@@ -1,6 +1,6 @@ Pod::Spec.new do |s|
s.name = "SUPSemVer"
- s.version = "1.0.2"
+ s.version = "1.0.3"
s.summary = "Easy-to-use Semantic Version comparison framework"
s.description = <<-DESC
# SUPSemVer
|
[1.0.3] Fix bug with missing components in string
|
diff --git a/metadata.rb b/metadata.rb
index abc1234..def5678 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -1,10 +1,10 @@-name "collectd"
-maintainer "Noan Kantrowitz"
-maintainer_email "nkantrowitz@crypticstudios.com"
-license "Apache 2.0"
-description "Install and configure the collectd monitoring daemon and plugins"
+name 'collectd'
+maintainer 'Noan Kantrowitz'
+maintainer_email 'nkantrowitz@crypticstudios.com'
+license 'Apache 2.0'
+description 'Install and configure the collectd monitoring daemon and plugins'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version "1.1.5"
+version '1.1.5'
-supports "ubuntu"
-depends "build-essential"
+supports 'ubuntu'
+depends 'build-essential'
|
Replace " with ' quotes
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.