diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/spec/support/sample_api.rb b/spec/support/sample_api.rb index abc1234..def5678 100644 --- a/spec/support/sample_api.rb +++ b/spec/support/sample_api.rb @@ -10,12 +10,12 @@ desc 'create a widget' params do - requires :name, - type: 'string', + requires 'name', + type: String, desc: 'the widgets name', documentation: { example: 'super widget' } optional :description, - type: 'string', + type: String, desc: 'the widgets name', documentation: { example: 'the best widget ever made' } end @@ -24,8 +24,8 @@ desc 'update a widget' params do - optional :name, type: 'string', desc: 'the widgets name' - optional :description, type: 'string', desc: 'the widgets name' + optional :name, type: String, desc: 'the widgets name' + optional :description, type: String, desc: 'the widgets name' end put ':id' do end
Use actual type when defining param in sample api As of grape v0.15.0 it seems the type is being checked and an actual type is required. Using a string will cause a problem [here](https://github.com/ruby-grape/grape/blob/v0.15.0/lib/grape/validations/types.rb#L117-L123)
diff --git a/spec/unix_listener_spec.rb b/spec/unix_listener_spec.rb index abc1234..def5678 100644 --- a/spec/unix_listener_spec.rb +++ b/spec/unix_listener_spec.rb @@ -10,7 +10,7 @@ end it "creates a new UNIXListener" do - listener = Cool.io::UNIXListener.new(@tmp.path) + _listener = Cool.io::UNIXListener.new(@tmp.path) expect(File.socket?(@tmp.path)).to eq(true) end
Add '_' prefix to unused local variable This can suppress following warnings spec/unix_listener_spec.rb:13: warning: assigned but unused variable - listener
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 @@ -1,9 +1,13 @@ module PeopleHelper def administrator? - current_person && current_person.administrator? + current_person.try :administrator? end def promoter? - current_person && current_person.promoter? + current_person.try :promoter? + end + + def official? + current_person.try :official? end end
Add official\? method and use try
diff --git a/app/jobs/story_update_job.rb b/app/jobs/story_update_job.rb index abc1234..def5678 100644 --- a/app/jobs/story_update_job.rb +++ b/app/jobs/story_update_job.rb @@ -13,6 +13,8 @@ def receive_story_update(data) load_resources(data) episode ? update_episode : create_episode + episode.copy_audio + episode.podcast.publish! end alias receive_story_create receive_story_update @@ -36,13 +38,10 @@ def update_episode episode.restore if episode.deleted? episode.update_from_story!(story) - episode.copy_audio - podcast.publish! end def create_episode return unless story && story.try(:series) self.episode = Episode.create_from_story!(story) - episode.copy_audio end end
Remove duplicate publish, and copy_audio calls
diff --git a/week-5/pad-array/my_solution.rb b/week-5/pad-array/my_solution.rb index abc1234..def5678 100644 --- a/week-5/pad-array/my_solution.rb +++ b/week-5/pad-array/my_solution.rb @@ -19,13 +19,36 @@ # 1. Initial Solution -def pad!(array, min_size, value = nil) #destructive - # Your code here -end +# def pad!(array, min_size, value = nil) +# if array.length >= min_size +# return array + +# end +# dif = min_size - array.length +# dif.times do +# array.push value + +# end +# return array + +# end +# pad!([1, 3, 5], 5) def pad(array, min_size, value = nil) #non-destructive - # Your code here -end + if array.length >= min_size + return array + + + end + dif = min_size - array.length + dif.times do + new_ray = Array.new(dif) #{|x| x = value } + + end + return new_ray + + end +pad([1, 3, 5], 5) # 3. Refactored Solution
Add first draft of peer 5.2
diff --git a/lib/capybara/firebug.rb b/lib/capybara/firebug.rb index abc1234..def5678 100644 --- a/lib/capybara/firebug.rb +++ b/lib/capybara/firebug.rb @@ -26,7 +26,7 @@ Capybara::Driver::Selenium.new(app, :browser => :firefox, :profile => profile) end -if defined?(Cucumber) +if defined?(Cucumber::RbSupport) Before '@firebug' do Capybara.current_driver = :selenium_with_firebug end
Check a different constant for Cucumber.
diff --git a/lib/esri_shapefile/converter/svg.rb b/lib/esri_shapefile/converter/svg.rb index abc1234..def5678 100644 --- a/lib/esri_shapefile/converter/svg.rb +++ b/lib/esri_shapefile/converter/svg.rb @@ -40,8 +40,8 @@ width = main_file_header.x_max - main_file_header.x_min header << "<svg " - header << " height=#{height}" - header << " width=#{width}" + header << " height=\"100%\"" + header << " width=\"100%\"" header << " viewbox=\"#{main_file_header.x_min} #{-main_file_header.y_max} #{width} #{height}\" >" header end
Set SVG width and height to 100%
diff --git a/build_tools/aws-sdk-code-generator/aws-sdk-code-generator.gemspec b/build_tools/aws-sdk-code-generator/aws-sdk-code-generator.gemspec index abc1234..def5678 100644 --- a/build_tools/aws-sdk-code-generator/aws-sdk-code-generator.gemspec +++ b/build_tools/aws-sdk-code-generator/aws-sdk-code-generator.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = 'aws-sdk-code-generator' - spec.version = '0.2.0.pre' + spec.version = '0.2.1.pre' spec.summary = 'AWS SDK for Ruby - Code Generator' spec.description = 'Generates the service code for the AWS SDK for Ruby' spec.author = 'Amazon Web Services' @@ -10,5 +10,8 @@ spec.license = 'Apache-2.0' spec.email = ['trevrowe@amazon.com'] spec.require_paths = ['lib'] - spec.files = Dir['lib/**/*.rb'] + spec.files = Dir['lib/**/*.rb'] + Dir['templates/**/*.mustache'] + + spec.add_dependency('kramdown') + spec.add_dependency('mustache') end
Add dependencies and templates to code-gen package.
diff --git a/lib/ordoro/record/purchase_order.rb b/lib/ordoro/record/purchase_order.rb index abc1234..def5678 100644 --- a/lib/ordoro/record/purchase_order.rb +++ b/lib/ordoro/record/purchase_order.rb @@ -4,15 +4,24 @@ module Record class PurchaseOrder < Base - attribute :status - attribute :shipping_method - attribute :items, Array[Ordoro::Record::PurchaseOrderLineItem] - attribute :po_id, String - attribute :company_id, Integer - attribute :warehouse, String - attribute :supplier, Ordoro::Record::Supplier + attribute :status, String, readonly: true + attribute :shipping_method, String + attribute :items, Array[Ordoro::Record::PurchaseOrderLineItem], readonly: true + attribute :po_id, String, writable_on: :create + attribute :company_id, Integer, readonly: true + attribute :warehouse, Integer + attribute :supplier, Ordoro::Record::Supplier, readonly: true attribute :sent, DateTime attribute :instructions, String + + def initialize(attributes={}) + self.po_id = attributes.delete('id_token') + super(attributes) + end + + def persisted? + po_id + end end end end
Allow POs to be marked as sent
diff --git a/lib/rrj/janus/responses/standard.rb b/lib/rrj/janus/responses/standard.rb index abc1234..def5678 100644 --- a/lib/rrj/janus/responses/standard.rb +++ b/lib/rrj/janus/responses/standard.rb @@ -16,11 +16,31 @@ data_id end + # Read response for plugin request + def plugin + request['plugindata'] + end + + # Read data response for plugin request + def plugin_data + plugin['data'] + end + + # Read data response for normal request + def data + request['data'] + end + + # Read SDP response + def sdp + request['jsep']['sdp'] + end + private # Read a hash and return an identifier def data_id - request['data']['id'].to_i + data['id'].to_i rescue => error raise Errors::JanusResponseDataId, error end
Add method for simplify response data
diff --git a/lib/javascript_strip.rb b/lib/javascript_strip.rb index abc1234..def5678 100644 --- a/lib/javascript_strip.rb +++ b/lib/javascript_strip.rb @@ -6,7 +6,7 @@ class Strip attr_reader :html - HTML_EVENT_HANDLERS==%w{onload onunload onchange onsubmit onreset onselect onblur onfocus onkeydown onkeypress onkeyup onclick ondblclick onmousedown onmouseover onmouseout onmouseup} + HTML_EVENT_HANDLERS=%w{onload onunload onchange onsubmit onreset onselect onblur onfocus onkeydown onkeypress onkeyup onclick ondblclick onmousedown onmouseover onmouseout onmouseup} def initialize(html) @html=html
Fix error in constant definition
diff --git a/spec/acceptance/validation_spec.rb b/spec/acceptance/validation_spec.rb index abc1234..def5678 100644 --- a/spec/acceptance/validation_spec.rb +++ b/spec/acceptance/validation_spec.rb @@ -0,0 +1,35 @@+require 'spec_helper_acceptance' + +describe 'concat validate_cmd parameter' do + basedir = default.tmpdir('concat') + context '=> "/usr/bin/test -e %"' do + before(:all) do + pp = <<-EOS + file { '#{basedir}': + ensure => directory + } + EOS + + apply_manifest(pp) + end + pp = <<-EOS + concat { '#{basedir}/file': + validate_cmd => '/usr/bin/test -e %', + } + concat::fragment { 'content': + target => '#{basedir}/file', + content => 'content', + } + EOS + + it 'applies the manifest twice with no stderr' do + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end + + describe file("#{basedir}/file") do + it { should be_file } + it { should contain 'content' } + end + end +end
Add acceptance test for validate_cmd parameter.
diff --git a/test/cookbooks/test/recipes/helloworld_example.rb b/test/cookbooks/test/recipes/helloworld_example.rb index abc1234..def5678 100644 --- a/test/cookbooks/test/recipes/helloworld_example.rb +++ b/test/cookbooks/test/recipes/helloworld_example.rb @@ -1,7 +1,9 @@ tomcat_install 'helloworld' do version '8.0.32' + exclude_examples false end tomcat_service 'helloworld' do action :start + env_vars [{ 'CATALINA_PID' => '/opt/tomcat_helloworld/bin/helloworld.pid' }] end
Extend the test recipe a bit
diff --git a/lib/latinverb_querent_for_classification_builder/querent_mutators/irregular/json_deserializer.rb b/lib/latinverb_querent_for_classification_builder/querent_mutators/irregular/json_deserializer.rb index abc1234..def5678 100644 --- a/lib/latinverb_querent_for_classification_builder/querent_mutators/irregular/json_deserializer.rb +++ b/lib/latinverb_querent_for_classification_builder/querent_mutators/irregular/json_deserializer.rb @@ -18,9 +18,9 @@ private def eager_load_serialized_object - JSON.parse(serialized_verb) + JSON.parse(serialized_verb || '{ "error": true }') rescue JSON::ParserError => e - puts "We were unable to parse JSON for #{@lookup_string} [o:#{o}] [o_sym:#{o_upcase_and_symbolic}]. Please verify your syntax." + puts "We were unable to parse JSON for #{@lookup_string}. Please verify your syntax." raise e rescue NameError => e puts "We were unable to find a definition for #{@lookup_string}"
Handle bug for broken lookup If a serialized_verb is not found, let's parse some bogus JSON instead of blowing up with `nil`.
diff --git a/lib/tasks/populate.rake b/lib/tasks/populate.rake index abc1234..def5678 100644 --- a/lib/tasks/populate.rake +++ b/lib/tasks/populate.rake @@ -0,0 +1,54 @@+require 'open-uri' + +namespace :db do + desc 'Load the legacy data into the databse' + task populate: :environment do + [Medicine, Prescription, Diagnosis, Consultation, Anamnesis, Patient].each(&:delete_all) + + medicines_url = ENV['MEDICINES_SOURCE_URL'] + medicines_buffer = open(medicines_url).read + + raw_medicines = JSON.parse(medicines_buffer) + + medicines = raw_medicines.map do |raw_medicine| + Medicine.new(raw_medicine) + end + + Medicine.import medicines, validate: false + + patients_url = ENV['PATIENTS_SOURCE_URL'] + patients_buffer = open(patients_url).read + + raw_patients = JSON.parse(patients_buffer) + + patients = [] + raw_patients.each do |raw_patient| + patient = Patient.new(raw_patient['attributes']) + + consultations = raw_patient['consultations'] + consultations.each do |consultation| + patient.consultations.build(consultation) + end + patients << patient + end + + Patient.import patients, recursive: true, validate: false + + anamneses_url = ENV['ANAMNESES_SOURCE_URL'] + anamneses_buffer = open(anamneses_url).read + + raw_anamneses = JSON.parse(anamneses_buffer) + + medical_history_to_patient_id = Patient.pluck(:medical_history, :id).to_h + + anamneses = [] + raw_anamneses.each do |raw_anamnesis| + patient_id = medical_history_to_patient_id[raw_anamnesis['medical_history']] + anamnesis = Anamnesis.new(raw_anamnesis['attributes'].merge(patient_id: patient_id)) + + anamneses << anamnesis + end + + Anamnesis.import anamneses + end +end
Add task to import legacy data into the application
diff --git a/lib/thailand/country.rb b/lib/thailand/country.rb index abc1234..def5678 100644 --- a/lib/thailand/country.rb +++ b/lib/thailand/country.rb @@ -26,7 +26,10 @@ end def inspect - "<##{self.class}>" + "#<#{self.class} name: \"#{name}\", official_name: \"#{official_name}\">" end + + alias_method :changwat, :subregions + alias_method :changwat?, :subregions? end end
Update inspect method and add alias methods for Country
diff --git a/lib/tasks/analysis.rake b/lib/tasks/analysis.rake index abc1234..def5678 100644 --- a/lib/tasks/analysis.rake +++ b/lib/tasks/analysis.rake @@ -0,0 +1,13 @@+namespace :analysis do + task :tags_without_propositions => :environment do + + Election.all.each do |election| + puts "=> #{election.name}" + election.election_tags.each do |election_tag| + propositions = Proposition.where(:tag_ids.in => [election_tag.tag.id], :candidacy_id.in => election.candidacies.collect(&:id)) + puts "#{propositions.count}\t#{election_tag.tag.name}" if propositions.count.zero? + end + end + + end +end
Add a rake task to detect tags without propositions
diff --git a/db/migrate/20150429184013_create_fitness_professional_profiles.rb b/db/migrate/20150429184013_create_fitness_professional_profiles.rb index abc1234..def5678 100644 --- a/db/migrate/20150429184013_create_fitness_professional_profiles.rb +++ b/db/migrate/20150429184013_create_fitness_professional_profiles.rb @@ -2,21 +2,21 @@ def change create_table :fitness_professional_profiles do |t| t.string :ethnicity - t.string :training_location + t.text :training_location, array: true t.text :client_space_descrip t.text :independent_facility_descrip t.text :membership_facility_descrip t.text :private_facility_descrip t.text :credentials - t.text :goals, array: true, default: [] + t.text :goals, array: true t.text :goal_specifics - t.text :medical_conditions, array: true, default: [] - t.text :orthopedic_injury_experience, array: true, default: [] - t.text :population_experience, array: true, default: [] + t.text :medical_conditions, array: true + t.text :orthopedic_injury_experience, array: true + t.text :population_experience, array: true t.text :athlete_experience - t.text :training_style, array: true, default: [] - t.text :appointment_lengths, array: true, default: [] - t.text :group_training, array: true, default: [] + t.text :training_style, array: true + t.text :appointment_lengths, array: true + t.text :group_training, array: true t.boolean :consent_waiver t.references :user, index: true
Fix field types and remove array defaults in fitness professional profiles migration
diff --git a/lib/airbrush/processors/image/rmagick.rb b/lib/airbrush/processors/image/rmagick.rb index abc1234..def5678 100644 --- a/lib/airbrush/processors/image/rmagick.rb +++ b/lib/airbrush/processors/image/rmagick.rb @@ -5,6 +5,7 @@ module Image class Rmagick < ImageProcessor before_filter :purify_image + # after_filter :ensure_rgb_profile def resize(image, width, height) img = load(image)
Add after filter for colour profiles afterwards git-svn-id: 6d9b9a8f21f96071dc3ac7ff320f08f2a342ec80@68 daa9635f-4444-0410-9b3d-b8c75a019348
diff --git a/test/system/users_test.rb b/test/system/users_test.rb index abc1234..def5678 100644 --- a/test/system/users_test.rb +++ b/test/system/users_test.rb @@ -1,9 +1,9 @@-require 'application_system_test_case' +require "application_system_test_case" class UsersTest < ApplicationSystemTestCase - test 'visiting the index' do + test "visiting the index" do visit users_url - assert_selector 'h1', text: 'The User' + assert_selector "h1", text: "User" end end
Revert "Set invalid username to ensure testing on circle ci" This reverts commit 4e085d93460c59448623b2b5025999e3993fc6a5.
diff --git a/spec/erlen/schema/documentation_spec.rb b/spec/erlen/schema/documentation_spec.rb index abc1234..def5678 100644 --- a/spec/erlen/schema/documentation_spec.rb +++ b/spec/erlen/schema/documentation_spec.rb @@ -0,0 +1,62 @@+# frozen_string_literal: true + +require 'spec_helper' + +describe Erlen::Schema::Documentation do + describe '#to_markdown' do + it 'looks like markdown' do + allow(Kernel).to receive(:rand).with(100).and_return(74) + allow(Kernel).to receive(:rand).with(2).and_return(0) + expected_doc = <<~END_OF_MARKDOWN + ## TestDoc + + > Example Response + + ```json + + { + "int" : 74, + "less" : { + "flt" : {}, + "time" : "2018-10-19 08:11:38 -0400", + "success" : false + }, + "foos" : [ + "FOOS" + ] + } + ``` + + Attributes | Type | Required | Description + ---------- | ---- | -------- | ----------- + int | Integer | | + less | Test Doc Lesser | | + foos | Array of String | | + + ## TestDocLesser + + + Attributes | Type | Required | Description + ---------- | ---- | -------- | ----------- + flt | Float | true | + time | Time | | + success | Boolean | | + END_OF_MARKDOWN + expect(TestDocSchema.to_markdown).to eq(expected_doc.chomp) + end + end +end + +class TestDocLesserSchema < Erlen::Schema::Base + attribute :flt, Float, required: true + attribute :time, Time + attribute :success, Boolean +end + +class TestDocSchema < Erlen::Schema::Base + extend Erlen::Schema::Documentation + + attribute :int, Integer + attribute :less, TestDocLesserSchema + attribute :foos, Erlen::Schema::ArrayOf.new(String) +end
Use deterministic values for documentation module
diff --git a/lib/jsminc.rb b/lib/jsminc.rb index abc1234..def5678 100644 --- a/lib/jsminc.rb +++ b/lib/jsminc.rb @@ -1,2 +1,2 @@ require "jsminc/version" -require "jsminc.#{Config::CONFIG['DLEXT']}" +require "jsminc.#{RbConfig::CONFIG['DLEXT']}"
Replace deprecated Config with RbConfig
diff --git a/cdq.gemspec b/cdq.gemspec index abc1234..def5678 100644 --- a/cdq.gemspec +++ b/cdq.gemspec @@ -21,7 +21,7 @@ gem.name = "cdq" gem.require_paths = ["lib"] gem.add_runtime_dependency 'ruby-xcdm', '>= 0.0.9' - gem.add_runtime_dependency 'motion-yaml', '= 1.4' + gem.add_runtime_dependency 'motion-yaml', '>= 1.6' gem.executables << 'cdq' gem.version = CDQ::VERSION
Remove motion-yaml 1.4 lock. Allow >= 1.6.
diff --git a/spec/slather/cocoapods_plugin_spec.rb b/spec/slather/cocoapods_plugin_spec.rb index abc1234..def5678 100644 --- a/spec/slather/cocoapods_plugin_spec.rb +++ b/spec/slather/cocoapods_plugin_spec.rb @@ -1,6 +1,6 @@ require 'cocoapods' +require File.join(File.dirname(__FILE__), '..', 'spec_helper') require File.join(File.dirname(__FILE__), '../../lib/cocoapods_plugin') -require File.join(File.dirname(__FILE__), '..', 'spec_helper') describe Slather do describe 'CocoaPods Plugin' do
Load spec_helper before cocoapods_plugin to fix code coverage. Otherwise slather gets required because coverage is started and the main libraries aren't covered.
diff --git a/lib/rspec_api_docs/formatter/resource.rb b/lib/rspec_api_docs/formatter/resource.rb index abc1234..def5678 100644 --- a/lib/rspec_api_docs/formatter/resource.rb +++ b/lib/rspec_api_docs/formatter/resource.rb @@ -5,8 +5,10 @@ module RspecApiDocs class Resource - def initialize(example) - @example = example + attr_reader :rspec_example + + def initialize(rspec_example) + @rspec_example = rspec_example end # The name of the resource. @@ -15,7 +17,7 @@ # # @return [String] def name - metadata.fetch(:resource_name, @example.metadata[:example_group][:description]) + metadata.fetch(:resource_name, rspec_example.metadata[:example_group][:description]) end # The description of the resource. @@ -28,13 +30,13 @@ end def example - Example.new(@example) + Example.new(rspec_example) end private def metadata - @example.metadata[METADATA_NAMESPACE] + rspec_example.metadata[METADATA_NAMESPACE] end end end
Rename example variable to rspec_example
diff --git a/paperclip-optimizer.gemspec b/paperclip-optimizer.gemspec index abc1234..def5678 100644 --- a/paperclip-optimizer.gemspec +++ b/paperclip-optimizer.gemspec @@ -14,11 +14,12 @@ spec.license = "MIT" spec.add_dependency "paperclip", "~> 3.4.1" + spec.add_dependency "image_optim", "~> 0.8" spec.add_development_dependency "bundler", "~> 1.3" spec.add_development_dependency "rake" spec.add_development_dependency 'rspec' - spec.add_development_dependency 'activerecord' + spec.add_development_dependency 'rails' spec.add_development_dependency 'sqlite3' spec.add_runtime_dependency "paperclip"
Add Rails as a dependency for testing
diff --git a/dsvedit.rb b/dsvedit.rb index abc1234..def5678 100644 --- a/dsvedit.rb +++ b/dsvedit.rb @@ -37,7 +37,9 @@ raise e end -rescue ScriptError, StandardError => e +rescue SystemExit, Interrupt + raise +rescue Exception => e logger = Logger.new("crashlog.txt") logger.error e
Fix some types of crashes (such as infinite stack recursion) not being logged related to #62
diff --git a/app/models/social/instagram_hashtag.rb b/app/models/social/instagram_hashtag.rb index abc1234..def5678 100644 --- a/app/models/social/instagram_hashtag.rb +++ b/app/models/social/instagram_hashtag.rb @@ -21,5 +21,9 @@ InstagramPhoto.get_hashtag_photos(instagram_hashtag) end end + + def to_s + self.hashtag + end end end
Add to_s method for printing the name of the hashtag
diff --git a/app/models/spree/shipment_decorator.rb b/app/models/spree/shipment_decorator.rb index abc1234..def5678 100644 --- a/app/models/spree/shipment_decorator.rb +++ b/app/models/spree/shipment_decorator.rb @@ -2,7 +2,7 @@ has_many :fulfillments def fulfillment_provider - shipping_method.calculator.respond_to?(:fulfillment_provider) ? shipping_method.calculator.fulfillment_provider : nil + (shipping_method && shipping_method.calculator && shipping_method.calculator.respond_to?(:fulfillment_provider)) ? shipping_method.calculator.fulfillment_provider : nil end def fulfillment_service
Fix shipment fulfillment provider method to handle missing shipping method or calculator
diff --git a/spec/cc/analyzer/path_patterns_spec.rb b/spec/cc/analyzer/path_patterns_spec.rb index abc1234..def5678 100644 --- a/spec/cc/analyzer/path_patterns_spec.rb +++ b/spec/cc/analyzer/path_patterns_spec.rb @@ -29,6 +29,23 @@ patterns.expanded.sort.must_equal(expected.sort) end + it "works with patterns returned by cc-yaml" do + root = Dir.mktmpdir + make_tree(root, "foo.rb foo.js foo.php") + config = CC::Yaml.parse(<<-EOYAML) + engines: + rubocop: + enabled: true + exclude_paths: + - "*.rb" + - "*.js" + EOYAML + + patterns = PathPatterns.new(config.exclude_paths, root) + + patterns.expanded.sort.must_equal(%w[ foo.js foo.rb ]) + end + def make_tree(root, spec) paths = spec.split(/\s+/).select(&:present?) paths.each do |path|
Add explicit check of PathPatterns with cc-yaml This is to ensure no regressions in this area. PathPatterns is coming to become our defacto glob handler and it must be solid.
diff --git a/dta_rapid.gemspec b/dta_rapid.gemspec index abc1234..def5678 100644 --- a/dta_rapid.gemspec +++ b/dta_rapid.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "dta_rapid" - spec.version = "1.2.6" + spec.version = "1.3.0" spec.authors = ["Gareth Rogers", "Andrew Carr", "Matt Chamberlain"] spec.email = ["grogers@thoughtworks.com", "andrew@2metres.com", "mchamber@thoughtworks.com"]
Bump gem to include feedback widget
diff --git a/lib/announcr.rb b/lib/announcr.rb index abc1234..def5678 100644 --- a/lib/announcr.rb +++ b/lib/announcr.rb @@ -1,5 +1,49 @@ require "announcr/version" +require "announcr/prefix" +require "announcr/namespace" +require "announcr/event" +require "announcr/event_scope" +require "announcr/backends" + module Announcr - # Your code goes here... + extend Prefix + + def self.reset! + @namespaces = {} + @backends = {} + @global_prefix = nil + end + + def self.namespace(name, &block) + reg_name = (opts.delete(:as) || name).to_s.downcase + + ns = Namespace.new(name) + ns.describe(&block) if block_given? + @namespaces[reg_name] = ns + end + + def self.backend(klass, opts = {}) + be = klass.new(opts) + @backends[be.short_name] = be + end + + def self.announce_all(*args) + @namespaces.values.each do |ns| + ns.announce(*args) + end + end + + def self.backend_for(name) + @backends.fetch(name.to_s.downcase) + end + + def self.namespace_for(name) + @namespaces.fetch(name.to_s.downcase) + end + + def self.namespaces; @namespaces; end + def self.backends; @backends; end + + reset! end
Add main gem module and DSL
diff --git a/lib/beso/job.rb b/lib/beso/job.rb index abc1234..def5678 100644 --- a/lib/beso/job.rb +++ b/lib/beso/job.rb @@ -9,7 +9,7 @@ end def prop( name, title=nil ) - @props[ name.to_sym ] = ( title || name.to_s.titleize ) + @props[ name.to_sym ] = "Prop:#{title || name.to_s.titleize}" end def event_title @@ -27,7 +27,7 @@ end EOS - model_class.instance_exec( @props ) do |args| + model_class.instance_exec( @props ) do |props| comma do id 'Identity' created_at 'Timestamp' do |m| @@ -35,8 +35,8 @@ end event_title 'Event' - args.each do |name, title| - self.send name, "Prop:#{title}" + props.each do |name, title| + self.send name, title end end end
Refactor title manipulation out of instance_exec block
diff --git a/app/controllers/old_relation_controller.rb b/app/controllers/old_relation_controller.rb index abc1234..def5678 100644 --- a/app/controllers/old_relation_controller.rb +++ b/app/controllers/old_relation_controller.rb @@ -35,7 +35,7 @@ rescue ActiveRecord::RecordNotFound render :nothing => true, :status => :not_found rescue - render :nothing => true, :status => :internetal_service_error + render :nothing => true, :status => :internal_service_error end end end
Apply patch by Lars from osm dev list with the typo
diff --git a/app/controllers/publications_controller.rb b/app/controllers/publications_controller.rb index abc1234..def5678 100644 --- a/app/controllers/publications_controller.rb +++ b/app/controllers/publications_controller.rb @@ -2,47 +2,35 @@ class PublicationsController < ApplicationController respond_to :json - before_filter :find_publication def show Rails.logger.info("pubctrl: enter #{Time.now.to_f}") data = compose_publication(params[:id], params[:edition], params[:snac]) - head 404 and return unless data - data = compose_publication(params[:id], params[:edition], params[:snac]) - respond_with(data) - end - - def verify_snac - head 404 and return unless @edition - matching_code = params[:snac_codes].detect { |snac| publication.verify_snac(snac) } - - if matching_code - render :json => { snac: matching_code } + if data + respond_with(data) else - render :text => '', :status => 422 + head 404 and return end end -protected + protected def allow_preview? local_request? end - def find_publication + def compose_publication(slug, edition_number, snac) + Rails.logger.info("pubctrl: compose #{slug} #{edition_number}") edition_number = nil unless allow_preview? + Rails.logger.info("pubctrl: finding publication edition #{Time.now.to_f}") edition = WholeEdition.find_and_identify_edition(slug, edition_number) - + Rails.logger.info("pubctrl: found edition #{Time.now.to_f}") return nil if edition.nil? options = {:snac => params[:snac], :all => params[:all]}.select { |k, v| v.present? } + Rails.logger.info("pubctrl: generating hash #{Time.now.to_f}") result = Api::Generator.edition_to_hash(edition, options) + Rails.logger.info("pubctr: exit compose #{Time.now.to_f}") result - @edition = WholeEdition.find_and_identify(slug, edition_number) end - - def compose_publication(slug, edition_number, snac) - options = {:snac => params[:snac], :all => params[:all] }.select { |k, v| v.present? } - Api::Generator.edition_to_hash(@edition, options) - end -end +end
Fix parameter handling for API endpoint
diff --git a/app/controllers/wasabbi_file_controller.rb b/app/controllers/wasabbi_file_controller.rb index abc1234..def5678 100644 --- a/app/controllers/wasabbi_file_controller.rb +++ b/app/controllers/wasabbi_file_controller.rb @@ -10,7 +10,7 @@ raise render(:file => "#{Rails.root}/public/404.html", :layout => false, :status => 404) end - path = File.expand_path(File.join(File.dirname(__FILE__), "..", "public", *file_parts)) + path = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "public", *file_parts)) file_name, extension = if file_parts.last =~ /\.([^.]*)$/ [file_parts.last, $1]
Revert "Fix file controller bug" This reverts commit 32fb75345a2eaebfacccee25f12f6bfae4287d30.
diff --git a/chefapp.rb b/chefapp.rb index abc1234..def5678 100644 --- a/chefapp.rb +++ b/chefapp.rb @@ -5,8 +5,6 @@ get '/' do erb :index end - + end -#ChefApp.run! -
Remove whitespace and commented out code.
diff --git a/app/controllers/districts_controller.rb b/app/controllers/districts_controller.rb index abc1234..def5678 100644 --- a/app/controllers/districts_controller.rb +++ b/app/controllers/districts_controller.rb @@ -22,6 +22,8 @@ end def apply_stack + # Make sure the related resources are in-sync + @district.save! @district.create_or_update_network_stack render status: 202, nothing: true end
Save district before applying stack so that related resources are in-sync
diff --git a/app/controllers/watchlist_controller.rb b/app/controllers/watchlist_controller.rb index abc1234..def5678 100644 --- a/app/controllers/watchlist_controller.rb +++ b/app/controllers/watchlist_controller.rb @@ -19,6 +19,7 @@ @anime = Anime.find(params[:anime_id]) @watch = Watchlist.find_by_anime_id_and_user_id(@anime.id, current_user.id) @watch.delete + @watch = false respond_to do |format| if request.xhr?
Fix remove from watchlist bug.
diff --git a/spec/exif_gps_injector/media_spec.rb b/spec/exif_gps_injector/media_spec.rb index abc1234..def5678 100644 --- a/spec/exif_gps_injector/media_spec.rb +++ b/spec/exif_gps_injector/media_spec.rb @@ -9,5 +9,6 @@ expect(media.tags).to_not eq(nil) expect(media.tags).to_not eq({}) expect(media.tags.count).to be > 0 + expect(media.tags['FileSize']).to eq('1171 bytes') end end
Add spec for specific tags
diff --git a/spec/integration/audit/audit_spec.rb b/spec/integration/audit/audit_spec.rb index abc1234..def5678 100644 --- a/spec/integration/audit/audit_spec.rb +++ b/spec/integration/audit/audit_spec.rb @@ -0,0 +1,80 @@+require "spec_helper" + +require "support/shared/integration/integration_helper" +require "chef/mixin/shell_out" +require "chef-utils/dist" + +describe "chef-client with audit mode" do + + include IntegrationSupport + include Chef::Mixin::ShellOut + + let(:chef_dir) { File.join(__dir__, "..", "..", "..", "bin") } + + # Invoke `chef-client` as `ruby PATH/TO/chef-client`. This ensures the + # following constraints are satisfied: + # * Windows: windows can only run batch scripts as bare executables. Rubygems + # creates batch wrappers for installed gems, but we don't have batch wrappers + # in the source tree. + # * Other `chef-client` in PATH: A common case is running the tests on a + # machine that has omnibus chef installed. In that case we need to ensure + # we're running `chef-client` from the source tree and not the external one. + # cf. CHEF-4914 + let(:chef_client) { "bundle exec #{ChefUtils::Dist::Infra::CLIENT} --minimal-ohai" } + + when_the_repository "has a custom profile" do + before do + directory "profiles/my-profile" do + file "inspec.yml", <<~FILE + --- + name: my-profile + title: a minimal profile + FILE + + directory "controls" do + file "my_control.rb", <<~FILE + control "my control" do + title "Home directory exists" + impact 0.0 + describe Dir.home do + it { should be_kind_of String } + end + end + FILE + end + end + + file "attributes.json", <<~FILE + { + "audit": { + "reporter": ["json-file"], + "profiles": { + "my-profile": { + "path": "#{path_to("profiles/my-profile")}" + } + } + } + } + FILE + end + + it "should complete with success" do + result = shell_out!("#{chef_client} --local-mode --json-attributes #{path_to("attributes.json")}", cwd: chef_dir) + result.error! + + inspec_report = JSON.parse(File.read(Dir["#{Chef::Config[:cache_path]}/audit_reports/audit-*.json"].last)) + expect(inspec_report["profiles"].length).to eq(1) + + profile = inspec_report["profiles"].first + expect(profile["name"]).to eq("my-profile") + expect(profile["controls"].length).to eq(1) + + control = profile["controls"].first + expect(control["id"]).to eq("my control") + expect(control["results"].length).to eq(1) + + result = control["results"].first + expect(result["status"]).to eq("passed") + end + end +end
Add a happy path integration test. Signed-off-by: Pete Higgins <e3b6cda228242c30b711ac17cb264f1dbadfd0b6@peterhiggins.org>
diff --git a/app/models/referrals/withdrawal_history.rb b/app/models/referrals/withdrawal_history.rb index abc1234..def5678 100644 --- a/app/models/referrals/withdrawal_history.rb +++ b/app/models/referrals/withdrawal_history.rb @@ -1,5 +1,6 @@ module Referrals class WithdrawalHistory < ApplicationRecord belongs_to :withdrawal + default_scope { order(created_at: :asc) } end end
Add default scope to withdrawal history
diff --git a/app/models/referent_value.rb b/app/models/referent_value.rb index abc1234..def5678 100644 --- a/app/models/referent_value.rb +++ b/app/models/referent_value.rb @@ -1,4 +1,5 @@ class ReferentValue < ActiveRecord::Base + attr_accessible :key_name, :value, :normalized_value, :metadata, :private_data belongs_to :referent, :include => :referent_values # Class method to normalize a string for normalized_value attribute.
Update referent values for mass assignment issue/requirement in recent rails 3 versions.
diff --git a/app/observers/api_sweeper.rb b/app/observers/api_sweeper.rb index abc1234..def5678 100644 --- a/app/observers/api_sweeper.rb +++ b/app/observers/api_sweeper.rb @@ -2,6 +2,6 @@ observe Category, Entry def after_save record - expire_action(:controller => "/api/sync", :action => "all") + expire_action(:controller => "api/sync", :action => "all") end end
@thenathanjones: Remove the leading slash on the cache action to expire for the namespace
diff --git a/db/seeds.rb b/db/seeds.rb index abc1234..def5678 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -22,6 +22,7 @@ user_id: rand(1..50), commentable_id: rand(1..50), commentable_type: "Question" ) +end 100.times do Answer.create!( content: Faker::Hipster.sentence,
Fix seed file, add 'end'
diff --git a/ddc.gemspec b/ddc.gemspec index abc1234..def5678 100644 --- a/ddc.gemspec +++ b/ddc.gemspec @@ -18,11 +18,11 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] - spec.add_development_dependency "bundler", "~> 1.7" - spec.add_development_dependency "rake", "~> 10.0" - spec.add_development_dependency "rspec", "~> 3.0" + spec.add_development_dependency "bundler", ">= 1.7" + spec.add_development_dependency "rake", ">= 10.0" + spec.add_development_dependency "rspec", ">= 3.0" spec.add_development_dependency "pry" - spec.add_dependency "actionpack", "~> 4.1" - spec.add_dependency "activesupport", "~> 4.1" + spec.add_dependency "actionpack", ">= 4.1" + spec.add_dependency "activesupport", ">= 4.1" end
Upgrade dependencies to support Rails 5.1
diff --git a/src/oca/rm/repo_manager.rb b/src/oca/rm/repo_manager.rb index abc1234..def5678 100644 --- a/src/oca/rm/repo_manager.rb +++ b/src/oca/rm/repo_manager.rb @@ -3,6 +3,7 @@ #require 'storage_pool' require 'uuid' require 'fileutils' +gem 'sequel', '< 3.0' require 'sequel' require 'logger'
Use sequel < 3.0, it breaks repoman git-svn-id: addd40251ba30a5efebfaf2146a7968786ebe177@713 3034c82b-c49b-4eb3-8279-a7acafdc01c0
diff --git a/lib/rich_cms.rb b/lib/rich_cms.rb index abc1234..def5678 100644 --- a/lib/rich_cms.rb +++ b/lib/rich_cms.rb @@ -1,3 +1,5 @@+require 'jzip' +require 'sass/plugin' require "config/routes"
Add 2 requires in order to fix apps in the test environment. One require on sass should not be needed and should be investigated.
diff --git a/lib/ruby_ami.rb b/lib/ruby_ami.rb index abc1234..def5678 100644 --- a/lib/ruby_ami.rb +++ b/lib/ruby_ami.rb @@ -13,10 +13,6 @@ module RubyAMI def self.new_uuid SecureRandom.uuid - end - - def self.rbx? - RbConfig::CONFIG['RUBY_INSTALL_NAME'] == 'rbx' end end
[CS] Remove unused code to check for RBX
diff --git a/lib/testjour.rb b/lib/testjour.rb index abc1234..def5678 100644 --- a/lib/testjour.rb +++ b/lib/testjour.rb @@ -18,7 +18,7 @@ return @logger if @logger @logger = Logger.new("log/testjour.log") @logger.formatter = proc { |severity, time, progname, msg| "#{time.strftime("%b %d %H:%M:%S")} [#{$PID}]: #{msg}\n" } - @logger.level = Logger::INFO + @logger.level = ENV["TESTJOUR_LOG"] || Logger::INFO @logger end
Allow environment variable to override log level
diff --git a/lib/keymap.rb b/lib/keymap.rb index abc1234..def5678 100644 --- a/lib/keymap.rb +++ b/lib/keymap.rb @@ -16,6 +16,7 @@ '/' => 'HELP', '?' => 'HELP', 'b' => 'BLANK', + '.' => 'BLANK', 'F' => 'FOOTER', 'f' => 'FOLLOW', 'n' => 'NOTES', @@ -23,6 +24,7 @@ 'p' => 'PAUSE', 'P' => 'PRESHOW', 'x' => 'EXECUTE', + 'f5' => 'EXECUTE', } end end
Add a couple keyboard shortcuts This allows the popular Logitech R800 to be used out of the box for full control, including screen blanking and code execution. The play button will run code on first tap, then clear results on second.
diff --git a/lib/mailer.rb b/lib/mailer.rb index abc1234..def5678 100644 --- a/lib/mailer.rb +++ b/lib/mailer.rb @@ -0,0 +1,21 @@+require 'pony' +class Mailer + def self.send(address, subject, message) + Pony.mail( + to: address, + from: "government_api_validator@continuity.net", + subject: subject, + body: message, + via: :smtp, + via_options: { + address: 'smtp.sendgrid.net', + port: '587', + domain: 'continuity.net', + user_name: ENV['SENDGRID_USERNAME'], + password: ENV['SENDGRID_PASSWORD'], + authentication: :plain, + enable_starttls_auto: true + } + ) + end +end
Add Mailer class to send email to an address, with a subject and message.
diff --git a/lib/string.rb b/lib/string.rb index abc1234..def5678 100644 --- a/lib/string.rb +++ b/lib/string.rb @@ -9,9 +9,4 @@ .tr('-', '_') .downcase end - - # Alias to .to_snake - def underscore - self.to_snake - end end
Remove String.underscore due to Rails conflict
diff --git a/load_average.rb b/load_average.rb index abc1234..def5678 100644 --- a/load_average.rb +++ b/load_average.rb @@ -0,0 +1,78 @@+# +# load_average.rb +# +# This fact provides information about the load average on the underlying +# system for last one, five and fifteen minutes; plus number of currently +# running processes and the total number of processes, and last process +# ID that was used recently. +# + +if Facter.value(:kernel) == 'Linux' + # + # We utilise rely on "cat" for reading values from entries under "/proc". + # This is due to some problems with IO#read in Ruby and reading content of + # the "proc" file system that was reported more than once in the past ... + # + data = Facter::Util::Resolution.exec('cat /proc/loadavg 2> /dev/null') + data = data.split(' ') + + # + # Modern Linux kernels provide "/proc/loadavg" in the following format: + # + # 0.26 0.16 0.09 1/256 16384 + # + # Where the first three columns represent CPU and IO utilisation for the + # last one, five and fifteen minute time periods. This utilisation refers + # to the average number of processes that are either in a runnable or + # uninterruptable state. A process in runnable state is either using the + # CPU (gets its slice of time) or waiting to use CPU time. + # + # The fourth column shows the number of currently running processes to the + # total number of prcesses on the system. + # + # The fifth and the last column shows last process ID that was used. + # + + # Extract currently running and total processes ... + running_processes = data[3].split('/').first + total_processes = data[3].split('/').last + + # The one, five and fifteen minutes together ... + Facter.add('load_average') do + confine :kernel => :linux + setcode { data[0,3].join(',') } + end + + Facter.add('load_average_1') do + confine :kernel => :linux + setcode { data[0] } + end + + Facter.add('load_average_5') do + confine :kernel => :linux + setcode { data[1] } + end + + Facter.add('load_average_15') do + confine :kernel => :linux + setcode { data[2] } + end + + Facter.add('running_processes') do + confine :kernel => :linux + setcode { running_processes } + end + + Facter.add('total_processes') do + confine :kernel => :linux + setcode { total_processes } + end + + Facter.add('last_pid') do + confine :kernel => :linux + setcode { data[4] } + end +end + +# vim: set ts=2 sw=2 et : +# encoding: utf-8
Add Facter fact that provides information about the load average, etc ... This fact provides information about the load average on the underlying system for last one, five and fifteen minutes; plus number of currently running processes and the total number of processes, and last process ID that was used recently. Signed-off-by: Krzysztof Wilczynski <9bf091559fc98493329f7d619638c79e91ccf029@linux.com>
diff --git a/test/integration/round_creation_test.rb b/test/integration/round_creation_test.rb index abc1234..def5678 100644 --- a/test/integration/round_creation_test.rb +++ b/test/integration/round_creation_test.rb @@ -7,5 +7,10 @@ post '/round/' + assigns[:round].url, charity: 'test_charity' assert_response :success + + assert_equal 'test_charity', assigns[:round].charity + + get '/round/' + assigns[:round].url + assert_response :success end end
Test round can be viewed via GET after creation
diff --git a/hiera-aws.gemspec b/hiera-aws.gemspec index abc1234..def5678 100644 --- a/hiera-aws.gemspec +++ b/hiera-aws.gemspec @@ -23,4 +23,5 @@ spec.add_development_dependency "bundler" spec.add_development_dependency "rake" spec.add_development_dependency "rspec" + spec.add_development_dependency "rubocop" end
Add rubocop as dev dependency
diff --git a/spec/models/oauth_authentication_spec.rb b/spec/models/oauth_authentication_spec.rb index abc1234..def5678 100644 --- a/spec/models/oauth_authentication_spec.rb +++ b/spec/models/oauth_authentication_spec.rb @@ -18,15 +18,6 @@ is_expected.to be_valid subject.provider = nil is_expected.to model_have_error_on_field(:provider) - end - - context 'two factor authentication is enabled' do - it 'is invalid' do - is_expected.to be_valid - subject.user.update!(otp_secret: User.generate_otp_secret(32), otp_required_for_login: true) - is_expected.to be_invalid - expect(subject.errors).to be_added(:base, :enabled_two_factor_authentication) - end end end
Remove a spec for the useless validation
diff --git a/lib/necromancer/converters/hash.rb b/lib/necromancer/converters/hash.rb index abc1234..def5678 100644 --- a/lib/necromancer/converters/hash.rb +++ b/lib/necromancer/converters/hash.rb @@ -15,7 +15,7 @@ # # => {a: "1", b: "2", c: "3"} # # @api public - def call(value, string: config.strict) + def call(value, strict: config.strict) values = value.split(/\s*[& ]\s*/) values.each_with_object({}) do |pair, pairs| key, value = pair.split(/[=:]/, 2)
Change to fix option name
diff --git a/lib/omniauth/strategies/twitter.rb b/lib/omniauth/strategies/twitter.rb index abc1234..def5678 100644 --- a/lib/omniauth/strategies/twitter.rb +++ b/lib/omniauth/strategies/twitter.rb @@ -5,7 +5,8 @@ module Strategies class Twitter < OmniAuth::Strategies::OAuth option :name, 'twitter' - option :client_options, {:site => 'https://api.twitter.com'} + option :client_options, {:authorize_path => '/oauth/authenticate', + :site => 'https://api.twitter.com'} uid { access_token.params[:user_id] }
Patch updating authorisation per Twitter authentication Prevents authorising from opening Allow prompt on every authentication attempt. See: https://dev.twitter.com/docs/api/1/get/oauth/authenticate
diff --git a/lib/puffery/builder/expanded_ad.rb b/lib/puffery/builder/expanded_ad.rb index abc1234..def5678 100644 --- a/lib/puffery/builder/expanded_ad.rb +++ b/lib/puffery/builder/expanded_ad.rb @@ -10,8 +10,8 @@ attribute :description, max_chars: 80 - attribute :path1 - attribute :path2 + attribute :path1, max_chars: 15 + attribute :path2, max_chars: 15 attribute :url, max_bytesize: 1024
Set max_chars 15 for path1 and path2
diff --git a/adapters/spec/spec_helper.rb b/adapters/spec/spec_helper.rb index abc1234..def5678 100644 --- a/adapters/spec/spec_helper.rb +++ b/adapters/spec/spec_helper.rb @@ -1,7 +1,8 @@ $LOAD_PATH.push File.expand_path('../../abc/', __FILE__) -require 'abc-adapters' require 'simplecov' SimpleCov.start do add_filter "/spec/" end + +require 'abc-adapters'
Fix coverage config in adapters module Coverage was reporting 0%. This was because simplecov wasn't placed before the abc-adapters part was loaded. Shuffling that one line fixed the coverage report.
diff --git a/lib/stevenson/output_filter/zip.rb b/lib/stevenson/output_filter/zip.rb index abc1234..def5678 100644 --- a/lib/stevenson/output_filter/zip.rb +++ b/lib/stevenson/output_filter/zip.rb @@ -31,17 +31,17 @@ end def writeEntries(entries, path, io) - entries.each { |e| - zipFilePath = path == "" ? e : File.join(path, e) + entries.each do |entry| + zipFilePath = path == "" ? entry : File.join(path, entry) diskFilePath = File.join(@inputDir, zipFilePath) if File.directory?(diskFilePath) io.mkdir(zipFilePath) subdir =Dir.entries(diskFilePath); subdir.delete("."); subdir.delete("..") writeEntries(subdir, zipFilePath, io) else - io.get_output_stream(zipFilePath) { |f| f.puts(File.open(diskFilePath, "rb").read())} + io.get_output_stream(zipFilePath) { |f| f.puts(File.open(diskFilePath, "rb").read()) } end - } + end end end end
Use do..end syntax for multiline-blocks
diff --git a/config/initializers/raven.rb b/config/initializers/raven.rb index abc1234..def5678 100644 --- a/config/initializers/raven.rb +++ b/config/initializers/raven.rb @@ -2,4 +2,5 @@ # httpclient is the only faraday adpater which handles no_proxy config.http_adapter = :httpclient config.send_modules = false + config.app_dirs_pattern = /(app|bin|config|lib|plugins|spec)/ end
Tweak sentry to include plugins in app only stacktraces
diff --git a/config/projects/angrychef.rb b/config/projects/angrychef.rb index abc1234..def5678 100644 --- a/config/projects/angrychef.rb +++ b/config/projects/angrychef.rb @@ -0,0 +1,28 @@+# +# Copyright:: Copyright (c) 2012 Opscode, Inc. +# 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. +# + +# This is a clone of chef that we can install on build and test machines +# without interfering with the regular build/test. + +name "angrychef" + +install_path "/opt/angrychef" +build_version Omnibus::BuildVersion.full +build_iteration "4" + +dependencies ["preparation","chef","version-manifest"] +
Add a project to build chef in separate directory We cannot install vanilla omnibus packages on the machines that build or test omnibus packages because they conflict over the /opt/chef directory. We could install w/ rubygems but on some platforms omnibus is the only viable method we have for building chef and all of it's deps. Therefore, we need a secondary chef package that we can use to manage the omnibus build and test machines.
diff --git a/lib/globalize/active_record/translation.rb b/lib/globalize/active_record/translation.rb index abc1234..def5678 100644 --- a/lib/globalize/active_record/translation.rb +++ b/lib/globalize/active_record/translation.rb @@ -1,6 +1,9 @@ module Globalize module ActiveRecord class Translation < ::ActiveRecord::Base + + attr_accessible :locale + class << self # Sometimes ActiveRecord queries .table_exists? before the table name # has even been set which results in catastrophic failure.
Update Translation model to make :locale accessible
diff --git a/lib/hydra_attribute/association_builder.rb b/lib/hydra_attribute/association_builder.rb index abc1234..def5678 100644 --- a/lib/hydra_attribute/association_builder.rb +++ b/lib/hydra_attribute/association_builder.rb @@ -25,7 +25,7 @@ def add_association_for_class assoc = config.association(@type) unless @klass.reflect_on_association(assoc) - @klass.has_many assoc, as: :entity, class_name: config.associated_model_name(@type), autosave: true, dependent: :destroy + @klass.has_many assoc, as: :entity, class_name: config.associated_model_name(@type), autosave: true, dependent: :delete_all end end
Use delete_all instead destroy for removing hydra attributes
diff --git a/lib/inheritance_integer_type/extensions.rb b/lib/inheritance_integer_type/extensions.rb index abc1234..def5678 100644 --- a/lib/inheritance_integer_type/extensions.rb +++ b/lib/inheritance_integer_type/extensions.rb @@ -21,7 +21,7 @@ included do class << self def _inheritance_mapping - @_inheritance_mapping ||= (superclass == ActiveRecord::Base ? {} : superclass._inheritance_mapping) + @_inheritance_mapping ||= (superclass == ActiveRecord::Base ? {} : superclass._inheritance_mapping.dup) end def _inheritance_mapping=(val)
Copy parents' mappings instead of accidentally sharing.
diff --git a/lib/localstorageshim-rails/view_helpers.rb b/lib/localstorageshim-rails/view_helpers.rb index abc1234..def5678 100644 --- a/lib/localstorageshim-rails/view_helpers.rb +++ b/lib/localstorageshim-rails/view_helpers.rb @@ -3,7 +3,7 @@ def localstorage_shim <<-HTML.strip.html_safe <!--[if lte IE 7]> - <script src="#{asset_path 'localstorageshim'}" type="text/javascript" id="ie-localstorage-shim"></script> + <script src="#{asset_path 'localstorageshim.js'}" type="text/javascript" id="ie-localstorage-shim"></script> <![endif]--> HTML end
Add .js ext to localstorageshim asset path
diff --git a/lib/puppet/provider/database_user/mysql.rb b/lib/puppet/provider/database_user/mysql.rb index abc1234..def5678 100644 --- a/lib/puppet/provider/database_user/mysql.rb +++ b/lib/puppet/provider/database_user/mysql.rb @@ -9,7 +9,7 @@ def self.instances users = mysql("mysql", '-BNe' "select concat(User, '@',Host) as User from mysql.user").split("\n") - users.select{ |user| user =~ /\.+@/ }.collect do |name| + users.select{ |user| user =~ /.+@/ }.collect do |name| new(:name => name) end end
Fix bug when querying for all database users This commit fixes an issue in self.instances of database_user where none of the users were actually being detected. There was a accidental '\' in front of the '.' which means that it will only consider users that have one or more '.' in front of the '@'. This commit removes the '\' so that all users are returned that have one or more characters in from of an '@'.
diff --git a/RKKiwiMatchers.podspec b/RKKiwiMatchers.podspec index abc1234..def5678 100644 --- a/RKKiwiMatchers.podspec +++ b/RKKiwiMatchers.podspec @@ -15,7 +15,7 @@ s.source_files = 'Code/*.{h,m}' # NOTE: The RestKit dependency is not specified within the Podspec because this pod is designed to be exclusively linked into the unit testing bundle target. Directly specifying RestKit causes the compilation of a secondary copy of the library. - #s.dependency 'RestKit/Testing', '>= 0.20.0pre4' + #s.dependency 'RestKit/Testing', '>= 0.20.0' s.dependency 'Kiwi', '~> 2.0.0' # Add Core Data to the PCH (This should be optional, but there's no good way to configure this with CocoaPods at the moment)
Remove pre from Testing Podspec reference
diff --git a/OROpenSubtitleDownloader.podspec b/OROpenSubtitleDownloader.podspec index abc1234..def5678 100644 --- a/OROpenSubtitleDownloader.podspec +++ b/OROpenSubtitleDownloader.podspec @@ -5,11 +5,11 @@ s.homepage = "https://github.com/orta/OROpenSubtitleDownloader" s.license = { :type => 'BSD', :file => 'LICENSE' } s.author = { "orta" => "orta.therox@gmail.com" } - s.source = { :git => "https://github.com/orta/OROpenSubtitleDownloader.git", :commit => :head } + s.source = { :git => "https://github.com/orta/OROpenSubtitleDownloader.git", :tag => "1.1.1" } s.source_files = 'OROpenSubtitleDownloader.{h,m}' s.library = 'z' s.requires_arc = true - + s.ios.deployment_target = '7.0' s.osx.deployment_target = '10.9'
Fix podspec to conforms sources to a specific tag
diff --git a/app/controllers/admins/registrations_controller.rb b/app/controllers/admins/registrations_controller.rb index abc1234..def5678 100644 --- a/app/controllers/admins/registrations_controller.rb +++ b/app/controllers/admins/registrations_controller.rb @@ -7,4 +7,10 @@ def check_first_user redirect_to new_admin_session_url if Admin.first end -end+ + def sign_up_params + # The first user is attached to the first team + team = Team.find_or_create_by(id: 1) + devise_parameter_sanitizer.sanitize(:sign_up).merge(team_id: team.id) + end +end
Attach the first user to the first team
diff --git a/app/views/api/v1/declarables/_declarable.json.rabl b/app/views/api/v1/declarables/_declarable.json.rabl index abc1234..def5678 100644 --- a/app/views/api/v1/declarables/_declarable.json.rabl +++ b/app/views/api/v1/declarables/_declarable.json.rabl @@ -4,10 +4,18 @@ child :section do attributes :title, :position, :numeral + + node(:section_note, if: lambda { |section| section.section_note.present? }) do |section| + section.section_note.content + end end child :chapter do attributes :goods_nomenclature_item_id, :description, :formatted_description + + node(:chapter_note, if: lambda {|chapter| chapter.chapter_note.present? }) do |chapter| + chapter.chapter_note.content + end end child :footnote do
Add notes to chapter and section nodes of commodity response
diff --git a/backend/app/helpers/spree/promotion_rules_helper.rb b/backend/app/helpers/spree/promotion_rules_helper.rb index abc1234..def5678 100644 --- a/backend/app/helpers/spree/promotion_rules_helper.rb +++ b/backend/app/helpers/spree/promotion_rules_helper.rb @@ -2,8 +2,8 @@ module PromotionRulesHelper def options_for_promotion_rule_types(promotion) existing = promotion.rules.map { |rule| rule.class.name } - rule_names = Rails.application.config.spree.promotions.rules.map(&:name).reject{ |r| existing.include? r } - options = rule_names.map { |name| [Spree.t("promotion_rule_types.#{name.demodulize.underscore}.name"), name] } + rules = Rails.application.config.spree.promotions.rules.reject { |r| existing.include? r.name } + options = rules.map { |rule| [rule.model_name.human, rule.name] } options_for_select(options) end end
Use i18n model_name syntax for promotion rules This change opts to use the model_name.human syntax over the previous convoluted Spree.t and demodulize method.
diff --git a/modules/openx/spec/default/spec.rb b/modules/openx/spec/default/spec.rb index abc1234..def5678 100644 --- a/modules/openx/spec/default/spec.rb +++ b/modules/openx/spec/default/spec.rb @@ -7,3 +7,7 @@ describe port(443) do it { should be_listening } end + +describe command('curl localhost/admin/install.php -L -H "Host: example.com"') do + its(:stdout) { should match 'OpenX' } +end
Add curl test for openx
diff --git a/spec/jobs/audit_job_spec.rb b/spec/jobs/audit_job_spec.rb index abc1234..def5678 100644 --- a/spec/jobs/audit_job_spec.rb +++ b/spec/jobs/audit_job_spec.rb @@ -8,21 +8,20 @@ @file.apply_depositor_metadata(@user) @file.save end - after do - @file.delete - end describe "passing audit" do it "should not send passing mail" do - allow_any_instance_of(ActiveFedora::RelsExtDatastream).to receive(:dsChecksumValid).and_return(true) - AuditJob.new(@file.pid, "RELS-EXT", @file.rels_ext.versionID).run + skip "skipping audit for now" + allow_any_instance_of(GenericFileRdfDatastream).to receive(:dsChecksumValid).and_return(true) + AuditJob.new(@file.pid, "descMetadata", @file.descMetadata.versionID).run @inbox = @user.mailbox.inbox expect(@inbox.count).to eq(0) end end describe "failing audit" do it "should send failing mail" do - allow_any_instance_of(ActiveFedora::RelsExtDatastream).to receive(:dsChecksumValid).and_return(false) - AuditJob.new(@file.pid, "RELS-EXT", @file.rels_ext.versionID).run + skip "skipping audit for now" + allow_any_instance_of(GenericFileRdfDatastream).to receive(:dsChecksumValid).and_return(false) + AuditJob.new(@file.pid, "descMetadata", @file.descMetadata.versionID).run @inbox = @user.mailbox.inbox expect(@inbox.count).to eq(1) @inbox.each { |msg| expect(msg.last_message.subject).to eq(AuditJob::FAIL) }
Mark audit job tests as pending
diff --git a/db/migrate/20150618193748_create_skills.rb b/db/migrate/20150618193748_create_skills.rb index abc1234..def5678 100644 --- a/db/migrate/20150618193748_create_skills.rb +++ b/db/migrate/20150618193748_create_skills.rb @@ -2,7 +2,7 @@ def change create_table :skills do |t| t.string :title, null: false - t.integer :current_streak, default: 0 + t.integer :current_streak, default: 1 t.integer :longest_streak, default: 1 t.integer :expiration_time
Change default of current_streak to 1
diff --git a/config/initializers/_libs.rb b/config/initializers/_libs.rb index abc1234..def5678 100644 --- a/config/initializers/_libs.rb +++ b/config/initializers/_libs.rb @@ -8,8 +8,6 @@ require 'blank_to_nil' require 'date_tools' require 'csv' -# FIXME -#require 'csv_serialization' require 'openssl' require 'base64' require 'digest/sha1'
Remove csv serialization file. Not needed?
diff --git a/app/controllers/subnet_topology_controller.rb b/app/controllers/subnet_topology_controller.rb index abc1234..def5678 100644 --- a/app/controllers/subnet_topology_controller.rb +++ b/app/controllers/subnet_topology_controller.rb @@ -0,0 +1,18 @@+class SubnetTopologyController < ApplicationController + include TopologyMixin + + before_action :check_privileges + before_action :get_session_data + after_action :cleanup_action + after_action :set_session_data + + private + + def get_session_data + @layout = "subnet_topology" + end + + def generate_topology(provider_id) + SubnetTopologyService.new(provider_id).build_topology + end +end
Add new subnet topology controller
diff --git a/app/serializers/helpdesk_ticket_serializer.rb b/app/serializers/helpdesk_ticket_serializer.rb index abc1234..def5678 100644 --- a/app/serializers/helpdesk_ticket_serializer.rb +++ b/app/serializers/helpdesk_ticket_serializer.rb @@ -6,6 +6,7 @@ :target_grade, :description, :is_resolved, + :is_closed, :created_at, :resolved_at, :minutes_to_resolve @@ -35,6 +36,7 @@ :task_definition_id, :description, :is_resolved, + :is_closed, :created_at, :resolved_at, :minutes_to_resolve
QUALITY: Add missing is_closed field to ticket serialiser
diff --git a/octokit.gemspec b/octokit.gemspec index abc1234..def5678 100644 --- a/octokit.gemspec +++ b/octokit.gemspec @@ -17,7 +17,7 @@ spec.name = 'octokit' spec.require_paths = ['lib'] spec.required_rubygems_version = '>= 1.3.5' - spec.summary = spec.description + spec.summary = "Ruby toolkit for working with the GitHub API" spec.test_files = Dir.glob("spec/**/*") spec.version = Octokit::VERSION.dup end
Update gemspec to avoid build warning
diff --git a/lib/expression.rb b/lib/expression.rb index abc1234..def5678 100644 --- a/lib/expression.rb +++ b/lib/expression.rb @@ -14,7 +14,7 @@ if rand > (1/(2**depth) + 0.05) op = create_terminal(variable_terminals) else - op = Expression::Base.create(variable_terminals, depth + 1) + op = ::Expression.create(variable_terminals, depth + 1) end return op
Update reference to Expression class
diff --git a/platforms/ios/framework/Tangram-es.podspec b/platforms/ios/framework/Tangram-es.podspec index abc1234..def5678 100644 --- a/platforms/ios/framework/Tangram-es.podspec +++ b/platforms/ios/framework/Tangram-es.podspec @@ -8,7 +8,7 @@ s.homepage = 'https://github.com/tangrams/tangram-es' s.license = { :type => 'MIT', :file => 'LICENSE' } s.author = 'Mapzen' - s.documentation_url = 'http://tangrams.github.io/tangram-docs/docs/API-Reference/ios-framework/0.9.0/' + s.documentation_url = 'https://tangrams.readthedocs.io/en/latest/API-Reference/ios-framework/0.10.0/index.html' s.source = { :http => "https://dl.bintray.com/tangrams/cocoapods/#{s.version}-release.zip"
Update iOS podspec docs URL
diff --git a/app/models/activity.rb b/app/models/activity.rb index abc1234..def5678 100644 --- a/app/models/activity.rb +++ b/app/models/activity.rb @@ -5,12 +5,12 @@ validates :project, :presence => true, :allow_blank => false validates :person, :presence => true, :allow_blank => false - attr_accessor :minutes, :hours - # Scopes scope :by_date, lambda {|value| where(:date => value)} # Duration + attr_accessor :minutes, :hours + validates_date :date, :allow_nil => false, :allow_blank => false validates :duration_from, :presence => true, :unless => :hours_minutes validates :duration_to, :presence => true, :unless => :hours_minutes
Move some code to more logic place in Activity.
diff --git a/app/models/settings.rb b/app/models/settings.rb index abc1234..def5678 100644 --- a/app/models/settings.rb +++ b/app/models/settings.rb @@ -1,7 +1,6 @@ class Settings < ActiveRecord::Base - @instance = first - def self.instance + @instance ||= first @instance ||= new end end
Fix circular dependency while loading Settings [SCI-1004]
diff --git a/plugin/dtrace/lib/dtrace_report.rb b/plugin/dtrace/lib/dtrace_report.rb index abc1234..def5678 100644 --- a/plugin/dtrace/lib/dtrace_report.rb +++ b/plugin/dtrace/lib/dtrace_report.rb @@ -5,6 +5,7 @@ def self.included(base) base.extend DtraceMacro + @@tracer = nil end module DtraceMacro @@ -43,19 +44,23 @@ end def enable_dtrace - @@tracer.start_dtrace($$) + if @@tracer + @@tracer.start_dtrace($$) + end end def append_dtrace_report - @dtrace_script = @@tracer.script - @dtrace_report = @@tracer.end_dtrace - # yuck! - old_template_root = @template.base_path - begin - @template.view_paths = File.expand_path(File.dirname(__FILE__) + '/../views') - response.body.gsub!(/<\/body/, @template.render(:partial => 'dtrace/report') + '</body') - ensure - @template.view_paths = old_template_root + if @@tracer + @dtrace_script = @@tracer.script + @dtrace_report = @@tracer.end_dtrace + # yuck! + old_template_root = @template.base_path + begin + @template.view_paths = File.expand_path(File.dirname(__FILE__) + '/../views') + response.body.gsub!(/<\/body/, @template.render(:partial => 'dtrace/report') + '</body') + ensure + @template.view_paths = old_template_root + end end end
Handle the case where you have the plugin installed but not switched on. git-svn-id: 40196796c19c0e7557af02d93710b150381d7241@92 f5dbc166-08e2-44d3-850c-36126807790f
diff --git a/db/migrate/20170117100902_combine_items_in_cart.rb b/db/migrate/20170117100902_combine_items_in_cart.rb index abc1234..def5678 100644 --- a/db/migrate/20170117100902_combine_items_in_cart.rb +++ b/db/migrate/20170117100902_combine_items_in_cart.rb @@ -18,4 +18,17 @@ end end end + + def down + # + LineItem.where('quantity>1').each do |line_item| + #add individual items + line_item.quantity.times do + LineItem.create cart_id: line_item.cart_id, product_id: line_item.product_id, quantity: 1 + end + + #removing existing entry + line_item.destroy + end + end end
Add reverse method for counting product quantity in cart
diff --git a/poker-dice/hand_spec.rb b/poker-dice/hand_spec.rb index abc1234..def5678 100644 --- a/poker-dice/hand_spec.rb +++ b/poker-dice/hand_spec.rb @@ -3,13 +3,13 @@ describe Hand do it "has five dice, each of which has a known face value" do - dice = 5.times.map { LoadedDie.new('Q') } + dice = %w[ Q Q Q Q Q ].map { |value| LoadedDie.new(value) } hand = Hand.new( dice ) expect( hand.face_values ).to eq( %w[ Q Q Q Q Q ] ) end specify "a Hand with five Queens is ranked as 'five of a kind'" do - dice = 5.times.map { LoadedDie.new('Q') } + dice = %w[ Q Q Q Q Q ].map { |value| LoadedDie.new(value) } hand = Hand.new( dice ) expect( hand.rank ).to eq( 'Five of a kind' ) end
Make all the lines that create dice be consistent
diff --git a/ruby_git_hooks.gemspec b/ruby_git_hooks.gemspec index abc1234..def5678 100644 --- a/ruby_git_hooks.gemspec +++ b/ruby_git_hooks.gemspec @@ -22,6 +22,8 @@ spec.require_paths = ["lib"] spec.bindir = "bin" + spec.add_runtime_dependency "pony" # For email + spec.add_development_dependency "bundler", "~> 1.3" spec.add_development_dependency "rake" end
Include Pony gem in gemspec for email notification
diff --git a/app/resources/api/v1/searchable_resource.rb b/app/resources/api/v1/searchable_resource.rb index abc1234..def5678 100644 --- a/app/resources/api/v1/searchable_resource.rb +++ b/app/resources/api/v1/searchable_resource.rb @@ -8,17 +8,35 @@ key_type :string def self.find_by_key(text, options = {}) - search_results = PgSearch.multisearch(text).limit(5). + search_results = PgSearch.multisearch(text). + where(searchable_type: 'Development').limit(5). map(&:searchable). map { |record| wrap_with_resource(record) } - location = MapzenSearch.new(text).result || null - if location.properties['confidence'] > 0.75 - search_results.unshift LocationResource.new(location, context: {}) - end + loc = MapzenSearch.new(text).result || null + search_results.unshift place_resource(text) if no_place?(search_results) + search_results.unshift location_resource(loc) if confident_in_location?(loc) search_results end private + + def self.location_resource(location) + LocationResource.new(location, context: {}) + end + + def self.confident_in_location?(location) + location.properties['confidence'] > 0.75 + end + + def self.place_resource(text) + PlaceResource.new( + Place.like(text).first, context: {} + ) + end + + def self.no_place?(search_results) + search_results.select { |r| r.is_a?(PlaceResource) }.empty? + end def self.null OpenStruct.new(geometry: {}, properties: { 'confidence' => 0 })
Move Places toward top of search. Why: Searching for "Bedford", for example, didn't return desired results -- to see that municipality. Now, we put the matching municipality on top of the search results.
diff --git a/test/cir_test_case.rb b/test/cir_test_case.rb index abc1234..def5678 100644 --- a/test/cir_test_case.rb +++ b/test/cir_test_case.rb @@ -0,0 +1,61 @@+require 'cir' +require 'tmpdir' +require 'test/unit' +require 'fileutils' + +## +# Parent test case that will contain shared functionality that we need +# across various test cases. +class CirTestCase < Test::Unit::TestCase + + ## + # Prepare each test, currently: + # * Forward stderr and stdout to /dev/null + # * Prepare working directory (in tmp space) + def setup + # Create working directory + @workDir = Dir.mktmpdir(["cir_test_", "_#{self.class.name}"]) + @repoDir = "#{@workDir}/repo" + + # Forward stderr/stdout to /dev/null to not mess with test output + @original_stderr = $stderr + @original_stdout = $stdout + $stderr = File.open(File::NULL, "w") + $stdout = File.open(File::NULL, "w") + end + + ## + # Undo all the changes we did in #setup + def teardown + # Remove forwarding of stderr/stdout to /dev/null + $stderr = @original_stderr + $stdout = @original_stdout + + # Cleaning up working directory + FileUtils.rm_rf(@workDir, secure: true) + end + + ## + # Create new file with given file name inside the work directory + # and return absolute path to the created file. + def create_file(fileName, content) + full_path = "#{@workDir}/#{fileName}" + File.open(full_path, 'w') { |f| f.write(content) } + full_path + end + + ## + # Initialize Cir::Repository inside @repoDir and persist that inside + # @repo variable (e.g. we have max 1 repo per test instance). + def init_repo + Cir::Repository.create(@repoDir) + @repo = Cir::Repository.new(@repoDir) + end + + ## + # Initialize only git repository (no metadata) and persist that inside + # @repo variable. + def init_git_repo + @repo = Cir::GitRepository.create(@repoDir) + end +end
Add missing parent test case class
diff --git a/script/cruise_build.rb b/script/cruise_build.rb index abc1234..def5678 100644 --- a/script/cruise_build.rb +++ b/script/cruise_build.rb @@ -8,7 +8,7 @@ project_name = ARGV.first case project_name -when "racing_on_rails" +when "racing_on_rails", "montanacycling_branch" exec "rake cruise" when "aba", "atra", "obra", "wsba" exec "rm -rf local && git clone git@butlerpress.com:#{project_name}.git local && rake cruise"
Add cc.rb CI config for montana cycling branch without /local
diff --git a/resque-logstash.gemspec b/resque-logstash.gemspec index abc1234..def5678 100644 --- a/resque-logstash.gemspec +++ b/resque-logstash.gemspec @@ -8,8 +8,8 @@ spec.version = Resque::Logstash::VERSION spec.authors = ["Eugene Pimenov"] spec.email = ["eugene@libc.st"] - spec.description = %q{TODO: Write a gem description} - spec.summary = %q{TODO: Write a gem summary} + spec.description = %q{Measure duration of a resque job and log it in the logstash} + spec.summary = %q{A really simple logstash logger for resque} spec.homepage = "" spec.license = "MIT"
Add description and summary in the gemspec Bundler was complaining about FIXME in both of them
diff --git a/Casks/appcode-eap-bundled-jdk.rb b/Casks/appcode-eap-bundled-jdk.rb index abc1234..def5678 100644 --- a/Casks/appcode-eap-bundled-jdk.rb +++ b/Casks/appcode-eap-bundled-jdk.rb @@ -0,0 +1,21 @@+cask :v1 => 'appcode-eap-bundled-jdk' do + version '141.1399.2' + sha256 'f9f9b7ae73321a1d4a31aaaed7ebb2d15ada03d65ae9f436756ade1ea29c2f83' + + url "https://download.jetbrains.com/objc/AppCode-#{version}-custom-jdk-bundled.dmg" + name 'AppCode' + homepage 'https://confluence.jetbrains.com/display/OBJC/AppCode+EAP' + license :commercial + + app 'AppCode EAP.app' + + zap :delete => [ + '~/Library/Preferences/com.jetbrains.AppCode-EAP.plist', + '~/Library/Preferences/AppCode32', + '~/Library/Application Support/AppCode32', + '~/Library/Caches/AppCode32', + '~/Library/Logs/AppCode32', + ] + + conflicts_with :cask => 'appcode-eap' +end
Add cask for AppCode EAP with bundled JDK
diff --git a/reactive_record.gemspec b/reactive_record.gemspec index abc1234..def5678 100644 --- a/reactive_record.gemspec +++ b/reactive_record.gemspec @@ -13,7 +13,7 @@ gem.homepage = "https://github.com/twopoint718/reactive_record" gem.licenses = ['MIT'] - gem.files = `git ls-files`.split($/) + gem.files = [`git ls-files`.split($/), "lib/parser.rb"] gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) } gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) gem.require_paths = ["lib"]
Fix missing parser.rb in packaged gem
diff --git a/metadata.rb b/metadata.rb index abc1234..def5678 100644 --- a/metadata.rb +++ b/metadata.rb @@ -10,4 +10,3 @@ depends 'python' depends 'runit' -depends 'mercurial'
Drop mercurial like it's hot
diff --git a/metadata.rb b/metadata.rb index abc1234..def5678 100644 --- a/metadata.rb +++ b/metadata.rb @@ -9,7 +9,7 @@ depends 'apt' depends 'ubuntu_base', '0.6.0' -depends 'octobase', '0.4.0' +depends 'octobase', '0.5.0' depends 'docker', '0.2.0' depends 'redis' depends 'nodejs'
Make sure newer octobase is used.
diff --git a/metadata.rb b/metadata.rb index abc1234..def5678 100644 --- a/metadata.rb +++ b/metadata.rb @@ -6,7 +6,7 @@ long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version '0.2.1' -depends 'yum', '~> 3.0' +depends 'yum', '~> 3.2' %w(amazon centos fedora oracle redhat scientific).each do |os| supports os
Update yum dep from 3.0 to 3.2
diff --git a/metadata.rb b/metadata.rb index abc1234..def5678 100644 --- a/metadata.rb +++ b/metadata.rb @@ -9,6 +9,6 @@ source_url 'https://github.com/evertrue/s3_put-cookbook' if respond_to?(:source_url) issues_url 'https://github.com/evertrue/s3_put-cookbook/issues' if respond_to?(:issues_url) -supports 'ubuntu', '>= 12.04' +supports 'ubuntu', '>= 14.04' chef_version '>= 12.5'
Update meta to properly reflect testing/support This cookbook isn’t tested on Ubuntu 12, and it’s EOL anyway.
diff --git a/metadata.rb b/metadata.rb index abc1234..def5678 100644 --- a/metadata.rb +++ b/metadata.rb @@ -6,7 +6,7 @@ long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version '2.2.0' -depends 'compat_resource', '>= 12.14.6' +depends 'compat_resource', '>= 12.14.7' depends 'yum-epel' %w(amazon centos fedora oracle redhat scientific).each do |os|
Use a slightly better compat_resource Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>