diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/wordpress_client.gemspec b/wordpress_client.gemspec
index abc1234..def5678 100644
--- a/wordpress_client.gemspec
+++ b/wordpress_client.gemspec
@@ -23,5 +23,5 @@ spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "rspec", "~> 3.3"
spec.add_development_dependency "webmock", "~> 2.0"
- spec.add_development_dependency "yard", "~> 0.8.7"
+ spec.add_development_dependency "yard", "~> 0.9"
end
| Upgrade Yard to get rid of CVE-2017-17042
[CVE-2017-17042]: https://nvd.nist.gov/vuln/detail/CVE-2017-17042
|
diff --git a/api/app/jobs/send_event_notification_emails_job.rb b/api/app/jobs/send_event_notification_emails_job.rb
index abc1234..def5678 100644
--- a/api/app/jobs/send_event_notification_emails_job.rb
+++ b/api/app/jobs/send_event_notification_emails_job.rb
@@ -13,7 +13,7 @@
EventEmailSubscriber
.subscribed
- .near([e.latitude, e.longitude], 0.5)
+ .near([e.latitude, e.longitude], 75)
.find_each do |subscriber|
EventEmailSubscriberMailer.new_event(subscriber, e).deliver_later
end
| Increase radius to event email notifications
|
diff --git a/lib/mnemosyne/probes/acfs/middleware.rb b/lib/mnemosyne/probes/acfs/middleware.rb
index abc1234..def5678 100644
--- a/lib/mnemosyne/probes/acfs/middleware.rb
+++ b/lib/mnemosyne/probes/acfs/middleware.rb
@@ -4,10 +4,8 @@ module Probes
module Acfs
module Middleware
- CATEGORY = 'acfs.run'.freeze
-
class Probe < ::Mnemosyne::Probe
- subscribe 'acfs.runner.sync_run'
+ subscribe 'acfs.run'
def setup
require 'mnemosyne/middleware/acfs'
@@ -19,11 +17,17 @@ start = ::Mnemosyne::Clock.to_tick(start)
finish = ::Mnemosyne::Clock.to_tick(finish)
+ callers = caller
+
+ while !(callers[0].include? 'lib/acfs/global.rb:')
+ callers.shift
+ end
+
meta = {
- caller: payload[:controller],
+ backtrace: callers[1..-1]
}
- span = ::Mnemosyne::Span.new 'acfs.runner.sync_run',
+ span = ::Mnemosyne::Span.new 'acfs.run',
start: start, finish: finish, meta: meta
trace << span
| Add acfs.run probe including backtrace in meta
|
diff --git a/lib/tasks/deployment/20191002102647_update_headteacher_role.rake b/lib/tasks/deployment/20191002102647_update_headteacher_role.rake
index abc1234..def5678 100644
--- a/lib/tasks/deployment/20191002102647_update_headteacher_role.rake
+++ b/lib/tasks/deployment/20191002102647_update_headteacher_role.rake
@@ -0,0 +1,13 @@+namespace :after_party do
+ desc 'Deployment task: update_headteacher_role'
+ task update_headteacher_role: :environment do
+ puts "Running deploy task 'update_headteacher_role'"
+
+ StaffRole.where(title: 'Headteacher').update_all(title: 'Headteacher or Deputy Head')
+
+ # Update task as completed. If you remove the line below, the task will
+ # run with every deploy (or every time you call after_party:run).
+ AfterParty::TaskRecord
+ .create version: AfterParty::TaskRecorder.new(__FILE__).timestamp
+ end
+end
| Update headteacher staff role to add deputy
|
diff --git a/app/controllers/api/v1/organizations_controller.rb b/app/controllers/api/v1/organizations_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/api/v1/organizations_controller.rb
+++ b/app/controllers/api/v1/organizations_controller.rb
@@ -9,6 +9,8 @@
if params[:latitude].present? and params[:longitude].present? and params[:radius]
@organizations = @organizations.near([params[:latitude], params[:longitude]], params[:radius])
+ elsif params[:latitude].present? or params[:longitude].present? or params[:radius]
+ render :status => 500, :text => "Invalid API Call"
end
end
| Return a 500 call if insufficient parameters are provided
|
diff --git a/app/controllers/document_collections_controller.rb b/app/controllers/document_collections_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/document_collections_controller.rb
+++ b/app/controllers/document_collections_controller.rb
@@ -2,6 +2,7 @@ def show
expire_on_next_scheduled_publication(@document.editions)
@document_collection = @document
+ set_meta_description(@document_collection.summary)
@groups = @document_collection.groups.visible.map do |group|
editions = EditionCollectionPresenter.new(group.published_editions, view_context)
[group, editions]
| Set meta description on doc collection show
|
diff --git a/vagrant-hivemind.gemspec b/vagrant-hivemind.gemspec
index abc1234..def5678 100644
--- a/vagrant-hivemind.gemspec
+++ b/vagrant-hivemind.gemspec
@@ -14,14 +14,6 @@ spec.homepage = "https://github.com/napramirez/vagrant-hivemind"
spec.license = "MIT"
- # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
- # delete this section to allow pushing this gem to any host.
- if spec.respond_to?(:metadata)
- spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
- else
- raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
- end
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
| Make this available in RubyGems.org
|
diff --git a/spec/buckaroo_client/configuration_spec.rb b/spec/buckaroo_client/configuration_spec.rb
index abc1234..def5678 100644
--- a/spec/buckaroo_client/configuration_spec.rb
+++ b/spec/buckaroo_client/configuration_spec.rb
@@ -5,6 +5,20 @@ it "defines `#{name}' getter and setter" do
subject.public_send("#{name}=", 'bla')
expect(subject.public_send(name)).to eq 'bla'
+ end
+ end
+
+ describe '#initialize' do
+ it 'defaults to ENV values if no arguments given' do
+ stub_const('ENV', {
+ 'BUCKAROO_CLIENT_WEBSITEKEY' => 'a',
+ 'BUCKAROO_CLIENT_SECRET' => 'b',
+ 'BUCKAROO_CLIENT_ENVIRONMENT' => 'c'
+ })
+ c = described_class.new
+ expect(c.websitekey).to eq 'a'
+ expect(c.secret).to eq 'b'
+ expect(c.environment).to eq 'c'
end
end
| Make sure Configuration uses ENV variables on initialize
|
diff --git a/spec/javascripts/javascript_spec_server.rb b/spec/javascripts/javascript_spec_server.rb
index abc1234..def5678 100644
--- a/spec/javascripts/javascript_spec_server.rb
+++ b/spec/javascripts/javascript_spec_server.rb
@@ -1,8 +1,11 @@+require 'rack'
+
class JavascriptSpecServer < Struct.new(:port, :root)
+
def boot
thread = Thread.new do
app = Rack::File.new(root)
- Rack::Server.start(:app => app, :Port => port)
+ Rack::Server.start(:app => app, :Port => port, :AccessLog => [])
end
thread.join(0.1) until ready?
end
| Kill Rack access logs in test
Lots of noise: gone.
|
diff --git a/lib/datastax_rails/types/dynamic_set.rb b/lib/datastax_rails/types/dynamic_set.rb
index abc1234..def5678 100644
--- a/lib/datastax_rails/types/dynamic_set.rb
+++ b/lib/datastax_rails/types/dynamic_set.rb
@@ -6,7 +6,7 @@ class DynamicSet < Set
include DirtyCollection
- delegate :join, to: :to_a
+ delegate :join, :[], to: :to_a
alias_method :to_ary, :to_a
end
| Allow indexing into a Set in order to treat it more like an array
|
diff --git a/test/integration/default/default_spec.rb b/test/integration/default/default_spec.rb
index abc1234..def5678 100644
--- a/test/integration/default/default_spec.rb
+++ b/test/integration/default/default_spec.rb
@@ -22,3 +22,11 @@ describe ssh_config do
its('UseRoaming') { should eq use_roaming_value }
end
+
+# Attempt to ssh to localhost
+describe command('ssh -oStrictHostKeyChecking=no -v localhost') do
+ # No way of actually sshing in without a keypair or password
+ # but being prompted for an authentication method should be sufficient to
+ # test that SSH is working as expected, for the most part
+ its('stderr') { should match 'Next authentication method' }
+end
| Test that ssh to localhost works.
This test fails with the Dokken .kitchen.yml, used by Travis CI, when run against v2.4.0 of the cookbook.
It passes against the latest version on my branch (6276ab70b).
It's not a particularly nice test, so I've not (yet?) included it in my PR
https://github.com/chef-cookbooks/openssh/pull/103
Signed-off-by: Lucy Davies <474e97d07b83ea9b34d1ec399840354182f3b6c1@lucymhdavies.com>
|
diff --git a/lib/walk.rb b/lib/walk.rb
index abc1234..def5678 100644
--- a/lib/walk.rb
+++ b/lib/walk.rb
@@ -1,6 +1,9 @@ require "walk/version"
module Walk
+
+ CURRENT_DIR = '.'
+ PARENT_DIR = '..'
def self.walk(root, topdown=true, followlinks=false)
Enumerator.new do |enum|
@@ -16,7 +19,7 @@
Dir.entries(root).each do |entry|
- next if entry=='.' or entry=='..'
+ next if entry==CURRENT_DIR or entry==PARENT_DIR
fullpath = File.join(root, entry)
if File.file?(fullpath)
| Use constant for '.' and '..' dirs
|
diff --git a/gem-search.gemspec b/gem-search.gemspec
index abc1234..def5678 100644
--- a/gem-search.gemspec
+++ b/gem-search.gemspec
@@ -14,11 +14,11 @@ gem.require_paths = ["lib"]
gem.version = Gem::Search::VERSION
- gem.add_dependency 'slop'
- gem.add_dependency 'json'
+ gem.add_dependency 'slop', '~>3.5.0'
+ gem.add_dependency 'json', '~>1.8.1'
- gem.add_development_dependency 'webmock'
- gem.add_development_dependency 'rake', '~> 0.9.2.2'
+ gem.add_development_dependency 'webmock', '~>1.17.4'
+ gem.add_development_dependency 'rake', '~> 0.9.2.2'
gem.add_development_dependency 'rspec', '~> 2.14.1'
gem.add_development_dependency 'simplecov', '~> 0.8.2'
| Update middlewares: slop, json, webmock
|
diff --git a/lib/manageiq/providers/lenovo/engine.rb b/lib/manageiq/providers/lenovo/engine.rb
index abc1234..def5678 100644
--- a/lib/manageiq/providers/lenovo/engine.rb
+++ b/lib/manageiq/providers/lenovo/engine.rb
@@ -3,6 +3,10 @@ module Lenovo
class Engine < ::Rails::Engine
isolate_namespace ManageIQ::Providers::Lenovo
+
+ def self.vmdb_plugin?
+ true
+ end
def self.plugin_name
_('Lenovo Provider')
| Change plugin common methods to class methods
|
diff --git a/lib/rubocop/cop/naming/variable_name.rb b/lib/rubocop/cop/naming/variable_name.rb
index abc1234..def5678 100644
--- a/lib/rubocop/cop/naming/variable_name.rb
+++ b/lib/rubocop/cop/naming/variable_name.rb
@@ -5,15 +5,36 @@ module Naming
# This cop makes sure that all variables use the configured style,
# snake_case or camelCase, for their names.
+ #
+ # @example
+ #
+ # # EnforcedStyle: snake_case
+ #
+ # # bad
+ # fooBar = 1
+ #
+ # # good
+ # foo_bar = 1
+ #
+ # @example
+ #
+ # # EnforcedStyle: camelCase
+ #
+ # # bad
+ # foo_bar = 1
+ #
+ # # good
+ # fooBar = 1
class VariableName < Cop
include ConfigurableNaming
+
+ MSG = 'Use %<style>s for variable names.'.freeze
def on_lvasgn(node)
name, = *node
return unless name
check_name(node, name, node.loc.name)
end
-
alias on_ivasgn on_lvasgn
alias on_cvasgn on_lvasgn
alias on_arg on_lvasgn
@@ -27,7 +48,7 @@ private
def message(style)
- format('Use %s for variable names.', style)
+ format(MSG, style: style)
end
end
end
| Fix up Naming/VariabeName cop and its documentation
|
diff --git a/spec/mailers/notifier_spec.rb b/spec/mailers/notifier_spec.rb
index abc1234..def5678 100644
--- a/spec/mailers/notifier_spec.rb
+++ b/spec/mailers/notifier_spec.rb
@@ -1,9 +1,10 @@ require 'rails_helper'
resource 'NotifierMailer' do
+ let(:service_1) { create :service }
example 'Returning a nested data structure for registered service' do
- email = NotifierMailer.send_mail('www.example.com', '404')
+ email = NotifierMailer.send_mail(service_1.url, '404')
expect(email.body).to include 'status code 404.'
- expect(email.body).to include 'service www.example.com'
+ expect(email.body).to include "service #{service_1.url}"
end
end
| Create service for notifier mailer test
|
diff --git a/spec/support/simpleservice.rb b/spec/support/simpleservice.rb
index abc1234..def5678 100644
--- a/spec/support/simpleservice.rb
+++ b/spec/support/simpleservice.rb
@@ -0,0 +1,15 @@+require './spec/support/simpleservice.pb'
+
+module Elementary
+ module Rspec
+ class Simple
+ def echo
+ puts "ECHOING #{request.inspect}"
+ sleep 3
+
+ respond_with(String.new(:data => request.data))
+ end
+ end
+ end
+end
+
| Add an actual service definition that does "work" for the tests
|
diff --git a/page_title_helper.gemspec b/page_title_helper.gemspec
index abc1234..def5678 100644
--- a/page_title_helper.gemspec
+++ b/page_title_helper.gemspec
@@ -1,20 +1,20 @@ # -*- encoding: utf-8 -*-
-$:.push File.expand_path("../lib", __FILE__)
-require "page_title_helper/version"
+$:.push File.expand_path('../lib', __FILE__)
+require 'page_title_helper/version'
Gem::Specification.new do |s|
- s.name = "page_title_helper"
+ s.name = 'page_title_helper'
s.version = PageTitleHelper::VERSION
s.platform = Gem::Platform::RUBY
- s.summary = "Simple, internationalized and DRY page titles and headings for Rails."
- s.description = "Simple, internationalized and DRY page titles and headings for rails."
+ s.summary = 'Simple, internationalized and DRY page titles and headings for Rails.'
+ s.description = 'Simple, internationalized and DRY page titles and headings for Rails.'
- s.required_ruby_version = ">= 1.9.3"
- s.required_rubygems_version = ">= 1.3.6"
+ s.required_ruby_version = '>= 1.9.3'
+ s.required_rubygems_version = '>= 1.3.6'
- s.authors = ["Lukas Westermann"]
- s.email = ["lukas.westermann@gmail.com"]
- s.homepage = "http://github.com/lwe/page_title_helper"
+ s.authors = ['Lukas Westermann']
+ s.email = ['lukas.westermann@gmail.com']
+ s.homepage = 'http://github.com/lwe/page_title_helper'
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
| [CLEANUP] Use single quotes for strings in the gemspec file
Closes #12
|
diff --git a/guard-minitest.gemspec b/guard-minitest.gemspec
index abc1234..def5678 100644
--- a/guard-minitest.gemspec
+++ b/guard-minitest.gemspec
@@ -1,3 +1,5 @@+# encoding: utf-8
+
$:.push File.expand_path('../lib', __FILE__)
require 'guard/minitest/version'
| Add a `encoding` declaration to the gemspec |
diff --git a/devise_castle.gemspec b/devise_castle.gemspec
index abc1234..def5678 100644
--- a/devise_castle.gemspec
+++ b/devise_castle.gemspec
@@ -10,14 +10,14 @@ s.homepage = 'https://github.com/castle/devise_castle'
s.summary = 'Devise extension for Castle'
s.description = 'Devise extension for Castle. Secure your authentication stack with real-time monitoring, instantly notifying you and your users on potential account hijacks.'
- s.authors = ['Johan Brissmyr']
+ s.authors = ['Johan Brissmyr', 'Sebastian Wallin']
s.license = 'MIT'
s.require_path = "lib"
s.files = Dir.glob("{app,lib,config}/**/*")
s.add_dependency('devise', '~> 3.0')
- s.add_dependency('castle-rb', '~> 1.2.5')
+ s.add_dependency('castle-rb', '~> 1.2.13')
s.add_development_dependency('bundler', '~> 1.1')
| Update castle-rb dependency to 1.2.13
|
diff --git a/htmlbeautifier.gemspec b/htmlbeautifier.gemspec
index abc1234..def5678 100644
--- a/htmlbeautifier.gemspec
+++ b/htmlbeautifier.gemspec
@@ -9,8 +9,6 @@ s.email = "pbattley@gmail.com"
s.homepage = "http://github.com/threedaymonk/htmlbeautifier"
s.license = "MIT"
-
- s.has_rdoc = true
s.files = %w(Rakefile README.md) + Dir.glob("{bin,test,lib}/**/*")
s.executables = Dir["bin/**"].map { |f| File.basename(f) }
| Remove deprecated has_rdoc in gemspec
|
diff --git a/db/seeds.rb b/db/seeds.rb
index abc1234..def5678 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -6,4 +6,4 @@ # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# Mayor.create(name: 'Emanuel', city: cities.first)
-Movietheater.create(name: "Chicago Movie Theater")+# Movietheater.create(name: "Chicago Movie Theater") | Add a movietheater via seed data.
|
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,6 @@ def find_factories_by_class(klass)
FactoryBot.factories.select do |factory|
- factory.instance_variable_get(:@class_name) == klass || factory.instance_variable_get(:@name) == klass.model_name.singular.to_sym
+ factory.instance_variable_get(:@class_name).to_s == klass.to_s || factory.instance_variable_get(:@name) == klass.model_name.singular.to_sym
end
end
| Adjust find_factories_by_class to work with Strings instead of Classes
|
diff --git a/db/seeds.rb b/db/seeds.rb
index abc1234..def5678 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -4,7 +4,7 @@ DO
$do$
BEGIN
- IF NOT EXISTS ( SELECT FROM pg_catalog.pg_roles WHERE rolname = 'read_only') THEN
+ IF NOT EXISTS ( SELECT * FROM pg_catalog.pg_roles WHERE rolname = 'read_only') THEN
CREATE ROLE read_only;
END IF;
END
| Fix bug in SQL command
|
diff --git a/db/seeds.rb b/db/seeds.rb
index abc1234..def5678 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -2,7 +2,7 @@
page_num = 1
-while page_num < 501 # First 500 Pages
+while page_num < 251 # First 500 Pages
item_num = 0
page = Nokogiri::HTML(open("http://top.cafe.daum.net/_c21_/category_list?type=sub&page=#{page_num}&subcateid=85&cateid=5"))
while item_num < 15
| Reduce the number of pages to scrape
|
diff --git a/db/seeds.rb b/db/seeds.rb
index abc1234..def5678 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -3,13 +3,27 @@ ENV['MQTT_HOST'] = "blooper.io"
ENV['OS_UPDATE_SERVER'] = "http://blah.com"
ENV['FW_UPDATE_SERVER'] = "http://test.com"
- User.where(email: "admin@admin.com").destroy_all
+ User.destroy_all
+ Device.destroy_all
Users::Create.run!(name: "Administrator",
- email: "admin@admin.com",
- password: "password123",
- password_confirmation: "password123")
+ email: "admin@admin.com",
+ password: "password123",
+ password_confirmation: "password123")
User.last.update_attributes(verified_at: Time.now)
Log.transaction do
FactoryGirl.create_list(:log, 35, device: User.last.device)
end
+
+ 10.times do
+ Plant.create(
+ device: User.last.device,
+ x: rand(1...100),
+ y: rand(1...100),
+ name: Haikunator.haikunate,
+ img_url: "http://placehold.it/200x150",
+ icon_url: "/icons/Natural Food-96.png",
+ openfarm_slug: "tomato",
+ planted_at: Time.now.utc)
+ end
+
end
| Add plant records to seed.rb, no pun intended
|
diff --git a/db/seeds.rb b/db/seeds.rb
index abc1234..def5678 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -1,7 +1,20 @@-# 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).
-#
-# Examples:
-#
-# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
-# Mayor.create(name: 'Emanuel', city: cities.first)
+Resource.destroy_all
+
+require 'json'
+
+DATA_DIR = File.expand_path('../init-data', __FILE__)
+
+manifests_file = File.join(DATA_DIR, 'manifests.json')
+readmes_dir = File.join(DATA_DIR, 'readmes')
+
+manifests = JSON.parse( File.read( manifests_file ) )
+
+resources = manifests.map do |manifest|
+ readme_file = File.join(readmes_dir, manifest['name'] + '.md')
+
+ readme_text = File.exists?(readme_file) ? File.read(readme_file) : nil
+
+ { manifest: manifest, readme: readme_text }
+end
+
+Resource.create(resources)
| Write seed script using source data
|
diff --git a/haml-rails.gemspec b/haml-rails.gemspec
index abc1234..def5678 100644
--- a/haml-rails.gemspec
+++ b/haml-rails.gemspec
@@ -14,11 +14,11 @@ s.rubyforge_project = "haml-rails"
s.required_rubygems_version = ">= 1.3.6"
- s.add_dependency "rails", "~>3.0.0.rc"
+ s.add_dependency "rails", "~>3.0.0"
s.add_dependency "haml", "~>3.0"
- s.add_development_dependency "bundler", ">= 1.0.0.rc.6"
+ s.add_development_dependency "bundler", ">= 1.0.0"
s.files = `git ls-files`.split("\n")
s.executables = `git ls-files`.split("\n").select{|f| f =~ /^bin/}
s.require_path = 'lib'
-end+end
| Use at least Rails 3.0 final
|
diff --git a/Casks/unifi-controller-beta.rb b/Casks/unifi-controller-beta.rb
index abc1234..def5678 100644
--- a/Casks/unifi-controller-beta.rb
+++ b/Casks/unifi-controller-beta.rb
@@ -0,0 +1,13 @@+cask :v1 => 'unifi-controller-beta' do
+ version '4.6.4-ade9eed'
+ sha256 'e2cc1bbef8419320a5a8a52a3fb3cff341746cb78e65ebe92aa03ea03a0fc120'
+
+ url "http://dl.ubnt.com/unifi/#{version}/UniFi.pkg"
+ name 'Unifi Controller Beta'
+ homepage 'https://community.ubnt.com/t5/UniFi-Wireless-Beta/bd-p/UniFi_Beta'
+ license :commercial
+
+ pkg 'Unifi.pkg'
+
+ uninstall :pkgutil => 'com.ubnt.UniFi'
+end
| Add UniFi Controller Beta (version 4.6.4)
This adds the UniFi Controller beta software to Cask Versions.
|
diff --git a/lib/stitch/compilers/coffeescript.rb b/lib/stitch/compilers/coffeescript.rb
index abc1234..def5678 100644
--- a/lib/stitch/compilers/coffeescript.rb
+++ b/lib/stitch/compilers/coffeescript.rb
@@ -12,6 +12,8 @@ def compile(path)
source = File.read(path)
CoffeeScript.compile(source)
+ rescue => e
+ raise RuntimeError, "#{path}: #{e}", ''
end
end
end | Raise custom error on CoffeeScript compile fail.
|
diff --git a/lib/tasks/medical_safety_alerts.rake b/lib/tasks/medical_safety_alerts.rake
index abc1234..def5678 100644
--- a/lib/tasks/medical_safety_alerts.rake
+++ b/lib/tasks/medical_safety_alerts.rake
@@ -0,0 +1,12 @@+namespace :medical_safety_alerts do
+ desc "Change type of medical alerts"
+ task :change_alert_type, %i[old new] => :environment do |_, args|
+ MedicalSafetyAlert.find_each do |doc|
+ next unless doc.alert_type == args[:old]
+
+ RepublishService.new.call(doc.content_id, doc.locale) do |payload|
+ payload[:details][:metadata][:alert_type] = args[:new]
+ end
+ end
+ end
+end
| Add a rake task to move medical alerts from one category to another
This could probably be made more general and thus more useful in future (it's based on the country-rename tasks) but that seems like overkill for the current situation
|
diff --git a/lib/tengai/vector_ephemeris_table.rb b/lib/tengai/vector_ephemeris_table.rb
index abc1234..def5678 100644
--- a/lib/tengai/vector_ephemeris_table.rb
+++ b/lib/tengai/vector_ephemeris_table.rb
@@ -18,7 +18,7 @@
class Row
include Virtus
- attribute :jdct, Date
+ attribute :jdct, DateTime
attribute :x, Float
attribute :y, Float
attribute :z, Float
| Change jdct attribute to DateTime type on EphemerisTable::Row
|
diff --git a/Formula/php53-pspell.rb b/Formula/php53-pspell.rb
index abc1234..def5678 100644
--- a/Formula/php53-pspell.rb
+++ b/Formula/php53-pspell.rb
@@ -10,7 +10,7 @@ depends_on 'aspell'
def install
- Dir.chdir "ext/pcntl"
+ Dir.chdir "ext/pspell"
# See https://github.com/mxcl/homebrew/pull/5947
ENV.universal_binary
| Fix pspell module for PHP 5.3 (wrong build path)
|
diff --git a/Casks/disk-inventory-x.rb b/Casks/disk-inventory-x.rb
index abc1234..def5678 100644
--- a/Casks/disk-inventory-x.rb
+++ b/Casks/disk-inventory-x.rb
@@ -1,5 +1,6 @@ class DiskInventoryX < Cask
- url 'http://www.alice-dsl.net/tjark.derlien/DIX1.0Universal.dmg'
+ url 'http://www.alice-dsl.net/tjark.derlien/DIX1.0Universal.dmg',
+ :user_agent => :fake
homepage 'http://www.derlien.com/'
version '1.0'
sha256 'f61c070a1ec8f29ee78b8a7c84dd4124553098acc87134e2ef05dbaf2a442636'
| Fix Disk Inventory X 403 error
|
diff --git a/metadata.rb b/metadata.rb
index abc1234..def5678 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -15,7 +15,7 @@ depends 'apache2', '>= 2.0'
depends 'zap', '>= 0.6.0'
-%w( build-essential php nginx nginx_simplecgi yum-epel nrpe ).each do |cb|
+%w( build-essential php chef_nginx nginx_simplecgi yum-epel nrpe ).each do |cb|
depends cb
end
| Change nginx deps to chef_nginx
The nginx cookbook is deprecated for the chef_nginx. So this cookbooks should use the supported chef_nginx dependancy.
|
diff --git a/metadata.rb b/metadata.rb
index abc1234..def5678 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -6,7 +6,7 @@ long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "0.2.12"
-recipe "opscode-bifrost", "Installs Erlang and rebar (for now)"
+recipe "api_server", "Installs the Bifrost service"
recipe "database", "Creates the bifrost database, schema, and users"
depends "opscode-postgresql", "~> 0.2.6"
@@ -27,6 +27,5 @@ depends "git"
depends "python"
depends "deployment-notifications", "~> 0.1.0"
-depends "opscode_extensions", "~> 1.0.2"
-depends "build-essential" # for s3 artifacts
+depends "opscode_extensions", "~> 1.0.2" # for s3 artifacts
depends "logrotate"
| Add info for api_server recipe and other cleanup.
- Remove reference to deprecated default recipe.
- Remove unnecessary build-essentials dependency.
|
diff --git a/mlb.gemspec b/mlb.gemspec
index abc1234..def5678 100644
--- a/mlb.gemspec
+++ b/mlb.gemspec
@@ -5,8 +5,8 @@ gem.add_dependency 'faraday', '~> 0.7'
gem.add_dependency 'faraday_middleware', '~> 0.8'
gem.add_dependency 'json', '~> 1.6'
+ gem.add_development_dependency 'maruku'
gem.add_development_dependency 'rake'
- gem.add_development_dependency 'rdiscount'
gem.add_development_dependency 'rspec'
gem.add_development_dependency 'simplecov'
gem.add_development_dependency 'webmock'
| Use maruku instead of rdiscount for compatibility with JRuby and Rubinius in 1.9 mode
|
diff --git a/lib/path.rb b/lib/path.rb
index abc1234..def5678 100644
--- a/lib/path.rb
+++ b/lib/path.rb
@@ -1,22 +1,10 @@ module Nesta
class Path
- @@local = "local"
- @@themes = "themes"
-
- def self.local
- @@local
- end
-
- def self.local=(path)
- @@local = path
- end
+ @local = "local"
+ @themes = "themes"
- def self.themes
- @@themes
- end
-
- def self.themes=(path)
- @@themes = path
+ class << self
+ attr_accessor :local, :themes
end
end
end
| Use attr_accessor to create Path.local and Path.themes.
|
diff --git a/lib/pdoc.rb b/lib/pdoc.rb
index abc1234..def5678 100644
--- a/lib/pdoc.rb
+++ b/lib/pdoc.rb
@@ -17,6 +17,10 @@ require 'pdoc/parser'
module PDoc
+ def self.run(options = {})
+ Runner.new(options.dup).run
+ end
+
def self.copy_templates(template_type, destination)
dir = File.expand_path(destination)
raise "File already exists: #{destination}" if File.exist?(dir)
| Add a PDoc.run class method for convenience. |
diff --git a/lib/poms.rb b/lib/poms.rb
index abc1234..def5678 100644
--- a/lib/poms.rb
+++ b/lib/poms.rb
@@ -3,6 +3,7 @@ require 'poms/errors/authentication_error'
require 'json'
+# Main interface for the POMS gem
module Poms
extend self
@@ -12,10 +13,17 @@ @origin = origin
end
- def media(mid)
+ def fetch(arg)
assert_credentials
- request = Poms::Media.from_mid(mid, @key, @secret, @origin)
- JSON.parse(request.call)
+ if arg.is_a?(Array)
+ request = Poms::Media.multiple(arg, @key, @secret, @origin)
+ elsif arg.is_a?(String)
+ request = Poms::Media.from_mid(arg, @key, @secret, @origin)
+ else
+ fail 'Invalid argument passed to Poms.fetch. '\
+ 'Please make sure to provide either a mid or an array of mid'
+ end
+ JSON.parse(request.call.read)
end
private
| Generalize fetch method to be called with either array or single mid
|
diff --git a/stdlib/rbconfig.rb b/stdlib/rbconfig.rb
index abc1234..def5678 100644
--- a/stdlib/rbconfig.rb
+++ b/stdlib/rbconfig.rb
@@ -15,6 +15,5 @@ end
# required for mspec it would appear
-RUBY_NAME = 'opal'
-RUBY_EXE = 'opal'
-RUBY_PATCHLEVEL = "327"
+RUBY_EXE = 'bundle exec bin/opal'
+RUBY_PATCHLEVEL = 0
| Define only the necessary constants for MSpec
|
diff --git a/metadata.rb b/metadata.rb
index abc1234..def5678 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -8,3 +8,4 @@
depends 'git'
depends 'packagecloud'
+depends 'build-essential'
| Fix newb dependency mistake. Thanks Foodcritic!
|
diff --git a/spec/lib/conjure/view/application_view_spec.rb b/spec/lib/conjure/view/application_view_spec.rb
index abc1234..def5678 100644
--- a/spec/lib/conjure/view/application_view_spec.rb
+++ b/spec/lib/conjure/view/application_view_spec.rb
@@ -2,15 +2,24 @@
module Conjure::View
describe ApplicationView do
- it "shows all instances for the given application" do
- instance1 = double(:rails_environment => "staging", :ip_address => "1.2.3.4")
- instance2 = double(:rails_environment => "development", :ip_address => "5.6.7.8")
- application = double(:instances => [instance1, instance2])
- output = ApplicationView.new(application).render
- expect(output).to include("staging")
- expect(output).to include("1.2.3.4")
- expect(output).to include("development")
- expect(output).to include("5.6.7.8")
+ let(:application_attributes) { {} }
+ let(:application) { double(application_attributes) }
+ let(:rendered_output) { ApplicationView.new(application).render }
+
+ describe "view of application's instances" do
+ let :application_attributes do
+ {:instances => [
+ double(:rails_environment => "staging", :ip_address => "1.2.3.4"),
+ double(:rails_environment => "development", :ip_address => "5.6.7.8"),
+ ]}
+ end
+
+ it "shows all instances for the given application" do
+ expect(rendered_output).to include("staging")
+ expect(rendered_output).to include("1.2.3.4")
+ expect(rendered_output).to include("development")
+ expect(rendered_output).to include("5.6.7.8")
+ end
end
end
end
| Refactor ApplicationViewSpec to better support multiple test cases
|
diff --git a/Formula/midnight-commander.rb b/Formula/midnight-commander.rb
index abc1234..def5678 100644
--- a/Formula/midnight-commander.rb
+++ b/Formula/midnight-commander.rb
@@ -1,26 +1,15 @@ require 'formula'
class MidnightCommander <Formula
-
url 'http://www.midnight-commander.org/downloads/mc-4.7.5.tar.bz2'
homepage 'http://www.midnight-commander.org/'
sha256 '0d2b4e87b8a4158edf54380df9402b4a1a19f7494ef06dd0a0a3e3ff6a2b50f1'
- head 'git://midnight-commander.org/git/mc.git', :using => :git,
- # Ok, it's not a HEAD, but it works
- :tag => '69d66dd5984357e37a0742c5e4d97c9f9f6305eb'
depends_on 'pkg-config' => :build
depends_on 'glib'
depends_on 's-lang'
def install
- if ARGV.build_head?
- ENV['LIBTOOLIZE'] = 'glibtoolize'
- system 'mkdir m4'
- system 'cp `brew --prefix`/share/aclocal/pkg.m4 ./m4'
- system './autogen.sh'
- system "cd po; for i in `ls | grep '[.]po$' | cut -d'.' -f1 | xargs`; do ./update.sh $i; done; cd .."
- end
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--without-x",
| Revert "Modified formula for MC, it now supports --HEAD opt"
This reverts commit 50bd66af99cfaec4501bd37b0938e18c93198a83.
|
diff --git a/GSKStretchyHeaderView.podspec b/GSKStretchyHeaderView.podspec
index abc1234..def5678 100644
--- a/GSKStretchyHeaderView.podspec
+++ b/GSKStretchyHeaderView.podspec
@@ -1,11 +1,13 @@ Pod::Spec.new do |s|
s.name = "GSKStretchyHeaderView"
- s.version = "0.1.0"
- s.summary = "A short description of GSKStretchyHeaderView."
+ s.version = "0.7.0"
+ s.summary = "A generic, easy to use stretchy header view for UITableView and UICollectionView"
- s.description = "A generic, easy to use stretchy header view for UITableView and UICollectionView"
+ s.description = <<-DESC
+ GSKStretchyHeaderView allows you to add a stretchy header view (like Twitter's or Spotify's) to any existing UITableView and UICollectionView. There is no need inherit from custom view controllers, just create your custom header view and add it to your UITableView or UICollectionView. Creating a custom stretchy header view is as easy as inheriting from the base class or using Interface Builder.
+ DESC
s.homepage = "https://github.com/gskbyte/GSKStretchyHeaderView"
- s.screenshots = "https://github.com/gskbyte/GSKStretchyHeaderView/screenshots/spoty_default.jpg", "https://github.com/gskbyte/GSKStretchyHeaderView/screenshots/gradient.jpg"
+ s.screenshots = "https://raw.githubusercontent.com/gskbyte/GSKStretchyHeaderView/master/screenshots/spoty_default.jpg", "https://raw.githubusercontent.com/gskbyte/GSKStretchyHeaderView/master/screenshots/gradient.jpg"
s.license = 'MIT'
s.author = { "Jose Alcalá Correa" => "jose.alcala@xing.com" }
s.source = { :git => "https://github.com/gskbyte/GSKStretchyHeaderView.git", :tag => s.version.to_s }
| Fix podspec to be able to release a pod
|
diff --git a/KTSwiftExtensions.podspec b/KTSwiftExtensions.podspec
index abc1234..def5678 100644
--- a/KTSwiftExtensions.podspec
+++ b/KTSwiftExtensions.podspec
@@ -1,6 +1,6 @@ Pod::Spec.new do |s|
s.name = 'KTSwiftExtensions'
- s.version = '0.11.0'
+ s.version = '0.12.0'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.summary = 'Swift extensions'
@@ -9,9 +9,10 @@ s.source = { :git => 'https://github.com/kthomas/KTSwiftExtensions.git', :tag => s.version }
s.source_files = 'Source/**/*.swift'
+ s.dependency 'Alamofire'
+ s.dependency 'AlamofireObjectMapper'
+ s.dependency 'JWTDecode', '~> 1.0'
+
s.ios.deployment_target = '9.3'
- s.ios.dependency 'Alamofire'
- s.ios.dependency 'AlamofireObjectMapper'
- s.ios.dependency 'JWTDecode', '~> 1.0'
s.ios.dependency 'MBProgressHUD', '~> 0.9.1'
end
| Support osx with valid dependencies previously supporting only ios
|
diff --git a/Library/Formula/jython.rb b/Library/Formula/jython.rb
index abc1234..def5678 100644
--- a/Library/Formula/jython.rb
+++ b/Library/Formula/jython.rb
@@ -3,10 +3,16 @@ class Jython <Formula
url "http://downloads.sourceforge.net/project/jython/jython/2.5.1/jython_installer-2.5.1.jar",
:using => :nounzip
- md5 '2ee978eff4306b23753b3fe9d7af5b37'
homepage 'http://www.jython.org'
- head "http://downloads.sourceforge.net/project/jython/jython-dev/2.5.2b2/jython_installer-2.5.2b2.jar",
+
+ head "http://downloads.sourceforge.net/project/jython/jython-dev/2.5.2rc3/jython_installer-2.5.2rc3.jar",
:using => :nounzip
+
+ if ARGV.build_head?
+ sha1 '547c424a119661ed1901079ff8f4e45af7d57b56'
+ else
+ md5 '2ee978eff4306b23753b3fe9d7af5b37'
+ end
def install
system "java", "-jar", Pathname.new(@url).basename, "-s", "-d", libexec
| Update Jython HEAD to 2.5.2rc3
|
diff --git a/no_phone.rb b/no_phone.rb
index abc1234..def5678 100644
--- a/no_phone.rb
+++ b/no_phone.rb
@@ -5,7 +5,7 @@ if params["CallStatus"] == "ringing" && match = params["To"].match(/sip:(\+?\d+)@#{Regexp.escape(ENV["TWILIO_SIP_ENDPOINT"])}/)
builder do |xml|
xml.Response do |r|
- r.Dial match[1]
+ r.Dial match[1], callerId: ENV["TWILIO_NUMBER"]
end
end
else
| Set caller ID per Twilio requirement
|
diff --git a/metadata.rb b/metadata.rb
index abc1234..def5678 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -9,4 +9,4 @@ supports 'ubuntu', '>= 12.04'
depends 'ohai'
-depends 'et_fog', '~> 1.1'
+depends 'et_fog', '>= 1.1.0'
| Use "greater than" version constraint for et_fog cookbook
|
diff --git a/gemfile_arranger.gemspec b/gemfile_arranger.gemspec
index abc1234..def5678 100644
--- a/gemfile_arranger.gemspec
+++ b/gemfile_arranger.gemspec
@@ -16,7 +16,7 @@ spec.files = `git ls-files -z`.split("\x0")
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
- spec.require_paths = %w(lib config)
+ spec.require_paths = ['lib']
spec.add_dependency 'parser', '~> 2.2.0.pre.8'
spec.add_dependency 'unparser'
| Remove config from spec require path
|
diff --git a/db/migrate/20160724150038_default_date_trabajos.rb b/db/migrate/20160724150038_default_date_trabajos.rb
index abc1234..def5678 100644
--- a/db/migrate/20160724150038_default_date_trabajos.rb
+++ b/db/migrate/20160724150038_default_date_trabajos.rb
@@ -1,4 +1,4 @@-class DefaultDateTrabajos < ActiveRecord::Migration[5.0]
+class DefaultDateTrabajos < ActiveRecord::Migration
def change
execute "ALTER TABLE trabajos CHANGE fecha_de_inicio fecha_de_inicio TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;"
end
| Fix latest migration was rails 5 error
|
diff --git a/features/support/auth.rb b/features/support/auth.rb
index abc1234..def5678 100644
--- a/features/support/auth.rb
+++ b/features/support/auth.rb
@@ -1,9 +1,4 @@ module Auth
- def backdoor_login(user)
- visit "/backdoor-login?email=#{CGI.escape(user.email)}"
- @current_user = user
- end
-
def current_user=(user)
puts 'current get called'
@current_user = user
| Remove more backdoor login debris.
|
diff --git a/spec/integration_spec.rb b/spec/integration_spec.rb
index abc1234..def5678 100644
--- a/spec/integration_spec.rb
+++ b/spec/integration_spec.rb
@@ -5,15 +5,17 @@ describe BirdsController, type: :controller do
context "finds bird by id" do
let(:mockingbird){ double("Bird") }
- before{ expect(Bird).to receive(:find).with("mockingbird").once.and_return(mockingbird) }
- after{ expect(controller.bird).to eq(mockingbird) }
it "finds model by id" do
- get :show, { id: "mockingbird" }
+ expect(Bird).to receive(:find).with("mockingbird").once.and_return(mockingbird)
+ get :show, id: "mockingbird"
+ expect(controller.bird).to eq(mockingbird)
end
it "finds model by bird_id" do
- get :show, { bird_id: "mockingbird" }
+ expect(Bird).to receive(:find).with("mockingbird").once.and_return(mockingbird)
+ get :show, bird_id: "mockingbird"
+ expect(controller.bird).to eq(mockingbird)
end
end
| Make expectations explicit inside integration test
|
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index abc1234..def5678 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -7,4 +7,6 @@
it { should validate_presence_of :email }
it { should validate_presence_of :password }
+ it { should validate_uniqueness_of :email }
+
end
| Add new User unit test to check uniqueness of email
|
diff --git a/spec/support/with_env.rb b/spec/support/with_env.rb
index abc1234..def5678 100644
--- a/spec/support/with_env.rb
+++ b/spec/support/with_env.rb
@@ -0,0 +1,25 @@+# frozen_string_literal: true
+
+module Support
+ module WithEnv
+ # Allows setting temporary ENV variables for a test
+ #
+ # Usage:
+ #
+ # with_env("POLLING_INTERVAL" => 1, "EMAIL" => "always") do
+ # .. test here...
+ # end
+ def with_env(settings)
+ old_settings = {}
+ settings.each do |variable, value|
+ old_settings[variable] = ENV[variable]
+ ENV[variable] = value
+ end
+ yield
+ ensure
+ settings.each do |variable, _value|
+ ENV[variable] = old_settings[variable]
+ end
+ end
+ end
+end
| Add Support::WithEnv for handling ENV in specs
Support::WithEnv allows executing a block with specified environment
variables
|
diff --git a/DLAlertController.podspec b/DLAlertController.podspec
index abc1234..def5678 100644
--- a/DLAlertController.podspec
+++ b/DLAlertController.podspec
@@ -1,14 +1,14 @@ Pod::Spec.new do |s|
s.name = "DLAlertController"
- s.version = "0.0.1"
+ s.version = "0.0.2"
s.summary = "Custom alert controller for iOS platform."
s.homepage = "https://github.com/sdkdimon/DLAlertController"
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { "Dmitry Lizin" => "sdkdimon@gmail.com" }
s.source = { :git => "https://github.com/sdkdimon/DLAlertController.git", :tag => s.version }
- s.platform = :ios, '8.0'
- s.ios.deployment_target = '8.0'
+ s.platform = :ios, '7.0'
+ s.ios.deployment_target = '7.0'
s.requires_arc = true
s.module_name = 'DLAlertController'
s.source_files = 'DLAlertController/DLAlertController/*.{h,m}'
| Update pod spec to v0.0.2
|
diff --git a/health_inspector.gemspec b/health_inspector.gemspec
index abc1234..def5678 100644
--- a/health_inspector.gemspec
+++ b/health_inspector.gemspec
@@ -18,6 +18,7 @@ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
+ s.add_development_dependency "rake"
s.add_development_dependency "rspec"
s.add_runtime_dependency "thor"
| Add rake as a dev dep
|
diff --git a/Foursquare-API-v2.podspec b/Foursquare-API-v2.podspec
index abc1234..def5678 100644
--- a/Foursquare-API-v2.podspec
+++ b/Foursquare-API-v2.podspec
@@ -1,12 +1,12 @@ Pod::Spec.new do |s|
s.name = "Foursquare-API-v2"
- s.version = "1.4.3"
+ s.version = "1.4.4"
s.summary = "Objective-C Foursquare API v2. With native authorisation now."
s.homepage = "https://github.com/Constantine-Fry/Foursquare-API-v2"
s.screenshots = "https://raw.github.com/Constantine-Fry/Foursquare-API-v2/master/img/photo2.PNG"
s.license = 'MIT'
s.author = { "Constantine Fry" => "constantine.fry@gmail.com" }
- s.source = { :git => "https://github.com/Constantine-Fry/Foursquare-API-v2.git", :tag => "1.4.3" }
+ s.source = { :git => "https://github.com/Constantine-Fry/Foursquare-API-v2.git", :tag => "1.4.4" }
s.platform = :ios, '5.0'
s.source_files = 'Classes', 'Foursquare2/**/*.{h,m}'
s.resources = 'Foursquare2/*.png', 'Foursquare2/**/*.{xib}'
| Update tag version in podspec
|
diff --git a/lib/asteroids/missile/missile_physics.rb b/lib/asteroids/missile/missile_physics.rb
index abc1234..def5678 100644
--- a/lib/asteroids/missile/missile_physics.rb
+++ b/lib/asteroids/missile/missile_physics.rb
@@ -12,6 +12,7 @@ object.x %= 800
object.y %= 600
object.lifespan -= 0.1
+ object.mark_for_removal if object.lifespan <= 0
end
end
| Implement the removing of the missles.
|
diff --git a/homebrew/ruby-install.rb b/homebrew/ruby-install.rb
index abc1234..def5678 100644
--- a/homebrew/ruby-install.rb
+++ b/homebrew/ruby-install.rb
@@ -2,7 +2,7 @@ desc "Install Ruby, JRuby, Rubinius, MagLev, or mruby"
homepage "https://github.com/postmodern/ruby-install#readme"
url "https://github.com/postmodern/ruby-install/archive/v0.6.0.tar.gz"
- sha1 "ee2f316ab5682ad8f89d91b88d57354ea5f2253c"
+ sha256 "3cc90846ca972d88b601789af2ad9ed0a496447a13cb986a3d74a4de062af37d"
head "https://github.com/postmodern/ruby-install.git"
| Switch homebrew formula to use SHA256.
|
diff --git a/metadata.rb b/metadata.rb
index abc1234..def5678 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -3,6 +3,6 @@ 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.rdoc'))
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "1.1.1"
supports "ubuntu"
| Read the long description from the correctly named file
|
diff --git a/metadata.rb b/metadata.rb
index abc1234..def5678 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -10,7 +10,7 @@ depends 'apt'
depends 'ubuntu_base', '0.7.0'
depends 'octobase', '0.5.0'
-depends 'docker', '0.4.0'
+depends 'docker', '0.6.0'
depends 'redis'
depends 'nodejs'
depends 'hipache'
| Make sure to use the newer Docker recipe.
|
diff --git a/metadata.rb b/metadata.rb
index abc1234..def5678 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -4,7 +4,7 @@ license 'Apache v2.0'
description 'Installs/Configures consul'
long_description 'Installs/Configures consul'
-version '0.4.4'
+version '0.4.3'
recipe 'consul', 'Installs and starts consul service.'
recipe 'consul::install_binary', 'Installs consul service from binary.'
| Revert "Bumped version to 0.4.4"
This reverts commit 7c8b9f478b37b26253df73ff8d00c4b43800bebf.
|
diff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/categories_controller.rb
+++ b/app/controllers/categories_controller.rb
@@ -2,6 +2,7 @@ skip_authorization_check
def index
- @categories ||= CategoryDecorator.decorate_collection(Category.all)
+ categories = Category.includes(:subcategories)
+ @categories ||= CategoryDecorator.decorate_collection(categories)
end
end
| Load all subcategories at once
|
diff --git a/lib/input/support/draftmodeformatting.rb b/lib/input/support/draftmodeformatting.rb
index abc1234..def5678 100644
--- a/lib/input/support/draftmodeformatting.rb
+++ b/lib/input/support/draftmodeformatting.rb
@@ -5,7 +5,7 @@ def DraftModeFormatting::markup paragraph, creator
if not $style[:final]
# highlight first sentence
- paragraph.replace_once('^(([^\.]+\.))', proc { | buf, orig | creator.highlight(buf) } )
+ paragraph.replace_once('^(([\w\']+\s[^\.]+\.))', proc { | buf, orig | creator.highlight(buf) } )
# don't use a comma before because
paragraph.replace_once('((,\s+(because|while|partly)))', proc { | buf, orig | creator.markword(buf) } )
# use a comma before 'and'
| Make sure there is a space for the first sentence in a paragraph, before highlighting
|
diff --git a/test/models/car.rb b/test/models/car.rb
index abc1234..def5678 100644
--- a/test/models/car.rb
+++ b/test/models/car.rb
@@ -1,5 +1,5 @@ class Car < ActiveRecord::Base
- validates :make, :model, presence: true
+ validates :make, :model, :presence => true
translates :make, :model
end | Use Ruby 1.8 hash syntax
|
diff --git a/app/lib/project_sites_https_detective.rb b/app/lib/project_sites_https_detective.rb
index abc1234..def5678 100644
--- a/app/lib/project_sites_https_detective.rb
+++ b/app/lib/project_sites_https_detective.rb
@@ -13,8 +13,8 @@ repo_url = current[:repo_url]
@results = {}
- https_pattern = %r{^https://}
- http_pattern = %r{^http://}
+ https_pattern = %r{\Ahttps://}i
+ http_pattern = %r{\Ahttp://}i
if homepage_url =~ http_pattern || repo_url =~ http_pattern
@results[:sites_https_status] =
| Fix sites_https detective so it's case-insensitive
URLs are traditionally lower-case, but technically HTTP:
also works, so let's detect that as well.
Signed-off-by: David A. Wheeler <9ae72d22d8b894b865a7a496af4fab6320e6abb2@dwheeler.com>
|
diff --git a/lib/vagrant-vbguest/installers/redhat.rb b/lib/vagrant-vbguest/installers/redhat.rb
index abc1234..def5678 100644
--- a/lib/vagrant-vbguest/installers/redhat.rb
+++ b/lib/vagrant-vbguest/installers/redhat.rb
@@ -20,7 +20,9 @@ end
def dependencies
- packages = ['kernel-devel-`uname -r`', 'gcc', 'make', 'perl', 'bzip2']
+ packages = [
+ 'kernel-devel-`uname -r`', 'gcc', 'binutils', 'make', 'perl', 'bzip2'
+ ]
packages.join ' '
end
end
| Add the binutils package as a dependency
ref#188
|
diff --git a/app/jobs/welcome_email_job.rb b/app/jobs/welcome_email_job.rb
index abc1234..def5678 100644
--- a/app/jobs/welcome_email_job.rb
+++ b/app/jobs/welcome_email_job.rb
@@ -2,7 +2,7 @@ queue_as :mailer
def perform(user_id)
- user = User.find_by(user_id)
+ user = User.find_by(id: user_id)
UserMailer.welcome_email(user).deliver_now if user
end
end
| Fix syntax error in welcome email job
|
diff --git a/app/serializers/innovation_serializer.rb b/app/serializers/innovation_serializer.rb
index abc1234..def5678 100644
--- a/app/serializers/innovation_serializer.rb
+++ b/app/serializers/innovation_serializer.rb
@@ -1,5 +1,5 @@ class InnovationSerializer < ActiveModel::Serializer
- attributes :title, :abstract, :body, :consented, :novelty_score, :value_score, :usability_score, :tooling_score, :lifespan_score
+ attributes :id, :title, :abstract, :body, :consented, :novelty_score, :value_score, :usability_score, :tooling_score, :lifespan_score
has_many :tags, through: :innovation_tags
has_many :collections, through: :collection_innovations
| Add ID to innovations serializer
|
diff --git a/app/models/group_hierarchy.rb b/app/models/group_hierarchy.rb
index abc1234..def5678 100644
--- a/app/models/group_hierarchy.rb
+++ b/app/models/group_hierarchy.rb
@@ -1,4 +1,7 @@ class GroupHierarchy
+ FIELDS = [:id, :name, :slug, :parent_id]
+ LiteGroup = Struct.new(*FIELDS)
+
def initialize(root)
@root = root
end
@@ -12,8 +15,20 @@ def export(group)
{
name: group.name,
- url: Rails.application.routes.url_helpers.group_path(group),
- children: group.children.map { |g| export(g) }
+ url: group_path(group),
+ children: children(group).map { |g| export(g) }
}
end
+
+ def children(group)
+ lookup.select { |g| g.parent_id == group.id }.sort_by(&:name)
+ end
+
+ def group_path(lg)
+ Rails.application.routes.url_helpers.group_path(id: lg.slug)
+ end
+
+ def lookup
+ @lookup ||= Group.pluck(*FIELDS).map { |a| LiteGroup.new(*a) }
+ end
end
| Make group hierarchy generation efficient
It now uses one query instead of one for every group in the database.
|
diff --git a/knife-topo.gemspec b/knife-topo.gemspec
index abc1234..def5678 100644
--- a/knife-topo.gemspec
+++ b/knife-topo.gemspec
@@ -8,8 +8,8 @@ spec.version = Knife::Topo::VERSION
spec.authors = ["Christine Draper"]
spec.email = ["christine_draper@thirdwaveinsights.com"]
- spec.summary = "Knife plugin that to manage topologies of nodes"
- spec.description = spec.summary
+ spec.summary = "Knife plugin to manage topologies of nodes"
+ spec.description = "Knife-topo uses a JSON file to capture a topology of nodes, which can be loaded into Chef and bootstrapped"
spec.homepage = "https://github.com/christinedraper/knife-topo"
spec.license = "Apache License (2.0)"
| Fix typo in gemspec summary and add a longer description |
diff --git a/premailer.gemspec b/premailer.gemspec
index abc1234..def5678 100644
--- a/premailer.gemspec
+++ b/premailer.gemspec
@@ -17,4 +17,5 @@ s.add_dependency('htmlentities', '>= 4.0.0')
s.add_development_dependency('hpricot', '>= 0.8.3')
s.add_development_dependency('nokogiri', '>= 1.4.4')
+ s.add_development_dependency('rake', ['~> 0.8', '!= 0.9.0'])
end
| Allow 'bundle rake test' for test purposes
|
diff --git a/app/controllers/following_controller.rb b/app/controllers/following_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/following_controller.rb
+++ b/app/controllers/following_controller.rb
@@ -1,5 +1,19 @@ class FollowingController < ApplicationController
+ before_filter :authenticate, :except => :index
+
def index
- @user = User.get(params[:user_id])
+ @user = User.get!(params[:user_id])
+ end
+
+ def create
+ user = User.get!(params[:user_id])
+ current_user.follow(user)
+ redirect_to user_path(user)
+ end
+
+ def destroy
+ user = User.get!(params[:user_id])
+ current_user.unfollow(user)
+ redirect_to user_path(user)
end
end
| Support follow and unfollow actions.
|
diff --git a/app/controllers/questions_controller.rb b/app/controllers/questions_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/questions_controller.rb
+++ b/app/controllers/questions_controller.rb
@@ -14,8 +14,9 @@
def create
@question = Question.new(question_params)
+ p params
if @question.save
- redirect_to questions_path
+ redirect_to root_path
end
end
@@ -27,7 +28,7 @@ @question = Question.find(params[:id])
@question.assign_attributes(question_params)
if @question.save
- redirect_to @question
+ redirect_to root_path
else
render :edit
end
@@ -37,7 +38,7 @@ @question = Question.find(params[:id])
@question.destroy
flash[:notice] = "Question has been deleted"
- redirect_to questions_path
+ redirect_to root_path
end
private
| Change redirect to root path for update and create
|
diff --git a/app/controllers/responses_controller.rb b/app/controllers/responses_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/responses_controller.rb
+++ b/app/controllers/responses_controller.rb
@@ -16,7 +16,7 @@ if @response.save
redirect_to parent_url(@parent)
else
- flash[:message] = "Failed to comment successfully."
+ flash.now[:alert] = "Comment must have content."
render :new
end
end
| Change flash message to fit styling
|
diff --git a/lib/human_power/rails/controller.rb b/lib/human_power/rails/controller.rb
index abc1234..def5678 100644
--- a/lib/human_power/rails/controller.rb
+++ b/lib/human_power/rails/controller.rb
@@ -8,7 +8,7 @@ end
# render text: something does not give correct content type
- render text: generator.render, content_type: 'text/plain'
+ render text: generator.render, content_type: Mime::TEXT
end
end
end
| Use Mime::TEXT for content type
|
diff --git a/lib/mini_check/checks_collection.rb b/lib/mini_check/checks_collection.rb
index abc1234..def5678 100644
--- a/lib/mini_check/checks_collection.rb
+++ b/lib/mini_check/checks_collection.rb
@@ -1,12 +1,7 @@ module MiniCheck
class ChecksCollection < Array
def to_hash
- resp = {}
- each.map do |check|
- resp[check.name] = check.to_hash
- end
-
- resp
+ Hash[map { |check| [check.name, check.to_hash] }]
end
def healthy?
| Use functional style to convert the array into hash
|
diff --git a/lib/dynadot/api.rb b/lib/dynadot/api.rb
index abc1234..def5678 100644
--- a/lib/dynadot/api.rb
+++ b/lib/dynadot/api.rb
@@ -32,6 +32,10 @@ return Hash[results]
end
+ def availabile?(domain)
+ search(domain)[domain]
+ end
+
private
def parse(response)
data = response.parsed_response.split("\n")
| Implement a short-hand method for availability checking for single domain
|
diff --git a/app.rb b/app.rb
index abc1234..def5678 100644
--- a/app.rb
+++ b/app.rb
@@ -24,7 +24,8 @@ end
configure do
- use Rack::Session::Pool, :expire_after => 2592000, :secret => (ENV['SESSION_SECRET'] || 'Default secret... Set the SESSION_SECRET environment variable!')
+ set :session_secret, ENV['SESSION_SECRET'] if ENV['SESSION_SECRET']
+ enable :sessions
# Force enclosure parsing on all Feedzirra feed entries
Feedzirra::Feed.add_common_feed_entry_element(:enclosure, :value => :url, :as => :enclosure_url)
| Use sinatra's default session duration
|
diff --git a/lib/tasks/css.rake b/lib/tasks/css.rake
index abc1234..def5678 100644
--- a/lib/tasks/css.rake
+++ b/lib/tasks/css.rake
@@ -2,7 +2,7 @@ desc "Generate styleguide"
task :styleguide do
puts "--> creating styleguide"
- Bundler.clean_system('bin/dress_code config/styleguide.yml')
+ system('bin/dress_code config/styleguide.yml')
raise "error running dress_code" unless $?.success?
end
end
| Use `system` instead of `Bundler.clean_system` for dress_code
Bundler.clean_system doesnt have BUNDLE_PATH set correctly
Change-Id: Ib2760786e5dfbc7909f55ddd5f401a96fcf2a430
Reviewed-on: https://gerrit.instructure.com/71927
Reviewed-by: Tyler Pickett <3f20fcf21b1970c94966160adcf831eedd808a06@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <9adc7a1161ddf32ff608de792a7e50179545f026@instructure.com>
Product-Review: Brad Horrocks <7b5c5d1f2eba6c540b8e53f17d87a9bd7dbf604b@instructure.com>
|
diff --git a/lib/uptimerobot.rb b/lib/uptimerobot.rb
index abc1234..def5678 100644
--- a/lib/uptimerobot.rb
+++ b/lib/uptimerobot.rb
@@ -36,6 +36,33 @@ end
def graph_data(monitor)
+ points = []
+ last_x = 1
+ total_value = 0
+
+ monitor['responsetime'].reverse.each do |value|
+ points.push({ x: last_x, y: value['value'].to_i })
+
+ total_value += value['value'].to_i
+ last_x += 1
+ end
+
+ points.push({ x: last_x + 1, y: total_value / last_x })
+ end
+
+ def random_monitor
+ data = []
+
+ monitors = all_monitors
+
+ monitor_random = monitors.sample
+
+ points = graph_data(monitor_random)
+
+ data.push(points)
+ data.push(monitor_random['friendlyname'])
+
+ data
end
end
| Implement random_monitor, split contruction of graph point and random graph
|
diff --git a/lib/cangaroo/engine.rb b/lib/cangaroo/engine.rb
index abc1234..def5678 100644
--- a/lib/cangaroo/engine.rb
+++ b/lib/cangaroo/engine.rb
@@ -15,6 +15,7 @@ Rails.configuration.cangaroo.poll_jobs = []
Rails.configuration.cangaroo.basic_auth = false
Rails.configuration.cangaroo.logger = nil
+ Rails.configuration.cangaroo.client_timeout = nil
end
end
end
| Add a configurable HTTP client timeout option
Some endpoints **cough** NetSuite **cough** take a long time to respond
to HTTP requests. It would be very helpful if we could arbitrarily
extend the default Net::HTTP timeouts that HTTParty is using on a
case-by-case basis.
|
diff --git a/lib/inquest/reactor.rb b/lib/inquest/reactor.rb
index abc1234..def5678 100644
--- a/lib/inquest/reactor.rb
+++ b/lib/inquest/reactor.rb
@@ -1,4 +1,9 @@ class Inquest::Reactor
- def react!(user, notifiable, action)
+ def self.react!(user, notifiable, action)
+ raise NotYetImplementedError
+ end
+
+ def self.reaction_description
+ raise NotYetImplementedError
end
end | Define methods at class level, not instance level
|
diff --git a/lib/operable/fields.rb b/lib/operable/fields.rb
index abc1234..def5678 100644
--- a/lib/operable/fields.rb
+++ b/lib/operable/fields.rb
@@ -9,9 +9,10 @@ def operable_values
raise "Please specify one or more fields via operable_on in your model definition!" if self.class.operable_fields.nil?
- keys = attributes.keys
- keys << relations.keys if respond_to?(:associations)
- values = attributes.select {|k, v| self.class.operable_fields.include? k }
+ values = {}
+ attributes.select {|k, v| self.class.operable_fields.include? k }.each do |k, v|
+ values[k.to_s] = v
+ end
if respond_to?(:associations)
associations.select {|k, v| self.class.operable_fields.include? k }.each do |k, v|
values[k.to_s] = send(k)
| Fix type issue on Ruby < 1.9 |
diff --git a/lib/squall/template.rb b/lib/squall/template.rb
index abc1234..def5678 100644
--- a/lib/squall/template.rb
+++ b/lib/squall/template.rb
@@ -19,5 +19,12 @@ response = request(:post, "/templates/#{id}/make_public.json")
response.first[1]
end
+
+ # Public: Lists grouped templates in the template store.
+ #
+ # Returns an Array.
+ def template_store
+ response = request(:get, '/template_store.json')
+ end
end
end
| Add ability to tap into the Template Store in OnApp 3.2
|
diff --git a/models/walkmydog/dog/job_location.rb b/models/walkmydog/dog/job_location.rb
index abc1234..def5678 100644
--- a/models/walkmydog/dog/job_location.rb
+++ b/models/walkmydog/dog/job_location.rb
@@ -2,8 +2,8 @@ class JobLocation
include DataMapper::Resource
property :id, Serial
- property :latitude, Float
- property :longitude, Float
+ property :latitude, Float, precision: 53
+ property :longitude, Float, precision: 53
property :created_at, DateTime
property :updated_at, DateTime
| Add bigger precision to lng and lat
|
diff --git a/lib/active_merchant/billing/integrations/ipay88.rb b/lib/active_merchant/billing/integrations/ipay88.rb
index abc1234..def5678 100644
--- a/lib/active_merchant/billing/integrations/ipay88.rb
+++ b/lib/active_merchant/billing/integrations/ipay88.rb
@@ -21,14 +21,14 @@ self.merch_key = key
end
- # The requery URL upon returning from iPay88
+ # The URL to POST your payment form to
def self.service_url
- "https://www.mobile88.com/epayment/enquiry.asp"
+ "https://www.mobile88.com/epayment/entry.asp"
end
- # The URL to POST your payment form to
+ # The requery URL upon returning from iPay88
def self.entry_url
- "https://www.mobile88.com/epayment/entry.asp"
+ "https://www.mobile88.com/epayment/enquiry.asp"
end
def self.return(query_string)
| Swap service_url and entry_url to play nice with ActiveMerchant's payment_service_for view helper
|
diff --git a/lib/tasks/webpack.rake b/lib/tasks/webpack.rake
index abc1234..def5678 100644
--- a/lib/tasks/webpack.rake
+++ b/lib/tasks/webpack.rake
@@ -16,7 +16,6 @@ raise "Can't find our webpack config file at #{config_file}"
end
- result = `#{webpack_bin} --bail --config #{config_file} 2>&1`
- raise result unless $CHILD_STATUS == 0
+ sh "#{webpack_bin} --bail --config #{config_file}"
end
end
| Use rake's 'sh' command to handle errors & print output
|
diff --git a/JJGraphicsUtilities.podspec b/JJGraphicsUtilities.podspec
index abc1234..def5678 100644
--- a/JJGraphicsUtilities.podspec
+++ b/JJGraphicsUtilities.podspec
@@ -1,14 +1,13 @@ Pod::Spec.new do |s|
s.name = "JJGraphicsUtilities"
- s.version = "0.0.2"
+ s.version = "0.0.3"
s.platform = :ios
s.summary = "General graphics utilities, including generic inset effect classes. "
s.homepage = "https://github.com/jacobjennings/JJGraphicsUtilities"
s.license = 'MIT'
s.author = { "Jacob Jennings" => "jacob.r.jennings@gmail.com" }
- s.source = { :git => "https://github.com/jacobjennings/JJGraphicsUtilities.git", :tag => "0.0.2" }
+ s.source = { :git => "https://github.com/jacobjennings/JJGraphicsUtilities.git", :tag => "0.0.3" }
s.ios.deployment_target = '4.3'
- s.osx.deployment_target = '10.5'
s.source_files = 'Classes/*.{h,m}'
s.frameworks = 'QuartzCore', 'CoreGraphics'
s.requires_arc = true
| Update podspec to reflex 0.0.3 tag
|
diff --git a/lib/thredded/engine.rb b/lib/thredded/engine.rb
index abc1234..def5678 100644
--- a/lib/thredded/engine.rb
+++ b/lib/thredded/engine.rb
@@ -31,7 +31,7 @@ end
initializer 'thredded.setup_assets' do
- Thredded::Engine.config.assets.precompile << /\Athredded.*(?:js|css)\z/
+ Thredded::Engine.config.assets.precompile.unshift /\Athredded.*(?:js|css)\z/
Thredded::Engine.config.assets.precompile += %w(
chosen-sprite.png
chosen-sprite@2x.png
| [JRO] Prepend css/js precompile w/thredded assets
|
diff --git a/lib/tinymce/railtie.rb b/lib/tinymce/railtie.rb
index abc1234..def5678 100644
--- a/lib/tinymce/railtie.rb
+++ b/lib/tinymce/railtie.rb
@@ -1,6 +1,7 @@ module TinyMCE
def self.base
[Rails.application.config.action_controller.asset_host,
+ Rails.application.config.relative_url_root,
Rails.application.config.assets.prefix, "/tinymce"].compact.join
end
| Add support for asset paths in subfolder (via relative_url_root)
|
diff --git a/lib/tmdb-api/person.rb b/lib/tmdb-api/person.rb
index abc1234..def5678 100644
--- a/lib/tmdb-api/person.rb
+++ b/lib/tmdb-api/person.rb
@@ -8,13 +8,29 @@
attr_reader *ATTRIBUTES
+ # Public: Get the basic person information for a specific person ID.
+ #
+ # id - The ID of the person.
+ # options - The hash options used to filter the search (default: {}):
+ # More information about the options, check the api documentation
+ #
+ # Examples
+ #
+ # TMDb::Person.find(138)
def self.find(id, options = {})
res = get("/person/#{id}", query: options)
res.success? ? Person.new(res) : bad_response(res)
end
- def self.images(id, options = {})
- res = get("/person/#{id}/images", query: options)
+ # Public: Get the images for a specific person ID.
+ #
+ # id - The person's ID
+ #
+ # Examples
+ #
+ # TMDb::Person.images(138)
+ def self.images(id)
+ res = get("/person/#{id}/images")
res.success? ? res : bad_response(res)
end
end
| Add comments on find and images methods on Person.
|
diff --git a/lib/trackets/client.rb b/lib/trackets/client.rb
index abc1234..def5678 100644
--- a/lib/trackets/client.rb
+++ b/lib/trackets/client.rb
@@ -40,7 +40,7 @@
def payload
{
- language: "ruby",
+ type: "ruby",
message: exception.message,
class_name: exception.class.to_s,
stacktrace: backtrace.parse.join("\n"),
| Send library name in type param
|
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/dashboard_controller.rb
+++ b/app/controllers/dashboard_controller.rb
@@ -11,10 +11,14 @@ def build_ride
if current_user.rides.any?
last_ride = current_user.rides.first
- attrs = last_ride.attributes.slice(*%w{distance description is_round_trip})
+ attrs = last_ride.attributes.slice(*copyable_ride_attrs)
else
attrs = {}
end
Ride.new(attrs.merge(date: Date.today))
end
+
+ def copyable_ride_attrs
+ %w{bike_distance bus_distance walk_distance description is_round_trip}
+ end
end
| Use last distance values for ride form
|
diff --git a/app/controllers/educators_controller.rb b/app/controllers/educators_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/educators_controller.rb
+++ b/app/controllers/educators_controller.rb
@@ -30,6 +30,8 @@ def filtered_names(term, school)
unfiltered = (school.educator_names_for_services + Service.provider_names).uniq.compact
+ return unfiltered.sort_by(&:downcase) if term.nil? # Handle missing param
+
filtered = unfiltered.select do |name|
split_name = name.split(', ') # SIS name format expected
split_name.any? { |name_part| match?(term, name_part) }
| Handle case where search term isn't provided
|
diff --git a/test/unit/guide_edition_test.rb b/test/unit/guide_edition_test.rb
index abc1234..def5678 100644
--- a/test/unit/guide_edition_test.rb
+++ b/test/unit/guide_edition_test.rb
@@ -1,6 +1,6 @@ require 'test_helper'
-class GuideTest < ActiveSupport::TestCase
+class GuideEditionTest < ActiveSupport::TestCase
def template_guide
g = Guide.new(:slug=>"childcare",:name=>"Something")
edition = g.editions.first
| Make test class unique so methods are not shadowed.
|
diff --git a/fuzzyfinder.rb b/fuzzyfinder.rb
index abc1234..def5678 100644
--- a/fuzzyfinder.rb
+++ b/fuzzyfinder.rb
@@ -0,0 +1,10 @@+def fuzzyfinder(user_input, collection)
+ suggestions = []
+ pattern = user_input.split('').join('.*')
+ collection.each do |item|
+ if /#{pattern}/.match(item)
+ suggestions.push(item)
+ end
+ end
+ suggestions
+end
| Add simple implementation of FuzzyFinder
|
diff --git a/app/helpers/api/auth.rb b/app/helpers/api/auth.rb
index abc1234..def5678 100644
--- a/app/helpers/api/auth.rb
+++ b/app/helpers/api/auth.rb
@@ -10,7 +10,7 @@
def authenticate!(account)
session[:account_id] = account.id
- session[:expires_at] = Time.zone.now + 1.minutes
+ session[:expires_at] = Time.zone.now + 60.minutes
end
def current_user
| Set 60min at expire of settion
|
diff --git a/knife-essentials.gemspec b/knife-essentials.gemspec
index abc1234..def5678 100644
--- a/knife-essentials.gemspec
+++ b/knife-essentials.gemspec
@@ -21,6 +21,7 @@ s.add_development_dependency "chef-zero"
s.add_development_dependency 'rspec'
s.add_development_dependency 'rake'
+ s.add_development_dependency 'rdoc'
s.require_path = 'lib'
s.files = %w(LICENSE README.rdoc Rakefile) + Dir.glob("{lib,spec}/**/*")
| Add rdoc dev dependency for travis
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.