diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/test/test_helper.rb b/test/test_helper.rb
index abc1234..def5678 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -6,7 +6,7 @@ require "bundler/setup"
require "minitest/autorun"
require "rack/test"
-require "mocha"
+require "mocha/setup"
require "fixtures/default_mappings"
require "pp"
|
Fix a deprecation warning in mocha.
|
diff --git a/test/test_helper.rb b/test/test_helper.rb
index abc1234..def5678 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -16,6 +16,8 @@ def setup
Rake.application = Rake::Application.new
Dummy::Application.load_tasks
+ Object.const_set :FakeModel, MiniTest::Mock.new
+ TOPLEVEL_BINDING.eval('self').send(:instance_variable_set, :@_seedbank_runner, Seedbank::Runner.new)
super
end
|
Add reset of Seedbank variables and FakeModel constant.
Signed-off-by: James McCarthy <474ba67bdb289c6263b36dfd8a7bed6c85b04943@thisishatch.co.uk>
|
diff --git a/test/test_helper.rb b/test/test_helper.rb
index abc1234..def5678 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -4,7 +4,7 @@ require 'mocha/setup'
unless ENV['COVERAGE'] == 'off'
- COVERAGE_THRESHOLD = 38
+ COVERAGE_THRESHOLD = 37
require 'simplecov'
require 'simplecov-rcov'
require 'coveralls'
|
Reduce coverage for recent pull requests
|
diff --git a/lib/mnist_data.rb b/lib/mnist_data.rb
index abc1234..def5678 100644
--- a/lib/mnist_data.rb
+++ b/lib/mnist_data.rb
@@ -0,0 +1,50 @@+module MNISTData
+ class DataUnpackingError < RuntimeError
+ end
+
+ class Labels
+ def initialize(filename)
+ datafile = File.binread(filename)
+ @data = datafile.unpack('NNC*')
+ @metadata = @data.shift(2)
+ raise DataUnpackingError if count != @data.length
+ end
+
+ def count
+ @metadata[1]
+ end
+
+ def label(index)
+ @data[index] if index.between?(0, count - 1)
+ end
+ end
+
+ class Images
+ def initialize(filename)
+ datafile = File.binread(filename)
+ @data = datafile.unpack('NNNNC*')
+ @metadata = @data.shift(4)
+ raise DataUnpackingError if count*width*height != @data.length
+ end
+
+ def count
+ @metadata[1]
+ end
+
+ def width
+ @metadata[2]
+ end
+
+ def height
+ @metadata[3]
+ end
+
+ def image(index)
+ if index.between?(0, count - 1)
+ pixels = width*height
+ range = (index*pixels...(index + 1)*pixels)
+ @data[range]
+ end
+ end
+ end
+end
|
Add classes to manage MNIST datasets.
|
diff --git a/test_runner.gemspec b/test_runner.gemspec
index abc1234..def5678 100644
--- a/test_runner.gemspec
+++ b/test_runner.gemspec
@@ -23,9 +23,9 @@ s.homepage = 'https://github.com/appium/test_runner'
s.require_paths = [ 'lib' ]
- s.add_runtime_dependency 'appium_lib', '= 0.15.2'
- s.add_runtime_dependency 'spec', '= 5.0.19'
- s.add_runtime_dependency 'flaky', '= 0.0.23'
+ s.add_runtime_dependency 'appium_lib', '>= 0.15.2'
+ s.add_runtime_dependency 'spec', '>= 5.0.19'
+ s.add_runtime_dependency 'flaky', '>= 0.0.23'
s.files = `git ls-files`.split "\n"
-end+end
|
Work on new versions also
|
diff --git a/test/support/models.rb b/test/support/models.rb
index abc1234..def5678 100644
--- a/test/support/models.rb
+++ b/test/support/models.rb
@@ -2,7 +2,7 @@ end
class ListMixin < ActiveRecord::Base
- set_table_name "mixins"
+ self.table_name = "mixins"
default_scope order(:pos)
acts_as_list :column => "pos", :scope => :parent
end
@@ -14,26 +14,26 @@ end
class ListWithStringScopeMixin < ActiveRecord::Base
- set_table_name "mixins"
+ self.table_name = "mixins"
default_scope order(:pos)
acts_as_list :column => "pos", :scope => 'parent_id = #{parent_id}'
end
class ArrayScopeListMixin < ActiveRecord::Base
- set_table_name "mixins"
+ self.table_name = "mixins"
default_scope order(:pos)
acts_as_list :column => "pos", :scope => [:parent_id, :parent_type]
end
class AssociationScopeListMixin < ActiveRecord::Base
- set_table_name "mixins"
+ self.table_name = "mixins"
belongs_to :parent
default_scope order(:pos)
acts_as_list :column => "pos", :scope => :parent
end
class PolymorphicAssociationScopeListMixin < ActiveRecord::Base
- set_table_name "mixins"
+ self.table_name = "mixins"
belongs_to :parent, :polymorphic => true
default_scope order(:pos)
acts_as_list :column => "pos", :scope => :parent
|
Use self.table_name as set_table_name is deprecated
|
diff --git a/lib/opal/paths.rb b/lib/opal/paths.rb
index abc1234..def5678 100644
--- a/lib/opal/paths.rb
+++ b/lib/opal/paths.rb
@@ -19,19 +19,19 @@ paths << path
end
- def self.use_gem(gem_name, include_dependecies = true)
- require_paths_for_gem(gem_name, include_dependecies).each do |path|
+ def self.use_gem(gem_name, include_dependencies = true)
+ require_paths_for_gem(gem_name, include_dependencies).each do |path|
append_path path
end
end
- def self.require_paths_for_gem(gem_name, include_dependecies)
+ def self.require_paths_for_gem(gem_name, include_dependencies)
paths = []
spec = Gem::Specification.find_by_name(gem_name)
spec.runtime_dependencies.each do |dependency|
- paths += require_paths_for_gem(dependency.name, include_dependecies)
- end if include_dependecies
+ paths += require_paths_for_gem(dependency.name, include_dependencies)
+ end if include_dependencies
gem_dir = spec.gem_dir
spec.require_paths.map do |path|
|
Fix typo in variable name
|
diff --git a/SourceKittenFramework.podspec b/SourceKittenFramework.podspec
index abc1234..def5678 100644
--- a/SourceKittenFramework.podspec
+++ b/SourceKittenFramework.podspec
@@ -9,6 +9,6 @@ s.platform = :osx, '10.9'
s.source_files = 'Source/SourceKittenFramework/{*.swift,sourcekitd.h,clang-c/*.h}'
s.pod_target_xcconfig = { 'APPLICATION_EXTENSION_API_ONLY' => 'YES' }
- s.dependency 'SWXMLHash', '~> 3.1'
+ s.dependency 'SWXMLHash', '~> 4.1'
s.dependency 'Yams', '~> 0.3'
end
|
Update SWXMLHash to 4.1 in podspec
|
diff --git a/lib/token_auth.rb b/lib/token_auth.rb
index abc1234..def5678 100644
--- a/lib/token_auth.rb
+++ b/lib/token_auth.rb
@@ -33,7 +33,6 @@
included do
private :authenticate_by_token!
- before_filter :authenticate_by_token!
end
def self.set_entity entity
@@ -52,6 +51,7 @@
module ClassMethods
def acts_as_token_authenticator_for(entity, options = {})
+ before_filter :authenticate_by_token!
TokenAuthentication::ActsAsTokenAuthenticator.set_entity entity
end
end
|
Fix authenticate_by_token before filter inclusion.
|
diff --git a/template/ecs-service.rb b/template/ecs-service.rb
index abc1234..def5678 100644
--- a/template/ecs-service.rb
+++ b/template/ecs-service.rb
@@ -7,6 +7,7 @@
name = _resource_name(args[:name], "ecs service")
cluster = _ref_string("cluster", args, "ecs cluster")
+deployment = _ecs_deployment(args)
desired = _ref_string("desired_count", args, "ecs desired count")
load_balancers = _ecs_load_balancers(args)
role = args[:role] || ""
@@ -16,6 +17,7 @@ Type "AWS::ECS::Service"
Properties do
Cluster cluster
+ DeploymentConfiguration deployment unless deployment.empty?
DesiredCount desired
LoadBalancers load_balancers unless load_balancers.empty?
Role role unless role.empty?
|
Add new property ECS Service resource type
|
diff --git a/app/controllers/neighborly/balanced/bankaccount/payments_controller.rb b/app/controllers/neighborly/balanced/bankaccount/payments_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/neighborly/balanced/bankaccount/payments_controller.rb
+++ b/app/controllers/neighborly/balanced/bankaccount/payments_controller.rb
@@ -27,8 +27,7 @@ main_app.project_contribution_path(
@contribution.project.permalink,
@contribution.id
- ),
- notice: t('success', scope: 'controllers.projects.contributions.pay')
+ )
],
failed: [
main_app.edit_project_contribution_path(
|
Remove success message when contribution is successfully
|
diff --git a/lib/writer.rb b/lib/writer.rb
index abc1234..def5678 100644
--- a/lib/writer.rb
+++ b/lib/writer.rb
@@ -22,7 +22,6 @@ @config = other
end
- private
def config
@config ||= Configuration.new
end
|
Remove pointless private getter when the setter is public
|
diff --git a/twocheckout.gemspec b/twocheckout.gemspec
index abc1234..def5678 100644
--- a/twocheckout.gemspec
+++ b/twocheckout.gemspec
@@ -2,11 +2,11 @@ require File.expand_path('../lib/twocheckout/version', __FILE__)
Gem::Specification.new do |gem|
- gem.authors = ["Ernesto Garcia"]
- gem.email = ["ernesto+git@gnapse.com"]
+ gem.authors = ["Craig Christenson", "Ernesto Garcia"]
+ gem.email = ["christensoncraig@gmail.com", "ernesto+git@gnapse.com"]
gem.description = %q{twocheckout provides a nice ruby interface to access the 2Checkout API}
gem.summary = %q{Ruby wrapper for 2Checkout API}
- gem.homepage = "http://github.com/gnapse/twocheckout"
+ gem.homepage = "http://github.com/craigchristenson/twocheckout"
gem.add_dependency("rest-client", "~> 1.6.7")
|
Update authors and homepage info to reflect transfer of ownership
|
diff --git a/messaging.gemspec b/messaging.gemspec
index abc1234..def5678 100644
--- a/messaging.gemspec
+++ b/messaging.gemspec
@@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = 'messaging'
- s.version = '0.5.0.0'
+ s.version = '0.5.1.0'
s.summary = 'Messaging primitives for Eventide'
s.description = ' '
|
Package version is increased from 0.5.0.0 to 0.5.1.0
|
diff --git a/app/views/comics/index.rss.builder b/app/views/comics/index.rss.builder
index abc1234..def5678 100644
--- a/app/views/comics/index.rss.builder
+++ b/app/views/comics/index.rss.builder
@@ -1,17 +1,27 @@ xml.instruct! :xml, :version => "1.0"
xml.rss :version => "2.0" do
xml.channel do
- xml.title "FunniesApp"
+ if params[:username]
+ xml.title "The Funnies - #{params[:username]}'s Feed"
+ else
+ xml.title "The Funnies Main Feed"
+ end
xml.description "Your favorite web comics, all on one page"
xml.link comics_url
- comics.each do |comic|
- xml.item do
- xml.title comic.name
- xml.description raw(image_tag(comic.comic_strips.last.comic_image_url))
- xml.pubDate comic.created_at.to_s(:rfc822)
- xml.link comic.homepage
- xml.guid comics_url
+ if comics.any?
+ comics.each do |comic|
+ xml.item do
+ xml.title comic.name
+ if comic.comic_strips.any?
+ xml.description raw(image_tag(comic.comic_strips.last.comic_image_url))
+ else
+ xml.description "Sorry, no comic strips have been downloaded yet"
+ end
+ xml.pubDate comic.created_at.to_s(:rfc822)
+ xml.link comic.homepage
+ xml.guid comics_url
+ end
end
end
end
|
Add extra checks for RSS feeds
|
diff --git a/app/views/dumps/show.json.jbuilder b/app/views/dumps/show.json.jbuilder
index abc1234..def5678 100644
--- a/app/views/dumps/show.json.jbuilder
+++ b/app/views/dumps/show.json.jbuilder
@@ -1,4 +1,5 @@ json.type @dump.dump_type.constant.downcase
+json.generated_date @dump.generated_date
json.files do
DumpFileType.all.each do |dft|
json.set! dft.constant.downcase, @dump.dump_files.where(dump_file_type: dft).each do |df|
|
Include generated_date in the response
|
diff --git a/pbcopy.gemspec b/pbcopy.gemspec
index abc1234..def5678 100644
--- a/pbcopy.gemspec
+++ b/pbcopy.gemspec
@@ -6,7 +6,7 @@ gem.email = ["josh.cheek@gmail.com"]
gem.description = %q{Replicates OSX commandline utility where piping into pbcopy places things into the clipboard}
gem.summary = %q{Use pbcopy in Ruby in the same way you would from the terminal}
- gem.homepage = ""
+ gem.homepage = "https://github.com/JoshCheek/pbcopy"
gem.files = `git ls-files`.split($\)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
Put github page as homepage
|
diff --git a/plugins/setup/lib/setup/dashboard_controller.rb b/plugins/setup/lib/setup/dashboard_controller.rb
index abc1234..def5678 100644
--- a/plugins/setup/lib/setup/dashboard_controller.rb
+++ b/plugins/setup/lib/setup/dashboard_controller.rb
@@ -2,6 +2,7 @@
def index
begin
+ @info.connect_to_database(@info.database_config)
@sites = Site.find(:all, :order => 'name')
rescue
@sites = []
|
Fix bug showing sites on setup dashboard.
|
diff --git a/app/export/xlsx/theses_list.rb b/app/export/xlsx/theses_list.rb
index abc1234..def5678 100644
--- a/app/export/xlsx/theses_list.rb
+++ b/app/export/xlsx/theses_list.rb
@@ -21,7 +21,8 @@ thesis.accepted_students.collect{|s| s.surname_name }.join(", ").to_s,
I18n.t("label_status_#{thesis.state}").to_s]
end
- sheet.auto_filter = "A1:F#{@theses.length}"
+
+ sheet.add_table "A1:F#{@theses.length}", :name => I18n.t(:label_thesis_list)
sheet.column_widths 40
end
|
Fix theses XLS table filters
Change-Id: Ibd3147b3105d681d0dcb1ebf9fe88601ce0a9ffb
|
diff --git a/app/uploaders/file_uploader.rb b/app/uploaders/file_uploader.rb
index abc1234..def5678 100644
--- a/app/uploaders/file_uploader.rb
+++ b/app/uploaders/file_uploader.rb
@@ -0,0 +1,52 @@+# encoding: utf-8
+
+class FileUploader < CarrierWave::Uploader::Base
+ include Cloudinary::CarrierWave
+
+ # Include RMagick or MiniMagick support:
+ # include CarrierWave::RMagick
+ # include CarrierWave::MiniMagick
+
+ # Choose what kind of storage to use for this uploader:
+ storage :file
+ # storage :fog
+
+ # Override the directory where uploaded files will be stored.
+ # This is a sensible default for uploaders that are meant to be mounted:
+ def store_dir
+ "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
+ end
+
+ # Provide a default URL as a default if there hasn't been a file uploaded:
+ # def default_url
+ # # For Rails 3.1+ asset pipeline compatibility:
+ # # ActionController::Base.helpers.asset_path("fallback/" + [version_name, "default.png"].compact.join('_'))
+ #
+ # "/images/fallback/" + [version_name, "default.png"].compact.join('_')
+ # end
+
+ # Process files as they are uploaded:
+ # process :scale => [200, 300]
+ #
+ # def scale(width, height)
+ # # do something
+ # end
+
+ # Create different versions of your uploaded files:
+ version :thumbnail do
+ process :resize_to_fit => [100, 100]
+ end
+
+ # Add a white list of extensions which are allowed to be uploaded.
+ # For images you might use something like this:
+ # def extension_white_list
+ # %w(jpg jpeg gif png)
+ # end
+
+ # Override the filename of the uploaded files:
+ # Avoid using model.id or version_name here, see uploader/store.rb for details.
+ # def filename
+ # "something.jpg" if original_filename
+ # end
+
+end
|
Add uploader for image file
|
diff --git a/app/models/content/annotation.rb b/app/models/content/annotation.rb
index abc1234..def5678 100644
--- a/app/models/content/annotation.rb
+++ b/app/models/content/annotation.rb
@@ -1,6 +1,6 @@ class Content::Annotation < ApplicationRecord
KINDS = %w{elide replace link highlight note}
- belongs_to :resource, class_name: 'Content::Resource', inverse_of: :annotations, required: true
+ belongs_to :resource, class_name: 'Content::Resource', required: true
has_one :unpublished_revision
validates_inclusion_of :kind, in: KINDS, message: "must be one of: #{KINDS.join ', '}"
|
Fix broken association; inverse_of was missing
|
diff --git a/app/models/progression_review.rb b/app/models/progression_review.rb
index abc1234..def5678 100644
--- a/app/models/progression_review.rb
+++ b/app/models/progression_review.rb
@@ -17,7 +17,7 @@ class ProgressionReview < Eventable
before_create {|pr| pr.reason = nil if approved }
- after_create {|pr| pr.events.create!(:event_date => created_at, :transition => pr.approved ? :complete : :overdue)}
+ after_create {|pr| pr.events.create!(:event_date => created_at, :transition => :create)}
def subtitle; approved ? "Approved" : "Not approved" end
|
Use current for approved progr reviews since complete is meant to be
hidden for staff
|
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,6 +1,6 @@ cask :v1 => 'intellij-idea-eap' do
- version '141.104.1'
- sha256 'a59b096cbf012f42dbaf108026de12fa1a3caf16a0f87cbc5f20aa44fa2f2156'
+ version '141.588.1'
+ sha256 '4748d0785eb9e7df24fe43524ee196db69ebde50125eb2d6879702eecc64a604'
url "http://download-cf.jetbrains.com/idea/ideaIU-#{version}.dmg"
homepage 'https://confluence.jetbrains.com/display/IDEADEV/IDEA+14.1+EAP'
|
Update IntelliJ IDEA EAP to version 141.588.1
|
diff --git a/vlad-extras.gemspec b/vlad-extras.gemspec
index abc1234..def5678 100644
--- a/vlad-extras.gemspec
+++ b/vlad-extras.gemspec
@@ -12,9 +12,10 @@ s.summary = "Vlad plugin with extensions for Nginx, nodeJS, monit and more."
s.description = "This gem provides extra recipes for Vlad the Deployer."
- s.add_development_dependency("vlad", ["~> 2.2.4"])
+ s.add_runtime_dependency("vlad", [">= 2.2.4", "< 3"])
+ s.add_runtime_dependency("rake-remote_task", ["~> 2.1"])
s.files = `git ls-files`.split("\n")
s.executables = `git ls-files`.split("\n").select{|f| f =~ /^bin/}
s.require_path = 'lib'
-end+end
|
Update dependencies specs to allow the upmost versions of vlad and rake-remote_task
|
diff --git a/oml4r.gemspec b/oml4r.gemspec
index abc1234..def5678 100644
--- a/oml4r.gemspec
+++ b/oml4r.gemspec
@@ -19,7 +19,7 @@ gem.license = "MIT"
gem.require_paths = ["lib"]
gem.version = OML4R::VERSION
- gem.required_ruby_version = "~> 1.9"
+ gem.required_ruby_version = ">= 1.9"
end
|
Replace pessimistic constraint (~>) on 1.9 to ge (>=)
Signed-off-by: Olivier Mehani <9858fe98d2c7f5f35e0d2a08f134cfc58afd42d3@nicta.com.au>
|
diff --git a/lib/chamber.rb b/lib/chamber.rb
index abc1234..def5678 100644
--- a/lib/chamber.rb
+++ b/lib/chamber.rb
@@ -3,8 +3,6 @@ require 'chamber/rails'
module Chamber
- extend self
-
def load(options = {})
self.instance = Instance.new(options)
end
@@ -38,4 +36,12 @@ def respond_to_missing?(name, include_private = false)
instance.respond_to?(name, include_private)
end
+
+ module_function :load,
+ :to_s,
+ :env,
+ :instance,
+ :instance=,
+ :method_missing,
+ :respond_to_missing?
end
|
Style: Convert 'extend self' to 'module_function'
--------------------------------------------------------------------------------
Change-Id: I706c404fae374cd39acf66131b099dd1ebf91296
Signed-off-by: Jeff Felchner <8a84c204e2d4c387d61d20f7892a2bbbf0bc8ae8@thekompanee.com>
|
diff --git a/db/migrate/20190430194718_fix_photos_field_lengths.rb b/db/migrate/20190430194718_fix_photos_field_lengths.rb
index abc1234..def5678 100644
--- a/db/migrate/20190430194718_fix_photos_field_lengths.rb
+++ b/db/migrate/20190430194718_fix_photos_field_lengths.rb
@@ -0,0 +1,11 @@+class FixPhotosFieldLengths < ActiveRecord::Migration[5.2]
+ def up
+ change_column :photos, :image_file_name, :text
+ change_column :photos, :direct_upload_url, :text
+ end
+
+ def down
+ change_column :photos, :image_file_name, :string
+ change_column :photos, :direct_upload_url, :string
+ end
+end
|
Change Photo db fields from string to text
User-uploaded images have varying lengths, and in the case of storing
the direct_upload_url sometimes that URL can exceed the 255 character
limit default for a string. Since Postgres will treat strings and
varchars the same internally, let's just remove the length limit
completely.
|
diff --git a/Casks/zendstudio.rb b/Casks/zendstudio.rb
index abc1234..def5678 100644
--- a/Casks/zendstudio.rb
+++ b/Casks/zendstudio.rb
@@ -1,6 +1,6 @@ cask :v1 => 'zendstudio' do
- version '12.0.1'
- sha256 'e8534e6b550e075b5da42c5b1789e82b3c9e04c739f055c6980783742f6e1160'
+ version '13.0.0'
+ sha256 '3ed2492801c54fd7b1ec225d4824fb7609a674b35a5d8f437fdf3218cfd98067'
url "http://downloads.zend.com/studio-eclipse/#{version}/ZendStudio-#{version}-macosx.cocoa.x86_64.dmg"
name 'Zend Studio'
|
Update Zend Studio to 13.0.0
|
diff --git a/test/filters/test_sprockets.rb b/test/filters/test_sprockets.rb
index abc1234..def5678 100644
--- a/test/filters/test_sprockets.rb
+++ b/test/filters/test_sprockets.rb
@@ -22,7 +22,11 @@ var foo = true;
var boo = 'look me!';
var xoo = false;
+
+
var bar = true;
+
+
function main (argument) {
// body...
|
Fix sprockets test to match the new space weirdness
|
diff --git a/react-native-lookback.podspec b/react-native-lookback.podspec
index abc1234..def5678 100644
--- a/react-native-lookback.podspec
+++ b/react-native-lookback.podspec
@@ -6,11 +6,11 @@ Pod::Spec.new do |s|
s.name = package[:name]
s.version = package[:version]
+ s.summary = package[:description]
s.license = { type: "MIT" }
+ s.author = package[:author]
s.homepage = package[:homepage]
- s.authors = package[:contributors].flat_map { |author| { author[:name] => author[:email] } }
- s.summary = package[:description]
- s.source = { git: package[:repository][:url] }
+ s.source = { git: package[:repository] }
s.source_files = "ios/*"
s.platform = :ios, "8.0"
|
Update podspec to match the new package.json
|
diff --git a/config/initializers/vestal_versions.rb b/config/initializers/vestal_versions.rb
index abc1234..def5678 100644
--- a/config/initializers/vestal_versions.rb
+++ b/config/initializers/vestal_versions.rb
@@ -1,3 +1,3 @@ VestalVersions.configure do |config|
- # config.class_name = "RacingOnRails::Version"
+ config.class_name = "RacingOnRails::Version"
end
|
Use custom VestalVersions class again
|
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
@@ -13,5 +13,8 @@ config.action_view.debug_rjs = true
config.action_controller.perform_caching = false
-# Don't care if the mailer can't send
-config.action_mailer.raise_delivery_errors = true
+# Send via test method
+if (MySociety::Config.getbool("NO_MAIL", false))
+ config.action_mailer.raise_delivery_errors = false
+ config.action_mailer.delivery_method = :test
+end
|
Allow a config setting to specify sending mail via test and not raising errors.
|
diff --git a/spec/lib/membership_spec.rb b/spec/lib/membership_spec.rb
index abc1234..def5678 100644
--- a/spec/lib/membership_spec.rb
+++ b/spec/lib/membership_spec.rb
@@ -8,5 +8,5 @@
let(:resource) { client.memberships }
- include_examples 'list resource'
+ include_examples 'lists resource'
end
|
Update example use in membership spec
|
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
@@ -14,6 +14,6 @@ # Convert the analytics object back into a string so it can stay in the
# cookie
# { uuid: 1234, events: [ { name: "awesome event" } ] }
- cookies[:analytics] = JSON.dump(analytics)
+ cookies[:analytics] = analytics.to_json
end
end
|
Use active support to_json instead of JSON.dump
|
diff --git a/test/support/model_stubbing_helpers.rb b/test/support/model_stubbing_helpers.rb
index abc1234..def5678 100644
--- a/test/support/model_stubbing_helpers.rb
+++ b/test/support/model_stubbing_helpers.rb
@@ -1,6 +1,11 @@ module ModelStubbingHelpers
def stub_record(type, options = {})
- build_stubbed(type, options)
+ result = build(type, options)
+ result.stubs(:id).returns(next_record_id)
+ result.stubs(:new_record?).returns(false)
+ result.stubs(:created_at).returns(Time.zone.now) if result.respond_to?(:created_at)
+ result.stubs(:updated_at).returns(Time.zone.now) if result.respond_to?(:updated_at)
+ result
end
def stub_edition(type, options = {})
|
Revert "Use FactoryGirl.build_stubbed instead of a hand-rolled solution."
This reverts commit 13237e4ea7e54c4d3bc9bd8d244fe08ff0655b2f.
For some reason this was causing a seg fault on CI.
|
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
@@ -1,6 +1,5 @@ class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
- before_action :configure_permitted_parameters, if: :devise_controller?
def index
@@ -8,11 +7,6 @@
- protected
- def configure_permitted_parameters
- devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(:username, :email, :password, :password_confirmation, :remember_me) }
- devise_parameter_sanitizer.for(:sign_in) { |u| u.permit(:login, :username, :email, :password, :remember_me) }
- devise_parameter_sanitizer.for(:account_update) { |u| u.permit(:username, :email, :password, :password_confirmation, :current_password) }
- end
+
end
|
Remove code that didn't work
|
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
@@ -46,6 +46,6 @@ end
def configure_permitted_parameters
- devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(:email, :password, :password_confirmation, :username) }
+ devise_parameter_sanitizer.permit(:sign_up, keys: [:username])
end
end
|
Fix Rails 5's breaking of sign in
|
diff --git a/app/models/network/technologies/siphon.rb b/app/models/network/technologies/siphon.rb
index abc1234..def5678 100644
--- a/app/models/network/technologies/siphon.rb
+++ b/app/models/network/technologies/siphon.rb
@@ -31,9 +31,7 @@ def store(frame, amount)
# Energy consumed by the Siphon is converted into production on the
# assigned output path.
- if output_path && amount > 0
- output_path.consume(frame, -amount)
- end
+ output_path.consume(frame, -amount) if output_path
end
# Internal: A Siphon-only feature. Consumption will be converted to
|
Write to Siphon output path when amount is zero
This ensures that the P2G gas load array is always the correct, full
length.
Closes #1377
|
diff --git a/lib/jruby-visualizer/visualizer_main_app.rb b/lib/jruby-visualizer/visualizer_main_app.rb
index abc1234..def5678 100644
--- a/lib/jruby-visualizer/visualizer_main_app.rb
+++ b/lib/jruby-visualizer/visualizer_main_app.rb
@@ -8,7 +8,6 @@ def start(stage)
with(stage, title: "JRuby Visualizer") do
fxml JRubyVisualizerController
- fill_ast_view(stage)
show
end
end
@@ -18,17 +17,30 @@ include JRubyFX::Controller
fxml "jruby-visualizer.fxml"
- def fill_ast_view
- tree_builder = ASTTreeViewBuilder.new(@ast_view)
- tree_builder.build_view(@root_node)
- end
+ property_accessor :ruby_code
-
- def initialize(root_node)
- @ast_root_node = root_node
+ def initialize
+ @ruby_code = SimpleStringProperty.new
+ @ast_root_node = JRuby.parse(@ruby_code)
+ fill_ast_view
+ # bind change of Ruby code to reparsing an AST
+ ruby_code_property.add_change_listener do |new_code|
+ @ast_root_node = JRuby.parse(new_code)
+ fill_ast_view
+ end
+ # bind ruby code to ruby view
+ ruby_code_property.bind(@ruby_view.text_property)
puts @ast_root_node
puts @ast_view.class
# TODO fill ast_view
end
+ def fill_ast_view
+ # clear view
+ @ast_view.root = nil
+ # refill it
+ tree_builder = ASTTreeViewBuilder.new(@ast_view)
+ tree_builder.build_view(@ast_root_node)
+ end
+
end
|
Add of ruby_code string property with binding to ast_view and ruby_view
|
diff --git a/spec/unit/axiom/types/options/inherited_spec.rb b/spec/unit/axiom/types/options/inherited_spec.rb
index abc1234..def5678 100644
--- a/spec/unit/axiom/types/options/inherited_spec.rb
+++ b/spec/unit/axiom/types/options/inherited_spec.rb
@@ -21,18 +21,44 @@ Class.new(object)
end
- it 'delegates to the ancestor' do
- ancestor.should_receive(:inherited).twice
- subject
+ context 'when the option is not set' do
+ it 'delegates to the ancestor' do
+ ancestor.should_receive(:inherited).twice
+ subject
+ end
+
+ it 'adds the accepted option to the descendant' do
+ subject
+ expect(descendant).to respond_to(:primitive, :coerce_method)
+ end
+
+ it 'sets the default value for the descendant' do
+ subject
+ expect(descendant.primitive).to be(::String)
+ end
end
- it 'adds the accepted option to the descendant' do
- subject
- expect(descendant).to respond_to(:primitive, :coerce_method)
- end
+ context 'when the option is set' do
+ before do
+ def ancestor.inherited(descendant)
+ # set the option explicitly
+ descendant.instance_variable_set(:@primitive, ::Integer)
+ end
+ end
- it 'sets the default value for the descendant' do
- subject
- expect(descendant.primitive).to be(::String)
+ it 'delegates to the ancestor' do
+ ancestor.should_receive(:inherited).twice
+ subject
+ end
+
+ it 'adds the accepted option to the descendant' do
+ subject
+ expect(descendant).to respond_to(:primitive, :coerce_method)
+ end
+
+ it 'does not set the value for the descendant when not set' do
+ subject
+ expect(descendant.primitive).to be(::Integer)
+ end
end
end
|
Add spec to kill mutation in Axiom::Types::Options
|
diff --git a/Library/Homebrew/requirements/apr_dependency.rb b/Library/Homebrew/requirements/apr_dependency.rb
index abc1234..def5678 100644
--- a/Library/Homebrew/requirements/apr_dependency.rb
+++ b/Library/Homebrew/requirements/apr_dependency.rb
@@ -14,27 +14,4 @@ ENV.prepend_path "PKG_CONFIG_PATH", "#{Formula["apr-util"].opt_libexec}/lib/pkgconfig"
end
end
-
- def message
- message = <<-EOS.undent
- Due to packaging problems on Apple's part, software that compiles
- against APR requires the standalone Command Line Tools.
- EOS
- if MacOS.version >= :mavericks
- message += <<-EOS.undent
- Either
- `brew install apr-util`
- or
- `xcode-select --install`
- to install APR.
- EOS
- else
- message += <<-EOS.undent
- The standalone package can be obtained from
- https://developer.apple.com/downloads/,
- or it can be installed via Xcode's preferences.
- Or you can `brew install apr-util`.
- EOS
- end
- end
end
|
Remove message that is never displayed
Requirements with default formulae cannot fail the build.
|
diff --git a/lib/dimples/plugin.rb b/lib/dimples/plugin.rb
index abc1234..def5678 100644
--- a/lib/dimples/plugin.rb
+++ b/lib/dimples/plugin.rb
@@ -1,5 +1,12 @@+# frozen_string_literal: true
+
module Dimples
class Plugin
+ EVENTS = %i[
+ post_write
+ page_write
+ ].freeze
+
def self.inherited(subclass)
(@subclasses ||= []) << subclass
end
@@ -20,8 +27,7 @@ @site = site
end
- def process(event, item, &block)
- end
+ def process(event, item, &block); end
def supported_events
[]
@@ -31,4 +37,4 @@ supported_events.include?(event)
end
end
-end+end
|
Add the EVENTS constant, inline the default process method, add final newline
|
diff --git a/lib/lyricfy.rb b/lib/lyricfy.rb
index abc1234..def5678 100644
--- a/lib/lyricfy.rb
+++ b/lib/lyricfy.rb
@@ -20,7 +20,7 @@ if !args.empty?
passed_providers = {}
args.each do |provider|
- raise Exception if !@providers.has_key?(provider)
+ raise Exception unless @providers.has_key?(provider)
passed_providers[provider] = @providers[provider]
end
@providers = passed_providers
|
Add tiny refactoring: Use unless to raise Exception
|
diff --git a/lib/baseball_stats/calculators/slugging_percentage.rb b/lib/baseball_stats/calculators/slugging_percentage.rb
index abc1234..def5678 100644
--- a/lib/baseball_stats/calculators/slugging_percentage.rb
+++ b/lib/baseball_stats/calculators/slugging_percentage.rb
@@ -13,12 +13,13 @@ raise NoEligibleStatsFoundError if eligible_players.blank?
results = {}
eligible_players.each do |p|
- slugging_percentage = (
- (p[HITS] - p[DOUBLES] - p[TRIPLES] - p[HOMERUNS]) +
- (2 * p[DOUBLES]) + (3 * p[TRIPLES]) + (4 * p[HOMERUNS])
- ) / p[AT_BATS].to_f
+ slugging_percentage = ((p[HITS] - p[DOUBLES] - p[TRIPLES] - p[HOMERUNS]) +
+ (2 * p[DOUBLES]) +
+ (3 * p[TRIPLES]) +
+ (4 * p[HOMERUNS])) / p[AT_BATS].to_f
- results[p[PLAYER_ID]] = slugging_percentage.round(3)
+ key = p[PLAYER_ID]
+ results[key] = slugging_percentage.round(3)
end
results
end
|
Format slugging percentage calc for readability
|
diff --git a/lib/covalence/notifications/covalence_notification.rb b/lib/covalence/notifications/covalence_notification.rb
index abc1234..def5678 100644
--- a/lib/covalence/notifications/covalence_notification.rb
+++ b/lib/covalence/notifications/covalence_notification.rb
@@ -9,6 +9,20 @@ serialize :message
alias_method :synchronous_save, :save
+
+ def self.compose args ={}
+
+ producer = args.delete(:producer)
+ consumer = args.delete(:consumer)
+ type = args.delete(:type)
+ flavor = self.to_s.underscore
+
+ unless AsyncObserver::Queue.queue.nil?
+ self.async_send(:create, :producer => producer, :consumer => consumer, :message => args, :flavor => flavor)
+ else
+ self.create(:producer => producer, :consumer => consumer, :message => args, :flavor => flavor)
+ end
+ end
def composed args = {}
|
Add back in compose method
|
diff --git a/FileKit.podspec b/FileKit.podspec
index abc1234..def5678 100644
--- a/FileKit.podspec
+++ b/FileKit.podspec
@@ -1,12 +1,12 @@ Pod::Spec.new do |s|
s.name = "FileKit"
- s.version = "1.1.0"
+ s.version = "1.2.0"
s.summary = "Simple and expressive file management in Swift."
s.homepage = "https://github.com/nvzqz/FileKit"
s.license = { :type => "MIT", :file => "LICENSE.md" }
s.author = "Nikolai Vazquez"
s.ios.deployment_target = "8.0"
s.osx.deployment_target = "10.9"
- s.source = { :git => "https://github.com/nvzqz/FileKit.git", :tag => "v1.1.0" }
+ s.source = { :git => "https://github.com/nvzqz/FileKit.git", :tag => "v1.2.0" }
s.source_files = "FileKit/*/*.swift"
end
|
Update podspec for 1.2.0 release
|
diff --git a/lib/mastodon.rb b/lib/mastodon.rb
index abc1234..def5678 100644
--- a/lib/mastodon.rb
+++ b/lib/mastodon.rb
@@ -46,4 +46,14 @@ def [](id)
@lines[id]
end
+
+ # Find all todo's that have the context @+context+
+ def find_context(context)
+ @lines.grep(/@#{context}/)
+ end
+
+ # Find all todo's that have the project @+project+
+ def find_project(project)
+ @lines.grep(/\+#{project}/)
+ end
end
|
Add `find_context' and `find_project' methods
|
diff --git a/rails.gemspec b/rails.gemspec
index abc1234..def5678 100644
--- a/rails.gemspec
+++ b/rails.gemspec
@@ -25,5 +25,5 @@ s.add_dependency('activeresource', version)
s.add_dependency('actionmailer', version)
s.add_dependency('railties', version)
- s.add_dependency('bundler', '>= 1.0.0.beta.3')
+ s.add_dependency('bundler', '>= 1.0.0.beta.2')
end
|
Revert "Bump bundler to 1.0.0.beta.3"
(It's not out yet)
This reverts commit 64cee90c0f6bbbb2a53ffe71655a7cee1e6c99be.
|
diff --git a/lib/mws/serializer.rb b/lib/mws/serializer.rb
index abc1234..def5678 100644
--- a/lib/mws/serializer.rb
+++ b/lib/mws/serializer.rb
@@ -16,7 +16,11 @@ builder.send(element) { |b| xml_for(value, b, path) }
elsif value.respond_to? :each
value.each do | val |
- builder.send(element) { |b| xml_for(val, b, path)}
+ if val.respond_to? :keys
+ builder.send(element) { |b| xml_for(val, b, path)}
+ else
+ builder.send element, val
+ end
end
else
builder.send element, value
|
Add support for arrays of scalar values
|
diff --git a/lib/myaso/pi_table.rb b/lib/myaso/pi_table.rb
index abc1234..def5678 100644
--- a/lib/myaso/pi_table.rb
+++ b/lib/myaso/pi_table.rb
@@ -1,6 +1,6 @@ # encoding: utf-8
-# A simple implementation of dynamic programming table in the following
+# A simple implementation of a dynamic programming table in the following
# form: $\pi(i, u, v)$. where $i$ is an index and $u, v$ are elements of
# a finite set of tags.
#
@@ -11,7 +11,7 @@ attr_reader :default, :table
def_delegator :@table, :each, :each
- # An instance of dynamic programming table can consider the specified
+ # An instance of a dynamic programming table can consider the specified
# default value.
#
def initialize(default = nil)
|
Bring the articles back home [ci skip]
|
diff --git a/lib/neptune/errors.rb b/lib/neptune/errors.rb
index abc1234..def5678 100644
--- a/lib/neptune/errors.rb
+++ b/lib/neptune/errors.rb
@@ -14,7 +14,7 @@ attr_reader :error_code
def initialize(error_code, *args) #:nodoc:
- super("Received error from server: #{error_code}", *args)
+ super("Received error from server: #{error_code.name} (#{error_code.id})", *args)
end
end
|
Fix error codes not being displayed in exception messages properly
|
diff --git a/app/models/tolk/translation.rb b/app/models/tolk/translation.rb
index abc1234..def5678 100644
--- a/app/models/tolk/translation.rb
+++ b/app/models/tolk/translation.rb
@@ -14,19 +14,17 @@
before_save :set_previous_text
- before_validation :fix_text_type
+ before_validation :fix_text_type, :unless => proc {|r| r.new_record? }
private
def fix_text_type
- if self.text && self.text.is_a?(String)
- yaml_object = begin
+ if self.text_changed? && !self.text_was.is_a?(String) && self.text.is_a?(String)
+ self.text = begin
YAML.load(self.text.strip)
rescue ArgumentError
- self.text
+ nil
end
-
- self.text = yaml_object unless yaml_object.is_a?(String)
end
true
|
Make surer to YAMLify text if they were not String before
|
diff --git a/test/controllers/qandas_controller_test.rb b/test/controllers/qandas_controller_test.rb
index abc1234..def5678 100644
--- a/test/controllers/qandas_controller_test.rb
+++ b/test/controllers/qandas_controller_test.rb
@@ -22,22 +22,22 @@
test "should create qanda" do
assert_difference('Qanda.count') do
- post qandas_url, params: { qanda: { question: @qanda.question,
- answer: @qanda.answer } }
+ post qandas_url, params: { qanda: { question: @qanda.question,
+ answer: @qanda.answer } }
end
-
assert_redirected_to qandas_url
end
test "should get edit" do
+ log_in_as @user
get edit_qanda_url(@qanda)
assert_response :success
end
test "should update qanda" do
+ log_in_as @user
patch qanda_url(@qanda), params: { qanda: { question: @qanda.question,
answer: @qanda.answer } }
assert_redirected_to qandas_url
end
-
end
|
Add user login to pass test
|
diff --git a/lib/stapler/helper.rb b/lib/stapler/helper.rb
index abc1234..def5678 100644
--- a/lib/stapler/helper.rb
+++ b/lib/stapler/helper.rb
@@ -18,7 +18,7 @@ rewrite_asset_path_without_stapler(source)
else
- @@stapler ||= Stapler::Stapler.new
+ @@stapler ||= Stapler.new
stapled_source = "#{StaplerRoot}#{source}"
stapled_path = asset_file_path(stapled_source)
|
Fix class name resolution issue
|
diff --git a/lib/tasks/chores.rake b/lib/tasks/chores.rake
index abc1234..def5678 100644
--- a/lib/tasks/chores.rake
+++ b/lib/tasks/chores.rake
@@ -9,4 +9,9 @@ task update_discipline_incident_counts: :environment do
DisciplineIncident.find_each(&:save)
end
+
+ desc 'Update student risk levels'
+ task update_student_risk_levels: :environment do
+ StudentRiskLevel.find_each(&:update_risk_level!)
+ end
end
|
Add chore for updating student risk levels
|
diff --git a/lib/tasks/search.rake b/lib/tasks/search.rake
index abc1234..def5678 100644
--- a/lib/tasks/search.rake
+++ b/lib/tasks/search.rake
@@ -14,8 +14,17 @@
namespace :search do
task index: :environment do
- Dir[Rails.root.join('app', 'models', '**', '*.rb')].each { |f| require f }
- ActiveRecord::Base.subclasses.each do |klass|
+ klasses = if ENV['CLASS'].present?
+ ENV['CLASS'].split(',').map do |klass|
+ require Rails.root.join('app', 'models', klass.underscore + '.rb')
+ klass.constantize
+ end
+ else
+ Dir[Rails.root.join('app', 'models', '**', '*.rb')].each { |f| require f }
+ ActiveRecord::Base.subclasses
+ end
+
+ klasses.each do |klass|
total = klass.count rescue nil
next unless klass.respond_to?(:tire)
Tire::Tasks::Import.add_pagination_to_klass(klass)
|
Add ability to re-index specific classes
|
diff --git a/test/test_ply2ascii.rb b/test/test_ply2ascii.rb
index abc1234..def5678 100644
--- a/test/test_ply2ascii.rb
+++ b/test/test_ply2ascii.rb
@@ -18,6 +18,6 @@
def test_help
out = `env RUBYOPT=-I./lib bin/ply2ascii`
- assert out.match /^This utility/
+ assert out.match(/^This utility/)
end
end
|
Clean up an ambiguous argument case.
|
diff --git a/app/helpers/license_helper.rb b/app/helpers/license_helper.rb
index abc1234..def5678 100644
--- a/app/helpers/license_helper.rb
+++ b/app/helpers/license_helper.rb
@@ -2,8 +2,8 @@
module LicenseHelper
- LICENSE_ARRAY = JSON.parse(File.read(File.join(Rails.root, 'public', 'licenses.json')))
- DATA_LICENSE_ARRAY = LICENSE_ARRAY.select { |l| l['domain_data'] }
+ LICENSE_ARRAY = JSON.parse(File.read(File.join(Rails.root, 'public', 'licenses.json'))).sort_by { |l| l['title'] }
+ DATA_LICENSE_ARRAY = LICENSE_ARRAY.select { |l| l['domain_data'] || l['domain_content'] }
def license_select(name, selected = nil, opts = {})
licenses = opts.delete(:data_only) ? DATA_LICENSE_ARRAY : LICENSE_ARRAY
|
Include content as well as data licenses. Sort license list
|
diff --git a/db/migrate/023_nukeopenid.rb b/db/migrate/023_nukeopenid.rb
index abc1234..def5678 100644
--- a/db/migrate/023_nukeopenid.rb
+++ b/db/migrate/023_nukeopenid.rb
@@ -0,0 +1,25 @@+class Nukeopenid < ActiveRecord::Migration
+ def self.up
+ drop_table :open_id_authentication_associations
+ drop_table :open_id_authentication_nonces
+ remove_column :accounts, :openid_enabled
+ end
+
+ def self.down
+ add_column :accounts, :openid_enabled, :boolean, :default => false, :null => false
+ create_table :open_id_authentication_associations do |t|
+ t.integer "issued", :limit => 11
+ t.integer "lifetime", :limit => 11
+ t.string "handle"
+ t.string "assoc_type"
+ t.binary "server_url"
+ t.binary "secret"
+ end
+
+ create_table :open_id_authentication_nonces do |t|
+ t.integer "timestamp", :limit => 11, :null => false
+ t.string "server_url"
+ t.string "salt", :default => "", :null => false
+ end
+ end
+end
|
Add missing openid nuke migration
|
diff --git a/Casks/diskmaker-x.rb b/Casks/diskmaker-x.rb
index abc1234..def5678 100644
--- a/Casks/diskmaker-x.rb
+++ b/Casks/diskmaker-x.rb
@@ -1,11 +1,11 @@ cask 'diskmaker-x' do
- version '5.0.2'
- sha256 '9a210eb4db6d860e14d7f3e63d0cc67baeadd3a80e1ef607e3d2a44b85080472'
+ version :latest
+ sha256 :no_check
- url "http://diskmakerx.com/downloads/DiskMaker_X_#{version.to_i}.dmg"
+ url 'http://diskmakerx.com/downloads/DiskMaker_X.dmg'
name 'DiskMaker X'
homepage 'http://diskmakerx.com/'
license :gratis
- app "DiskMaker X #{version.to_i}.app"
+ app 'DiskMaker X.app'
end
|
Remove version specific details from Diskmaker X
This removes version specific details from Diskmaker X as the URL for specific versions is no longer hosted by the creator.
|
diff --git a/Casks/iterm2-beta.rb b/Casks/iterm2-beta.rb
index abc1234..def5678 100644
--- a/Casks/iterm2-beta.rb
+++ b/Casks/iterm2-beta.rb
@@ -1,7 +1,7 @@ class Iterm2Beta < Cask
- url 'http://www.iterm2.com/downloads/beta/iTerm2-1_0_0_20140112.zip'
+ url 'http://www.iterm2.com/downloads/beta/iTerm2-1_0_0_20140403.zip'
homepage 'http://www.iterm2.com/'
- version '1.0.0.20140112'
- sha256 '0b435b5f40e189ecea662412f26143fc004b3cddd263f8f11e1d73f4471fa205'
+ version '1.0.0.20140403'
+ sha256 'b33fe4880489af93514109308427705c30ccd8661549c5eff143cc58bb961f03'
link 'iTerm.app'
end
|
Upgrade iterm2 beta to 1.0.0.20140403
|
diff --git a/Casks/uncrustifyx.rb b/Casks/uncrustifyx.rb
index abc1234..def5678 100644
--- a/Casks/uncrustifyx.rb
+++ b/Casks/uncrustifyx.rb
@@ -1,7 +1,7 @@ class Uncrustifyx < Cask
- url 'http://www.cactuslab.com/uncrustifyx/UncrustifyX-0.4.1.zip'
+ url 'http://www.cactuslab.com/uncrustifyx/UncrustifyX-0.4.2.zip'
homepage 'https://github.com/ryanmaxwell/UncrustifyX'
- version '0.4.1'
- sha1 'bad2d93d0e75021c116692019dc55fb8d0ec4375'
+ version '0.4.2'
+ sha1 'f957db63b58cf73aa5580bb4df86854442309422'
link "UncrustifyX.app"
end
|
Update UncrustifyX to v. 0.4.2
|
diff --git a/config/initializers/json_compatibility.rb b/config/initializers/json_compatibility.rb
index abc1234..def5678 100644
--- a/config/initializers/json_compatibility.rb
+++ b/config/initializers/json_compatibility.rb
@@ -0,0 +1,12 @@+require 'yajl/json_gem'
+
+module JSON
+ def self.parse(str, opts=JSON.default_options)
+ opts[:symbolize_keys] = opts[:symbolize_names] if opts[:symbolize_names]
+ begin
+ Yajl::Parser.parse(str, opts)
+ rescue Yajl::ParseError => e
+ raise JSON::ParserError, e.message
+ end
+ end
+end
|
Add patch to the yajl JSON compatibility module to accept :symbolize_names as an option
|
diff --git a/config/software/dep-selector-libgecode.rb b/config/software/dep-selector-libgecode.rb
index abc1234..def5678 100644
--- a/config/software/dep-selector-libgecode.rb
+++ b/config/software/dep-selector-libgecode.rb
@@ -31,6 +31,9 @@ env["CXX"] = "g++44"
end
+ # Ruby DevKit ships with BSD Tar
+ env["PROG_TAR"] = "bsdtar" if windows?
+
gem "install dep-selector-libgecode" \
" --version '#{version}'" \
" --no-ri --no-rdoc", env: env
|
Configure Window’s environments to use `bsdtar`
The Ruby DevKit ships with `bsdtar` instead of `tar`. This change just
ensures the environment is configured to use it.
Up until this point we have gotten lucky as our ChefDK builds build Chef
first which in turn copies bsdtar.exe over to tar.exe:
https://github.com/opscode/omnibus-chef/blob/master/config/software/chef.rb#L61
A similar fix has been applied in the upstream project:
opscode/dep-selector-libgecode#33
|
diff --git a/lib/wishETL/runner.rb b/lib/wishETL/runner.rb
index abc1234..def5678 100644
--- a/lib/wishETL/runner.rb
+++ b/lib/wishETL/runner.rb
@@ -24,7 +24,13 @@ if fork
@pids << fork do
# :nocov:
- step.run
+ begin
+ step.run
+ rescue => e
+ puts e.message
+ puts e.backtrace.join("\n")
+ exit 99
+ end
# :nocov:
end
step.forked
@@ -32,7 +38,18 @@ step.run
end
}
- Process.waitall
+ begin
+ until @pids.empty?
+ pid, status = Process.wait2
+ @pids.delete(pid)
+ if status.exitstatus != 0
+ @pids.each { |pid|
+ Process.kill "HUP", pid
+ }
+ end
+ end
+ rescue SystemCallError
+ end
end
end
end
|
Add better handling for a failure in a forked process
|
diff --git a/spec/bundle/dumper_spec.rb b/spec/bundle/dumper_spec.rb
index abc1234..def5678 100644
--- a/spec/bundle/dumper_spec.rb
+++ b/spec/bundle/dumper_spec.rb
@@ -8,10 +8,12 @@ before do
allow(Bundle).to receive(:cask_installed?).and_return(true)
allow(Bundle).to receive(:mas_installed?).and_return(false)
+ allow(Bundle).to receive(:whalebrew_installed?).and_return(false)
Bundle::BrewDumper.reset!
Bundle::TapDumper.reset!
Bundle::CaskDumper.reset!
Bundle::MacAppStoreDumper.reset!
+ Bundle::WhalebrewDumper.reset!
Bundle::BrewServices.reset!
allow(Bundle::CaskDumper).to receive(:`).and_return("google-chrome\njava")
end
|
Include `Whalebrew.reset!` in the test setup
|
diff --git a/spec/reader/series_spec.rb b/spec/reader/series_spec.rb
index abc1234..def5678 100644
--- a/spec/reader/series_spec.rb
+++ b/spec/reader/series_spec.rb
@@ -15,30 +15,5 @@ expect(book['series']['title']).to eq("Battersea Dogs & Cats Home")
expect(book['series']['number']).to eq(5)
end
-
- it "must extract series name and number from titles where appropriate" do
- [
- "Book name (Series name - book 2)",
- "Book name (Series name - book two)",
- "Book name (Series name book 2)",
- "Book name: Series name Book 2",
- "Book name: Series name Book Two",
- "Book name (Series name, book 2)"
- ].each do |title|
- book = process_xml_with_service <<-XML
- <ONIXmessage>
- <Product>
- <Title>
- <TitleText>#{title}</TitleText>
- </Title>
- </Product>
- </ONIXmessage>
- XML
- expect_schema_compliance(book)
- expect(book['title']).to eq("Book name")
- expect(book['series']['title']).to eq("Series name")
- expect(book['series']['number']).to eq(2)
- end
- end
end
end
|
Remove tests for removed code
|
diff --git a/spec/ssdp/listener_spec.rb b/spec/ssdp/listener_spec.rb
index abc1234..def5678 100644
--- a/spec/ssdp/listener_spec.rb
+++ b/spec/ssdp/listener_spec.rb
@@ -7,13 +7,40 @@ include EM::SpecHelper
it "should receive alive and byebye notifications"
- it "should ignore M-SEARCH requests"
+
+ it "should ignore M-SEARCH requests" do
+ rd_io, wr_io = IO.pipe
+ begin
+ RUPNP.logdev = wr_io
+ RUPNP.log_level = :warn
+ em do
+ listener = SSDP.listen
+ listener.notifications.subscribe do |notification|
+ fail
+ end
+
+ searcher = SSDP.search(:all, :try_number => 1)
+
+ EM.add_timer(1) do
+ begin
+ warn = rd_io.read_nonblock(127)
+ expect(warn).to be_empty
+ rescue IO::WaitReadable
+ end
+ done
+ end
+ end
+ ensure
+ rd_io.close
+ wr_io.close
+ end
+ end
it "should ignore and log unknown requests" do
rd_io, wr_io = IO.pipe
- RUPNP.logdev = wr_io
- RUPNP.log_level = :warn
begin
+ RUPNP.logdev = wr_io
+ RUPNP.log_level = :warn
em do
listener = SSDP.listen
listener.notifications.subscribe do |notification|
|
Write 'RUPNP::SSDP::Listener should ignore M-SEARCH requests' spec.
|
diff --git a/spec/hertz/notifiable_spec.rb b/spec/hertz/notifiable_spec.rb
index abc1234..def5678 100644
--- a/spec/hertz/notifiable_spec.rb
+++ b/spec/hertz/notifiable_spec.rb
@@ -13,7 +13,7 @@
describe '#notify' do
before do
- class TestNotification < Hertz::Notification; end
+ stub_const('TestNotification', Class.new(Hertz::Notification))
end
context 'with a notification object' do
|
Fix leaky constant declaration in Notifiable test
|
diff --git a/Formula/cocoapods.rb b/Formula/cocoapods.rb
index abc1234..def5678 100644
--- a/Formula/cocoapods.rb
+++ b/Formula/cocoapods.rb
@@ -6,6 +6,8 @@ sha1 "f727a8027a747f01323ee1188c4ce654731e3e51"
depends_on "xcproj" => :recommended
+
+ patch :DATA
def install
prefix.install "vendor"
@@ -18,3 +20,17 @@ system "#{bin}/cocoapods", "--version"
end
end
+
+__END__
+diff --git i/src/pod w/src/pod
+index 999a11d..8424809 100755
+--- i/src/pod
++++ w/src/pod
+@@ -9,7 +9,7 @@ require gems_setup
+
+ $LOAD_PATH.unshift(File.expand_path("../../rubylib", file_path))
+
+-Dir.glob(File.join(File.expand_path("../../"), "cocoapods-*/*/lib")) do |dir|
++Dir.glob(File.join(File.expand_path("../../../../", file_path), "cocoapods-*/*/lib")) do |dir|
+ $LOAD_PATH.unshift(dir)
+ end
|
Add patch for CocoaPods plugins until next release
|
diff --git a/BoxesView.podspec b/BoxesView.podspec
index abc1234..def5678 100644
--- a/BoxesView.podspec
+++ b/BoxesView.podspec
@@ -18,9 +18,6 @@ s.requires_arc = true
s.source_files = 'Pod/Classes/**/*'
- s.resource_bundles = {
- 'BoxesView' => ['Pod/Assets/*.png']
- }
# s.public_header_files = 'Pod/Classes/**/*.h'
# s.frameworks = 'UIKit', 'MapKit'
|
Remove resource bundles form podspec
|
diff --git a/SwiftSocket.podspec b/SwiftSocket.podspec
index abc1234..def5678 100644
--- a/SwiftSocket.podspec
+++ b/SwiftSocket.podspec
@@ -1,14 +1,14 @@ Pod::Spec.new do |s|
s.name = "SwiftSocket"
- s.version = "1.2"
+ s.version = "2.0"
s.summary = "A cool framework to work with TCP and UDP sockets"
s.description = <<-DESC
SwiftSocket profieds an easy way to create TCP or UDP clients and servers 💁
DESC
- s.homepage = "https://github.com/danshevluk/SwiftSocket"
+ s.homepage = "https://github.com/swiftsocket/SwiftSocket"
s.license = { :type => "BSD" }
@@ -18,7 +18,7 @@ s.ios.deployment_target = '8.0'
# s.osx.deployment_target = '10.7'
s.source = {
- :git => 'https://github.com/danshevluk/SwiftSocket.git',
+ :git => 'https://github.com/swiftsocket/SwiftSocket.git',
:tag => s.version
}
s.source_files = 'Sources/**/*'
|
Update podspec source repository and edit pod version
|
diff --git a/Casks/opera-developer.rb b/Casks/opera-developer.rb
index abc1234..def5678 100644
--- a/Casks/opera-developer.rb
+++ b/Casks/opera-developer.rb
@@ -1,6 +1,6 @@ cask :v1 => 'opera-developer' do
- version '29.0.1795.0'
- sha256 '33b33c56d079c524e43e41ff588f3cfa6bc3481f87f4c4705623220464462023'
+ version '29.0.1795.14'
+ sha256 'ce0e8ecdac8c1fda65369acc5d9539faad529e0970c4a6de0c5ed832e29d34e0'
url "http://get.geo.opera.com/pub/opera-developer/#{version}/mac/Opera_Developer_#{version}_Setup.dmg"
homepage 'http://www.opera.com/developer'
|
Upgrade Opera Developer.app to v29.0.1795.14
|
diff --git a/nginx/parse.rb b/nginx/parse.rb
index abc1234..def5678 100644
--- a/nginx/parse.rb
+++ b/nginx/parse.rb
@@ -1,4 +1,11 @@ # Parse nginx configs
+
+TOKENS = [
+ :semicolon,
+ :term,
+ :block_start,
+ :block_end,
+]
class NginxParser
@@ -18,28 +25,37 @@ end
def parse_stream(stream)
- self.words(stream) do |word|
- puts word
+ self.tokens(stream) do |kind, token|
+ puts "#{kind}: #{token}"
end
end
- def words(stream)
- word = ""
- stream.each_char do |c|
- if c =~ /^\s$/
- if word.length > 0
- yield word
- word = ""
- end
- else
- word << c
+ def tokens(stream)
+ acc = ''
+ flush_acc = Proc.new do
+ if acc.length > 0
+ yield :term, acc
+ acc = ''
end
end
- if word.length > 0
- yield word
+
+ stream.each_char do |c|
+ case c
+ when /\s/
+ flush_acc.call
+ when ';'
+ flush_acc.call
+ yield :semicolon, c
+ when '{'
+ flush_acc.call
+ yield :block_start, c
+ when '}'
+ flush_acc.call
+ yield :block_end, c
+ else
+ acc << c
+ end
end
+ flush_acc
end
-
-
-
end
|
Move from emitting words to emitting tokens.
|
diff --git a/config/initializers/gds_sso.rb b/config/initializers/gds_sso.rb
index abc1234..def5678 100644
--- a/config/initializers/gds_sso.rb
+++ b/config/initializers/gds_sso.rb
@@ -1,14 +1,3 @@ GDS::SSO.config do |config|
- config.user_model = "User"
-
- # set up ID and Secret in a way which doesn't require it to be checked in to source control...
- config.oauth_id = ENV["OAUTH_ID"]
- config.oauth_secret = ENV["OAUTH_SECRET"]
-
- # optional config for location of Signon
- config.oauth_root_url = Plek.new.external_url_for("signon")
-
- # Pass in a caching adapter cache bearer token requests.
- config.cache = Rails.cache
config.api_only = true
end
|
Remove redundant GDS SSO initializer config
This was made redundant in [1].
[1]: https://github.com/alphagov/gds-sso/pull/241
|
diff --git a/app/models/teaching_period.rb b/app/models/teaching_period.rb
index abc1234..def5678 100644
--- a/app/models/teaching_period.rb
+++ b/app/models/teaching_period.rb
@@ -3,7 +3,7 @@
validates :period, length: { minimum: 1, maximum: 20, allow_blank: false }, uniqueness: true
validates :year, length: { is: 4, allow_blank: false }, presence: true, numericality: { only_integer: true },
- inclusion: { in: 2000..2099, message: "%{value} is not a valid year" }
+ inclusion: { in: 2000..2999, message: "%{value} is not a valid year" }
validates :start_date, presence: true
validates :end_date, presence: true
|
FIX: Increase year window to 1000
|
diff --git a/hieralookup.rb b/hieralookup.rb
index abc1234..def5678 100644
--- a/hieralookup.rb
+++ b/hieralookup.rb
@@ -7,7 +7,8 @@
hiera = Hiera.new(:config => File.join(Hiera::Util.config_dir, 'hiera.yaml'))
Puppet.initialize_settings
-Puppet::Node::Facts.indirection.terminus_class = :rest
+# this can be :rest to use inventory service instead
+Puppet::Node::Facts.indirection.terminus_class = :puppetdb
get '/hiera/:_host/:_key/?:_resolution_type?' do
scope = Puppet::Node::Facts.indirection.find(params[:_host])
|
Use puppetdb directly instead of through inventory service
|
diff --git a/core/app/models/global_feed.rb b/core/app/models/global_feed.rb
index abc1234..def5678 100644
--- a/core/app/models/global_feed.rb
+++ b/core/app/models/global_feed.rb
@@ -17,4 +17,10 @@ key = @key[:all_activities]
Ohm::Model::TimestampedSet.new(key, Ohm::Model::Wrapper.wrap(Activity))
end
+
+ def all_discussions
+ key = @key[:all_discussions]
+ Ohm::Model::TimestampedSet.new(key, Ohm::Model::Wrapper.wrap(Activity))
+ end
+
end
|
Create redis set for discussions
|
diff --git a/core/db/default/spree/zones.rb b/core/db/default/spree/zones.rb
index abc1234..def5678 100644
--- a/core/db/default/spree/zones.rb
+++ b/core/db/default/spree/zones.rb
@@ -1,5 +1,5 @@-eu_vat = Spree::Zone.create!(name: "EU_VAT", description: "Countries that make up the EU VAT zone.")
-north_america = Spree::Zone.create!(name: "North America", description: "USA + Canada")
+eu_vat = Spree::Zone.create!(name: "EU_VAT", description: "Countries that make up the EU VAT zone.", kind: 'country')
+north_america = Spree::Zone.create!(name: "North America", description: "USA + Canada", kind: 'country')
%w(PL FI PT RO DE FR SK HU SI IE AT ES IT BE SE LV BG GB LT CY LU MT DK NL EE).
each do |name|
eu_vat.zone_members.create!(zoneable: Spree::Country.find_by!(iso: name))
|
Modify zone sample data for adding kind
|
diff --git a/app/workers/discourse_synchronization_worker.rb b/app/workers/discourse_synchronization_worker.rb
index abc1234..def5678 100644
--- a/app/workers/discourse_synchronization_worker.rb
+++ b/app/workers/discourse_synchronization_worker.rb
@@ -11,7 +11,7 @@ email: u.email,
external_id: user_id
)
- c.update_avatar(username: u.username, file: t.url + u.avatar.url)
+ c.update_avatar(username: u.username, file: t.url + u.avatar.url) if u.avatar.exists?
end
end
rescue DiscourseApi::Error
|
Synchronize avatar only if available
|
diff --git a/test/rails_1-2-3/app/controllers/application.rb b/test/rails_1-2-3/app/controllers/application.rb
index abc1234..def5678 100644
--- a/test/rails_1-2-3/app/controllers/application.rb
+++ b/test/rails_1-2-3/app/controllers/application.rb
@@ -3,5 +3,5 @@
class ApplicationController < ActionController::Base
# Pick a unique cookie name to distinguish our session data from others'
- session :session_key => '_validates_constancy_session_id'
+ session :session_key => '_validatesconstancy_session_id'
end
|
Rename the session identifier to match the database name
|
diff --git a/WarpSDK.podspec b/WarpSDK.podspec
index abc1234..def5678 100644
--- a/WarpSDK.podspec
+++ b/WarpSDK.podspec
@@ -14,8 +14,8 @@ s.source = { :git => "https://github.com/kuyazee/WarpSDK-iOS.git", :tag => "#{s.version}" }
s.source_files = "WarpSDK", "WarpSDK/**/*.{h,swift}"
- s.dependency "Alamofire", "~> 4.3"
- s.dependency "EVReflection", "~> 4.2.0"
- s.dependency "SwiftyJSON", "~> 3.1.4"
+ s.dependency "Alamofire", "4.4.0"
+ s.dependency "EVReflection", "4.2.0"
+ s.dependency "SwiftyJSON", "3.1.4"
end
|
Set Specified Versions for Alamofire, EVReflection and SwiftyJSON on PodSpec
|
diff --git a/onkcop.gemspec b/onkcop.gemspec
index abc1234..def5678 100644
--- a/onkcop.gemspec
+++ b/onkcop.gemspec
@@ -20,7 +20,7 @@ spec.require_paths = ["lib"]
spec.add_dependency "rubocop", "~> 0.46.0"
- spec.add_dependency "rubocop-rspec", ">= 1.8.0"
+ spec.add_dependency "rubocop-rspec", ">= 1.9.1"
spec.add_development_dependency "bundler"
spec.add_development_dependency "rake"
end
|
Update rubocop-rspec dependency version to >= 1.9.1
|
diff --git a/lib/bmff/box/base.rb b/lib/bmff/box/base.rb
index abc1234..def5678 100644
--- a/lib/bmff/box/base.rb
+++ b/lib/bmff/box/base.rb
@@ -15,6 +15,13 @@ return largesize if size == 1
return nil if size == 0
return size
+ end
+
+ def remaining_size
+ if actual_size
+ return (offset + actual_size) - io.pos
+ end
+ nil
end
# end of box?
|
Add remaining_size method to BMFF::Box::Base class.
This method returns a remaining size of itself.
|
diff --git a/pdf_cloud.gemspec b/pdf_cloud.gemspec
index abc1234..def5678 100644
--- a/pdf_cloud.gemspec
+++ b/pdf_cloud.gemspec
@@ -17,5 +17,5 @@ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.require_paths = ["lib"]
- gem.add_runtime_dependency "oauth2", '>= 0.9.1'
+ gem.add_runtime_dependency "oauth2"
end
|
Revert "Require version 0.9.1 of oauth2 gem."
This reverts commit 00b3ca8b546f5e3dfd9f14562cf5c00b69482b4b.
|
diff --git a/lib/jade/template.rb b/lib/jade/template.rb
index abc1234..def5678 100644
--- a/lib/jade/template.rb
+++ b/lib/jade/template.rb
@@ -31,7 +31,14 @@ options = { }
options[:filename] = eval_file
- jade_config = context.environment.context_class.jade_config.merge(options)
+ # For Rails 4.0.x and 4.1.x, the app-level config is on context.environment.
+ # For Rails 4.2.x, it's on context.assets instead.
+ app_level_config = context.environment.context_class.jade_config
+ if app_level_config.nil?
+ app_level_config = context.assets.context_class.jade_config
+ end
+ jade_config = app_level_config.merge(options)
+
# Manually camelize the one option key that needs to be camelized.
jade_config[:compileDebug] = jade_config.delete(:compile_debug) { false }
|
Jade::Template: Patch config-fetching to support Rails 4.2.x.
Closes #1.
|
diff --git a/lib/model_patches.rb b/lib/model_patches.rb
index abc1234..def5678 100644
--- a/lib/model_patches.rb
+++ b/lib/model_patches.rb
@@ -38,4 +38,14 @@ def qldcouncil?
return self.has_tag?('QLD_council')
end
+ #SA
+ # SA State
+ def sastate?
+ return self.has_tag?('SA_state')
+ end
+ # SA Council
+ def sacouncil?
+ return self.has_tag?('SA_council')
+ end
+
end
|
Define SA in the PublicBody Module
|
diff --git a/lib/ramom/mapping.rb b/lib/ramom/mapping.rb
index abc1234..def5678 100644
--- a/lib/ramom/mapping.rb
+++ b/lib/ramom/mapping.rb
@@ -8,7 +8,7 @@
def initialize(entity_registry, entries = EMPTY_HASH, &block)
super(entity_registry, entries.dup)
- infer_from_definitions
+ infer # done before instance_eval to support overwriting
instance_eval(&block) if block
end
@@ -22,7 +22,7 @@ entries[relation_name] = entity_registry.mapper(mapper_name)
end
- def infer_from_definitions
+ def infer
entity_registry.definitions.each do |name, definition|
map(definition.default_options.fetch(:relation, pluralize(name)), name)
end
|
Rename private method in Mapping
|
diff --git a/lib/rrimm/fetcher.rb b/lib/rrimm/fetcher.rb
index abc1234..def5678 100644
--- a/lib/rrimm/fetcher.rb
+++ b/lib/rrimm/fetcher.rb
@@ -8,6 +8,11 @@ class Feed
class Updated
def to_date
+ @content
+ end
+ end
+ class Title
+ def to_s
@content
end
end
|
Fix title for atom entries
|
diff --git a/functional_test/minitest_helper.rb b/functional_test/minitest_helper.rb
index abc1234..def5678 100644
--- a/functional_test/minitest_helper.rb
+++ b/functional_test/minitest_helper.rb
@@ -2,7 +2,7 @@
SimpleCov.start do
add_filter '/functional_test/'
- coverage_dir 'fv_coverage'
+ command_name "Live Tests"
end
require 'minitest/autorun'
|
Unify code coverage output between UTs and live tests
|
diff --git a/pry-nav.gemspec b/pry-nav.gemspec
index abc1234..def5678 100644
--- a/pry-nav.gemspec
+++ b/pry-nav.gemspec
@@ -19,6 +19,6 @@
# Dependencies
gem.required_ruby_version = '>= 1.8.7'
- gem.add_runtime_dependency 'pry', '>= 0.9.10', '< 0.12.0'
+ gem.add_runtime_dependency 'pry', '>= 0.9.10', '< 0.13.0'
gem.add_development_dependency 'pry-remote', '~> 0.1.6'
end
|
Allow newer versions of pry to be used
|
diff --git a/lib/exception_notifier/rake/rake_patch.rb b/lib/exception_notifier/rake/rake_patch.rb
index abc1234..def5678 100644
--- a/lib/exception_notifier/rake/rake_patch.rb
+++ b/lib/exception_notifier/rake/rake_patch.rb
@@ -23,7 +23,7 @@
# Only do this if we're actually in a Rake context. In some contexts (e.g.,
# in the Rails console) Rake might not be defined.
-if Object.const_defined? :Rake
+if Object.const_defined?(:Rake) && Rake.respond_to?(:application)
Rake.application.instance_eval do
class << self
include ExceptionNotifier::RakePatch
|
Fix error exposed by running rspec in RubyMine
|
diff --git a/app/helpers/logo_helper.rb b/app/helpers/logo_helper.rb
index abc1234..def5678 100644
--- a/app/helpers/logo_helper.rb
+++ b/app/helpers/logo_helper.rb
@@ -27,7 +27,7 @@ linked_logo
else
css_classes = logo_classes(organisation: organisation, size: options[:size], stacked: true)
- content_tag(:span, class: css_classes) { linked_logo }
+ content_tag(:span, class: css_classes) { content_tag(:span) {linked_logo} }
end
end
end
|
Fix missing span causing misalignment in org logos
https://www.pivotaltracker.com/story/show/58077240
|
diff --git a/lib/generators/netsuite_rails/install_generator.rb b/lib/generators/netsuite_rails/install_generator.rb
index abc1234..def5678 100644
--- a/lib/generators/netsuite_rails/install_generator.rb
+++ b/lib/generators/netsuite_rails/install_generator.rb
@@ -6,7 +6,13 @@ module Generators
class InstallGenerator < Rails::Generators::Base
# http://stackoverflow.com/questions/4141739/generators-and-migrations-in-plugins-rails-3
- include ActiveRecord::Generators::Migration
+
+ if Rails::VERSION::STRING.start_with?('3.2')
+ include Rails::Generators::Migration
+ extend ActiveRecord::Generators::Migration
+ else
+ include ActiveRecord::Generators::Migration
+ end
source_root File.expand_path('../templates', __FILE__)
|
Support rails 3.2 in install generator
|
diff --git a/app/mailers/load_mailer.rb b/app/mailers/load_mailer.rb
index abc1234..def5678 100644
--- a/app/mailers/load_mailer.rb
+++ b/app/mailers/load_mailer.rb
@@ -8,7 +8,7 @@ end
def send_notification(email, load_event)
- subject_line="#{ENV['S3_BUCKET_NAME'].upcase} #{load_event.event_type.capitalize} Load: Status: #{load_event.status}. Add: #{load_event.should_add} Update: #{load_event.should_change} Studies processed: #{load_event.processed}"
+ subject_line="AACT #{Rails.env.capitalize} #{load_event.event_type.capitalize} Load: Status: #{load_event.status}. Add: #{load_event.should_add} Update: #{load_event.should_change} Studies processed: #{load_event.processed}"
mail(from: 'AACT <mailgun@mg.aact-mail.org>', to: email, subject: subject_line, body: load_event.description)
end
end
|
Fix the email subject line. In preparation for moving away from AWS.
|
diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb
index abc1234..def5678 100644
--- a/app/mailers/user_mailer.rb
+++ b/app/mailers/user_mailer.rb
@@ -1,10 +1,10 @@ class UserMailer < ActionMailer::Base
- default from: "Ultimate Bundles <customerservice@ultimate-bundles.com>"
+ default from: "UltimateBundles <customerservice@ultimate-bundles.com>"
def signup_email(user)
@user = user
@twitter_message = "I just rediscovered my inner creative genius. Wanna join me? Plus, earn 1yr of Better Homes and Gardens for FREE."
- mail(:to => user.email, :subject => "Get ready to connect with your creative side in 2015 – and bring your friends!")
+ mail(:to => user.email, :subject => "Your 4-steps mini-course")
end
end
|
Update the signup email subject
|
diff --git a/app/models/access_token.rb b/app/models/access_token.rb
index abc1234..def5678 100644
--- a/app/models/access_token.rb
+++ b/app/models/access_token.rb
@@ -21,15 +21,19 @@
def self.insecure_build_for(ontology_version)
repository = ontology_version.repository
+ AccessToken.new(
+ {repository: repository,
+ expiration: fresh_expiration_date,
+ token: generate_token_string(ontology_version, repository)},
+ {without_protection: true})
+ end
+
+ def self.generate_token_string(ontology_version, repository)
id = [
repository.to_param, ontology_version.path,
Time.now.strftime('%Y-%m-%d-%H-%M-%S-%6N')
].join('|')
- AccessToken.new(
- {repository: repository,
- expiration: fresh_expiration_date,
- token: Digest::SHA2.hexdigest(id)},
- {without_protection: true})
+ Digest::SHA2.hexdigest(id)
end
def to_s
|
Put hash generation to a separate method.
|
diff --git a/pieces.gemspec b/pieces.gemspec
index abc1234..def5678 100644
--- a/pieces.gemspec
+++ b/pieces.gemspec
@@ -28,4 +28,5 @@ spec.add_development_dependency 'pry'
spec.add_development_dependency 'rake'
spec.add_development_dependency 'rspec'
+ spec.add_development_dependency 'rails'
end
|
Add rails to dev dependencies
|
diff --git a/lib/armoire/railtie.rb b/lib/armoire/railtie.rb
index abc1234..def5678 100644
--- a/lib/armoire/railtie.rb
+++ b/lib/armoire/railtie.rb
@@ -1,6 +1,6 @@ class Armoire
class Railtie < Rails::Railtie
- initializer "armoire.load_config" do
+ config.before_configuration do
Armoire.load! Rails.root.join('config', 'application.yml')
end
end
|
Fix the Railtie to run on before_configuration
|
diff --git a/recipes/tags.rb b/recipes/tags.rb
index abc1234..def5678 100644
--- a/recipes/tags.rb
+++ b/recipes/tags.rb
@@ -0,0 +1,20 @@+set :git_remote, "origin"
+
+namespace :tags do
+ desc <<-TEXT
+ Tag the (git) repository with the release name and push that tag back
+ upstream. This is double-entry book keeping. The actual deployment knows
+ what revision was deployed (from the REVISION file) and the git repository
+ also knows from the tag.
+ TEXT
+ task :repository, :role => :db, :only => { :primary => true } do
+ release_name = fetch(:release_name)
+
+ run_locally "git tag release-#{release_name}"
+ run_locally "git push #{git_remote} release-#{release_name}"
+ end
+end
+
+on :load do
+ after_any_deployment "tags:repository" if fetch(:tag_on_deploy, false)
+end
|
Create and push a git tag every time a deployment happens.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.