diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
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
@@ -17,8 +17,8 @@ it { should be_listening }
end
- describe command('docker info') do
- it { should return_stdout 'Storage Driver: aufs' }
+ describe command('docker info | grep "Storage Driver: aufs"') do
+ it { should return_exit_status 0 }
end
describe service('proxy') do
@@ -53,4 +53,12 @@ describe package('sysdig') do
it { should be_installed }
end
+
+ describe file('/usr/local/bin/nsenter') do
+ it { should be_file }
+ end
+
+ describe file('/usr/local/bin/docker-enter') do
+ it { should be_file }
+ end
end
|
Adjust and add some tests.
|
diff --git a/config/application.rb b/config/application.rb
index abc1234..def5678 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -21,7 +21,7 @@ # Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
- config.autoload_paths << Rails.root.join('lib')
+ config.eager_load_paths << Rails.root.join('lib')
def settings
@settings ||= begin
|
Fix eager loading on production
|
diff --git a/config/application.rb b/config/application.rb
index abc1234..def5678 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -4,9 +4,10 @@
# Load the figs variables before the rest of the bundle
# so we can use env vars in other gems
-require 'figs'
-# Don't run this initializer on travis.
-Figs.load(stage: Rails.env) unless ENV['TRAVIS']
+unless Rails.env.test?
+ require 'figs'
+ Figs.load(stage: Rails.env)
+end
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
|
Remove figs dependency from test env
|
diff --git a/config/application.rb b/config/application.rb
index abc1234..def5678 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -24,5 +24,7 @@ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
+
+ config.sass.preferred_syntax = :sass
end
end
|
Set sass as the default for new stylesheets
|
diff --git a/Casks/puppet.rb b/Casks/puppet.rb
index abc1234..def5678 100644
--- a/Casks/puppet.rb
+++ b/Casks/puppet.rb
@@ -4,7 +4,7 @@
url "http://downloads.puppetlabs.com/mac/puppet-#{version}.dmg"
name 'Puppet'
- homepage 'http://puppetlabs.com/'
+ homepage 'https://puppetlabs.com/'
license :apache
pkg "puppet-#{version}.pkg"
|
Fix homepage to use SSL in Puppet 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/sell_object.gemspec b/sell_object.gemspec
index abc1234..def5678 100644
--- a/sell_object.gemspec
+++ b/sell_object.gemspec
@@ -18,7 +18,7 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]
- spec.required_ruby_version = '>= 1.9.3p125'
+ spec.required_ruby_version = '>= 1.9.3'
spec.add_development_dependency "bundler", "~> 1.3"
spec.add_development_dependency "rake"
|
Update ruby version in .gemspec
|
diff --git a/app/finders/groups_finder.rb b/app/finders/groups_finder.rb
index abc1234..def5678 100644
--- a/app/finders/groups_finder.rb
+++ b/app/finders/groups_finder.rb
@@ -0,0 +1,38 @@+class GroupsFinder
+ def execute(current_user, options = {})
+ all_groups(current_user)
+ end
+
+ private
+
+ def all_groups(current_user)
+ if current_user
+ if current_user.authorized_groups.any?
+ # User has access to groups
+ #
+ # Return only:
+ # groups with public projects
+ # groups with internal projects
+ # groups with joined projects
+ #
+ group_ids = Project.public_and_internal_only.pluck(:namespace_id) +
+ current_user.authorized_groups.pluck(:id)
+ Group.where(id: group_ids)
+ else
+ # User has no group membership
+ #
+ # Return only:
+ # groups with public projects
+ # groups with internal projects
+ #
+ Group.where(id: Project.public_and_internal_only.pluck(:namespace_id))
+ end
+ else
+ # Not authenticated
+ #
+ # Return only:
+ # groups with public projects
+ Group.where(id: Project.public_only.pluck(:namespace_id))
+ end
+ end
+end
|
Add GroupFinder for collection all groups user has access to
Signed-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>
|
diff --git a/Faraday.podspec b/Faraday.podspec
index abc1234..def5678 100644
--- a/Faraday.podspec
+++ b/Faraday.podspec
@@ -2,7 +2,7 @@ spec.name = 'Faraday'
spec.version = '0.3.0'
spec.summary = 'Flexible HTTP client framework based on Rack'
- spec.description = <<-DESCRIPTION
+ spec.description = <<-DESCRIPTION.gsub(/\s+/, ' ').chomp
Flexible HTTP and HTTPS client framework based on Rack. Adopts the concept of
Rack middleware when processing the HTTP requests and responses. When you
build a connection, you set up a stack of middleware components for processing
|
Clean up Pod description whitespace
|
diff --git a/app/models/invite_request.rb b/app/models/invite_request.rb
index abc1234..def5678 100644
--- a/app/models/invite_request.rb
+++ b/app/models/invite_request.rb
@@ -4,6 +4,7 @@ extend ActiveModel::Naming
attr_accessor :first_name, :last_name, :email, :company, :role, :message
+ validates :first_name, :last_name, :email, :role, presence: true
validates_length_of :message, maximum: 500
#TODO add other validations
|
Add validations to invite request
|
diff --git a/db/migrate/20160616105832_create_adapters.rb b/db/migrate/20160616105832_create_adapters.rb
index abc1234..def5678 100644
--- a/db/migrate/20160616105832_create_adapters.rb
+++ b/db/migrate/20160616105832_create_adapters.rb
@@ -5,7 +5,7 @@ t.string :name, null: false
t.string :web_service_type
t.string :web_service_uri
- t.integer :timeout, default: 5
+ t.integer :time_out, default: 5
##Encrypted fields for authentication
t.string :encrypted_auth_token
|
Rename timeout attribute that might clash with ruby private method
|
diff --git a/Casks/zotero.rb b/Casks/zotero.rb
index abc1234..def5678 100644
--- a/Casks/zotero.rb
+++ b/Casks/zotero.rb
@@ -1,7 +1,7 @@ class Zotero < Cask
- url 'http://download.zotero.org/standalone/4.0.16/Zotero-4.0.16.dmg'
+ url 'http://download.zotero.org/standalone/4.0.17/Zotero-4.0.17.dmg'
homepage 'http://www.zotero.org/'
- version '4.0.16'
- sha1 '461752e20adb669471063b5ea1c573037d73ada3'
+ version '4.0.17'
+ sha1 '470365f88714d72a3ef99d4fb3be8b1cdf881d5d'
link 'Zotero.app'
end
|
Update Zotero cask version to 4.0.17.
Updates Zotero version to latest release version, 4.0.17.
|
diff --git a/mami.gemspec b/mami.gemspec
index abc1234..def5678 100644
--- a/mami.gemspec
+++ b/mami.gemspec
@@ -21,6 +21,7 @@ spec.add_development_dependency "bundler", "~> 1.3"
spec.add_development_dependency "rake"
spec.add_development_dependency "pry"
+ spec.add_development_dependency "rspec"
spec.add_dependency 'thor'
end
|
Add rspec to development dependency
|
diff --git a/WebViewProxy.podspec b/WebViewProxy.podspec
index abc1234..def5678 100644
--- a/WebViewProxy.podspec
+++ b/WebViewProxy.podspec
@@ -1,13 +1,16 @@ Pod::Spec.new do |s|
s.name = 'WebViewProxy'
- s.version = '0.2.5'
+ s.version = '0.2.6'
s.summary = 'A standalone iOS & OSX class for intercepting and proxying HTTP requests (e.g. from a Web View)'
s.homepage = 'https://github.com/marcuswestin/WebViewProxy'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'marcuswestin' => 'marcus.westin@gmail.com' }
s.requires_arc = true
s.source = { :git => 'https://github.com/marcuswestin/WebViewProxy.git', :tag => 'v'+s.version.to_s }
- s.platform = :ios, '5.0'
- s.source_files = 'WebViewProxy/*.{h,m}'
- s.framework = 'UIKit'
+ s.ios.platform = :ios, '5.0'
+ s.osx.platform = :osx, '10.9.4'
+ s.ios.source_files = 'WebViewProxy/*.{h,m}'
+ s.osx.source_files = 'WebViewProxy/*.{h,m}'
+ s.ios.framework = 'UIKit'
+ s.osx.framework = 'WebKit'
end
|
Add OSX back into podspec file
|
diff --git a/font-fira-code.rb b/font-fira-code.rb
index abc1234..def5678 100644
--- a/font-fira-code.rb
+++ b/font-fira-code.rb
@@ -0,0 +1,10 @@+cask :v1 => 'font-fira-code' do
+ version '0.3'
+ sha256 'a90721b6b1de4640ace744657432a990aae4c8e403b78141a50d0a7abd305db7'
+
+ url 'https://github.com/tonsky/FiraCode/releases/download/0.3/FiraCode-Regular.otf'
+ homepage 'https://github.com/tonsky/FiraCode'
+ license :ofl
+
+ font 'FiraCode-Regular.otf'
+end
|
Add cask for Fira Code v0.3
|
diff --git a/ETA-SDK.podspec b/ETA-SDK.podspec
index abc1234..def5678 100644
--- a/ETA-SDK.podspec
+++ b/ETA-SDK.podspec
@@ -14,7 +14,10 @@ s.platform = :ios, '6.0'
s.requires_arc = true
- s.source = { :git => "https://github.com/eTilbudsavis/native-ios-eta-sdk.git", :tag => "v2.2.1" }
+ s.source = {
+ :git => "https://github.com/eTilbudsavis/native-ios-eta-sdk.git",
+ :tag => "v" + s.version.to_s
+ }
s.source_files = 'ETA-SDK/**/*.{h,m}'
s.frameworks = 'CoreLocation', 'Foundation', 'UIKit'
@@ -22,5 +25,6 @@ s.dependency 'Mantle', '~> 1.3.1'
s.dependency 'FMDB', '~> 2.2.0'
s.dependency 'MAKVONotificationCenter', '~> 0.0.2'
+ s.dependency 'CocoaLumberjack', '~> 1.8.1'
end
|
Include CocoaLumberjack in podspec dependancy
|
diff --git a/SCPinions.podspec b/SCPinions.podspec
index abc1234..def5678 100644
--- a/SCPinions.podspec
+++ b/SCPinions.podspec
@@ -20,4 +20,5 @@ s.source = { :git => "https://github.com/steamclock/SCPinions.git", :tag => s.version.to_s }
s.source_files = '**/*.{h,m}'
s.requires_arc = true
+ s.frameworks = 'CFNetwork'
end
|
Add cfnetwork framework to podspec
|
diff --git a/js_asset_paths.gemspec b/js_asset_paths.gemspec
index abc1234..def5678 100644
--- a/js_asset_paths.gemspec
+++ b/js_asset_paths.gemspec
@@ -6,8 +6,8 @@ Gem::Specification.new do |spec|
spec.name = 'js-asset_paths'
spec.version = JsAssetPaths::VERSION
- spec.authors = ['sonnym', 'sbleon']
- spec.email = ['michaud.sonny@gmail.com', 'leon@singlebrook.com']
+ spec.authors = ['sonnym']
+ spec.email = ['michaud.sonny@gmail.com']
spec.description = 'Access paths to compiled assets from in javascript.'
spec.summary = spec.description
spec.homepage = ''
|
Revert "Add myself as an owner."
This reverts commit 2b2e387facf8ad1861e4fd43fc3cbec419bae927.
|
diff --git a/ruby-solutions/string_compression.rb b/ruby-solutions/string_compression.rb
index abc1234..def5678 100644
--- a/ruby-solutions/string_compression.rb
+++ b/ruby-solutions/string_compression.rb
@@ -0,0 +1,17 @@+def string_compression(str)
+ count = 1
+ output = []
+ (0..str.length-1).each do |i|
+ if str[i] != str[i+1]
+ output[i] = "#{str[i]}#{count}"
+ count = 1
+ else
+ count += 1
+ end
+
+ end
+ output.join("")
+
+end
+
+p string_compression("aabcccccaaa")
|
Add solution for string compression in ruby
|
diff --git a/lib/given/rspec/all.rb b/lib/given/rspec/all.rb
index abc1234..def5678 100644
--- a/lib/given/rspec/all.rb
+++ b/lib/given/rspec/all.rb
@@ -8,7 +8,7 @@
if Given::NATURAL_ASSERTIONS_SUPPORTED
require 'given/rspec/monkey'
- raise "Unsupported version of RSpec (unable to detect assertions)" unless RSpec::Given::MONKEY
+ raise "Unsupported version of RSpec (#{RSpec::Version::STRING}), unable to detect assertions" unless RSpec::Given::MONKEY
end
require 'given/rspec/have_failed'
|
Add RSpec version to unsupported version message.
|
diff --git a/lib/json_api_params.rb b/lib/json_api_params.rb
index abc1234..def5678 100644
--- a/lib/json_api_params.rb
+++ b/lib/json_api_params.rb
@@ -1,5 +1,6 @@ # XXX Though these are necessary, AC::Parameters doesn't require it
require 'active_support/core_ext/class/attribute_accessors'
+require 'active_support/core_ext/module/delegation'
require 'date'
require 'rack/test/uploaded_file'
|
Add missing require for `AC::Parameters`
This file is not required in Rails 5:<
|
diff --git a/test/rain/deployer_test.rb b/test/rain/deployer_test.rb
index abc1234..def5678 100644
--- a/test/rain/deployer_test.rb
+++ b/test/rain/deployer_test.rb
@@ -2,20 +2,33 @@
class Rain::DeployerTest < ActiveSupport::TestCase
describe "DeployerTest: bare invocation" do
- setup { @command = %x(./bin/rain) }
+ before { @command ||= %x(./bin/rain) }
- should "deploy a new tag to stage" do
- skip "suck it"
+ should "deploy to production" do
assert_match 'Got a handful of stacks better grab an umbrella', @command
end
+ end
- should "deploy the same tag that's on stage to production" do
- assert_match 'jflksjflksjfl;', @command
+ describe "DeployerTest: specific environment invocation" do
+ context "on stage" do
+ before { @command ||= %x(./bin/rain on stage) }
+
+ should "deploy a new tag to stage" do
+ assert_match 'Deploying existing tag', @command
+ end
+ end
+
+ context "on production" do
+ before { @command ||= %x(./bin/rain on production) }
+
+ should "deploy the same tag that's on stage to production" do
+ assert_match 'Deploying existing tag', @command
+ end
end
end
describe "DeployerTest: help invocation for 'on'" do
- before { @command = %x(./bin/rain help on) }
+ before { @command ||= %x(./bin/rain help on) }
should "prompt for an environment" do
assert_match 'rain on ENVIRONMENT', @command
|
Add tests for on stage and on prod
|
diff --git a/lib/spectacles/view.rb b/lib/spectacles/view.rb
index abc1234..def5678 100644
--- a/lib/spectacles/view.rb
+++ b/lib/spectacles/view.rb
@@ -3,8 +3,7 @@ self.abstract_class = true
def self.new(*)
- warn "DEPRECATION WARNING: #{self} is an abstract class and should not be instantiated. In v1.0, calling `#{self}.new` will raise a NotImplementedError."
- super # raise NotImplementedError, "#{self} is an abstract class and can not be instantiated."
+ raise NotImplementedError, "#{self} is an abstract class and cannot be instantiated."
end
def self.view_exists?
|
Raise NotImplementedError when calling .new on a class that inherits from ::Spectacles::View.
|
diff --git a/lib/zebra/print_job.rb b/lib/zebra/print_job.rb
index abc1234..def5678 100644
--- a/lib/zebra/print_job.rb
+++ b/lib/zebra/print_job.rb
@@ -24,7 +24,8 @@
def check_existent_printers(printer)
existent_printers = Cups.show_destinations
- puts "EXISTENT PRINTERS: \n" + existent_printers
+ puts "EXISTENT PRINTERS: \n"
+ existent_printers.each { |x| puts x }
raise UnknownPrinter.new(printer) unless existent_printers.include?(printer)
end
|
Print all existing printers in array for debugging
|
diff --git a/test/unit/response_test.rb b/test/unit/response_test.rb
index abc1234..def5678 100644
--- a/test/unit/response_test.rb
+++ b/test/unit/response_test.rb
@@ -1,17 +1,9 @@ require File.dirname(__FILE__) + '/../test_helper'
class ResponseTest < Test::Unit::TestCase
- include ActiveMerchant::Shipping
-
-
- def setup
-
- end
-
def test_initialize
- response = nil
assert_nothing_raised do
- response = RateResponse.new(true, "success!", {:rate => 'Free!'}, :rates => [stub(:service_name => 'Free!', :total_price => 0)], :xml => "<rate>Free!</rate>")
+ RateResponse.new(true, "success!", {:rate => 'Free!'}, :rates => [stub(:service_name => 'Free!', :total_price => 0)], :xml => "<rate>Free!</rate>")
end
end
|
Remove unused code from response test
|
diff --git a/spec/models/services/twitter_spec.rb b/spec/models/services/twitter_spec.rb
index abc1234..def5678 100644
--- a/spec/models/services/twitter_spec.rb
+++ b/spec/models/services/twitter_spec.rb
@@ -0,0 +1,35 @@+# frozen_string_literal: true
+
+require 'rails_helper'
+
+describe Services::Twitter do
+ describe "#post" do
+ let(:user) { FactoryBot.create(:user) }
+ let(:service) { Services::Twitter.create(user: user) }
+ let(:answer) { FactoryBot.create(:answer, user: user,
+ content: 'a' * 255,
+ question_content: 'q' * 255) }
+ let(:twitter_client) { instance_double(Twitter::REST::Client) }
+
+ before do
+ allow(Twitter::REST::Client).to receive(:new).and_return(twitter_client)
+ allow(twitter_client).to receive(:update!)
+ stub_const("APP_CONFIG", {
+ 'hostname' => 'example.com',
+ 'https' => true,
+ 'items_per_page' => 5,
+ 'sharing' => {
+ 'twitter' => {
+ 'consumer_key' => 'AAA',
+ }
+ }
+ })
+ end
+
+ it "posts a shortened tweet" do
+ service.post(answer)
+
+ expect(twitter_client).to have_received(:update!).with("#{'q' * 123}… — #{'a' * 124}… https://example.com/#{user.screen_name}/a/#{answer.id}")
+ end
+ end
+end
|
Add test for tweet shortening
Co-authored-by: Georg Gadinger <9e8f1a26fbf401b045347f083556ffd7c0b25a58@nilsding.org>
|
diff --git a/metadater.rb b/metadater.rb
index abc1234..def5678 100644
--- a/metadater.rb
+++ b/metadater.rb
@@ -1,7 +1,7 @@ require 'rubygems' # When running under 1.8. Who knows?
-require 'mediainfo' # Capture technical metadata from video
-require 'mini_exiftool' # Capture software metadata from video
+require 'mediainfo' # Capture technical metadata from video. Requires MediaInfo
+require 'mini_exiftool' # Capture software metadata from video. Requires ExifTool
require 'spreadsheet' # Write to spreadsheet
# File-find gem, enables recursively searching a path
|
Make note of external, non RubyGems dependencies
|
diff --git a/opal.gemspec b/opal.gemspec
index abc1234..def5678 100644
--- a/opal.gemspec
+++ b/opal.gemspec
@@ -13,6 +13,4 @@ s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.require_paths = ['lib']
-
- s.add_runtime_dependency 'sprockets'
end
|
Remove final sprockets dependency from gemspec
|
diff --git a/nexus_artifact.gemspec b/nexus_artifact.gemspec
index abc1234..def5678 100644
--- a/nexus_artifact.gemspec
+++ b/nexus_artifact.gemspec
@@ -14,4 +14,6 @@ gem.name = "nexus_artifact"
gem.require_paths = ["lib"]
gem.version = NexusArtifact::VERSION
+
+ gem.add_dependency('mechanize', '~> 2.5')
end
|
Add mechanize dependency to gemspec
|
diff --git a/lib/adamantium.rb b/lib/adamantium.rb
index abc1234..def5678 100644
--- a/lib/adamantium.rb
+++ b/lib/adamantium.rb
@@ -50,7 +50,6 @@ extend ModuleMethods
extend ClassMethods if kind_of?(Class)
end
- self
end
private_class_method :included
|
Remove return value from Adamantium.included
|
diff --git a/lib/guard/rake.rb b/lib/guard/rake.rb
index abc1234..def5678 100644
--- a/lib/guard/rake.rb
+++ b/lib/guard/rake.rb
@@ -35,9 +35,16 @@ run_rake_task if @options[:run_on_all]
end
- def run_on_change(paths)
- run_rake_task
+ if ::Guard::VERSION < "1.1"
+ def run_on_change(paths)
+ run_rake_task
+ end
+ else
+ def run_on_changes(paths)
+ run_rake_task
+ end
end
+
def run_rake_task
UI.info "running #{@task}"
|
Define run_on_change(s) according to Guard version
This suppresses a deprecation notice given when using guard-rake with
Guard 1.1 and higher.
|
diff --git a/lib/resa/event.rb b/lib/resa/event.rb
index abc1234..def5678 100644
--- a/lib/resa/event.rb
+++ b/lib/resa/event.rb
@@ -4,8 +4,8 @@ field :title, type: String
field :organizer, type: String
field :location, type: String
- field :dtstart, type: DateTime
- field :dtend, type: DateTime
+ field :dtstart, type: Time
+ field :dtend, type: Time
embedded_in :room, :class_name => "Resa::Room"
|
Use Time instead of DateTime
for speed and bugged with mongoid:
see https://github.com/mongoid/mongoid/issues/1135
Signed-off-by: Laurent Arnoud <f1b010126f61b5c59e7d5eb42c5c68f6105c5914@spkdev.net>
|
diff --git a/lib/sgf/parser.rb b/lib/sgf/parser.rb
index abc1234..def5678 100644
--- a/lib/sgf/parser.rb
+++ b/lib/sgf/parser.rb
@@ -46,8 +46,9 @@ end
def is_binary? file
- parts = %x(file -i #{file}).split(':', 2)
- not parts[1].include?('text')
+ # This does not work?!
+ # parts = %x(/usr/bin/file -i #{file}).split(':', 2)
+ # not parts[1].include?('text')
end
end
|
Comment out that code that check if a file is binary file
|
diff --git a/lib/slop/types.rb b/lib/slop/types.rb
index abc1234..def5678 100644
--- a/lib/slop/types.rb
+++ b/lib/slop/types.rb
@@ -1,10 +1,14 @@ module Slop
+ # Cast the option argument to a String.
class StringOption < Option
def call(value)
value.to_s
end
end
+ # Cast the option argument to true or false.
+ # Override default_value to default to false instead of nil.
+ # This option type does not expect an argument.
class BoolOption < Option
def call(_value)
true
@@ -20,6 +24,7 @@ end
BooleanOption = BoolOption
+ # Cast the option argument to an Integer.
class IntegerOption < Option
def call(value)
value =~ /\A\d+\z/ && value.to_i
@@ -27,6 +32,7 @@ end
IntOption = IntegerOption
+ # Cast the option argument to a Float.
class FloatOption < Option
def call(value)
# TODO: scientific notation, etc.
@@ -34,6 +40,8 @@ end
end
+ # Collect multiple items into a single Array. Support
+ # arguments separated by commas or multiple occurences.
class ArrayOption < Option
def call(value)
@value ||= []
@@ -49,7 +57,8 @@ end
end
- # an option that discards the return value
+ # An option that discards the return value, inherits from Bool
+ # since it does not expect an argument.
class NullOption < BoolOption
def null?
true
|
Add some basic type docs
|
diff --git a/app/controllers/api/product_images_controller.rb b/app/controllers/api/product_images_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/api/product_images_controller.rb
+++ b/app/controllers/api/product_images_controller.rb
@@ -1,5 +1,5 @@ module Api
- class ProductImagesController < Spree::Api::BaseController
+ class ProductImagesController < BaseController
respond_to :json
def update_product_image
|
Switch from Spree::Api::BaseController to Api::BaseController so that AMS is activated
|
diff --git a/Casks/hopper-disassembler.rb b/Casks/hopper-disassembler.rb
index abc1234..def5678 100644
--- a/Casks/hopper-disassembler.rb
+++ b/Casks/hopper-disassembler.rb
@@ -1,6 +1,6 @@ cask :v1 => 'hopper-disassembler' do
- version '3.9.4'
- sha256 'fc06dcd70c7af71eee96a95d32ab0ffa5b9452ec8d279fc8bc31c0d09575cc71'
+ version '3.9.9'
+ sha256 '60a8412269cc51fbd8565f280dd70bea34d102c74a5efdc201b468c566d5ad87'
url "http://www.hopperapp.com/HopperWeb/downloads/Hopper-#{version}.zip"
appcast 'http://www.hopperapp.com/HopperWeb/appcast.php'
|
Upgrade Hopper Disassembler v3.app to v3.9.9
|
diff --git a/Casks/hopper-disassembler.rb b/Casks/hopper-disassembler.rb
index abc1234..def5678 100644
--- a/Casks/hopper-disassembler.rb
+++ b/Casks/hopper-disassembler.rb
@@ -1,6 +1,6 @@ cask :v1 => 'hopper-disassembler' do
- version '3.9.9'
- sha256 '60a8412269cc51fbd8565f280dd70bea34d102c74a5efdc201b468c566d5ad87'
+ version '3.9.11'
+ sha256 '8dffd9a5b5806653d5f0add193dd4b34da0b0f0eb3d53eda9a94b1eb141d3b96'
url "http://www.hopperapp.com/HopperWeb/downloads/Hopper-#{version}.zip"
appcast 'http://www.hopperapp.com/HopperWeb/appcast.php'
|
Upgrade Hopper Disassembler to v3.9.11
|
diff --git a/Casks/torbrowser-alpha-ar.rb b/Casks/torbrowser-alpha-ar.rb
index abc1234..def5678 100644
--- a/Casks/torbrowser-alpha-ar.rb
+++ b/Casks/torbrowser-alpha-ar.rb
@@ -0,0 +1,18 @@+cask :v1 => 'torbrowser-alpha-ar' do
+ version '5.5a3'
+ sha256 'cff609da6f3851c4fcfafcf3e212fd9fed489bd4a7e51fc3d63c9b402a6da277'
+
+ url "https://dist.torproject.org/torbrowser/#{version}/TorBrowser-#{version}-osx64_ar.dmg"
+ gpg "#{url}.asc",
+ :key_id => 'ef6e286dda85ea2a4ba7de684e2c6e8793298290'
+ name 'Tor Browser'
+ homepage 'https://www.torproject.org/projects/torbrowser.html'
+ license :oss
+
+ app 'TorBrowser.app'
+
+ caveats <<-EOS.undent
+ If you already have a version of TorBrowser installed this will overwrite your local settings.
+ It is recommended to use TorBrowser's built-in update mechanism after the first install to keep your settings.
+ EOS
+end
|
Add TorBrowser Alpha AR 5.5a3
|
diff --git a/app/models/renalware/admissions/consult_query.rb b/app/models/renalware/admissions/consult_query.rb
index abc1234..def5678 100644
--- a/app/models/renalware/admissions/consult_query.rb
+++ b/app/models/renalware/admissions/consult_query.rb
@@ -14,7 +14,18 @@ end
def search
- @search ||= Consult.active.order(created_at: :desc).ransack(query)
+ @search ||= begin
+ Consult
+ .includes(
+ :created_by,
+ :consult_site,
+ :hospital_ward,
+ patient: { current_modality: :description }
+ )
+ .active
+ .order(created_at: :desc)
+ .ransack(query)
+ end
end
end
end
|
Remove N+1 queries in Consults
|
diff --git a/app/models/answer.rb b/app/models/answer.rb
index abc1234..def5678 100644
--- a/app/models/answer.rb
+++ b/app/models/answer.rb
@@ -9,6 +9,6 @@ validates :content, presence: true
def vote_count
- self.vote_count = self.votes.sum(:value)
+ self.votes.sum(:value)
end
end
|
Change vote count to return a num rather than change nonexistant col
|
diff --git a/app/services/reports/docx/draw_step_checklist.rb b/app/services/reports/docx/draw_step_checklist.rb
index abc1234..def5678 100644
--- a/app/services/reports/docx/draw_step_checklist.rb
+++ b/app/services/reports/docx/draw_step_checklist.rb
@@ -19,11 +19,13 @@ text I18n.t('projects.reports.elements.step_checklist.user_time',
timestamp: I18n.l(timestamp, format: :full)), color: color[:gray]
end
- items.each do |item|
- html = custom_auto_link(item.text, team: @report_team)
- html_to_word_converter(html)
- @docx.p " (#{I18n.t('projects.reports.elements.step_checklist.checked')})", color: '2dbe61' if item.checked
+ @docx.ul do
+ items.each do |item|
+ li do
+ text SmartAnnotations::TagToText.new(@user, @report_team, item.text).text
+ text " (#{I18n.t('projects.reports.elements.step_checklist.checked')})", color: '2dbe61' if item.checked
+ end
+ end
end
-
end
end
|
Revert "SCI-3702 replace _to_text with _to_html"
This reverts commit 93b7c472ac8ef271c9b23bfc6ea85d78a713b7eb.
|
diff --git a/app/models/permit.rb b/app/models/permit.rb
index abc1234..def5678 100644
--- a/app/models/permit.rb
+++ b/app/models/permit.rb
@@ -1,5 +1,6 @@ class Permit < ActiveRecord::Base
- validates :owner_address, :presence => true, :address => true, :if => :active_or_address?
+ validates :owner_address, :presence => true, :if => :active_or_address?
+ validates :owner_address, :address => true, :if => :only_if_presence?
def active?
@@ -9,4 +10,8 @@ def active_or_address?
status.to_s.include?('enter_address') || active?
end
+
+ def only_if_presence?
+ active_or_address? && ! owner_address.blank?
+ end
end
|
Check whether in SA only if address is not blank
|
diff --git a/app/models/trends.rb b/app/models/trends.rb
index abc1234..def5678 100644
--- a/app/models/trends.rb
+++ b/app/models/trends.rb
@@ -18,7 +18,7 @@ end
def self.request_review!
- [links, tags].each(&:request_review) if enabled?
+ [tags].each(&:request_review) if enabled?
end
def self.enabled?
|
Disable trending links review request emails
|
diff --git a/Casks/intellij-idea-community-eap.rb b/Casks/intellij-idea-community-eap.rb
index abc1234..def5678 100644
--- a/Casks/intellij-idea-community-eap.rb
+++ b/Casks/intellij-idea-community-eap.rb
@@ -1,7 +1,7 @@ class IntellijIdeaCommunityEap < Cask
- url 'http://download.jetbrains.com/idea/ideaIC-135.863.dmg'
+ url 'http://download.jetbrains.com/idea/ideaIC-138.777.dmg'
homepage 'https://www.jetbrains.com/idea/index.html'
- version '135.863'
- sha256 '623aac77c3fea84ca6677d5777f7c1c72e3cd5b0ba680d3a465452767e78db89'
- link 'IntelliJ IDEA 13 CE EAP.app'
+ version '138.777'
+ sha256 '9614d8055051dc418bce905587c33b3d30e164d1eb873d3716b613627a2c52a2'
+ link 'IntelliJ IDEA 14 CE EAP.app'
end
|
Upgrade IntelliJ CE EAP to version 14 (build 138.777).
The version was `135.863`.
http://confluence.jetbrains.com/display/IDEADEV/IDEA+14+EAP
http://blog.jetbrains.com/idea/2014/06/intellij-idea-14-early-preview-is-available/
|
diff --git a/apitome.gemspec b/apitome.gemspec
index abc1234..def5678 100644
--- a/apitome.gemspec
+++ b/apitome.gemspec
@@ -16,7 +16,6 @@ s.license = "MIT"
s.files = Dir["{app,config,lib,vendor}/**/*"] + ["MIT.LICENSE", "README.md"]
- s.test_files = Dir["{spec}/**/*"]
s.add_dependency "railties"
s.add_development_dependency "rspec_api_documentation"
|
Remove test files from built gem
|
diff --git a/core/dir/home_spec.rb b/core/dir/home_spec.rb
index abc1234..def5678 100644
--- a/core/dir/home_spec.rb
+++ b/core/dir/home_spec.rb
@@ -2,14 +2,6 @@ require File.expand_path('../fixtures/common', __FILE__)
describe "Dir.home" do
- before :all do
- DirSpecs.create_mock_dirs
- end
-
- after :all do
- DirSpecs.delete_mock_dirs
- end
-
it "returns the current user's home directory as a string if called without arguments" do
Dir.home.should == home_directory
end
|
Remove useless before/after in Dir.home spec
|
diff --git a/Casks/safaritabswitching.rb b/Casks/safaritabswitching.rb
index abc1234..def5678 100644
--- a/Casks/safaritabswitching.rb
+++ b/Casks/safaritabswitching.rb
@@ -1,11 +1,11 @@ class Safaritabswitching < Cask
- version '1.2.6'
- sha256 'd2823ec2327c5b5e2602876749f6c6ef352cfe7b5498158cc46c5610f6bf9b69'
+ version '1.2.7'
+ sha256 'cda2d24dd7f273d5e26bf3ee32c1e711ebf28c0c44c619fa9f4e7f8efea488ca'
- url "https://github.com/rs/SafariTabSwitching/releases/download/#{version}/Safari.Tab.Switching-#{version}.pkg"
+ url "https://github.com/rs/SafariTabSwitching/releases/download/#{version}/Safari.Tab.Switching-#{version}.zip"
homepage 'https://github.com/rs/SafariTabSwitching'
license :oss
- pkg "Safari.Tab.Switching-#{version}.pkg"
+ pkg "Safari Tab Switching-#{version}.pkg"
uninstall :pkgutil => 'net.rhapsodyk.SafariTabSwitching.pkg'
end
|
Upgrade Safari Tab Switching to v1.2.7
|
diff --git a/lib/capistrano/tasks/jekyll.rake b/lib/capistrano/tasks/jekyll.rake
index abc1234..def5678 100644
--- a/lib/capistrano/tasks/jekyll.rake
+++ b/lib/capistrano/tasks/jekyll.rake
@@ -18,5 +18,5 @@ end
end
- after 'deploy:updated', :build
+ after 'deploy:updated', 'jekyll:build'
end
|
Make task invocation in after hook namespace aware
|
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 = 'evt-messaging'
- s.version = '0.22.1.0'
+ s.version = '0.22.2.0'
s.summary = 'Common primitives for platform-specific messaging implementations for Eventide'
s.description = ' '
|
Package version is increased from 0.22.1.0 to 0.22.2.0
|
diff --git a/lib/git-deploy/heroku_workers.rb b/lib/git-deploy/heroku_workers.rb
index abc1234..def5678 100644
--- a/lib/git-deploy/heroku_workers.rb
+++ b/lib/git-deploy/heroku_workers.rb
@@ -8,7 +8,8 @@
if env[ 'remote.heroku' ]
# TODO catch exit status
- @workers = `heroku ps --remote #{env[ 'remote' ]} | grep -c worker`.to_i
+ @workers = `heroku ps --remote #{env[ 'remote' ]} | grep -c ^worker`.to_i
+ @workers = nil if @workers.zero?
end
if env[ 'remote.heroku' ] && @workers
|
Fix bug where middlware was counting 1 too many workers
|
diff --git a/lib/http_shooting_party/excon.rb b/lib/http_shooting_party/excon.rb
index abc1234..def5678 100644
--- a/lib/http_shooting_party/excon.rb
+++ b/lib/http_shooting_party/excon.rb
@@ -5,7 +5,7 @@ attr_accessor :client
def initialize(url)
- self.client = ::Excon.new(url)
+ self.client = ::Excon.new(url, persistent: true)
end
def name
|
Enable persistent to use the keepalives
|
diff --git a/lib/kubeclient/kube_exception.rb b/lib/kubeclient/kube_exception.rb
index abc1234..def5678 100644
--- a/lib/kubeclient/kube_exception.rb
+++ b/lib/kubeclient/kube_exception.rb
@@ -1,5 +1,5 @@ # Kubernetes HTTP Exceptions
-class KubeException < Exception
+class KubeException < StandardError
attr_reader :error_code, :message
def initialize(error_code, message)
|
Update KubeException to inherit StandardError
Currently, KubeException inherits from Exception, which is bad because
the default "rescue" behaviour is to catch only exception which are
StandardException.
|
diff --git a/Requirements/php-meta-requirement.rb b/Requirements/php-meta-requirement.rb
index abc1234..def5678 100644
--- a/Requirements/php-meta-requirement.rb
+++ b/Requirements/php-meta-requirement.rb
@@ -2,7 +2,10 @@
class PhpMetaRequirement < HomebrewPhpRequirement
def satisfied?
- %w{php53 php54 php55}.any? { |php| Formula.factory(php).installed? }
+ %w{php53 php54 php55}.any? do |php|
+ f = Formula.factory(php)
+ f.rack.directory? && f.rack.children.length > 0
+ end
end
def message
|
Allow non newest version PHP to tools.
Installation of PHP tools was blocked if installed PHP does not match to the newest formulas.
|
diff --git a/lib/user_agent_parser/version.rb b/lib/user_agent_parser/version.rb
index abc1234..def5678 100644
--- a/lib/user_agent_parser/version.rb
+++ b/lib/user_agent_parser/version.rb
@@ -1,6 +1,8 @@ module UserAgentParser
class Version
+
+ SEGMENTS_REGEX = /\d+\-\d+|\d+[a-zA-Z]+$|\d+|[A-Za-z][0-9A-Za-z-]*$/
attr_accessor :version
alias :to_s :version
@@ -10,9 +12,7 @@ end
def segments
- version.scan(/\d+\-\d+|\d+[a-zA-Z]+$|\d+|[A-Za-z][0-9A-Za-z-]*$/).map do |s|
- s
- end
+ version.scan(SEGMENTS_REGEX)
end
def [](segment)
|
Move segments regex to constant.
|
diff --git a/bin/find-nodes.rb b/bin/find-nodes.rb
index abc1234..def5678 100644
--- a/bin/find-nodes.rb
+++ b/bin/find-nodes.rb
@@ -1,5 +1,6 @@ #!/usr/bin/ruby
+require 'puppet'
require 'puppetdb'
require 'optparse'
require 'pp'
|
Fix needed require for puppet 3.x
|
diff --git a/lib/geo/extractor.rb b/lib/geo/extractor.rb
index abc1234..def5678 100644
--- a/lib/geo/extractor.rb
+++ b/lib/geo/extractor.rb
@@ -10,7 +10,7 @@ name: name,
latitude: source.fetch('latitude'),
longitude: source.fetch('longitude'),
- type: result.fetch('_type')
+ type: type
}
end
@@ -25,7 +25,12 @@ end
def name
+ return source.fetch('name').join(', ') if type == 'place'
source.fetch('name').first
+ end
+
+ def type
+ result.fetch('_type')
end
attr_reader :result
|
:boom: Join the name if it's a place
|
diff --git a/lib/redic/cluster.rb b/lib/redic/cluster.rb
index abc1234..def5678 100644
--- a/lib/redic/cluster.rb
+++ b/lib/redic/cluster.rb
@@ -7,15 +7,12 @@
def initialize(url="redis://localhost:12001", timeout=10_000_000)
@url = url
- @node = Redic::Client.new(url, timeout)
+ @node = Redic.new(url, timeout)
@debug = false
end
def call(*args)
- res = @node.connect do
- @node.write(args)
- @node.read
- end
+ res = @node.call(*args)
return res unless res.is_a?(RuntimeError)
@@ -26,9 +23,9 @@
$stderr.puts "-> Redirected to slot [#{slot}] located at #{addr}" if @debug
- @node.connect { @node.write(["QUIT"]) }
+ @node.call("QUIT")
- @node = Redic::Client.new("redis://#{addr}", @node.timeout)
+ @node = Redic.new("redis://#{addr}", @node.timeout)
call(*args)
else
|
Use Redic instead of Redic::Client
|
diff --git a/OOPhotoBrowser.podspec b/OOPhotoBrowser.podspec
index abc1234..def5678 100644
--- a/OOPhotoBrowser.podspec
+++ b/OOPhotoBrowser.podspec
@@ -11,7 +11,7 @@ s.resources = 'Classes/IDMPhotoBrowser.bundle', 'Classes/IDMPBLocalizations.bundle'
s.framework = 'MessageUI', 'QuartzCore', 'SystemConfiguration', 'MobileCoreServices', 'Security'
s.requires_arc = true
- s.dependency 'SDWebImage'
+ s.dependency 'SDWebImage', '4.2.3'
s.dependency 'DACircularProgress'
s.dependency 'pop'
end
|
Fix SDWebImage version to 4
I'm not actively maintaining this anymore, so this is the
easiest solution to the major upgrade.
|
diff --git a/docker/puma_config.rb b/docker/puma_config.rb
index abc1234..def5678 100644
--- a/docker/puma_config.rb
+++ b/docker/puma_config.rb
@@ -6,3 +6,7 @@
threads_count = ENV.fetch('RAILS_MAX_THREADS') { 5 }.to_i
threads threads_count, threads_count
+
+stdout_redirect '/app/log/puma.out.log', '/app/log/puma.err.log', true
+
+quiet
|
Write puma stdout and stderr to log files
|
diff --git a/lib/sinatra/cache.rb b/lib/sinatra/cache.rb
index abc1234..def5678 100644
--- a/lib/sinatra/cache.rb
+++ b/lib/sinatra/cache.rb
@@ -1,5 +1,4 @@
-require 'sinatra/base'
require 'sinatra/outputbuffer'
module Sinatra
|
[FIX] Remove "require 'sinatra/base'" from code.
|
diff --git a/libraries/gluster.rb b/libraries/gluster.rb
index abc1234..def5678 100644
--- a/libraries/gluster.rb
+++ b/libraries/gluster.rb
@@ -19,7 +19,7 @@ end
def brick_in_volume?(peer, brick, volume)
- cmd = shell_out("gluster volume status #{volume} | awk '{print $2}' | grep #{peer}:#{brick}")
+ cmd = shell_out("gluster volume info #{volume} | awk '{print $2}' | grep #{peer}:#{brick}")
# cmd.stdout has a \n at the end of it
if cmd.stdout.chomp == "#{peer}:#{brick}"
return true
|
Fix brick_in_volume for long hostnames
|
diff --git a/libraries/helpers.rb b/libraries/helpers.rb
index abc1234..def5678 100644
--- a/libraries/helpers.rb
+++ b/libraries/helpers.rb
@@ -25,7 +25,6 @@ #
# @return [Numeric, String]
# handles checking whether uid was specified as a string
-
def validate_id(id)
id.to_i.to_s == id ? id.to_i : id
end
|
Convert uid/gid into integers if databag objects are of type string.
This fixes issue 125.
1. if user data bag object has UID specified as a string, will convert to appropriate integer.
If UID == USERNAME, this will already fail for user creation object.
2. if user data bag object has no uid specified will attempt to set the owner to the username.
On Mac OS X this will break. So Mac OS X users must specify a UID in the data bag objects.
|
diff --git a/lib/consul.rb b/lib/consul.rb
index abc1234..def5678 100644
--- a/lib/consul.rb
+++ b/lib/consul.rb
@@ -12,10 +12,16 @@
def getAllCritical
errors = Array.new
+ commonFunction = Common.new()
@conf.params['consul']['servers'].each do |server|
- response = JSON.parse(RestClient.get "#{server}/v1/health/state/critical")
- if response.any?
- errors.push(response)
+ if commonFunction.checkPortIsOpen?(server.last['name'], server.last['port'], 3)
+ nameToCheck = "#{server.last['protocol']}#{server.last['name']}:#{server.last['port']}"
+ response = JSON.parse(RestClient.get "#{nameToCheck}/v1/health/state/critical")
+ if response.any?
+ errors.push(response)
+ end
+ else
+ errors.push([{"Node"=>"#{server.first}", "CheckID"=>"Unreachable Agent"}])
end
end
errors
|
Check if server is available before get information
|
diff --git a/twentyfour_seven_office_legacy.gemspec b/twentyfour_seven_office_legacy.gemspec
index abc1234..def5678 100644
--- a/twentyfour_seven_office_legacy.gemspec
+++ b/twentyfour_seven_office_legacy.gemspec
@@ -21,5 +21,5 @@ spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "rspec", "~> 3.1"
- spec.add_dependency "savon", "~> 2.8"
+ spec.add_dependency "savon", "~> 2.3.0"
end
|
Downgrade Savon version to support Inviso iWEB
|
diff --git a/recipes/mod_jk.rb b/recipes/mod_jk.rb
index abc1234..def5678 100644
--- a/recipes/mod_jk.rb
+++ b/recipes/mod_jk.rb
@@ -0,0 +1,25 @@+unless File.exists?("/usr/libexec/apache2/mod_jk.so")
+
+ remote_file "#{Chef::Config[:file_cache_path]}/tomcat-connectors-1.2.37-src.tar.gz" do
+ source "http://www.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.37-src.tar.gz"
+ owner WS_USER
+ end
+
+ execute "extract tomcat-connectors" do
+ command "tar vxzf #{Chef::Config[:file_cache_path]}/tomcat-connectors-1.2.37-src.tar.gz -C #{Chef::Config[:file_cache_path]}/"
+ user WS_USER
+ end
+
+ bash "install_program" do
+ user "root"
+ cwd "#{Chef::Config[:file_cache_path]}/tomcat-connectors-1.2.37-src/native"
+ code <<-EOH
+ ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain
+ ./configure --with-apxs=/usr/sbin/apxs
+ make
+ make install
+ /usr/sbin/apxs -a -e -n "jk" mod_jk.so
+ EOH
+ end
+
+end
|
Add recipe to install mod-jk
|
diff --git a/worker_host/users/recipes/default.rb b/worker_host/users/recipes/default.rb
index abc1234..def5678 100644
--- a/worker_host/users/recipes/default.rb
+++ b/worker_host/users/recipes/default.rb
@@ -19,6 +19,13 @@
users.each do |user|
primary_group = user[:groups].nil? ? nil : user[:groups].first
+
+ directory File.dirname(user[:home]) do
+ action :create
+ recursive true
+ owner "root"
+ group "root"
+ end
user user[:id] do
shell user[:shell] || "/bin/bash"
|
Make sure the superdirectory for a user's home exists.
|
diff --git a/lib/kaminari/mongoid/mongoid_criteria_methods.rb b/lib/kaminari/mongoid/mongoid_criteria_methods.rb
index abc1234..def5678 100644
--- a/lib/kaminari/mongoid/mongoid_criteria_methods.rb
+++ b/lib/kaminari/mongoid/mongoid_criteria_methods.rb
@@ -7,8 +7,8 @@ super
end
- def entry_name
- model_name.human.downcase
+ def entry_name(options = {})
+ model_name.human(options.reverse_merge(default: model_name.human.pluralize(options[:count])))
end
def limit_value #:nodoc:
|
Use I18n to pluralize entries
see: https://github.com/amatsuda/kaminari/commit/7f6e9a877d646263dc0504a5ad96ef4d5f2dd684
|
diff --git a/countries.gemspec b/countries.gemspec
index abc1234..def5678 100644
--- a/countries.gemspec
+++ b/countries.gemspec
@@ -19,6 +19,7 @@ gem.add_dependency('i18n_data', '~> 0.7.0')
gem.add_dependency('money', '~> 6.7')
gem.add_dependency('unicode_utils', '~> 1.4')
+ gem.add_dependency('sixarm_ruby_unaccent', '~> 1.1')
gem.add_development_dependency('rspec', '>= 3')
gem.add_development_dependency('activesupport', '>= 3')
end
|
Add sixarm_ruby_unaccent to gemspec dependencies
`countries` requires `sixarm_ruby_unaccent` (as included in `lib/countries.rb`), however it's not listed as a dependency causing breakages unless installed manually.
|
diff --git a/spec/factories.rb b/spec/factories.rb
index abc1234..def5678 100644
--- a/spec/factories.rb
+++ b/spec/factories.rb
@@ -1,4 +1,6 @@ require 'factory_girl'
+
+# NOTE: this file does not automatically reload in Rails server. Use load() or restart the server.
Factory.define :user do |u|
u.name 'Test User'
@@ -6,6 +8,13 @@ u.password 'please'
end
+Factory.define :github_user, :class => User do |u|
+ # This user doesnt have a username or email set up in their profile
+ u.email 'vendors@circleci.com'
+ u.password 'habit review loss loss'
+ u.name 'Circle Dummy user'
+end
+
Factory.define :signup do |s|
s.email "test@email.com"
s.contact "true"
|
Add a factory to generate our test github user.
|
diff --git a/Casks/phpstorm-eap.rb b/Casks/phpstorm-eap.rb
index abc1234..def5678 100644
--- a/Casks/phpstorm-eap.rb
+++ b/Casks/phpstorm-eap.rb
@@ -1,6 +1,6 @@ cask :v1 => 'phpstorm-eap' do
- version '141.1306'
- sha256 'ebd04e0378cb2d5c528bb9e7618dbb89ddb1d9e7f9e429cd21594e622194a7e2'
+ version '141.1534'
+ sha256 'e2ac28bb33b68976a6b76407422604437d1a8fde55071373f427d1975466db7c'
url "http://download.jetbrains.com/webide/PhpStorm-EAP-#{version}.dmg"
homepage 'http://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Early+Access+Program'
|
Update PHPStorm EAP to 141.1534
|
diff --git a/songkick-oauth2-provider.gemspec b/songkick-oauth2-provider.gemspec
index abc1234..def5678 100644
--- a/songkick-oauth2-provider.gemspec
+++ b/songkick-oauth2-provider.gemspec
@@ -9,7 +9,7 @@ s.extra_rdoc_files = %w(README.rdoc)
s.rdoc_options = %w(--main README.rdoc)
- s.files = %w(README.rdoc) + Dir.glob("{spec,lib,example}/**/*")
+ s.files = %w(README.rdoc) + Dir.glob("{example,lib,spec}/**/*.{css,erb,rb,rdoc,ru}")
s.require_paths = ["lib"]
s.add_dependency("activerecord")
|
Make list of gem files more specific about file types.
|
diff --git a/camp.rb b/camp.rb
index abc1234..def5678 100644
--- a/camp.rb
+++ b/camp.rb
@@ -1,9 +1,7 @@ class Camp < Formula
homepage "https://github.com/tegesoft/camp"
- url "https://github.com/tegesoft/camp.git", :tag => "0.8.0"
+ url "https://github.com/drbenmorgan/camp.git", :branch => "cmake-support"
version "0.8.0"
-
- patch :DATA
option "with-doc", "Build with doxygen documentation"
option :cxx11
@@ -21,6 +19,7 @@ ENV.cxx11 if build.cxx11?
system "cmake", ".", *std_cmake_args
system "make"
+ system "make doc" if build.with? "doc"
system "make", "install"
end
@@ -29,16 +28,3 @@ end
end
-__END__
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index f11ce20..65f73d8 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -205,7 +205,7 @@ install(TARGETS camp
- ARCHIVE DESTINATION lib COMPONENT devel
- )
-
--install(FILES README.txt COPYING.txt LICENSE.LGPL3.txt
-+install(FILES README.txt COPYING.txt
- DESTINATION ${INSTALL_MISC_DIR}
- )
|
Move CAMP formula to drbenmorgan fork
To provide better CMake support for camp clients, migrate to use
drbenmorgan fork of CAMP with improved CMake support. These fixes
have been submitted upstream, so use of the primary repo can resume
when/if these fixes are accepted.
|
diff --git a/spec/mailers/task_mailer_spec.rb b/spec/mailers/task_mailer_spec.rb
index abc1234..def5678 100644
--- a/spec/mailers/task_mailer_spec.rb
+++ b/spec/mailers/task_mailer_spec.rb
@@ -6,26 +6,40 @@ describe "when task has turns" do
let(:task) { tasks(:weekly) }
+ let(:email) { TaskMailer.notification(task) }
- it "should build the email" do
- email = TaskMailer.notification(task)
+ it 'the email has the valid TO' do
+ expect(email.to).to match_array(task.turns.first.emails)
+ end
- expect(email.to).to match_array(task.turns.first.emails)
+ it 'the email has the valid CC' do
expect(email.cc).to include(task.email)
+ end
+
+ it 'the email has the valid subject' do
expect(email.subject).to include(task.turns.first.groups.first.name)
- expect(email.text_part.body.to_s).to include(task.turns.first.groups.first.name)
+ end
+
+ it 'the email has the valid text_part' do
+ expect(email.text_part.body.to_s)
+ .to include(task.turns.first.groups.first.name)
end
end
describe "when task has no turns" do
let(:task) { tasks(:monthly) }
+ let(:email) { TaskMailer.notification(task) }
- it "should build the email" do
- email = TaskMailer.notification(task)
+ it 'the email has the valid TO' do
+ expect(email.to).to include(task.email)
+ end
- expect(email.to).to include(task.email)
+ it 'the email has the valid subject' do
expect(email.subject).to eq(task.notification_subject)
+ end
+
+ it 'the email has the valid text_part' do
expect(email.text_part.body.to_s).to include(task.notification_body)
end
end
|
Split task_mailer expectations in their own examples
|
diff --git a/app/controllers/omniauth_callbacks_controller.rb b/app/controllers/omniauth_callbacks_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/omniauth_callbacks_controller.rb
+++ b/app/controllers/omniauth_callbacks_controller.rb
@@ -31,7 +31,8 @@ set_flash_message(:notice, :success, :kind => auth['provider']) if is_navigational_format?
else
session["devise.#{auth['provider']}_data"] = request.env["omniauth.auth"]
- redirect_to new_member_registration_url
+ sign_in member
+ redirect_to finish_signup_url(member)
end
else
redirect_to request.env['omniauth.origin'] || edit_member_registration_path
|
Fix redirects and sign the user in if they weren't yet created
|
diff --git a/hero_spec.rb b/hero_spec.rb
index abc1234..def5678 100644
--- a/hero_spec.rb
+++ b/hero_spec.rb
@@ -14,4 +14,16 @@ expect(hero.power_up).to eq 110
end
+ it "can power down" do
+ hero = Hero.new 'mike'
+
+ expect(hero.power_down).to eq 90
+ end
+
+ it "displays full hero info" do
+ hero = Hero.new 'mike'
+
+ expect(hero.hero_info).to eq 'Mike has a health of 100'
+ end
+
end
|
Add power_down and hero_info test
|
diff --git a/log4r.gemspec b/log4r.gemspec
index abc1234..def5678 100644
--- a/log4r.gemspec
+++ b/log4r.gemspec
@@ -14,7 +14,7 @@ gem.summary = %Q{Log4r, logging framework for ruby}
gem.description = %Q{See also: http://logging.apache.org/log4j}
gem.email = "colby@shrewdraven.com"
- gem.homepage = "http://log4r.rubyforge.org"
+ gem.homepage = "https://github.com/colbygk/log4r"
gem.authors = ['Colby Gutierrez-Kraybill', 'tony kerz']
gem.bindir = 'bin'
gem.test_files = Dir.glob("tests/**/*")
|
Change gemspec.homepage to github repo url
|
diff --git a/TastyTomato.podspec b/TastyTomato.podspec
index abc1234..def5678 100644
--- a/TastyTomato.podspec
+++ b/TastyTomato.podspec
@@ -25,4 +25,5 @@ }
s.resources = ['TastyTomato/Images/*.{xcassets, png}']
s.public_header_files = []
+ s.dependency 'SignificantSpices', '~> 0.1.0'
end
|
Add SignificantSpices dependency to podspec
|
diff --git a/glicko2.gemspec b/glicko2.gemspec
index abc1234..def5678 100644
--- a/glicko2.gemspec
+++ b/glicko2.gemspec
@@ -1,4 +1,4 @@-# -*- encoding: utf-8 -*-
+# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'glicko2/version'
@@ -17,5 +17,7 @@ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.require_paths = ["lib"]
- gem.add_development_dependency('minitest')
+ gem.add_development_dependency('bundler', '~> 1.3')
+ gem.add_development_dependency('rake')
+ gem.add_development_dependency('minitest', '~> 4.7.5')
end
|
Update for newer bundler/rake combinations
|
diff --git a/effective_style_guide.gemspec b/effective_style_guide.gemspec
index abc1234..def5678 100644
--- a/effective_style_guide.gemspec
+++ b/effective_style_guide.gemspec
@@ -10,8 +10,8 @@ s.email = ["info@codeandeffect.com"]
s.authors = ["Code and Effect"]
s.homepage = "https://github.com/code-and-effect/effective_style_guide"
- s.summary = "TODO"
- s.description = "TODO"
+ s.summary = "Ensure that your custom CSS theme looks good with the bootstrap3 components"
+ s.description = "Ensure that your custom CSS theme looks good with the bootstrap3 components"
s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.md"]
s.test_files = Dir["spec/**/*"]
|
Add a gem spec summary and description
|
diff --git a/addic7ed.gemspec b/addic7ed.gemspec
index abc1234..def5678 100644
--- a/addic7ed.gemspec
+++ b/addic7ed.gemspec
@@ -17,7 +17,7 @@ s.add_development_dependency("webmock")
s.add_development_dependency("pry")
- s.add_runtime_dependency("nokogiri", "~> 1.6.7.2")
+ s.add_runtime_dependency("nokogiri", "~> 1.6.8")
s.add_runtime_dependency("json", "~> 1.8.3")
s.executables = ["addic7ed"]
|
Update Nokogiri for security reasons
|
diff --git a/lib/cloudflair/api/zone/settings/development_mode.rb b/lib/cloudflair/api/zone/settings/development_mode.rb
index abc1234..def5678 100644
--- a/lib/cloudflair/api/zone/settings/development_mode.rb
+++ b/lib/cloudflair/api/zone/settings/development_mode.rb
@@ -8,12 +8,14 @@
patchable_fields :value
+ def initialize(zone_id)
+ @zone_id = zone_id
+ end
+
+ private
+
def path
"/zones/#{zone_id}/settings/development_mode"
end
-
- def initialize(zone_id)
- @zone_id = zone_id
- end
end
end
|
Make private what must not be public
|
diff --git a/lib/maskable_attribute/acts_as_maskable_attribute.rb b/lib/maskable_attribute/acts_as_maskable_attribute.rb
index abc1234..def5678 100644
--- a/lib/maskable_attribute/acts_as_maskable_attribute.rb
+++ b/lib/maskable_attribute/acts_as_maskable_attribute.rb
@@ -1,8 +1,8 @@ module MaskableAttribute
module ActsAsMaskableAttribute
- extend ActiveSupport::Concern
- included do
+ def self.included(base)
+ base.send :extend, ClassMethods
end
module ClassMethods
|
Extend ActiveRecord the Rails2 Way
With no ActiveSupport::Concern in Rails2 class methods must be included
in ActiveRecord with an actually defined included method.
|
diff --git a/automaton.rb b/automaton.rb
index abc1234..def5678 100644
--- a/automaton.rb
+++ b/automaton.rb
@@ -1,13 +1,18 @@ class Automaton
- def build_initial_configuration
- number_of_columns = `/usr/bin/env tput cols`.to_i
- grid = Array.new(number_of_columns, " ")
- middle = number_of_columns / 2
- grid[middle] = "█"
- puts grid.join
+ PICTURE = [' ', '█']
+
+ def display_grid(grid)
+ puts grid.map { |cell| picture(cell) }.join
+ end
+
+ private
+
+ def picture(cell)
+ PICTURE[cell]
end
end
if __FILE__ == $PROGRAM_NAME
- Automaton.new.build_initial_configuration
+ grid = [ 1, 0, 0, 1, 0, 1, 0, 0, 1 ]
+ Automaton.new.display_grid(grid)
end
|
Rewrite Automaton to display grid
|
diff --git a/test/test.rb b/test/test.rb
index abc1234..def5678 100644
--- a/test/test.rb
+++ b/test/test.rb
@@ -16,7 +16,7 @@ end
def test_post
- post '/', "eadFile" => Rack::Test::UploadedFile.new('test/data/ajp00004.xml', 'text/xml'), 'phase' => "'#ALL'"
+ post '/result.xml', "eadFile" => Rack::Test::UploadedFile.new('test/data/ajp00004.xml', 'text/xml'), 'phase' => "'#ALL'"
assert last_request.env["CONTENT_TYPE"].include?("multipart/form-data"), "didn't set multipart/form-data"
tmpfile = last_request.POST["eadFile"][:tempfile]
assert tmpfile.is_a?(::Tempfile), "no tempfile"
@@ -24,4 +24,18 @@ assert Nokogiri.XML(last_response.body).xpath('//failed-assert'), 'XML is wrong'
end
+ def test_post_csv
+ post '/result.csv', "eadFile" => Rack::Test::UploadedFile.new('test/data/ajp00004.xml', 'text/xml'), 'phase' => "'#ALL'"
+ assert last_request.env["CONTENT_TYPE"].include?("multipart/form-data"), "didn't set multipart/form-data"
+ tmpfile = last_request.POST["eadFile"][:tempfile]
+ assert tmpfile.is_a?(::Tempfile), "no tempfile"
+ assert last_response.ok?, "Response not ok"
+ assert last_response.body.index('filename,total_errors'), 'CSV output is wrong'
+ end
+
+ def test_refuses_doctype
+ post '/result.xml', "eadFile" => Rack::Test::UploadedFile.new('test/data/doctype.xml', 'text/xml'), 'phase' => "'#ALL'"
+ assert last_response.ok?, 'Response not ok'
+ assert last_response.body.index('fatal-error'), 'XML with DOCTYPE declaration must return error'
+ end
end
|
Test updates for various changes
* Changed 'result' route from POST index to POST result(.fmt)
* CSV output test
* DOCTYPE exclusion test. Other XXEs are essentially hidden by this,
so not tested for
|
diff --git a/Casks/paraview-nightly.rb b/Casks/paraview-nightly.rb
index abc1234..def5678 100644
--- a/Casks/paraview-nightly.rb
+++ b/Casks/paraview-nightly.rb
@@ -4,4 +4,10 @@ version 'latest'
no_checksum
link 'paraview.app'
+ caveats <<-EOS.undent
+ This version of Paraview should be installed if your system Python
+ version is 2.7. If you are running OS X Lion (10.7) or Mountain
+ Lion (10.8) and your system Python version is 2.6, please instead
+ install paraview-nightly-lion-python27.
+ EOS
end
|
Add caveats to Paraview Nightly.
|
diff --git a/easy_menu.gemspec b/easy_menu.gemspec
index abc1234..def5678 100644
--- a/easy_menu.gemspec
+++ b/easy_menu.gemspec
@@ -1,7 +1,9 @@ Gem::Specification.new do |s|
s.name = "easy_menu"
- s.summary = "Simple menu bar dsl for rails 3.1 views"
+ s.summary = "Simple menu bar dsl for Rails views"
s.files = Dir["{app,lib,config}/**/*"] + ["MIT-LICENSE", "Gemfile", "README"]
s.version = "0.2.2"
s.authors = ['Nicholas Jakobsen', 'Ryan Wallace']
+
+ s.add_dependency "rails", ">= 3.1"
end
|
Update gemspec with rails dependency.
|
diff --git a/app/models/event.rb b/app/models/event.rb
index abc1234..def5678 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -24,6 +24,13 @@ end
def winelist
- self.wines
+ wines =[]
+ invites = self.event_wines
+ invites.each do |event_wine|
+ if event_wine.is_attending
+ wines << event_wine.wine
+ end
+ end
+ wines
end
end
|
Change winelist method to accurately reflect wines for accepted users
|
diff --git a/app/models/plant.rb b/app/models/plant.rb
index abc1234..def5678 100644
--- a/app/models/plant.rb
+++ b/app/models/plant.rb
@@ -14,4 +14,8 @@ def to_s
"#{common_name} (#{scientific_name})"
end
+
+ def form_common_name
+ common_name.titleize
+ end
end
|
Add method for titleizing common names in selects
|
diff --git a/engines/synergy/app/controllers/synergy/pages_controller.rb b/engines/synergy/app/controllers/synergy/pages_controller.rb
index abc1234..def5678 100644
--- a/engines/synergy/app/controllers/synergy/pages_controller.rb
+++ b/engines/synergy/app/controllers/synergy/pages_controller.rb
@@ -5,22 +5,9 @@ attr_accessor :node
helper_method :node
- def index
- @node = Synergy::Node.find_by!(slug: '')
- # @tree = Synergy::Node.tree_view(:slug)
- render action: :index
- end
-
def show
- node = parent = Synergy::Node.find_by!(slug: '')
-
- if params[:path]
- path = params[:path].split('/')
- path.each do |p|
- parent = node = parent.children.find_by!(slug: p)
- end
- end
- @node = node
+ path = params[:path].blank? ? '' : "/#{params[:path]}"
+ @node = Synergy::Node.find_by!(path: path)
render action: :show
end
|
Clean up controller to use path
|
diff --git a/fixbraces.gemspec b/fixbraces.gemspec
index abc1234..def5678 100644
--- a/fixbraces.gemspec
+++ b/fixbraces.gemspec
@@ -14,7 +14,7 @@ of the opening brace. This corrects it for a file or a directory.
DESC
gem.summary = "Puts the opening brace on the same line"
- gem.homepage = "https://github.com/abizern/fixbraces"
+ gem.homepage = "http://abizern.org/fixbraces/"
gem.files = `git ls-files`.split($/)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
Update the homepage for the gem
|
diff --git a/lib/llt/diff.rb b/lib/llt/diff.rb
index abc1234..def5678 100644
--- a/lib/llt/diff.rb
+++ b/lib/llt/diff.rb
@@ -6,7 +6,6 @@
def initialize(gold, reviewables)
@gold, @reviewables = parse_threaded(gold, reviewables)
- @diff = {}
end
def compare
|
Delete obsolete inst var in Diff
|
diff --git a/ruby_event_store_rom_sql/db/migrate/20180327044629_create_ruby_event_store_tables.rb b/ruby_event_store_rom_sql/db/migrate/20180327044629_create_ruby_event_store_tables.rb
index abc1234..def5678 100644
--- a/ruby_event_store_rom_sql/db/migrate/20180327044629_create_ruby_event_store_tables.rb
+++ b/ruby_event_store_rom_sql/db/migrate/20180327044629_create_ruby_event_store_tables.rb
@@ -5,7 +5,7 @@ postgres = database_type =~ /postgres/
sqlite = database_type =~ /sqlite/
- run 'CREATE EXTENSION pgcrypto;' if postgres
+ run 'CREATE EXTENSION IF NOT EXISTS pgcrypto;' if postgres
create_table :event_store_events_in_streams do
primary_key :id, type: :Bignum
@@ -19,7 +19,7 @@ column :event_id, String, null: false, index: true
end
- column :created_at, :datetime, null: false, index: true
+ column :created_at, DateTime, null: false, index: true
index %i[stream position], unique: true
index %i[stream event_id], unique: true
@@ -35,7 +35,7 @@ column :event_type, String, null: false
column :metadata, String, text: true
column :data, String, text: true, null: false
- column :created_at, :datetime, null: false, index: true
+ column :created_at, DateTime, null: false, index: true
if sqlite # TODO: Is this relevant without ActiveRecord?
index :id, unique: true
|
Fix ROM migrations for PostgreSQL
|
diff --git a/tasks/common.rake b/tasks/common.rake
index abc1234..def5678 100644
--- a/tasks/common.rake
+++ b/tasks/common.rake
@@ -2,3 +2,6 @@
# common pattern cleanup
CLEAN.include('tmp')
+
+# set default task
+task :default => [:spec, :features]
|
Make 'rake' default to spec and features.
|
diff --git a/telemetry.gemspec b/telemetry.gemspec
index abc1234..def5678 100644
--- a/telemetry.gemspec
+++ b/telemetry.gemspec
@@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = 'telemetry'
- s.version = '0.0.1.4'
+ s.version = '0.0.1.5'
s.summary = 'In-process telemetry based on observers'
s.description = ' '
|
Increase version from 0.0.1.4 to 0.0.1.5
|
diff --git a/lib/seche.rb b/lib/seche.rb
index abc1234..def5678 100644
--- a/lib/seche.rb
+++ b/lib/seche.rb
@@ -1,8 +1,13 @@ require "seche/version"
module Seche
- module Rails
- class Engine < ::Rails::Engine
+ if defined?(Rails) && defined?(Rails::Engine)
+ module Rails
+ class Engine < ::Rails::Engine
+ end
end
+ else
+ Sass.load_paths << File.expand_path("../../app/assets/stylesheets", __FILE__)
end
end
+
|
Verify if Rails is defined
|
diff --git a/Casks/numi.rb b/Casks/numi.rb
index abc1234..def5678 100644
--- a/Casks/numi.rb
+++ b/Casks/numi.rb
@@ -2,9 +2,8 @@ version :latest
sha256 :no_check
- url 'http://numi.io/static/files/Numi.zip'
- appcast 'http://numi.io/update.xml',
- :sha256 => 'fc6e87987f66f478065ac353a270fa122fb329e85f5b7fd6cb256caefd22b7ed'
+ # devmate.com is the official download host per the vendor homepage
+ url 'http://dl.devmate.com/com.dmitrynikolaev.numi/beta/Numi.zip'
name 'Numi'
homepage 'http://numi.io/'
license :gratis
|
Update url and remove deprecated appcast.
Add new Numi official download host comment.
|
diff --git a/Casks/qtox.rb b/Casks/qtox.rb
index abc1234..def5678 100644
--- a/Casks/qtox.rb
+++ b/Casks/qtox.rb
@@ -1,8 +1,8 @@ cask 'qtox' do
version '1.4.1.1'
sha256 'e0dd8ecab2dc39bba1e6f34e44927e7bee9ca0f55f4c433f16079d4ba5cf4ab8'
-
- # https://github.com/tux3/qTox/ was verified as official when first introduced to the cask
+
+ # github.com/tux3/qTox was verified as official when first introduced to the cask
url "https://github.com/tux3/qTox/releases/download/v#{version}/qTox.dmg"
appcast 'https://github.com/tux3/qtox/releases.atom',
checkpoint: '3ddde03e902cc0266f14fc93268cb8ed29f774354677a3af78f7537cb17393d8'
|
Fix `url` stanza comment for qTox.
|
diff --git a/unlock_gateway.gemspec b/unlock_gateway.gemspec
index abc1234..def5678 100644
--- a/unlock_gateway.gemspec
+++ b/unlock_gateway.gemspec
@@ -16,5 +16,5 @@
s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"]
- s.add_dependency "rails", "~> 4.1.6"
+ s.add_dependency "rails", "~> 4", ">= 4.1.6"
end
|
Change dependency version syntax for Rails gem.
This will enable update to newer Rails 4 versions.
Still requires version 4.1.6 as minimum version.
|
diff --git a/lib/govuk_template/engine.rb b/lib/govuk_template/engine.rb
index abc1234..def5678 100644
--- a/lib/govuk_template/engine.rb
+++ b/lib/govuk_template/engine.rb
@@ -2,11 +2,19 @@ class Engine < ::Rails::Engine
initializer "govuk_template.assets.precompile" do |app|
app.config.assets.precompile += %w(
+ favicon.ico
govuk-template*.css
fonts*.css
govuk-template.js
ie.js
vendor/goog/webfont-debug.js
+ apple-touch-icon-120x120.png
+ apple-touch-icon-152x152.png
+ apple-touch-icon-60x60.png
+ apple-touch-icon-76x76.png
+ gov.uk_logotype_crown_invert.png
+ gov.uk_logotype_crown_invert_trans.png
+ opengraph-image.png
)
end
end
|
Add static files to `assets.precompile`
This avoids errors when gem is used with sprockets-rails >= 3
|
diff --git a/app/models/asset_file.rb b/app/models/asset_file.rb
index abc1234..def5678 100644
--- a/app/models/asset_file.rb
+++ b/app/models/asset_file.rb
@@ -15,6 +15,10 @@ expires = opts[:expires] || 1.week.from_now
datastore.storage.get_object_http_url(datastore.bucket_name, file_uid, expires, opts)
end
+
+ def safe_file_name
+ ActiveSupport::Inflector.transliterate(file_name)
+ end
def to_s
name.present? ? name : file_name
|
Add a safe file name method
|
diff --git a/app/models/restaurant.rb b/app/models/restaurant.rb
index abc1234..def5678 100644
--- a/app/models/restaurant.rb
+++ b/app/models/restaurant.rb
@@ -1,5 +1,5 @@ class Restaurant
- COUNTRIES = %w(US CA MX)
+ COUNTRIES = %w(AE AN AW CA CH CN GP HK KY MO MX MY PT SG SV US VI)
include Mongoid::Document
include Mongoid::Timestamps
|
Expand list of available countries
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.