diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/chess_consts.rb b/chess_consts.rb
index abc1234..def5678 100644
--- a/chess_consts.rb
+++ b/chess_consts.rb
@@ -0,0 +1,14 @@+module Chess
+ W_KING = "\u2654"
+ W_QUEEN = "\u2655"
+ W_ROOK = "\u2656"
+ W_BISHOP = "\u2657"
+ W_KNIGHT = "\u2658"
+ W_PAWN = "\u2659"
+ B_KING = "\u265A"
+ B_QUEEN = "\u265B"
+ B_ROOK = "\u265C"
+ B_BISHOP = "\u265D"
+ B_KNIGHT = "\u265E"
+ B_PAWN = "\u265F"
+end
|
Add constants for Unicode symbols
|
diff --git a/app/controllers/admin/application_controller.rb b/app/controllers/admin/application_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/admin/application_controller.rb
+++ b/app/controllers/admin/application_controller.rb
@@ -1,6 +1,6 @@ class Admin::ApplicationController < ActionController::Base
- include DefaultActions
- include DefaultViews
+ include Admin::DefaultActions
+ include Admin::DefaultViews
before_filter :login_required
respond_to :html, :xml, :json
|
Fix for namespace issue, causes occasionally problems with rails missing constants:
Admin is not missing constant DefaultActions! (ArgumentError)
|
diff --git a/app/controllers/api/v1/activities_controller.rb b/app/controllers/api/v1/activities_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/api/v1/activities_controller.rb
+++ b/app/controllers/api/v1/activities_controller.rb
@@ -12,7 +12,7 @@ private
def render_rubygems(versions)
- rubygems = versions.includes(:dependencies, rubygem: %i[linkset gem_download]).map do |version|
+ rubygems = versions.includes(:dependencies, :gem_download, rubygem: %i[linkset gem_download]).map do |version|
version.rubygem.payload(version)
end
|
Include gem_downloads to remove n+1 for versions.downloads_count
|
diff --git a/app/models/carto/helpers/data_import_commons.rb b/app/models/carto/helpers/data_import_commons.rb
index abc1234..def5678 100644
--- a/app/models/carto/helpers/data_import_commons.rb
+++ b/app/models/carto/helpers/data_import_commons.rb
@@ -4,12 +4,14 @@ module Carto
module DataImportCommons
+ GENERIC_ERROR_CODE = 99999
+
# Notice that this returns the entire error hash, not just the text
def get_error_text
if error_code == CartoDB::NO_ERROR_CODE
CartoDB::NO_ERROR_CODE
- elsif error_code.blank? || error_code == 99999
- connector_error_message || CartoDB::IMPORTER_ERROR_CODES[99999]
+ elsif error_code.blank? || error_code == GENERIC_ERROR_CODE
+ connector_error_message || CartoDB::IMPORTER_ERROR_CODES[GENERIC_ERROR_CODE]
else
CartoDB::IMPORTER_ERROR_CODES[error_code]
end
|
Use constant for special error code
|
diff --git a/app/models/spree/app_configuration_decorator.rb b/app/models/spree/app_configuration_decorator.rb
index abc1234..def5678 100644
--- a/app/models/spree/app_configuration_decorator.rb
+++ b/app/models/spree/app_configuration_decorator.rb
@@ -1,3 +1,3 @@ Spree::AppConfiguration.class_eval do
- preference :use_store_credit_minimum, :float, :default => 0.0
+ preference :use_store_credit_minimum, :decimal, :default => 0.0
end
|
Change preference type from float to decimal
Fixes #57
|
diff --git a/lib/generators/sunrise/templates/models/mongoid/structure.rb b/lib/generators/sunrise/templates/models/mongoid/structure.rb
index abc1234..def5678 100644
--- a/lib/generators/sunrise/templates/models/mongoid/structure.rb
+++ b/lib/generators/sunrise/templates/models/mongoid/structure.rb
@@ -9,13 +9,13 @@ # Columns
field :title, :type => String
field :slug, :type => String
- field :kind, :type => Integer, :default => 0
- field :position, :type => Integer, :default => 0
+ field :structure_type_id, :type => Integer, :default => 0
+ field :position_type_id, :type => Integer, :default => 0
field :is_visible, :type => Boolean, :default => true
field :redirect_url, :type => String
- index({:kind => 1})
- index({:position => 1})
+ index({:structure_type_id => 1})
+ index({:position_type_id => 1})
index({:parent_id => 1})
tracked owner: ->(controller, model) { controller.try(:current_user) }
|
Rename columns for mongoid orm
|
diff --git a/lib/rr/adapters/test_unit_1.rb b/lib/rr/adapters/test_unit_1.rb
index abc1234..def5678 100644
--- a/lib/rr/adapters/test_unit_1.rb
+++ b/lib/rr/adapters/test_unit_1.rb
@@ -34,7 +34,9 @@ alias_method :teardown_without_rr, :teardown
def teardown_with_rr
RR.verify
+ rescue => e
teardown_without_rr
+ raise e
end
alias_method :teardown, :teardown_with_rr
end
|
Fix Test::Unit adapters to ensure teardown is run if RR.verify borks
|
diff --git a/config/environments/development.rb b/config/environments/development.rb
index abc1234..def5678 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -11,7 +11,6 @@
# Show full error reports and disable caching
config.consider_all_requests_local = true
- config.action_view.debug_rjs = true
config.action_controller.perform_caching = false
# Don't care if the mailer can't send
|
Remove debug RJS as recommended in RC
|
diff --git a/lib/tasks/stagehand_tasks.rake b/lib/tasks/stagehand_tasks.rake
index abc1234..def5678 100644
--- a/lib/tasks/stagehand_tasks.rake
+++ b/lib/tasks/stagehand_tasks.rake
@@ -1,7 +1,8 @@ namespace :stagehand do
desc "Polls the commit entries table for changes to sync to production"
task :auto_sync, [:delay] => :environment do |t, args|
- Stagehand::Staging::Synchronizer.auto_sync(args[:delay] || 5.seconds)
+ delay = args[:delay].present? ? args[:delay].to_i : 5.seconds
+ Stagehand::Staging::Synchronizer.auto_sync(delay)
end
desc "Syncs records that don't need confirmation to production"
|
Fix error due to calling sleep with a string.
args come in off the command line as strings. We need to turn them into integers before passing them to `sleep`.
|
diff --git a/lib/gluer/registration.rb b/lib/gluer/registration.rb
index abc1234..def5678 100644
--- a/lib/gluer/registration.rb
+++ b/lib/gluer/registration.rb
@@ -13,18 +13,23 @@ end
def commit
- commit_hook.call(registry, context, *args, &block)
- committed
+ registry.tap do |registry|
+ commit_hook.call(registry, context, *args, &block)
+ committed_on(registry)
+ end
end
def rollback
- rollback_hook.call(registry, context, *args, &block) if committed?
+ if committed?
+ rollback_hook.call(registry_when_committed, context, *args, &block)
+ end
end
private
- attr_reader :definition, :context, :args, :block
+ attr_reader :definition, :context, :args, :block, :registry_when_committed
- def committed
+ def committed_on(registry)
+ @registry_when_committed = registry
@committed = true
end
|
Rollback should happen in the same registry that received commit
|
diff --git a/lib/httpalooza/request.rb b/lib/httpalooza/request.rb
index abc1234..def5678 100644
--- a/lib/httpalooza/request.rb
+++ b/lib/httpalooza/request.rb
@@ -1,5 +1,7 @@ module HTTPalooza
class Request
+ STANDARD_METHODS = [:get, :post, :put, :patch, :delete, :options, :head]
+
attr_reader :url, :method, :params, :payload, :headers
def initialize(url, method, options = {})
@@ -16,6 +18,12 @@ !!(url.to_s =~ /^https/)
end
+ STANDARD_METHODS.each do |verb|
+ define_method(:"#{verb}?") do
+ method == verb
+ end
+ end
+
private
def normalize_url!
raise ArgumentError, "Invalid URL: #{url}" unless url.to_s =~ /^http/
|
Add HTTP verb predicates to Request
|
diff --git a/core/kernel/__dir___spec.rb b/core/kernel/__dir___spec.rb
index abc1234..def5678 100644
--- a/core/kernel/__dir___spec.rb
+++ b/core/kernel/__dir___spec.rb
@@ -12,7 +12,7 @@ end
end
- ruby_version_is ""..."2.7" do
+ ruby_version_is ""..."2.8" do
context "when used in eval with top level binding" do
it "returns the real name of the directory containing the currently-executing file" do
eval("__dir__", binding).should == File.realpath(File.dirname(__FILE__))
@@ -20,7 +20,7 @@ end
end
- ruby_version_is "2.7" do
+ ruby_version_is "2.8" do
context "when used in eval with top level binding" do
it "returns nil" do
eval("__dir__", binding).should == nil
|
Fix version guard in __dir__ spec
|
diff --git a/config/routes.rb b/config/routes.rb
index abc1234..def5678 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -5,7 +5,6 @@
# Redirects
get "/releases/2016/12/12/new-backend", to: redirect('/blogs/2016/12/12/new-backend')
- get "/login", to: 'login_page#index'
# Sessions
resource :session, only: [:create, :destroy]
|
Delete /login for now; implement it later
|
diff --git a/config/routes.rb b/config/routes.rb
index abc1234..def5678 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,8 +1,7 @@ Fox::Application.routes.draw do
- resources :posts
+ resources :posts, :as => :p
- match 'p/:id' => 'posts#show', :as => :p
match '/help' => 'posts#help', :as => :help
match '/search' => 'posts#search', :as => :search
root :to => 'posts#index'
-end
+end
|
Make real alias for posts resources
To have shorter urls for posts, we add an alias for posts to it.
|
diff --git a/config/routes.rb b/config/routes.rb
index abc1234..def5678 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -8,6 +8,7 @@
resources :employees do
resources :timesheets
+ resources :activities
end
resources :people do
|
Add nested resource definition to employees.
|
diff --git a/connpass.gemspec b/connpass.gemspec
index abc1234..def5678 100644
--- a/connpass.gemspec
+++ b/connpass.gemspec
@@ -21,6 +21,7 @@ spec.required_ruby_version = '>= 1.9.3'
spec.add_dependency "hashie"
spec.add_development_dependency "bundler"
+ spec.add_development_dependency "minitest"
spec.add_development_dependency "rake"
spec.add_development_dependency "fakeweb"
end
|
Add minitest to development dependency
Now, minitest is gemified (not included in ruby-core)
```
$ bundle exec rake test
/Users/sue445/.rbenv/versions/3.0.3/bin/ruby -w -I"lib" /Users/sue445/workspace/github.com/deeeki/connpass/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/rake_test_loader.rb "spec/connpass_spec.rb"
/Users/sue445/workspace/github.com/deeeki/connpass/spec/spec_helper.rb:12:in `require': cannot load such file -- minitest/autorun (LoadError)
from /Users/sue445/workspace/github.com/deeeki/connpass/spec/spec_helper.rb:12:in `<top (required)>'
from /Users/sue445/workspace/github.com/deeeki/connpass/spec/connpass_spec.rb:2:in `require'
from /Users/sue445/workspace/github.com/deeeki/connpass/spec/connpass_spec.rb:2:in `<top (required)>'
from /Users/sue445/workspace/github.com/deeeki/connpass/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/rake_test_loader.rb:21:in `require'
from /Users/sue445/workspace/github.com/deeeki/connpass/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/rake_test_loader.rb:21:in `block in <main>'
from /Users/sue445/workspace/github.com/deeeki/connpass/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/rake_test_loader.rb:6:in `select'
from /Users/sue445/workspace/github.com/deeeki/connpass/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/rake_test_loader.rb:6:in `<main>'
rake aborted!
Command failed with status (1): [ruby -w -I"lib" /Users/sue445/workspace/github.com/deeeki/connpass/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/rake_test_loader.rb "spec/connpass_spec.rb" ]
/Users/sue445/workspace/github.com/deeeki/connpass/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/Users/sue445/.rbenv/versions/3.0.3/bin/bundle:23:in `load'
/Users/sue445/.rbenv/versions/3.0.3/bin/bundle:23:in `<main>'
Tasks: TOP => test
(See full trace by running task with --trace)
```
|
diff --git a/resources/chef-repo/site-cookbooks/cloudconductor_init/recipes/default.rb b/resources/chef-repo/site-cookbooks/cloudconductor_init/recipes/default.rb
index abc1234..def5678 100644
--- a/resources/chef-repo/site-cookbooks/cloudconductor_init/recipes/default.rb
+++ b/resources/chef-repo/site-cookbooks/cloudconductor_init/recipes/default.rb
@@ -1,16 +1,25 @@ include_recipe 'yum-epel'
include_recipe 'serf'
-#override template
+
+# delete 70-persistent-net.rules extra lines
+file '/etc/udev/rules.d/70-persistent-net.rules' do
+ _file = Chef::Util::FileEdit.new(path)
+ _file.search_file_replace_line('^SUBSYSTEM.*', '')
+ _file.search_file_replace_line('^# PCI device .*', '')
+ content _file.send(:editor).lines.join
+end
+
+# override template
r = resources(template: '/etc/init.d/serf')
r.cookbook 'cloudconductor_init'
-#install golang
+# install golang
yum_package 'golang' do
action :install
options '--enablerepo=epel'
end
-#install mercurial
+# install mercurial
yum_package 'mercurial' do
action :install
end
@@ -32,7 +41,7 @@ creates '/usr/local/bin/pluginhook'
end
-#install event-handler
+# install event-handler
cookbook_file node['serf']['agent']['event_handlers'].first do
source 'event-handler'
mode 0755
|
Add resouce 70-persistent-net.rules to correct device names.
|
diff --git a/lib/panther/authorizer.rb b/lib/panther/authorizer.rb
index abc1234..def5678 100644
--- a/lib/panther/authorizer.rb
+++ b/lib/panther/authorizer.rb
@@ -19,7 +19,7 @@ ) unless authorize(
model: model,
params: params,
- operation: operation.operation_name
+ operation: operation
)
end
|
Fix operation name being passed instead of operation
|
diff --git a/box_view.gemspec b/box_view.gemspec
index abc1234..def5678 100644
--- a/box_view.gemspec
+++ b/box_view.gemspec
@@ -6,10 +6,10 @@ Gem::Specification.new do |spec|
spec.name = "box_view"
spec.version = BoxView::VERSION
- spec.authors = ["reillyforshaw"]
+ spec.authors = ["Reilly Forshaw"]
spec.email = ["reilly.forshaw@goclio.com"]
- spec.description = %q{TODO: Write a gem description}
- spec.summary = %q{TODO: Write a gem summary}
+ spec.description = "API client for Box View"
+ spec.summary = "A ruby library to interact with Box View"
spec.homepage = ""
spec.license = "MIT"
|
Update my name, description and summary
|
diff --git a/lib/resync/xml_factory.rb b/lib/resync/xml_factory.rb
index abc1234..def5678 100644
--- a/lib/resync/xml_factory.rb
+++ b/lib/resync/xml_factory.rb
@@ -19,8 +19,9 @@ def self.parse(xml:)
root_element = XML.element(xml)
capability = REXML::XPath.first(root_element, CAPABILITY_ATTRIBUTE).value
+ mapping = root_element.name == 'sitemapindex' ? :sitemapindex : :_default
root_type = ROOT_TYPES.find { |t| t::CAPABILITY == capability }
- root_type.load_from_xml(root_element)
+ root_type.load_from_xml(root_element, mapping: mapping)
end
end
|
Use alternate mapping when parsing sitemapindex
|
diff --git a/test/integration/default/serverspec/default_spec.rb b/test/integration/default/serverspec/default_spec.rb
index abc1234..def5678 100644
--- a/test/integration/default/serverspec/default_spec.rb
+++ b/test/integration/default/serverspec/default_spec.rb
@@ -6,12 +6,41 @@ expect(package 'dsc20').to be_installed
end
- it 'is running' do
- expect(service 'cassandra').to be_running
- end
-
it 'is enabled' do
expect(service 'cassandra').to be_enabled
end
+ # On Centos, C* doesn't start due Java 6 being installed, and not 7.
+ # On ubuntu, C* doesn't start due a jamm error.
+ # it 'is running' do
+ # expect(service 'cassandra').to be_running
+ # end
+
end
+
+describe 'cassandra configuration' do
+
+ case os[:family]
+ when 'debian'
+ when 'ubuntu'
+ cassandra_config = '/etc/cassandra/cassandra.yaml'
+ when 'redhat'
+ cassandra_config = '/etc/cassandra/conf/cassandra.yaml'
+ end
+
+ describe file(cassandra_config) do
+ it { should be_file }
+ end
+
+end
+
+describe 'cassandra user' do
+
+ describe user('cassandra') do
+ it { should exist }
+ it { should belong_to_group 'cassandra' }
+ it { should have_login_shell '/bin/bash' }
+ it { should have_home_directory '/home/cassandra' }
+ end
+
+end
|
Add tests for cassandra user, sadly comment out test that C* is actually running.
|
diff --git a/Casks/mini-metro.rb b/Casks/mini-metro.rb
index abc1234..def5678 100644
--- a/Casks/mini-metro.rb
+++ b/Casks/mini-metro.rb
@@ -1,7 +1,7 @@ class MiniMetro < Cask
- url 'http://static.dinopoloclub.com/minimetro/builds/alpha11/MiniMetro-alpha11-osx.zip'
+ url 'http://static.dinopoloclub.com/minimetro/builds/alpha12/MiniMetro-alpha12-osx.zip'
homepage 'http://dinopoloclub.com/minimetro/'
- version 'Alpha 11'
- sha256 'c748fc7602057e71d9590fcc039bd6150d4907ade82c80bdce7d96e8aa1ca022'
- link 'MiniMetro-alpha11-osx.app', :target => 'Mini Metro.app'
+ version 'Alpha 12'
+ sha256 '0c81781fff8984f41276fe2c9c0a1da7bdfd18c8970fbe4b8c4ff2376936e7bd'
+ link 'MiniMetro-alpha12-osx.app', :target => 'Mini Metro.app'
end
|
Update Mini Metro to alpha12
|
diff --git a/Casks/torbrowser.rb b/Casks/torbrowser.rb
index abc1234..def5678 100644
--- a/Casks/torbrowser.rb
+++ b/Casks/torbrowser.rb
@@ -1,6 +1,6 @@ cask :v1 => 'torbrowser' do
- version '4.0.3'
- sha256 'abe638633449835e6c4f35379635d4c3a8d34337abab4503c3dad28fa6d1327c'
+ version '4.0.4'
+ sha256 'c47bcb38f75f31e780b45472517b8e30632793ca969244fdc54d01dade3ac512'
url "https://www.torproject.org/dist/torbrowser/#{version}/TorBrowser-#{version}-osx32_en-US.dmg"
gpg "#{url}.asc",
|
Update Tor Browser to 4.0.4.
|
diff --git a/examples/stream-rx.rb b/examples/stream-rx.rb
index abc1234..def5678 100644
--- a/examples/stream-rx.rb
+++ b/examples/stream-rx.rb
@@ -7,6 +7,9 @@ uber = RUbertooth::Ubertooth.new
puts "Found device: '#{uber.device.inspect}'"
+
+# set sweep mode
+uber.set_channel 9999
puts "Waiting for data ...\n\n"
|
Set sweep mode on startup
|
diff --git a/config/logging.rb b/config/logging.rb
index abc1234..def5678 100644
--- a/config/logging.rb
+++ b/config/logging.rb
@@ -1,6 +1,7 @@ require "logger"
-Log = LOGGER if defined?(LOGGER)
-Log ||= Logger.new(STDOUT)
+unless defined?(LOGGER)
+ LOGGER = Logger.new("/dev/null")
+end
ActiveRecord::Base.logger.level = Logger::WARN if ActiveRecord::Base.logger
|
Fix failing specs due to LOGGER not being defined.
|
diff --git a/config/unicorn.rb b/config/unicorn.rb
index abc1234..def5678 100644
--- a/config/unicorn.rb
+++ b/config/unicorn.rb
@@ -0,0 +1,7 @@+def load_file_if_exists(config, file)
+ config.instance_eval(File.read(file)) if File.exist?(file)
+end
+load_file_if_exists(self, "/etc/govuk/unicorn.rb")
+
+working_directory File.dirname(File.dirname(__FILE__))
+worker_processes 4
|
Increase the number of workers to 4 per box
|
diff --git a/changit.gemspec b/changit.gemspec
index abc1234..def5678 100644
--- a/changit.gemspec
+++ b/changit.gemspec
@@ -4,11 +4,14 @@ Gem::Specification.new do |gem|
gem.authors = ["aaooki"]
gem.email = ["aaooki7@gmail.com"]
- gem.description = %q{Change git config for multiple projects at once.}
- gem.summary = %q{Change git config for multiple projects at once.}
+ gem.description = %q{An over-engineered tool to change git config for multiple projects at once.}
+ gem.summary = %q{An over-engineered tool to change git config for multiple projects at once.}
gem.homepage = "http://aaooki.github.io"
- gem.files = `git ls-files`.split($\)
+ gem.files = `git ls-files`.split($\).reject do |f|
+ f.match(%r{^(test|spec|features)/})
+ end
+
gem.executables = ["changit"]
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.name = "changit"
|
Update description && remove tests from gem.files
|
diff --git a/RDHOrderedDictionary.podspec b/RDHOrderedDictionary.podspec
index abc1234..def5678 100644
--- a/RDHOrderedDictionary.podspec
+++ b/RDHOrderedDictionary.podspec
@@ -1,6 +1,6 @@ Pod::Spec.new do |s|
s.name = 'RDHOrderedDictionary'
- s.version = '1.0.0'
+ s.version = '0.0.1'
s.license = 'MIT'
s.summary = 'Inline view that expands to show a UIPickerView/UIDatePickerView.'
|
Set podspec version to 0.0.1 for inital tests
|
diff --git a/consensus.gemspec b/consensus.gemspec
index abc1234..def5678 100644
--- a/consensus.gemspec
+++ b/consensus.gemspec
@@ -8,8 +8,8 @@ spec.version = Consensus::VERSION
spec.authors = ["Steve Jorgensen"]
spec.email = ["stevej@stevej.name"]
- spec.summary = %q{A data stransfer object that can have lazy attributes.}
- spec.description = %q{A data stransfer object that can have lazy attributes.}
+ spec.summary = %q{A data transfer object that can have lazy attributes.}
+ spec.description = %q{A data transfer object that can have lazy attributes.}
spec.homepage = ""
spec.license = "MIT"
|
Fix typo in description in gemspec.
|
diff --git a/spec/dummy/config/initializers/secret_token.rb b/spec/dummy/config/initializers/secret_token.rb
index abc1234..def5678 100644
--- a/spec/dummy/config/initializers/secret_token.rb
+++ b/spec/dummy/config/initializers/secret_token.rb
@@ -4,4 +4,6 @@ # If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
-Dummy::Application.config.secret_token = 'c00157b5a1bb6181792f0f4a8a080485de7bab9987e6cf159dc74c4f0573345c1bfa713b5d756e1491fc0b098567e8a619e2f8d268eda86a20a720d05d633780'
+Dummy::Application.config.secret_key_base =
+ Dummy::Application.config.secret_token =
+ 'c00157b5a1bb6181792f0f4a8a080485de7bab9987e6cf159dc74c4f0573345c1bfa713b5d756e1491fc0b098567e8a619e2f8d268eda86a20a720d05d633780'
|
Fix rails4 secret token config option.
|
diff --git a/spec/controllers/sessions_controller_spec.rb b/spec/controllers/sessions_controller_spec.rb
index abc1234..def5678 100644
--- a/spec/controllers/sessions_controller_spec.rb
+++ b/spec/controllers/sessions_controller_spec.rb
@@ -0,0 +1,23 @@+require 'spec_helper'
+
+describe SessionsController do
+ describe "'after_sign_in_path_for'" do
+ let!(:club) { FactoryGirl.create :club }
+
+ describe "for a subscription request" do
+ before :each do
+ session[:subscription] = FactoryGirl.create :subscription, :club => club
+ end
+
+ it "returns the subscribe_to_club_path" do
+ subject.send(:after_sign_in_path_for, User.new).should == subscribe_to_club_path(club)
+ end
+ end
+
+ describe "for a normal sign in" do
+ it "returns the home page" do
+ subject.send(:after_sign_in_path_for, User.new).should == "/"
+ end
+ end
+ end
+end
|
Add Spec for SessionsController for Subscription
Add a spec to test the SessionsController routing based on whether a
subscription is present in the session.
|
diff --git a/spec/dummy/config/initializers/doorkeeper.rb b/spec/dummy/config/initializers/doorkeeper.rb
index abc1234..def5678 100644
--- a/spec/dummy/config/initializers/doorkeeper.rb
+++ b/spec/dummy/config/initializers/doorkeeper.rb
@@ -12,4 +12,10 @@ # admin_authenticator do
# Admin.find_by_id(session[:admin_id]) || redirect_to main_app.new_admin_session_path
# end
+ #
+ #
+ authorization_scopes do
+ scope :public, :default => true, :description => "The public one"
+ scope :write, :description => "Updating information"
+ end
end
|
Add authorization scopes to dummy app
|
diff --git a/spec/metric_fu/metric_spec.rb b/spec/metric_fu/metric_spec.rb
index abc1234..def5678 100644
--- a/spec/metric_fu/metric_spec.rb
+++ b/spec/metric_fu/metric_spec.rb
@@ -1,19 +1,25 @@ require 'spec_helper'
describe MetricFu::Metric do
+ before do
+ @metric = MetricFu::Metric.get_metric(:flog)
+ @original_options = @metric.run_options.dup
+ end
+
it 'can have its run_options over-written' do
- metric = MetricFu::Metric.get_metric(:flog)
- original_options = metric.run_options.dup
new_options = {:foo => 'bar'}
- metric.run_options = new_options
- expect(original_options).to_not eq(new_options)
- expect(metric.run_options).to eq(new_options)
+ @metric.run_options = new_options
+ expect(@original_options).to_not eq(new_options)
+ expect(@metric.run_options).to eq(new_options)
end
+
it 'can have its run_options modified' do
- metric = MetricFu::Metric.get_metric(:flog)
- original_options = metric.run_options.dup
new_options = {:foo => 'bar'}
- metric.run_options.merge!(new_options)
- expect(metric.run_options).to eq(original_options.merge(new_options))
+ @metric.run_options.merge!(new_options)
+ expect(@metric.run_options).to eq(@original_options.merge(new_options))
+ end
+
+ after do
+ @metric.run_options = @original_options
end
end
|
Clean up spec with side effect.
|
diff --git a/event_store-messaging.gemspec b/event_store-messaging.gemspec
index abc1234..def5678 100644
--- a/event_store-messaging.gemspec
+++ b/event_store-messaging.gemspec
@@ -2,7 +2,7 @@ Gem::Specification.new do |s|
s.name = 'event_store-messaging'
s.summary = 'Messaging primitives for EventStore using the EventStore Client HTTP library'
- s.version = '0.2.0.1'
+ s.version = '0.2.0.2'
s.authors = ['']
s.require_paths = ['lib']
s.files = Dir.glob('{lib}/**/*')
|
Package version increased from 0.2.0.1 to 0.2.0.2
|
diff --git a/app/controllers/albums.rb b/app/controllers/albums.rb
index abc1234..def5678 100644
--- a/app/controllers/albums.rb
+++ b/app/controllers/albums.rb
@@ -18,6 +18,8 @@ @path = directory.path
# Convert the path to UTF-8 if Ruby 1.9
@path.force_encoding('utf-8') if @path.respond_to?(:force_encoding)
+
+ @page_title = directory.path[1..-1]
render 'albums/show'
end
|
Use album path as Album page title
|
diff --git a/app/models/email_setup.rb b/app/models/email_setup.rb
index abc1234..def5678 100644
--- a/app/models/email_setup.rb
+++ b/app/models/email_setup.rb
@@ -3,7 +3,35 @@ @key = key
end
- def go
- # do stuff
+ def save!
+ create_catch_all
+ write_config
+ end
+
+ private
+
+ def api
+ @api ||= MailgunApi.new(@key)
+ end
+
+ delegate :create_catch_all, to: :api
+
+ def write_config
+ # TODO
+ end
+
+ def config
+ {
+ Rails.env.to_s => {
+ 'smtp' => {
+ 'address' => 'smtp.mailgun.org',
+ 'port' => 587,
+ 'domain' => Site.current.email_host,
+ 'authentication' => 'plain',
+ 'user_name' => 'TODO',
+ 'password' => 'TODO'
+ }
+ }
+ }
end
end
|
Add some more to the EmailSetup process
|
diff --git a/config/deploy/dynamic.rb b/config/deploy/dynamic.rb
index abc1234..def5678 100644
--- a/config/deploy/dynamic.rb
+++ b/config/deploy/dynamic.rb
@@ -9,6 +9,7 @@ set :deploy_to, ENV['DEPLOY_TO']
set :hls_dir, ENV['HLS_DIR']
set :user, ENV['USER']
+set :yarn_flags, "--#{ENV['RAILS_ENV']}"
server ENV['APP_HOST'], roles: %w{web app db}, user: ENV['USER'] || 'avalon'
server ENV['RESQUE_HOST'] || ENV['APP_HOST'], roles: %w{resque_worker resque_scheduler}, user: ENV['RESQUE_USER'] || 'avalon'
append :linked_files, ENV['LINKED_FILES'] if ENV['LINKED_FILES']
|
Add yarn flag to capistrano
|
diff --git a/Casks/moneymoney.rb b/Casks/moneymoney.rb
index abc1234..def5678 100644
--- a/Casks/moneymoney.rb
+++ b/Casks/moneymoney.rb
@@ -2,8 +2,8 @@ version :latest
sha256 :no_check
- url 'http://moneymoney-app.com/download/MoneyMoney.zip'
- appcast 'http://moneymoney-app.com/update/appcast.xml'
+ url 'https://moneymoney-app.com/download/MoneyMoney.zip'
+ appcast 'https://moneymoney-app.com/update/appcast.xml'
name 'MoneyMoney'
homepage 'https://moneymoney-app.com/'
license :unknown # todo: change license and remove this comment; ':unknown' is a machine-generated placeholder
|
Fix url and appcast to use SSL in MoneyMoney Cask
The HTTP URL is already getting redirected to HTTPS. Using the HTTPS URL directly
makes it more secure and saves a HTTP round-trip.
|
diff --git a/Casks/parallels9.rb b/Casks/parallels9.rb
index abc1234..def5678 100644
--- a/Casks/parallels9.rb
+++ b/Casks/parallels9.rb
@@ -0,0 +1,20 @@+class Parallels < Cask
+ version '9.0.24237.1028877'
+ sha256 'da71645ff1f0076ab5b2f8fa5eefb63bcd921e5f52161fd4dd85e6fb19ae2c57'
+
+ url "http://download.parallels.com/desktop/v9/update2.hotfix2/ParallelsDesktop-#{version}.dmg"
+ homepage 'http://www.parallels.com/products/desktop/'
+ license :unknown
+
+ pkg 'Install.mpkg'
+
+ uninstall :pkgutil => 'com.parallels.pkg.virtualization.bundle',
+ :kext => [
+ 'com.parallels.kext.usbconnect',
+ 'com.parallels.kext.hypervisor',
+ 'com.parallels.kext.hidhook',
+ 'com.parallels.kext.netbridge',
+ 'com.parallels.kext.vnic',
+ ]
+ zap :delete => '~/.parallels_settings'
+end
|
Move Parallels 9 to Cask versions repo
|
diff --git a/Casks/tower-beta.rb b/Casks/tower-beta.rb
index abc1234..def5678 100644
--- a/Casks/tower-beta.rb
+++ b/Casks/tower-beta.rb
@@ -0,0 +1,24 @@+cask :v1 => 'tower-beta' do
+ version '2.2.2-281'
+ sha256 '83fdbb887c394ed0f76bf91c66972d28bc6d36f144c21dfd582ccb09d5e19864'
+
+ # amazonaws.com is the official download host per the vendor homepage
+ url "https://fournova-app-updates.s3.amazonaws.com/apps/tower2-mac/281-3f2b7672/Tower-2-#{version}.zip"
+ appcast 'https://updates.fournova.com/updates/tower2-mac/beta'
+ name 'Tower'
+ homepage 'http://www.git-tower.com/'
+ license :commercial
+
+ app 'Tower.app'
+ binary 'Tower.app/Contents/MacOS/gittower'
+
+ zap :delete => [
+ '~/Library/Application Support/com.fournova.Tower2',
+ '~/Library/Caches/com.fournova.Tower2',
+ '~/Library/Preferences/com.fournova.Tower2.plist',
+ ]
+
+ caveats do
+ files_in_usr_local
+ end
+end
|
Add Tower beta channel (currently v2.2.2)
This commit adds the Tower beta channel to Versions. It is based on
the main `tower.rb` in `homebrew-cask`, with updates for the beta
appcast.
|
diff --git a/config/initializers/services.rb b/config/initializers/services.rb
index abc1234..def5678 100644
--- a/config/initializers/services.rb
+++ b/config/initializers/services.rb
@@ -17,6 +17,6 @@
dashboards = YAML.load(File.read(services_yaml_path))["dashboards"]
-services = dashboards.map {|properties| Service.new(properties)}.select(&:toggled_on?).map {|service| [service.slug, service] }
+services = dashboards.map {|properties| Service.new(properties)}.select(&:toggled_on?)
-Limelight::Application.config.available_services = Hash[*services.flatten]+Limelight::Application.config.available_services = services.index_by(&:slug)
|
Simplify service parsing by using index_by.
|
diff --git a/test/functional/application_controller_test.rb b/test/functional/application_controller_test.rb
index abc1234..def5678 100644
--- a/test/functional/application_controller_test.rb
+++ b/test/functional/application_controller_test.rb
@@ -5,7 +5,7 @@
setup do
@request.env["devise.mapping"] = Devise.mappings[:admin]
- sign_in FactoryGirl.create(:admin)
+ sign_in FactoryGirl.create(:admin, username: "admin")
end
test "should test development functions" do
|
Create an admin to use for dev purposes
|
diff --git a/actionview/lib/action_view/helpers/tags/datetime_field.rb b/actionview/lib/action_view/helpers/tags/datetime_field.rb
index abc1234..def5678 100644
--- a/actionview/lib/action_view/helpers/tags/datetime_field.rb
+++ b/actionview/lib/action_view/helpers/tags/datetime_field.rb
@@ -14,7 +14,7 @@ private
def format_date(value)
- raise NoImplementedError
+ raise NotImplementedError
end
def datetime_value(value)
|
Fix typo in exception class name
|
diff --git a/lib/juicy/helpers/url_helpers.rb b/lib/juicy/helpers/url_helpers.rb
index abc1234..def5678 100644
--- a/lib/juicy/helpers/url_helpers.rb
+++ b/lib/juicy/helpers/url_helpers.rb
@@ -2,7 +2,7 @@ case project
when String
"/builds/#{project}"
- when Juicy::Build
+ when ::Juicy::Project
"/builds/#{project.name}"
end
end
|
Fix incorrect type detection in helper
|
diff --git a/lib/authpds-nyu/session/callbacks.rb b/lib/authpds-nyu/session/callbacks.rb
index abc1234..def5678 100644
--- a/lib/authpds-nyu/session/callbacks.rb
+++ b/lib/authpds-nyu/session/callbacks.rb
@@ -8,7 +8,7 @@ # Try to establish a PDS SSO session one time
def attempt_sso?
if controller.session[:session_id].blank? and controller.session[:attempted_sso].blank?
- controller.session[:attempted_sso] = "true"
+ controller.session[:attempted_sso] = true
return true
end
return false
|
Use true instead of "true" for the attempted sso store :department_store:.
|
diff --git a/examples/show_some_emoji.rb b/examples/show_some_emoji.rb
index abc1234..def5678 100644
--- a/examples/show_some_emoji.rb
+++ b/examples/show_some_emoji.rb
@@ -1,3 +1,5 @@+# to run this, just do
+# rspec -r emoji_test_love/rspec examples/show_some_emoji.rb --format EmojiTestLove::SmileyFacesFormatter
describe 'some tests to show off the magic!' do
# generate many passes!
50.times do |i|
@@ -17,3 +19,5 @@ pending "don't care!"
end
end
+
+
|
Add example of how to run it to the example file
|
diff --git a/rails/app/controllers/feeds_controller.rb b/rails/app/controllers/feeds_controller.rb
index abc1234..def5678 100644
--- a/rails/app/controllers/feeds_controller.rb
+++ b/rails/app/controllers/feeds_controller.rb
@@ -15,6 +15,6 @@ end
def mpdream_info
- @policy_member_distances = PolicyMemberDistance.where(dream_id: params[:id])
+ @policy_member_distances = PolicyMemberDistance.joins(:member).where(dream_id: params[:id])
end
end
|
Add join so we get the right number of results
|
diff --git a/cookbook-release.gemspec b/cookbook-release.gemspec
index abc1234..def5678 100644
--- a/cookbook-release.gemspec
+++ b/cookbook-release.gemspec
@@ -23,7 +23,7 @@ spec.add_dependency 'highline'
spec.add_dependency 'mixlib-shellout'
spec.add_dependency 'chef'
- spec.add_dependency 'git'
+ spec.add_dependency 'git-ng' # see https://github.com/schacon/ruby-git/issues/307
spec.add_development_dependency 'rspec'
|
Use git-ng gem (fork of git)
git gem is not maintained.
Change-Id: I71bb822864568ded0452e160f5df804bafb80569
|
diff --git a/lib/output/last_measurement_store.rb b/lib/output/last_measurement_store.rb
index abc1234..def5678 100644
--- a/lib/output/last_measurement_store.rb
+++ b/lib/output/last_measurement_store.rb
@@ -21,7 +21,8 @@ stroom_dal: measurement.stroom_dal.to_f,
stroom_piek: measurement.stroom_piek.to_f,
stroom_current: measurement.stroom_current.to_f,
- gas: measurement.gas.to_f
+ gas: measurement.gas.to_f,
+ water: measurement.water.to_f
}
File.write(filename, hash.to_json)
|
Store water value in LastMeasurementStore.
|
diff --git a/lib/puppet/provider/nodejs/nodenv.rb b/lib/puppet/provider/nodejs/nodenv.rb
index abc1234..def5678 100644
--- a/lib/puppet/provider/nodejs/nodenv.rb
+++ b/lib/puppet/provider/nodejs/nodenv.rb
@@ -14,7 +14,13 @@
command << "--source" if @resource[:compile]
- execute command, command_opts
+ if Puppet.version =~ /^3\./
+ execute command, command_opts
+ else
+ withenv command_env do
+ execute command
+ end
+ end
end
def destroy
@@ -24,7 +30,13 @@ @resource[:version]
]
- execute command, command_opts
+ if Puppet.version =~ /^3\./
+ execute command, command_opts
+ else
+ withenv command_env do
+ execute command
+ end
+ end
end
def exists?
@@ -35,12 +47,16 @@ def command_opts
{
:combine => true,
- :custom_environment => {
- "NODENV_ROOT" => @resource[:nodenv_root],
- "PATH" => "#{@resource[:nodenv_root]}/bin:/usr/bin:/usr/sbin:/bin:/sbin"
- },
+ :custom_environment => command_env,
:failonfail => true,
:uid => @resource[:user]
}
end
+
+ def command_env
+ {
+ "NODENV_ROOT" => @resource[:nodenv_root],
+ "PATH" => "#{@resource[:nodenv_root]}/bin:/usr/bin:/usr/sbin:/bin:/sbin"
+ }
+ end
end
|
Use withenv for Puppet 2.x
|
diff --git a/lib/stack_master/commands/outputs.rb b/lib/stack_master/commands/outputs.rb
index abc1234..def5678 100644
--- a/lib/stack_master/commands/outputs.rb
+++ b/lib/stack_master/commands/outputs.rb
@@ -11,6 +11,7 @@
def perform
if stack
+ tp.set :max_width, 80
tp stack.outputs, :output_key, :output_value, :description
else
StackMaster.stdout.puts "Stack doesn't exist"
|
Increase the maximum allowed width of output
|
diff --git a/decorators.gemspec b/decorators.gemspec
index abc1234..def5678 100644
--- a/decorators.gemspec
+++ b/decorators.gemspec
@@ -1,7 +1,7 @@ Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = %q{decorators}
- s.version = %q{2.0.2}
+ s.version = %q{2.0.3}
s.description = %q{Manages the process of loading decorators into your Rails application.}
s.summary = %q{Rails decorators plugin.}
s.email = %q{gems@p.arndt.io}
@@ -18,7 +18,7 @@ readme.md
]
- s.add_dependency "railties", ">= 4.0.0", "< 5.1"
+ s.add_dependency "railties", ">= 4.0.0", "< 5.2"
s.add_development_dependency "rspec", "~> 3.5", ">= 3.5.0"
s.cert_chain = ["certs/parndt.pem"]
|
Add support for Rails 5.1
|
diff --git a/config/routes.rb b/config/routes.rb
index abc1234..def5678 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -3,7 +3,7 @@
get 'organizations/show'
- resources :pages
+ resources :pages, except: [:index]
namespace :admin do
DashboardManifest::DASHBOARDS.each do |dashboard_resource|
|
Remove index route for pages
|
diff --git a/rack-chrome_frame.gemspec b/rack-chrome_frame.gemspec
index abc1234..def5678 100644
--- a/rack-chrome_frame.gemspec
+++ b/rack-chrome_frame.gemspec
@@ -18,5 +18,6 @@
gem.add_dependency 'rack'
gem.add_development_dependency 'bundler'
+ gem.add_development_dependency 'rake'
gem.add_development_dependency 'rack-test'
end
|
Add rake to development dependencies
|
diff --git a/japanese_calendar.gemspec b/japanese_calendar.gemspec
index abc1234..def5678 100644
--- a/japanese_calendar.gemspec
+++ b/japanese_calendar.gemspec
@@ -1,4 +1,3 @@-# coding: utf-8
# frozen_string_literal: true
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
Remove unnecessary utf-8 encoding comment
|
diff --git a/refinerycms-testimonials.gemspec b/refinerycms-testimonials.gemspec
index abc1234..def5678 100644
--- a/refinerycms-testimonials.gemspec
+++ b/refinerycms-testimonials.gemspec
@@ -12,8 +12,8 @@ s.authors = 'tsdbrown - Luke Brown- magpieuk, Lee Irving - http://www.transcendit.co.uk, Anita Graham - http//:www.joli.com.au'
# Runtime dependencies
- s.add_dependency 'refinerycms-core', ['>= 3.0.0', '< 5.0']
- s.add_dependency 'rails', ['~> 6.0.0', '< 7']
+ s.add_dependency 'refinerycms-core', ['>= 4.0.1', '< 5.0']
+ s.add_dependency 'rails', ['~> 6.0', '< 7']
s.required_ruby_version = '>= 2.2.2'
end
|
Update Rails version to match Refinery
|
diff --git a/specs/duraction_spec.rb b/specs/duraction_spec.rb
index abc1234..def5678 100644
--- a/specs/duraction_spec.rb
+++ b/specs/duraction_spec.rb
@@ -35,5 +35,10 @@ result.size.must_equal 1
result.first[:service].must_match /^TEST APP/
end
+
+ it "should have a state of 'info'" do
+ d = RailsRiemannMiddleware::Duration.new(@event, @env, @start_time)
+ d.message[:state].must_equal "info"
+ end
end
|
Add spec for the state to default to info
Check that the state is info.
|
diff --git a/app/services/metrics/content_distribution_metrics.rb b/app/services/metrics/content_distribution_metrics.rb
index abc1234..def5678 100644
--- a/app/services/metrics/content_distribution_metrics.rb
+++ b/app/services/metrics/content_distribution_metrics.rb
@@ -2,7 +2,7 @@ class ContentDistributionMetrics
def count_content_per_level
counts_by_level.each_with_index do |count, level|
- Metrics.statsd.gauge("content_tagged.level_#{level + 1}", count)
+ Metrics.statsd.gauge("level_#{level + 1}.content_tagged", count)
end
end
|
Switch around the content_tagged metrics
Use level_N.content_tagged, rather than content_tagged.level_N as the
former is a bit clearer.
|
diff --git a/ice_cube.gemspec b/ice_cube.gemspec
index abc1234..def5678 100644
--- a/ice_cube.gemspec
+++ b/ice_cube.gemspec
@@ -19,7 +19,7 @@
s.add_development_dependency('rake')
s.add_development_dependency('rspec', '~> 2.12.0')
- s.add_development_dependency('activesupport', '>= 3.0.0')
+ s.add_development_dependency('activesupport', ['>= 3.0.0', ('<5' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.2.2'))].compact)
s.add_development_dependency('tzinfo')
s.add_development_dependency('i18n')
end
|
Fix tests on older rubies
Don't try to bring in new activesupport on versions of Ruby that don't
support it
|
diff --git a/providers/profile.rb b/providers/profile.rb
index abc1234..def5678 100644
--- a/providers/profile.rb
+++ b/providers/profile.rb
@@ -23,8 +23,8 @@ template new_resource.filename do
variables profile: {
path: new_resource.path_prepend + \
- new_resource.path + \
- new_resource.path_append,
+ new_resource.path + \
+ new_resource.path_append,
append_scripts: new_resource.append_scripts
}
|
C: Align the operands of an expression spanning multiple lines.
|
diff --git a/qa/qa/page/admin/menu.rb b/qa/qa/page/admin/menu.rb
index abc1234..def5678 100644
--- a/qa/qa/page/admin/menu.rb
+++ b/qa/qa/page/admin/menu.rb
@@ -3,15 +3,10 @@ module Admin
class Menu < Page::Base
def go_to_license
- within_middle_menu { click_link 'License' }
- end
-
- private
-
- def within_middle_menu
- page.within('.nav-control') do
- yield
- end
+ link = find_link 'License'
+ # Click space to scroll this link into the view
+ link.send_keys(:space)
+ link.click
end
end
end
|
Fix Admin -> License selector for GitLab QA specs
Closes gitlab-qa#68
|
diff --git a/ausalib.rb b/ausalib.rb
index abc1234..def5678 100644
--- a/ausalib.rb
+++ b/ausalib.rb
@@ -1,6 +1,6 @@ class Ausalib < Formula
- version_number = "1"
+ version_number = "16.3.1"
desc "AarhusSubatom analysis library"
homepage "https://git.kern.phys.au.dk/ausa/ausalib"
url "https://git.kern.phys.au.dk/ausa/ausalib/repository/archive.tar.gz?ref=#{version_number}"
|
Revert tag 1 and update to 16.3.1
|
diff --git a/files/gitlab-cookbooks/gitlab/libraries/omnibus_helper.rb b/files/gitlab-cookbooks/gitlab/libraries/omnibus_helper.rb
index abc1234..def5678 100644
--- a/files/gitlab-cookbooks/gitlab/libraries/omnibus_helper.rb
+++ b/files/gitlab-cookbooks/gitlab/libraries/omnibus_helper.rb
@@ -20,6 +20,10 @@ end
def service_enabled?(service_name)
+ # As part of https://gitlab.com/gitlab-org/omnibus-gitlab/issues/2078 services are
+ # being split to their own dedicated cookbooks, and attributes are being moved from
+ # node['gitlab'][service_name] to node[service_name]. Until they've been moved, we
+ # need to check both.
return node['gitlab'][service_name]['enable'] if node['gitlab'].key?(service_name)
node[service_name]['enable']
end
|
Add comment about checking for two different attributes in
service_enabled?
|
diff --git a/flann.rb b/flann.rb
index abc1234..def5678 100644
--- a/flann.rb
+++ b/flann.rb
@@ -2,8 +2,8 @@
class Flann < Formula
homepage 'http://www.cs.ubc.ca/~mariusm/index.php/FLANN/FLANN'
- url 'http://people.cs.ubc.ca/~mariusm/uploads/FLANN/flann-1.8.2-src.zip'
- sha1 '62ace1c41365dfc8ceabde1381febc5c8b71ad98'
+ url 'http://people.cs.ubc.ca/~mariusm/uploads/FLANN/flann-1.8.4-src.zip'
+ sha1 'e03d9d458757f70f6af1d330ff453e3621550a4f'
option 'enable-python', 'Enable python bindings'
option 'enable-matlab', 'Enable matlab/octave bindings'
|
Update to the latest version of FLANN
Fixes some bad memory [leaking](https://github.com/mariusmuja/flann/commit/b0425ef5d4d6174270f7503ddd32b1ff345bd59c)
Closes #197
|
diff --git a/data_objects/spec/spec_helper.rb b/data_objects/spec/spec_helper.rb
index abc1234..def5678 100644
--- a/data_objects/spec/spec_helper.rb
+++ b/data_objects/spec/spec_helper.rb
@@ -1,5 +1,5 @@ require 'rubygems'
require 'spec'
-require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'lib', 'data_objects'))
+require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'data_objects'))
require File.expand_path(File.join(File.dirname(__FILE__), 'do_mock'))
|
Fix data_objects.rb reference in spec helper.
|
diff --git a/lib/ember-cli/build_server.rb b/lib/ember-cli/build_server.rb
index abc1234..def5678 100644
--- a/lib/ember-cli/build_server.rb
+++ b/lib/ember-cli/build_server.rb
@@ -8,7 +8,7 @@
def start
symlink_to_assets_root
-
+ add_assets_to_precompile_list
@pid = spawn(command)
at_exit{ stop }
end
@@ -19,6 +19,14 @@ end
private
+
+ def symlink_to_assets_root
+ assets_path.join(name).make_symlink dist_path.join("assets")
+ end
+
+ def add_assets_to_precompile_list
+ Rails.configuration.assets.precompile << /(?:\/|\A)#{name}\//
+ end
def command
<<-CMD.squish
@@ -31,10 +39,6 @@ options.fetch(:path){ Rails.root.join("app", name) }
end
- def symlink_to_assets_root
- assets_path.join(name).make_symlink dist_path.join("assets")
- end
-
def dist_path
@dist_path ||= EmberCLI.root.join("apps", name).tap(&:mkpath)
end
|
Add ember assets to precompile list
|
diff --git a/app/helpers/devise_helper.rb b/app/helpers/devise_helper.rb
index abc1234..def5678 100644
--- a/app/helpers/devise_helper.rb
+++ b/app/helpers/devise_helper.rb
@@ -4,6 +4,13 @@ # Retain this method for backwards compatibility, deprecated in favour of modifying the
# devise/shared/error_messages partial
def devise_error_messages!
+ ActiveSupport::Deprecation.warn <<-DEPRECATION.strip_heredoc
+ [Devise] `DeviseHelper.devise_error_messages!`
+ is deprecated and it will be removed in the next major version.
+ To customize the errors styles please run `rails g devise:views` and modify the
+ `devise/shared/error_messages` partial.
+ DEPRECATION
+
return "" if resource.errors.empty?
render "devise/shared/error_messages", resource: resource
|
Add a deprecation warn for `DeviseHelper.devise_error_messages!`
To customize the error style one should modifying the
`devise/shared/error_messages` partial.
|
diff --git a/lib/axiom/types/object.rb b/lib/axiom/types/object.rb
index abc1234..def5678 100644
--- a/lib/axiom/types/object.rb
+++ b/lib/axiom/types/object.rb
@@ -6,11 +6,11 @@ # Represents an object type
class Object < Type
accept_options :primitive, :coercion_method
- primitive ::Object
+ primitive RUBY_VERSION >= '1.9' && defined?(::BasicObject) ? ::BasicObject : ::Object
coercion_method :to_object
def self.include?(object)
- object.kind_of?(primitive) && super
+ primitive === object && super
end
end # class Object
|
Fix code to work with BasicObject descendants
* In Ruby 1.9 BasicObject is the top-most object, and it does not
have #kind_of? so we use BasicObject#=== instead.
|
diff --git a/lib/linkedin/api/companies.rb b/lib/linkedin/api/companies.rb
index abc1234..def5678 100644
--- a/lib/linkedin/api/companies.rb
+++ b/lib/linkedin/api/companies.rb
@@ -21,6 +21,37 @@
execute root, opts.merge(selector: selector)
end
+
+
+ # to call this,
+ # client.company_search 'nike', fields: company_api_fields
+ # https://api.linkedin.com/v1/company-search?keywords=nike
+ #
+ # client.company_search 'nike', 'footwear', fields: company_api_fields
+ # https://api.linkedin.com/v1/company-search?keywords=nike%20footwear
+ #
+ # client.company_search 'nike', 'footwear', 'kobe', 'yellow', filter: 'hq-only=true', fields: company_api_fields
+ # https://api.linkedin.com/v1/company-search?keywords=nike%20footwear%20kobe%20yellow&hq-only=true
+
+ def company_search(*keywords, filter: nil, **opts)
+
+ opts[:params] = {} if opts[:params].blank?
+ opts[:params].merge! keywords: keywords.compact.join(' ')
+
+ unless filter.blank?
+ filter.each do |filt|
+ new_filt = Hash[*filt.to_s.split('=')] unless filter.respond_to? :keys
+ opts[:params].merge! new_filt
+ end
+ end
+
+ unless opts[:facets].blank?
+ facets = Hash['facets', opts[:facets]]
+ opts[:params].merge! facets
+ end
+
+ execute 'company-search', opts
+ end
end
end
end
|
Add missing company search method to company api wrapper
|
diff --git a/lib/cocoaseeds/command.rb b/lib/cocoaseeds/command.rb
index abc1234..def5678 100644
--- a/lib/cocoaseeds/command.rb
+++ b/lib/cocoaseeds/command.rb
@@ -1,9 +1,13 @@+require 'json'
+require 'net/http'
+
module Seeds
class Command
def self.run(argv)
case argv[0]
when 'install'
begin
+ self.check_update
Seeds::Core.new(Dir.pwd).install
rescue Seeds::Exception => e
puts "[!] #{e.message}".red
@@ -18,5 +22,22 @@ def self.help
puts 'Usage: seed install'
end
+
+ def self.check_update
+ begin
+ uri = URI('https://api.github.com/'\
+ 'repos/devxoul/CocoaSeeds/releases/latest')
+ data = JSON(Net::HTTP.get(uri))
+ latest = data["tag_name"]
+ if VERSION < latest
+ puts\
+ "\nCocoaSeeds #{latest} is available."\
+ " (You're using #{VERSION})\n"\
+ "To update: `$ gem install cocoaseeds`\n"\
+ "Changelog: https://github.com/devxoul/CocoaSeeds/releases\n".green
+ end
+ rescue
+ end
+ end
end
end
|
Check for update before installing seeds.
|
diff --git a/dm-core.gemspec b/dm-core.gemspec
index abc1234..def5678 100644
--- a/dm-core.gemspec
+++ b/dm-core.gemspec
@@ -11,7 +11,7 @@
gem.files = `git ls-files`.split("\n")
gem.test_files = `git ls-files -- {spec}/*`.split("\n")
- gem.extra_rdoc_files = %w[LICENSE README.rdoc]
+ gem.extra_rdoc_files = %w[LICENSE README.md]
gem.name = "dm-core"
gem.require_paths = [ "lib" ]
|
Update gemspec to reflect renaming to README.md
|
diff --git a/ffi_gen.gemspec b/ffi_gen.gemspec
index abc1234..def5678 100644
--- a/ffi_gen.gemspec
+++ b/ffi_gen.gemspec
@@ -9,7 +9,7 @@ s.email = "mail@richard-musiol.de"
s.homepage = "https://github.com/neelance/ffi_gen"
- s.add_dependency "ffi", ">= 1.0.0"
+ s.add_dependency "ffi", "~> 1.0"
s.files = Dir["lib/**/*.rb"] + ["LICENSE", "README.md", "lib/ffi_gen/empty.h"]
s.require_path = "lib"
-end+end
|
Change ffi dependency to ~> 1.0.
|
diff --git a/lib/sensu/plugin/check/cli.rb b/lib/sensu/plugin/check/cli.rb
index abc1234..def5678 100644
--- a/lib/sensu/plugin/check/cli.rb
+++ b/lib/sensu/plugin/check/cli.rb
@@ -31,7 +31,7 @@ end
def run
- unknown "No check implemented! You should override Sensu::Check::CLI#run."
+ unknown "No check implemented! You should override Sensu::Plugin::Check::CLI#run."
end
@@autorun = self
|
Fix class name in unimplemented run method
|
diff --git a/docker_tools.gemspec b/docker_tools.gemspec
index abc1234..def5678 100644
--- a/docker_tools.gemspec
+++ b/docker_tools.gemspec
@@ -18,9 +18,9 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]
- spec.add_dependency "bundler", "~> 1.3"
+ spec.add_dependency "bundler"
spec.add_dependency "rake"
- spec.add_dependency "docker-api", "= 1.32.1"
+ spec.add_dependency "docker-api", "~> 1.33.5"
spec.add_dependency "erubis"
spec.add_dependency "json"
end
|
Upgrade docker-api, remove version restriction on bundler.
|
diff --git a/geohash.gemspec b/geohash.gemspec
index abc1234..def5678 100644
--- a/geohash.gemspec
+++ b/geohash.gemspec
@@ -1,8 +1,6 @@-require 'lib/geohash'
-
Gem::Specification.new do |s|
s.name = "geohash"
- s.version = GeoHash::VERSION
+ s.version = '1.1.0'
s.date = "2008-11-27"
s.summary = "GeoHash Library for Ruby, per http://geohash.org implementation"
s.email = "dave@roundhousetech.com"
|
Make gemspec not rely on lib for version info
|
diff --git a/lib/letscert/io_plugin.rb b/lib/letscert/io_plugin.rb
index abc1234..def5678 100644
--- a/lib/letscert/io_plugin.rb
+++ b/lib/letscert/io_plugin.rb
@@ -0,0 +1,116 @@+module LetsCert
+
+ # Input/output plugin
+ class IOPlugin
+
+ # Plugin name
+ # @return [String]
+ attr_reader :name
+
+ # Allowed plugin names
+ ALLOWED_PLUGINS = %w(account_key.json cert.der cert.pem chain.pem full.pem) +
+ %w(fullchain.pem key.der key.pem)
+
+ EMPTY_DATA = { account_key: nil, key: nil, cert: nil, chain: nil }
+
+ @@registered = {}
+
+ # Register a plugin
+ def self.register(klass, name)
+ plugin = klass.new(name)
+ if plugin.name =~ /[\/\\]/ or ['.', '..'].include?(plugin.name)
+ raise Error, "plugin name should just ne a file name, without path"
+ end
+
+ @@registered[plugin.name] = plugin
+
+ klass
+ end
+
+ # Get registered plugins
+ def self.registered
+ @@registered
+ end
+
+ # Set logger
+ def self.logger=(logger)
+ @@loger = logger
+ end
+
+ def initialize(name)
+ @name = name
+ end
+
+ # @abstract This method must be overriden in subclasses
+ def load
+ raise NotImplementedError
+ end
+
+ # @abstract This method must be overriden in subclasses
+ def save
+ raise NotImplementedError
+ end
+
+ end
+
+
+ # {IOPlugin} which read/saves files on disk.
+ class FileIOPlugin < IOPlugin
+
+ def load
+ @@loger.debug { "Loading #@name" }
+
+ begin
+ content = File.read(@name)
+ rescue SystemCallError => ex
+ if ex.is_a? Errno::ENOENT
+ return EMPTY_DATA
+ end
+ raise
+ end
+
+ load_from_content(content)
+ end
+
+ # @abstract
+ def load_from_content(content)
+ raise NotImplementedError
+ end
+
+ def save_to_file(data)
+ @@logger.info { "saving #@name" }
+ end
+
+ end
+
+
+ # Mixin for IOPlugin subclasses
+ module JWKIOPlugin
+ def load_jwk(data)
+ end
+
+ def dump_jwk(jwk)
+ end
+ end
+
+
+ # Account key IO plugin
+ class AccountKey < FileIOPlugin
+ extend JWKIOPlugin
+
+ def persisted
+ { account_key: true }
+ end
+
+ def load_from_content(content)
+ { account_key: load_jwk(content) }
+ end
+
+ def save(data)
+ save_to_file(dump_jwk(data[:account_key]))
+ end
+
+ end
+ IOPlugin.register(AccountKey, 'account_key.json')
+
+end
|
Add IOPlugin, FileIOPlugin and AccountKey classes.
|
diff --git a/AAPLCollectionView.podspec b/AAPLCollectionView.podspec
index abc1234..def5678 100644
--- a/AAPLCollectionView.podspec
+++ b/AAPLCollectionView.podspec
@@ -0,0 +1,17 @@+Pod::Spec.new do |spec|
+ spec.name = 'AAPLCollectionView'
+ spec.version = '0.0.1'
+ spec.summary = 'This is a copy of the framework from Apple\'s AdvancedCollectionView sample code, with Xcode 7 and iOS 9 features removed for use in Xcode 6.4 and earlier.'
+ spec.homepage = 'http://www.mushroomcloud.co.za'
+ spec.author = { 'Rayman Rosevear' => 'ray@mushroomcloud.co.za' }
+ spec.source = { :git => 'git@github.com:MushroomCloud/AAPLCollectionView.git', :tag => '0.0.1' }
+ spec.platform = :ios, '7.0'
+ spec.license = 'Apache License, Version 2.0'
+
+ spec.source_files = 'AAPLCollectionView/*.h', 'AAPLCollectionView/Framework/*.{h,m}', 'AAPLCollectionView/Framework/*/*.{h,m}'
+
+ # Platform setup
+ spec.requires_arc = true
+ spec.ios.deployment_target = '7.0'
+
+end
|
Add a pod spec so this can be used as a cocoa pod
|
diff --git a/lib/ami_manager/deployer.rb b/lib/ami_manager/deployer.rb
index abc1234..def5678 100644
--- a/lib/ami_manager/deployer.rb
+++ b/lib/ami_manager/deployer.rb
@@ -1,7 +1,7 @@ module AmiManager
class Deployer
def deploy(ami_file, aws_access_key:, aws_secret_key:, ssh_key_name:)
- aws_ami_id = File.read ami_file
+ aws_ami_id = File.read(ami_file).strip
terraform.apply(
{
aws_ami_id: aws_ami_id,
|
Remove newlines from AMI name
|
diff --git a/lib/capistrano/rsync_scm.rb b/lib/capistrano/rsync_scm.rb
index abc1234..def5678 100644
--- a/lib/capistrano/rsync_scm.rb
+++ b/lib/capistrano/rsync_scm.rb
@@ -10,7 +10,7 @@ # The Capistrano default strategy for git. You should want to use this.
module GitStrategy
def check
- File.exists?(File.join('.git', 'refs', 'heads', fetch(:branch).to_s))
+ `git ls-remote #{fetch(:repo_url)} refs/heads/#{fetch(:branch)}`.lines.any?
end
def with_clone(&block)
|
Use git ls-remote to check for remote branch existence
|
diff --git a/lib/cf_deployer/defaults.rb b/lib/cf_deployer/defaults.rb
index abc1234..def5678 100644
--- a/lib/cf_deployer/defaults.rb
+++ b/lib/cf_deployer/defaults.rb
@@ -7,6 +7,5 @@ RaiseErrorForUnusedInputs = false
KeepPreviousStack = true
Platform = 'AWS'
- Platform = 'Openstack'
end
end
|
Fix default platform to be AWS
|
diff --git a/spec/active_record/model_spec.rb b/spec/active_record/model_spec.rb
index abc1234..def5678 100644
--- a/spec/active_record/model_spec.rb
+++ b/spec/active_record/model_spec.rb
@@ -11,6 +11,18 @@
it "connect to default" do
expect(Item.connection.pool.spec.config[:port]).to eq 3306
+ end
+
+ describe "Write to master, Read from slave" do
+ it "returns user object from slave database" do
+ user_from_master = User.create name: "alice"
+
+ user_from_slave = User.on_slave do
+ User.find user_from_master.id
+ end
+
+ expect(user_from_master).to eq user_from_slave
+ end
end
describe "Assosiations" do
|
Add spec write master, read slave databases
|
diff --git a/spec/dmm-crawler/ranking_spec.rb b/spec/dmm-crawler/ranking_spec.rb
index abc1234..def5678 100644
--- a/spec/dmm-crawler/ranking_spec.rb
+++ b/spec/dmm-crawler/ranking_spec.rb
@@ -21,7 +21,7 @@ let(:term) { '24' }
it { is_expected.not_to be_empty }
- it { is_expected.to all(include(:title, :title_link, :image_url, :tags)) }
+ it { is_expected.to all(include(:title, :title_link, :image_url, :description, :tags)) }
end
context 'with not registered argument' do
|
Add a attribute for description to an example
|
diff --git a/spec/features/disclosure_spec.rb b/spec/features/disclosure_spec.rb
index abc1234..def5678 100644
--- a/spec/features/disclosure_spec.rb
+++ b/spec/features/disclosure_spec.rb
@@ -35,7 +35,19 @@ click_on "Create Disclosure"
expect(page).to have_content "Disclosure was successfully created"
- expect(page).to have_content tag.name
+ expect(page).to have_link tag.name
+ end
+ end
+
+ feature "index page" do
+ it "has links to each disclosure" do
+ disclosure_1 = FactoryGirl.create(:disclosure)
+ disclosure_2 = FactoryGirl.create(:disclosure)
+
+ visit disclosures_path
+
+ expect(page).to have_link disclosure_1.title
+ expect(page).to have_link disclosure_2.title
end
end
end
|
Add test for disclosures index page, ensuring links to each disclosure page
|
diff --git a/spec/lib/resume/pdf/font_spec.rb b/spec/lib/resume/pdf/font_spec.rb
index abc1234..def5678 100644
--- a/spec/lib/resume/pdf/font_spec.rb
+++ b/spec/lib/resume/pdf/font_spec.rb
@@ -0,0 +1,68 @@+require 'resume/pdf/font'
+
+module Resume
+ module PDF
+ RSpec.describe Font do
+ describe '.configure' do
+ let(:font_families) { instance_double('Hash', :font_families) }
+ let(:pdf) do
+ instance_double(
+ 'Prawn::Document',
+ :pdf,
+ font_families: font_families
+ )
+ end
+ let(:font_name) { 'My Font' }
+ let(:normal_font_file) { 'normal.ttf' }
+ let(:bold_font_file) { 'bold.ttf' }
+ let(:font) do
+ {
+ name: font_name,
+ normal: normal_font_file,
+ bold: bold_font_file
+ }
+ end
+
+ context 'when selected font is included in Prawn font built-ins' do
+ let(:built_ins) { [font_name] }
+
+ before do
+ stub_const('Prawn::Font::AFM::BUILT_INS', built_ins)
+ end
+
+ it 'sets the PDF font to the selected font' do
+ expect(pdf).to receive(:font).with(font_name)
+ described_class.configure(pdf, font)
+ end
+ end
+
+ context 'when selected font is not included in Prawn font built-ins' do
+ let(:built_ins) { ['SomeOtherFont'] }
+ let(:normal_font_file_path) { "/tmp/#{normal_font_file}" }
+ let(:bold_font_file_path) { "/tmp/#{normal_font_file}" }
+
+ before do
+ stub_const('Prawn::Font::AFM::BUILT_INS', built_ins)
+ allow(FileSystem).to \
+ receive(:tmpfile_path).with(normal_font_file).
+ and_return(normal_font_file_path)
+ allow(FileSystem).to \
+ receive(:tmpfile_path).with(bold_font_file).
+ and_return(bold_font_file_path)
+ end
+
+ it 'updates the PDF font families with the font and sets it' do
+ expect(font_families).to receive(:update).with(
+ font_name => {
+ normal: normal_font_file_path,
+ bold: bold_font_file_path
+ }
+ )
+ expect(pdf).to receive(:font).with(font_name)
+ described_class.configure(pdf, font)
+ end
+ end
+ end
+ end
+ end
+end
|
Add specs for font since due to the conditional of updating font families if resume font is not included in the Prawn built-ins
|
diff --git a/spec/optparse/subcommand_spec.rb b/spec/optparse/subcommand_spec.rb
index abc1234..def5678 100644
--- a/spec/optparse/subcommand_spec.rb
+++ b/spec/optparse/subcommand_spec.rb
@@ -1,7 +1,7 @@ require 'optparse/subcommand'
describe OptionParser do
- def run(args)
+ def parse(args)
options.parse(args)
hits
end
@@ -31,13 +31,13 @@ end
end
- specify { expect(run(%w[-t])).to eq([:t]) }
- specify { expect(run(%w[foo])).to eq([:foo]) }
- specify { expect(run(%w[foo -q])).to eq([:foo, :foo_q]) }
- specify { expect(run(%w[foo bar])).to eq([:foo]) }
- specify { expect(run(%w[-t foo])).to eq([:t, :foo]) }
+ specify { expect(parse(%w[-t])).to eq([:t]) }
+ specify { expect(parse(%w[foo])).to eq([:foo]) }
+ specify { expect(parse(%w[foo -q])).to eq([:foo, :foo_q]) }
+ specify { expect(parse(%w[foo bar])).to eq([:foo]) }
+ specify { expect(parse(%w[-t foo])).to eq([:t, :foo]) }
- specify { expect { run(%w[foo -t]) }.to raise_error(OptionParser::InvalidOption )}
+ specify { expect { parse(%w[foo -t]) }.to raise_error(OptionParser::InvalidOption )}
specify { expect(options.to_s).to match(/foo/) }
end
|
Rename 'run' as 'parse' to better describe its role
|
diff --git a/lib/spec/rails/version.rb b/lib/spec/rails/version.rb
index abc1234..def5678 100644
--- a/lib/spec/rails/version.rb
+++ b/lib/spec/rails/version.rb
@@ -1,7 +1,7 @@ module Spec
module Rails
module VERSION #:nodoc:
- BUILD_TIME_UTC = 20080503223441
+ BUILD_TIME_UTC = 20080503234232
end
end
end
|
Add before_suite and after_suite callbacks to ExampleGroupMethods and Options
|
diff --git a/lib/spirit/device/base.rb b/lib/spirit/device/base.rb
index abc1234..def5678 100644
--- a/lib/spirit/device/base.rb
+++ b/lib/spirit/device/base.rb
@@ -5,6 +5,10 @@ def initialize(params = {})
@adapter = params.fetch(:adapter, default_adapter)
@configuration = params.fetch(:configuration, default_configuration)
+ end
+
+ def update_attributes(attributes = {})
+ attributes.each { |key, val| send("#{key}=", val) if respond_to?("#{key}=") }
end
private
|
Allow devices to updated by mass assigning attributes
|
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -2,4 +2,5 @@ # Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
+ include SessionsHelper
end
|
Include session helper in all application controllers
|
diff --git a/app/controllers/queue_items_controller.rb b/app/controllers/queue_items_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/queue_items_controller.rb
+++ b/app/controllers/queue_items_controller.rb
@@ -1,6 +1,7 @@ # API for Queue status data
class QueueItemsController < ApplicationController
def index
+ return render json: BackendService.new.get_general_queue if params['raw']
return render json: [] if Rails.cache.read('queue_items').nil?
render json: Rails.cache.read('queue_items')
end
|
Add raw query parameter in queue items API for debugging
Raw option simply fetches and prints the raw data from SOAP API
bypassing cache and all formatting.
|
diff --git a/lib/whatsup/collectors.rb b/lib/whatsup/collectors.rb
index abc1234..def5678 100644
--- a/lib/whatsup/collectors.rb
+++ b/lib/whatsup/collectors.rb
@@ -16,7 +16,9 @@ rack_env: ENV['RACK_ENV'],
config: {
allow_concurrency: Rails.configuration.allow_concurrency,
- time_zone: Rails.configuration.time_zone
+ time_zone: Rails.configuration.time_zone,
+ log_level: Rails.configuration.log_level,
+ rack_cache: Rails.configuration.action_dispatch
},
version: Rails::VERSION::STRING
}
@@ -28,6 +30,7 @@ {
description: RUBY_DESCRIPTION,
yamler: YAML::ENGINE.yamler,
+ multi_json_engine: (defined?(MultiJson) ? MultiJson.engine.name : nil),
gc: {
count: GC.count,
stat: (GC.respond_to?(:stat) ? GC.stat : nil),
|
Add more ruby and rails stats
|
diff --git a/lib/gretel/trails/stores/active_record_store.rb b/lib/gretel/trails/stores/active_record_store.rb
index abc1234..def5678 100644
--- a/lib/gretel/trails/stores/active_record_store.rb
+++ b/lib/gretel/trails/stores/active_record_store.rb
@@ -53,6 +53,8 @@ rec.expires_at = expires_at
rec.save
end
+ rescue ActiveRecord::RecordNotUnique
+ retry
end
def self.delete_expired
|
Add retry for race conditions
|
diff --git a/Casks/intellij-idea-eap.rb b/Casks/intellij-idea-eap.rb
index abc1234..def5678 100644
--- a/Casks/intellij-idea-eap.rb
+++ b/Casks/intellij-idea-eap.rb
@@ -1,9 +1,9 @@ cask :v1 => 'intellij-idea-eap' do
- version '139.872.1'
- sha256 'f9ea80b72d0d1aa78685cda89eb6e7a1719636901957193b167fb884e40e47c4'
+ version '140.2110.5'
+ sha256 '971cea43259cf517c209dd646c6c48220c97f22e35c0773b644b8c7578aea1c3'
url "http://download-cf.jetbrains.com/idea/ideaIU-#{version}.dmg"
- homepage 'https://confluence.jetbrains.com/display/IDEADEV/IDEA+14+EAP'
+ homepage 'https://confluence.jetbrains.com/display/IDEADEV/IDEA+14.1+EAP'
license :commercial
app 'IntelliJ IDEA 14 EAP.app'
|
Upgrade Intellij Idea EAP to v140.2110.5
|
diff --git a/Casks/omnioutliner-beta.rb b/Casks/omnioutliner-beta.rb
index abc1234..def5678 100644
--- a/Casks/omnioutliner-beta.rb
+++ b/Casks/omnioutliner-beta.rb
@@ -1,6 +1,6 @@ cask :v1 => 'omnioutliner-beta' do
- version '4.4.x-r244801'
- sha256 '45b7636ef8ab3c28aad9280fdf5317b7bf2ddda559673e1ae331b4fa982438e5'
+ version '4.4.x-r247831'
+ sha256 '587c0cee55c2459fb1ad03aeee46eaa5a9cdb02ebde20b298356ac27e10dc262'
url "http://omnistaging.omnigroup.com/omnioutliner-4/releases/OmniOutliner-#{version}-Test.dmg"
name 'OmniOutliner'
|
Update OmniOutliner Beta to version 4.4.x-r244801
This commit updates the version and sha256 stanzas.
|
diff --git a/lib/silencer/environment.rb b/lib/silencer/environment.rb
index abc1234..def5678 100644
--- a/lib/silencer/environment.rb
+++ b/lib/silencer/environment.rb
@@ -1,8 +1,9 @@ module Silencer
module Environment
- RAILS_2_3 = /^2.3/
- RAILS_3_2 = /^3.2/
RAILS_4 = /^4/
+ RAILS_5 = /^5/
+
+ module_function
def rails?
defined?(::Rails)
@@ -14,23 +15,16 @@ ::Rails::VERSION::STRING
end
- def rails2?
- rails_version =~ RAILS_2_3
- end
-
- def rails3_2?
- rails_version =~ RAILS_3_2
- end
-
def rails4?
rails_version =~ RAILS_4
end
- def tagged_logger?
- rails3_2? || rails4?
+ def rails5?
+ rails_version =~ RAILS_5
end
- module_function :rails?, :rails2?, :rails_version, :rails3_2?
- module_function :rails4?, :tagged_logger?
+ def tagged_logger?
+ rails4? || rails5?
+ end
end
end
|
Remove references to Rails 2 and 3
|
diff --git a/lib/tasks/compile_docs.rake b/lib/tasks/compile_docs.rake
index abc1234..def5678 100644
--- a/lib/tasks/compile_docs.rake
+++ b/lib/tasks/compile_docs.rake
@@ -1,6 +1,6 @@ namespace :enki do
desc "Generate AST files"
- task :generate_ast do
+ task :generate_ast => :environment do
Enki::Snowcrasher.compile_dir(src_dir: "doc", dst_dir: "doc_ast")
end
|
Load the rails environment before running rake tasks
|
diff --git a/example/blog.rb b/example/blog.rb
index abc1234..def5678 100644
--- a/example/blog.rb
+++ b/example/blog.rb
@@ -12,9 +12,6 @@ belongs_to :author
layout :all
-
- validates(:title){ presence and length :within => (3..100) }
- validates(:text){ presence }
save # submit design docs to CouchDB
end
|
Remove last traces of NotNaughty from example
|
diff --git a/spec/authentication_spec.rb b/spec/authentication_spec.rb
index abc1234..def5678 100644
--- a/spec/authentication_spec.rb
+++ b/spec/authentication_spec.rb
@@ -4,9 +4,30 @@
RSpec.describe WebBouncer::Authentication do
let(:action) { Action.new(account: account) }
- let(:account){ Account.new(nil) }
+ let(:account){ Account.new(id: 1) }
describe '#current_account' do
- it { expect(action.current_account).to eq account }
+ context 'when account does not exist' do
+ let(:action) { Action.new(account: nil) }
+ let(:account){ Account.new(nil) }
+
+ it { expect(action.current_account).to eq account }
+ end
+
+ context 'when account exist' do
+ it { expect(action.current_account).to eq account }
+ end
+ end
+
+ describe '#authenticated?' do
+ context 'when account does not exist' do
+ let(:action) { Action.new(account: nil) }
+
+ it { expect(action.authenticated?).to eq false }
+ end
+
+ context 'when account exist' do
+ it { expect(action.authenticated?).to eq true }
+ end
end
end
|
Add more tests for controller helpers
|
diff --git a/spec/docker_toolbox_spec.rb b/spec/docker_toolbox_spec.rb
index abc1234..def5678 100644
--- a/spec/docker_toolbox_spec.rb
+++ b/spec/docker_toolbox_spec.rb
@@ -16,3 +16,11 @@ describe command('which docker-compose') do
its(:exit_status) { should eq 0 }
end
+
+describe file('/etc/systemd/system/docker.service.d/docker.conf'), :if => os[:family] == 'debian' do
+ it { should be_owned_by 'root' }
+ it { should be_grouped_into 'root' }
+ its(:content) { should include('[Service]') }
+ its(:content) { should include('ExecStart=\n') }
+ its(:content) { should include('ExecStart=/usr/bin/docker daemon -H fd:// --insecure-registry 192.168.1.1 --insecure-registry 192.168.1.2') }
+end
|
Add a spec about Docker option.
|
diff --git a/spec/models/product_spec.rb b/spec/models/product_spec.rb
index abc1234..def5678 100644
--- a/spec/models/product_spec.rb
+++ b/spec/models/product_spec.rb
@@ -15,4 +15,10 @@ product.categories.create(name: 'Travel Gear')
expect(product.categories.last.name).to eq('Travel Gear')
end
+
+ it 'shows quantity sold' do
+ expect(product.sold).to eq(0)
+ Customer.last.orders.create.products << product
+ expect(product.sold).to eq(1)
+ end
end
|
Add spec for number sold for a product
|
diff --git a/spec/sinatra/twilio_spec.rb b/spec/sinatra/twilio_spec.rb
index abc1234..def5678 100644
--- a/spec/sinatra/twilio_spec.rb
+++ b/spec/sinatra/twilio_spec.rb
@@ -1,41 +1,31 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
-describe Sinatra do
+describe Sinatra::Application do
+ let(:app) { Sinatra::Application }
subject { app }
- context "classic apps" do
- let(:app) { Sinatra::Application }
- it { should respond_to(:respond) }
- end
+ describe "#respond" do
+ context "defining routes" do
+ let(:route) { "/foo" }
+ let(:action) { Proc.new {} }
- describe "modular apps" do
- let(:app) { Class.new(Sinatra::Base) { register Sinatra::Twilio } }
- it { should respond_to(:respond) }
+ before { app.respond(route, &action) }
- describe "#respond" do
- context "defining routes" do
- let(:route) { "/foo" }
- let(:action) { Proc.new {} }
+ it "defines a GET route" do
+ app.routes["GET"].should have(1).item
+ end
- before { app.respond(route, &action) }
+ it "defines a POST route" do
+ app.routes["POST"].should have(1).item
+ end
- it "defines a GET route" do
- app.routes["GET"].should have(1).item
- end
+ it "should have identical GET and POST routes" do
+ t = Proc.new {|res| [res.status, res.headers, res.body] }
- it "defines a POST route" do
- app.routes["POST"].should have(1).item
- end
-
- it "should have identical GET and POST routes" do
- t = Proc.new {|res| [res.status, res.headers, res.body] }
-
- get_response = get(route)
- post_response = post(route)
- t[get_response].should == t[post_response]
- end
+ get_response = get(route)
+ post_response = post(route)
+ t[get_response].should == t[post_response]
end
end
-
end
end
|
Remove cruft which really only tested Sinatra behaviour
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.