diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/app/models/player.rb b/app/models/player.rb index abc1234..def5678 100644 --- a/app/models/player.rb +++ b/app/models/player.rb @@ -3,9 +3,9 @@ mount_uploader :avatar, AvatarUploader unless Rails.env.test? + belongs_to :member has_one :address, through: :member has_one :contact, through: :member - belongs_to :member has_many :attendances, dependent: :destroy has_and_belongs_to_many :teams
Fix has many through relation
diff --git a/basmoura.gemspec b/basmoura.gemspec index abc1234..def5678 100644 --- a/basmoura.gemspec +++ b/basmoura.gemspec @@ -24,5 +24,5 @@ spec.add_development_dependency "bundler", "~> 1.5" spec.post_install_message = "This is a simple gem to show my professional informations."\ - "Type basmoura to see it" + " Type basmoura -s to see it" end
Fix command information in gemspec
diff --git a/lib/context/shared_behavior.rb b/lib/context/shared_behavior.rb index abc1234..def5678 100644 --- a/lib/context/shared_behavior.rb +++ b/lib/context/shared_behavior.rb @@ -2,20 +2,17 @@ class SharedBehavior < Module def self.create_from_behavior(beh) mod = self.new - mod.behavior = beh + mod._behavior = beh + mod end - def behavior=(beh) - @behavior = beh - end - - def behavior - @behavior + def _behavior=(beh) + @_behavior = beh end def included(arg) - @behavior.call + @_behavior.call end end end
Hide shared behavior a little better. Name clashes ftl.
diff --git a/catarse_stripe.gemspec b/catarse_stripe.gemspec index abc1234..def5678 100644 --- a/catarse_stripe.gemspec +++ b/catarse_stripe.gemspec @@ -20,7 +20,7 @@ s.add_dependency "activemerchant", ">= 1.17.0" s.add_dependency "stripe", :git => 'https://github.com/stripe/stripe-ruby' s.add_dependency "omniauth-stripe-connect" - #s.add_dependency "stripe_event" + s.add_dependency "stripe_event" s.add_development_dependency "rspec-rails" s.add_development_dependency "factory_girl_rails"
Fix new dependencies and Migrations
diff --git a/config/deploy.rb b/config/deploy.rb index abc1234..def5678 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -7,6 +7,10 @@ role :db, "your primary db-server here", :primary => true # This is where Rails migrations will run role :db, "your slave db-server here" +# Sync directories +set :sync_directories, ['dir', 'another-dir'] +set :sync_backups, 3 + # Configuration set :scm, :git ssh_options[:forward_agent] = true
Add sync directories as example.
diff --git a/lib/geocoder/results/yandex.rb b/lib/geocoder/results/yandex.rb index abc1234..def5678 100644 --- a/lib/geocoder/results/yandex.rb +++ b/lib/geocoder/results/yandex.rb @@ -57,6 +57,10 @@ address_details['Locality']['Premise']['PremiseName'] end + def precision + @data['GeoObject']['metaDataProperty']['GeocoderMetaData']['precision'] + end + private # ---------------------------------------------------------------- def address_details
Add precision method to Geocoder::Result::Yandex.
diff --git a/db/migrate/20161019130218_add_style_to_widgets.rb b/db/migrate/20161019130218_add_style_to_widgets.rb index abc1234..def5678 100644 --- a/db/migrate/20161019130218_add_style_to_widgets.rb +++ b/db/migrate/20161019130218_add_style_to_widgets.rb @@ -1,7 +1,16 @@-Sequel.migration do - change do +require 'carto/db/migration_helper' + +include Carto::Db::MigrationHelper + +migration( + Proc.new do alter_table :widgets do add_column :style, :json, null: false, default: '{}' end + end, + Proc.new do + alter_table :widgets do + drop_column :style + end end -end +)
Rewrite widgets style migration to use new helper
diff --git a/lib/capistrano/cowboy.rb b/lib/capistrano/cowboy.rb index abc1234..def5678 100644 --- a/lib/capistrano/cowboy.rb +++ b/lib/capistrano/cowboy.rb @@ -17,6 +17,9 @@ desc 'Deploy without SCM' task :default do before 'deploy:update_code', 'cowboy:configure' + + # workaround to ensure cowboy comes into play before gitflow + before 'gitflow:calculate_tag', 'cowboy:configure' end end end
Add hook to make sure scm gets set before capistrano-gitflow takes over.
diff --git a/CHStringAdditions.podspec b/CHStringAdditions.podspec index abc1234..def5678 100644 --- a/CHStringAdditions.podspec +++ b/CHStringAdditions.podspec @@ -3,10 +3,10 @@ s.version = '1.0.0' s.license = 'MIT' s.summary = 'Convenience methods on NSString' - s.homepage = 'https://github.com/chaione/CHStringAdditions' + s.homepage = 'http://gitlab.chaione.com/chaikit/chstringadditions' s.authors = { 'Terry Lewis' => 'terry@ploverproductions.com' } - s.source = { :git => 'https://github.com/chaione/CHStringAdditions.git', :tag => 'v1.0.0' } + s.source = { :git => 'http://gitlab.chaione.com/chaikit/chstringadditions.git', :tag => 'v1.0.0' } s.description = 'A number of functions that make working with NSString\'s easier, such as isValidEmail and asWords.' s.platform = :ios, '6.0'
Update podspec to point to gitlab
diff --git a/lib/rails/templates/alchemy.rb b/lib/rails/templates/alchemy.rb index abc1234..def5678 100644 --- a/lib/rails/templates/alchemy.rb +++ b/lib/rails/templates/alchemy.rb @@ -1,6 +1,7 @@ # This rails template installs Alchemy and all depending gems. -require File.expand_path('../../../alchemy/version', __FILE__) +require File.expand_path("../../../alchemy/version", __FILE__) -gem 'alchemy_cms', "#{Alchemy::VERSION}" -gem 'alchemy-devise', '>= 2.1.0.beta3' -gem 'capistrano', '~> 2.15.5', group: 'development' +gem "alchemy_cms", github: "AlchemyCMS/alchemy_cms", branch: "master" +gem "alchemy-devise", github: "AlchemyCMS/alchemy-devise", branch: "master" + +gem "capistrano", "~> 2.15.5", group: "development"
Fix branches for Alchemy Rails template.
diff --git a/lib/halogen/hash_util.rb b/lib/halogen/hash_util.rb index abc1234..def5678 100644 --- a/lib/halogen/hash_util.rb +++ b/lib/halogen/hash_util.rb @@ -9,7 +9,7 @@ # @return [Hash] # def stringify_keys!(hash) - transform_keys!(hash, &:to_s) + hash.transform_keys!(&:to_s) end # Transform hash keys into symbols if necessary @@ -19,19 +19,7 @@ # @return [Hash] # def symbolize_keys!(hash) - transform_keys!(hash, &:to_sym) - end - - # Transform hash keys according to block - # - # @param hash [Hash] - # - # @return [Hash] - # - def transform_keys!(hash) - hash.keys.each { |key| hash[yield(key)] = hash.delete(key) } - - hash + hash.transform_keys!(&:to_sym) end end end
Use transform_keys! from core lib
diff --git a/lib/mechanic/server/documentation/views/rss.builder b/lib/mechanic/server/documentation/views/rss.builder index abc1234..def5678 100644 --- a/lib/mechanic/server/documentation/views/rss.builder +++ b/lib/mechanic/server/documentation/views/rss.builder @@ -6,8 +6,7 @@ xml.link request.url @extensions.each do |extension| xml.item do - xml.title extension.name - xml.author extension.author + xml.title "#{extension.name} by #{extension.author}" xml.pubDate Time.parse(extension.created_at.to_s).rfc822 xml.link 'http://github.com/' + extension.repository xml.guid('robofont-mechanic-' + extension.id.to_s, { isPermaLink: false })
Remove author field to pass RSS validation
diff --git a/lib/puppet/provider/network_device_tel/ce.rb b/lib/puppet/provider/network_device_tel/ce.rb index abc1234..def5678 100644 --- a/lib/puppet/provider/network_device_tel/ce.rb +++ b/lib/puppet/provider/network_device_tel/ce.rb @@ -1,3 +1,15 @@+# 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. + # encoding: utf-8 require 'puppet/provider/ce/device_tel/device_tel.rb' require 'puppet/provider/ce/api/apibase.rb' @@ -13,8 +25,6 @@ end def flush - Puppet::NetDev::CE::Device.set_telnet_ip(resource[:telip]) - Puppet::NetDev::CE::Device.set_telnet_username(resource[:teluser]) - Puppet::NetDev::CE::Device.set_telnet_password(resource[:telpass]) + Puppet::NetDev::CE::Device_tel.telnet_instance(resource[:telip], resource[:teluser], resource[:telpass]) end end
Add description of LICENSE and Modify
diff --git a/lib/reagan/test_knife.rb b/lib/reagan/test_knife.rb index abc1234..def5678 100644 --- a/lib/reagan/test_knife.rb +++ b/lib/reagan/test_knife.rb @@ -30,7 +30,7 @@ result = system "knife cookbook test -o #{File.join(Config.settings['jenkins']['workspace_dir'], 'cookbooks')} #{@cookbook} > /dev/null 2>&1" puts 'Running knife cookbook test:' - puts result ? 'PASS: Knife cookbook test was successful'.indent : 'FAIL: Knife cookbookk test was NOT successful'.indent.to_red + puts result ? 'PASS: Knife cookbook test was successful'.indent : 'FAIL: Knife cookbook test was NOT successful'.indent.to_red result end end
Fix typo in log output
diff --git a/lib/tasks/js_routes.rake b/lib/tasks/js_routes.rake index abc1234..def5678 100644 --- a/lib/tasks/js_routes.rake +++ b/lib/tasks/js_routes.rake @@ -3,9 +3,6 @@ task :routes => :environment do require "js-routes" - # Hack for actually load the routes (taken from railties console/app.rb) - ActionDispatch::Callbacks.new(lambda {}, false) - JsRoutes.generate! end end
Remove deprecated hack from rake task
diff --git a/lib/van_helsing/rails.rb b/lib/van_helsing/rails.rb index abc1234..def5678 100644 --- a/lib/van_helsing/rails.rb +++ b/lib/van_helsing/rails.rb @@ -12,7 +12,7 @@ end desc "Precompiles assets." - task :assets_precompile do + task :'assets_precompile:force' do queue %{ echo "-----> Precompiling asset files" #{rake} assets:precompile @@ -20,7 +20,12 @@ end desc "Precompiles assets (skips if nothing has changed since the last release)." - task :'assets_precompile:fast' do + task :'assets_precompile' do + if ENV['force_assets'] + invoke :'rails:assets_procompile:force' + return + end + queue %{ if [ -d "#{current_path}/public/assets" ]; then
Make fast asset precompilation the default.
diff --git a/lib/xcode/install/installed.rb b/lib/xcode/install/installed.rb index abc1234..def5678 100644 --- a/lib/xcode/install/installed.rb +++ b/lib/xcode/install/installed.rb @@ -4,10 +4,19 @@ self.command = 'installed' self.summary = 'List installed Xcodes.' + def self.options + [['--uuid', 'Show DVTPlugInCompatibilityUUID of plist.']].concat(super) + end + + def initialize(argv) + @uuid = argv.flag?('uuid', false) + super + end + def run installer = XcodeInstall::Installer.new installer.installed_versions.each do |xcode| - puts "#{xcode.version}\t(#{xcode.path})" + puts "#{xcode.version}\t(#{xcode.path})\t#{@uuid ? xcode.uuid : ''}" end end end
Add option for showing DVTPlugInCompatibilityUUID
diff --git a/configure-dea.rb b/configure-dea.rb index abc1234..def5678 100644 --- a/configure-dea.rb +++ b/configure-dea.rb @@ -19,6 +19,7 @@ config['logging'].delete('syslog') config['staging']['environment']['BUILDPACK_CACHE'] = (ironfoundry_path + 'buildpack_cache').to_s config['staging']['environment']['PATH'] = ruby_path.to_s + config['bind_mounts'] =[ 'src_path' => (ironfoundry_path + 'buildpack_cache').to_s ] config['stacks'] = ['mswin-clr'] File.open(output_file, 'w') do |file|
Set bind_mounts values during configuration. May not be necessary but adding it for consistency.
diff --git a/files/chef-marketplace-cookbooks/chef-marketplace/recipes/_automate_enable.rb b/files/chef-marketplace-cookbooks/chef-marketplace/recipes/_automate_enable.rb index abc1234..def5678 100644 --- a/files/chef-marketplace-cookbooks/chef-marketplace/recipes/_automate_enable.rb +++ b/files/chef-marketplace-cookbooks/chef-marketplace/recipes/_automate_enable.rb @@ -25,6 +25,10 @@ source 'delivery.rb.erb' end +link '/etc/delivery/builder_key' do + to '/etc/delivery/builder.pem' +end + directory '/var/opt/delivery/license' do recursive true end
[CLOUD-413] Create symlink for builder key
diff --git a/lib/slack-ruby-bot/rspec/support/slack-ruby-bot/respond_with_slack_message.rb b/lib/slack-ruby-bot/rspec/support/slack-ruby-bot/respond_with_slack_message.rb index abc1234..def5678 100644 --- a/lib/slack-ruby-bot/rspec/support/slack-ruby-bot/respond_with_slack_message.rb +++ b/lib/slack-ruby-bot/rspec/support/slack-ruby-bot/respond_with_slack_message.rb @@ -4,7 +4,7 @@ match do |actual| channel, user, message = parse(actual) allow(Giphy).to receive(:random) - client = double(Slack::RealTime::Client) + client = app.send(:client) expect(SlackRubyBot::Commands::Base).to receive(:send_client_message).with(client, channel: channel, text: expected) app.send(:message, client, text: message, channel: channel, user: user) true
Use a real client method to avoid stumbling on an unmet expectation.
diff --git a/spec/dummy/config/application.rb b/spec/dummy/config/application.rb index abc1234..def5678 100644 --- a/spec/dummy/config/application.rb +++ b/spec/dummy/config/application.rb @@ -20,14 +20,8 @@ # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. config.assets.configure do |env| - major_version = Sprockets::VERSION.split(".").first.to_i - - if major_version == 3 - env.register_engine ".haml", Grease.apply(Tilt::HamlTemplate), mime_type: "text/html", silence_deprecation: true - elsif major_version >= 4 - env.register_mime_type "text/haml", extensions: %w(.haml .html.haml) - env.register_transformer "text/haml", "text/html", Grease.apply(Tilt::HamlTemplate) - end + env.register_mime_type "text/haml", extensions: %w(.haml .html.haml) + env.register_transformer "text/haml", "text/html", Grease.apply(Tilt::HamlTemplate) end # NOTE: Enable us to get the template path by ActionController::Base.helpers.asset_path
Remove dummy app's configuration for Sprockets 3
diff --git a/spec/status_change_event_spec.rb b/spec/status_change_event_spec.rb index abc1234..def5678 100644 --- a/spec/status_change_event_spec.rb +++ b/spec/status_change_event_spec.rb @@ -18,5 +18,20 @@ its(:file) { should == @file } its(:event) { should == @inner_event } end + + context "with a fail_now_pass event" do + before do + @type = 'fail_now_pass' + @file = 'file' + @inner_event = PassOrFailEvent.new(*(1..7)) + @event = StatusChangeEvent.new(@test, @file, @inner_event) + end + + subject { @event } + + its(:type) { should == @test } + its(:file) { should == @file } + its(:event) { should == @inner_event } + end end end
Add extra case to status change event spec
diff --git a/test/lib/parse/cache_test.rb b/test/lib/parse/cache_test.rb index abc1234..def5678 100644 --- a/test/lib/parse/cache_test.rb +++ b/test/lib/parse/cache_test.rb @@ -0,0 +1,32 @@+require_relative '../../test_helper' + +class TestCache < Minitest::Test + def setup + @init_object = { + server_url: 'http://b.com/parse', + app_id: 'abc', + api_key: 'def' + } + end + + def test_no_cache_ok + assert Parse.setup(@init_object) + end + + def test_moneta_transformer_accepted + init = @init_object.merge(cache: Moneta.new(:LRUHash)) + assert init[:cache].is_a?(Moneta::Transformer) + assert Parse.setup(init) + end + + def test_moneta_expire_accepted + init = @init_object.merge(cache: Moneta.new(:LRUHash, expires: 13)) + assert init[:cache].is_a?(Moneta::Expires) + assert Parse.setup(init) + end + + def test_bad_cache_type_rejected + init = @init_object.merge(cache: 'hamster') + assert_raises(ArgumentError) { Parse.setup(init) } + end +end
Add some basic tests of cache type supplied on init
diff --git a/app/controllers/users/omniauth_callbacks_controller.rb b/app/controllers/users/omniauth_callbacks_controller.rb index abc1234..def5678 100644 --- a/app/controllers/users/omniauth_callbacks_controller.rb +++ b/app/controllers/users/omniauth_callbacks_controller.rb @@ -7,7 +7,7 @@ flash[:notice] = I18n.t "devise.omniauth_callbacks.success", :kind => "Github" sign_in_and_redirect @user, :event => :authentication else - session["devise.github_data"] = request.env["omniauth.auth"] + session["devise.github_data"] = request.env["omniauth.auth"].delete("extra") flash[:error] = no_email_error if request.env["omniauth.auth"].info.email.blank? redirect_to root_path end @@ -21,4 +21,4 @@ msg << "<a href='https://github.com/settings/profile'>Github Profile</a>" msg.html_safe end -end+end
Remove extra hash from oauth data
diff --git a/spec/models/reaction_spec.rb b/spec/models/reaction_spec.rb index abc1234..def5678 100644 --- a/spec/models/reaction_spec.rb +++ b/spec/models/reaction_spec.rb @@ -37,6 +37,6 @@ it "can have only image/gif as image" do reaction.image = Rack::Test::UploadedFile.new('spec/support/images/man.jpg', 'image/jpg') - expect{reaction.save}.not_to change{ reaction.image } + expect(reaction).not_to be_valid end end
Change of logic in image test
diff --git a/spec/nark/middleware_spec.rb b/spec/nark/middleware_spec.rb index abc1234..def5678 100644 --- a/spec/nark/middleware_spec.rb +++ b/spec/nark/middleware_spec.rb @@ -1,13 +1,11 @@ require "spec_helper" describe Nark::Middleware do - include Rack::Test::Methods - let(:target_app) { mock('The target application') } - - def app - target_app.stub(:call).and_return([200, {}, "Target application"]) - Nark::Middleware.new(target_app) - end + let(:response_body) { [ 200, {}, {} ] } + let(:target_app) { mock('The target application', call: response_body) } + let(:environment) { { 'PATH_INFO' => '/' } } + let(:event_handler) { stub(:CustomEventHandler, trigger: stub) } + let(:middleware) { Nark::Middleware.new target_app, event_handler } describe "#new" do it "stores the application" do @@ -16,7 +14,6 @@ end it "stores the event handler" do - event_handler = stub(:CustomEventHandler, trigger: stub) middleware = Nark::Middleware.new target_app, event_handler middleware.event_handler.should eql event_handler end @@ -24,8 +21,18 @@ describe "#call" do it "triggers before and after hooks at least twice" do - Nark::Plugin.should_receive(:trigger).at_least(:twice) - get '/' + middleware.event_handler.should_receive(:trigger).at_least(:twice) + middleware.call environment + end + + it "calls the application" do + middleware.app.should_receive(:call).with environment + middleware.call environment + end + + it "returns the applications response" do + response = middleware.call environment + response.should eql [ 200, {}, { } ] end end
Add specs for calling the middleware
diff --git a/1.8/library/socket/basicsocket/recv_nonblock_spec.rb b/1.8/library/socket/basicsocket/recv_nonblock_spec.rb index abc1234..def5678 100644 --- a/1.8/library/socket/basicsocket/recv_nonblock_spec.rb +++ b/1.8/library/socket/basicsocket/recv_nonblock_spec.rb @@ -1,5 +1,6 @@ require File.dirname(__FILE__) + '/../../../spec_helper' require File.dirname(__FILE__) + '/../shared/recv_nonblock' +require File.dirname(__FILE__) + '/../fixtures/classes' describe "Socket::BasicSocket#recv_nonblock" do it_behaves_like(:recv_nonblock, "BasicSocket", :recv_nonblock)
Make recv_nonblock test runnable standalone.
diff --git a/db/migrate/20111114134140_use_x_instead_of_times_in_line_items.rb b/db/migrate/20111114134140_use_x_instead_of_times_in_line_items.rb index abc1234..def5678 100644 --- a/db/migrate/20111114134140_use_x_instead_of_times_in_line_items.rb +++ b/db/migrate/20111114134140_use_x_instead_of_times_in_line_items.rb @@ -1,9 +1,9 @@ class UseXInsteadOfTimesInLineItems < ActiveRecord::Migration def up - LineItem.where(:quantity => 'times').update_all(:quantity => 'x') + LineItem.unscoped.where(:quantity => 'times').update_all(:quantity => 'x') end def down - LineItem.where(:quantity => 'x').update_all(:quantity => 'times') + LineItem.unscoped.where(:quantity => 'x').update_all(:quantity => 'times') end end
Fix migration to not use default_scope on LineItem.
diff --git a/ecology.gemspec b/ecology.gemspec index abc1234..def5678 100644 --- a/ecology.gemspec +++ b/ecology.gemspec @@ -23,7 +23,7 @@ ignores = File.readlines(".gitignore").grep(/\S+/).map {|pattern| pattern.chomp } dotfiles = Dir[".*"] s.files = Dir["**/*"].reject {|f| File.directory?(f) || ignores.any? {|i| File.fnmatch(i, f) } } + dotfiles - s.test_files = s.files.grep(/^spec\//) + s.test_files = s.files.grep(/^test\//) s.require_paths = ["lib"]
Fix test_files in gemspecs, add glowworm executable to gemspec
diff --git a/campystrano.gemspec b/campystrano.gemspec index abc1234..def5678 100644 --- a/campystrano.gemspec +++ b/campystrano.gemspec @@ -14,8 +14,8 @@ s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.md"] - s.add_dependency "capistrano", "~> 2.14.2" - s.add_dependency "tinder", "~> 1.9.2" + s.add_dependency "capistrano", ">= 2.9" + s.add_dependency "tinder", ">= 1.9.2" s.add_development_dependency "rails", "~> 3.2.12" s.add_development_dependency "sqlite3"
Adjust capistrano and tinder version requirements
diff --git a/build_config.rb b/build_config.rb index abc1234..def5678 100644 --- a/build_config.rb +++ b/build_config.rb @@ -21,7 +21,7 @@ # SOFTWARE. MRuby::Build.new do |conf| - toolchain :gcc + toolchain ENV.fetch('CC', :gcc) conf.enable_debug conf.enable_test
Make toolchain variable through $env:CC
diff --git a/util/word_list_sanitizer.rb b/util/word_list_sanitizer.rb index abc1234..def5678 100644 --- a/util/word_list_sanitizer.rb +++ b/util/word_list_sanitizer.rb @@ -4,8 +4,7 @@ end def run! - process_words - write_file + update_word_file end private @@ -13,11 +12,11 @@ File.dirname(__FILE__) + '/../data/words.txt' end - def process_words - @processed = @words.reject { |w| w.match(/^\w+$/).nil? }.map(&:downcase).sort.uniq + def processed_words + @words.reject { |w| w.match(/^\w+$/).nil? }.map(&:downcase).sort.uniq end - def write_file - File.open(file_path, 'w') { |f| @processed.each { |w| f.puts(w) } } + def update_word_file + File.open(file_path, 'w') { |f| processed_words.each { |w| f.puts(w) } } end end
Clean up word file sanitizer a bit
diff --git a/Casks/appcode-eap.rb b/Casks/appcode-eap.rb index abc1234..def5678 100644 --- a/Casks/appcode-eap.rb +++ b/Casks/appcode-eap.rb @@ -1,8 +1,8 @@ cask :v1 => 'appcode-eap' do version '3.2.0' - sha256 '2dd8a0a9246067ae6e092b9934cbadac6730a74fe400c8929b09792a0c0cda83' + sha256 'fa78dc8e2a7430e7173cecec7b6e369f3d2cf442facd7ee0df46592788b00715' - url 'http://download.jetbrains.com/objc/AppCode-141.1399.2.dmg' + url 'http://download.jetbrains.com/objc/AppCode-141.1689.23.dmg' homepage 'http://confluence.jetbrains.com/display/OBJC/AppCode+EAP' license :commercial
Update AppCode EAP to latest build This commit updates the sha256 and url stanzas. The version of the app itself has not changed.
diff --git a/Casks/rapidweaver.rb b/Casks/rapidweaver.rb index abc1234..def5678 100644 --- a/Casks/rapidweaver.rb +++ b/Casks/rapidweaver.rb @@ -1,9 +1,9 @@ cask :v1 => 'rapidweaver' do - version '6' - sha256 'e7b72daffa9c7809b713e05a1b518873a71a73afdd6a97f300b8bb9ab35a9361' + version '6.0.3' + sha256 'e30a85f337d846a44feb902f0214b6cd49c2ff375db81a7197704fd57aae0442' - url "http://realmacsoftware.com/redirects/rapidweaver#{version}/direct" - appcast "http://www.realmacsoftware.com/stats/rapidweaver#{version}.php" + url "http://realmacsoftware.com/redirects/rapidweaver#{version.to_i}/direct" + appcast "http://www.realmacsoftware.com/stats/rapidweaver#{version.to_i}.php" homepage 'http://realmacsoftware.com/rapidweaver' license :unknown
Update RapidWeaver.app to version 6.0.3
diff --git a/castanet.gemspec b/castanet.gemspec index abc1234..def5678 100644 --- a/castanet.gemspec +++ b/castanet.gemspec @@ -12,7 +12,7 @@ s.summary = %q{A CAS client library} s.description = %q{A small, snappy CAS 2.0 client library for Ruby applications} - s.files = Dir.glob("{.yardopts,README.md,History.md,LICENSE,lib/**/*}") + s.files = Dir.glob("{.yardopts,README,CHANGELOG,LICENSE,lib/**/*}") s.test_files = Dir.glob("cucumber.yml,{spec,features,vendor/udaeta}/**/*") s.executables = [] s.require_paths = ["lib"]
Include CHANGELOG and README in the gem.
diff --git a/cask/dropdmg.rb b/cask/dropdmg.rb index abc1234..def5678 100644 --- a/cask/dropdmg.rb +++ b/cask/dropdmg.rb @@ -10,9 +10,10 @@ license :commercial depends_on :macos => '>= :snow_leopard' depends_on :arch => :intel - + zap :delete => [ '~/Library/Automator/DropDMG.action', - '~/Library/Automator/Expand Disk Image.action' + '~/Library/Automator/Expand Disk Image.action', + '~Library/Preferences/com.c-command.DropDMG.plist', ] end
Update zap:delete in DropDMG cask
diff --git a/app/controllers/concerns/tenant_site.rb b/app/controllers/concerns/tenant_site.rb index abc1234..def5678 100644 --- a/app/controllers/concerns/tenant_site.rb +++ b/app/controllers/concerns/tenant_site.rb @@ -10,7 +10,7 @@ def current_site return default_site unless tenant_site? - Site.find_by(domain: Apartment::Tenant.current.tr('_', '.')) + Site.find_by(tenant_name: Apartment::Tenant.current) end def tenant_site? @@ -20,6 +20,10 @@ private def default_site - Site.new(domain: Settings.site.default_domain, name: Settings.site.name) + Site.new( + domain: Settings.site.default_domain, + name: Settings.site.name, + tenant_name: 'public' + ) end end
Fix tenant site not found
diff --git a/app/controllers/v3/tracks_controller.rb b/app/controllers/v3/tracks_controller.rb index abc1234..def5678 100644 --- a/app/controllers/v3/tracks_controller.rb +++ b/app/controllers/v3/tracks_controller.rb @@ -6,7 +6,7 @@ def show if @track.present? render json: @track.as_json(include: { - users: { + likers: { except: [:crypted_password, :salt] } }), status: 200
Change property name of Track api. users -> likers
diff --git a/chef-handler-slack.gemspec b/chef-handler-slack.gemspec index abc1234..def5678 100644 --- a/chef-handler-slack.gemspec +++ b/chef-handler-slack.gemspec @@ -1,22 +1,22 @@ $:.push File.expand_path("../lib", __FILE__) Gem::Specification.new do |s| - s.name = "chef-handler-slack" - s.version = "0.1.0" - s.authors = ["Derek Smith"] - s.email = ["derek@slack-corp.com"] - s.homepage = "https://github.com/tinyspeck/chef-handler-slack" - s.summary = %q{Chef reports generated to a channel in Slack} - s.description = %q{Chef reports generated to a channel in Slack} - s.license = "MIT" + s.name = "chef-handler-slack" + s.version = "0.1.0" + s.authors = ["Derek Smith"] + s.email = ["derek@slack-corp.com"] + s.homepage = "https://github.com/tinyspeck/chef-handler-slack" + s.summary = %q{Chef reports generated to a channel in Slack} + s.description = %q{Chef reports generated to a channel in Slack} + s.license = "MIT" - - s.files = `git ls-files`.split("\n") - s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") - s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } + s.files = `git ls-files -z`.split("\x0") + s.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } + s.test_files = spec.files.grep(%r{^(test|spec|features)/}) s.require_paths = ["lib"] + s.add_development_dependency "bundler", "~> 1.6" + s.add_development_dependency "rake" s.add_development_dependency "rspec" - s.add_development_dependency "rake" s.add_development_dependency "chef" end
Add bundle as a dev dependency
diff --git a/app/decorators/action_plan_decorator.rb b/app/decorators/action_plan_decorator.rb index abc1234..def5678 100644 --- a/app/decorators/action_plan_decorator.rb +++ b/app/decorators/action_plan_decorator.rb @@ -23,7 +23,7 @@ [ [HTMLProcessor::NodeRemover, HTMLProcessor::INTRO_IMG], [HTMLProcessor::NodeReplacer, ['//div[@class="action-item"]//h4', 'h3']], - [HTMLProcessor::NodeReplacer, ['//div[@class="action-item"]/h3', 'h2']] + [HTMLProcessor::NodeReplacer, ['//div[@class="action-item"]/h3', 'h2']], ] end end
Add trailing comma to aid future diffs
diff --git a/lib/core/repositories/articles/active_resource.rb b/lib/core/repositories/articles/active_resource.rb index abc1234..def5678 100644 --- a/lib/core/repositories/articles/active_resource.rb +++ b/lib/core/repositories/articles/active_resource.rb @@ -12,24 +12,18 @@ end def find(id) - Model.find(id, params: { locale: I18n.locale }).value + Model.find(id, params: { locale: I18n.locale }).attributes rescue ::ActiveResource::ResourceNotFound nil end private - Model = Class.new(::ActiveResource::Base) do - def value - self.attributes - end - end - + Model = Class.new(::ActiveResource::Base) Model.element_name = 'article' def_delegator Model, :site, :url def_delegator Model, :site=, :url= - end end end
Simplify serialisation of ActiveResource object
diff --git a/app/models/spree/line_item_decorator.rb b/app/models/spree/line_item_decorator.rb index abc1234..def5678 100644 --- a/app/models/spree/line_item_decorator.rb +++ b/app/models/spree/line_item_decorator.rb @@ -3,7 +3,7 @@ included do has_many :gift_cards, class_name: Spree::VirtualGiftCard - Spree::LineItem.delegate :gift_card?, :gift_card, to: :product + delegate :gift_card?, :gift_card, to: :product prepend(InstanceMethods) end
Simplify line item gift card delegate statement
diff --git a/chef/cookbooks/omnibus_updater/attributes/default.rb b/chef/cookbooks/omnibus_updater/attributes/default.rb index abc1234..def5678 100644 --- a/chef/cookbooks/omnibus_updater/attributes/default.rb +++ b/chef/cookbooks/omnibus_updater/attributes/default.rb @@ -1,6 +1,6 @@ default[:omnibus_updater][:version] = '10.18.2' default[:omnibus_updater][:version_search] = false -default[:omnibus_updater][:base_uri] = 'http://opscode-omnitruck-release.s3.amazonaws.com' +default[:omnibus_updater][:base_uri] = 'http://opscode-omnibus-packages.s3.amazonaws.com' default[:omnibus_updater][:cache_dir] = '/opt' default[:omnibus_updater][:cache_omnibus_installer] = false default[:omnibus_updater][:remove_chef_system_gem] = false
Change CHEF Omnibus cookbook base_uri attribute because Opscode as migrated their omnibus S3 bucket.
diff --git a/app/controllers/api/events_controller.rb b/app/controllers/api/events_controller.rb index abc1234..def5678 100644 --- a/app/controllers/api/events_controller.rb +++ b/app/controllers/api/events_controller.rb @@ -8,7 +8,7 @@ .where.not(events: { id: Array.wrap(params[:except]) }) .references(:recordings, :artists) .order(performances_count: :desc) - .limit(6) + .limit(12) if params[:countries].present? @events = @events.in(params[:countries])
Increase number of retrieved events to 12
diff --git a/app/controllers/dashboards_controller.rb b/app/controllers/dashboards_controller.rb index abc1234..def5678 100644 --- a/app/controllers/dashboards_controller.rb +++ b/app/controllers/dashboards_controller.rb @@ -2,12 +2,20 @@ def index - @page_title = 'Dashboard' + @page_title = 'My Dashboard' # Select messages for this user or ones that are for the agency as a whole - @messages = Message.where("organization_id = ? AND to_user_id = ? AND opened_at IS NULL", @organization.id, current_user.id).order("created_at DESC") + @messages = Message.where("to_user_id = ? AND opened_at IS NULL", @organization.id, current_user.id).order("created_at DESC") + # Select tasks for this user or ones that are for the agency as a whole - @tasks = Task.where("for_organization_id = ? AND completed_on IS NULL AND (assigned_to_user_id IS NULL OR assigned_to_user_id = ?)", @organization.id, current_user.id).order("complete_by") + + # Get the task status types to search for + task_statuses = [] + task_statuses << TaskStatusType.find_by_name('Not Started') + task_statuses << TaskStatusType.find_by_name('In Progress') + task_statuses << TaskStatusType.find_by_name('On Hold') + + @tasks = Task.where("assigned_to_user_id = ? AND task_status_type_id IN(?)", current_user.id, task_statuses).order("complete_by") end
Fix tasks displayed in dashboard
diff --git a/spec/acceptance/sign_in_spec.rb b/spec/acceptance/sign_in_spec.rb index abc1234..def5678 100644 --- a/spec/acceptance/sign_in_spec.rb +++ b/spec/acceptance/sign_in_spec.rb @@ -7,10 +7,16 @@ } do given(:user) { create(:user) } + given(:unregistered_user) { User.new(email: 'user@test.com', password: '12345678') } scenario 'Existing User try to sign in' do sign_in(user) expect(page).to have_content('Signed in successfully.') end + + scenario 'Non register user try to sign in' do + sign_in(unregistered_user) + expect(page).to have_content('Invalid Email or password.') + end end
Add test to sign_in spec.
diff --git a/spec/airplayer/playlist_spec.rb b/spec/airplayer/playlist_spec.rb index abc1234..def5678 100644 --- a/spec/airplayer/playlist_spec.rb +++ b/spec/airplayer/playlist_spec.rb @@ -1,3 +1,4 @@+require 'fakefs/spec_helpers' require 'spec_helper' module AirPlayer @@ -7,8 +8,22 @@ end describe '.add' do + context 'with local directory' do + it 'returns media type is local file' do + FakeFS do + FileUtils.touch('01.m4v') + FileUtils.touch('02.m4v') + end + + playlist.add('.') + playlist.entries do |media| + expect(media.file?).to be true + end + end + end + context 'with URL' do - it 'return media type is url' do + it 'returns media type is url' do playlist.add('http://example.com/video.mp4') expect(playlist.first.path).to match 'http' end @@ -16,8 +31,8 @@ context 'with multiple files' do it 'have multiple files' do - expect(playlist.add('./video.mp4').size).to eq 1 - expect(playlist.add('./video.m4v').size).to eq 2 + expect(playlist.add('video.mp4').size).to eq 1 + expect(playlist.add('video.m4v').size).to eq 2 end end @@ -32,7 +47,7 @@ context 'with local file' do it 'returns media instances' do - playlist.add('../video.mp4') + playlist.add('video.mp4') playlist.entries do |media| expect(media).to be_kind_of AirPlayer::Media end
Add spec to play local directory
diff --git a/spec/commonmarker_rouge_spec.rb b/spec/commonmarker_rouge_spec.rb index abc1234..def5678 100644 --- a/spec/commonmarker_rouge_spec.rb +++ b/spec/commonmarker_rouge_spec.rb @@ -16,4 +16,19 @@ expect(html).to_not eq('') end + + it 'escapes language markup' do + html = CommonMarker::Rouge.render_html(<<-MD) +```haxxor">yay! +somecode +``` +MD + + expected = <<-HTML +<div class="highlighter-rouge language-haxxor&quot;&gt;yay!"><pre class=\"highlight\"><code>somecode +</code></pre> +</div> +HTML + expect(html).to eq(expected) + end end
Add spec for escaping language fence
diff --git a/spec/factories/course_levels.rb b/spec/factories/course_levels.rb index abc1234..def5678 100644 --- a/spec/factories/course_levels.rb +++ b/spec/factories/course_levels.rb @@ -1,6 +1,6 @@ FactoryGirl.define do factory :course_level, class: Course::Level.name do course - sequence(:experience_points_threshold) + sequence(:experience_points_threshold) { |n| n * 100 } end end
Make levels factory more realistic
diff --git a/spec/controllers/api/v4/converts_controller_spec.rb b/spec/controllers/api/v4/converts_controller_spec.rb index abc1234..def5678 100644 --- a/spec/controllers/api/v4/converts_controller_spec.rb +++ b/spec/controllers/api/v4/converts_controller_spec.rb @@ -4,25 +4,37 @@ describe '#create' do context 'from Llanfair' do + context 'supported format' + let(:file) do + fixture_file_upload('files/llanfair') + end + subject { post :create, params: {file: file, format: "json", historic: "on"} } + let(:body) { JSON.parse(subject.body) } + + it "returns a 200" do + expect(subject).to have_http_status 200 + end + + it "doesn't include id" do + expect(body['id']).to be_nil + end + + it "has the correct splits" do + expect(body["splits"].map { |s| [s["name"], s["duration"]] }).to eq([ + ["Spiral Mountain", 211.23], + ["Mumbo's Mountain", 808.2] + ]) + end + end + + context 'unsupported format' do let(:file) do fixture_file_upload('files/llanfair') end - subject { post :create, params: {file: file, program: "splits_io", include_history: "on"} } - let(:body) { JSON.parse(subject.body) } + subject { post :create, params: {file: file, format: "llanfair" } } - it "retruns a 200" do - expect(subject).to have_http_status 200 - end - - it "doesn't include id" do - expect(body['id']).to be_nil - end - - it 'has the correct splits' do - expect(body["splits"].map { |s| [s["name"], s["duration"]] }).to eq([ - ["Spiral Mountain", 211.23], - ["Mumbo's Mountain", 808.2] - ]) + it "returns a 400" do + expect(subject).to have_http_status 400 end end end
Add test for unsupported formats
diff --git a/cryptic.gemspec b/cryptic.gemspec index abc1234..def5678 100644 --- a/cryptic.gemspec +++ b/cryptic.gemspec @@ -18,6 +18,7 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ['lib'] + spec.add_dependency 'colorize' spec.add_dependency 'redcarpet' spec.add_dependency 'thor' spec.add_dependency 'yard'
Add colorize to the gemspec
diff --git a/spec/sass_partial_spec.rb b/spec/sass_partial_spec.rb index abc1234..def5678 100644 --- a/spec/sass_partial_spec.rb +++ b/spec/sass_partial_spec.rb @@ -20,10 +20,10 @@ context "create files with dependancies" do it "should create a file with an //import statement" do Dir.chdir("test_files") - SassPartial.new({"_1.sass" => ["_2.sass"], "_2.sass" => []}) - SassPartial.build_imports - File.open("_1.sass", 'r') do |line| - line.should include '//import "_1.sass"' + @partial = SassPartial.new({"_1.sass" => ["_2.sass"], "_2.sass" => []}) + @partial.build_imports + File.open("_1.sass", 'r').each do |line| + line.should eq '//import "_2.sass"' end end end
Build dependancies works (at least for a single dependency)
diff --git a/lib/asteroids/missile/missile_physics.rb b/lib/asteroids/missile/missile_physics.rb index abc1234..def5678 100644 --- a/lib/asteroids/missile/missile_physics.rb +++ b/lib/asteroids/missile/missile_physics.rb @@ -6,5 +6,13 @@ @object_pool = object_pool end + def update + object.x += Gosu::offset_x(object.angle, 10) + object.vel_x + object.y += Gosu::offset_y(object.angle, 10) + object.vel_y + object.x %= 800 + object.y %= 600 + object.lifespan -= 0.1 + end + end end
Implement the update method for ship physics.
diff --git a/glipper.gemspec b/glipper.gemspec index abc1234..def5678 100644 --- a/glipper.gemspec +++ b/glipper.gemspec @@ -18,7 +18,7 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] - spec.add_dependency "actionpack", ">= 4.1.1", "< 5.2" + spec.add_dependency "actionpack", ">= 4.1.1", "< 6.0" spec.add_development_dependency "bundler", "~> 1.6" spec.add_development_dependency "rake"
Update rails upper version limit to "< 6.0"
diff --git a/lib/torque/postgresql/adapter/quoting.rb b/lib/torque/postgresql/adapter/quoting.rb index abc1234..def5678 100644 --- a/lib/torque/postgresql/adapter/quoting.rb +++ b/lib/torque/postgresql/adapter/quoting.rb @@ -31,6 +31,9 @@ lookup_cast_type_from_column(column) end + puts column.inspect + puts value.inspect + puts type.inspect type.nil? ? super : quote(type.serialize(value.to_a)) end end
Debug error in Circle CI
diff --git a/lib/wilbertils/message_receiver_stack.rb b/lib/wilbertils/message_receiver_stack.rb index abc1234..def5678 100644 --- a/lib/wilbertils/message_receiver_stack.rb +++ b/lib/wilbertils/message_receiver_stack.rb @@ -0,0 +1,27 @@+module Wilbertils + class MessageReceiverStack + include Singleton + + def self.add receiver + Wilbertils::MessageReceiverStack.instance.add receiver + end + + def self.shutdown + Wilbertils::MessageReceiverStack.instance.shutdown + end + + def initialize + @message_receivers = [] + end + + def add receiver + @message_receivers << receiver + end + + def shutdown + @message_receivers.each { |mr| mr.shutdown } + end + end +end + +
Add class for managing shutdown of queues
diff --git a/test/integration/default/serverspec/default_spec.rb b/test/integration/default/serverspec/default_spec.rb index abc1234..def5678 100644 --- a/test/integration/default/serverspec/default_spec.rb +++ b/test/integration/default/serverspec/default_spec.rb @@ -2,19 +2,9 @@ set :backend, :exec -# rules no longer ship by default -describe iptables do - it { should_not have_rule('-A FWR -p tcp -m tcp --dport 22 -j ACCEPT') } - it { should_not have_rule('-A INPUT -j FWR') } - it { should_not have_rule('-A FWR -i lo -j ACCEPT') } - it { should_not have_rule('-A FWR -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j REJECT --reject-with icmp-port-unreachable') } - it { should_not have_rule('-A FWR -p udp -j REJECT --reject-with icmp-port-unreachable') } -end - if os[:family] == 'redhat' - describe service('iptables') do - it { should be_enabled } - it { should be_running } + describe command('/etc/init.d/iptables status') do + its(:stdout) { should match /Table: filter/ } end end @@ -33,7 +23,7 @@ end end -if ['centos', 'fedora'].include?(os[:family]) +if ['redhat', 'fedora'].include?(os[:family]) describe file('/etc/sysconfig/iptables-config') do its(:content) { should match /IPTABLES_STATUS_VERBOSE="yes"/ } end
Fix default specs to work properly on RHEL Also remove the old checks for the rules we removed.
diff --git a/connect-four.rb b/connect-four.rb index abc1234..def5678 100644 --- a/connect-four.rb +++ b/connect-four.rb @@ -4,33 +4,46 @@ # Connect Four game #initialize game board array -rows, cols = 6, 7 -board = Array.new(rows*cols) +$rows, $cols = 6, 7 +$board = Array.new($rows*$cols) #display the board, visualizing single array as rows and columns -(0...rows).each { |row| - (0...cols).each { |col| +(0...$rows).each { |row| + (0...$cols).each { |col| print row.to_s + " " + col.to_s + " " - print "(" + (cols*row + col).to_s + ") " # index into board array + print "(" + ($cols*row + col).to_s + ") " # index into board array } puts } puts +def display_board + (0...$rows).each { |row| + (0...$cols).each { |col| + i = $cols*row + col + print $board[i] ? $board[i] + " " : ". " + } + puts + } +end + +player = "B" #choose a column to drop a piece into (0-6) col = 2 -board[37] = "R" #testing +$board[37] = "R" #testing # if row 0 is full, prompt for a different column -puts "column is full" if board[col] +puts "column is full" if $board[col] #find the lowest empty row in that column - -(rows-1).downto(0).each { |row| - i = cols*row + col - puts row.to_s + " " + col.to_s + " " + (board[i] ? board[i] : ".") +#do this "upside down" so all I have to find is the first empty position. +($rows-1).downto(0).each { |row| + i = $cols*row + col + if !$board[i] then + $board[i] = player + break + end } -# should do this "upside down" so all I have to find is the first empty position. -# users only pick a column, so they won't care how I number the rows.+display_board
Add method to display board and switch to global variables.
diff --git a/app/helpers/photos_helper.rb b/app/helpers/photos_helper.rb index abc1234..def5678 100644 --- a/app/helpers/photos_helper.rb +++ b/app/helpers/photos_helper.rb @@ -18,7 +18,7 @@ html << link_to(link_name, :class => :thumbnail, :name => photo.id, :'data-lightbox' => 'gallery', :title => photo.caption) do photo_tag(photo, :thumb_iphone_retina) end - html << delete_button(photo) + html << delete_button(photo) unless photo.image_processing? html.html_safe end end
Fix bug where not processed images cause fatal error on user photo page.
diff --git a/app/models/authentication.rb b/app/models/authentication.rb index abc1234..def5678 100644 --- a/app/models/authentication.rb +++ b/app/models/authentication.rb @@ -10,11 +10,8 @@ end def create_user - user = User.new(name: name, remote_photo_url: image) - if email - user.email = email - user.confirmed_at = Time.now - end + user = User.new(name: name, remote_photo_url: image, email: email) + user.confirmed_at = Time.now user.authentications = [ self ] user.save! user
Remove code that doesn’t make sense now that all users will have email.
diff --git a/examples/chat.rb b/examples/chat.rb index abc1234..def5678 100644 --- a/examples/chat.rb +++ b/examples/chat.rb @@ -2,7 +2,7 @@ require 'plezi' class ChatServer def index - render 'client' + "Use Websockets to connect." end def on_open return close unless params['id'] @@ -10,9 +10,24 @@ subscribe channel: "chat" publish channel: "chat", message: "#{@name} joind the chat." write "Welcome, #{@name}!" + # if we have Redis + if(Iodine.default_pubsub.is_a? Iodine::PubSub::RedisEngine) + # We'll add the name to the list of people in the chat. + # Blocks are used as event callbacks and are executed asynchronously. + Iodine.default_pubsub.send("SADD", "chat_members", @name) do + # after the name was added, we'll get all the current people in the chat + Iodine.default_pubsub.send("SMEMBERS", "chat_members") do |members| + # By now, we're outside the Websocket connection's lock. + # To safely access the connection, we'll use `defer` + defer { write "Currently in the chatroom: #{members.join ', '}" } + end + end + end end def on_close publish channel: "chat", message: "#{@name} joind the chat." + # if we have Redis + Iodine.default_pubsub.send("SREM", "chat_members", @name) if(Iodine.default_pubsub.is_a? Iodine::PubSub::RedisEngine) end def on_message data publish channel: "chat", message: "#{@name}: #{data}"
Fix example and show off the Redis engine extension
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,3 +1,4 @@ Rails.application.routes.draw do - # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html + resource :users, only: :show + resource :badges, only: :show end
Add route for user show
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,5 @@ Rails.application.routes.draw do - get "/okcomputer" => "ok_computer#show", defaults: {check: "default"} - get "/okcomputer/all" => "ok_computer#index" - get "/okcomputer/:check" => "ok_computer#show" + match "/okcomputer" => "ok_computer#show", defaults: {check: "default"}, via: [:get, :options] + match "/okcomputer/all" => "ok_computer#index", via: [:get, :options] + match "/okcomputer/:check" => "ok_computer#show", via: [:get, :options] end
Allow Rails to Respond to GET or OPTIONS By default, HAProxy uses OPTIONS for the `healtchk` up-check. This allows OPTIONS to not 404, while still following the Rails 4 requirement of disallowing unbounded `match` routes.
diff --git a/iformat.gemspec b/iformat.gemspec index abc1234..def5678 100644 --- a/iformat.gemspec +++ b/iformat.gemspec @@ -4,9 +4,9 @@ Gem::Specification.new do |gem| gem.authors = ['Karol Sarnacki'] gem.email = ['sodercober@gmail.com'] - gem.description = %q{TODO: Write a gem description} - gem.summary = %q{TODO: Write a gem summary} - gem.homepage = '' + gem.description = %q{A Ruby wrapper for the iFormat API.} + gem.summary = %q{iFormat API wrapper} + gem.homepage = 'https://github.com/sodercober/iformat' gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } gem.files = `git ls-files`.split("\n")
Add gem descriptions to gemspec
diff --git a/core/db/migrate/20130213191427_create_default_stock.rb b/core/db/migrate/20130213191427_create_default_stock.rb index abc1234..def5678 100644 --- a/core/db/migrate/20130213191427_create_default_stock.rb +++ b/core/db/migrate/20130213191427_create_default_stock.rb @@ -1,8 +1,12 @@ class CreateDefaultStock < ActiveRecord::Migration def up + Spree::StockLocation.skip_callback(:create, :after, :create_stock_items) + Spree::StockItem.skip_callback(:save, :after, :process_backorders) location = Spree::StockLocation.create(name: 'default') Spree::Variant.all.each do |variant| - location.stock_items.create(variant: variant, count_on_hand: variant.count_on_hand) + stock_item = location.stock_items.build(variant: variant) + stock_item.send(:count_on_hand=, variant.count_on_hand) + stock_item.save! end remove_column :spree_variants, :count_on_hand
Change migration to avoid tiggering callback and use private send: * Skip :after callbacks on StockLocation and StockItem when creating intitial instances. Regression due to 0ba60a08f934af9d6a7f17f6e9c90a1749547e9b and 630afbb7f2549556fb1bc914e16a2e3802cc8f15 * Use private send to set StockItem.count_on_hand because :count_on_hand= is now private. Regression due to 9acf57f6baf55993ca0f4f032e9b7ad684712c9b [Closes #2789]
diff --git a/core/spec/models/spree/factories/order_factory_spec.rb b/core/spec/models/spree/factories/order_factory_spec.rb index abc1234..def5678 100644 --- a/core/spec/models/spree/factories/order_factory_spec.rb +++ b/core/spec/models/spree/factories/order_factory_spec.rb @@ -5,15 +5,16 @@ RSpec.shared_examples_for 'an order factory' do it "builds" do - expect(build factory).to be_a(Spree::Order) + expect(build factory).to be_a(factory_class) end it "creates" do - expect(create factory).to be_a(Spree::Order) + expect(create factory).to be_a(factory_class) end end RSpec.describe 'order factory', type: :model do + let(:factory_class) { Spree::Order } describe 'plain order' do let(:factory) { :order }
Make the class of the tested factory configurable
diff --git a/purolator-web-services.gemspec b/purolator-web-services.gemspec index abc1234..def5678 100644 --- a/purolator-web-services.gemspec +++ b/purolator-web-services.gemspec @@ -18,8 +18,8 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] - spec.add_dependency "soap4r-ruby19" - spec.required_ruby_version = '>= 1.9.0' + spec.add_dependency "soap4r-ruby1.9" + spec.required_ruby_version = '>= 2.0.0' spec.add_development_dependency "bundler", "~> 1.3" spec.add_development_dependency "rake"
Use soap4r-ruby1.9 instead of soap4r-ruby19. Require ruby 2.0.
diff --git a/app/controllers/api/auth/accounts_controller.rb b/app/controllers/api/auth/accounts_controller.rb index abc1234..def5678 100644 --- a/app/controllers/api/auth/accounts_controller.rb +++ b/app/controllers/api/auth/accounts_controller.rb @@ -10,6 +10,7 @@ filter_resources_by :user_id def after_create_resource(res) + return unless params['user_id'] account_user = User.find(params['user_id']) account_user.individual_account = res end
Allow creating accounts without user associated
diff --git a/app/services/linked_clone_visibility_service.rb b/app/services/linked_clone_visibility_service.rb index abc1234..def5678 100644 --- a/app/services/linked_clone_visibility_service.rb +++ b/app/services/linked_clone_visibility_service.rb @@ -5,7 +5,7 @@ field_names_to_hide = [] if provision_type.to_s == 'vmware' - if snapshot_count > 0 + if snapshot_count.positive? field_names_to_edit += [:linked_clone] else field_names_to_show += [:linked_clone] @@ -17,7 +17,7 @@ field_names_to_hide += [:snapshot] end else - field_names_to_hide += [:linked_clone, :snapshot] + field_names_to_hide += %i(linked_clone snapshot) end {:hide => field_names_to_hide, :edit => field_names_to_edit, :show => field_names_to_show}
Fix rubocop warnings in LinkedCloneVisibilityService
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -6,9 +6,10 @@ namespace :api do namespace :v1 do mount_devise_token_auth_for 'User', at: 'users', skip: [:omniauth_callbacks] - resources :users, only: [:show] end end + + resources :users, only: [:show] # map views get 'maps/fires' => 'maps#fires'
Remove api namespace from user resources path.
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,5 @@ Rails.application.routes.draw do - devise_for :users, controllers: { registrations: 'registrations' } + devise_for :users, controllers: { registrations: 'users/registrations' } resources :users devise_scope :user do
Modify the default devise regitration controller path
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,7 +2,6 @@ ActiveAdmin.routes(self) devise_for :users - get "home/index" root "home#index" resources :studies, only: :show do
Remove duplication of home path It was breaking pager links because kaminari missed the root declaration above
diff --git a/LPGoogleFunctions.podspec b/LPGoogleFunctions.podspec index abc1234..def5678 100644 --- a/LPGoogleFunctions.podspec +++ b/LPGoogleFunctions.podspec @@ -10,5 +10,5 @@ s.source_files = 'LPGoogleFunctions/**/*.{h,m}' s.frameworks = "CoreLocation","AVFoundation" s.requires_arc = true - s.dependency 'AFNetworking', '~> 1.3.2' + s.dependency 'AFNetworking', '~> 2.0' end
Update podspec to use dependency AFNetworking 2.x
diff --git a/db/migrate/20190213155430_change_event_id_to_bigint.rb b/db/migrate/20190213155430_change_event_id_to_bigint.rb index abc1234..def5678 100644 --- a/db/migrate/20190213155430_change_event_id_to_bigint.rb +++ b/db/migrate/20190213155430_change_event_id_to_bigint.rb @@ -0,0 +1,9 @@+class ChangeEventIdToBigint < ActiveRecord::Migration[6.0] + def up + change_column :user_events, :event_id, :bigint + end + + def down + change_column :user_events, :event_id, :integer + end +end
Update event_id foreign key to bigint
diff --git a/db/migrate/20191209202348_add_harvest_count_to_crop.rb b/db/migrate/20191209202348_add_harvest_count_to_crop.rb index abc1234..def5678 100644 --- a/db/migrate/20191209202348_add_harvest_count_to_crop.rb +++ b/db/migrate/20191209202348_add_harvest_count_to_crop.rb @@ -13,6 +13,11 @@ reversible do |dir| dir.up { data } end + + Crop.reindex + Planting.reindex + Seed.reindex + Harvest.reindex end def data
Index into ES after migration
diff --git a/binding_of_caller.gemspec b/binding_of_caller.gemspec index abc1234..def5678 100644 --- a/binding_of_caller.gemspec +++ b/binding_of_caller.gemspec @@ -6,8 +6,15 @@ spec.authors = ["John Mair (banisterfiend)"] spec.email = ["jrmair@gmail.com"] - spec.summary = %q{Retrieve the binding of a method's caller. Can also retrieve bindings even further up the stack.} - spec.description = spec.summary + spec.summary = %q{Retrieve the binding of a method's caller, or further up the stack.} + spec.description = <<-TXT +Provides the Binding#of_caller method. + +Using binding_of_caller we can grab bindings from higher up the call stack and evaluate code in that context. +Allows access to bindings arbitrarily far up the call stack, not limited to just the immediate caller. + +Recommended for use only in debugging situations. Do not use this in production apps. +TXT spec.homepage = "https://github.com/banister/binding_of_caller" spec.license = "MIT" spec.required_ruby_version = Gem::Requirement.new(">= 2.0.0")
Add a more thorough gem description
diff --git a/cucumber-formatters.gemspec b/cucumber-formatters.gemspec index abc1234..def5678 100644 --- a/cucumber-formatters.gemspec +++ b/cucumber-formatters.gemspec @@ -6,9 +6,9 @@ spec.summary = 'A helpful bunch of formatters' spec.description = 'A collection of cucumber formatters' spec.homepage = 'http://benslaughter.github.io/cucumber-formatters/' - spec.version = '0.0.1' + spec.version = '0.0.2' spec.version = "#{spec.version}-#{ENV['TRAVIS_BUILD_NUMBER']}" if ENV['TRAVIS'] - spec.date = '2014-10-14' + spec.date = '2014-10-27' spec.license = 'MIT' spec.author = 'Ben Slaughter'
Update gemspec to version 0.0.2
diff --git a/cruise_config.rb b/cruise_config.rb index abc1234..def5678 100644 --- a/cruise_config.rb +++ b/cruise_config.rb @@ -1,5 +1,5 @@ Project.configure do |project| project.email_notifier.emails = ['scott@butlerpress.com'] project.build_command = "./script/cruise_build.rb #{project.name}" - project.triggered_by ChangeInLocalTrigger.new(project) + # project.triggered_by ChangeInLocalTrigger.new(project) end
Disable custom trigger we may not need git-svn-id: 96bd6241e080dd4199045f7177cf3384e2eaed71@1437 2d86388d-c40f-0410-ad6a-a69da6a65d20
diff --git a/config/boxen.rb b/config/boxen.rb index abc1234..def5678 100644 --- a/config/boxen.rb +++ b/config/boxen.rb @@ -8,7 +8,7 @@ ENV['BOXEN_REPO_NAME'] = 'bobisjan/boxen' # Change the project repos directory. -ENV['BOXEN_SRC_DIR'] = '/Users/#{user}/Developer' +ENV['BOXEN_SRC_DIR'] = '~/Developer' # Boxen binary packaging # ENV["BOXEN_S3_ACCESS_KEY"] = ''
Use tilde for user's home folder reference Error: Cannot create /Users/#{user}/Developer; parent directory /Users/#{user} does not exist Error: /Stage[main]/Boxen::Config/File[/Users/#{user}/Developer]/ensure: change from absent to directory failed: Cannot create /Users/#{user}/Developer; parent directory /Users/#{user} does not exist
diff --git a/WireCompiler.podspec b/WireCompiler.podspec index abc1234..def5678 100644 --- a/WireCompiler.podspec +++ b/WireCompiler.podspec @@ -0,0 +1,17 @@+Pod::Spec.new do |s| + s.name = 'WireCompiler' + s.version = "#{ENV['POD_VERSION']}" + s.license = { :type => 'apache2', :file => 'LICENSE.txt' } + s.homepage = 'https://github.com/square/wire' + s.authors = { 'Eric Firestone' => '@firetweet' } + s.summary = 'gRPC and protocol buffer compiler for Android, Kotlin, Java, and Swift.' + s.source = { :git => 'https://github.com/square/wire.git', :tag => "#{ENV['POD_VERSION']}" } + s.module_name = 'WireCompiler' + + s.prepare_command = <<-CMD + ./gradlew -p wire-library :wire-compiler:jar + cp ./wire-library/wire-compiler/build/libs/wire-compiler-*.jar ./compiler.jar + CMD + + s.preserve_paths = 'compiler.jar' +end
Add Podspec for the Wire compiler This podspec downloads the source at a given tag and builds the proto compiler. To publish: ``` git tag <version> git push origin <version> export POD_VERSION=<version> pod repo push WireCompiler.podspec --use-json ```
diff --git a/spec/migrations/migrate_user_project_view_spec.rb b/spec/migrations/migrate_user_project_view_spec.rb index abc1234..def5678 100644 --- a/spec/migrations/migrate_user_project_view_spec.rb +++ b/spec/migrations/migrate_user_project_view_spec.rb @@ -3,15 +3,15 @@ require 'spec_helper' require Rails.root.join('db', 'post_migrate', '20170406142253_migrate_user_project_view.rb') -describe MigrateUserProjectView, :delete do +describe MigrateUserProjectView, :migration do let(:migration) { described_class.new } - let!(:user) { create(:user, project_view: 'readme') } # rubocop:disable RSpec/FactoriesInMigrationSpecs + let!(:user) { table(:users).create!(project_view: User.project_views['readme']) } describe '#up' do it 'updates project view setting with new value' do migration.up - expect(user.reload.project_view).to eq('files') + expect(user.reload.project_view).to eq(User.project_views['files']) end end end
Remove factories from MigrateUserProjectView spec
diff --git a/lib/bundle_info.rb b/lib/bundle_info.rb index abc1234..def5678 100644 --- a/lib/bundle_info.rb +++ b/lib/bundle_info.rb @@ -22,7 +22,7 @@ info = Gems.info dep.name output = "#{dep.name}:".green if info - desc = info['info'].gsub(/\n/, '') + desc = info['info'].gsub(/\n/, ' ') output += " #{desc.truncate(80)}" else output += " Not found on rubygems.org"
Replace newlines with space in description
diff --git a/spec/models/comment_spec.rb b/spec/models/comment_spec.rb index abc1234..def5678 100644 --- a/spec/models/comment_spec.rb +++ b/spec/models/comment_spec.rb @@ -23,4 +23,9 @@ it { should validate_presence_of(:body) } end end + + describe "associations" do + it { should belong_to(:user) } + it { should belong_to(:proposal) } + end end
Add spec of association on Comment
diff --git a/cookbooks/nginx/attributes/passenger.rb b/cookbooks/nginx/attributes/passenger.rb index abc1234..def5678 100644 --- a/cookbooks/nginx/attributes/passenger.rb +++ b/cookbooks/nginx/attributes/passenger.rb @@ -3,5 +3,5 @@ # node.default["nginx"]["passenger"]["version"] = "3.0.12" node.default["nginx"]["passenger"]["root"] = "/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12" -node.default["nginx"]["passenger"]["ruby"] = %x{which ruby}.chomp +node.default["nginx"]["passenger"]["ruby"] = "" node.default["nginx"]["passenger"]["max_pool_size"] = 10
Revert "Import nginx version 1.0.2" This reverts commit 3ea86ebbb81fd48c888eb40992ec76334ef8341d [formerly e60119e116448142a7680a4a3c91c4a051e28c88] [formerly 2b64bffc325ab90e606eff7ae7afe1378199eb8f] [formerly 72829cc41131f1c0d687d6c7c7294e0f0da8101f [formerly 4f3d7d31d0e760e763f8c46d62b28b5ffcfe218d]] [formerly d9572d449811703100f3ffcc23bc6470d05881d8 [formerly 40225e4bac16333f0241d39c346a9f896acd1f7d] [formerly 0ffd32879ffcf3956be9ce66c7d5aa4cec695710 [formerly bcf8920d4cba90e1fc5cc387af4b5696b668c170 [formerly 64c2744372edc401bd8b742b69c8e37f3b2e21bb]]]]. Former-commit-id: dffcfe03b109b5038f6e5f1f97eedaf046702478 [formerly 08c74ea92c5466e925cd928b033defe787dadc27] [formerly 015cae6fbbd1a82c3d78340b731cbf3508c8e727 [formerly f5293a10fe01998065d96c4af63508c3868f214b [formerly ecd5a9871b431f430162226b26a24701622db9a4]]] Former-commit-id: b6941989663ee226a608157890f12132adf7d1b1 [formerly c0b713685a27bfefcf530e61c733981a7bce0cd8] Former-commit-id: eb26b8a8b89673fe47fa03c3e8ca0070bf81c5bb Former-commit-id: 8a9d969e9807b19c3308da9ceecb1992cd4e6506
diff --git a/cookbooks/nginx/attributes/passenger.rb b/cookbooks/nginx/attributes/passenger.rb index abc1234..def5678 100644 --- a/cookbooks/nginx/attributes/passenger.rb +++ b/cookbooks/nginx/attributes/passenger.rb @@ -3,5 +3,5 @@ # node.default["nginx"]["passenger"]["version"] = "3.0.12" node.default["nginx"]["passenger"]["root"] = "/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12" -node.default["nginx"]["passenger"]["ruby"] = %x{which ruby}.chomp +node.default["nginx"]["passenger"]["ruby"] = "" node.default["nginx"]["passenger"]["max_pool_size"] = 10
Remove the nginx attribute that breaks nginx on Windows nodes Former-commit-id: d32d6e8c34b0f31f77f1caa54e3d16c581991ae1 [formerly 834c7c7a1076df6c84a0357d17f5e9bc46241d1f] [formerly e3df03a04ffb0f5c6a3628078c004142146f652e [formerly 8c9c528f0dbf1c3f151580fa006f2d4541ac1898 [formerly bedd9d822add439487ffac98000783fc0b02eb02]]] Former-commit-id: 642478adef91f58744b546339e0faca9999c3737 [formerly 5e643fceaa48e2b8fbf45a01af76f435a035dcae] Former-commit-id: 015c220ad6fc81411c107930b5d32d204b18629f Former-commit-id: 3f032c2cef754c53cf73885c9e810495a252cdc4
diff --git a/core/app/models/spree/promotion_rule.rb b/core/app/models/spree/promotion_rule.rb index abc1234..def5678 100644 --- a/core/app/models/spree/promotion_rule.rb +++ b/core/app/models/spree/promotion_rule.rb @@ -1,8 +1,7 @@ # Base class for all promotion rules module Spree class PromotionRule < Spree::Base - belongs_to :promotion, class_name: 'Spree::Promotion', inverse_of: :promotion_rules, - required: true + belongs_to :promotion, class_name: 'Spree::Promotion', inverse_of: :promotion_rules scope :of_type, ->(t) { where(type: t) }
Drop promotion validation on PromotionRule specs break with it enabled ..
diff --git a/optbind.gemspec b/optbind.gemspec index abc1234..def5678 100644 --- a/optbind.gemspec +++ b/optbind.gemspec @@ -16,7 +16,7 @@ s.add_development_dependency 'bundler', '~> 1.10' s.add_development_dependency 'rake', '~> 10.0' - s.add_development_dependency 'rspec', '~> 3.3.0' + s.add_development_dependency 'rspec', '~> 3.3' s.add_development_dependency 'pry' end
Fix versions in Gem spec
diff --git a/app/controllers/questions.rb b/app/controllers/questions.rb index abc1234..def5678 100644 --- a/app/controllers/questions.rb +++ b/app/controllers/questions.rb @@ -1,4 +1,4 @@-post '/questions/:id/votes' do +post '/questions/:id/vote' do question = Question.find_by(id: params[:id]) case params[:vote_type] @@ -8,12 +8,14 @@ value = -1 end - questions.votes << Vote.new(reaction: value) + vote = Vote.new(reaction: value) + vote.user = current_user + question.votes << vote if request.xhr? - questions.points + question.points else - redirect "/questions/#{questions.id}" + redirect "/questions/#{question.id}" end end
Fix controller route to add vote to question
diff --git a/app/lib/exception_handler.rb b/app/lib/exception_handler.rb index abc1234..def5678 100644 --- a/app/lib/exception_handler.rb +++ b/app/lib/exception_handler.rb @@ -1,10 +1,22 @@ module ExceptionHandler + + # Include in a delegator to a class in order to + # rescue all errors of a certain type for every + # method in that class. + + # Used in Calc, CalcDelegator. Also included in CommonFacade. + + # Thanks to [@shime](https://github.com/shime) for the answer on StackOverflow: + # http://stackoverflow.com/questions/16567243/rescue-all-errors-of-a-specific-type-inside-a-module + extend ActiveSupport::Concern + included do include ActiveSupport::Rescuable rescue_from StandardError, with: :known_error end + def handle_calculation_exceptions yield @@ -12,12 +24,14 @@ 'N/A' end + def handle_template_exceptions yield rescue => e nil end + def known_error(e) Rails.logger.error "[ExceptionHandler] Exception #{e.class}: #{e.message}" end
Add some documentation / cleanup to last commit
diff --git a/app/models/host_aggregate.rb b/app/models/host_aggregate.rb index abc1234..def5678 100644 --- a/app/models/host_aggregate.rb +++ b/app/models/host_aggregate.rb @@ -4,7 +4,6 @@ include Metric::CiMixin include EventMixin include ProviderObjectMixin - include SupportsFeatureMixin acts_as_miq_taggable
Remove duplicate line from Host Aggregate
diff --git a/app/models/sensor_reading.rb b/app/models/sensor_reading.rb index abc1234..def5678 100644 --- a/app/models/sensor_reading.rb +++ b/app/models/sensor_reading.rb @@ -13,7 +13,7 @@ def as_json( options = {} ) super( options.merge( - only: [ :value, :created_at ] + only: [ :value, :setpoint, :created_at ] )) end @@ -28,6 +28,17 @@ end end + def setpoint + case sensor.device.user.temperature_scale + when 'F' + read_attribute( :setpoint ) + when 'C' + fahrenheit_to_celcius( read_attribute(:setpoint) ) + else + read_attribute( :setpoint ) + end + end + private def fahrenheit_to_celcius(degrees)
Convert setpoint to appropriate scale.
diff --git a/codecheck/cradled-else.rb b/codecheck/cradled-else.rb index abc1234..def5678 100644 --- a/codecheck/cradled-else.rb +++ b/codecheck/cradled-else.rb @@ -0,0 +1,16 @@+#!/usr/bin/env ruby + +$:.unshift(File.dirname(__FILE__)) + +require 'all-code' + +all_ironbee_code do |path| + p path if path =~ /radix/ + system( + 'grep', + '-H', + '-n', + '} *else', + path + ) +end
codecheck: Add script to find cradled else statements.
diff --git a/test/models/second_level_browse_page_test.rb b/test/models/second_level_browse_page_test.rb index abc1234..def5678 100644 --- a/test/models/second_level_browse_page_test.rb +++ b/test/models/second_level_browse_page_test.rb @@ -0,0 +1,13 @@+require 'test_helper' + +describe SecondLevelBrowsePage do + describe '#title' do + it 'delegates to the browse page' do + content_store_has_item('/browse/foo/bar', { title: 'Foo Bar' }) + + page = SecondLevelBrowsePage.new('foo', 'bar') + + assert_equal page.title, 'Foo Bar' + end + end +end
Add unit test for page titles This adds a simple test for the title of the second level browse page. Tests for the other page models can be implemented after changing over to content-store for the source.
diff --git a/lib/sidekiq/prioritized_queues/monkeypatches/client.rb b/lib/sidekiq/prioritized_queues/monkeypatches/client.rb index abc1234..def5678 100644 --- a/lib/sidekiq/prioritized_queues/monkeypatches/client.rb +++ b/lib/sidekiq/prioritized_queues/monkeypatches/client.rb @@ -1,21 +1,18 @@+# frozen_string_literal: true + module Sidekiq class Client - private def atomic_push(conn, payloads) - if payloads.first['at'] + if payloads.first['at'.freeze] conn.zadd('schedule'.freeze, payloads.map do |hash| at = hash.delete('at'.freeze).to_s [at, Sidekiq.dump_json(hash)] end) else - q = payloads.first['queue'] + q = payloads.first['queue'.freeze] now = Time.now.to_f - to_push = payloads.map do |entry| - entry['enqueued_at'.freeze] = now - Sidekiq.dump_json(entry) - end conn.sadd('queues'.freeze, q) payloads.each do |entry| to_push = Sidekiq.dump_json(entry)
Align monkey patch to sidekiq 5 the to_push section was not used and the assignment shadowed on a few lines below.
diff --git a/lib/netsuite/records/inventory_adjustment_inventory.rb b/lib/netsuite/records/inventory_adjustment_inventory.rb index abc1234..def5678 100644 --- a/lib/netsuite/records/inventory_adjustment_inventory.rb +++ b/lib/netsuite/records/inventory_adjustment_inventory.rb @@ -11,7 +11,7 @@ field :inventory_detail, InventoryDetail - record_refs :item, :units, :location, :klass + record_refs :item, :units, :location, :department, :klass def initialize(attributes = {}) initialize_from_attributes_hash(attributes)
Add department to inventory adjustment item
diff --git a/automaton.rb b/automaton.rb index abc1234..def5678 100644 --- a/automaton.rb +++ b/automaton.rb @@ -1,5 +1,6 @@ class Automaton - PICTURE = [' ', '█'] + PICTURE = [" ", "█"] + ROW_WIDTH = `/usr/bin/env tput cols`.to_i def display_grid(grid) puts grid.map { |cell| picture(cell) }.join @@ -15,12 +16,13 @@ private def picture(cell) - PICTURE[cell] + PICTURE[cell] || "?" end end if __FILE__ == $PROGRAM_NAME grid = [ 1, 0, 0, 1, 0, 1, 0, 0, 1 ] - Automaton.new.display_grid(grid) - p Automaton.new.neighbourhoods(grid) + automaton = Automaton.new + automaton.display_grid(grid) + p automaton.neighbourhoods(grid) end
Add row width and use one Automation obj
diff --git a/spec/models/mass_email_spec.rb b/spec/models/mass_email_spec.rb index abc1234..def5678 100644 --- a/spec/models/mass_email_spec.rb +++ b/spec/models/mass_email_spec.rb @@ -3,7 +3,7 @@ describe MassEmail do describe "when sending e-mails" do let(:addresses) do - Array.new(50).map do |i| + Array.new(50) do |i| "example#{i}@example.com" end end
Fix spec by creating uniq email addresses
diff --git a/app/controllers/gobierto_participation/processes_controller.rb b/app/controllers/gobierto_participation/processes_controller.rb index abc1234..def5678 100644 --- a/app/controllers/gobierto_participation/processes_controller.rb +++ b/app/controllers/gobierto_participation/processes_controller.rb @@ -3,8 +3,8 @@ module GobiertoParticipation class ProcessesController < GobiertoParticipation::ApplicationController def index - @processes = current_site.processes.process.open - @groups = current_site.processes.group_process.open + @processes = current_site.processes.process.open.active + @groups = current_site.processes.group_process.open.active end def show
Fix active processes and groups in processes view
diff --git a/init.rb b/init.rb index abc1234..def5678 100644 --- a/init.rb +++ b/init.rb @@ -8,6 +8,13 @@ url 'http://github.com/jmcb/update-custom-fields-commit' author_url 'http://githu.com/jmcb' description 'Update specific custom fields, dependent on tracker, when closing an issue via commit.' + settings :default => { 'fields' => + {'tracker' => 0, + 'custom_field' => 0, + 'custom_value' => 0 }, + 'menu' => 'Commit-updated custom fields.' }, + :partial => 'settings/update_custom_fields_on_commit' + version '0.1' requires_redmine :version_or_higher => '0.8.0'
Include the "default" settings and links properly. Hopefully properly.
diff --git a/lib/generators/caffeine/templates/picture_migration.rb b/lib/generators/caffeine/templates/picture_migration.rb index abc1234..def5678 100644 --- a/lib/generators/caffeine/templates/picture_migration.rb +++ b/lib/generators/caffeine/templates/picture_migration.rb @@ -5,6 +5,8 @@ t.string :image_filename t.string :image_content_type t.integer :image_size + t.string :caption + t.text :description t.references :imageable, polymorphic: true, index: true
Add caption and description to pictures