diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/spec/factories/article_factory.rb b/spec/factories/article_factory.rb index abc1234..def5678 100644 --- a/spec/factories/article_factory.rb +++ b/spec/factories/article_factory.rb @@ -3,7 +3,7 @@ author factory: :user title { Faker::Lorem.sentence } slug { title.parameterize } - content { Faker::Lorem.paragraphs(1).first } + content { Faker::Hacker.say_something_smart } trait :stale do created_at 7.months.ago
Make Article factory use fake hacker-speak Way better than Lorem and will help me detect if full-text search on content works properly because these are actual English word and not fake latin.
diff --git a/spec/dummy_app/app/active_record/team.rb b/spec/dummy_app/app/active_record/team.rb index abc1234..def5678 100644 --- a/spec/dummy_app/app/active_record/team.rb +++ b/spec/dummy_app/app/active_record/team.rb @@ -5,7 +5,7 @@ attr_accessible :name, :division_id, :logo_url, :manager, :ballpark, :mascot, :founded, :wins, :losses, :win_percentage, :revenue, :color, :custom_field, :fan_ids, :player_ids, :comment_ids belongs_to :division - has_many :players, :inverse_of => :team + has_many :players, :inverse_of => :team, :order => :id has_and_belongs_to_many :fans has_many :comments, :as => :commentable
Fix non-deterministic code in spec
diff --git a/spec/parser/ruby/ast_node_spec.rb b/spec/parser/ruby/ast_node_spec.rb index abc1234..def5678 100644 --- a/spec/parser/ruby/ast_node_spec.rb +++ b/spec/parser/ruby/ast_node_spec.rb @@ -20,10 +20,15 @@ describe '#pretty_print' do it "should show a list of nodes" do + obj = YARD::Parser::Ruby::RubyParser.parse("# x\nbye", "x").ast out = StringIO.new - PP.pp(s(:paren, s(:list, s(:ident, "bye"), line: 1)), out) + PP.pp(obj, out) out.rewind - out.read.should == "s(:paren,\n s(s(:ident, \"bye\", line: 0...0, source: 0...0), line: 1, source: 0..0))\n" + out.read.should == "s(s(:var_ref,\n" + + " s(:ident, \"bye\", line: 2..2, source: 4..6),\n" + + " docstring: \"x\",\n" + + " line: 2..2,\n" + + " source: 4..6))\n" end end end
Update pretty print to test docstring
diff --git a/spec/unit/multi/auto_spin_spec.rb b/spec/unit/multi/auto_spin_spec.rb index abc1234..def5678 100644 --- a/spec/unit/multi/auto_spin_spec.rb +++ b/spec/unit/multi/auto_spin_spec.rb @@ -33,6 +33,6 @@ # Ensure that top level is successful as well if all jobs run # expect(spinners.success?).to eq(true) - expect(jobs).to eq(['one', 'two']) + expect(jobs).to match_array(['one', 'two']) end end
Change to ensure order does not matter
diff --git a/climate_control.gemspec b/climate_control.gemspec index abc1234..def5678 100644 --- a/climate_control.gemspec +++ b/climate_control.gemspec @@ -11,6 +11,7 @@ gem.description = %q{Modify your ENV} gem.summary = %q{Modify your ENV easily with ClimateControl} gem.homepage = "https://github.com/thoughtbot/climate_control" + gem.license = "MIT" gem.files = `git ls-files`.split($/) gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
Add license info to gemspec
diff --git a/Lokaligo.podspec b/Lokaligo.podspec index abc1234..def5678 100644 --- a/Lokaligo.podspec +++ b/Lokaligo.podspec @@ -10,7 +10,7 @@ spec.public_header_files = "LokaligoSDK.framework/**/*.h" spec.preserve_paths = "LokaligoSDK.framework" spec.summary = 'Quick and easy management of the localization process for your app.' - spec.source = { :http => 'http://ocs-pl.oktawave.com/v1/AUTH_f6c4cb3b-0d15-4229-a596-a8677b4f5606/downloads/lokaligo_ios_sdk.zip' } + spec.source = { :http => 'http://ocs-pl.oktawave.com/v1/AUTH_f6c4cb3b-0d15-4229-a596-a8677b4f5606/downloads/lokaligo_ios_sdk.zip', :sha1 => '7d8d2d1c920884b39718e3021118a0f746817402' } spec.requires_arc = true spec.vendored_frameworks = 'LokaligoSDK.framework' end
Add sha1 for the source.
diff --git a/lib/smart_answer/calculators/energy_grants_calculator.rb b/lib/smart_answer/calculators/energy_grants_calculator.rb index abc1234..def5678 100644 --- a/lib/smart_answer/calculators/energy_grants_calculator.rb +++ b/lib/smart_answer/calculators/energy_grants_calculator.rb @@ -45,7 +45,7 @@ end def measure_help? - %w(help_energy_efficiency help_boiler_measure).include?(which_help) ? :measure_help : nil + %w(help_energy_efficiency help_boiler_measure).include?(which_help) end end end
Make measure_help? method return a boolean The `:measure_help` symbol is not used anywhere and the method is always used as if it was returning a boolean.
diff --git a/Casks/keepassx.rb b/Casks/keepassx.rb index abc1234..def5678 100644 --- a/Casks/keepassx.rb +++ b/Casks/keepassx.rb @@ -1,8 +1,8 @@ class Keepassx < Cask - url 'https://www.keepassx.org/dev/attachments/download/59/KeePassX-2.0-alpha5.dmg' + url 'https://www.keepassx.org/dev/attachments/download/72/KeePassX-2.0-alpha6.dmg' homepage 'http://www.keepassx.org' - version '2.0-alpha5' - sha256 '7d1e3de8446421d1c4cb920364907de3d03cd3eaedfa96602fac8983479a5303' + version '2.0-alpha6' + sha256 '55aeaba8257d728b62ba173ba56df27897552737a556dc1e4e4ed6dcd3d6dd8a' link 'KeePassX.app' # This caveat added Mar 2014. OK to delete it after 3-4 months. caveats <<-EOS.undent
Update KeePassX to latest version Сhangelog: https://www.keepassx.org/news/2014/04/433
diff --git a/Casks/owncloud.rb b/Casks/owncloud.rb index abc1234..def5678 100644 --- a/Casks/owncloud.rb +++ b/Casks/owncloud.rb @@ -4,7 +4,7 @@ url "https://download.owncloud.com/desktop/stable/ownCloud-#{version}.pkg" name 'ownCloud' - homepage 'http://owncloud.com' + homepage 'https://owncloud.com/' license :gpl pkg "ownCloud-#{version}.pkg"
Fix homepage to use SSL in ownCloud Cask The HTTP URL is already getting redirected to HTTPS. Using the HTTPS URL directly makes it more secure and saves a HTTP round-trip.
diff --git a/Casks/python26.rb b/Casks/python26.rb index abc1234..def5678 100644 --- a/Casks/python26.rb +++ b/Casks/python26.rb @@ -3,7 +3,7 @@ sha256 'f3683e71af5cd96dfd838c76ef7011ca0521562fb2f0d8c30a43dffe62d57c49' url "https://www.python.org/ftp/python/#{version}/python-#{version}-macosx10.3.dmg" - homepage 'http://www.python.org/' + homepage 'https://www.python.org/' license :oss pkg 'Python.mpkg'
Update Python26 homepage URL to https
diff --git a/lib/alchemy/upgrader/four_point_one.rb b/lib/alchemy/upgrader/four_point_one.rb index abc1234..def5678 100644 --- a/lib/alchemy/upgrader/four_point_one.rb +++ b/lib/alchemy/upgrader/four_point_one.rb @@ -21,6 +21,19 @@ All your existing tags have been migrated to `Gutentag::Tag`s. + Removed Rails and non-English translations + ------------------------------------------ + + Removed the Rails translations from our translation files and moved all non-english translation + files into the newly introduced `alchemy_i18n` gem. + + If you need more translations than the default English one you can either put `alchemy_i18n` + in to your apps `Gemfile` or - recommended - copy only the translation files you need into your + apps `config/locales` folder. + + For the Rails translations either put the rails-i18n gem into your apps Gemfile or - recommended - + copy only the translation files you need into your apps config/locales folder. + NOTE todo notice, 'Alchemy v4.1 changes' end
Add note about translation removals to upgrader
diff --git a/test/test_helper.rb b/test/test_helper.rb index abc1234..def5678 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -41,7 +41,7 @@ end def teardown - return if !FakeFS.activated? + return unless FakeFS.activated? FakeFS.deactivate! flunk "always deactivate FakeFs after test run" end
Fix tiny rubocop violation in test using unless for negative condition
diff --git a/test/test_helper.rb b/test/test_helper.rb index abc1234..def5678 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -2,7 +2,8 @@ require File.expand_path("../dummy/config/environment.rb", __FILE__) require "codeclimate-test-reporter" -#CodeClimate::TestReporter.start + +CodeClimate::TestReporter.start require "rails/test_help" require "shoulda-context"
Enable again Code Climate test reporter
diff --git a/test/test_helper.rb b/test/test_helper.rb index abc1234..def5678 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,8 +1,10 @@ ENV['RAILS_ENV'] ||= 'test' # Set the working dir to a temp location +require 'tmpdir' require 'fileutils' -ENV['WORKING_DIR'] = './tmp/working' +ENV['WORKING_DIR'] = Dir.tmpdir +FileUtils.rm_rf(ENV['WORKING_DIR']) require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help'
Revert "don't use tmpdir to get a temp location for blueprint testing" This reverts commit 332f5eea1e673945ab699535aa558343009da52d.
diff --git a/features/support/env.rb b/features/support/env.rb index abc1234..def5678 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -27,7 +27,7 @@ (ENV.keys-ignore_env).select{|x| x =~ /\A[A-Z_]*\Z/}.each do |key| c.filter_sensitive_data("<#{key}>") { ENV[key] } end - c.default_cassette_options = { :record => :new_episodes } + c.default_cassette_options = { :record => :once } c.cassette_library_dir = 'fixtures/vcr_cassettes' c.hook_into :webmock end
Set VCR to record once
diff --git a/colocated-charters-script.rb b/colocated-charters-script.rb index abc1234..def5678 100644 --- a/colocated-charters-script.rb +++ b/colocated-charters-script.rb @@ -5,7 +5,7 @@ charter_school = v.find { |x| x[3] == "Charter"} if charter_school != nil colocated_addresses_w_charter << {k => v} - v.each {|x| charters_colocation << x} + # v.each {|x| charters_colocation << x} end end colocated_addresses_w_charter
Comment out line where data is added to colocated charter csv - not needed anymore since CSV has already been created
diff --git a/fail_to_ban.gemspec b/fail_to_ban.gemspec index abc1234..def5678 100644 --- a/fail_to_ban.gemspec +++ b/fail_to_ban.gemspec @@ -12,15 +12,6 @@ spec.summary = %q{Lib for handle burte force with key} spec.homepage = "https://github.com/jobteaser/cockpit" - # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host' - # to allow pushing to a single host or delete this section to allow pushing to any host. - if spec.respond_to?(:metadata) - spec.metadata['allowed_push_host'] = "https://github.com/jobteaser/fail_to_ban" - else - raise "RubyGems 2.0 or newer is required to protect against " \ - "public gem pushes." - end - spec.files = `git ls-files -z`.split("\x0").reject do |f| f.match(%r{^(test|spec|features)/}) end
Remove allowed_push_host from the gemspec
diff --git a/lib/adminable/presenters/entries_presenter.rb b/lib/adminable/presenters/entries_presenter.rb index abc1234..def5678 100644 --- a/lib/adminable/presenters/entries_presenter.rb +++ b/lib/adminable/presenters/entries_presenter.rb @@ -31,9 +31,7 @@ view.link_to(entry.to_name, edit_polymorphic_path(entry)) end - if collection_size_residue > 0 - string << I18n.t('adminable.ui.and_more', size: collection_size_residue) - end + string << and_more_tag if collection_size_residue > 0 string.join(', ').html_safe end @@ -45,5 +43,13 @@ def collection_size_residue @collection_residue ||= collection.size - ENTRIES_LIMIT end + + def and_more_tag + view.content_tag( + :span, + I18n.t('adminable.ui.and_more', size: collection_size_residue), + class: 'text-muted' + ) + end end end
Add tag for and_more for entries presenter
diff --git a/omnibus/config/software/ruby-windows-system-libraries.rb b/omnibus/config/software/ruby-windows-system-libraries.rb index abc1234..def5678 100644 --- a/omnibus/config/software/ruby-windows-system-libraries.rb +++ b/omnibus/config/software/ruby-windows-system-libraries.rb @@ -11,7 +11,10 @@ if windows? # Needed now that we switched to msys2 and have not figured out how to tell # it how to statically link yet - dlls = ["libwinpthread-1"] + dlls = [ + "libwinpthread-1", + "libstdc++-6" + ] if windows_arch_i386? dlls << "libgcc_s_dw2-1" else
Make sure to include libstc++-6
diff --git a/lib/friendly_id/datamapper_adapter/version.rb b/lib/friendly_id/datamapper_adapter/version.rb index abc1234..def5678 100644 --- a/lib/friendly_id/datamapper_adapter/version.rb +++ b/lib/friendly_id/datamapper_adapter/version.rb @@ -3,7 +3,7 @@ module Version MAJOR = 3 MINOR = 0 - TINY = 0 + TINY = 6 STRING = [MAJOR, MINOR, TINY].join(".") end end
Update VERSION to match latest friendly_id release Signed-off-by: Alex Coles <60c6d277a8bd81de7fdde19201bf9c58a3df08f4@alexcolesportfolio.com>
diff --git a/lib/rbtc_arbitrage/clients/bitstamp_client.rb b/lib/rbtc_arbitrage/clients/bitstamp_client.rb index abc1234..def5678 100644 --- a/lib/rbtc_arbitrage/clients/bitstamp_client.rb +++ b/lib/rbtc_arbitrage/clients/bitstamp_client.rb @@ -6,7 +6,7 @@ def balance return @balance if @balance balances = Bitstamp.balance - @balance = [balances[0].to_f, balances[1].to_f] + @balance = [balances["btc_available"].to_f, balances["usd_available"].to_f] end def validate_env @@ -49,4 +49,4 @@ end end end -end+end
Fix for bitstamp bitcoin client.
diff --git a/test/lib/catissue/domain/address_test.rb b/test/lib/catissue/domain/address_test.rb index abc1234..def5678 100644 --- a/test/lib/catissue/domain/address_test.rb +++ b/test/lib/catissue/domain/address_test.rb @@ -1,4 +1,4 @@-require File.join(File.dirname(__FILE__), '..', 'test_case') +require File.dirname(__FILE__) + '/../helpers/test_case' require 'caruby/util/uniquifier' class AddressTest < Test::Unit::TestCase @@ -21,12 +21,13 @@ end def test_save - assert_raises(CaRuby::DatabaseError, "Address save without owner incorrectly saved") { @addr.save } - @addr.user = @user + # Create the address. verify_save(@addr) - expected = @addr.street = "#{Uniquifier.qualifier} Elm" + # Modify the address. + expected = @addr.street = "#{Uniquifier.qualifier} Elm St." verify_save(@addr) + # Find the address. fetched = @addr.copy(:identifier).find assert_equal(expected, fetched.street, "Address street not saved") end -end+end
Address does not reference the owner.
diff --git a/week-4/concatenate-arrays/my_solution.rb b/week-4/concatenate-arrays/my_solution.rb index abc1234..def5678 100644 --- a/week-4/concatenate-arrays/my_solution.rb +++ b/week-4/concatenate-arrays/my_solution.rb @@ -4,6 +4,16 @@ # Your Solution Below + + + +def array_concat(array_1, array_2) + +array_2.each {|x| array_1<<x} +array_1.flatten + +end + def array_concat(array_1, array_2)
Add solution for challenge 4.6
diff --git a/TDNotificationPanel.podspec b/TDNotificationPanel.podspec index abc1234..def5678 100644 --- a/TDNotificationPanel.podspec +++ b/TDNotificationPanel.podspec @@ -4,7 +4,7 @@ s.summary = "TDNotificationPanel is a drop in class that displays a notification panel." s.homepage = "https://github.com/tomdiggle/TDNotificationPanel" s.screenshots = "http://www.tomdiggle.com/assets/images/tdnotificationpanel-error.jpg", "http://www.tomdiggle.com/assets/images/tdnotificationpanel-success.jpg", "http://www.tomdiggle.com/assets/images/tdnotificationpanel-message.jpg", "http://www.tomdiggle.com/assets/images/tdnotificationpanel-progressbar.jpg" - s.license = { :type => 'MIT', :file => 'LICENSE' } + s.license = 'MIT' s.author = { "Tom Diggle" => "tom@tomdiggle.com" } s.source = { :git => "https://github.com/tomdiggle/TDNotificationPanel.git", :tag => "0.3.1" } s.requires_arc = true
Change license to not include license file
diff --git a/Titanium.podspec b/Titanium.podspec index abc1234..def5678 100644 --- a/Titanium.podspec +++ b/Titanium.podspec @@ -1,7 +1,11 @@ Pod::Spec.new do |s| s.name = "Titanium" + s.version = "0.7" + + s.license = { :type => "MIT" } + s.summary = "Image viewer library" s.description = <<-DESC
Set license type to “MIT”
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -3,6 +3,11 @@ to: GovukHealthcheck.rack_response( GovukHealthcheck::ActiveRecord, ) + + get "/healthcheck/live", to: proc { [200, {}, %w[OK]] } + get "/healthcheck/ready", to: GovukHealthcheck.rack_response( + GovukHealthcheck::ActiveRecord, + ) # Permanently redirect any requests for the root URL to /admin root to: redirect("/admin", status: 301)
Add RFC 141 healthcheck endpoints Once govuk-puppet has been updated, the old endpoint can be removed. See the RFC for more details.
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -38,7 +38,8 @@ to: proc { [200, {}, - [ENV['GRANTZILLA_LETS_ENCRYPT_CHALLENGE_ID'] || 'The GRANTZILLA_LETS_ENCRYPT_CHALLENGE_ID environment variable is not set.']] + [ENV['GRANTZILLA_LETS_ENCRYPT_CHALLENGE_ID'] || + 'The GRANTZILLA_LETS_ENCRYPT_CHALLENGE_ID environment variable is not set.']] } root 'grants#index'
issue-289: Make rubocop happy with last change.
diff --git a/app/controllers/spree/api/v1/taxons_controller_decorator.rb b/app/controllers/spree/api/v1/taxons_controller_decorator.rb index abc1234..def5678 100644 --- a/app/controllers/spree/api/v1/taxons_controller_decorator.rb +++ b/app/controllers/spree/api/v1/taxons_controller_decorator.rb @@ -3,6 +3,9 @@ module V1 TaxonsController.class_eval do + # Allow for users to follow brands. Since + # brands are represented by taxons, we + # join users to taxons. def follow taxon = Spree::Taxon.find(params[:id]) @@ -16,6 +19,8 @@ end end + # Allow for users to remove themselves + # from following a particular brand. def unfollow taxon = Spree::Taxon.find(params[:id]) taxon.users.delete(current_api_user)
Comment controller actions for following/unfollowing
diff --git a/app/models/contact_message.rb b/app/models/contact_message.rb index abc1234..def5678 100644 --- a/app/models/contact_message.rb +++ b/app/models/contact_message.rb @@ -7,7 +7,7 @@ validates :name, presence: true, length: { maximum: 100 } validates :email, presence: true, email: true, length: { maximum: 100 } - validates :message, presence: true, length: { maximum: 100 } + validates :message, presence: true, length: { maximum: 2000 } def initialize(attributes = {}) unless attributes.nil?
Increase length for contact message to 2000 characters.
diff --git a/Library/Homebrew/test/dev-cmd/ruby_spec.rb b/Library/Homebrew/test/dev-cmd/ruby_spec.rb index abc1234..def5678 100644 --- a/Library/Homebrew/test/dev-cmd/ruby_spec.rb +++ b/Library/Homebrew/test/dev-cmd/ruby_spec.rb @@ -15,3 +15,17 @@ .and not_to_output.to_stderr end end + +describe "brew ruby -e 'puts \"testball\".f.path'", :integration_test do + let!(:target) do + target_path = setup_test_formula "testball" + { path: target_path } + end + + it "prints the path of a test formula" do + expect { brew "ruby", "-e", "puts 'testball'.f.path" } + .to be_a_success + .and output(/^#{target[:path]}$/).to_stdout + .and not_to_output.to_stderr + end +end
Test for `brew ruby -e 'puts "testball".f.path'` This test aims to prevent regressions of #9362.
diff --git a/carquery.gemspec b/carquery.gemspec index abc1234..def5678 100644 --- a/carquery.gemspec +++ b/carquery.gemspec @@ -6,8 +6,8 @@ Gem::Specification.new do |spec| spec.name = "carquery" spec.version = Carquery::VERSION - spec.authors = ["Rustam Sharshenov"] - spec.email = ["rustam@sharshenov.com"] + spec.authors = ["Mason Wiley", "Rustam Sharshenov"] + spec.email = ["masonwiley92@gmail.com", "rustam@sharshenov.com"] spec.description = %q{www.carqueryapi.com API client} spec.summary = %q{Provides DSL for a www.carqueryapi.com API.} spec.homepage = ""
Add Mason to an authors list
diff --git a/spec/class2/exercise1_spec.rb b/spec/class2/exercise1_spec.rb index abc1234..def5678 100644 --- a/spec/class2/exercise1_spec.rb +++ b/spec/class2/exercise1_spec.rb @@ -7,7 +7,7 @@ expect { exercise1 }.to output.to_stdout end - it 'display the hours in year' do + it 'display the hours in a year' do expect { exercise1 }.to output("8760\n").to_stdout end end
Fix typo with class 2 exercise 1 spec
diff --git a/spec/requests/catalog_spec.rb b/spec/requests/catalog_spec.rb index abc1234..def5678 100644 --- a/spec/requests/catalog_spec.rb +++ b/spec/requests/catalog_spec.rb @@ -16,6 +16,7 @@ expect(service.fetch('bindable')).to be_true expect(service.fetch('metadata')).to eq( { + 'provider' => { 'name' => nil }, 'listing' => { 'imageUrl' => nil, 'blurb' => 'MySQL service for application development and testing', @@ -33,9 +34,9 @@ { 'cost' => 0.0, 'bullets' => [ - { 'content' => 'Shared MySQL server'}, - { 'content' => '5 MB storage'}, - { 'content' => '40 concurrent connections'}, + { 'content' => 'Shared MySQL server' }, + { 'content' => '5 MB storage' }, + { 'content' => '40 concurrent connections' }, ] } )
Update test to reflect new 'provider' key setting [#59365332] Signed-off-by: Matt Royal <6463362714fdee6ae948b4a582165edffac2664e@pivotallabs.com>
diff --git a/business.gemspec b/business.gemspec index abc1234..def5678 100644 --- a/business.gemspec +++ b/business.gemspec @@ -20,7 +20,7 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] - spec.add_development_dependency "gc_ruboconfig", "~> 2.25.0" + spec.add_development_dependency "gc_ruboconfig", "~> 2.26.0" spec.add_development_dependency "rspec", "~> 3.1" spec.add_development_dependency "rspec_junit_formatter", "~> 0.4.1" spec.add_development_dependency "rubocop", "~> 1.18.0"
Update gc_ruboconfig requirement from ~> 2.25.0 to ~> 2.26.0 Updates the requirements on [gc_ruboconfig](https://github.com/gocardless/ruboconfig) to permit the latest version. - [Release notes](https://github.com/gocardless/ruboconfig/releases) - [Changelog](https://github.com/gocardless/gc_ruboconfig/blob/master/CHANGELOG.md) - [Commits](https://github.com/gocardless/ruboconfig/commits/v2.26.0) --- updated-dependencies: - dependency-name: gc_ruboconfig dependency-type: direct:development ... Signed-off-by: dependabot[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@github.com>
diff --git a/business.gemspec b/business.gemspec index abc1234..def5678 100644 --- a/business.gemspec +++ b/business.gemspec @@ -23,5 +23,5 @@ spec.add_development_dependency "gc_ruboconfig", "~> 2.20.0" spec.add_development_dependency "rspec", "~> 3.1" spec.add_development_dependency "rspec_junit_formatter", "~> 0.4.1" - spec.add_development_dependency "rubocop", "~> 1.1.0" + spec.add_development_dependency "rubocop", "~> 1.2.0" end
Update rubocop requirement from ~> 1.1.0 to ~> 1.2.0 Updates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version. - [Release notes](https://github.com/rubocop-hq/rubocop/releases) - [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop-hq/rubocop/compare/v1.1.0...v1.2.0) Signed-off-by: dependabot-preview[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@dependabot.com>
diff --git a/examples/parentheses.rb b/examples/parentheses.rb index abc1234..def5678 100644 --- a/examples/parentheses.rb +++ b/examples/parentheses.rb @@ -1,9 +1,21 @@ require File.expand_path(File.dirname(__FILE__) + "/../lib/grammoire") +# Repeated rules grammar = Grammoire.define do rule(:s) { produce(:s) + produce(:s) } rule(:s) { "(#{produce(:s)})" } rule(:s) { '()' } end -10.times { puts grammar.produce(:s) }+10.times { puts grammar.produce(:s) + "\n\n" } + +# Rule with multiple options (doesn't work yet...it will blow up) +grammar = Grammoire.define do + rule :s do + production { produce(:s) + produce(:s) } + production { "(#{produce(:s)})" } + production { '()' } + end +end + +10.times { puts grammar.produce(:s) + "\n\n" }
Sort of example for an alternative way of defining productions for the same rule
diff --git a/spec/support/fake_cronitor.rb b/spec/support/fake_cronitor.rb index abc1234..def5678 100644 --- a/spec/support/fake_cronitor.rb +++ b/spec/support/fake_cronitor.rb @@ -2,7 +2,7 @@ class FakeCronitor < Sinatra::Base get '/v1/monitors/:id' do - if ['abcd', 'Test Cronitor'].include? params['id'] + if ['efgh', 'Test Cronitor'].include? params['id'] return json_response 200, 'existing_monitor' end
Update to match ID of mock existing monitor JSON
diff --git a/lib/ember/cli/resolver.rb b/lib/ember/cli/resolver.rb index abc1234..def5678 100644 --- a/lib/ember/cli/resolver.rb +++ b/lib/ember/cli/resolver.rb @@ -1,7 +1,7 @@ module Ember module CLI module Resolver - VERSION = '0.1.14' + VERSION = '0.1.15' end end end
Update Ember Resolver version to 0.1.15
diff --git a/lib/fake_email_service.rb b/lib/fake_email_service.rb index abc1234..def5678 100644 --- a/lib/fake_email_service.rb +++ b/lib/fake_email_service.rb @@ -11,9 +11,12 @@ email_address = Mail::Address.new(email) domain = email_address.domain.strip.downcase - second_level_domain = domain.split('.')[-2..-1].join('.') + domain_parts = domain.split('.') - domains = [domain, second_level_domain] + second_level_domain = Array(domain_parts[-2..-1]).join('.') + third_level_domain = Array(domain_parts[-3..-1]).join('.') + + domains = [domain, second_level_domain, third_level_domain].compact @fake_domains.any? {|fake_domain| domains.include?(fake_domain) } end
Check third level domains for any case
diff --git a/lib/leaflet-draw-rails.rb b/lib/leaflet-draw-rails.rb index abc1234..def5678 100644 --- a/lib/leaflet-draw-rails.rb +++ b/lib/leaflet-draw-rails.rb @@ -4,6 +4,9 @@ module Draw module Rails class Engine < ::Rails::Engine + initializer 'leaflet-draw-rails.assets.precompile' do |app| + app.config.assets.precompile += %w(images/spritesheet.png images/spritesheet-2x.png) + end end end end
Configure initializer to precompile images.
diff --git a/lib/reports_kit/engine.rb b/lib/reports_kit/engine.rb index abc1234..def5678 100644 --- a/lib/reports_kit/engine.rb +++ b/lib/reports_kit/engine.rb @@ -2,13 +2,13 @@ class Engine < ::Rails::Engine engine_name 'reports_kit' - initializer 'helper' do + initializer 'reports_kit.helpers.helper' do ActiveSupport.on_load(:action_view) do include Helper end end - initializer 'precompile', group: :all do |app| + initializer 'reports_kit.assets.precompile' do |app| if app.config.respond_to?(:assets) if defined?(Sprockets) && Gem::Version.new(Sprockets::VERSION) >= Gem::Version.new('4.0.0.beta1') app.config.assets.precompile += %w(reports_kit.js reports_kit.css)
Use namespaced names for initializers
diff --git a/lib/reports_kit/helper.rb b/lib/reports_kit/helper.rb index abc1234..def5678 100644 --- a/lib/reports_kit/helper.rb +++ b/lib/reports_kit/helper.rb @@ -1,6 +1,7 @@ module ReportsKit module Helper def render_report(properties, &block) + raise ArgumentError.new('`properties` must be a Hash or String') if properties.blank? if properties.is_a?(String) path = Rails.root.join('config', 'reports_kit', 'reports', "#{properties}.yml") properties = YAML.load_file(path)
Raise ArgumentError if properties are blank
diff --git a/lib/scout/commands/ask.rb b/lib/scout/commands/ask.rb index abc1234..def5678 100644 --- a/lib/scout/commands/ask.rb +++ b/lib/scout/commands/ask.rb @@ -11,7 +11,7 @@ help "Ask a stupid question" def process - speak "http://LetMeGoogleThatForYou.com/?q=" + CGI.escape(args.join(' ')) + speak "http://LetMeGoogleThatForYou.com/?q=" + CGI.escape(([command] + args).join(' ')) end end end
Add command name to query
diff --git a/lib/data_service/record.rb b/lib/data_service/record.rb index abc1234..def5678 100644 --- a/lib/data_service/record.rb +++ b/lib/data_service/record.rb @@ -14,7 +14,13 @@ end def parse_date(date) - DateTime.strptime(date, '%Y-%m-%d %H:%M') + if date ~= /\d+-\d+-\d+ \d{2}:\d{2}(\-|\+)\d+(:\d+)?(:\d+)?+/ + DateTime.strptime(date, '%Y-%m-%d %H:%M%z') + elsif date ~= /\d+-\d+-\d+ \d{2}:\d{2}:\d{2}(\-|\+)\d+(:\d+)?(:\d+)?+/ + DateTime.strptime(date, '%Y-%m-%d %H:%M:%S%z') + else + raise "Unknown date format" + end end def to_hash
Support parsing times with or without seconds Also parse the timezone now.
diff --git a/lib/facter/xcodeversion.rb b/lib/facter/xcodeversion.rb index abc1234..def5678 100644 --- a/lib/facter/xcodeversion.rb +++ b/lib/facter/xcodeversion.rb @@ -1,7 +1,7 @@ Facter.add(:xcodeversion) do confine :operatingsystem => :darwin setcode do - return "" if ! File.exists('/usr/bin/xcodebuild') + return "" if ! File.exists?('/usr/bin/xcodebuild') results = %x{ /usr/bin/xcodebuild -version 2>&1 } return "" if ! results =~ /^Xcode\s((?:\d+\.)?(?:\d+\.)?\d+)/ $1
Fix warning with Ruby 2.0.0: Could not retrieve fact='xcodeversion', resolution='<anonymous>': undefined method `exists' for File:Class
diff --git a/spec/features/merge_requests/pipelines_spec.rb b/spec/features/merge_requests/pipelines_spec.rb index abc1234..def5678 100644 --- a/spec/features/merge_requests/pipelines_spec.rb +++ b/spec/features/merge_requests/pipelines_spec.rb @@ -0,0 +1,48 @@+require 'spec_helper' + +feature 'Pipelines for Merge Requests', feature: true, js: true do + include WaitForAjax + + given(:user) { create(:user) } + given(:merge_request) { create(:merge_request) } + given(:project) { merge_request.target_project } + + before do + project.team << [user, :master] + login_as user + end + + context 'with pipelines' do + let!(:pipeline) do + create(:ci_empty_pipeline, + project: merge_request.source_project, + ref: merge_request.source_branch, + sha: merge_request.diff_head_sha) + end + + before do + visit namespace_project_merge_request_path(project.namespace, project, merge_request) + end + + scenario 'does click a pipeline tab and sees a list of pipelines' do + page.within('.merge-request-tabs') do + click_link('Pipelines') + end + wait_for_ajax + + expect(page).to have_selector('.pipeline-actions') + end + end + + context 'without pipelines' do + before do + visit namespace_project_merge_request_path(project.namespace, project, merge_request) + end + + scenario 'does not find a pipeline link' do + page.within('.merge-request-tabs') do + expect(page).not_to have_link('Pipelines') + end + end + end +end
Add a feature tests to check if a view can be rendered properly
diff --git a/Casks/kontroll.rb b/Casks/kontroll.rb index abc1234..def5678 100644 --- a/Casks/kontroll.rb +++ b/Casks/kontroll.rb @@ -2,9 +2,9 @@ version :latest sha256 :no_check - url 'http://kontroll.io/download/Kontroll.zip' + url 'https://kontroll.io/download/Kontroll.zip' name 'Kontroll' - homepage 'http://kontroll.io/' + homepage 'https://kontroll.io/' license :gratis app 'Kontroll.app'
Fix url and homepage to use SSL in Kontroll Cask The HTTP URL is already getting redirected to HTTPS. Using the HTTPS URL directly makes it more secure and saves a HTTP round-trip.
diff --git a/lib/matross/delayed_job.rb b/lib/matross/delayed_job.rb index abc1234..def5678 100644 --- a/lib/matross/delayed_job.rb +++ b/lib/matross/delayed_job.rb @@ -5,7 +5,13 @@ desc "Writes the delayed job part of the Procfile" task :procfile, :roles => :dj do procfile_template = <<-EOF.gsub(/^\s+/, '') - dj: bundle exec rake jobs:work + <% if queues -%> + <% queues.each do |queue_name| -%> + dj_<%= queue_name %>: bundle exec rake jobs:work QUEUE=<%= queue_name %> + <% end -%> + <% else -%> + dj: bundle exec rake jobs:work + <% end -%> EOF procfile = ERB.new(procfile_template, nil, '-') put procfile.result(binding), "#{shared_path}/Procfile.dj"
Allow definition of DJ queues
diff --git a/lib/data_mapper/associations/parent_to_child_association.rb b/lib/data_mapper/associations/parent_to_child_association.rb index abc1234..def5678 100644 --- a/lib/data_mapper/associations/parent_to_child_association.rb +++ b/lib/data_mapper/associations/parent_to_child_association.rb @@ -0,0 +1,75 @@+require 'forwardable' + +module DataMapper + module Associations + class ParentToChildAssociation + extend Forwardable + include Enumerable + + def_instance_delegators :entries, :[], :size, :length, :first, :last + + def loaded? + !defined?(@children_resources) + end + + def children + @children_resources ||= @children_loader.call + end + + def save + @dirty_children.each do |child_resource| + @relationship.attach_parent(child_resource, @parent_resource) + repository(@relationship.repository_name).save(child_resource) + end + end + + def push(*child_resources) + child_resources.each do |child_resource| + children << child_resource + + if @parent_resource.new_record? + @dirty_children << child_resource + else + @relationship.attach_parent(child_resource, @parent_resource) + repository(@relationship.repository_name).save(child_resource) + end + end + self + end + + alias << push + + def delete(child_resource) + deleted_resource = children.delete(child_resource) + begin + @relationship.attach_parent(deleted_resource, nil) + repository(@relationship.repository_name).save(deleted_resource) + rescue + children << child_resource + raise + end + end + + def clear + each { |child_resource| delete(child_resource) } + end + + def each(&block) + children.each { |child_resource| yield child_resource } + self + end + + private + + def initialize(relationship, parent_resource, &children_loader) +# raise ArgumentError, "+relationship+ should be a DataMapper::Association::Relationship, but was #{relationship.class}", caller unless Relationship === relationship +# raise ArgumentError, "+parent_resource+ should be a DataMapper::Resource, but was #{parent_resource.class}", caller unless Resource === parent_resource + + @relationship = relationship + @parent_resource = parent_resource + @children_loader = children_loader + @dirty_children = [] + end + end # class ParentToChildAssociation + end # module Associations +end # module DataMapper
Revert "Moved to one_to_many.rb as Proxy." This reverts commit 682e5c4ae2c17ae13418f010290776654d05be68.
diff --git a/lib/poise/resource_name.rb b/lib/poise/resource_name.rb index abc1234..def5678 100644 --- a/lib/poise/resource_name.rb +++ b/lib/poise/resource_name.rb @@ -22,7 +22,7 @@ module ResourceName def initialize(*args) super - @resource_name ||= Chef::Mixin::ConvertToClassName.convert_to_snake_case(self.class.name, 'Chef::Resource').to_sym + @resource_name ||= Chef::Mixin::ConvertToClassName.convert_to_snake_case(self.class.name, 'Chef::Resource').to_sym if self.class.name end end end
Handle weird classes that have no name.
diff --git a/spec/unit/facts/rabbitmq_erlang_cookie_spec.rb b/spec/unit/facts/rabbitmq_erlang_cookie_spec.rb index abc1234..def5678 100644 --- a/spec/unit/facts/rabbitmq_erlang_cookie_spec.rb +++ b/spec/unit/facts/rabbitmq_erlang_cookie_spec.rb @@ -0,0 +1,19 @@+require 'spec_helper' + +describe 'rabbitmq_erlang_cookie', :type => :fact do + before(:each) { Facter.clear } + + it 'works correctly' do + Facter.fact(:osfamily).stubs(:value).returns('RedHat') + File.stubs(:exists?).with('/var/lib/rabbitmq/.erlang.cookie').returns(true) + File.stubs(:read).with('/var/lib/rabbitmq/.erlang.cookie').returns('THISISACOOKIE') + Facter.fact(:rabbitmq_erlang_cookie).value.should == 'THISISACOOKIE' + end + + it 'fails if file doesnt exist' do + Facter.fact(:osfamily).stubs(:value).returns('RedHat') + File.stubs(:exists?).with('/var/lib/rabbitmq/.erlang.cookie').returns(false) + Facter.fact(:rabbitmq_erlang_cookie).value.should == nil + end + +end
Add tests for this fact.
diff --git a/lib/space/model/project.rb b/lib/space/model/project.rb index abc1234..def5678 100644 --- a/lib/space/model/project.rb +++ b/lib/space/model/project.rb @@ -28,7 +28,7 @@ def number(name) if number = names.index(name) - number + 1 + number else names << name number(name)
[PoC] Fix improper Dashboard list indexing Having two repos I'm facing improper list indexing in Dashboard. Here is how it looking https://gist.github.com/a454501c92026be915bf. Pressing key `1` that corresponds unexising repo is closing space. This fix is Proof of Concept, 'cause I didn't dive into the inner logic of Dashboard, and removing this `+1` is most obvious way to fix it.
diff --git a/lib/spinoza/calvin/node.rb b/lib/spinoza/calvin/node.rb index abc1234..def5678 100644 --- a/lib/spinoza/calvin/node.rb +++ b/lib/spinoza/calvin/node.rb @@ -1,6 +1,6 @@ require 'spinoza/system/node' require 'spinoza/calvin/sequencer' -#require 'spinoza/calvin/scheduler' +require 'spinoza/calvin/scheduler' class Calvin::Node < Spinoza::Node attr_reader :sequencer, :scheduler @@ -10,8 +10,8 @@ sequencer: nil, scheduler: nil, **rest super *tables, **rest - @sequencer ||= Calvin::Sequencer.new(node: self) -# @scheduler ||= Calvin::Scheduler.new(node: self) + @sequencer = sequencer || Calvin::Sequencer.new(node: self) + @scheduler = scheduler || Calvin::Scheduler.new(node: self) @log = log @meta_log = meta_log end @@ -24,7 +24,8 @@ log.read batch_id, node: self end - def finished_transaction result + def finished_transaction transaction, result ### pass result back to client + puts "[RESULT] #{transaction} => #{result}" end end
Fix initialization with :none arg.
diff --git a/lib/tasks/split_dates.rake b/lib/tasks/split_dates.rake index abc1234..def5678 100644 --- a/lib/tasks/split_dates.rake +++ b/lib/tasks/split_dates.rake @@ -10,4 +10,34 @@ task validate: :environment do Tasks::SplitDates.validate end + + desc "Backfill publishing_api_* dates using temporary_* dates" + task backfill: :environment do + scope = Edition.select(:id, + :temporary_first_published_at, + :publishing_api_first_published_at, + :temporary_last_edited_at, + :publishing_api_last_edited_at) + + total = Edition.count + start_time = Time.current + done = 0 + + scope.find_in_batches(batch_size: 10_000) do |batch| + batch.each do |e| + if e.temporary_first_published_at != e.publishing_api_first_published_at || + e.temporary_last_edited_at != e.publishing_api_last_edited_at + + e.update_columns( + publishing_api_first_published_at: e.temporary_first_published_at, + publishing_api_last_edited_at: e.temporary_last_edited_at, + ) + end + end + + done += batch.count + time_elapsed = Time.at(Time.current - start_time).utc.strftime("%H:%M:%S") + puts "Processed #{done}/#{total} - time elapsed: #{time_elapsed}" + end + end end
Add rake task to backfill publishing_api_* dates This task takes all the edition timestamps that are prefixed with `temporary_` and backfills their equivalent prefixed with `publishing_api_`. This is to allow switching to the `publishing_api_*` dates and work towards the removal of the `temporary_*` ones. On my dev VM this took 1:43 to run.
diff --git a/lib/troo/cli/thor_fixes.rb b/lib/troo/cli/thor_fixes.rb index abc1234..def5678 100644 --- a/lib/troo/cli/thor_fixes.rb +++ b/lib/troo/cli/thor_fixes.rb @@ -2,11 +2,7 @@ module CLI class ThorFixes < Thor def self.banner(command, namespace = nil, subcommand = false) - if subcommand - "#{basename} #{@package_name} #{command.usage}" - else - "#{basename}#{@package_name} #{command.usage}" - end + [basename, @package_name, command.usage].compact.join(" ") end end end
Fix spacing issue with subcommands.
diff --git a/html_mini.gemspec b/html_mini.gemspec index abc1234..def5678 100644 --- a/html_mini.gemspec +++ b/html_mini.gemspec @@ -7,7 +7,7 @@ s.platform = Gem::Platform::RUBY s.authors = ["Jerome Touffe-Blin"] s.email = %q{jtblin@gmail.com} - s.homepage = %q{http://github.com/jtblin/html-mini} + s.homepage = %q{http://github.com/jtblin/html_mini} s.summary = %q{HTML Mini} s.description = %q{Simple, fast HTML minification for Rack applications} s.required_rubygems_version = ">= 1.3.6"
Fix typo in gem project home page url.
diff --git a/lib/sastrawi/morphology/invalid_affix_pair_specification.rb b/lib/sastrawi/morphology/invalid_affix_pair_specification.rb index abc1234..def5678 100644 --- a/lib/sastrawi/morphology/invalid_affix_pair_specification.rb +++ b/lib/sastrawi/morphology/invalid_affix_pair_specification.rb @@ -11,11 +11,13 @@ /^me(.*)an$/, /^me(.*)an$/, /^ter(.*)an$/, /^per(.*)an$/ ] + matches = false + invalid_affixes.each do |invalid_affix| - return true if invalid_affix.match(word) + matches = matches || !!(word =~ invalid_affix) end - false + matches end end end
Fix boolean operation for pattern matching
diff --git a/lib/ab_admin/hooks/will_paginate_no_uri.rb b/lib/ab_admin/hooks/will_paginate_no_uri.rb index abc1234..def5678 100644 --- a/lib/ab_admin/hooks/will_paginate_no_uri.rb +++ b/lib/ab_admin/hooks/will_paginate_no_uri.rb @@ -14,6 +14,6 @@ url_params[param_name.to_sym] = nil if url_params[param_name.to_sym].to_i < 2 link = @template.url_for(url_params) - @options[:no_uri] ? link.split('?').first : link + @options[:no_uri] ? link.split('?').first : link.sub(/\?\z/, '') end end
Remove trailing question mark in pagination
diff --git a/lib/amazon_athena/commands/repair_table.rb b/lib/amazon_athena/commands/repair_table.rb index abc1234..def5678 100644 --- a/lib/amazon_athena/commands/repair_table.rb +++ b/lib/amazon_athena/commands/repair_table.rb @@ -14,6 +14,8 @@ def run(connection) connection.query(statement) + + return end end end
REPAIR TABLE does not return output
diff --git a/config/deploy.rb b/config/deploy.rb index abc1234..def5678 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -24,6 +24,7 @@ task :stop do ; end task :restart, :roles => :app, :except => { :no_release => true } do run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}" + run "ln -s /media/photos #{current_path}/public/photos" end end
Fix photos breaking on rollout
diff --git a/test/functional/groups/memberships_controller_test.rb b/test/functional/groups/memberships_controller_test.rb index abc1234..def5678 100644 --- a/test/functional/groups/memberships_controller_test.rb +++ b/test/functional/groups/memberships_controller_test.rb @@ -17,7 +17,7 @@ end def test_destroy - @council = FactoryGirl.create(:council) + @council = FactoryGirl.create(:committee) @group.add_council! @council @council.add_user! @user other_user = FactoryGirl.create(:user)
Use the committee factory to create councils.
diff --git a/app/controllers/thredded/application_controller.rb b/app/controllers/thredded/application_controller.rb index abc1234..def5678 100644 --- a/app/controllers/thredded/application_controller.rb +++ b/app/controllers/thredded/application_controller.rb @@ -11,11 +11,13 @@ private def current_ability - @current_ability ||= Thredded::Ability.new(current_user) + @current_ability ||= Ability.new(current_user) end def messageboard - @messageboard ||= Messageboard.find(params[:messageboard_id]) + if params.key? :messageboard_id + @messageboard ||= Messageboard.find(params[:messageboard_id]) + end end def ensure_messageboard_exists
[JRO] Check for presence of messageboard_id Before searching for something with a particular param key, check that it's there.
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,7 @@ Rails.application.routes.draw do - devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" } + get '/users/sign_in', to: redirect('/users/auth/facebook') + get '/users/sign_up', to: redirect('/users/auth/facebook') + devise_for :users, controllers: { omniauth_callbacks: 'users/omniauth_callbacks' } root 'home#index'
Change path in header for login
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,6 +1,8 @@ ActionController::Routing::Routes.draw do |map| map.root :controller => 'login' + # this route is needed for Shopify's application links, because they append the id param with a question mark instead of rails nested style + map.connect 'orders?id=:id', :controller => 'orders', :action => 'index' map.resources :orders, :only => [:index, :show], :member => {:preview => :get, :print => :post} map.resources :print_templates, :as => 'templates'
Add a new route to intercept redirects from Shopify like this: /orders?id=123
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,6 +2,6 @@ root :to => "authorizations#new" resources :authorizations, :only => :create - match 'authorize' => 'authorizations#new' + match 'authorize' => 'authorizations#new', via: [:post, :get] resource :token, :only => :create end
Add via to match route, for Rails 4 compatibility.
diff --git a/app/controllers/frontend/eid_controller.rb b/app/controllers/frontend/eid_controller.rb index abc1234..def5678 100644 --- a/app/controllers/frontend/eid_controller.rb +++ b/app/controllers/frontend/eid_controller.rb @@ -8,8 +8,12 @@ end def photo - photo = session[:eid]["be:fedict:eid:idp:photo"] - send_data(Base64.decode64(photo), :type => 'image/jpeg') + if session[:eid] + photo = session[:eid]["be:fedict:eid:idp:photo"] + send_data(Base64.decode64(photo), :type => 'image/jpeg') + else + raise ActionController::RoutingError.new + end end skip_before_filter :verify_authenticity_token, :only => :receive
Add session check in eid/photo
diff --git a/spec/features/logins_spec.rb b/spec/features/logins_spec.rb index abc1234..def5678 100644 --- a/spec/features/logins_spec.rb +++ b/spec/features/logins_spec.rb @@ -20,11 +20,11 @@ end it do - expect(page).to have_content('logout') + expect(page).to have_content I18n.t('views.shared.header.logout') end it do - expect(page).not_to have_content('Sign up') + expect(page).not_to have_content I18n.t('views.shared.header.signup') end it 'redirects to musics_path' do @@ -46,11 +46,11 @@ end it do - expect(page).to have_content('login') + expect(page).to have_content I18n.t('views.shared.header.login') end it do - expect(page).to have_content('Sign up') + expect(page).to have_content I18n.t('views.shared.header.signup') end it 'redirects to login_url' do
Fix spec * Deal with I18n
diff --git a/spec/features/search_spec.rb b/spec/features/search_spec.rb index abc1234..def5678 100644 --- a/spec/features/search_spec.rb +++ b/spec/features/search_spec.rb @@ -0,0 +1,11 @@+require 'rails_helper' + +feature 'Search question' do + scenario "search a keyword" do + visit root_path + find('#search_form').fill_in 'q', with: 'Aliquam' + click_button 'Search' + + expect(response.body).to have_content 'Aliquam' + end +end
Add a test for a word search.
diff --git a/app/controllers/registration_controller.rb b/app/controllers/registration_controller.rb index abc1234..def5678 100644 --- a/app/controllers/registration_controller.rb +++ b/app/controllers/registration_controller.rb @@ -2,9 +2,12 @@ class RegistrationController < BaseController include OpenFoodNetwork::SpreeApiKeyLoader + + layout 'registration' + helper 'map' + before_action :load_spree_api_key, only: [:index] before_action :check_user, except: :authenticate - layout 'registration' def index @enterprise_attributes = { sells: 'none' }
Add map helper to RegistrationController Fixes 3 errors including: Registration Terms of Service agreement if accepting Terms of Service is not required allows registration as normal Failure/Error: super ActionView::Template::Error: undefined method `using_google_maps?' for #<#<Class:0x00007fd4949c4558>:0x00007fd499dd0ae8> # ./app/helpers/application_helper.rb:20:in `method_missing' # ./app/views/registration/steps/_details.html.haml:60:in `_app_views_registration_steps__details_html_haml___1911121144363058234_70275472163280' # ./app/views/registration/index.html.haml:12:in `block in _app_views_registration_index_html_haml__993897347679518865_70275545598940' # ./app/views/registration/index.html.haml:11:in `each' # ./app/views/registration/index.html.haml:11:in `_app_views_registration_index_html_haml__993897347679518865_70275545598940' # ./lib/open_food_network/rack_request_blocker.rb:36:in `call' # ------------------ # --- Caused by: --- # NoMethodError: # undefined method `using_google_maps?' for #<#<Class:0x00007fd4949c4558>:0x00007fd499dd0ae8> # ./app/helpers/application_helper.rb:20:in `method_missing'
diff --git a/identifier-uuid.gemspec b/identifier-uuid.gemspec index abc1234..def5678 100644 --- a/identifier-uuid.gemspec +++ b/identifier-uuid.gemspec @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = 'identifier-uuid' - s.version = '0.1.1' + s.version = '0.1.2' s.summary = 'UUID identifier generator with support for dependency configuration for real and null object implementations' s.description = ' '
Package version is increased from 0.1.1 to 0.1.2
diff --git a/src/brilliant/ast/program.rb b/src/brilliant/ast/program.rb index abc1234..def5678 100644 --- a/src/brilliant/ast/program.rb +++ b/src/brilliant/ast/program.rb @@ -18,17 +18,17 @@ private def define_external_functions(main_module) - main_module.functions.add('exit', [Type::Int32], Type::Void) do |function, string| + main_module.functions.add('exit', [Type::Integer], Type::Void) do |function, string| function.linkage = :external end - main_module.functions.add('puts', [Type::Text], Type::Int32) do |function, string| + main_module.functions.add('puts', [Type::Text], Type::Integer) do |function, string| function.linkage = :external end end def define_main(main_module) # NOTE: C defines the exit code from `main` as a machine (typically 32-bit) int, but the UNIX shell treats it as an 8-bit int. - main_module.functions.add('main', [], Type::Int32) do |function| + main_module.functions.add('main', [], Type::Integer) do |function| function.basic_blocks.append.build do |builder| child_nodes.each do |node| node.generate_code(main_module, builder)
Correct type signatures for main, exit, and puts. Per POSIX, these should be using machine integers, not 32-bit integers.
diff --git a/lib/rails_admin/config/actions/clean_up.rb b/lib/rails_admin/config/actions/clean_up.rb index abc1234..def5678 100644 --- a/lib/rails_admin/config/actions/clean_up.rb +++ b/lib/rails_admin/config/actions/clean_up.rb @@ -3,6 +3,10 @@ module Actions class CleanUp < RailsAdmin::Config::Actions::Base + + register_instance_option :only do + Account + end register_instance_option :pjax? do true
Clean up action only for accounts
diff --git a/lib/travis/api/v3/renderer/subscription.rb b/lib/travis/api/v3/renderer/subscription.rb index abc1234..def5678 100644 --- a/lib/travis/api/v3/renderer/subscription.rb +++ b/lib/travis/api/v3/renderer/subscription.rb @@ -1,6 +1,6 @@ module Travis::API::V3 class Renderer::Subscription < ModelRenderer - representation(:standard, :id, :valid_to, :plan, :coupon, :status, :source, :billing_info, :credit_card_info, :owner, :invoices) + representation(:standard, :id, :valid_to, :plan, :coupon, :status, :source, :billing_info, :credit_card_info, :owner) end class Renderer::BillingInfo < ModelRenderer
Remove invoices from Subscription renderer
diff --git a/workflow/test/fixtures.rb b/workflow/test/fixtures.rb index abc1234..def5678 100644 --- a/workflow/test/fixtures.rb +++ b/workflow/test/fixtures.rb @@ -1,5 +1,5 @@ module Fixtures - path = File.expand_path('./test/fixtures/font-awesome-3-2-1-icons.yml') + path = File.expand_path('./test/fixtures/font-awesome-4-0-0-icons.yml') ICONS = YAML.load_file(path).compact.uniq.sort def self.icons
Change YAML file to load
diff --git a/db/migrate/20160916131013_create_connector_providers_configurations.rb b/db/migrate/20160916131013_create_connector_providers_configurations.rb index abc1234..def5678 100644 --- a/db/migrate/20160916131013_create_connector_providers_configurations.rb +++ b/db/migrate/20160916131013_create_connector_providers_configurations.rb @@ -20,7 +20,7 @@ foreign_key :user_id, :users, type: :uuid, null: true, on_delete: :cascade foreign_key :organization_id, :organizations, type: :uuid, null: true, on_delete: :cascade - foreign_key :connector_provider_id, :connector_providers, type: :uuid, null: false, on_delete: :cascade + foreign_key :connector_provider_id, :connector_providers, type: :uuid, null: false, on_delete: :restrict end alter_table :connector_configurations do
Change connector configuration's provider foreign key on-delete Make it restrict rather than cascade, since deleting providers for which configurations exists should be taken with care.
diff --git a/app/models/users/authenticated_sessions.rb b/app/models/users/authenticated_sessions.rb index abc1234..def5678 100644 --- a/app/models/users/authenticated_sessions.rb +++ b/app/models/users/authenticated_sessions.rb @@ -0,0 +1,40 @@+module Users + module AuthenticatedSessions + def remember + update_attribute(:remember_digest, digest(new_token)) + end + + def forget + update_attribute(:remember_digest, nil) + end + + def authenticated?(attribute, token) + attribute_digest = public_send("#{attribute}_digest") + return false if attribute_digest.nil? + match?(attribute_digest, token) + end + + private + + def cost + if ActiveModel::SecurePassword.min_cost + BCrypt::Engine::MIN_COST + else + BCrypt::Engine.cost + end + end + + def digest(remember_token) + BCrypt::Password.create(remember_token, cost: cost) + end + + def new_token + SecureRandom.urlsafe_base64 + end + + def match?(digest, token) + password_digest = BCrypt::Password.new(digest) + password_digest == token + end + end +end
Refactor Authentication module for Users Move authentication module to app/models/users/. Borrow a finished refactor of Authentication module (it's from the development-OAuth branch)
diff --git a/config/deploy.rb b/config/deploy.rb index abc1234..def5678 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -1,4 +1,4 @@-lock '3.6.1' +lock '3.7.0' set :application, 'evemonk' set :repo_url, 'git@github.com:biow0lf/evemonk.git'
Update capistrano lock to 3.7.0
diff --git a/week-4/address/my_solution.rb b/week-4/address/my_solution.rb index abc1234..def5678 100644 --- a/week-4/address/my_solution.rb +++ b/week-4/address/my_solution.rb @@ -0,0 +1,11 @@+# Format an Address + +# I worked on this challenge [by myself, with: ]. + +def make_address (street, city, state, zip) + + return 'You live at ' + street + ', in the beautiful city of ' + city + ', ' + state + '. Your zip is ' + zip + '.' + +end + +# Your Solution Below
Add my solution to challenge 4.3.1
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -10,5 +10,6 @@ resources :languages, only: [:index, :new, :create, :show, :destroy] - get '/tags/:id', to: 'tags#show', as: "tag" + resources :tags, only: [:show, :destroy] + end
Add destory resource for tags.
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,10 +1,9 @@ Rails.application.routes.draw do - resources :users scope '/:locale', :locale => /de|fr|it|en/, :format => /json|html|csv/ do + resources :words get 'export', to: 'words#export', as: :words_export - resources :categories
Delete first 'resources :users' There was another one at the right place (below scope)
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,9 +1,14 @@ Rails.application.routes.draw do + + resources :sessions, only: [:new, :create, :destroy] + get '/login' => 'sessions#new', as: 'login' + post '/login' => 'sessions#create' + get '/logout' => 'sessions#destroy', as: 'logout' + + root 'questions#index' resources :questions - root 'questions#index' - - get 'welcome/question', to: 'welcome#question' - + resources :users, only: [:create, :update, :show, :destroy] + get '/signup' => 'users#new', as: 'signup' end
Edit Routes For User Authentication
diff --git a/dagnabit.gemspec b/dagnabit.gemspec index abc1234..def5678 100644 --- a/dagnabit.gemspec +++ b/dagnabit.gemspec @@ -15,7 +15,7 @@ s.executables = ["dagnabit-test"] s.require_paths = ["lib"] - s.add_dependency 'activerecord', '~> 2.3.0' + s.add_dependency 'activerecord', '>= 2.3.0' [ [ 'autotest', nil ], [ 'bluecloth', nil ],
Declare compatibility with ActiveRecord 3.0. Strictly speaking, this declares compatibility with every ActiveRecord version >= 2.3.0, and I need a CI build to provide some evidence of that; however, dagnabit's specs and Cucumber scenarios pass with 2.3.10 and 3.0.3, so I'm going to make an unwarranted assumption and say >= 2.3.0 is okay.
diff --git a/lib/dsl/interpolator.rb b/lib/dsl/interpolator.rb index abc1234..def5678 100644 --- a/lib/dsl/interpolator.rb +++ b/lib/dsl/interpolator.rb @@ -1,6 +1,6 @@ class Interpolator - REGEXP = /(\$\{\s*(?:[a-zA-Z][a-zA-Z0-9]*::)*[a-zA-Z][a-zA-Z0-9]*\s*\})/ + REGEXP = /(\$\{\s*(?:[a-zA-Z][a-zA-Z0-9_]*::)*[a-zA-Z][a-zA-Z0-9_]*\s*\})/ def initialize( resolver) @resolver = resolver
Allow underscores also in interpolations
diff --git a/lib/gds_api/need_api.rb b/lib/gds_api/need_api.rb index abc1234..def5678 100644 --- a/lib/gds_api/need_api.rb +++ b/lib/gds_api/need_api.rb @@ -3,7 +3,7 @@ class GdsApi::NeedApi < GdsApi::Base def needs(options = {}) - query = "?"+options.map { |k,v| "#{k}=#{v}" }.join("&") unless options.empty? + query = query_string(options) get_list!("#{endpoint}/needs#{query}") end
Use query_string method instead of manually mapping query parameters
diff --git a/lib/feedzirra.rb b/lib/feedzirra.rb index abc1234..def5678 100644 --- a/lib/feedzirra.rb +++ b/lib/feedzirra.rb @@ -11,12 +11,7 @@ require 'active_support/core_ext/module' require 'active_support/core_ext/kernel' require 'active_support/core_ext/object' - -if ActiveSupport::VERSION::MAJOR >= 3 - require 'active_support/time' -else - require 'active_support/core_ext/time' -end +require 'active_support/time' require 'core_ext/date' require 'core_ext/string'
Remove version check on ActiveSupport
diff --git a/lib/flexo/cli.rb b/lib/flexo/cli.rb index abc1234..def5678 100644 --- a/lib/flexo/cli.rb +++ b/lib/flexo/cli.rb @@ -40,8 +40,8 @@ template 'flexo.tt', project_dir + '.flexo', config directory 'sources', project_dir + config[:sources] - say_status '', '-' * 25 - say_status '', "Your project was created!" + say_status '', '-------------------------' + say_status '', 'Your project was created!' end # ------------------------------------------------------------------------
Replace ('-' * 25) with a literal.
diff --git a/lib/rubinius/toolset.rb b/lib/rubinius/toolset.rb index abc1234..def5678 100644 --- a/lib/rubinius/toolset.rb +++ b/lib/rubinius/toolset.rb @@ -16,6 +16,7 @@ def self.finish(name) ts = current::TS + ts.const_set :ToolSet, ts map[name] = ts const_set name.capitalize.to_sym, ts end
Set a constant referencing the module scope.
diff --git a/app/channels/cache_channel.rb b/app/channels/cache_channel.rb index abc1234..def5678 100644 --- a/app/channels/cache_channel.rb +++ b/app/channels/cache_channel.rb @@ -10,8 +10,7 @@ page: params['page'] || 1 ).items.each do |item| FetchDeveloperWorker.perform_async( - item.login, - current_developer.try(:access_token) + item.login ) unless Rails.cache.exist?(item.login) end end @@ -23,6 +22,6 @@ private def api - Github::Api.new(current_developer.try(:access_token)) + Github::Api.new end end
Remove reference to access token
diff --git a/lib/moho/lang.rb b/lib/moho/lang.rb index abc1234..def5678 100644 --- a/lib/moho/lang.rb +++ b/lib/moho/lang.rb @@ -1,24 +1,6 @@ module Moho module Lang class Expression < Struct.new(:value) - end - - class Int < Expression - def eval - value - end - end - - class String < Expression - def eval - value - end - end - - class Symbol < Expression - def eval - value.to_sym - end end class List < Expression @@ -39,5 +21,23 @@ end end end + + class Int < Expression + def eval + value + end + end + + class String < Expression + def eval + value + end + end + + class Symbol < Expression + def eval + value.to_sym + end + end end end
Put Lang::List first since it's the most important.
diff --git a/lib/tasks/groupers.rake b/lib/tasks/groupers.rake index abc1234..def5678 100644 --- a/lib/tasks/groupers.rake +++ b/lib/tasks/groupers.rake @@ -6,5 +6,10 @@ Genome::Groupers::GeneGrouper.run end end + task drugs: :environment do + Utils::Logging::without_sql do + Genome::Groupers::DrugGrouper.run + end + end end end
Add drug grouper to rake environment
diff --git a/lib/urban/dictionary.rb b/lib/urban/dictionary.rb index abc1234..def5678 100644 --- a/lib/urban/dictionary.rb +++ b/lib/urban/dictionary.rb @@ -23,7 +23,6 @@ end private - def process(document) OpenStruct.new({ word: document.at_xpath('//td[@class="word"][1]').content.strip, @@ -34,8 +33,7 @@ definitions = document.xpath('//td/div[@class="definition"]').map do |node| node.xpath('//br').each { |br| br.replace(Nokogiri::XML::Text.new("\n", node.document)) }; node.content.strip - end - definitions || [] + end || [] end end end
Remove line of code that isn't neede
diff --git a/lib/volt/cli/console.rb b/lib/volt/cli/console.rb index abc1234..def5678 100644 --- a/lib/volt/cli/console.rb +++ b/lib/volt/cli/console.rb @@ -1,19 +1,28 @@ require 'pry' class Pry - # To make the console more useful, we make it so we flush the event registry - # after each line. This makes it so events are triggered after each line. - # To accomplish this we monkey-patch pry. - def rep(target = TOPLEVEL_BINDING) - target = Pry.binding_for(target) - result = re(target) + class REPL + # To make the console more useful, we make it so we flush the event registry + # after each line. This makes it so events are triggered after each line. + # To accomplish this we monkey-patch pry. + def repl + loop do + case val = read + when :control_c + output.puts "" + pry.reset_eval_string + when :no_more_input + output.puts "" if output.tty? + break + else + output.puts "" if val.nil? && output.tty? + return pry.exit_value unless pry.eval(val) + end - Pry.critical_section do - show_result(result) + # Flush after each line + Volt::Computation.flush! + end end - - # Automatically flush after each line - Volt::Computation.flush! end end @@ -36,7 +45,7 @@ Pry.config.prompt_name = 'volt' # start a REPL session - # Pry.start + Pry.start $page.pry end
Fix pry patch to allow REPL hook for flushing.
diff --git a/frontend/spec/support/shared_contexts/product_prototypes.rb b/frontend/spec/support/shared_contexts/product_prototypes.rb index abc1234..def5678 100644 --- a/frontend/spec/support/shared_contexts/product_prototypes.rb +++ b/frontend/spec/support/shared_contexts/product_prototypes.rb @@ -0,0 +1,30 @@+shared_context "product prototype" do + + def build_option_type_with_values(name, values) + ot = FactoryGirl.create(:option_type, :name => name) + values.each do |val| + ot.option_values.create({:name => val.downcase, :presentation => val}, :without_protection => true) + end + ot + end + + let(:product_attributes) do + # FactoryGirl.attributes_for is un-deprecated! + # https://github.com/thoughtbot/factory_girl/issues/274#issuecomment-3592054 + FactoryGirl.attributes_for(:simple_product) + end + + let(:prototype) do + size = build_option_type_with_values("size", %w(Small Medium Large)) + FactoryGirl.create(:prototype, :name => "Size", :option_types => [ size ]) + end + + let(:option_values_hash) do + hash = {} + prototype.option_types.each do |i| + hash[i.id.to_s] = i.option_value_ids + end + hash + end + +end
Add product protoypes shared context to its own file
diff --git a/lib/rubycouch.rb b/lib/rubycouch.rb index abc1234..def5678 100644 --- a/lib/rubycouch.rb +++ b/lib/rubycouch.rb @@ -6,13 +6,40 @@ require 'rubycouch/client' require 'rubycouch/definitions' require 'rubycouch/document' +require 'rubycouch/view' require 'rubycouch/database' require 'rubycouch/instance' class RubyCouch def self.demo - client = RubyClient.new(URI.parse('http://localhost:5984')) - client.make_request(InstanceInfo.new) + client = CouchClient.new(URI.parse('http://localhost:5984')) + + print "====== InstanceInfo ======\n" + print client.make_request(InstanceInfo.new) + + print "\n\n====== AllDbs ======\n" + print client.make_request(AllDbs.new) + + database = client.database('animaldb') + + print "\n\n====== animaldb -- DatabaseInfo ======\n" + print database.make_request(DatabaseInfo.new) + + print "\n\n====== animaldb -- AllDocs ======\n" + print database.make_request(AllDocs.new) + + print "\n\n====== animaldb -- GetDocument(elephant) ======\n" + print database.make_request(GetDocument.new('elephant')) + + print "\n\n====== animaldb -- GetView(view101) ======\n" + print database.make_request(GetView.new('views101', 'latin_name')) + + print "\n\n====== animaldb -- GetView Reduced(view101) ======\n" + get_view = GetView.new('views101', 'latin_name_count') + get_view.merge_query_items({:reduce => true}) + print database.make_request(get_view) + + print "\n\ndone.\n" end end
Update the demo listing to show more functionality
diff --git a/app/models/tree_field_type.rb b/app/models/tree_field_type.rb index abc1234..def5678 100644 --- a/app/models/tree_field_type.rb +++ b/app/models/tree_field_type.rb @@ -11,7 +11,7 @@ if values.is_a?(Hash) @values = values.keys else - @values = [values] + @values = values end end
Remove casting in model - values should always be an array
diff --git a/app/controllers/admin/ideas_controller.rb b/app/controllers/admin/ideas_controller.rb index abc1234..def5678 100644 --- a/app/controllers/admin/ideas_controller.rb +++ b/app/controllers/admin/ideas_controller.rb @@ -1,6 +1,7 @@ class Admin::IdeasController < Admin::AdminController before_action :set_idea, only: [:edit, :update, :destroy] + before_action :set_idea_assoc, only: [:index, :edit] # GET /admin/ideas def index @@ -44,6 +45,12 @@ @idea = Idea.find(params[:id]) end + def set_idea_assoc + @users = User.all.order(name: :desc).map{ |user| [user.name, user.id] } + @currents = Current.all.order(title: :desc).map{ |current| [current.title, current.id] } + @states = Idea.states + end + def idea_params params.require(:idea).permit(:owner, :title, :description, :current) end
Use an Idea 'before_action' to populate associations Before rendering either of the 'GET' views, populate potential idea associations with instance variables to allow admins to set idea attributes (owners, current, state) to these values.
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index abc1234..def5678 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -3,9 +3,16 @@ # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception - set_current_tenant_by_subdomain_or_domain(:user, :subdomain, :domain) + set_current_tenant_through_filter + + before_filter :find_tenant rescue_from ActsAsTenant::Errors::NoTenantSet, :with => :handle_no_tenant_set + + def find_tenant + tenant = User.where(:subdomain => request.subdomains.last).first || User.where(:domain => request.domain).first || User.where(:domain => request.host).first + set_current_tenant(tenant) + end def require_current_tenant_session! if user_signed_in? and current_tenant == current_user
Fix matching of non-bare domains for domain-specifying tenants. Basically reimplmentation of set_current_tenant_by_subdomain_or_domain which also checks request.host Signed-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com>
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index abc1234..def5678 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -41,7 +41,7 @@ def set_section @section = params[:section] - @section.chomp!("_") + @section.chomp!("_") if @section.present? params.delete :section end end
Fix chomp! error when no @section
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index abc1234..def5678 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,6 +1,7 @@ class ApplicationController < ActionController::Base protect_from_forgery with: :exception + skip_before_filter :verify_authenticity_token # before_action :authenticate_user! before_filter :configure_permitted_parameters, if: :devise_controller? protected
Add filter for facebook callback
diff --git a/lib/atlas/preset.rb b/lib/atlas/preset.rb index abc1234..def5678 100644 --- a/lib/atlas/preset.rb +++ b/lib/atlas/preset.rb @@ -9,18 +9,11 @@ attribute :id, Integer attribute :description, String attribute :ordering, Integer + attribute :title, String attribute :display_group, String - attribute :author, String - attribute :title, String - attribute :comments, String - attribute :created_at, Time - attribute :updated_at, Time attribute :end_year, Integer attribute :in_start_menu, Boolean - attribute :user_id, Integer attribute :use_fce, Boolean - attribute :present_updated_at, Time - attribute :protected, Boolean attribute :area_code, String attribute :user_values, Hash[Symbol => Float]
Remove unused attributes from Preset Removed create / update times, and other attributes which had a "nil" value for all the presets. Ref quintel/etsource#298