diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
---|---|
diff --git a/recipes/source_code_pro_font.rb b/recipes/source_code_pro_font.rb
index abc1234..def5678 100644
--- a/recipes/source_code_pro_font.rb
+++ b/recipes/source_code_pro_font.rb
@@ -0,0 +1,24 @@+unless File.exists?("/Library/Fonts/SourceCodePro-Black.otf")
+ remote_file "#{Chef::Config[:file_cache_path]}/source_code_pro.zip" do
+ source "http://sourceforge.net/projects/sourcecodepro.adobe/files/SourceCodePro_FontsOnly-1.017.zip/download"
+ owner WS_USER
+ checksum "8136b4686309c428ef073356ab178c2f7e8f7b6fadd5a6c61b6a20646377b21f"
+ end
+
+ execute "unzip source code pro" do
+ command "unzip -f #{Chef::Config[:file_cache_path]}/source_code_pro.zip '*.otf' -d #{Chef::Config[:file_cache_path]}/"
+ user WS_USER
+ end
+
+ execute "copy source code pro fonts to /Library/Fonts" do
+ command "mv #{Chef::Config[:file_cache_path]}/SourceCodePro_FontsOnly-1.017/OTF/*.otf #{Regexp.escape("/Library/Fonts/")}"
+ user WS_USER
+ group "admin"
+ end
+
+ ruby_block "test to see if source code pro fonts were installed" do
+ block do
+ raise "Source Code Pro font was not installed" unless File.exists?("/Library/Fonts/SourceCodePro-Black.otf")
+ end
+ end
+end
|
Add Source Code Pro font from Adobe
Open source font that is great for, well, source code. Installs several
OTF font files to /Library/Fonts
Code Review: Minor Change, Not Needed
|
diff --git a/roles/bytemark.rb b/roles/bytemark.rb
index abc1234..def5678 100644
--- a/roles/bytemark.rb
+++ b/roles/bytemark.rb
@@ -32,6 +32,9 @@ )
override_attributes(
+ :networking => {
+ :search => ["bm.openstreetmap.org", "openstreetmap.org"]
+ },
:ntp => {
:servers => ["0.uk.pool.ntp.org", "1.uk.pool.ntp.org", "europe.pool.ntp.org"]
}
|
Update DNS search domains for Bytemark machines
|
diff --git a/testrus.gemspec b/testrus.gemspec
index abc1234..def5678 100644
--- a/testrus.gemspec
+++ b/testrus.gemspec
@@ -12,9 +12,12 @@ gem.summary = %q{Testing for informatics competitions.}
gem.homepage = ""
+ gem.add_dependency("colored", "1.2")
+
gem.add_development_dependency("test-unit", "2.5.2")
gem.add_development_dependency("fakefs", "0.4.1")
gem.add_development_dependency("pry", "0.9.10")
+ gem.add_development_dependency("rr", "1.0.4")
gem.files = `git ls-files`.split($/)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
Add colored and rr as dependencies
|
diff --git a/lib/atlas/dataset/derived_dataset.rb b/lib/atlas/dataset/derived_dataset.rb
index abc1234..def5678 100644
--- a/lib/atlas/dataset/derived_dataset.rb
+++ b/lib/atlas/dataset/derived_dataset.rb
@@ -20,18 +20,10 @@
# Overwrite
def dataset_dir
- @dataset_dir ||= Atlas.data_dir.join(DIRECTORY, full_dataset.key.to_s)
- end
-
- def scaling_factor
- number_of_residences / full_dataset.number_of_residences
+ @dataset_dir ||= Atlas.data_dir.join(DIRECTORY, base_dataset)
end
private
-
- def full_dataset
- Dataset::FullDataset.find(base_dataset)
- end
def base_dataset_exists
unless Dataset::FullDataset.exists?(base_dataset)
|
Remove scaling factor from derived dataset
|
diff --git a/lib/cortex/snippets/client/helper.rb b/lib/cortex/snippets/client/helper.rb
index abc1234..def5678 100644
--- a/lib/cortex/snippets/client/helper.rb
+++ b/lib/cortex/snippets/client/helper.rb
@@ -26,7 +26,7 @@ end
def seo_robots
- webpage[:seo_robots]
+ build_robot_information
end
def noindex
@@ -58,6 +58,21 @@ def webpage
Cortex::Snippets::Client::current_webpage(request)
end
+
+ def build_robot_information
+ robot_information = []
+ index_options = [:noindex, :nofollow, :noodp, :nosnippet, :noarchive, :noimageindex]
+
+ index_options.each do |index_option|
+ robot_information << index_option if valid_index_option?(index_option)
+ end
+
+ robot_information.join(", ")
+ end
+
+ def valid_index_option?(index_option)
+ webpage[index_option]
+ end
end
end
end
|
Build methods to sanitize and compile robot indexing information
|
diff --git a/lib/graphql/relay/connection_type.rb b/lib/graphql/relay/connection_type.rb
index abc1234..def5678 100644
--- a/lib/graphql/relay/connection_type.rb
+++ b/lib/graphql/relay/connection_type.rb
@@ -2,8 +2,14 @@ module GraphQL
module Relay
module ConnectionType
+ class << self
+ attr_accessor :default_nodes_field
+ end
+
+ self.default_nodes_field = false
+
# Create a connection which exposes edges of this type
- def self.create_type(wrapped_type, edge_type: nil, edge_class: nil, nodes_field: false, &block)
+ def self.create_type(wrapped_type, edge_type: nil, edge_class: nil, nodes_field: ConnectionType.default_nodes_field, &block)
edge_type ||= wrapped_type.edge_type
edge_class ||= GraphQL::Relay::Edge
connection_type_name = "#{wrapped_type.name}Connection"
|
Add default_nodes_field global configuration option
|
diff --git a/lib/resque_aps/server/test_helper.rb b/lib/resque_aps/server/test_helper.rb
index abc1234..def5678 100644
--- a/lib/resque_aps/server/test_helper.rb
+++ b/lib/resque_aps/server/test_helper.rb
@@ -0,0 +1,20 @@+require 'rack/test'
+require 'resque/server'
+
+module ResqueAps
+ module TestHelper
+ class Test::Unit::TestCase
+ include Rack::Test::Methods
+ def app
+ Resque::Server.new
+ end
+
+ def self.should_respond_with_success
+ test "should respond with success" do
+ assert last_response.ok?, last_response.errors
+ end
+ end
+ end
+ end
+end
+
|
Add the test helper from the newer version of resque.
|
diff --git a/app/models/change_observer.rb b/app/models/change_observer.rb
index abc1234..def5678 100644
--- a/app/models/change_observer.rb
+++ b/app/models/change_observer.rb
@@ -4,12 +4,14 @@ :taxon_instrument, :taxon_relationship, :trade_restriction
def after_save(model)
- model.taxon_concept.
- update_column(:dependents_updated_at, Time.now)
+ if model.taxon_concept
+ model.taxon_concept.
+ update_column(:dependents_updated_at, Time.now)
+ end
end
def before_destroy(model)
- if model.can_be_deleted?
+ if model.taxon_concept && model.can_be_deleted?
model.taxon_concept.
update_column(:dependents_updated_at, Time.now)
end
|
Check if there's a taxon_concept before trying to update it...
|
diff --git a/Casks/cocktail.rb b/Casks/cocktail.rb
index abc1234..def5678 100644
--- a/Casks/cocktail.rb
+++ b/Casks/cocktail.rb
@@ -2,17 +2,25 @@ version :latest
sha256 :no_check
- url 'http://usa.maintain.se/CocktailYE.dmg'
- appcast 'http://www.maintain.se/downloads/sparkle/yosemite/yosemite.xml'
- homepage 'http://maintain.se/cocktail'
+ if MacOS.version == :snow_leopard
+ url 'http://usa.maintain.se/CocktailSLE.dmg'
+ appcast 'http://www.maintain.se/downloads/sparkle/snowleopard/snowleopard.xml'
+ elsif MacOS.version == :lion
+ url 'http://usa.maintain.se/CocktailLionEdition.dmg'
+ appcast 'http://www.maintain.se/downloads/sparkle/lion/lion.xml'
+ elsif MacOS.version == :mountain_lion
+ url 'http://usa.maintain.se/CocktailMLE.dmg'
+ appcast 'http://www.maintain.se/downloads/sparkle/mountainlion/mountainlion.xml'
+ elsif MacOS.version == :mavericks
+ url 'http://usa.maintain.se/CocktailME.dmg'
+ appcast 'http://www.maintain.se/downloads/sparkle/mavericks/mavericks.xml'
+ else
+ url 'http://usa.maintain.se/CocktailYE.dmg'
+ appcast 'http://www.maintain.se/downloads/sparkle/yosemite/yosemite.xml'
+ end
+
+ homepage 'http://www.maintain.se/cocktail'
license :unknown
app 'Cocktail.app'
-
- # todo replace this with a conditional
- caveats <<-EOS.undent
- This version of Cocktail is for OS X Yosemite only. If you are using other versions of
- OS X, please run 'brew tap caskroom/versions' and install cocktail-mountainlion /
- cocktail-lion / cocktail-snowleopard / cocktail-mavericks
- EOS
end
|
Edit Cocktail cask in order to use conditionals
|
diff --git a/lib/generators/solidus/auth/install/install_generator.rb b/lib/generators/solidus/auth/install/install_generator.rb
index abc1234..def5678 100644
--- a/lib/generators/solidus/auth/install/install_generator.rb
+++ b/lib/generators/solidus/auth/install/install_generator.rb
@@ -18,7 +18,7 @@ end
def add_migrations
- run 'bundle exec rake railties:install:migrations FROM=solidus_auth_devise'
+ run 'bundle exec rake railties:install:migrations FROM=solidus_auth'
end
def run_migrations
|
Use proper name for add_migrations
Running the installer on a fresh master (v2.11) Solidus
the migrations are not copied in the Rails application.
We need to use the proper engine name in the FROM parameter.
This commit fixes that.
|
diff --git a/Casks/macpass.rb b/Casks/macpass.rb
index abc1234..def5678 100644
--- a/Casks/macpass.rb
+++ b/Casks/macpass.rb
@@ -3,5 +3,5 @@ homepage 'http://mstarke.github.io/MacPass/'
version '0.4.1-alpha'
sha256 '1beaec4f0f8e33e5bf2575a4706befe6ef513f46ddc49f7662b6af3721680039'
- link 'MacPass/MacPass.app'
+ link 'MacPass.app'
end
|
Fix MacPass cask: update .app path for v0.4.1-alpha
|
diff --git a/RMScannerView.podspec b/RMScannerView.podspec
index abc1234..def5678 100644
--- a/RMScannerView.podspec
+++ b/RMScannerView.podspec
@@ -0,0 +1,19 @@+Pod::Spec.new do |s|
+ s.name = 'RMScannerView'
+ s.version = '1.3'
+ s.platform = :ios, '7.0'
+ s.license = 'MIT'
+ s.summary = 'Simple barcode scanner UIView subclass for iOS apps.'
+ s.homepage = 'https://github.com/iRareMedia/RMScannerView'
+ s.author = { 'Sam Spencer' => '[email protected]' }
+ s.source = { :git => 'https://github.com/iRareMedia/RMScannerView.git', :tag => s.version.to_s }
+
+ s.description = 'Simple barcode scanner UIView subclass for iOS apps. ' \
+ 'Quickly and efficiently scans a large variety of barcodes ' \
+ 'using the iOS device\'s built in camera. '
+
+ s.frameworks = ['AVFoundation', 'CoreGraphics']
+ s.source_files = 'RMScannerView/*.{h,m}'
+ s.preserve_paths = 'Scanner App'
+ s.requires_arc = true
+end
|
Add a cocoapods spec file
|
diff --git a/SwiftyDropbox.podspec b/SwiftyDropbox.podspec
index abc1234..def5678 100644
--- a/SwiftyDropbox.podspec
+++ b/SwiftyDropbox.podspec
@@ -8,5 +8,5 @@ s.source_files = "Source/*.{h,m,swift}"
s.requires_arc = true
s.ios.deployment_target = "8.0"
- s.dependency "Alamofire", "~> 2.0.0-beta.3"
+ s.dependency "Alamofire", "~> 2.0.2"
end
|
Update Alamofire version to latest compatible stable.
|
diff --git a/test/dummy/app/models/preset.rb b/test/dummy/app/models/preset.rb
index abc1234..def5678 100644
--- a/test/dummy/app/models/preset.rb
+++ b/test/dummy/app/models/preset.rb
@@ -1,7 +1,4 @@ class Preset < ActiveRecord::Base
attr_accessible :image
- attached_image :image, :presets => {
- :small => { :width => 314, :height => 206 },
- :big => { :width => 500, :height => 360 }
- }
+ attached_image :image, :presets => { :big => { :method => :fit, :width => 1024, :height => 768 }, :small => { :method => :center, :width => 120, :height => 120 } }
end
|
Fix travis thumbs size test
|
diff --git a/lib/github/html/markdown_filter.rb b/lib/github/html/markdown_filter.rb
index abc1234..def5678 100644
--- a/lib/github/html/markdown_filter.rb
+++ b/lib/github/html/markdown_filter.rb
@@ -7,7 +7,6 @@ #
# Context options:
# :gfm => false Disable GFM line-end processing
- # :autolink => false Disable autolinking URLs
#
# This filter does not write any additional information to the context hash.
class MarkdownFilter < Filter
@@ -20,16 +19,8 @@ # Convert Markdown to HTML using the best available implementation
# and convert into a DocumentFragment.
def call
- flags = [
- :fenced_code, :tables,
- :strikethrough, :lax_htmlblock,
- :gh_blockcode, :no_intraemphasis,
- :space_header
- ]
- flags << :hard_wrap if context[:gfm] != false
- html = GitHub::Markdown.new(@text, *flags).to_html
- html.rstrip!
- html
+ mode = (context[:gfm] != false) ? :gfm : :markdown
+ GitHub::Markdown.to_html(@text, mode).rstrip!
end
end
end
|
Switch to using the Github::Markdown gem
|
diff --git a/lib/paml.rb b/lib/paml.rb
index abc1234..def5678 100644
--- a/lib/paml.rb
+++ b/lib/paml.rb
@@ -1,25 +1,32 @@ require "paml/version"
+require "paml/line"
require "paml/stream"
require "paml/node"
require "paml/tag"
module Paml
- HAML_PATTERN = /
- # In HAML, the whitespace between the beginning of a line and an
+ PATTERN = /
+ # In Paml, the whitespace between the beginning of a line and an
# element definition determines the element's depth in the tree
# generated from the haml source.
- ^(?<whitespace>\s*)
- # A tag can be specified
+ ^(?<whitespace>\t*)
+ # A tag can be named by prepending the name with a percent sign (%).
(?:%(?<tag>\w+))?
- #
+ # Paml provides a shortcut for specifying an element's ID.
(?:\#(?<id>\w+))?
- # The class of the element
+ # Paml also provides a shortcut for specifying an element's class.
(?:\.(?<class>\w+))?
- # The element attributes
+ # Arbitrary attributes can be given in a ruby-like fashion; simply separate
+ # keys and values with a colon (:), seperate key-value pairs with a comma
+ # (,), and wrap the whole thing in curly braces ({}).
(?:\{(?<attributes>.*?)\})?
- # The type of content
+ # Content can be added to the end of a line, but if a tag name, id, or
+ # class has been given you must specify the KIND of content at the end of
+ # the line. If you give a dash (-) or equal-sign (=) then Paml will treat
+ # your content as PHP code; the only difference is that anything after an
+ # equal-sign will be echoed.
(?<content_type>-|=)?
- # The content
+ # The content.
(?<content>.*?)$
/x
end
|
Add some documentation to the PATTERN
The PATTERN is a regex that is supposed to parse HAML.
|
diff --git a/Venmo-iOS-SDK.podspec b/Venmo-iOS-SDK.podspec
index abc1234..def5678 100644
--- a/Venmo-iOS-SDK.podspec
+++ b/Venmo-iOS-SDK.podspec
@@ -12,7 +12,7 @@ s.platform = :ios, '6.0'
s.source = { :git => "https://github.com/venmo/venmo-ios-sdk.git", :tag => "v#{s.version}" }
s.source_files = 'venmo-sdk/**/*.{h,m}'
- s.dependency 'VENCore', '~>1.0.0'
+ s.dependency 'VENCore', '~>3.0.0'
s.dependency 'SSKeychain', '~>1.2.2'
s.requires_arc = true
s.social_media_url = 'https://twitter.com/venmo'
|
Update VENCore to ~> 3.0.0 in podspec
|
diff --git a/UIAlertController+Show.podspec b/UIAlertController+Show.podspec
index abc1234..def5678 100644
--- a/UIAlertController+Show.podspec
+++ b/UIAlertController+Show.podspec
@@ -1,22 +1,22 @@ Pod::Spec.new do |s|
- s.name = "UIAlertController+Show"
- s.version = "0.2.0"
- s.summary = "Show UIAlertControllers from anywhere."
+ s.name = 'UIAlertController+Show'
+ s.version = '0.2.0'
+ s.summary = 'Show UIAlertControllers from anywhere.'
s.description = <<-DESC
Light-weight extension to UIAlertController that adds 'show' method for presenting Alerts / Action Sheets from anywhere
DESC
- s.homepage = "https://github.com/hightower/UIAlertController-Show"
- s.license = { :type => "MIT", :file => "LICENSE" }
+ s.homepage = 'https://github.com/hightower/UIAlertController-Show'
+ s.license = { :type => 'MIT', :file => 'LICENSE' }
- s.author = { "Erik Ackermann" => "[email protected]", "Dustin Burge" => "[email protected]" }
- s.social_media_url = "http://twitter.com/erikwithfriends"
+ s.author = { 'Erik Ackermann' => '[email protected]', 'Dustin Burge' => '[email protected]' }
+ s.social_media_url = 'http://twitter.com/erikwithfriends'
s.platform = :ios
s.ios.deployment_target = '8.0'
- s.source = { :git => "https://github.com/hightower/UIAlertController-Show.git", :tag => s.version }
+ s.source = { :git => 'https://github.com/hightower/UIAlertController-Show.git', :tag => s.version }
s.source_files = 'UIAlertController+Show/UIAlertController+Show.swift'
s.frameworks = 'Foundation', 'UIKit'
s.requires_arc = true
|
Use single quotes everywhere in podspec.
|
diff --git a/spec/models/track_thing_spec.rb b/spec/models/track_thing_spec.rb
index abc1234..def5678 100644
--- a/spec/models/track_thing_spec.rb
+++ b/spec/models/track_thing_spec.rb
@@ -3,10 +3,30 @@ describe TrackThing, "when tracking changes" do
fixtures :track_things, :users
+ before do
+ @track_thing = track_things(:track_fancy_dog_search)
+ end
+
+ it "requires a type" do
+ @track_thing.track_type = nil
+ @track_thing.should have(2).errors_on(:track_type)
+ end
+
+ it "requires a valid type" do
+ @track_thing.track_type = 'gibberish'
+ @track_thing.should have(1).errors_on(:track_type)
+ end
+
+ it "requires a valid medium" do
+ @track_thing.track_medium = 'pigeon'
+ @track_thing.should have(1).errors_on(:track_medium)
+ end
+
it "will find existing tracks which are the same" do
track_thing = TrackThing.create_track_for_search_query('fancy dog')
found_track = TrackThing.find_by_existing_track(users(:silly_name_user), track_thing)
- found_track.should == track_things(:track_fancy_dog_search)
+ found_track.should == @track_thing
end
end
+
|
Add some new TrackThing tests
|
diff --git a/spec/requests/one_click_spec.rb b/spec/requests/one_click_spec.rb
index abc1234..def5678 100644
--- a/spec/requests/one_click_spec.rb
+++ b/spec/requests/one_click_spec.rb
@@ -14,9 +14,9 @@ end
it "should display a timeline with past events" do
- @organisation.members.make_n(10)
- @organisation.proposals.make_n(10)
- @organisation.proposals.make_n(10).each{|p| p.create_decision}
+ @organisation.members.make
+ @organisation.proposals.make
+ @organisation.proposals.make.create_decision
get url_for(:controller => 'one_click', :action => 'dashboard')
@response.should be_successful
|
Speed up slow example in one_click request spec.
|
diff --git a/Casks/sleipnir.rb b/Casks/sleipnir.rb
index abc1234..def5678 100644
--- a/Casks/sleipnir.rb
+++ b/Casks/sleipnir.rb
@@ -0,0 +1,10 @@+cask :v1 => 'sleipnir' do
+ version :latest
+ sha256 :no_check
+
+ url 'http://www.fenrir-inc.com/services/download.php?file=Sleipnir.dmg'
+ homepage 'http://www.fenrir-inc.com/sleipnir/'
+ license :closed
+
+ app 'Sleipnir.app'
+end
|
Add new cask for Sleipnir Browser.
|
diff --git a/app/helpers/spree/admin/taxons_helper.rb b/app/helpers/spree/admin/taxons_helper.rb
index abc1234..def5678 100644
--- a/app/helpers/spree/admin/taxons_helper.rb
+++ b/app/helpers/spree/admin/taxons_helper.rb
@@ -2,7 +2,7 @@ module Admin
module TaxonsHelper
def taxon_path(taxon)
- taxon.ancestors.reverse.collect { |ancestor| ancestor.name }.join( " >> ")
+ taxon.ancestors.reverse.collect(&:name).join( " >> ")
end
end
end
|
Fix simple rubocop issues in helper
|
diff --git a/lib/pluggable_js/helpers.rb b/lib/pluggable_js/helpers.rb
index abc1234..def5678 100644
--- a/lib/pluggable_js/helpers.rb
+++ b/lib/pluggable_js/helpers.rb
@@ -13,7 +13,7 @@
javascript_tag "jQuery(function() {
if (typeof(#{object}) == 'object' && typeof(#{object}['#{action}']) == 'function') {
- return #{object}.#{action}();
+ return #{object}['#{action}'];
}
});"
end
|
Fix for IE for new object
|
diff --git a/ci_environment/phpbuild/attributes/default.rb b/ci_environment/phpbuild/attributes/default.rb
index abc1234..def5678 100644
--- a/ci_environment/phpbuild/attributes/default.rb
+++ b/ci_environment/phpbuild/attributes/default.rb
@@ -1,7 +1,7 @@ default[:phpbuild] = {
:git => {
- :repository => "git://github.com/CHH/php-build.git",
- :revision => "e20c6ffe2c6c356ed34007a5caa0244425bbf0ad"
+ :repository => "git://github.com/loicfrering/php-build.git",
+ :revision => "f1cb2948629c1bbd812920f932f15395ab5d18e2"
},
:phpunit_plugin => {
:git => {
|
Use a php-build fork to download PHP distributions on the US mirror.
Generic links are down right now.
|
diff --git a/spec/rubocop/formatter/worst_offenders_formatter_spec.rb b/spec/rubocop/formatter/worst_offenders_formatter_spec.rb
index abc1234..def5678 100644
--- a/spec/rubocop/formatter/worst_offenders_formatter_spec.rb
+++ b/spec/rubocop/formatter/worst_offenders_formatter_spec.rb
@@ -13,7 +13,7 @@
describe '#finished' do
context 'when there are many offenses' do
- let(:offense) { double('offense') }
+ let(:offense) { instance_double(RuboCop::Cop::Offense) }
before do
formatter.started(files)
|
Use verifying doubles in WorstOffendersFormatter spec
|
diff --git a/lib/tasks/jasmine-rails_tasks.rake b/lib/tasks/jasmine-rails_tasks.rake
index abc1234..def5678 100644
--- a/lib/tasks/jasmine-rails_tasks.rake
+++ b/lib/tasks/jasmine-rails_tasks.rake
@@ -17,7 +17,7 @@ ActionView::AssetPaths.send :include, JasmineRails::OfflineAssetPaths
end
spec_filter = ENV['SPEC']
- app = ActionController::Integration::Session.new(Rails.application)
+ app = ActionDispatch::Integration::Session.new(Rails.application)
path = JasmineRails.route_path
app.get path, :console => 'true', :spec => spec_filter
JasmineRails::OfflineAssetPaths.disabled = true
|
Fix DEPRECATION WARNING for rails 4.0.0. ActionController::Integration to ActionDispatch::Integration.
|
diff --git a/lib/ib/project.rb b/lib/ib/project.rb
index abc1234..def5678 100644
--- a/lib/ib/project.rb
+++ b/lib/ib/project.rb
@@ -12,7 +12,7 @@ files = [Xcodeproj::Project::PBXNativeTarget::SourceFileDescription.new(stubs_path, nil, nil)]
- Dir.glob("#{resources_path}/**/*.{png,jpg,jpeg,storyboard,xib}") do |file|
+ Dir.glob("#{resources_path}/**/*.{xcdatamodeld,png,jpg,jpeg,storyboard,xib}") do |file|
files << Xcodeproj::Project::PBXNativeTarget::SourceFileDescription.new(Pathname.new(file), nil, nil)
end
|
Add support for Data Model
|
diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake
index abc1234..def5678 100644
--- a/lib/tasks/db.rake
+++ b/lib/tasks/db.rake
@@ -0,0 +1,15 @@+namespace :db do
+ desc 'Import database from db/import/production.dump'
+ task import: :environment do
+ database = Rails.configuration.database_configuration[Rails.env]['database']
+ sh(
+ 'pg_restore',
+ '--verbose',
+ '--clean',
+ '--no-acl',
+ '--no-owner',
+ "-d#{database}",
+ 'db/import/production.dump'
+ )
+ end
+end
|
Add Rake task for importing database from prod
|
diff --git a/CocoaUPnP.podspec b/CocoaUPnP.podspec
index abc1234..def5678 100644
--- a/CocoaUPnP.podspec
+++ b/CocoaUPnP.podspec
@@ -18,7 +18,7 @@ s.license = "MIT"
s.author = { "Paul Williamson" => "[email protected]" }
s.platform = :ios, "7.0"
- s.source = { :git => "https://github.com/arcam/CocoaUPnP.git", :tag => "0.0.1" }
+ s.source = { :git => "https://github.com/arcam/CocoaUPnP.git", :tag => s.version.to_s }
s.source_files = "CocoaUPnP", "CocoaUPnP/**/*.{h,m}"
s.requires_arc = true
s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
|
Use pod tag for source version
|
diff --git a/lib/tasks/daily_import.rake b/lib/tasks/daily_import.rake
index abc1234..def5678 100644
--- a/lib/tasks/daily_import.rake
+++ b/lib/tasks/daily_import.rake
@@ -7,8 +7,11 @@ )
nct_ids_to_be_updated_or_added = ClinicalTrials::RssReader.new(days_back: args[:days_back]).get_changed_nct_ids
+ changed_studies_count = (Study.pluck(:nct_id) & nct_ids_to_be_updated_or_added).count
+ new_studies_count = nct_ids_to_be_updated_or_added.count - changed_studies_count
+ binding.pry
$stderr.puts "Number of studies changed or added: #{nct_ids_to_be_updated_or_added.count}"
- load_event.update(description: "Number of studies changed or added: #{nct_ids_to_be_updated_or_added.count}")
+ load_event.update(new_studies: new_studies_count, changed_studies: changed_studies_count)
StudyUpdater.new.update_studies(nct_ids: nct_ids_to_be_updated_or_added)
|
Fix new/changed studies values for daily import.
|
diff --git a/lib/watirspec/server/app.rb b/lib/watirspec/server/app.rb
index abc1234..def5678 100644
--- a/lib/watirspec/server/app.rb
+++ b/lib/watirspec/server/app.rb
@@ -5,36 +5,12 @@ case path
when '/'
respond(self.class.name)
- when '/big'
- html = '<html><head><title>Big Content</title></head><body>'
- html << 'hello' * 205
- html << '</body></html>'
- respond(html)
when '/post_to_me'
respond("You posted the following content:\n#{data}")
when '/plain_text'
respond('This is text/plain', 'Content-Type' => 'text/plain')
- when '/ajax'
- sleep 10
- respond('A slooow ajax response')
- when '/charset_mismatch'
- html = <<-HTML
- <html>
- <head>
- <meta http-equiv="Content-type" content="text/html; charset=iso-8859-1" />
- </head>
- <body>
- <h1>ø</h1>
- </body>
- </html>
- HTML
- respond(html, 'Content-Type' => 'text/html; charset=UTF-8')
- when '/octet_stream'
- respond('This is application/octet-stream', 'Content-Type' => 'application/octet-stream')
when %r{/set_cookie}
respond("<html>C is for cookie, it's good enough for me</html>", 'Content-Type' => 'text/html', 'Set-Cookie' => 'monster=1')
- when %r{/encodable_}
- respond('page with characters in URI that need encoding')
when static_file?
respond(File.read("#{WatirSpec.html}/#{path}"))
else
|
Clean up unused routes in WatirSpec
|
diff --git a/libraries/scripts_helper.rb b/libraries/scripts_helper.rb
index abc1234..def5678 100644
--- a/libraries/scripts_helper.rb
+++ b/libraries/scripts_helper.rb
@@ -1,13 +1,13 @@ module Nexus3
# Load Groovy scripts via the Nexus3 API.
class Scripts
- def self.groovy_script_location(script_name, node)
- cookbook = node.run_context.cookbook_collection['nexus3']
+ def self.groovy_script_location(script_name, node, cookbook_name)
+ cookbook = node.run_context.cookbook_collection[cookbook_name]
cookbook.preferred_filename_on_disk_location(node, :files, "#{script_name}.groovy")
end
- def self.groovy_content(script_name, node)
- ::File.read groovy_script_location(script_name, node)
+ def self.groovy_content(script_name, node, cookbook_name = 'nexus3')
+ ::File.read groovy_script_location(script_name, node, cookbook_name)
end
end
end
|
Allow other cookbooks to load their groovy scripts existing helpers
If we want to use ::Nexus3.groovy_content helper to upload a custom
groovy scripts, we should be able to specify in which cookbook the
script file resides, else we would need to merge all users scripts
in this cookbook.
|
diff --git a/spec/call_spec.rb b/spec/call_spec.rb
index abc1234..def5678 100644
--- a/spec/call_spec.rb
+++ b/spec/call_spec.rb
@@ -38,7 +38,7 @@ end
on.failure do |*args|
- @calls << OpenStruct.new(:type => :success, :args => args)
+ @calls << OpenStruct.new(:type => :failure, :args => args)
end
end
@@ -46,5 +46,11 @@ trigger.failure 22
assert_equal 2, @calls.size
+
+ assert_equal :success, @calls[0].type
+ assert_equal ['12', :b], @calls[0].args
+
+ assert_equal :failure, @calls[1].type
+ assert_equal [22], @calls[1].args
end
end
|
Add specs for called responses.
|
diff --git a/spec/factories.rb b/spec/factories.rb
index abc1234..def5678 100644
--- a/spec/factories.rb
+++ b/spec/factories.rb
@@ -10,13 +10,14 @@ end
factory :language do
-
+ lingua "Spanish"
end
factory :query do
sequence(:english) {|n| "Hello #{n}"}
title "Need help"
description "Please help"
+ user_id [1,2,3,4].sample
end
factory :comment do
|
Add factory for language and modify factory for query
|
diff --git a/CoreStore.podspec b/CoreStore.podspec
index abc1234..def5678 100644
--- a/CoreStore.podspec
+++ b/CoreStore.podspec
@@ -16,8 +16,9 @@ s.public_header_files = "Sources/**/*.h"
s.frameworks = "Foundation", "CoreData"
s.requires_arc = true
- s.pod_target_xcconfig = { 'OTHER_SWIFT_FLAGS' => '-D USE_FRAMEWORKS',
+ s.pod_target_xcconfig = { 'OTHER_SWIFT_FLAGS[config=Debug]' => '-D USE_FRAMEWORKS -D DEBUG',
+ 'OTHER_SWIFT_FLAGS[config=Release]' => '-D USE_FRAMEWORKS',
'GCC_PREPROCESSOR_DEFINITIONS' => 'USE_FRAMEWORKS=1' }
-
+
s.dependency "GCDKit", "1.2.6"
-end+end
|
Add DEBUG flag to the Debug config
|
diff --git a/sprout-osx-apps/recipes/onyx.rb b/sprout-osx-apps/recipes/onyx.rb
index abc1234..def5678 100644
--- a/sprout-osx-apps/recipes/onyx.rb
+++ b/sprout-osx-apps/recipes/onyx.rb
@@ -1,7 +1,7 @@ dmg_package "Onyx" do
volumes_dir "Onyx 2.7.2"
source "http://joel.barriere.pagesperso-orange.fr/dl/108/OnyX.dmg"
- checksum '94377590c4e08516c5b056d413571dbc747425b472483b25f2fc91c58e97eebd'
+ checksum '0a94c54851db7d148c4d5db6f035e666dfee8f0d55632739c8eeef98e05bdab8'
action :install
owner node['current_user']
end
|
Update checksum for OnyX 2.7.2
|
diff --git a/spec/main_spec.rb b/spec/main_spec.rb
index abc1234..def5678 100644
--- a/spec/main_spec.rb
+++ b/spec/main_spec.rb
@@ -7,8 +7,6 @@ it 'test' do
visit 'index.html'
file_path = File.expand_path('./screenshot.jpg')
- script = %(document.body.style.backgroundColor = "white")
- page.execute_script(script)
save_screenshot(file_path, full: true)
expect(page).to have_content 'click'
expect(page).to have_css('form > input')
|
Remove specification of white background
|
diff --git a/tasks/spec.rake b/tasks/spec.rake
index abc1234..def5678 100644
--- a/tasks/spec.rake
+++ b/tasks/spec.rake
@@ -19,7 +19,4 @@ rcov.threshold = 100
end
-task :spec => :check_dependencies
-task :rcov => :check_dependencies
-
task :default => :spec
|
Remove tasks no longer defined by Jeweler
|
diff --git a/cookbooks/get-repositories/recipes/default.rb b/cookbooks/get-repositories/recipes/default.rb
index abc1234..def5678 100644
--- a/cookbooks/get-repositories/recipes/default.rb
+++ b/cookbooks/get-repositories/recipes/default.rb
@@ -35,7 +35,7 @@ ]
execute "go to the repositories directory" do
- command "pushd #{destination}"
+ command "pushd #{repositories}"
end
repos.each do |repo|
|
Change to su from sudo
|
diff --git a/config/initializers/search_controller.rb b/config/initializers/search_controller.rb
index abc1234..def5678 100644
--- a/config/initializers/search_controller.rb
+++ b/config/initializers/search_controller.rb
@@ -16,13 +16,10 @@ def extend_with_institutional_search_module
# Get the module from umlaut_config
search_module = search_method_module
- # If we have defined a searcher for the institution
- # use that instead.
- if current_primary_institution and
- current_primary_institution.controllers and
- current_primary_institution.controllers["searcher"]
+ # If we have defined a searcher for the institution use that instead.
+ if current_institution_searcher.present?
search_module = SearchMethods
- current_primary_institution.controllers["searcher"].split("::").each do |const|
+ current_institution_searcher.split("::").each do |const|
search_module = search_module.const_get(const.to_sym)
end
end
@@ -30,5 +27,12 @@ # to this object.
self.extend search_module
end
+
+ def current_institution_searcher
+ if current_institution && current_institution.controllers
+ @current_institution_searcher ||= current_institution.controllers["searcher"]
+ end
+ end
+ private :current_institution_searcher
end
end
|
Use current_institution instead of the old current_primary_institution for determining the current Institution
|
diff --git a/RxApollo.podspec b/RxApollo.podspec
index abc1234..def5678 100644
--- a/RxApollo.podspec
+++ b/RxApollo.podspec
@@ -2,21 +2,21 @@ s.name = 'RxApollo'
s.version = '0.4.0'
s.summary = 'RxSwift extensions for Apollo.'
-
+
s.description = <<-DESC
This is an Rx extension that provides an easy and straight-forward way
to use Apollo requests (fetch, watch, mutate) as an Observable
DESC
-
+
s.homepage = 'https://github.com/scottrhoyt/RxApollo'
s.license = 'MIT'
s.author = { 'Scott Hoyt' => '[email protected]' }
s.source = { :git => 'https://github.com/scottrhoyt/RxApollo.git', :tag => s.version.to_s }
-
+
s.ios.deployment_target = '9.0'
s.source_files = 'RxApollo/*.swift'
-
+
s.dependency 'Apollo', '~> 0.6.0'
- s.dependency 'RxSwift', '~> 4.0'
-
-end+ s.dependency 'RxSwift', '~> 3.4'
+
+end
|
Fix RxSwift dependency in Podspec.
|
diff --git a/MHHabitat.podspec b/MHHabitat.podspec
index abc1234..def5678 100644
--- a/MHHabitat.podspec
+++ b/MHHabitat.podspec
@@ -5,7 +5,7 @@ s.homepage = 'https://github.com/mhupman/MHHabitat'
s.authors = 'Matt Hupman'
s.summary = 'Environment inspector for iOS applications.'
- s.source = { :git => 'https://github.com/mhupman/MHHabitat', :tag => '0.0.1' }
+ s.source = { :git => 'https://github.com/mhupman/MHHabitat.git', :tag => '0.0.1' }
s.source_files = 'MHHabitat/*.{h,m}'
s.requires_arc = true
end
|
Update to fix ```pod spec lint``` warning.
|
diff --git a/Titanium.podspec b/Titanium.podspec
index abc1234..def5678 100644
--- a/Titanium.podspec
+++ b/Titanium.podspec
@@ -18,7 +18,7 @@
s.source = { :git => "[email protected]:quri/Titanium.git", :tag => "0.1" }
- s.source_files = 'Titanium/Titanium/*.{h,m}'
+ s.source_files = 'Titanium/Titanium/*.{h,m}'
s.requires_arc = true
|
Fix indentation in podspec file.
|
diff --git a/spec/dockmaster/output/output_spec.rb b/spec/dockmaster/output/output_spec.rb
index abc1234..def5678 100644
--- a/spec/dockmaster/output/output_spec.rb
+++ b/spec/dockmaster/output/output_spec.rb
@@ -13,7 +13,7 @@ entries.delete('.')
entries.delete('..')
- expect(entries).to eq(["#{Dockmaster::CONFIG[:output]}/index.html"])
+ expect(entries).to include("#{Dockmaster::CONFIG[:output]}/index.html")
end
end
@@ -37,9 +37,10 @@ entries.delete('..')
output = Dockmaster::CONFIG[:output]
- ary = ["#{output}/index.html", "#{output}/Test/TestClass.html", "#{output}/Test.html"]
- expect(entries).to eq(ary)
+ expect(entries).to include("#{output}/index.html")
+ expect(entries).to include("#{output}/Test/TestClass.html")
+ expect(entries).to include("#{output}/Test.html")
end
end
end
|
Remove exact array checking in specs
|
diff --git a/spec/lib/jasmine/runners/http_spec.rb b/spec/lib/jasmine/runners/http_spec.rb
index abc1234..def5678 100644
--- a/spec/lib/jasmine/runners/http_spec.rb
+++ b/spec/lib/jasmine/runners/http_spec.rb
@@ -7,11 +7,10 @@ subject { Jasmine::Runners::HTTP.new(driver, reporter) }
describe '#run' do
-
it "gets the results from the Jasmine HTML page" do
driver.should_receive(:connect)
driver.should_receive(:disconnect)
- reporter.should_receive(:results).and_call_original
+ reporter.should_receive(:results).and_return(driver.results)
reporter.stub(:started?).and_return(true)
reporter.stub(:finished?).and_return(true)
|
Replace and_call_original with stubs in http runner spec
|
diff --git a/vmdb/db/migrate/20150323172109_add_availability_zone_id_to_host.rb b/vmdb/db/migrate/20150323172109_add_availability_zone_id_to_host.rb
index abc1234..def5678 100644
--- a/vmdb/db/migrate/20150323172109_add_availability_zone_id_to_host.rb
+++ b/vmdb/db/migrate/20150323172109_add_availability_zone_id_to_host.rb
@@ -0,0 +1,6 @@+class AddAvailabilityZoneIdToHost < ActiveRecord::Migration
+ def change
+ add_column :hosts, :availability_zone_id, :bigint
+ add_index :hosts, :availability_zone_id
+ end
+end
|
Add availability_zone_id to host table
Adding availability_zone_id to host table
|
diff --git a/recipes/client.rb b/recipes/client.rb
index abc1234..def5678 100644
--- a/recipes/client.rb
+++ b/recipes/client.rb
@@ -30,5 +30,5 @@ owner 'hobbit'
group 'hobbit'
mode "0644"
- notifies :restart, resources(:service => "hobbit-client")
+ notifies :restart, "service[hobbit-client]"
end
|
Use the new notification syntax
|
diff --git a/spec/models/dublin_core_spec.rb b/spec/models/dublin_core_spec.rb
index abc1234..def5678 100644
--- a/spec/models/dublin_core_spec.rb
+++ b/spec/models/dublin_core_spec.rb
@@ -11,10 +11,9 @@ end
it "should have a titles" do
- puts @dublin_core.titles.inspect
expect(@dublin_core.titles).to be_true
- expect(@dublin_core.titles).to be_an_instance_of(Array)
- expect(@dublin_core.titles.size).to eq(1)
+ expect(@dublin_core.titles).to be_an_instance_of(Hash)
+ expect(@dublin_core.titles.size).to eq(5)
end
end
end
|
Fix DublinCore titles spec expectations
|
diff --git a/spec/models/kpi/semanal_spec.rb b/spec/models/kpi/semanal_spec.rb
index abc1234..def5678 100644
--- a/spec/models/kpi/semanal_spec.rb
+++ b/spec/models/kpi/semanal_spec.rb
@@ -5,7 +5,7 @@ describe Kpi::Semanal do
describe ".dame_ultimas_n_semanas" do
let(:n_semanas) { Random.rand(2..10) }
- let(:semana_actual) { Random.rand(n_semanas..53) }
+ let(:semana_actual) { Random.rand(n_semanas..52) }
let(:semana_pasada) { semana_actual - 1 }
let(:lunes) { Date.commercial(Time.now.year, semana_actual, 1).to_datetime }
let(:martes) { lunes + 1.day }
|
Fix test failing when on week 53
|
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index abc1234..def5678 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -11,8 +11,10 @@ def row_status_color(status)
if status == "Done"
"done"
+ elsif status == "Processing"
+ "processing #{cycle('list_line_odd', 'list_line_even')}"
else
- "processing #{cycle('list_line_odd', 'list_line_even')}"
+ cycle('list_line_odd', 'list_line_even')
end
end
|
Fix formatting of open issues/features
|
diff --git a/metadata.rb b/metadata.rb
index abc1234..def5678 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -7,5 +7,6 @@ version '0.3.1'
depends 'java'
depends 'yum-epel'
+depends 'openssl-devel'
depends 'cassandra'
supports 'centos'
|
Add openssl-devel dep. Needed for libcrypto which is necessary for thrift installation now.
|
diff --git a/metadata.rb b/metadata.rb
index abc1234..def5678 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -1,10 +1,10 @@ name 'national_parks'
-maintainer 'The Authors'
-maintainer_email '[email protected]'
+maintainer 'Bill Meyer'
+maintainer_email '[email protected]'
license 'all_rights'
description 'Installs/Configures national_parks'
long_description 'Installs/Configures national_parks'
-version '0.1.3'
+version '0.1.4'
# The `issues_url` points to the location where issues for this cookbook are
# tracked. A `View Issues` link will be displayed on this cookbook's page when
|
Set the default run_list back to the default recipe instead of uninstall
|
diff --git a/metadata.rb b/metadata.rb
index abc1234..def5678 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -11,7 +11,7 @@ depends 'apt'
depends 'ubuntu_base', '0.10.0'
depends 'octobase', '0.6.0'
-depends 'docker', '0.6.0'
+depends 'docker', '0.7.0'
depends 'redis'
depends 'nodejs'
depends 'openresty'
|
Update to newer Docker cookbook to remove workaround.
|
diff --git a/app/models/fetch_data_worker.rb b/app/models/fetch_data_worker.rb
index abc1234..def5678 100644
--- a/app/models/fetch_data_worker.rb
+++ b/app/models/fetch_data_worker.rb
@@ -5,15 +5,15 @@ #
class FetchDataWorker
def initialize(github_username)
- @repos = UserRepos.new(github_username, api_token: api_token)
+ @user_repos = UserRepos.new(github_username, api_token: api_token)
end
def perform
portfolio = Portfolio.new(
- user: @repos.user,
- header: Header.for(@repos.user),
- user_repos: @repos.user_repos.sort_by(&:star_count).reverse,
- other_repos: @repos.other_repos,
+ user: @user_repos.user,
+ header: Header.for(@user_repos.user),
+ user_repos: @user_repos.user_repos.sort_by(&:star_count).reverse,
+ other_repos: @user_repos.other_repos,
)
PortfolioStore.new.save(portfolio)
portfolio
|
Rename variable to suggest its class
|
diff --git a/features/step_definitions/renalware/peritonitis_episodes_steps.rb b/features/step_definitions/renalware/peritonitis_episodes_steps.rb
index abc1234..def5678 100644
--- a/features/step_definitions/renalware/peritonitis_episodes_steps.rb
+++ b/features/step_definitions/renalware/peritonitis_episodes_steps.rb
@@ -1,3 +1,11 @@+Given(/^Patty is being treated for a peritonitis episode$/) do
+ record_peritonitis_episode_for(
+ patient: @patty,
+ user: @clyde,
+ diagnosed_on: "10-10-2016"
+ )
+end
+
When(/^Clyde records a peritonitis episode for Patty$/) do
record_peritonitis_episode_for(
patient: @patty,
|
Add setup step for revising an episode
|
diff --git a/features/step_definitions/flavorfile_steps.rb b/features/step_definitions/flavorfile_steps.rb
index abc1234..def5678 100644
--- a/features/step_definitions/flavorfile_steps.rb
+++ b/features/step_definitions/flavorfile_steps.rb
@@ -1,5 +1,10 @@-Given 'flavorfile' do |content|
- create_file expand('$tmp').to_flavorfile_path, expand(content)
+Given 'a flavorfile with:' do |content|
+ steps %Q{
+ Given a file named "#{'.'.to_flavorfile_path}" with:
+ """
+ #{expand(content)}
+ """
+ }
end
When 'I edit flavorfile as' do |content|
|
Rewrite a step to create a flavorfile
|
diff --git a/features/step_definitions/scaffolder-tools.rb b/features/step_definitions/scaffolder-tools.rb
index abc1234..def5678 100644
--- a/features/step_definitions/scaffolder-tools.rb
+++ b/features/step_definitions/scaffolder-tools.rb
@@ -1,4 +1,4 @@ When /^I call "([^"]*)" with arguments "([^"]*)"$/ do |command,args|
bin = File.join(File.dirname(__FILE__),'..','..','bin',command)
- When "I run \"#{bin} #{args}\""
+ When "I run `#{bin} #{args}`"
end
|
Use backticks version of aruba run command step
|
diff --git a/examples/3-grammar-induction/2-kernel.rb b/examples/3-grammar-induction/2-kernel.rb
index abc1234..def5678 100644
--- a/examples/3-grammar-induction/2-kernel.rb
+++ b/examples/3-grammar-induction/2-kernel.rb
@@ -22,4 +22,4 @@ # to the kernel. The kernel elements capture the transitions of the canonical
# automaton A(lang). Indeed, they are obtained by adding one symbol to the short
# pre-fixes which capture its states.
-kernel = kernel(target)
+kernel = kernel(lang)
|
Fix a bug in example
|
diff --git a/google-cloud-tasks/google-cloud-tasks.gemspec b/google-cloud-tasks/google-cloud-tasks.gemspec
index abc1234..def5678 100644
--- a/google-cloud-tasks/google-cloud-tasks.gemspec
+++ b/google-cloud-tasks/google-cloud-tasks.gemspec
@@ -24,6 +24,8 @@ gem.add_dependency "grpc-google-iam-v1", "~> 0.6.9"
gem.add_development_dependency "minitest", "~> 5.10"
+ gem.add_development_dependency "redcarpet", "~> 3.0"
gem.add_development_dependency "rubocop", "~> 0.50.0"
gem.add_development_dependency "simplecov", "~> 0.9"
+ gem.add_development_dependency "yard", "~> 0.9"
end
|
Add missing yard and redcarpet dependencies
|
diff --git a/lib/gitlab/import_export/attribute_cleaner.rb b/lib/gitlab/import_export/attribute_cleaner.rb
index abc1234..def5678 100644
--- a/lib/gitlab/import_export/attribute_cleaner.rb
+++ b/lib/gitlab/import_export/attribute_cleaner.rb
@@ -4,7 +4,7 @@ module ImportExport
class AttributeCleaner
ALLOWED_REFERENCES = RelationFactory::PROJECT_REFERENCES + RelationFactory::USER_REFERENCES + ['group_id']
- PROHIBITED_SUFFIXES = %w[_id _html].freeze
+ PROHIBITED_REFERENCES = Regexp.union(/\Acached_markdown_version\Z/, /_id\Z/, /_html\Z/).freeze
def self.clean(*args)
new(*args).clean
@@ -25,9 +25,7 @@ private
def prohibited_key?(key)
- return false if permitted_key?(key)
-
- 'cached_markdown_version' == key || PROHIBITED_SUFFIXES.any? {|suffix| key.end_with?(suffix)}
+ key =~ PROHIBITED_REFERENCES && !permitted_key?(key)
end
def permitted_key?(key)
|
Change `prohibited_key` to use regexes
|
diff --git a/lib/hpcloud/commands/account/compute_setup.rb b/lib/hpcloud/commands/account/compute_setup.rb
index abc1234..def5678 100644
--- a/lib/hpcloud/commands/account/compute_setup.rb
+++ b/lib/hpcloud/commands/account/compute_setup.rb
@@ -0,0 +1,45 @@+module HP
+ module Cloud
+ class CLI < Thor
+
+ desc 'account:setup:compute', "setup or modify your compute services credentials"
+ long_desc <<-DESC
+ Setup or modify your account credentials for the HP Cloud Compute service. This is generally used to
+ modify only the HP Cloud Compute account settings.
+
+ You will need your Account ID and Account Key from the HP Cloud web site to
+ set up your account. Optionally you can specify your own endpoint to access,
+ but in most cases you will want to use the default.
+
+ You can re-run this command to modify your settings.
+ DESC
+ method_option 'no-validate', :type => :boolean, :default => false,
+ :desc => "Don't verify account settings during setup"
+ define_method "account:setup:compute" do
+ credentials = {:compute => {}}
+ display "****** Setup your HP Cloud Compute account ******"
+ credentials[:compute][:account_id] = ask 'Account ID:'
+ credentials[:compute][:secret_key] = ask 'Account Key:'
+ credentials[:compute][:auth_uri] = ask_with_default 'Compute API Auth Uri:',
+ Config.settings[:default_compute_auth_uri]
+ unless options['no-validate']
+ begin
+ display "Verifying your HP Cloud Compute account..."
+ #connection_with(:compute, credentials).list_servers
+ connection_with(:compute, credentials[:compute]).describe_instances
+ rescue NoMethodError
+ error "Please verify and try again."
+ rescue Excon::Errors::Forbidden, Excon::Errors::Unauthorized => e
+ display_error_message(e)
+ # remove once this is handled more globally
+ rescue Excon::Errors::SocketError => e
+ display_error_message(e)
+ end
+ end
+ Config.update_credentials :default, credentials
+ display "Account credentials for HP Cloud Compute have been set up."
+ end
+
+ end
+ end
+end
|
Add subcommand to setup compute credentials.
|
diff --git a/MatrixKit.podspec b/MatrixKit.podspec
index abc1234..def5678 100644
--- a/MatrixKit.podspec
+++ b/MatrixKit.podspec
@@ -19,7 +19,7 @@
s.source = { :git => "https://github.com/matrix-org/matrix-ios-kit.git", :tag => "v0.1.0" }
s.source_files = "MatrixKit", "MatrixKit/**/*.{h,m}"
- s.resource_bundles = {"MatrixKitXib" => "MatrixKit/**/*.{xib}", "MatrixKitAssets" => "MatrixKit/Assets/MatrixKitAssets.bundle"}
+ s.resources = "MatrixKit/**/*.{xib}", "MatrixKit/Assets/MatrixKitAssets.bundle"
s.requires_arc = true
|
Fix iOS Console crash because of new bundle definition.
|
diff --git a/lib/dm-types/file_path.rb b/lib/dm-types/file_path.rb
index abc1234..def5678 100644
--- a/lib/dm-types/file_path.rb
+++ b/lib/dm-types/file_path.rb
@@ -15,16 +15,11 @@ end
def load(value)
- if DataMapper::Ext.blank?(value)
- nil
- else
- Pathname.new(value)
- end
+ Pathname.new(value) unless DataMapper::Ext.blank?(value)
end
def dump(value)
- return nil if DataMapper::Ext.blank?(value)
- value.to_s
+ value.to_s unless DataMapper::Ext.blank?(value)
end
def typecast_to_primitive(value)
|
Remove unnecessary returns and nils.
|
diff --git a/lib/engineyard/version.rb b/lib/engineyard/version.rb
index abc1234..def5678 100644
--- a/lib/engineyard/version.rb
+++ b/lib/engineyard/version.rb
@@ -1,4 +1,4 @@ module EY
- VERSION = '2.0.4'
+ VERSION = '2.0.5.pre'
ENGINEYARD_SERVERSIDE_VERSION = ENV['ENGINEYARD_SERVERSIDE_VERSION'] || '2.0.1'
end
|
Add .pre for next release
|
diff --git a/fudge.gemspec b/fudge.gemspec
index abc1234..def5678 100644
--- a/fudge.gemspec
+++ b/fudge.gemspec
@@ -29,4 +29,5 @@ s.add_development_dependency 'rb-inotify'
s.add_development_dependency 'libnotify'
s.add_development_dependency 'pry'
+ s.add_development_dependency 'rake'
end
|
Add Rake to development dependencies (again for Travis CI)
|
diff --git a/lib/mail/configuration.rb b/lib/mail/configuration.rb
index abc1234..def5678 100644
--- a/lib/mail/configuration.rb
+++ b/lib/mail/configuration.rb
@@ -13,9 +13,12 @@ # which can be overwritten on a per mail object basis.
class Configuration
include Singleton
-
- @delivery_method = nil
- @retriever_method = nil
+
+ def initialize
+ @delivery_method = nil
+ @retriever_method = nil
+ super
+ end
def delivery_method(method = nil, settings = {})
return @delivery_method if @delivery_method && method.nil?
|
Initialize instance vars at init
|
diff --git a/lib/mws-rb/api/sellers.rb b/lib/mws-rb/api/sellers.rb
index abc1234..def5678 100644
--- a/lib/mws-rb/api/sellers.rb
+++ b/lib/mws-rb/api/sellers.rb
@@ -1,7 +1,10 @@ module MWS
module API
class Sellers < Base
- Actions = [:list_marketplace_participations, :list_marketplace_participations_by_next_token, :get_service_status]
+ Actions = [:list_marketplace_participations,
+ :list_marketplace_participations_by_next_token,
+ :get_auth_token,
+ :get_service_status]
def initialize(connection)
@uri = "/Sellers/2011-07-01"
|
Add GetAuthToken action to Sellers API
|
diff --git a/lib/rspec-puppet/cache.rb b/lib/rspec-puppet/cache.rb
index abc1234..def5678 100644
--- a/lib/rspec-puppet/cache.rb
+++ b/lib/rspec-puppet/cache.rb
@@ -11,12 +11,17 @@ end
def get(*args, &blk)
- # decouple the hash key from whatever the blk might do to it
key = Marshal.load(Marshal.dump(args))
- if [email protected]_key? key
- @cache[key] = (blk || @default_proc).call(*args)
- @lra << key
+ if @cache.has_key?(key)
+ # Cache hit
+ # move that entry last to make it "most recenty used"
+ @lra.insert(-1, @lra.delete_at(@lra.index(args)))
+ else
+ # Cache miss
+ # Ensure room by evicting least recently used if no space left
expire!
+ @cache[args] = (blk || @default_proc).call(*args)
+ @lra << args
end
@cache[key]
@@ -25,8 +30,8 @@ private
def expire!
- expired = @lra.slice!(0, @lra.size - MAX_ENTRIES)
- expired.each { |key| @cache.delete(key) } if expired
+ # delete one entry (the oldest) when there is no room in cache
+ @cache.delete(@lra.shift) if @cache.size == MAX_ENTRIES
end
end
end
|
Make caching evict least recently used
Before this, when the cache was full, it evicted max-cache-size number of entries from the list of entries.
It would also do eviction after addition.
With a cache size of 3, and using the sequence A, B, C, D, The old version would evict A, B, C. If again B or C was requested, then they would need to be recreated. The old would then have state D. The new will evict only A when it gets D. When it looks up B, it will also move B last, so that the state the is CDB. Next addition E, will the evict C, and state is DBE. If B is again requested, it is moved last and state s DEB.- i.e. the cache caches Most Recently Used.
I am making this change to improve the caching behavior, but also to see if it has effect on the tests that fail on catalog id being different.
|
diff --git a/lib/sinatra/toadhopper.rb b/lib/sinatra/toadhopper.rb
index abc1234..def5678 100644
--- a/lib/sinatra/toadhopper.rb
+++ b/lib/sinatra/toadhopper.rb
@@ -5,6 +5,11 @@ # The Toadhopper helper methods
module Toadhopper
VERSION = "1.0.2"
+
+ def self.registered(app)
+ app.helpers Toadhopper
+ end
+
# Reports the current sinatra error to Hoptoad
def post_error_to_hoptoad!
unless options.toadhopper && options.toadhopper[:api_key]
@@ -31,5 +36,5 @@ )
end
end
- helpers Toadhopper
+ register Toadhopper
end
|
Fix so it works with Sinatra::Base and classic Sinatra
|
diff --git a/lib/rspec-puppet/example/class_example_group.rb b/lib/rspec-puppet/example/class_example_group.rb
index abc1234..def5678 100644
--- a/lib/rspec-puppet/example/class_example_group.rb
+++ b/lib/rspec-puppet/example/class_example_group.rb
@@ -11,13 +11,11 @@ Puppet[:code] = "include #{self.class.metadata[:example_group][:full_description].downcase}"
nodename = self.respond_to?(:node) ? node : Puppet[:certname]
- facts_val = {}
- facts_val.merge(facts) if self.respond_to? :facts
+ facts_val = self.respond_to?(:facts) ? facts : {}
- node = Puppet::Node.new(nodename)
- facts = Puppet::Node::Facts.new(nodename, facts_val)
+ node_obj = Puppet::Node.new(nodename)
- node.merge(facts.values)
+ node_obj.merge(facts_val)
Puppet::Resource::Catalog.find(node.name, :use_node => node)
end
|
Clean up class example group too
|
diff --git a/lib/amanuensis/tracker/github.rb b/lib/amanuensis/tracker/github.rb
index abc1234..def5678 100644
--- a/lib/amanuensis/tracker/github.rb
+++ b/lib/amanuensis/tracker/github.rb
@@ -3,7 +3,7 @@ class Github
def issues(name, oauth_token, from)
- filter client(oauth_token).list_issues(name, state: 'closed'), from
+ filter(client(oauth_token).list_issues(name, state: 'closed'), from).select { |issue| !issue['html_url'].include?('pull') }
end
def pulls(name, oauth_token, from)
@@ -13,7 +13,7 @@ private
def filter(list, from)
- list.select { |object| object.closed_at < from.to_time }
+ list.select { |object| object.closed_at > from.to_time }
end
def client(oauth_token)
|
Fix mix between issues and pull
|
diff --git a/lib/aquatone/collectors/crtsh.rb b/lib/aquatone/collectors/crtsh.rb
index abc1234..def5678 100644
--- a/lib/aquatone/collectors/crtsh.rb
+++ b/lib/aquatone/collectors/crtsh.rb
@@ -11,7 +11,7 @@ response = get_request("https://crt.sh/?dNSName=%25.#{url_escape(domain.name)}")
response.body.to_enum(:scan, /<TD>([a-zA-Z0-9_.-]+\.#{domain.name})<\/TD>/).map do |column|
- add_host(column[0])
+ add_host(column[0].gsub("*.", ""))
end
end
end
|
Fix a case where the domain includes *.
|
diff --git a/lib/atlas/merit_order_details.rb b/lib/atlas/merit_order_details.rb
index abc1234..def5678 100644
--- a/lib/atlas/merit_order_details.rb
+++ b/lib/atlas/merit_order_details.rb
@@ -7,7 +7,7 @@ attribute :type, Symbol
attribute :group, Symbol
attribute :level, Symbol, default: :hv
- attribute :target, Symbol
+ attribute :delegate, Symbol
attribute :demand_source, Symbol
attribute :demand_profile, Symbol
end
|
Change MeritOrderDetails "target" to "delegate"
Link points in the other direction, from the target to the delegate,
rather than from the delegate to the target.
Will remove the unusual situation where the EV node is used in the merit
order to control flexibility, rather than the actual use of electricity
for vehicles.
|
diff --git a/lib/exercism/curriculum/scala.rb b/lib/exercism/curriculum/scala.rb
index abc1234..def5678 100644
--- a/lib/exercism/curriculum/scala.rb
+++ b/lib/exercism/curriculum/scala.rb
@@ -8,8 +8,8 @@ )
end
- def locale
- Locale.new('scala', 'scala', 'scala')
+ def language
+ 'scala'
end
end
end
|
Update to new curriculum interface
|
diff --git a/app/serializers/invitable_serializer.rb b/app/serializers/invitable_serializer.rb
index abc1234..def5678 100644
--- a/app/serializers/invitable_serializer.rb
+++ b/app/serializers/invitable_serializer.rb
@@ -1,7 +1,8 @@ class InvitableSerializer < ActiveModel::Serializer
attributes :name,
:subtitle,
- :image
+ :image,
+ :recipients
def subtitle
case object
@@ -15,7 +16,15 @@ case object
when Group then object.logo.try(:url, :original, false)
when Contact then "http://placehold.it/40x40"
- when User then object.avatar.try(:url, :original, false)
+ when User then object.avatar_url
+ end
+ end
+
+ def recipients
+ case object
+ when Group then object.members.map(&:email)
+ when Contact then [object.email]
+ when User then [object.email]
end
end
|
Add rudimentary recipients to serializer
|
diff --git a/app/components/admin/site_customization/information_texts/form_field_component.rb b/app/components/admin/site_customization/information_texts/form_field_component.rb
index abc1234..def5678 100644
--- a/app/components/admin/site_customization/information_texts/form_field_component.rb
+++ b/app/components/admin/site_customization/information_texts/form_field_component.rb
@@ -14,12 +14,12 @@ end
def database_text
- if i18n_content.present?
+ if i18n_content.persisted?
i18n_content.translations.find_by(locale: locale)&.value
end
end
def i18n_text
- t(i18n_content.key, locale: locale)
+ I18n.translate(i18n_content.key, locale: locale)
end
end
|
Improve performance when editing custom texts
We were executing SQL queries searching for translations even for
records which were not persisted in the database and therefore had no
translations.
So we're now only looking for translations when the record is persisted.
Note that, when the record isn't persisted, we're using `I18n.translate`
instead of the `t` method. That's because the `t` method would also
perform database queries since we overwrite the `t` method in the
`i18n_translation` initializer.
On tabs with many records, like the proposals tab, requests are now up
to three times faster on production environments.
Tests related to this part of the application were failing sometimes
because requests took longer than `Capybara.default_max_wait_time`.
After these changes, the custom information texts pages load about 30%
faster when running the tests.
|
diff --git a/spec/test_app/config/initializers/fwt_push_notification_server.rb b/spec/test_app/config/initializers/fwt_push_notification_server.rb
index abc1234..def5678 100644
--- a/spec/test_app/config/initializers/fwt_push_notification_server.rb
+++ b/spec/test_app/config/initializers/fwt_push_notification_server.rb
@@ -1,18 +1,48 @@-
FwtPushNotificationServer.configure do |config|
+ #
+ # Rails Engine
+ #
+
+ # The controller class that the DeviceTokenController should extend
+ config.api_controller_class = ApplicationController
+
+ # The class representing the holder of the device
+ config.user_class = User
+
+ # The key of the user, stored on the DeviceToken
+ # Defaults to email
+ #config.user_key = :email
+
+ # Attributes permitted in the DeviceToken creation route
+ # These provide a way to enrich your server side data about a User
+ # Defaults to nil
+ #config.permitted_user_attributes = :first_name, :last_name
+
+ #
# APNS
- config.apns_certificate = File.join(Rails.root, 'config', 'APNSDevelopment.pem')
- config.apns_passphrase = 'PASSPHRASE'
- config.apns_gateway = 'gateway.sandbox.push.apple.com'
+ #
+
+ # The path to your apns private key
+ config.apns_certificate = File.join(Rails.root, 'config', 'apns-production.pem')
+
+ # The passphrase for your private key
+ # Defaults to nil
+ #config.apns_passphrase = 'YOUR-PASSPHRASE-HERE'
+ # The apns gateway to use
+ # Defaults to 'gateway.push.apple.com', can also be 'gateway.sandbox.push.apple.com'
+ #config.apns_gateway = 'gateway.push.apple.com'
+
+ #
# GCM
- config.gcm_api_key = 'YOUR-KEY-HERE'
-
- # Devise integration
- config.api_controller_class = ApplicationController
- config.user_class = User
- config.user_key = :email
- config.permitted_user_attributes = :first_name, :last_name
+ #
+
+ # Your GCM API Key
+ #config.gcm_api_key = 'YOUR-KEY-HERE'
+
+ # The batch size
+ # Defaults to 1000
+ #config.gcm_batch_size = 1000
end
|
Update test app config initializer
|
diff --git a/app/api/system.rb b/app/api/system.rb
index abc1234..def5678 100644
--- a/app/api/system.rb
+++ b/app/api/system.rb
@@ -25,9 +25,9 @@ tmpfile = file[:tempfile]
name = file[:filename]
- sane_path = File.join(File.dirname(tmpfile), name)
- system "mv", tmpfile.path, sane_path
- system "./script/add-to-itunes", sane_path
+ # iTunes needs a filetype it likes, so fuck it, .mp3 it.
+ system "mv", tmpfile.path, tmpfile.path + '.mp3'
+ system "./script/add-to-itunes", tmpfile.path + '.mp3'
end
true
|
Revert "Update uploader to support more extensions"
This reverts commit caaf29a10ee5310c5d7824978c318515d8e67a46.
This also just doesn't work.
|
diff --git a/ruby/7kyu/dna_gc_content/solution.rb b/ruby/7kyu/dna_gc_content/solution.rb
index abc1234..def5678 100644
--- a/ruby/7kyu/dna_gc_content/solution.rb
+++ b/ruby/7kyu/dna_gc_content/solution.rb
@@ -1,7 +1,7 @@-def DNA_strand(dna)
+def gc_content(dna)
- # Use String#tr to replace the characters from the first string
- # with the corresponding characters of the second string
- dna.tr('ATGC', 'TACG')
-
+ # Check if the DNA string is empty and return 0 if it's the case.
+ # Otherwise compute and return the GC-content
+ dna.empty? ? 0 : dna.upcase.scan(/[CG]/).length.fdiv(dna.length) * 100
+
end
|
Add comments to Ruby Kata 'DNA GC-content'
|
diff --git a/providers/register_agent.rb b/providers/register_agent.rb
index abc1234..def5678 100644
--- a/providers/register_agent.rb
+++ b/providers/register_agent.rb
@@ -5,6 +5,7 @@
case node['rcbu']['is_registered']
when false
+ # Using Mixlib::ShellOut because execute was being run after the RPs it notified. (?!?!?)
cmdStr = "driveclient -c -k #{new_resource.rackspace_api_key} -u #{new_resource.rackspace_username}"
cmd = Mixlib::ShellOut.new(cmdStr)
cmd.run_command
|
Comment on why Mixlib::ShellOut is in use
|
diff --git a/config/initializers/rglossa.rb b/config/initializers/rglossa.rb
index abc1234..def5678 100644
--- a/config/initializers/rglossa.rb
+++ b/config/initializers/rglossa.rb
@@ -2,3 +2,17 @@
Rails.application.config.assets.paths <<
SimplesIdeias::I18n::Engine.root.join('vendor', 'assets', 'javascripts').to_s
+
+
+module Rglossa
+ @taggers = {}
+
+ Dir.glob(Rglossa::Engine.root.join('config', 'taggers', '*')) do |filename|
+ tagger = File.basename(filename, '.json')
+ @taggers[tagger] = JSON.parse(File.read(filename))
+ end
+
+ def self.taggers
+ @taggers
+ end
+end
|
Read config files with tags at startup
|
diff --git a/rb/lib/selenium/webdriver/common/driver_extensions/uploads_files.rb b/rb/lib/selenium/webdriver/common/driver_extensions/uploads_files.rb
index abc1234..def5678 100644
--- a/rb/lib/selenium/webdriver/common/driver_extensions/uploads_files.rb
+++ b/rb/lib/selenium/webdriver/common/driver_extensions/uploads_files.rb
@@ -21,7 +21,8 @@ # driver = Selenium::WebDriver.for :remote
# driver.file_detector = lambda do |args|
# # args => ["/path/to/file"]
- # str if File.exist?(args.first.to_s)
+ # str = args.first.to_s
+ # str if File.exist?(str)
# end
#
# driver.find_element(:id => "upload").send_keys "/path/to/file"
|
JariBakken: Fix error in the file_detector example.
git-svn-id: aa1aa1384423cb28c2b1e29129bb3a91de1d9196@15466 07704840-8298-11de-bf8c-fd130f914ac9
|
diff --git a/test/data_source_test.rb b/test/data_source_test.rb
index abc1234..def5678 100644
--- a/test/data_source_test.rb
+++ b/test/data_source_test.rb
@@ -13,6 +13,10 @@ assert_error "Command exited with non-zero status:\nexit 1", "--config test/support/bad.yml"
end
+ def test_source_command_not_run_with_option
+ assert_works "--config test/support/bad.yml --from pgsync_test1"
+ end
+
# def test_destination_danger
# assert_error "Danger! Add `to_safe: true` to `.pgsync.yml` if the destination is not localhost or 127.0.0.1", "--from pgsync_test1 --to postgres://hostname/db2"
# end
|
Test config from not evaluated when --from option passed
|
diff --git a/app/mailers/organization_notifier.rb b/app/mailers/organization_notifier.rb
index abc1234..def5678 100644
--- a/app/mailers/organization_notifier.rb
+++ b/app/mailers/organization_notifier.rb
@@ -1,6 +1,5 @@ class OrganizationNotifier < ActionMailer::Base
default from: "\"TimeOverflow\" <[email protected]>"
- default to: "\"TimeOverflow\" <[email protected]>"
# Subject can be set in your I18n file at config/locales/en.yml
# with the following lookup:
|
Revert de algo que se ha colado del merge
|
diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb
index abc1234..def5678 100644
--- a/config/initializers/assets.rb
+++ b/config/initializers/assets.rb
@@ -5,4 +5,4 @@ Rails.application.config.assets.precompile += %w( apple-touch-icon-60x60.png )
Rails.application.config.assets.precompile += %w( opengraph-image.png )
Rails.application.config.assets.precompile += %w( gov.uk_logotype_crown.png )
-Rails.application.config.assets.precompile += %w(.svg .eot .woff .ttf *.js ^[^_]*.css ^[^_]*.scss)
+Rails.application.config.assets.precompile += %w(.svg .eot .woff .ttf .js .css .scss)
|
Fix selection code for precompilation
To Precompile css...
|
diff --git a/lib/copian.rb b/lib/copian.rb
index abc1234..def5678 100644
--- a/lib/copian.rb
+++ b/lib/copian.rb
@@ -1,5 +1,6 @@ require 'copian/collector/abstract_collector'
require 'copian/collector/addresses_collector'
+require 'copian/collector/bandwidth_collector'
require 'copian/collector/ports_collector'
require 'copian/collector/port_stats_collector'
require 'copian/collector/generic'
|
Add require for bandwidth collector
|
diff --git a/lib/dc/csv.rb b/lib/dc/csv.rb
index abc1234..def5678 100644
--- a/lib/dc/csv.rb
+++ b/lib/dc/csv.rb
@@ -5,6 +5,7 @@ module CSV
def self.generate_csv(records, keys=nil)
+ return if records.none?
keys ||= records.first.keys
::CSV.generate do |csv|
csv << keys
|
Return immediately if the are no records to dump
On a fresh or lightly used install there are no records to dump
to CSV which was causing exceptions on the nightly emails
|
diff --git a/lib/driver.rb b/lib/driver.rb
index abc1234..def5678 100644
--- a/lib/driver.rb
+++ b/lib/driver.rb
@@ -9,7 +9,7 @@
while (input.casecmp("quit") != 0)
interpret_command(input, player)
- input = player_input
+ input = player_input prompt: '> '
end
end
|
Add prompt: '> ' to player_input in while loop
|
diff --git a/Bulletin.podspec b/Bulletin.podspec
index abc1234..def5678 100644
--- a/Bulletin.podspec
+++ b/Bulletin.podspec
@@ -1,7 +1,7 @@ Pod::Spec.new do |s|
s.name = 'Bulletin'
- s.version = '1.1.0'
+ s.version = '1.2.0'
s.summary = 'Customizable alert library for Swift.'
s.description = <<-DESC
|
Update podspec version to 1.2.0
|
diff --git a/test/unit/spec_helper.rb b/test/unit/spec_helper.rb
index abc1234..def5678 100644
--- a/test/unit/spec_helper.rb
+++ b/test/unit/spec_helper.rb
@@ -1,12 +1,12 @@ require 'chefspec'
+require 'chefspec/berkshelf'
ChefSpec::Coverage.start!
RSpec.configure do |config|
# Specify the path for Chef Solo to find cookbooks (default: [inferred from
# the location of the calling spec file])
- config.cookbook_path = "#{__dir__}/../../.."
- config.cookbook_root = "#{__dir__}/../../"
+ #config.cookbook_path = "#{__dir__}/../../.."
# Specify the path for Chef Solo to find roles (default: [ascending search])
#config.role_path = '/var/roles'
|
Use chefspec/berkshelf and do not touch the cookbook path
|
diff --git a/spec/lita/handlers/wikipedia_spec.rb b/spec/lita/handlers/wikipedia_spec.rb
index abc1234..def5678 100644
--- a/spec/lita/handlers/wikipedia_spec.rb
+++ b/spec/lita/handlers/wikipedia_spec.rb
@@ -24,7 +24,7 @@
it "returns an error message if no article is found" do
send_command "wiki asdfasdfa"
- expect(replies.first).to match "No Wikipedia entry found for 'asdfasdfa'."
+ expect(replies.first).to match "No Wikipedia entry found for 'asdfasdfa'"
end
end
end
|
Modify test to expect "no entry found" response string without a period
|
diff --git a/rb/lib/selenium/webdriver/common/port_prober.rb b/rb/lib/selenium/webdriver/common/port_prober.rb
index abc1234..def5678 100644
--- a/rb/lib/selenium/webdriver/common/port_prober.rb
+++ b/rb/lib/selenium/webdriver/common/port_prober.rb
@@ -20,7 +20,7 @@ end
def self.free?(port)
- interfaces = Socket.getaddrinfo("localhost", port).map { |e| e[2] }
+ interfaces = Socket.getaddrinfo("localhost", port).map { |e| e[3] }
interfaces += ["0.0.0.0", Platform.ip]
interfaces.each { |address| TCPServer.new(address, port).close }
|
JariBakken: Fix for 1.8.7 behaviour of Socket.getaddrinfo
git-svn-id: 4179480af2c2519a5eb5e1e9b541cbdf5cf27696@17085 07704840-8298-11de-bf8c-fd130f914ac9
|
diff --git a/Casks/popchar.rb b/Casks/popchar.rb
index abc1234..def5678 100644
--- a/Casks/popchar.rb
+++ b/Casks/popchar.rb
@@ -0,0 +1,11 @@+cask :v1 => 'popchar' do
+ version '7.3.1'
+ sha256 '1f7d06897b165613f564e34409ff42e20e383f831b45c86d6e4bd71bc1c1b670'
+
+ url "http://www.ergonis.com/downloads/products/popcharx/PopCharX#{version.gsub(%r{\.},'')}-Install.dmg"
+ name 'PopChar X'
+ homepage 'http://www.ergonis.com/products/popcharx/'
+ license :commercial
+
+ app 'PopChar.app'
+end
|
Add PopChar X version 7.3.1.
|
diff --git a/spec/unit/transition/matches_spec.rb b/spec/unit/transition/matches_spec.rb
index abc1234..def5678 100644
--- a/spec/unit/transition/matches_spec.rb
+++ b/spec/unit/transition/matches_spec.rb
@@ -0,0 +1,23 @@+# encoding: utf-8
+
+require 'spec_helper'
+
+RSpec.describe FiniteMachine::Transition, '.matches?' do
+ let(:machine) { double(:machine) }
+
+ it "matches from state" do
+ states = {:green => :red}
+ transition = described_class.new(machine, states: states)
+
+ expect(transition.matches?(:green)).to eq(true)
+ expect(transition.matches?(:red)).to eq(false)
+ end
+
+ it "matches any state" do
+ states = {:any => :red}
+ transition = described_class.new(machine, states: states)
+
+ expect(transition.matches?(:green)).to eq(true)
+ end
+end
+
|
Add test for matching transition state.
|
diff --git a/Casks/sidplay.rb b/Casks/sidplay.rb
index abc1234..def5678 100644
--- a/Casks/sidplay.rb
+++ b/Casks/sidplay.rb
@@ -2,7 +2,7 @@ version '4.0'
sha256 'a7de546ba5a0b69365d57a8eff05a2820f81167ccd3a74e07ad3539e08a80bbd'
- # www.twinbirds.com/sidplay was verified as official when first introduced to the cask
+ # twinbirds.com/sidplay was verified as official when first introduced to the cask
url "http://www.twinbirds.com/sidplay/SIDPLAY#{version.major}.zip"
appcast 'http://www.sidmusic.org/sidplay/mac/sidplay_appcast.xml',
checkpoint: 'b76e236f3dcca61d0a82c39d2e8449b7995c84e2f2546b1bd7958459c14cc186'
|
Fix `url` stanza comment for SIDPLAY.
|
diff --git a/Casks/vivaldi.rb b/Casks/vivaldi.rb
index abc1234..def5678 100644
--- a/Casks/vivaldi.rb
+++ b/Casks/vivaldi.rb
@@ -1,11 +1,11 @@ cask :v1 => 'vivaldi' do
version '1.0.83.38'
- sha256 'ef048f271526c53574f453dfdcac157482fc51e9f669c22aadaf1b25b5f952fa'
+ sha256 '84153229b9d59561c9d6f570aa77875ed8b410ff43d2b4298167a0dc300b2a59'
url "http://vivaldi.com/download/Vivaldi_TP_#{version}.dmg"
name 'Vivaldi'
homepage 'https://vivaldi.com'
- license :gratis
+ license :gratis
app 'Vivaldi.app'
end
|
Fix checksum in Vivaldi Cask
|
diff --git a/phonetic_alphabet.gemspec b/phonetic_alphabet.gemspec
index abc1234..def5678 100644
--- a/phonetic_alphabet.gemspec
+++ b/phonetic_alphabet.gemspec
@@ -10,7 +10,7 @@ spec.email = ["[email protected]"]
spec.summary = %q{Enables strings to be spelled with the phonetic alphabet}
spec.description = %q{Extends ruby String class with to_p method which converst strings to their phonetic alphabet representation.}
- spec.homepage = ""
+ spec.homepage = "https://github.com/dnshl/phonetic_alphabet"
spec.license = "MIT"
spec.files = `git ls-files -z`.split("\x0")
|
Add homepage info to gemspec
|
diff --git a/spec/features/users/user_can_deactivate_daily_text_messages_spec.rb b/spec/features/users/user_can_deactivate_daily_text_messages_spec.rb
index abc1234..def5678 100644
--- a/spec/features/users/user_can_deactivate_daily_text_messages_spec.rb
+++ b/spec/features/users/user_can_deactivate_daily_text_messages_spec.rb
@@ -0,0 +1,40 @@+require 'rails_helper'
+
+feature 'Deactivating Daily Texts' do
+ context 'As an authenticated user' do
+ scenario 'I can successfully deactivate my daily text messages' do
+ user = create(:user)
+ allow_any_instance_of(ApplicationController).to receive(:current_user).and_return(user)
+
+ visit user_path(user)
+ click_on "Unsubscribe"
+
+ expect(current_path).to eq(user_path(user))
+ expect(page).to have_content("Successfully unsubscribed.")
+ expect(user.active).to eq(false)
+ end
+
+ scenario 'I cannot deactivate another users daily text messages' do
+ user1, user2 = create_list(:user, 2)
+ allow_any_instance_of(ApplicationController).to receive(:current_user).and_return(user1)
+
+ visit user_path(user2)
+ click_on "Unsubscribe"
+
+ expect(current_path).to eq(user_path(user1))
+ expect(page).to have_content("Successfully unsubscribed.")
+ expect(user1.active).to eq(false)
+ expect(user2.active).to eq(true)
+ end
+ end
+
+ context 'As an unauthenticated user' do
+ scenario 'I cannot see a user show page' do
+ user = create(:user)
+
+ visit user_path(user)
+
+ expect(page).to have_content("Welcome to Kackle!")
+ end
+ end
+end
|
Add test for user to unsubscribe
|
diff --git a/lib/gitlab.rb b/lib/gitlab.rb
index abc1234..def5678 100644
--- a/lib/gitlab.rb
+++ b/lib/gitlab.rb
@@ -10,7 +10,7 @@
class Gitlab
def initialize
- config = "config.yml"
+ config = File.expand_path('../../config.yml',__FILE__)
Config.load(config)
end
|
Fix config file path issue
|
diff --git a/app/models/listing.rb b/app/models/listing.rb
index abc1234..def5678 100644
--- a/app/models/listing.rb
+++ b/app/models/listing.rb
@@ -7,7 +7,6 @@ has_many :donation_applications, dependent: :destroy
def get_show_image
- listing_image = Listing.find(params[:id]).image_url || 'http://placehold.it/400x300&text=[img]'
- listing_image
+ self.image_url || 'http://placehold.it/400x300&text=[img]'
end
end
|
Fix Listing image url placeholders
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.