diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/F53FeedbackKit.podspec b/F53FeedbackKit.podspec
index abc1234..def5678 100644
--- a/F53FeedbackKit.podspec
+++ b/F53FeedbackKit.podspec
@@ -1,6 +1,6 @@ Pod::Spec.new do |s|
s.name = 'F53FeedbackKit'
- s.version = '1.5.1'
+ s.version = '1.5.2'
s.summary = 'Framework for sending feedback and system information reports from your iOS application.'
s.license = 'apache'
s.homepage = 'https://github.com/Figure53/F53FeedbackKit'
@@ -18,6 +18,7 @@ 'Sources/Main/iOS/*.{h,m}',
'Sources/Resources/iOS/Base.lproj/Localizable.strings'
]
+ ss.prefix_header_file = 'F53FeedbackKit_iOS/F53FeedbackKit_iOS.pch'
ss.frameworks = 'Foundation', 'UIKit', 'SystemConfiguration'
ss.platform = :ios, '9.0'
|
Add .pch file to iOS podspec
- fixes missing `FRLocalizedString` definition regression in 1.5.1 when integrating using CocoaPods
|
diff --git a/test/module_smoothie_test.rb b/test/module_smoothie_test.rb
index abc1234..def5678 100644
--- a/test/module_smoothie_test.rb
+++ b/test/module_smoothie_test.rb
@@ -0,0 +1,18 @@+require File.dirname(__FILE__) + '/test_helper.rb'
+require 'modules/module_smoothie.rb'
+
+class TestModule_Smoothie < Test::Unit::TestCase
+ context "Smoothie module" do
+ setup do
+ @bot = mock()
+ @module = Module_Smoothie.new
+ @module.init_module(@bot)
+ end
+
+ should "calculate kcals for known ingredients" do
+ exp_result = "Laskennallinen energiasisältö: 212.1 kcal"
+ @bot.expects(:send_privmsg).with("#channel", exp_result)
+ @module.privmsg(@bot, "someone", "#channel", "!smoothie omena:150 paaryna:150 nakki:20 tropicana:100")
+ end
+ end
+end
|
Add simple test for smoothie module
Signed-off-by: Aki Saarinen <278bc57fbbff6b7b38435aea0f9d37e3d879167e@akisaarinen.fi>
|
diff --git a/start_bot.rb b/start_bot.rb
index abc1234..def5678 100644
--- a/start_bot.rb
+++ b/start_bot.rb
@@ -19,6 +19,7 @@ override = File.join(Dir.pwd, 'lib', 'settings', 'bot_settings.user.json')
default = File.join(Dir.pwd, 'lib', 'settings', 'bot_settings.json')
settings_path = File.exist?(override) ? override : default
+puts 'Loading settings from #{settings_path}...'
if ARGV[0] == '--dev'
puts 'Running in dev mode...'
|
Core: Print out loaded settings file path on bot start
|
diff --git a/db/migrate/20150112212957_create_schools.rb b/db/migrate/20150112212957_create_schools.rb
index abc1234..def5678 100644
--- a/db/migrate/20150112212957_create_schools.rb
+++ b/db/migrate/20150112212957_create_schools.rb
@@ -10,6 +10,7 @@ t.string :district_code
t.string :assembly_district
t.integer :senate_district
+ t.references :location
t.timestamps
end
|
Add refernece to location in schools migration
|
diff --git a/spec/controllers/dataset_file_schemas_controller_spec.rb b/spec/controllers/dataset_file_schemas_controller_spec.rb
index abc1234..def5678 100644
--- a/spec/controllers/dataset_file_schemas_controller_spec.rb
+++ b/spec/controllers/dataset_file_schemas_controller_spec.rb
@@ -0,0 +1,16 @@+require 'spec_helper'
+
+describe DatasetFileSchemasController, type: :controller do
+ describe 'index' do
+ it "returns http success" do
+ get 'index'
+ expect(response).to be_success
+ end
+
+ it "gets the right number of dataset file schemas" do
+ 5.times { |i| create(:dataset_file_schema, name: "Dataset File Schema #{i}") }
+ get 'index'
+ expect(assigns(:dataset_file_schemas).count).to eq(5)
+ end
+ end
+end
|
Add test for new controller for listing schemas
|
diff --git a/spec/workers/pull_request_monitor/repo_processor_spec.rb b/spec/workers/pull_request_monitor/repo_processor_spec.rb
index abc1234..def5678 100644
--- a/spec/workers/pull_request_monitor/repo_processor_spec.rb
+++ b/spec/workers/pull_request_monitor/repo_processor_spec.rb
@@ -0,0 +1,60 @@+require "spec_helper"
+
+RSpec.describe PullRequestMonitor::RepoProcessor do
+ describe ".process" do
+ it "pulls from upstream master" do
+ repo = instance_spy("CommitMonitorRepo")
+ git = spy("git")
+ allow(repo).to receive(:with_git_service).and_yield(git)
+ class_spy("PrBranchRecord").as_stubbed_const
+
+ expect(git).to receive(:checkout).with("master").ordered
+ expect(git).to receive(:pull).ordered
+
+ described_class.process(repo)
+ end
+
+ it "creates a pr branch record" do
+ repo = instance_spy("CommitMonitorRepo")
+ git = spy("git")
+ allow(repo).to receive(:with_git_service).and_yield(git)
+ pr_branch_record = class_spy("PrBranchRecord").as_stubbed_const
+ pull_request = double("pull request", :number => 123)
+ branch_name = "foo/bar"
+ allow(repo).to receive(:pull_requests).and_return([pull_request])
+ allow(repo).to receive(:pr_branches).and_return([])
+ allow(git).to receive(:pr_branch).with(pull_request.number).and_return(branch_name)
+
+ expect(pr_branch_record).to receive(:create).with(repo, pull_request, branch_name)
+
+ described_class.process(repo)
+ end
+
+ it "skips pr branch record creation if it exists" do
+ repo = instance_spy("CommitMonitorRepo")
+ git = spy("git")
+ allow(repo).to receive(:with_git_service).and_yield(git)
+ pr_branch_record = class_spy("PrBranchRecord").as_stubbed_const
+ pull_request = double("pull request", :number => 123)
+ branch_name = "foo/bar"
+ allow(repo).to receive(:pull_requests).and_return([pull_request])
+ allow(repo).to receive(:pr_branches).and_return([double("branch", :name => branch_name)])
+ allow(git).to receive(:pr_branch).with(pull_request.number).and_return(branch_name)
+
+ expect(pr_branch_record).not_to receive(:create)
+
+ described_class.process(repo)
+ end
+
+ it "prunes any stale pr branch records" do
+ repo = instance_spy("CommitMonitorRepo")
+ git = spy("git")
+ allow(repo).to receive(:with_git_service).and_yield(git)
+ pr_branch_record = class_spy("PrBranchRecord").as_stubbed_const
+
+ expect(pr_branch_record).to receive(:prune).with(repo)
+
+ described_class.process(repo)
+ end
+ end
+end
|
Add specs for repo processor
|
diff --git a/vignesh/05_sep/prime_test.rb b/vignesh/05_sep/prime_test.rb
index abc1234..def5678 100644
--- a/vignesh/05_sep/prime_test.rb
+++ b/vignesh/05_sep/prime_test.rb
@@ -0,0 +1,21 @@+require "test/unit"
+require "./prime"
+
+
+
+class Testprime < Test::Unit::TestCase
+
+
+def check_prime_no
+ assert_equal("True", Prime.check_prime(7))
+ assert_equal("True",Prime.check_prime(13))
+ assert_equal("False",Prime.check_prime(10))
+ assert_equal("False",Prime.check_prime(27))
+ assert_equal("True",Prime.check_prime(29))
+ assert_equal("Invalid",Prime.check_prime(abcd))
+ end
+
+
+end
+
+
|
Test file for prime number has been created
|
diff --git a/resources/check.rb b/resources/check.rb
index abc1234..def5678 100644
--- a/resources/check.rb
+++ b/resources/check.rb
@@ -5,7 +5,7 @@ attribute :subscribers, :kind_of => Array
attribute :standalone, :kind_of => [TrueClass, FalseClass]
attribute :interval, :default => 60
-attribute :handle, :kind_of => FalseClass
+attribute :handle, :kind_of => [TrueClass, FalseClass]
attribute :handlers, :kind_of => Array
attribute :additional, :kind_of => Hash, :default => Hash.new
|
Change handle to support both true and false
|
diff --git a/app/controllers/api/v1/matches_controller.rb b/app/controllers/api/v1/matches_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/api/v1/matches_controller.rb
+++ b/app/controllers/api/v1/matches_controller.rb
@@ -6,7 +6,7 @@ end
def create
- match = MatchSetupService.create!
+ match = MatchSetupService.create!(number_of_players: match_params[:players_count])
render json: match, include: [:players]
end
@@ -15,4 +15,10 @@ match = Match.find(params[:id])
render json: match, include: [:players]
end
+
+ private
+
+ def match_params
+ params.require(:match).permit(:players_count)
+ end
end
|
Create new match with number of players
|
diff --git a/spec/unit/mutant/loader/eval/class_methods/run_spec.rb b/spec/unit/mutant/loader/eval/class_methods/run_spec.rb
index abc1234..def5678 100644
--- a/spec/unit/mutant/loader/eval/class_methods/run_spec.rb
+++ b/spec/unit/mutant/loader/eval/class_methods/run_spec.rb
@@ -36,6 +36,6 @@
it 'should set file and line correctly' do
subject
- ::SomeNamespace::Bar.instance_method(:some_method).source_location.should eql(['test.rb', 4])
+ ::SomeNamespace::Bar.instance_method(:some_method).source_location.should eql(['test.rb', 3])
end
end
|
Adjust expectation to unparser change
|
diff --git a/BHCDatabase/test/models/condition_test.rb b/BHCDatabase/test/models/condition_test.rb
index abc1234..def5678 100644
--- a/BHCDatabase/test/models/condition_test.rb
+++ b/BHCDatabase/test/models/condition_test.rb
@@ -19,4 +19,12 @@ @condition.user = nil
assert_not @condition.valid?, @condition.errors.full_messages.inspect
end
+
+ test 'index on medical_condition and user' do
+ @duplicate_condition = @condition.dup
+ assert_not @duplicate_condition.valid?
+ assert_no_difference 'Condition.count' do
+ @duplicate_condition.save
+ end
+ end
end
|
Add test for index on medical_condition and user for an condition.
|
diff --git a/.dassie/config/application.rb b/.dassie/config/application.rb
index abc1234..def5678 100644
--- a/.dassie/config/application.rb
+++ b/.dassie/config/application.rb
@@ -9,7 +9,7 @@ module Dassie
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
- config.load_defaults 5.2
+ config.load_defaults 6.0
# Settings in config/environments/* take precedence over those specified here.
# Application configuration can go into files in config/initializers
|
Set dassie rails defaults to 6.0
|
diff --git a/lib/dragonfly/railtie.rb b/lib/dragonfly/railtie.rb
index abc1234..def5678 100644
--- a/lib/dragonfly/railtie.rb
+++ b/lib/dragonfly/railtie.rb
@@ -4,7 +4,7 @@ module Dragonfly
class Railtie < ::Rails::Railtie
initializer "dragonfly.railtie.initializer" do |app|
- app.middleware.insert 1, Dragonfly::CookieMonster
+ app.middleware.insert_before 'ActionDispatch::Cookies', Dragonfly::CookieMonster
end
end
end
|
Put CookieMonster before ActionDispatch::Cookies - that way Rack::Cache won't come between them and mess things up
|
diff --git a/lib/innodb/fseg_entry.rb b/lib/innodb/fseg_entry.rb
index abc1234..def5678 100644
--- a/lib/innodb/fseg_entry.rb
+++ b/lib/innodb/fseg_entry.rb
@@ -22,9 +22,15 @@ # Return an INODE entry which represents this file segment.
def self.get_inode(space, cursor)
address = cursor.name("address") { get_entry_address(cursor) }
+ if address[:offset] == 0
+ return nil
+ end
+
page = space.page(address[:page_number])
- if page.type == :INODE
- page.inode_at(page.cursor(address[:offset]))
+ if page.type != :INODE
+ return nil
end
+
+ page.inode_at(page.cursor(address[:offset]))
end
end
|
Deal with zero offsets for an FSEG entry
|
diff --git a/lib/pronto/foodcritic.rb b/lib/pronto/foodcritic.rb
index abc1234..def5678 100644
--- a/lib/pronto/foodcritic.rb
+++ b/lib/pronto/foodcritic.rb
@@ -33,7 +33,7 @@ def new_message(warning, line)
path = line.patch.delta.new_file[:path]
message = "#{warning.rule.code} - #{warning.rule.name}"
- Message.new(path, line, :warning, message)
+ Message.new(path, line, :warning, message, nil, self.class)
end
end
end
|
Add the runner class into the report message
|
diff --git a/core/app/models/spree/user_class_handle.rb b/core/app/models/spree/user_class_handle.rb
index abc1234..def5678 100644
--- a/core/app/models/spree/user_class_handle.rb
+++ b/core/app/models/spree/user_class_handle.rb
@@ -1,7 +1,20 @@ module Spree
+ # Placeholder for name of Spree.user_class to ensure later evaluation at
+ # runtime.
+ #
+ # Unfortunately, it is possible for classes to get loaded before
+ # Spree.user_class has been set in the initializer. As a result, they end up
+ # with class_name: "" in their association definitions. For obvious reasons,
+ # that doesn't work.
+ #
+ # For now, Rails does not call to_s on the instance passed in until runtime.
+ # So this little hack provides a wrapper around Spree.user_class so that we
+ # can basically lazy-evaluate it. Yay! Problem solved forever.
class UserClassHandle
- # Super hack to get around load order.
+ # @return [String] the name of the user class as a string.
+ # @raise [RuntimeError] if Spree.user_class is nil
def to_s
+ fail "'Spree.user_class' has not been set yet." unless Spree.user_class
Spree.user_class.to_s
end
end
|
Add some better documentation to the hack.
|
diff --git a/lib/sluggable/railtie.rb b/lib/sluggable/railtie.rb
index abc1234..def5678 100644
--- a/lib/sluggable/railtie.rb
+++ b/lib/sluggable/railtie.rb
@@ -1,7 +1,7 @@ module Sluggable
class Railtie < Rails::Railtie
initializer 'sluggable.configure_rails_initialization' do
- ActiveRecord::Validations.send :include, Sluggable::Validations
+ ActiveModel::Validations.send :include, Sluggable::Validations
ActiveRecord::Base.send :include, Sluggable::Sluggify
end
end
|
Add Validations to ActiveModel for reusability
|
diff --git a/lib/tasks/fake_logs.rake b/lib/tasks/fake_logs.rake
index abc1234..def5678 100644
--- a/lib/tasks/fake_logs.rake
+++ b/lib/tasks/fake_logs.rake
@@ -0,0 +1,11 @@+namespace :fake_logs do
+ desc "Generates fake logs entries"
+ task generate: :environment do
+ count = ENV["COUNT"].to_i
+ set_uuid = SecureRandom.uuid
+ count.times do |i|
+ Log.create!(username: "fake user", application: "fake app", activity: "fake activity", event: "fake event",
+ time: Time.now, parameters: {set_uuid: set_uuid}, extras: {index: i})
+ end
+ end
+end
|
Add rake task that generates fake logs
[#101889132]
|
diff --git a/mock_server.gemspec b/mock_server.gemspec
index abc1234..def5678 100644
--- a/mock_server.gemspec
+++ b/mock_server.gemspec
@@ -2,7 +2,7 @@ s.name = 'mock_server'
s.version = '0.1.5'
s.summary = "Mock you're entire application"
- s.author = 'Charles Barbier'
+ s.author = ['Charles Barbier', 'Saimon Moore']
s.email = 'unixcharles@gmail.com'
s.homepage = 'http://www.github.com/unixcharles/mock_server'
|
Add Saimon to author list
|
diff --git a/lib/pod/command/keys.rb b/lib/pod/command/keys.rb
index abc1234..def5678 100644
--- a/lib/pod/command/keys.rb
+++ b/lib/pod/command/keys.rb
@@ -9,7 +9,7 @@ require 'pod/command/keys/rm'
require 'pod/command/keys/export'
- self.summary = 'A key value store for environment settings in Cocoa Apps.'
+ self.summary = 'A key value store for environment settings in Cocoa Apps'
self.description = <<-DESC
CocoaPods Keys will store sensitive data in your Mac's keychain. Then on running pod install they will be installed into your app's source code via the Pods library.
|
Remove the "." in the summary to conform to the rest of the CP commands
|
diff --git a/lib/sass_paths/bower.rb b/lib/sass_paths/bower.rb
index abc1234..def5678 100644
--- a/lib/sass_paths/bower.rb
+++ b/lib/sass_paths/bower.rb
@@ -2,6 +2,8 @@
module SassPaths
module Bower
+
+ private
PERMITTED_FILE_EXTENSIONS = ['.scss', '.sass'].freeze
|
Make Bower module methods private
|
diff --git a/lib/slowpoke/railtie.rb b/lib/slowpoke/railtie.rb
index abc1234..def5678 100644
--- a/lib/slowpoke/railtie.rb
+++ b/lib/slowpoke/railtie.rb
@@ -2,7 +2,7 @@ class Railtie < Rails::Railtie
initializer "slowpoke" do
- Rack::Timeout.service_timeout = Slowpoke.timeout
+ Rack::Timeout.timeout = Slowpoke.timeout
ActiveRecord::Base.logger.class.send(:include, ::LoggerSilence) if ActiveRecord::Base.logger
end
|
Use timeout as documentation states
|
diff --git a/lib/with_model/table.rb b/lib/with_model/table.rb
index abc1234..def5678 100644
--- a/lib/with_model/table.rb
+++ b/lib/with_model/table.rb
@@ -9,13 +9,26 @@ end
def create
- connection = ActiveRecord::Base.connection
- connection.drop_table(@name) if connection.table_exists?(@name)
+ connection.drop_table(@name) if exists?
connection.create_table(@name, @options, &@block)
end
def destroy
ActiveRecord::Base.connection.drop_table(@name)
end
+
+ private
+
+ def exists?
+ if connection.respond_to?(:data_source_exists?)
+ connection.data_source_exists?(@name)
+ else
+ connection.table_exists?(@name)
+ end
+ end
+
+ def connection
+ ActiveRecord::Base.connection
+ end
end
end
|
Fix ActiveRecord 5 deprecation warning
|
diff --git a/app/controllers/corporate_information_pages_controller.rb b/app/controllers/corporate_information_pages_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/corporate_information_pages_controller.rb
+++ b/app/controllers/corporate_information_pages_controller.rb
@@ -13,10 +13,10 @@
def find_document_or_edition_for_public
published_edition = @organisation.corporate_information_pages.published.for_slug!(params[:id])
- return published_edition if published_edition.present? && published_edition.available_in_locale?(I18n.locale)
+ return published_edition if published_edition.available_in_locale?(I18n.locale)
end
- def set_slimmer_headers_for_document()
+ def set_slimmer_headers_for_document
set_slimmer_organisations_header([@organisation])
set_slimmer_page_owner_header(@organisation)
end
|
Remove unnecessary check and parentheses.
|
diff --git a/app/controllers/crowdblog/admin/transitions_controller.rb b/app/controllers/crowdblog/admin/transitions_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/crowdblog/admin/transitions_controller.rb
+++ b/app/controllers/crowdblog/admin/transitions_controller.rb
@@ -3,6 +3,7 @@ class TransitionsController < Crowdblog::Admin::BaseController
respond_to :json
before_filter :load_post, only: [:create]
+ cache_sweeper :post_sweeper
def create
namespace = '_as_publisher' if current_user.is_publisher?
|
Fix post cache when doing state transitions
|
diff --git a/app/models/business.rb b/app/models/business.rb
index abc1234..def5678 100644
--- a/app/models/business.rb
+++ b/app/models/business.rb
@@ -33,9 +33,10 @@ __elasticsearch__.search(
{
query: {
- fuzzy_like_this: {
- fields: ["title", "category"],
- like_text: query
+ fuzzy_like_this: {
+ like_text: query,
+ fields: ["title", "category"],
+ fuzziness: "AUTO"
}
},
highlight: {
|
Add fuzziness as AUTO to ES query
|
diff --git a/lib/time_log_robot/jira/issue_key_parser.rb b/lib/time_log_robot/jira/issue_key_parser.rb
index abc1234..def5678 100644
--- a/lib/time_log_robot/jira/issue_key_parser.rb
+++ b/lib/time_log_robot/jira/issue_key_parser.rb
@@ -15,7 +15,7 @@
def get_key_from_key_mapping(description)
mappings = YAML.load_file(mapping_file_path) || {}
- if found_key = mappings.keys.find { |key| /#{description}/ =~ key }
+ if found_key = mappings.keys.find { |key| description.include?(key) }
mappings[found_key]
end
end
|
Use include? over regex matching for mappings
|
diff --git a/app/models/vat_rate.rb b/app/models/vat_rate.rb
index abc1234..def5678 100644
--- a/app/models/vat_rate.rb
+++ b/app/models/vat_rate.rb
@@ -6,6 +6,6 @@
# String
def to_s
- "%.1f (%s)" % [rate, I18n::translate(code, :scope => 'vat_rates.code')]
+ "%.1f%% (%s)" % [rate, I18n::translate(code, :scope => 'vat_rates.code')]
end
end
|
Add % to VatRate.to_s output.
|
diff --git a/UICollectionViewLeftAlignedLayout.podspec b/UICollectionViewLeftAlignedLayout.podspec
index abc1234..def5678 100644
--- a/UICollectionViewLeftAlignedLayout.podspec
+++ b/UICollectionViewLeftAlignedLayout.podspec
@@ -1,4 +1,4 @@-version = "0.0.3"
+version = "1.0.0"
Pod::Spec.new do |s|
s.name = "UICollectionViewLeftAlignedLayout"
|
Bump podspec version to 1.0.0 :tada:
|
diff --git a/lib/assay/silent_assay.rb b/lib/assay/silent_assay.rb
index abc1234..def5678 100644
--- a/lib/assay/silent_assay.rb
+++ b/lib/assay/silent_assay.rb
@@ -0,0 +1,59 @@+require_relative 'output_assay'
+
+# Assert that there is no output, either from stdout or stderr.
+#
+# SilentAssay.pass?{ puts 'foo!' } #=> false
+#
+class SilentAssay < OutputAssay
+
+ register :silent
+
+ #
+ # Compare +match+ against $stdout and $stderr via `#===` method.
+ #
+ # Note that $stdout and $stderr are temporarily reouted to StringIO
+ # objects and the results have any trailing newline chomped off.
+ #
+ def self.pass?(&block)
+ require 'stringio'
+
+ begin
+ stdout, stderr = $stdout, $stderr
+ newout, newerr = StringIO.new, StringIO.new
+ $stdout, $stderr = newout, newerr
+ yield
+ ensure
+ $stdout, $stderr = stdout, stderr
+ end
+
+ newout, newerr = newout.string.chomp("\n"), newerr.string.chomp("\n")
+
+ newout.empty? && newerr.empty?
+ end
+
+ # TODO: Assertable isn't dealing with no-argument assertions well,
+ # see if this can be improved.
+
+ #
+ # Opposite of `SilentAssay.pass?`.
+ #
+ def self.fail?(&block)
+ ! pass?(&block)
+ end
+
+ #
+ #
+ #
+ def self.assert_message(*)
+ "unexpected output"
+ end
+
+ #
+ #
+ #
+ def self.refute_message(*)
+ "expected output"
+ end
+
+end
+
|
Add SilentAssay to compliment OutputAssay.
|
diff --git a/test/cli/command/test_commands.rb b/test/cli/command/test_commands.rb
index abc1234..def5678 100644
--- a/test/cli/command/test_commands.rb
+++ b/test/cli/command/test_commands.rb
@@ -0,0 +1,49 @@+# frozen_string_literal: true
+
+require "helpers"
+
+# Tests for KBSecret::CLI::Command::Commands
+class KBSecretCommandCommandsTest < Minitest::Test
+ include Helpers
+ include Helpers::CLI
+
+ def test_commands_help
+ commands_helps = [
+ %w[help --help],
+ %w[help -h],
+ %w[help help],
+ ]
+
+ commands_helps.each do |commands_help|
+ stdout, = kbsecret(*commands_help)
+ assert_match(/Usage:/, stdout)
+ end
+ end
+
+ def test_commands_lists_all_commands
+ stdout, = kbsecret "commands"
+
+ stdout.lines.each do |command|
+ command.chomp!
+ assert KBSecret::CLI::Command.all_command_names.include?(command)
+ end
+ end
+
+ def test_commands_lists_all_external_commands
+ stdout, = kbsecret "commands", "-e"
+
+ stdout.lines.each do |command|
+ command.chomp!
+ assert KBSecret::CLI::Command.external?(command)
+ end
+ end
+
+ def test_commands_lists_all_internal_commands
+ stdout, = kbsecret "commands", "-i"
+
+ stdout.lines.each do |command|
+ command.chomp!
+ assert KBSecret::CLI::Command.internal?(command)
+ end
+ end
+end
|
test/cli: Add tests for `kbsecret commands`
|
diff --git a/spec/factories/address_factory.rb b/spec/factories/address_factory.rb
index abc1234..def5678 100644
--- a/spec/factories/address_factory.rb
+++ b/spec/factories/address_factory.rb
@@ -0,0 +1,9 @@+require 'spree/testing_support/factories'
+require 'securerandom'
+
+FactoryGirl.modify do
+ # Modify the address factory to generate unique addresses.
+ factory :address do
+ address2 { SecureRandom.uuid }
+ end
+end
|
Create unique addresses by default.
|
diff --git a/spec/models/configuration_spec.rb b/spec/models/configuration_spec.rb
index abc1234..def5678 100644
--- a/spec/models/configuration_spec.rb
+++ b/spec/models/configuration_spec.rb
@@ -8,7 +8,7 @@
it{ should validate_presence_of :name }
it "should be valid from factory" do
- @config.should be_valid
+ expect(@config).to be_valid
end
context "#get" do
@@ -17,14 +17,16 @@ FactoryGirl.create(:configuration, name: 'other_config', value: 'another_value')
end
it "should get config" do
- ::Configuration[:a_config].should == 'a_value'
+ expect(described_class[:a_config]).to eql('a_value')
end
- it "should return nil when not founf" do
- ::Configuration[:not_found_config].should be(nil)
+
+ it "should return nil when not found" do
+ expect(described_class[:not_found_config]).to be_nil
end
it "should return array" do
- expected= ['a_value', 'another_value']
- ::Configuration[:a_config, :other_config].should == ['a_value', 'another_value']
+ expect(
+ described_class[:a_config, :other_config]
+ ).to eql(['a_value', 'another_value'])
end
end
|
Use expect syntax for Configuration specs
|
diff --git a/spec/unit/recipes/default_spec.rb b/spec/unit/recipes/default_spec.rb
index abc1234..def5678 100644
--- a/spec/unit/recipes/default_spec.rb
+++ b/spec/unit/recipes/default_spec.rb
@@ -6,5 +6,6 @@ it 'installs the XML package' do
expect(chef_run).to install_package('libxml2-dev')
expect(chef_run).to install_package('libxslt-dev')
+ expect(chef_run).to install_package('zlib1g-dev')
end
end
|
Add rspec test to verify zlib1g-dev package is installed
|
diff --git a/app/helpers/people_helper.rb b/app/helpers/people_helper.rb
index abc1234..def5678 100644
--- a/app/helpers/people_helper.rb
+++ b/app/helpers/people_helper.rb
@@ -23,7 +23,7 @@ person.try :person
end
- if ((attributes && (attributes.any? { |a| person[a].blank? || subject[a].blank? })) || current_person.can_edit?(subject)) && block
+ if ((attributes && (attributes.any? { |a| person[a].blank? || subject[a].blank? })) || (current_person && current_person.can_edit?(subject))) && block
capture(&block)
end
end
|
Handle can_edit? with no person
|
diff --git a/recipes/git_secrets.rb b/recipes/git_secrets.rb
index abc1234..def5678 100644
--- a/recipes/git_secrets.rb
+++ b/recipes/git_secrets.rb
@@ -8,7 +8,9 @@ log 'Should install git-secrets for linux, but not implemented...'
end
-execute 'git secrets --register-aws --global'
+execute 'git secrets --register-aws --global' do
+ returns [0, 1]
+end
hooks = [
'pre-commit',
|
Edit git secrets --register-aws to allow re-running
|
diff --git a/app/classes/compendium/presenters/base.rb b/app/classes/compendium/presenters/base.rb
index abc1234..def5678 100644
--- a/app/classes/compendium/presenters/base.rb
+++ b/app/classes/compendium/presenters/base.rb
@@ -3,6 +3,10 @@ def initialize(template, object)
@object = object
@template = template
+ end
+
+ def to_s
+ "#<#{self.class.name}:0x00#{'%x' % (object_id << 1)}>"
end
private
|
Add a to_s method so that Presenters being dumped (ie. in exceptions) aren't 8 billion lines long
|
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -1,6 +1,10 @@ require 'specialist_publisher_wiring'
class ApplicationController < ActionController::Base
+ include GDS::SSO::ControllerMethods
+
+ before_filter :require_signin_permission!
+
protect_from_forgery with: :exception
SpecialistPublisherWiring.inject_into(self)
|
Add SSO to all controllers.
|
diff --git a/app/controllers/invitations_controller.rb b/app/controllers/invitations_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/invitations_controller.rb
+++ b/app/controllers/invitations_controller.rb
@@ -32,7 +32,7 @@ end
def find_user_invitation
- current_user.invitations.find(params[:id])
+ current_user.pending_invitations.find(params[:id])
end
def find_token_invitation
|
Tweak invitation finding for controller
|
diff --git a/app/controllers/thermostats_controller.rb b/app/controllers/thermostats_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/thermostats_controller.rb
+++ b/app/controllers/thermostats_controller.rb
@@ -12,7 +12,7 @@ private
def thermostat_params
- params.require( :thermostat ).permit( :name, :current_temperature, :target_temperature, :mode, :running )
+ params.require( :thermostat ).permit( :name, :current_temperature, :target_temperature, :mode, :running, :hysteresis )
end
end
|
Add hysteresis to the allowed params.
|
diff --git a/app/serializers/api/product_serializer.rb b/app/serializers/api/product_serializer.rb
index abc1234..def5678 100644
--- a/app/serializers/api/product_serializer.rb
+++ b/app/serializers/api/product_serializer.rb
@@ -18,7 +18,7 @@
# return an unformatted descripton
def description
- strip_tags object.description
+ strip_tags object.description&.strip
end
# return a sanitized html description
|
Remove indent of product description on iPhone
Our HTML formatting plugin for product descriptions adds whitespace to
the beginning of the description text. While that shouldn't be rendered
in HTML, Safari on iPhone was showing a whitespace and therefore moving
the text a bit to the right.
|
diff --git a/app/validators/original_user_validator.rb b/app/validators/original_user_validator.rb
index abc1234..def5678 100644
--- a/app/validators/original_user_validator.rb
+++ b/app/validators/original_user_validator.rb
@@ -7,8 +7,7 @@ def validate(record)
@record = record
- return unless (locations_mismatch? || keys_differ?) &&
- !administrative_account?
+ return unless (locations_mismatch? || keys_differ?) && !administrative_account?
record.errors.add :resource, 'can only be updated by the original user'
end
@@ -22,7 +21,7 @@ end
def keys_differ?
- record.resource_public_key_changed?
+ cleaned_key(record.resource_public_key) != cleaned_key(record.resource_public_key_was)
end
def administrative_account?
@@ -41,4 +40,8 @@ 'digital_signature',
'key_location')
end
+
+ def cleaned_key(key)
+ key.strip.gsub(/\n$/, '')
+ end
end
|
Fix issue when checking original_user for deleting envelopes
|
diff --git a/app/models/gem_typo.rb b/app/models/gem_typo.rb
index abc1234..def5678 100644
--- a/app/models/gem_typo.rb
+++ b/app/models/gem_typo.rb
@@ -2,9 +2,7 @@
class GemTypo
attr_reader :protected_gem
-
- include Gem::Text
-
+
def initialize(rubygem_name)
@rubygem_name = rubygem_name
end
|
Remove unneeded Gem::Text import statement
|
diff --git a/installscripts/cookbooks/aws/recipes/default.rb b/installscripts/cookbooks/aws/recipes/default.rb
index abc1234..def5678 100644
--- a/installscripts/cookbooks/aws/recipes/default.rb
+++ b/installscripts/cookbooks/aws/recipes/default.rb
@@ -12,6 +12,6 @@ end
execute 'installaws' do
- command 'sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/bin/aws'
+ command 'sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws'
cwd '/tmp'
end
|
Revert "Put this in `/usr/bin` because the test box has a weird PATH var"
This reverts commit 5a802ee0a2aa68d172c1aca5b8819de9e6d74d54 [formerly 74bf92c9d52527f5736aad44cbe46606f10f329f].
Former-commit-id: 6bcbb39edca2943be3b7ed62c5606fffdf2def1d
|
diff --git a/features/step_definitions/license-generator_steps.rb b/features/step_definitions/license-generator_steps.rb
index abc1234..def5678 100644
--- a/features/step_definitions/license-generator_steps.rb
+++ b/features/step_definitions/license-generator_steps.rb
@@ -8,7 +8,7 @@ end
Then /^I should see the generic help output$/ do
- assert_partial_output("licgen help [TASK]", all_output)
+ assert_partial_output("licgen help [COMMAND]", all_output)
assert_partial_output("licgen list", all_output)
assert_partial_output("licgen bsd", all_output)
assert_partial_output("licgen mit", all_output)
|
Update get_help feature so that current builds pass
|
diff --git a/core/spec/integration-real/interactors/users/delete_spec.rb b/core/spec/integration-real/interactors/users/delete_spec.rb
index abc1234..def5678 100644
--- a/core/spec/integration-real/interactors/users/delete_spec.rb
+++ b/core/spec/integration-real/interactors/users/delete_spec.rb
@@ -8,7 +8,7 @@ initial_username = user.username
expect(user.deleted).to eq(false)
as(user) do |pavlov|
- described_class.new(user_id: user.id.to_s, pavlov_options: pavlov.pavlov_options).call
+ pavlov.interactor :'users/delete', user_id: user.id.to_s
end
reloaded_user = Pavlov.query(:'users_by_ids', user_ids:[user.id])[0]
expect(reloaded_user.deleted).to eq(true)
|
Use more typical pavlov for integration tests.
|
diff --git a/lib/dissociated_introspection/ruby_class/def.rb b/lib/dissociated_introspection/ruby_class/def.rb
index abc1234..def5678 100644
--- a/lib/dissociated_introspection/ruby_class/def.rb
+++ b/lib/dissociated_introspection/ruby_class/def.rb
@@ -0,0 +1,29 @@+module DissociatedIntrospection
+ class RubyClass
+ class Def
+
+ def initialize(ast:)
+ @ast = ast
+ end
+
+ def name
+ ast.children[0]
+ end
+
+ def arguments
+ Unparser.unparse(ast.children[1])
+ end
+
+ def body
+ Unparser.unparse(ast.children[2])
+ end
+
+ def to_ruby_str
+ Unparser.unparse(ast)
+ end
+
+ private
+ attr_reader :ast
+ end
+ end
+end
|
Add missing files from last commit
|
diff --git a/app/authorities/qa/authorities/find_works.rb b/app/authorities/qa/authorities/find_works.rb
index abc1234..def5678 100644
--- a/app/authorities/qa/authorities/find_works.rb
+++ b/app/authorities/qa/authorities/find_works.rb
@@ -1,10 +1,13 @@ module Qa::Authorities
class FindWorks < Qa::Authorities::Base
+ class_attribute :search_builder_class
+ self.search_builder_class = Hyrax::FindWorksSearchBuilder
+
def search(_q, controller)
# The FindWorksSearchBuilder expects a current_user
return [] unless controller.current_user
repo = CatalogController.new.repository
- builder = Hyrax::FindWorksSearchBuilder.new(controller)
+ builder = search_builder(controller)
response = repo.search(builder)
docs = response.documents
docs.map do |doc|
@@ -13,5 +16,11 @@ { id: id, label: title, value: id }
end
end
+
+ private
+
+ def search_builder(controller)
+ search_builder_class.new(controller)
+ end
end
end
|
Allow the search builder to be injectable
|
diff --git a/test/spec_session_abstract_session_hash.rb b/test/spec_session_abstract_session_hash.rb
index abc1234..def5678 100644
--- a/test/spec_session_abstract_session_hash.rb
+++ b/test/spec_session_abstract_session_hash.rb
@@ -0,0 +1,28 @@+require 'minitest/autorun'
+require 'rack/session/abstract/id'
+
+describe Rack::Session::Abstract::SessionHash do
+ attr_reader :hash
+
+ def setup
+ super
+ store = Class.new do
+ def load_session(req)
+ ["id", {foo: :bar, baz: :qux}]
+ end
+ def session_exists?(req)
+ true
+ end
+ end
+ @hash = Rack::Session::Abstract::SessionHash.new(store.new, nil)
+ end
+
+ it "returns keys" do
+ assert_equal ["foo", "baz"], hash.keys
+ end
+
+ it "returns values" do
+ assert_equal [:bar, :qux], hash.values
+ end
+
+end
|
Add tests for session hash loading
|
diff --git a/lib/metacrunch/job/dsl.rb b/lib/metacrunch/job/dsl.rb
index abc1234..def5678 100644
--- a/lib/metacrunch/job/dsl.rb
+++ b/lib/metacrunch/job/dsl.rb
@@ -29,6 +29,7 @@ end
def dependencies(&gemfile)
+ raise ArgumentError, "Block needed" unless block_given?
BundlerSupport.new(install: @_job.install_dependencies, &gemfile)
exit(0) if @_job.install_dependencies
end
|
Raise ArgumentError if block is missing.
|
diff --git a/POSInputStreamLibrary.podspec b/POSInputStreamLibrary.podspec
index abc1234..def5678 100644
--- a/POSInputStreamLibrary.podspec
+++ b/POSInputStreamLibrary.podspec
@@ -9,5 +9,6 @@ s.platform = :ios, '7.0'
s.requires_arc = true
s.source_files = 'POSInputStreamLibrary/*.{h,m}'
- s.frameworks = 'Foundation', 'AssetsLibrary', 'UIKit', 'ImageIO', 'Photos'
+ s.frameworks = 'Foundation', 'AssetsLibrary', 'UIKit', 'ImageIO'
+ s.weak_framework = 'Photos'
end
|
Move 'Photos' framework from required framework list to optional one.
|
diff --git a/Chapter-4/CoreDataBooks/app/controllers/root_view_controller.rb b/Chapter-4/CoreDataBooks/app/controllers/root_view_controller.rb
index abc1234..def5678 100644
--- a/Chapter-4/CoreDataBooks/app/controllers/root_view_controller.rb
+++ b/Chapter-4/CoreDataBooks/app/controllers/root_view_controller.rb
@@ -1,2 +1,95 @@ class RootViewController < UITableViewController
+ def viewDidLoad
+ super
+
+ # Set up the edit and add buttons
+ self.navigationItem.leftBarButtonItem = self.editButtonItem;
+ # TODO: Add button
+ # TODO: Make navigation bar (and therefore button) visible
+
+ error_ptr = Pointer.new(:object)
+
+ if not self.fetchedResultsController.performFetch(error_ptr)
+ # NOTE: We will need to replace this with proper error handling
+ # code.
+ # abort() causes the application to generate a crash log
+ # and terminate; useful during development but should not
+ # appear in a production application.
+ NSLog("Unresolved error %@, %@", error_ptr, error_ptr.userInfo)
+ abort
+ end
+ end
+
+ def viewWillAppear(animated)
+ super
+
+ self.tableView.reloadData
+ end
+
+ def viewDidUnload
+ @fetched_results_controller = nil
+ end
+
+ # UITableView delegate methods
+
+ def numberOfSectionsInTableView(tableView)
+ self.fetchedResultsController.sections.count
+ end
+
+ # To check how to write delegate/data source methods such as
+ # this one, you can check them here:
+ # http://www.rubymotion.com/developer-center/api/UITableViewDataSource.html
+ def tableView(tableView, numberOfRowsInSection: section)
+ section_info = self.fetchedResultsController.sections.objectAtIndex(section)
+ section_info.numberOfObjects
+ end
+
+ def tableView(tableView, cellForRowAtIndexPath: indexPath)
+ cell = tableView.dequeueReusableCellWithIdentifier("CELL")
+
+ cell ||= UITableViewCell.alloc.initWithStyle(UITableViewCellStyleDefault,
+ reuseIdentifier: "CELL")
+
+ book = self.fetchedResultsController.objectAtIndexPath(indexPath)
+
+ cell.textLabel.text = book.title
+ cell
+ end
+
+ def tableView(tableView, titleForHeaderInSection: section)
+ self.fetchedResultsController.sections.objectAtIndex(section).name
+ end
+
+ # TODO: commitEditingStyle
+
+ # Methods related to NSFetchedResultsController
+
+ protected
+
+ def fetchedResultsController
+ if not @fetched_results_controller.nil?
+ return @fetched_results_controller
+ end
+
+ fetch_request = NSFetchRequest.alloc.init
+ fetch_request.setEntity(Book.entity_description)
+
+ author_sort_descriptor = NSSortDescriptor.alloc.initWithKey("author",
+ ascending: true)
+ title_sort_descriptor = NSSortDescriptor.alloc.initWithKey("title",
+ ascending: true)
+
+ fetch_request.setSortDescriptors([ author_sort_descriptor,
+ title_sort_descriptor ])
+
+ @fetched_results_controller = NSFetchedResultsController.alloc.initWithFetchRequest(fetch_request,
+ managedObjectContext: cdq.contexts.current,
+ sectionNameKeyPath: "author",
+ cacheName: "Root")
+
+ # TODO: Implement delegate methods
+ # @fetched_results_controller.delegate = self
+
+ @fetched_results_controller
+ end
end
|
Set up table view with NSFetchedResultsController as data source
|
diff --git a/metasm.gemspec b/metasm.gemspec
index abc1234..def5678 100644
--- a/metasm.gemspec
+++ b/metasm.gemspec
@@ -18,5 +18,6 @@
s.add_development_dependency "bundler", "~> 1.7"
s.add_development_dependency "rake"
+ s.add_development_dependency "test-unit"
end
|
Add test-unit dependency to the gemspec
|
diff --git a/vast.gemspec b/vast.gemspec
index abc1234..def5678 100644
--- a/vast.gemspec
+++ b/vast.gemspec
@@ -10,6 +10,7 @@ s.email = ["chrisgdinn@gmail.com"]
s.homepage = "http://github.com/chrisdinn/vast"
s.summary = "A gem for working with VAST 2.0 documents"
+ s.license = "MIT"
s.files = Dir['lib/*.rb'] + Dir['lib/*.xsd'] + Dir['lib/vast/*.rb'] + Dir['test/*.rb'] + Dir['test/examples/*.xml'] + %w(LICENSE README.rdoc)
|
Add license to gemspec, is MIT
Closes #7
|
diff --git a/core/app/helpers/refinery/site_bar_helper.rb b/core/app/helpers/refinery/site_bar_helper.rb
index abc1234..def5678 100644
--- a/core/app/helpers/refinery/site_bar_helper.rb
+++ b/core/app/helpers/refinery/site_bar_helper.rb
@@ -15,7 +15,8 @@ return nil if admin? || @page.nil?
link_to t('refinery.admin.pages.edit', site_bar_translate_locale_args),
refinery.admin_edit_page_path(@page.nested_url,
- :switch_locale => (@page.translations.first.locale unless @page.translated_to_default_locale?))
+ :switch_locale => (@page.translations.first.locale unless @page.translated_to_default_locale?)),
+ 'data-no-turbolink' => true
end
def site_bar_translate_locale_args
|
Disable turbolinks for edit page link
|
diff --git a/lib/reports_kit/reports/filter_types/records.rb b/lib/reports_kit/reports/filter_types/records.rb
index abc1234..def5678 100644
--- a/lib/reports_kit/reports/filter_types/records.rb
+++ b/lib/reports_kit/reports/filter_types/records.rb
@@ -2,7 +2,9 @@ module Reports
module FilterTypes
class Records < Base
- DEFAULT_CRITERIA = {}
+ DEFAULT_CRITERIA = {
+ operator: 'include'
+ }
def apply_conditions(records)
case criteria[:operator]
|
Set default criteria for FilterTypes::Records
|
diff --git a/lib/typeset/small_caps.rb b/lib/typeset/small_caps.rb
index abc1234..def5678 100644
--- a/lib/typeset/small_caps.rb
+++ b/lib/typeset/small_caps.rb
@@ -1,18 +1,4 @@ module Typeset
- # Holds convenience methods for acronym detection
- module SmallCaps
- def self.remove_cruft(word)
- trailing = ""
- leading = ""
-
- if word =~ /([A-Z][A-Z][A-Z]+)/
- leading,word,trailing = word.split($1)
- end
-
- return [leading, word, trailing]
- end
- end
-
# Identify likely acronyms, and wrap them in a 'small-caps' span.
def self.small_caps(text, options)
words = text.split(" ")
|
Remove unneeded small caps module
|
diff --git a/lib/webrobots/nokogiri.rb b/lib/webrobots/nokogiri.rb
index abc1234..def5678 100644
--- a/lib/webrobots/nokogiri.rb
+++ b/lib/webrobots/nokogiri.rb
@@ -24,8 +24,8 @@
def parse_meta_robots(custom_name)
pattern = /\A#{Regexp.quote(custom_name)}\z/i
- meta = css('meta[@name]').find { |meta|
- meta['name'].match(pattern)
+ meta = css('meta[@name]').find { |element|
+ element['name'].match(pattern)
} and content = meta['content'] or return []
content.downcase.split(/[,\s]+/)
end
|
Fix shadowing outer variable warning
|
diff --git a/lib/ymdp/tasks/build.rake b/lib/ymdp/tasks/build.rake
index abc1234..def5678 100644
--- a/lib/ymdp/tasks/build.rake
+++ b/lib/ymdp/tasks/build.rake
@@ -1,4 +1,4 @@-require 'lib/init'
+require 'ymdp'
@server_names = []
@@ -17,16 +17,20 @@ @message
end
+desc "Compile the application to the #{CONFIG['default_server']} server"
task :b => :build
-
+
+desc "Compile the application to the #{CONFIG['default_server']} server"
task :build do
system "#{BASE_PATH}/script/build -m \"#{message}\" -d #{CONFIG['default_server']}"
end
namespace :build do
+ desc "Compile the application to all servers"
task :all => @server_names
@server_names.each do |name|
+ desc "Compile the application to the #{name} server"
task name.to_sym do
system "#{BASE_PATH}/script/build -m \"#{message}\" -d #{name}"
end
|
Add descriptions to rake tasks
|
diff --git a/db/migrate/20160808090529_create_hrds.rb b/db/migrate/20160808090529_create_hrds.rb
index abc1234..def5678 100644
--- a/db/migrate/20160808090529_create_hrds.rb
+++ b/db/migrate/20160808090529_create_hrds.rb
@@ -13,6 +13,5 @@ t.timestamps
end
- add_index :hrds, [:year, :season_id], :unique => true
end
end
|
Remove uniquness requirement on HRDs b/c it's incompatible with Paranoid
|
diff --git a/lib/two_factor_authentication/controllers/helpers.rb b/lib/two_factor_authentication/controllers/helpers.rb
index abc1234..def5678 100644
--- a/lib/two_factor_authentication/controllers/helpers.rb
+++ b/lib/two_factor_authentication/controllers/helpers.rb
@@ -24,7 +24,7 @@ session["#{scope}_return_to"] = request.original_fullpath if request.get?
redirect_to two_factor_authentication_path_for(scope)
else
- render nothing: true, status: :unauthorized
+ head :unauthorized
end
end
|
Use head instead of render nothing: true
|
diff --git a/lib/generators/superb_text_constructor/install_generator.rb b/lib/generators/superb_text_constructor/install_generator.rb
index abc1234..def5678 100644
--- a/lib/generators/superb_text_constructor/install_generator.rb
+++ b/lib/generators/superb_text_constructor/install_generator.rb
@@ -2,6 +2,10 @@ module Generators
# Generator that installs all the parts of gem
class InstallGenerator < ::Rails::Generators::Base
+
+ def generate_config
+ generate 'superb_text_constructor:config'
+ end
def generate_migrations
generate 'superb_text_constructor:migrations'
@@ -15,10 +19,6 @@ generate 'superb_text_constructor:initializer'
end
- def generate_config
- generate 'superb_text_constructor:config'
- end
-
end
end
end
|
Install generator actions order fixed
|
diff --git a/lib/naught/null_class_builder/commands/predicates_return.rb b/lib/naught/null_class_builder/commands/predicates_return.rb
index abc1234..def5678 100644
--- a/lib/naught/null_class_builder/commands/predicates_return.rb
+++ b/lib/naught/null_class_builder/commands/predicates_return.rb
@@ -19,8 +19,7 @@ private
def define_method_missing(subject)
- return_value = @predicate_return_value
- subject.module_eval do
+ subject.module_exec(@predicate_return_value) do |return_value|
if subject.method_defined?(:method_missing)
original_method_missing = instance_method(:method_missing)
define_method(:method_missing) do
@@ -36,8 +35,7 @@ end
def define_predicate_methods(subject)
- return_value = @predicate_return_value
- subject.module_eval do
+ subject.module_exec(@predicate_return_value) do |return_value|
instance_methods.each do |method_name|
if method_name.to_s.end_with?('?')
define_method(method_name) do |*|
|
Update other instances of module_eval to module_exec if it needed parameters
|
diff --git a/lib/travis/build/appliances/fix_container_based_trusty.rb b/lib/travis/build/appliances/fix_container_based_trusty.rb
index abc1234..def5678 100644
--- a/lib/travis/build/appliances/fix_container_based_trusty.rb
+++ b/lib/travis/build/appliances/fix_container_based_trusty.rb
@@ -6,19 +6,16 @@ module Build
module Appliances
class FixContainerBasedTrusty < Base
- REDIS_INIT = '/etc/init.d/redis-server'
- private_constant :REDIS_INIT
-
def apply
sh.if sh_is_linux? do
sh.if sh_is_trusty? do
- patch_redis_init
+ # NOTE: no fixes currently needed :tada:
end
end
end
def apply?
- true
+ false
end
private
@@ -30,15 +27,6 @@ def sh_is_trusty?
'$(lsb_release -sc 2>/dev/null) = trusty'
end
-
- def patch_redis_init
- sh.if "-f #{REDIS_INIT}" do
- sh.echo 'Patching redis-server init script', ansi: :yellow
- sh.raw(
- %(sudo sed -i '/ulimit -n/s/ulimit.*/: no ulimit/g' #{REDIS_INIT})
- )
- end
- end
end
end
end
|
Remove redis server patch for container-based trusty
as it is no longer needed.
|
diff --git a/darcyWeb/app/controllers/admin_controller.rb b/darcyWeb/app/controllers/admin_controller.rb
index abc1234..def5678 100644
--- a/darcyWeb/app/controllers/admin_controller.rb
+++ b/darcyWeb/app/controllers/admin_controller.rb
@@ -1,6 +1,12 @@ class AdminController < ApplicationController
+ before_action :authenticate_admin!
layout 'admin'
# TODO:30 add devise auth verification in order to prevent normal users to have access
def index
end
+
+ private
+ def authenticate_admin
+ admin_signed_in?
+ end
end
|
Check if admin is authenticated.
|
diff --git a/vendor/gobierto_engines/custom-fields-progress-plugin/lib/custom_fields_progress_plugin/railtie.rb b/vendor/gobierto_engines/custom-fields-progress-plugin/lib/custom_fields_progress_plugin/railtie.rb
index abc1234..def5678 100644
--- a/vendor/gobierto_engines/custom-fields-progress-plugin/lib/custom_fields_progress_plugin/railtie.rb
+++ b/vendor/gobierto_engines/custom-fields-progress-plugin/lib/custom_fields_progress_plugin/railtie.rb
@@ -27,7 +27,7 @@ load task
end
end
- Webpacker::Compiler.watched_paths << "app/javascript/plugin/**/*.js"
+ Webpacker::Compiler.watched_paths << "app/javascript/custom_fields_progress_plugin/**/*.js"
Webpacker::Compiler.watched_paths << "app/javascript/packs/*.js"
end
end
|
Fix plugin webpack watched paths
|
diff --git a/libraries/instance_tar.rb b/libraries/instance_tar.rb
index abc1234..def5678 100644
--- a/libraries/instance_tar.rb
+++ b/libraries/instance_tar.rb
@@ -3,41 +3,42 @@ # Extract Java to destination directory
require 'chef/resource/directory'
+require_relative 'tar_helper'
module ChefJava
module Instance
class Tar
- def initialize(path, options, action)
- @path = path
+ def initialize(options)
@options = options
- @action = action
end
def install
+ extract_tar
end
def remove
+ remove_extracted_tar
end
private
- # TODO: Memoize this.
- def manage_directory
- dir = Chef::Directory.new(@path)
- dir.owner 'root'
- dir.group 'root'
- dir.mode 00755
- dir.run_action(:create)
+ def archive
+ @options[:source]
+ end
+
+ def destination
+ @options[:destination]
end
#
- def tar
+ def extract_tar
+ ChefJava::Helpers::Tar.new(archive, destination)
end
- def decompress
+ def remove_extracted_tar
+ FileUtils.rm_rf(destination)
end
-
end
end
end
|
Make our instance helper to dealing with tar files use our tar_helper. Remove the extracted mess if requested.
|
diff --git a/jsonapi-matchers.gemspec b/jsonapi-matchers.gemspec
index abc1234..def5678 100644
--- a/jsonapi-matchers.gemspec
+++ b/jsonapi-matchers.gemspec
@@ -22,7 +22,7 @@ spec.add_dependency "awesome_print"
spec.add_development_dependency "bump", "~> 0.9.0"
- spec.add_development_dependency "bundler", "~> 1.12"
+ spec.add_development_dependency "bundler", "~> 2.1.4"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_development_dependency "pry"
|
Upgrade to bundler v2.1.4 so that Github Actions will work.
|
diff --git a/rails_sortable.gemspec b/rails_sortable.gemspec
index abc1234..def5678 100644
--- a/rails_sortable.gemspec
+++ b/rails_sortable.gemspec
@@ -23,6 +23,6 @@ s.add_development_dependency "jquery-ui-rails", "~> 6.0"
s.add_development_dependency "sqlite3", "~> 1.3"
s.add_development_dependency "rspec-rails", "~> 3.5"
- s.add_development_dependency "pry-rails", "0.3.5"
- s.add_development_dependency "pry-byebug", "1.3.2"
+ s.add_development_dependency "pry-rails"
+ s.add_development_dependency "pry-byebug"
end
|
Remove specific version from pry
|
diff --git a/rakelib/configure.rake b/rakelib/configure.rake
index abc1234..def5678 100644
--- a/rakelib/configure.rake
+++ b/rakelib/configure.rake
@@ -1,5 +1,6 @@ namespace :configure do
task :"3rdparty" do
+ FileUtils.mkdir_p "vendor"
system "make -C vendor -f ../Sourcefile"
end
|
Make sure vendor dir exists.
|
diff --git a/TDNotificationPanel.podspec b/TDNotificationPanel.podspec
index abc1234..def5678 100644
--- a/TDNotificationPanel.podspec
+++ b/TDNotificationPanel.podspec
@@ -1,12 +1,12 @@ Pod::Spec.new do |s|
s.name = "TDNotificationPanel"
- s.version = "0.3"
+ s.version = "0.3.1"
s.summary = "TDNotificationPanel is a drop in class that displays a notification panel."
s.homepage = "https://github.com/tomdiggle/TDNotificationPanel"
s.screenshots = "http://www.tomdiggle.com/assets/images/tdnotificationpanel-error.jpg", "http://www.tomdiggle.com/assets/images/tdnotificationpanel-success.jpg", "http://www.tomdiggle.com/assets/images/tdnotificationpanel-message.jpg", "http://www.tomdiggle.com/assets/images/tdnotificationpanel-progressbar.jpg"
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { "Tom Diggle" => "tom@tomdiggle.com" }
- s.source = { :git => "https://github.com/tomdiggle/TDNotificationPanel.git", :tag => "v0.3" }
+ s.source = { :git => "https://github.com/tomdiggle/TDNotificationPanel.git", :tag => "0.3.1" }
s.requires_arc = true
s.platform = :ios, '6.0'
s.ios.frameworks = 'CoreGraphics'
|
Fix bug in s.source version number
|
diff --git a/test/factories/projects_factory.rb b/test/factories/projects_factory.rb
index abc1234..def5678 100644
--- a/test/factories/projects_factory.rb
+++ b/test/factories/projects_factory.rb
@@ -5,7 +5,8 @@ user
after(:create) do |project|
- create_list(:tutorial_enrolment, 3, project: project)
+ tutorial = FactoryGirl.create(:tutorial, campus: project.campus)
+ create_list(:tutorial_enrolment, 1, project: project, tutorial: tutorial)
end
end
end
|
FIX: Create 1 enrolment to avoid duplicate error
|
diff --git a/lib/action_view/bruce/bruce-yaml-output.rb b/lib/action_view/bruce/bruce-yaml-output.rb
index abc1234..def5678 100644
--- a/lib/action_view/bruce/bruce-yaml-output.rb
+++ b/lib/action_view/bruce/bruce-yaml-output.rb
@@ -3,10 +3,12 @@ module Bruce
module ::ActionView
class Config
+ CONFIG_FILE = './config/bruce-output.yaml'
attr_reader :percent
def load
- @percent = 20
+ config = Construct.load File.read(CONFIG_FILE)
+ @percent = config[:percentage]
end
def save
@@ -15,7 +17,7 @@ config.percentage = 80
# Produce output.yaml file
- File.open('./config/bruce-output.yaml', 'w') do |file|
+ File.open(CONFIG_FILE, 'w') do |file|
file.puts config.to_yaml
end
end
|
Read the percentage from the config file.
|
diff --git a/lib/aquatone/collectors/wayback_machine.rb b/lib/aquatone/collectors/wayback_machine.rb
index abc1234..def5678 100644
--- a/lib/aquatone/collectors/wayback_machine.rb
+++ b/lib/aquatone/collectors/wayback_machine.rb
@@ -21,7 +21,9 @@ end
response.parsed_response.each do |page|
if page[0] != "original"
+ begin
add_host(URI.parse(page[0]).host)
+ rescue URI::Error; end
end
end
end
|
Handle possible invalid URIs in Wayback Machine collector
|
diff --git a/lib/linux_admin/service/systemd_service.rb b/lib/linux_admin/service/systemd_service.rb
index abc1234..def5678 100644
--- a/lib/linux_admin/service/systemd_service.rb
+++ b/lib/linux_admin/service/systemd_service.rb
@@ -1,37 +1,37 @@ module LinuxAdmin
class SystemdService < Service
def running?
- Common.run(Common.cmd(:systemctl),
+ Common.run(command_path,
:params => {nil => ["status", name]}).exit_status == 0
end
def enable
- Common.run!(Common.cmd(:systemctl),
+ Common.run!(command_path,
:params => {nil => ["enable", name]})
self
end
def disable
- Common.run!(Common.cmd(:systemctl),
+ Common.run!(command_path,
:params => {nil => ["disable", name]})
self
end
def start
- Common.run!(Common.cmd(:systemctl),
+ Common.run!(command_path,
:params => {nil => ["start", name]})
self
end
def stop
- Common.run!(Common.cmd(:systemctl),
+ Common.run!(command_path,
:params => {nil => ["stop", name]})
self
end
def restart
status =
- Common.run(Common.cmd(:systemctl),
+ Common.run(command_path,
:params => {nil => ["restart", name]}).exit_status
# attempt to manually stop/start if restart fails
@@ -44,12 +44,18 @@ end
def reload
- Common.run!(Common.cmd(:systemctl), :params => ["reload", name])
+ Common.run!(command_path, :params => ["reload", name])
self
end
def status
- Common.run(Common.cmd(:systemctl), :params => ["status", name]).output
+ Common.run(command_path, :params => ["status", name]).output
+ end
+
+ private
+
+ def command_path
+ Common.cmd(:systemctl)
end
end
end
|
Move Common.cmd(:systemctl) calls to a private method
|
diff --git a/lib/scss_lint/linter/space_before_brace.rb b/lib/scss_lint/linter/space_before_brace.rb
index abc1234..def5678 100644
--- a/lib/scss_lint/linter/space_before_brace.rb
+++ b/lib/scss_lint/linter/space_before_brace.rb
@@ -6,13 +6,9 @@ def visit_root(node)
engine.lines.each_with_index do |line, index|
line.scan /[^"#](?<![^ ] )\{/ do |match|
- @lints << Lint.new(engine.filename, index + 1, description)
+ add_lint(index + 1, 'Opening curly braces ({) should be preceded by one space')
end
end
end
-
- def description
- 'Opening curly braces ({) should be preceded by one space'
- end
end
end
|
Remove description method from SpaceBeforeBrace
The `description` method is being deprecated.
While here, also changed from appending to the `@lints` instance
variable directly to using the `add_lint` helper.
Change-Id: If2902858e2cd29c06759294c4d6357690aec6017
Reviewed-on: http://gerrit.causes.com/36725
Tested-by: jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@causes.com>
Reviewed-by: Shane da Silva <6f6e68d1df92f30cb4b3ce35260ddf94a402f33d@causes.com>
|
diff --git a/lib/tasks/fake_location_report_emails.rake b/lib/tasks/fake_location_report_emails.rake
index abc1234..def5678 100644
--- a/lib/tasks/fake_location_report_emails.rake
+++ b/lib/tasks/fake_location_report_emails.rake
@@ -9,7 +9,7 @@ if location.has_attribute?(:report_email)
name=location.report_email.split('@')[0]
location.report_email=name+'@shifts.app'
- if !location.save(false)
+ if !location.save(validate: false)
puts "Location #{location.name} not saved! The error message:"
location.errors.full_messages.each do |message|
puts message
|
Update validation for Rails 3
|
diff --git a/app/models/category.rb b/app/models/category.rb
index abc1234..def5678 100644
--- a/app/models/category.rb
+++ b/app/models/category.rb
@@ -6,7 +6,7 @@ accepts_nested_attributes_for :translations
def self.sorted_categories
- categories_without_sonstige = order('name').where("name <> 'Sonstiges'")
+ categories_without_sonstige = where("name <> 'Sonstiges'").sort_by(&:name)
category_sonstige = where(name: 'Sonstiges')
categories_without_sonstige + category_sonstige
|
Use sort_by instead of order when sorting the categories
The command 'order' did not work in the staging database
(maybe because of different database versions)
so we changed that to the ruby command sort_by
|
diff --git a/app/models/notebook.rb b/app/models/notebook.rb
index abc1234..def5678 100644
--- a/app/models/notebook.rb
+++ b/app/models/notebook.rb
@@ -2,5 +2,5 @@ belongs_to :user
validates :name, presence: true
- validates :name, uniqueness: { scope: :user_id }
+ validates :name, uniqueness: { scope: :user }
end
|
Use association as a uniqueness scope not the actual column name
|
diff --git a/app/models/question.rb b/app/models/question.rb
index abc1234..def5678 100644
--- a/app/models/question.rb
+++ b/app/models/question.rb
@@ -3,7 +3,7 @@ belongs_to :user
has_many :responses, dependent: :destroy
- validates :image_path, presence: true
+ validates :image_path, uniqueness: { scope: :user}, presence: true
validates_format_of :image_path, :with => URI::regexp(%w(http https))
before_save :create_slug
|
Validate To Ensure User Doesn't Add Same Photo
|
diff --git a/config/routes.rb b/config/routes.rb
index abc1234..def5678 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -15,9 +15,16 @@ get "/remove/:number/:item" => "pos#remove"
get "/print/:number" => "pos#print"
get "/inventory/:number" => "pos#inventory"
+
+ scope :refund do
+ get 'select_order' => 'refund#select_order'
+ post 'select_items' => 'refund#select_items'
+ post 'create_refund' => 'refund#create_refund'
+ end
end
+
get "/pos" , :to => "pos#new"
- get "/stock_products", to: "show_stock#index", as: 'pos_show_stock'
+ get "/stock_products", to: "show_stock#index"
end
end
|
Correct error that appears and added refund controller
|
diff --git a/config/routes.rb b/config/routes.rb
index abc1234..def5678 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -7,6 +7,7 @@ end
end
resources :clicks, only: :new
+ resources :places, only: :index
resources :airlines, only: :index
resources :ui_events, only: [] do
collection do
@@ -20,5 +21,4 @@ get '/nearest_cities_prices' => 'minimal_prices#nearest', as: :nearest_cities_prices
match '/latest_prices' => 'minimal_prices#latest_prices', via: [:get, :post]
get '/estimated_search_duration' => 'gate_meta#search_duration', as: :estimated_search_duration
- get '/places(_:locale)(.:format)' => 'places#index', as: :places
end
|
Revert "Consider locales in route of Places"
This reverts commit a0a6592c4dc1fabab4d531f92c1b703b39f89efd.
|
diff --git a/dash/app/controllers/spree/admin/overview_controller.rb b/dash/app/controllers/spree/admin/overview_controller.rb
index abc1234..def5678 100644
--- a/dash/app/controllers/spree/admin/overview_controller.rb
+++ b/dash/app/controllers/spree/admin/overview_controller.rb
@@ -18,7 +18,7 @@ private
def check_last_jirafe_sync_time
- if Spree::Dash.configured?
+ if Spree::Dash::Config.configured?
if session[:last_jirafe_sync]
hours_since_last_sync = ((DateTime.now - session[:last_jirafe_sync]) * 24).to_i
redirect_to admin_analytics_sync_path if hours_since_last_sync > 24
|
Correct call to Spree::Dash::Config.configured? within Admin::OverviewController
|
diff --git a/lib/ch02/generate_all.rb b/lib/ch02/generate_all.rb
index abc1234..def5678 100644
--- a/lib/ch02/generate_all.rb
+++ b/lib/ch02/generate_all.rb
@@ -0,0 +1,21 @@+require 'rule_based'
+
+def generate_all(phrase)
+ case phrase
+ when []
+ [[]]
+ when Array
+ combine_all(generate_all(phrase[0]),
+ generate_all(phrase[1..-1]))
+ when Symbol
+ rewrites(phrase).inject([]) { |sum, elt| sum + generate_all(elt) }
+ else
+ [[phrase]]
+ end
+end
+
+def combine_all(xlist, ylist)
+ ylist.inject([]) do |sum, y|
+ sum + xlist.map { |x| x+y }
+ end
+end
|
Make it possible to generate every variation of sentence structure
|
diff --git a/lib/easy_type/mungers.rb b/lib/easy_type/mungers.rb
index abc1234..def5678 100644
--- a/lib/easy_type/mungers.rb
+++ b/lib/easy_type/mungers.rb
@@ -17,6 +17,7 @@ case size
when /^\d+(K|k)$/ then size.chop.to_i * 1024
when /^\d+(M|m)$/ then size.chop.to_i * 1024 * 1024
+ when /^\d+(G|g)$/ then size.chop.to_i * 1024 * 1024 * 1024
when /^\d+$/ then size.to_i
else
fail("invalid size")
|
Add support for G in size munger
|
diff --git a/lib/game_of_life/grid.rb b/lib/game_of_life/grid.rb
index abc1234..def5678 100644
--- a/lib/game_of_life/grid.rb
+++ b/lib/game_of_life/grid.rb
@@ -7,14 +7,7 @@ x_min, x_max = [row - 1, 0].max, [row + 1, column_size - 1].min
y_min, y_max = [column - 1, 0].max, [column + 1, row_size - 1 ].min
- result = []
- (x_min..x_max).each do |x|
- (y_min..y_max).each do |y|
- result << self[x, y] unless x == row && y == column
- end
- end
-
- result
+ minor(x_min..x_max, y_min..y_max).to_a.flatten - [self[row, column]]
end
def to_s
@@ -23,4 +16,4 @@ }
end
end
-end+end
|
Refactor to use built-in matrix operations
|
diff --git a/lib/glimpse/views/git.rb b/lib/glimpse/views/git.rb
index abc1234..def5678 100644
--- a/lib/glimpse/views/git.rb
+++ b/lib/glimpse/views/git.rb
@@ -4,6 +4,7 @@ def initialize(options = {})
@sha = options.delete(:sha)
@nwo = options.delete(:nwo)
+ @default_branch = options.fetch(:default_branch, 'master')
end
# Fetch the current Git sha if one isn't present.
@@ -12,7 +13,7 @@ end
def compare_url
- "https://github.com/#{@nwo}/compare/master...#{sha}"
+ "https://github.com/#{@nwo}/compare/#{@default_branch}...#{sha}"
end
end
end
|
Allow you to customize the default branch to compare against
|
diff --git a/poteti.gemspec b/poteti.gemspec
index abc1234..def5678 100644
--- a/poteti.gemspec
+++ b/poteti.gemspec
@@ -16,7 +16,7 @@
s.files = Dir['{app,config,db,lib}/**/*', 'MIT-LICENSE', 'Rakefile', 'README.md']
- s.add_dependency 'rails', '~> 4.1.4'
+ s.add_dependency 'rails', '>= 4.0.0'
s.add_dependency 'slim'
s.add_dependency 'devise'
|
Fix to work bundle install on Travis-CI
|
diff --git a/lib/mongoid_userstamp.rb b/lib/mongoid_userstamp.rb
index abc1234..def5678 100644
--- a/lib/mongoid_userstamp.rb
+++ b/lib/mongoid_userstamp.rb
@@ -7,4 +7,4 @@ require 'mongoid/userstamp/config/user_config'
require 'mongoid/userstamp/mixins/user'
require 'mongoid/userstamp/mixins/model'
-require 'mongoid/userstamp/railtie' if defined? Rails
+require 'mongoid/userstamp/railtie' if defined? Rails::Railtie
|
Check for Rails::Railtie instead of Rails
|
diff --git a/lib/rails_ops/railtie.rb b/lib/rails_ops/railtie.rb
index abc1234..def5678 100644
--- a/lib/rails_ops/railtie.rb
+++ b/lib/rails_ops/railtie.rb
@@ -18,7 +18,9 @@ # ---------------------------------------------------------------
# Include controller mixin
# ---------------------------------------------------------------
- ActionController::Base.send :include, RailsOps::ControllerMixin
+ ActiveSupport.on_load :action_controller_base do
+ include RailsOps::ControllerMixin
+ end
end
end
end
|
Fix eager loading decrepation warning
This commit changes the inclusion of the ControllerMixin to be loaded after ActionController::Base is loaded.
|
diff --git a/lib/rest_spy/encoding.rb b/lib/rest_spy/encoding.rb
index abc1234..def5678 100644
--- a/lib/rest_spy/encoding.rb
+++ b/lib/rest_spy/encoding.rb
@@ -35,7 +35,7 @@ end
def ungzip(input)
- Zlib::GzipReader.new(StringIO.new(input), :encoding => 'ASCII-8BIT').read
+ Zlib::GzipReader.new(StringIO.new(input), :encoding => 'UTF-8').read
end
def inflate(input)
@@ -46,4 +46,4 @@ Zlib::Deflate.deflate(input)
end
end
-end+end
|
Use UTF-8 as default when decoding gzip
|
diff --git a/lib/string_calculator.rb b/lib/string_calculator.rb
index abc1234..def5678 100644
--- a/lib/string_calculator.rb
+++ b/lib/string_calculator.rb
@@ -1,18 +1,32 @@ class StringCalculator
+ DELIMITER_REGEXP = /\A\/\/(.+|\n)$/
+
def add(pattern="")
- sum(extract_numbers(pattern))
+ sum(extract_numbers(pattern, delimiter(pattern)))
end
private
- def extract_numbers(pattern)
- pattern.split(allowed_delimiters).compact.map(&:to_i) << 0
+ def extract_numbers(pattern, delimiter)
+ pattern
+ .gsub(DELIMITER_REGEXP,'')
+ .split(delimiter)
+ .compact
+ .map(&:to_i)
+ end
+
+ def delimiter(pattern)
+ if DELIMITER_REGEXP =~ pattern
+ $1
+ else
+ default_delimiter
+ end
end
def sum(numbers)
- numbers.reduce(:+)
+ numbers.reduce(0, :+)
end
- def allowed_delimiters
+ def default_delimiter
%r{,|\n}
end
end
|
Allow to handle custom delimiters
|
diff --git a/lib/tango/step_runner.rb b/lib/tango/step_runner.rb
index abc1234..def5678 100644
--- a/lib/tango/step_runner.rb
+++ b/lib/tango/step_runner.rb
@@ -23,5 +23,17 @@ @dance.run(step_name, *args)
end
+ def as(username)
+ info = Etc.getpwent(username)
+ uid, gid = Process.euid, Process.egid
+ Process::Sys.seteuid(0) if uid != 0
+ Process::Sys.setegid(info.gid)
+ Process::Sys.seteuid(info.uid)
+ yield
+ ensure
+ Process::Sys.seteuid(uid)
+ Process::Sys.setegid(gid)
+ end
+
end
end
|
Add as(user) method to the step runner.
|
diff --git a/substation.gemspec b/substation.gemspec
index abc1234..def5678 100644
--- a/substation.gemspec
+++ b/substation.gemspec
@@ -22,6 +22,5 @@ gem.add_dependency 'abstract_type', '~> 0.0.5'
gem.add_dependency 'inflecto', '~> 0.0.2'
- gem.add_development_dependency 'rake', '~> 10.0.3'
- gem.add_development_dependency 'rspec', '~> 2.13.0'
+ gem.add_development_dependency 'bundler', '~> 1.3.4'
end
|
Use bundler as the only development dependency
|
diff --git a/Casks/arq3.rb b/Casks/arq3.rb
index abc1234..def5678 100644
--- a/Casks/arq3.rb
+++ b/Casks/arq3.rb
@@ -3,8 +3,9 @@ sha256 '2b4317b83d14090764f2134d4cc0fa3ee18b102974cff935f47a8afb4b3860a2'
url "http://www.haystacksoftware.com/arq/Arq_#{version}.zip"
+ name 'Arq'
homepage 'http://www.haystacksoftware.com/arq/'
- license :unknown
+ license :commercial
app 'Arq.app'
end
|
Arq3: Fix license, add name stanza
|
diff --git a/Casks/atom.rb b/Casks/atom.rb
index abc1234..def5678 100644
--- a/Casks/atom.rb
+++ b/Casks/atom.rb
@@ -1,6 +1,6 @@ cask :v1 => 'atom' do
- version '1.0.10'
- sha256 'afa74f10054c9bea5eb5d43f792a211449d26f56ec9aeabf0fd1dcf3ac7149db'
+ version '1.0.11'
+ sha256 '0a173f06626c22f2cbb9a9cbba0f15a4e7cb34fed2261fc16792b3cc0548dd52'
# github.com is the official download host per the vendor homepage
url "https://github.com/atom/atom/releases/download/v#{version}/atom-mac.zip"
|
Upgrade Atom to version 1.0.11.
|
diff --git a/Casks/onyx.rb b/Casks/onyx.rb
index abc1234..def5678 100644
--- a/Casks/onyx.rb
+++ b/Casks/onyx.rb
@@ -2,16 +2,20 @@ version :latest
sha256 :no_check
- if MacOS.version == :snow_leopard
+ if MacOS.version == :tiger
+ url 'http://www.titanium.free.fr/download/104/OnyX.dmg'
+ elsif MacOS.version == :leopard
+ url 'http://www.titanium.free.fr/download/105/OnyX.dmg'
+ elsif MacOS.version == :snow_leopard
url 'http://www.titanium.free.fr/download/106/OnyX.dmg'
elsif MacOS.version == :lion
url 'http://www.titanium.free.fr/download/107/OnyX.dmg'
elsif MacOS.version == :mountain_lion
- url 'http://joel.barriere.pagesperso-orange.fr/dl/108/OnyX.dmg'
+ url 'http://www.titanium.free.fr/download/108/OnyX.dmg'
elsif MacOS.version == :mavericks
- url 'http://joel.barriere.pagesperso-orange.fr/dl/109/OnyX.dmg'
+ url 'http://www.titanium.free.fr/download/109/OnyX.dmg'
else
- url 'http://joel.barriere.pagesperso-orange.fr/dl/1010/OnyX.dmg'
+ url 'http://www.titanium.free.fr/download/1010/OnyX.dmg'
end
homepage 'http://www.titanium.free.fr/downloadonyx.php'
license :unknown
|
Fix download links for Onyx on Mountain Lion, Mavericks, and Yosemite; Add tests and links for Onyx under Tiger and Leopard
|
diff --git a/cropster.gemspec b/cropster.gemspec
index abc1234..def5678 100644
--- a/cropster.gemspec
+++ b/cropster.gemspec
@@ -18,6 +18,9 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]
+ spec.add_runtime_dependency "typhoeus"
+
+ spec.add_development_dependency "typhoeus", "~> 1.0"
spec.add_development_dependency "bundler", "~> 1.6"
spec.add_development_dependency "rake"
spec.add_development_dependency "rspec"
|
Add typhoeus as a dependency
|
diff --git a/Gloss.podspec b/Gloss.podspec
index abc1234..def5678 100644
--- a/Gloss.podspec
+++ b/Gloss.podspec
@@ -8,7 +8,7 @@ s.author = { "Harlan Kellaway" => "hello@harlankellaway.com" }
s.source = { :git => "https://github.com/hkellaway/Gloss.git", :tag => s.version.to_s }
- s.platform = :ios, "8.0"
+ s.platforms = { :ios => "8.0", :tvos => "9.0" }
s.requires_arc = true
s.source_files = 'Source/*.{swift}'
|
Add tvos platform to podspec
|
diff --git a/files/gitlab-ctl-commands/deploy_page.rb b/files/gitlab-ctl-commands/deploy_page.rb
index abc1234..def5678 100644
--- a/files/gitlab-ctl-commands/deploy_page.rb
+++ b/files/gitlab-ctl-commands/deploy_page.rb
@@ -0,0 +1,31 @@+#
+# Copyright:: Copyright (c) 2014 GitLab B.V.
+# License:: Apache License, Version 2.0
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+add_command 'deploy-page', 'Put up the deploy page', 2 do |cmd_name, state|
+ require 'fileutils'
+ deploy = File.join(base_path, 'embedded/service/gitlab-rails/public/deploy.html')
+ index = deploy.sub('deploy', 'index')
+
+ case state
+ when 'up'
+ FileUtils.cp(deploy, index, verbose: true)
+ when 'down'
+ FileUtils.rm_f(index, verbose: true)
+ else
+ puts "Usage: #{cmd_name} up|down"
+ end
+end
|
Add a 'gitlab-ctl deploy-page' command
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.