diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
---|---|
diff --git a/spec/controllers/analytics_controller_spec.rb b/spec/controllers/analytics_controller_spec.rb
index abc1234..def5678 100644
--- a/spec/controllers/analytics_controller_spec.rb
+++ b/spec/controllers/analytics_controller_spec.rb
@@ -0,0 +1,99 @@+require 'rails_helper'
+
+RSpec.describe AnalyticsController, type: :controller do
+ describe 'GET system_activity_logs' do
+ it 'renders the correct template' do
+ get :system_activity_logs
+ expect(response).to render_template(:system_activity_logs)
+ end
+
+ context 'when no filters have been provided' do
+ before { get :system_activity_logs }
+
+ it 'assigns ivars correctly' do
+ expect(assigns(:date)).to eq(nil)
+ expect(assigns(:category)).to eq(nil)
+ expect(assigns(:logs)).to eq(SystemActivityLog.all)
+ end
+ end
+
+ context 'when some log records exist' do
+ let(:day) { 10 }
+ let(:month) { 10 }
+ let(:year) { 2010 }
+ let(:date) { Date.new(year, month, day) }
+ let(:category) { "Item" }
+
+ before do
+ SystemActivityLog.create!(
+ user: User.first,
+ message: "test",
+ category: "Item",
+ created_at: date
+ )
+
+ SystemActivityLog.create!(
+ user: User.first,
+ message: "test",
+ category: "Location",
+ created_at: Date.new(2011, 11, 11)
+ )
+ end
+
+ context 'when the date filter has been provided' do
+ before do
+ get :system_activity_logs,
+ { date:
+ {
+ "year" => year,
+ "month" => month,
+ "day" => day
+ }
+ }
+ end
+
+ it 'assigns ivars correctly' do
+ date = Date.new(year, month, day)
+
+ expect(assigns(:date)).to eq(date)
+ expect(assigns(:category)).to eq(nil)
+ expect(assigns(:logs)).to eq(SystemActivityLog.on_date(date))
+ end
+ end
+
+ context 'when the category filter has been provided' do
+ before do
+ get :system_activity_logs, { category: category }
+ end
+
+ it 'assigns ivars correctly' do
+ expect(assigns(:date)).to eq(nil)
+ expect(assigns(:category)).to eq(category)
+ expect(assigns(:logs)).to eq(SystemActivityLog.for_category(category))
+ end
+ end
+
+ context 'when both filters have been provided' do
+ before do
+ get :system_activity_logs,
+ { date:
+ {
+ "year" => year,
+ "month" => month,
+ "day" => day
+ },
+ category: category
+ }
+ end
+
+ it 'assigns ivars correctly' do
+ expect(assigns(:date)).to eq(date)
+ expect(assigns(:category)).to eq(category)
+ expect(assigns(:logs)).to eq(
+ SystemActivityLog.on_date(date).for_category(category)
+ )
+ end
+ end
+ end
+ end
+end
|
Add controller specs for filtering logic
|
diff --git a/spec/functional/func_searchable_table_spec.rb b/spec/functional/func_searchable_table_spec.rb
index abc1234..def5678 100644
--- a/spec/functional/func_searchable_table_spec.rb
+++ b/spec/functional/func_searchable_table_spec.rb
@@ -29,4 +29,16 @@ @controller.tableView(@controller.tableView, numberOfRowsInSection:0).should == 50
end
+ it "should expose the search_string variable and clear it properly" do
+ @controller.searchDisplayController(@controller, shouldReloadTableForSearchString:"North")
+
+ @controller.search_string.should == "north"
+ @controller.original_search_string.should == "North"
+
+ @controller.searchDisplayControllerWillEndSearch(@controller)
+
+ @controller.search_string.should == false
+ @controller.original_search_string.should == false
+ end
+
end
|
Add tests for exposing search_text and original_search_text.
|
diff --git a/testext.gemspec b/testext.gemspec
index abc1234..def5678 100644
--- a/testext.gemspec
+++ b/testext.gemspec
@@ -17,6 +17,8 @@ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.require_paths = ['lib']
+ gem.extensions = ['ext/testext/extconf.rb']
+
gem.add_development_dependency 'rspec', '~> 2.4'
gem.add_development_dependency 'rubygems-tasks', '~> 0.2'
gem.add_development_dependency 'yard', '~> 0.8'
|
Add the extconf.rb to the gemspec
|
diff --git a/Casks/rubymine.rb b/Casks/rubymine.rb
index abc1234..def5678 100644
--- a/Casks/rubymine.rb
+++ b/Casks/rubymine.rb
@@ -1,6 +1,6 @@ cask :v1 => 'rubymine' do
- version '7.1.2'
- sha256 '01d28529e7e4456b362799d7501abe6f060176df60943a9f8955403f8d4f0f22'
+ version '7.1.3'
+ sha256 '69c156cedf6b11dd913d5367d1f2a0e2bea9bd1755f113b762138e5718859b2d'
url "http://download-cf.jetbrains.com/ruby/RubyMine-#{version}.dmg"
name 'RubyMine'
|
Update Rubymine 7.1.2 => 7.1.3
|
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,7 +3,7 @@ # For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
- before_filter :set_locale
+ before_action :set_locale
def set_locale
I18n.locale = params[:locale] || I18n.default_locale
|
Replace deprecated 'before_filter' with 'before_action'
|
diff --git a/app/uploaders/image_uploader.rb b/app/uploaders/image_uploader.rb
index abc1234..def5678 100644
--- a/app/uploaders/image_uploader.rb
+++ b/app/uploaders/image_uploader.rb
@@ -14,9 +14,17 @@ end
process(:store) do |io, _context|
- original = io.download
- large = resize_to_limit!(original, 1200, 1200, &:auto_orient)
- thumbnail = resize_to_fill(large, 400, 400, gravity: 'Center')
+ original = io.download
+
+ large = ImageProcessing::MiniMagick.
+ source(original).
+ resize_to_limit(1200, 1200, &:auto_orient).
+ call
+
+ thumbnail = ImageProcessing::MiniMagick.
+ source(original).
+ resize_to_fill(400, 400, gravity: 'Center').
+ call
{
original: io,
|
ImageUploader: Use chainable API of "image_processing" gem
|
diff --git a/spec/acceptance/class_spec.rb b/spec/acceptance/class_spec.rb
index abc1234..def5678 100644
--- a/spec/acceptance/class_spec.rb
+++ b/spec/acceptance/class_spec.rb
@@ -1,17 +1,37 @@ require 'spec_helper_acceptance'
-describe 'git class' do
+describe 'git class:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
+ it 'should run successfully' do
+ pp = "class { 'git': }"
- context 'default parameters' do
- # Using puppet_apply as a helper
- it 'should work with no errors' do
- pp = <<-EOS
- class { 'git': }
- EOS
+ # Apply twice to ensure no errors the second time.
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stderr).not_to match(/error/i)
+ end
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stderr).not_to eq(/error/i)
- # Run it twice and test for idempotency
- apply_manifest(pp, :catch_failures => true)
- apply_manifest(pp, :catch_changes => true)
+ expect(r.exit_code).to be_zero
end
end
-end+
+ context 'package_ensure => present:' do
+ it 'runs successfully' do
+ pp = "class { 'ntp': package_ensure => present }"
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stderr).not_to match(/error/i)
+ end
+ end
+ end
+
+ context 'package_ensure => absent:' do
+ it 'runs successfully' do
+ pp = "class { 'git': package_ensure => absent }"
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stderr).not_to match(/error/i)
+ end
+ end
+ end
+end
|
Add acceptance test to check for package install and uninstall.
|
diff --git a/spec/helpers/paypal_helper.rb b/spec/helpers/paypal_helper.rb
index abc1234..def5678 100644
--- a/spec/helpers/paypal_helper.rb
+++ b/spec/helpers/paypal_helper.rb
@@ -15,8 +15,6 @@
block.call if block
- sleep 1
-
click_button("confirmButtonTop", wait: 30)
end
@@ -33,6 +31,8 @@ fill_in("email", :with => ENV["PAYPAL_USERNAME"])
fill_in("password", :with => ENV["PAYPAL_PASSWORD"])
+ sleep 1
+
click_button("btnLogin")
end
|
Move sleep to before login button
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index abc1234..def5678 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -16,7 +16,7 @@ require 'capybara/poltergeist'
Capybara.javascript_driver = :poltergeist
Capybara.register_driver :poltergeist do |app|
- Capybara::Poltergeist::Driver.new(app, timeout: 600)
+ Capybara::Poltergeist::Driver.new(app, timeout: 120)
end
Dir[File.expand_path("#{File.dirname(__FILE__)}/support/**/*.rb")].each { |f| require f }
|
Set timeout setting of Capybara to 120 seconds
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index abc1234..def5678 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -3,3 +3,16 @@
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'organicat'
+
+require "tempfile"
+
+class OrgFile
+ class << self
+ def create
+ Tempfile.open("orgfile") do |f|
+ f.puts(yield)
+ f.path
+ end
+ end
+ end
+end
|
Create OrgFile class as test helper
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index abc1234..def5678 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -7,6 +7,10 @@ .gsub(%r{<(\w+)([^>]*)>\n</\1>}, '<\1\2/>') # Auto close empty tags, e.g. <hr>\n</hr> => <hr/>
.gsub(/ "/, '"').gsub(/\=" /, '="') # Remove leading/trailing spaces inside attributes
.gsub(/ </, '<').gsub(/> /, '>') # Remove leading/trailing spaces inside tags
+ .gsub(/class\="([^"]+)"/) do # Sort class names
+ classes = $1.split(' ').sort.join(' ')
+ %{class="#{classes}"}
+ end
end
def compare(input, expected)
|
Sort class names when comparing
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index abc1234..def5678 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -8,6 +8,9 @@
Spec::Runner.configure do |config|
config.include ClearFixtures
+ config.before(:suite) do
+ ClearFixtures.clear_fixtures
+ end
config.before(:each) do
EphemeralResponse::Configuration.reset
EphemeralResponse.activate
|
Clear all fixtures before running suite
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index abc1234..def5678 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,4 +1,4 @@-$:.unshift(File.expand_path('../lib', File.dirname(__FILE__)))
+$LOAD_PATH << File.expand_path('../lib', File.dirname(__FILE__))
require 'sun_times'
|
Use English name for Ruby global
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index abc1234..def5678 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -3,7 +3,14 @@ require 'rails'
require 'mongoid'
require 'kaminari'
-
+# Ensure we use 'syck' instead of 'psych' in 1.9.2
+# RubyGems >= 1.5.0 uses 'psych' on 1.9.2, but
+# Psych does not yet support YAML 1.1 merge keys.
+# Merge keys is often used in mongoid.yml
+# See: http://redmine.ruby-lang.org/issues/show/4300
+if RUBY_VERSION >= '1.9.2'
+ YAML::ENGINE.yamler = 'syck'
+end
require File.join(File.dirname(__FILE__), 'fake_app')
require 'rspec/rails'
|
Add YAML merge keys workaround.
Prevent problems when using running tests with
a mongoid.yml using YAML merge keys on Ruby 1.9.2
and RubyGems >= 1.5
Will be needed until r30629 and r30630 are backported
to 1.9.2 (ticket #4357)
http://redmine.ruby-lang.org/issues/show/4357
|
diff --git a/feedback.gemspec b/feedback.gemspec
index abc1234..def5678 100644
--- a/feedback.gemspec
+++ b/feedback.gemspec
@@ -5,8 +5,10 @@ Gem::Specification.new do |s|
s.name = 'feedback'
s.version = Feedback::VERSION
- s.authors = ['Pablo Vicente', 'Ruben Martin']
- s.email = ['[email protected]', '[email protected]']
+ s.authors = ['Andrew Garner', 'Pablo Vicente', 'Ruben Martin']
+ s.email = ['[email protected]',
+ '[email protected]',
+ '[email protected]']
s.homepage = 'https://github.com/moneyadviceservice/feedback'
s.summary = 'Feedback form'
s.description = 'Feedback form'
|
Add Andrew Garner as an author
|
diff --git a/lib/hanzo/cli.rb b/lib/hanzo/cli.rb
index abc1234..def5678 100644
--- a/lib/hanzo/cli.rb
+++ b/lib/hanzo/cli.rb
@@ -27,8 +27,8 @@ Usage: hanzo action [options]
Available actions:
- deploy — Deploy a branch or a tag
-install — Install Hanzo configuration
+ deploy — Deploy a branch or a tag
+ install — Install Hanzo configuration
Options:
BANNER
|
Update help for CLI class
|
diff --git a/lib/skyed/git.rb b/lib/skyed/git.rb
index abc1234..def5678 100644
--- a/lib/skyed/git.rb
+++ b/lib/skyed/git.rb
@@ -14,7 +14,7 @@ ENV['GIT_SSH'] = '/tmp/ssh-git'
path = "/tmp/skyed.#{SecureRandom.hex}"
r = ::Git.clone(stack[:custom_cookbooks_source][:url], path)
- puts r.status
+ puts r.path
path
end
end
|
INF-941: Add check if remore is cloned
|
diff --git a/lib/snapshots.rb b/lib/snapshots.rb
index abc1234..def5678 100644
--- a/lib/snapshots.rb
+++ b/lib/snapshots.rb
@@ -0,0 +1,77 @@+module Humus
+
+ class Snapshots
+
+ attr_reader :access_key_id
+ attr_reader :secret_access_key
+
+ def initialize access_key_id = nil, secret_access_key = nil
+ @access_key_id = access_key_id
+ @secret_access_key = secret_access_key
+ end
+
+ def dump_prepared id
+ name = "trunk-#{id}.dump"
+ target_path = File.expand_path("../../fixtures/#{name}", __FILE__)
+
+ puts "Accessing prepared DB test snapshot #{id} from S3."
+
+ require 's3'
+ service = S3::Service.new(:access_key_id => access_key_id, :secret_access_key => secret_access_key)
+ bucket = service.buckets.find("cocoapods-org-testing-dumps")
+
+ # Due to a bug in the s3 gem we are searching for the object via iterating.
+ bucket.objects.each do |obj|
+ if obj.key == name
+ puts "Downloading prepared DB test snapshot #{id} from S3."
+ File.open(target_path, 'w') do |file|
+ file.write(obj.content)
+ end
+ break
+ end
+ end
+
+ puts "Prepared DB test snapshot #{id} downloaded to #{target_path}"
+ end
+
+ def seed_from_dump id
+ target_path = File.expand_path("../../fixtures/trunk-#{id}.dump", __FILE__)
+ raise "Dump #{id} could not be found." unless File.exists? target_path
+
+ puts "Restoring #{ENV['RACK_ENV']} database from #{target_path}"
+
+ # Ensure we're starting from a clean DB.
+ system "dropdb trunk_cocoapods_org_test"
+ system "createdb trunk_cocoapods_org_test"
+
+ # Restore the DB.
+ command = "pg_restore --no-privileges --clean --no-acl --no-owner -h localhost -d trunk_cocoapods_org_test #{target_path}"
+ puts "Executing:"
+ puts command
+ puts
+ result = system command
+ if result
+ puts "Database #{ENV['RACK_ENV']} restored from #{target_path}"
+ else
+ warn "Database #{ENV['RACK_ENV']} restored from #{target_path} with some errors."
+ # exit 1
+ end
+ end
+
+ def dump_prod id
+ target_path = File.expand_path("../../fixtures/trunk-#{id}.dump", __FILE__)
+ puts "Dumping production database from Heroku (works only if you have access to the database)"
+ command = "curl -o #{target_path} \`heroku pg:backups public-url #{id} -a cocoapods-trunk-service\`"
+ puts "Executing command:"
+ puts command
+ result = system command
+ if result
+ puts "Production database snapshot #{id} dumped into #{target_path}"
+ else
+ raise "Could not dump #{id} from production database."
+ end
+ end
+
+ end
+
+end
|
Add simple snapshot handling class.
|
diff --git a/libpixel.gemspec b/libpixel.gemspec
index abc1234..def5678 100644
--- a/libpixel.gemspec
+++ b/libpixel.gemspec
@@ -9,7 +9,7 @@ spec.authors = ["Joao Carlos"]
spec.email = ["[email protected]"]
spec.summary = %q{Ruby library to generate and sign LibPixel URLs.}
- spec.homepage = "http://libpixel.com"
+ spec.homepage = "https://github.com/libpixel/libpixel-ruby"
spec.license = "MIT"
spec.files = `git ls-files -z`.split("\x0")
|
Change gemspec homepage to GitHub
|
diff --git a/creperie.gemspec b/creperie.gemspec
index abc1234..def5678 100644
--- a/creperie.gemspec
+++ b/creperie.gemspec
@@ -2,28 +2,31 @@ $LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
require 'creperie/version'
-Gem::Specification.new do |gem|
- gem.name = 'creperie'
- gem.version = Creperie::VERSION
- gem.authors = ['David Celis']
- gem.email = ['[email protected]']
- gem.summary = 'Pour a new Crêpe app.'
- gem.description = 'Create and maintain your Crêpe applications.'
- gem.homepage = 'https://github.com/davidcelis/creperie'
- gem.license = 'MIT'
+Gem::Specification.new do |s|
+ s.name = 'creperie'
+ s.version = Creperie::VERSION
+ s.authors = ['David Celis']
+ s.email = ['[email protected]']
+ s.summary = 'Pour a new Crêpe app.'
+ s.description = 'Create and maintain your Crêpe applications.'
+ s.homepage = 'https://github.com/davidcelis/creperie'
+ s.license = 'MIT'
- gem.executables = ['crepe']
- gem.files = Dir['lib/**/{*,.*}']
- gem.test_files = Dir['spec/**/*']
- gem.require_paths = ['lib']
+ s.executables = ['crepe']
+ s.files = Dir['lib/**/{*,.*}']
+ s.test_files = Dir['spec/**/*']
+ s.require_paths = ['lib']
- gem.add_dependency 'crepe', '~> 0.0.1.pre'
- gem.add_dependency 'clamp', '~> 0.6'
- gem.add_dependency 'thor', '~> 0.19'
- gem.add_dependency 'rack-console', '~> 1.3'
+ s.has_rdoc = 'yard'
- gem.add_development_dependency 'rspec', '~> 3.0'
- gem.add_development_dependency 'fakefs', '~> 0.5'
- gem.add_development_dependency 'cane', '~> 2.6'
- gem.add_development_dependency 'rake', '~> 10.3'
+ s.add_dependency 'crepe', '~> 0.0.1.pre'
+ s.add_dependency 'clamp', '~> 0.6'
+ s.add_dependency 'thor', '~> 0.19'
+ s.add_dependency 'rack-console', '~> 1.3'
+
+ s.add_development_dependency 'rspec', '~> 3.0'
+ s.add_development_dependency 'fakefs', '~> 0.5'
+ s.add_development_dependency 'cane', '~> 2.6'
+ s.add_development_dependency 'rake', '~> 10.3'
+ s.add_development_dependency 'yard', '~> 0.8'
end
|
Add YARD as a development dependency
Signed-off-by: David Celis <[email protected]>
|
diff --git a/griddler.gemspec b/griddler.gemspec
index abc1234..def5678 100644
--- a/griddler.gemspec
+++ b/griddler.gemspec
@@ -14,12 +14,6 @@ s.files = Dir['{app,config,lib}/**/*'] + ['LICENSE', 'Rakefile', 'README.md']
s.require_paths = %w{app lib}
- s.post_install_message = <<-MESSAGE
-When upgrading from a Griddler version previous to 0.5.0, it is important that
-you view https://github.com/thoughtbot/griddler/#upgrading-to-griddler-050 for
-upgrade information.
-MESSAGE
-
s.add_dependency 'rails', '>= 3.2.0'
s.add_dependency 'htmlentities'
s.add_development_dependency 'rspec-rails'
|
Remove post install message from 0.5.0
Closes #164
|
diff --git a/micro_blogger.rb b/micro_blogger.rb
index abc1234..def5678 100644
--- a/micro_blogger.rb
+++ b/micro_blogger.rb
@@ -21,7 +21,15 @@ command = ""
while command != "q"
printf "enter command: "
- command = gets.chomp
+ input = gets.chomp
+ parts = input.split(" ")
+ command = parts[0]
+ case command
+ when "q" then puts "Goodbye!"
+ when "t" then self.tweet(parts[1..-1].join(" "))
+ else
+ puts "Sorry, I don't know how to #{command}"
+ end
end
end
end
|
Add tweet command to run method
|
diff --git a/db/migrate/20151001193521_rename_hardware_columns.rb b/db/migrate/20151001193521_rename_hardware_columns.rb
index abc1234..def5678 100644
--- a/db/migrate/20151001193521_rename_hardware_columns.rb
+++ b/db/migrate/20151001193521_rename_hardware_columns.rb
@@ -0,0 +1,8 @@+class RenameHardwareColumns < ActiveRecord::Migration
+ def change
+ rename_column :hardwares, :cores_per_socket, :cpu_cores_per_socket
+ rename_column :hardwares, :numvcpus, :cpu_sockets
+ rename_column :hardwares, :logical_cpus, :cpu_total_cores
+ rename_column :hardwares, :memory_cpu, :memory_mb
+ end
+end
|
Add migration to change cpu and memory columns
|
diff --git a/lib/c2y/dsl/context/container_unit.rb b/lib/c2y/dsl/context/container_unit.rb
index abc1234..def5678 100644
--- a/lib/c2y/dsl/context/container_unit.rb
+++ b/lib/c2y/dsl/context/container_unit.rb
@@ -10,30 +10,12 @@ instance_eval(&block)
end
- private
+ [:command, :enable, :environments, :image, :ports, :volumes].each do |attr|
+ define_method(attr) do |arg|
+ @result.send("#{attr}=", arg)
+ end
- def command(unit_command)
- @result.command = unit_command.to_s
- end
-
- def enable(unit_enable)
- @result.enable = unit_enable
- end
-
- def environments(unit_environments)
- @result.environments = unit_environments
- end
-
- def image(unit_image)
- @result.image = unit_image
- end
-
- def ports(unit_ports)
- @result.ports = unit_ports
- end
-
- def volumes(unit_volumes)
- @result.volumes = unit_volumes
+ private attr
end
end
end
|
Use dynamic method definition in ContainerUnit
|
diff --git a/core/file/lchmod_spec.rb b/core/file/lchmod_spec.rb
index abc1234..def5678 100644
--- a/core/file/lchmod_spec.rb
+++ b/core/file/lchmod_spec.rb
@@ -1,7 +1,7 @@ require_relative '../../spec_helper'
describe "File.lchmod" do
- guard -> { File.respond_to?(:lchmod) } do
+ platform_is_not :linux, :windows, :openbsd, :solaris, :aix do
before :each do
@fname = tmp('file_chmod_test')
@lname = @fname + '.lnk'
@@ -30,9 +30,13 @@ end
end
- guard_not -> { File.respond_to?(:lchmod) } do
+ platform_is :linux, :openbsd, :aix do
+ it "returns false from #respond_to?" do
+ File.respond_to?(:lchmod).should be_false
+ end
+
it "raises a NotImplementedError when called" do
- -> { File.lchmod 0, "foo" }.should raise_error(NotImplementedError)
+ -> { File.lchmod 0 }.should raise_error(NotImplementedError)
end
end
end
|
Revert "Fix File.lchmod spec guards"
* This reverts commit cc7b9e56898950e36221e2d4b92d6d90288244c8.
* Not good enough: https://bugs.ruby-lang.org/issues/16756
|
diff --git a/lib/lightspeed_restaurant/customer.rb b/lib/lightspeed_restaurant/customer.rb
index abc1234..def5678 100644
--- a/lib/lightspeed_restaurant/customer.rb
+++ b/lib/lightspeed_restaurant/customer.rb
@@ -2,25 +2,25 @@
module LightspeedRestaurant
class Customer < LightspeedRestaurant::Base
- attr_accessor :id,
- :city,
- :country,
- :deliveryCity,
- :deliveryCountry,
- :deliveryStreet,
- :deliveryStreetNumber,
- :deliveryZip,
- :email,
- :firstName,
- :lastName,
- :street,
- :streetNumber,
- :telephone,
- :zip,
- :links
+ def self.attributes
+ [:id,
+ :city,
+ :country,
+ :deliveryCity,
+ :deliveryCountry,
+ :deliveryStreet,
+ :deliveryStreetNumber,
+ :deliveryZip,
+ :email,
+ :firstName,
+ :lastName,
+ :street,
+ :streetNumber,
+ :telephone,
+ :zip,
+ :links].freeze
+ end
- def full_name
- "#{firstName} #{lastName}"
- end
+ attr_accessor(*attributes)
end
end
|
Create attr_accessor based on list
|
diff --git a/lib/spree_pag_seguro_configuration.rb b/lib/spree_pag_seguro_configuration.rb
index abc1234..def5678 100644
--- a/lib/spree_pag_seguro_configuration.rb
+++ b/lib/spree_pag_seguro_configuration.rb
@@ -1,6 +1,6 @@ module Spree
class PagSeguroConfiguration < Spree::Preferences::Configuration
- preference :email, :string, default: "seu_email_cadastrado@pag_seguro.com.br"
- preference :token, :string, default: "SEUTOKENNOPASEGURO"
+ preference :email, default: "seu_email_cadastrad@pag_seguro.com.br"
+ preference :token, default: "SEUTOKENNOPASEGURO"
end
end
|
Revert "Fixing preference to work with spree 1.1.0.beta"
This reverts commit 1cac53bcc46270b619166ee9c17533e0e62a9746.
|
diff --git a/lib/table_cloth/extensions/actions.rb b/lib/table_cloth/extensions/actions.rb
index abc1234..def5678 100644
--- a/lib/table_cloth/extensions/actions.rb
+++ b/lib/table_cloth/extensions/actions.rb
@@ -17,7 +17,11 @@ private
def action_collection
- @action_collection ||= ActionCollection.new
+ @action_collection ||= if superclass.respond_to? :action_collection
+ superclass.action_collection.dup
+ else
+ ActionCollection.new
+ end
end
end
end
|
Change action collection to return super class collection if available.
|
diff --git a/lib/xcode_snippets/snippet_manager.rb b/lib/xcode_snippets/snippet_manager.rb
index abc1234..def5678 100644
--- a/lib/xcode_snippets/snippet_manager.rb
+++ b/lib/xcode_snippets/snippet_manager.rb
@@ -38,11 +38,11 @@ def generate_uuid
@uuid_generator.generate
end
- end
-
- class UUIDGenerator
- def self.generate
- UUIDTools::UUID.random_create.to_s.upcase
+
+ class UUIDGenerator
+ def self.generate
+ UUIDTools::UUID.random_create.to_s.upcase
+ end
end
end
end
|
Move this class to the right lexical scope
|
diff --git a/spec/easypost/shipment_spec.rb b/spec/easypost/shipment_spec.rb
index abc1234..def5678 100644
--- a/spec/easypost/shipment_spec.rb
+++ b/spec/easypost/shipment_spec.rb
@@ -15,7 +15,7 @@ lastname: 'Scamander',
address1: '200 19th St',
city: 'Birmingham',
- state: FactoryBot.create(:state),
+ state: Spree::State.first,
country: FactoryBot.create(:country),
zipcode: 35203,
phone: '123456789'
|
Use Spree::State.first instead of FactoryBot.create(:state)
For Solidus v2.5 and upwards, using the aforementioned syntax caused
an address state mismatch with the address country, causing the spec
to fail
|
diff --git a/spec/features/homepage_spec.rb b/spec/features/homepage_spec.rb
index abc1234..def5678 100644
--- a/spec/features/homepage_spec.rb
+++ b/spec/features/homepage_spec.rb
@@ -0,0 +1,31 @@+require 'spec_helper'
+
+RSpec.feature "The homepage" do
+ let(:work1) { create(:work, :public, title: ['Work 1']) }
+ before do
+ create(:featured_work, work_id: work1.id)
+ end
+
+ scenario do
+ visit root_path
+
+ # It shows featured works
+ expect(page).to have_link "Work 1"
+ end
+
+ context "as an admin" do
+ let(:user) { create(:user) }
+ before do
+ allow(RoleMapper).to receive(:byname).and_return(user.user_key => ['admin'])
+ sign_in user
+ visit root_path
+ end
+
+ scenario do
+ # It shows featured works that I can sort
+ within '.dd-item' do
+ expect(page).to have_link "Work 1"
+ end
+ end
+ end
+end
|
Add feature spec for the homepage
|
diff --git a/spec/kramdown/document_spec.rb b/spec/kramdown/document_spec.rb
index abc1234..def5678 100644
--- a/spec/kramdown/document_spec.rb
+++ b/spec/kramdown/document_spec.rb
@@ -2,7 +2,7 @@
require 'kramdown/man'
-describe Kramdown::Document do
+describe Kramdown::Document, :integration do
let(:man_dir) { File.expand_path('../../../man',__FILE__) }
let(:markdown_path) { File.join(man_dir,'kramdown-man.1.md') }
let(:markdown) { File.read(markdown_path) }
|
Tag the Kramdown::Document specs with :integration.
|
diff --git a/spec/mal_external_eval_spec.rb b/spec/mal_external_eval_spec.rb
index abc1234..def5678 100644
--- a/spec/mal_external_eval_spec.rb
+++ b/spec/mal_external_eval_spec.rb
@@ -0,0 +1,10 @@+require_relative 'spec_helper'
+
+describe 'Mal' do
+ describe '.typespec' do
+ it 'allows shorthand typespecs to be created without module prefixing' do
+ matcher = Mal.typespec { Maybe(String) }
+ expect(matcher.inspect).to eq('Maybe(String)')
+ end
+ end
+end
|
Add a test for Mal.typespec
|
diff --git a/spec/support/silence_output.rb b/spec/support/silence_output.rb
index abc1234..def5678 100644
--- a/spec/support/silence_output.rb
+++ b/spec/support/silence_output.rb
@@ -1,14 +1,23 @@ # coding: utf-8
shared_context 'silence output', silence_output: true do
+ null_object = BasicObject.new
+
+ class << null_object
+ # #respond_to_missing? does not work.
+ def respond_to?(*)
+ true
+ end
+
+ def method_missing(*)
+ end
+ end
+
before do
- null_output = double('output').as_null_object
-
@original_stdout = $stdout
@original_stderr = $stderr
-
- $stdout = null_output
- $stderr = null_output
+ $stdout = null_object
+ $stderr = null_object
end
after do
|
Use a custom null object in the silence output context
|
diff --git a/tests/cuke/step_definitions/log-in.rb b/tests/cuke/step_definitions/log-in.rb
index abc1234..def5678 100644
--- a/tests/cuke/step_definitions/log-in.rb
+++ b/tests/cuke/step_definitions/log-in.rb
@@ -15,7 +15,7 @@ Given "I visit Security/logout"
end
-Given /fill out the log in form with user "(.*)" and password "(.*)"/ do |user, password|
+Given /fill out the log(?:\s*)in form with user "(.*)" and password "(.*)"/ do |user, password|
Given 'I visit Security/logout'
And 'I visit Security/login?BackURL=Security/login'
And "I put \"#{user}\" in the \"Email\" field"
|
MINOR: Make Salad accept "login" or "log in"
git-svn-id: 6a4b03ee343470183bbb87c82a181a93d31fa3a9@101870 467b73ca-7a2a-4603-9d3b-597d59a354a9
|
diff --git a/lib/generators/openapi/templates/openapi.rb b/lib/generators/openapi/templates/openapi.rb
index abc1234..def5678 100644
--- a/lib/generators/openapi/templates/openapi.rb
+++ b/lib/generators/openapi/templates/openapi.rb
@@ -2,7 +2,7 @@ config.apis = {
default: {
title: 'Default',
- description: '',
+ description: 'API configuration is in `config/initializers/openapi.rb`.',
version: '1.0',
base_path: '/api',
controllers: []
|
Add description for default api config
|
diff --git a/lib/generators/test_unit/model_generator.rb b/lib/generators/test_unit/model_generator.rb
index abc1234..def5678 100644
--- a/lib/generators/test_unit/model_generator.rb
+++ b/lib/generators/test_unit/model_generator.rb
@@ -8,6 +8,15 @@ include ::NestedScaffold::Base
source_root superclass.source_root
+
+ def initialize(*)
+ super
+
+ unless attributes.map {|a| [a.name, a.type.to_s]}.include? [nested_parent_name, 'references']
+ #DIRTY HACK add 'references' attribute
+ attributes.insert 0, Rails::Generators::GeneratedAttribute.new(nested_parent_name, :references)
+ end
+ end
end
end
end
|
Add `references` to fixtures as well
|
diff --git a/lib/twurl/account_information_controller.rb b/lib/twurl/account_information_controller.rb
index abc1234..def5678 100644
--- a/lib/twurl/account_information_controller.rb
+++ b/lib/twurl/account_information_controller.rb
@@ -5,10 +5,13 @@ if rcfile.empty?
CLI.puts "No authorized accounts"
else
- rcfile.profiles.each do |account_name, configuration|
- account_summary = "#{account_name}: #{configuration['consumer_key']}"
- account_summary << " (default)" if rcfile.default_profile == account_name
- CLI.puts account_summary
+ rcfile.profiles.each do |account_name, configurations|
+ CLI.puts account_name
+ configurations.each do |consumer_key, _|
+ account_summary = " #{consumer_key}"
+ account_summary << " (default)" if rcfile.default_profile == [account_name, consumer_key]
+ CLI.puts account_summary
+ end
end
end
end
|
Update account information controller now that accounts can have multiple consumer keys.
|
diff --git a/test/helpers/users_helper_test.rb b/test/helpers/users_helper_test.rb
index abc1234..def5678 100644
--- a/test/helpers/users_helper_test.rb
+++ b/test/helpers/users_helper_test.rb
@@ -1,4 +1,11 @@ require 'test_helper'
class UsersHelperTest < ActionView::TestCase
+ include UsersHelper
+
+ test 'role help is a description list' do
+ assert_includes role_help, "Guest"
+ assert_includes role_help, "Manager"
+ assert_includes role_help, "Admin"
+ end
end
|
Add test for role description helper
|
diff --git a/spec/features/ordering_spec.rb b/spec/features/ordering_spec.rb
index abc1234..def5678 100644
--- a/spec/features/ordering_spec.rb
+++ b/spec/features/ordering_spec.rb
@@ -10,4 +10,33 @@ end
end
+ describe 'Customizing and ordering a card' do
+ xit 'Can create a card with all of the relevant fields' do
+ visit "/card_templates/#{template.id}"
+
+ fill_in_card_form(
+ message: 'Not having the sorry',
+ signature: 'Kindly, James',
+ recipient_name: 'Bad Friend',
+ street_address: '123 Main Street',
+ city: 'Oakland',
+ state: 'CA',
+ zip_code: '94607'
+ )
+ click_on 'Send Card'
+
+ expect(page).to have_content 'Your card has been ordered'
+ end
+ end
+
+ def fill_in_card_form(message:, signature:, recipient_name:, street_address:, city:, state:, zip_code:)
+ fill_in 'Custom Message', with: message
+ fill_in 'Signature', with: signature
+ fill_in 'Recipient Name', with: recipient_name
+ fill_in 'Street Address', with: street_address
+ fill_in 'City', with: city
+ fill_in 'State', with: state
+ fill_in 'Zip Code', with: zip_code
+ end
+
end
|
Add test for new card form
|
diff --git a/spec/model_specs/skill_spec.rb b/spec/model_specs/skill_spec.rb
index abc1234..def5678 100644
--- a/spec/model_specs/skill_spec.rb
+++ b/spec/model_specs/skill_spec.rb
@@ -5,8 +5,14 @@ skill = Skill.new(title: "juggling")
expect(skill.valid?).to be true
end
+
it "is invalid without a title" do
skill = Skill.new(title: nil)
expect(skill.errors[:title]).not_to include("can't be blank")
end
+
+ it "sets refreshed_at to the current epoch time upon record creation" do
+ skill = Skill.create(title: "hello there")
+ expect(skill.refreshed_at).to eq Time.now.to_i
+ end
end
|
Add test that verifies the correct time is associated with the skill record
|
diff --git a/spec/models/collection_spec.rb b/spec/models/collection_spec.rb
index abc1234..def5678 100644
--- a/spec/models/collection_spec.rb
+++ b/spec/models/collection_spec.rb
@@ -19,6 +19,13 @@ end
end
context 'OCR Settings' do
+ before :each do
+ DatabaseCleaner.start
+ end
+ after :each do
+ DatabaseCleaner.clean
+ end
+
let(:work_no_ocr) { create(:work) }
let(:work_ocr) { create(:work) }
|
Add DB cleaner to model tests
|
diff --git a/lib/magi/simple_cov/railtie.rb b/lib/magi/simple_cov/railtie.rb
index abc1234..def5678 100644
--- a/lib/magi/simple_cov/railtie.rb
+++ b/lib/magi/simple_cov/railtie.rb
@@ -3,6 +3,10 @@ module Magi
module SimpleCov
class Railtie < Rails::Railtie
+ initializer "magi.simple_cov.set_autoload_paths", before: :set_autoload_paths do |app|
+ app.config.autoload_paths << File.expand_path("../../../", __FILE__)
+ end
+
config.after_initialize do
require "magi/simple_cov/initializer"
end
|
Add autoload paths for development convenience
|
diff --git a/lib/metriks_log_webhook/app.rb b/lib/metriks_log_webhook/app.rb
index abc1234..def5678 100644
--- a/lib/metriks_log_webhook/app.rb
+++ b/lib/metriks_log_webhook/app.rb
@@ -42,6 +42,8 @@ body = metric_list.to_hash
settings.metrics_client.submit(body)
+
+ 'ok'
end
end
end
|
Return 'ok' in the webhook
|
diff --git a/lib/middleman-i18n-markdown.rb b/lib/middleman-i18n-markdown.rb
index abc1234..def5678 100644
--- a/lib/middleman-i18n-markdown.rb
+++ b/lib/middleman-i18n-markdown.rb
@@ -1,5 +1,6 @@ # Require core library
require "middleman-core"
+require "redcarpet"
# Extension namespace
class I18nMarkdown < ::Middleman::Extension
@@ -13,7 +14,6 @@ end
def translate(locale, key, options = {})
- puts super.inspect
options[:markdown] ? process(super) : super
end
@@ -27,22 +27,10 @@ # Call super to build options from the options_hash
super
-
I18n::Backend::Simple.send(:include, I18n::Backend::Markdown)
-
- # Require libraries only when activated
- # require 'necessary/library'
-
- # set up your extension
- # puts options.my_option
end
def after_configuration; end
end
-# Register extensions which can be activated
-# Make sure we have the version of Middleman we expect
-# Name param may be omited, it will default to underscored
-# version of class name
-
- I18nMarkdown.register(:i18n_markdown)
+I18nMarkdown.register(:i18n_markdown)
|
Fix unitialized constant by including redcarpet
remove puts
remove comments
tidy up whitespace
|
diff --git a/lib/mongoid/relations/eager.rb b/lib/mongoid/relations/eager.rb
index abc1234..def5678 100644
--- a/lib/mongoid/relations/eager.rb
+++ b/lib/mongoid/relations/eager.rb
@@ -22,8 +22,9 @@ end
def preload(relations, docs)
- grouped_relations = relations.group_by(&:inverse_class_name)
- grouped_relations.values.each do |associations|
+ relations.group_by(&:inverse_class_name)
+ .values
+ .each do |associations|
associations.group_by(&:relation)
.each do |relation, association|
relation.eager_load_klass.new(association, docs).run
|
Remove useless grouped_relations local variable
|
diff --git a/lib/sync/controller_helpers.rb b/lib/sync/controller_helpers.rb
index abc1234..def5678 100644
--- a/lib/sync/controller_helpers.rb
+++ b/lib/sync/controller_helpers.rb
@@ -9,14 +9,8 @@ end
module ClassMethods
- def sync_action(*actions)
- options = {}
- options = actions.last if actions.last.is_a? Hash
- if actions.include? :all
- around_filter :enable_sync, options
- else
- around_filter :enable_sync, only: actions
- end
+ def enable_sync(options = {})
+ around_filter :enable_sync, options
end
end
|
Use clearer sync DSL for controller.
|
diff --git a/lib/validic/third_party_app.rb b/lib/validic/third_party_app.rb
index abc1234..def5678 100644
--- a/lib/validic/third_party_app.rb
+++ b/lib/validic/third_party_app.rb
@@ -12,12 +12,12 @@ # @return [Hashie::Mash] with list of Organization
def get_apps(params={})
params = extract_params(params)
- get_endpoint(:apps, params)
+ get("/#{Validic.api_version}/organizations/#{Validic.organization_id}/apps.json", params)
end
##
# Get User List of Third Party Synced Apps available base on `authentication_token`
- #
+ #
# params[:auth_token] User authentication parameter
#
# @return [Hashie::Mash] with list of Organization
|
Fix apps.json call so tests pass.
|
diff --git a/spec/api_classes/album_spec.rb b/spec/api_classes/album_spec.rb
index abc1234..def5678 100644
--- a/spec/api_classes/album_spec.rb
+++ b/spec/api_classes/album_spec.rb
@@ -11,6 +11,10 @@ end
describe "restricted methods" do
+ it "should define restricted methods" do
+ LastFM::Album.should respond_to(:get_tags, :add_tags, :remove_tag, :share)
+ end
+
it "should respond to restricted read methods" do
LastFM.should_receive(:send_api_request).with("album.gettags", {:bar => :baz, :api_sig => true}, :get).and_return({})
LastFM::Album.get_tags(:bar => :baz).should be_a(Hash)
|
Check restricted method definitions in Album
|
diff --git a/spec/whitespace_spec.rb b/spec/whitespace_spec.rb
index abc1234..def5678 100644
--- a/spec/whitespace_spec.rb
+++ b/spec/whitespace_spec.rb
@@ -3,7 +3,7 @@ context 'non-ruby files' do
# Whitespace in ruby files is managed by Rubocop.
# Ignore ems.proto as it's a generated file.
- failures = `git grep -n -I ' $' | grep -v .rb | grep -v ems.proto`
+ failures = `git grep -n -I '\s$' | grep -v .rb | grep -v ems.proto`
it 'should have no trailing whitespace' do
expect(failures).to be_empty, -> { failures }
end
|
Check all whitespace, not just space char
|
diff --git a/spec/support/capture_stdout.rb b/spec/support/capture_stdout.rb
index abc1234..def5678 100644
--- a/spec/support/capture_stdout.rb
+++ b/spec/support/capture_stdout.rb
@@ -0,0 +1,11 @@+require 'stringio'
+
+def capture_stdout
+ captured_output = StringIO.new
+ real_stdout = $stdout
+ $stdout = captured_output
+ yield
+ensure
+ $stdout = real_stdout
+ return captured_output.string
+end
|
Add spec helper for capturing stdout to a string
* Shout out to @avdi for his awesome RubyTapas!
* http://www.rubytapas.com/episodes/29-Redirecting-Output
|
diff --git a/Kiwi.podspec b/Kiwi.podspec
index abc1234..def5678 100644
--- a/Kiwi.podspec
+++ b/Kiwi.podspec
@@ -8,5 +8,6 @@ s.source = { :git => 'https://github.com/allending/Kiwi.git', :tag => '2.0.3' }
s.source_files = 'Classes'
s.framework = 'SenTestingKit'
- s.xcconfig = { 'FRAMEWORK_SEARCH_PATHS' => '$(inherited) "$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks"' }
+ s.ios.xcconfig = { 'FRAMEWORK_SEARCH_PATHS' => '$(inherited) "$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks"' }
+ s.osx.xcconfig = { 'FRAMEWORK_SEARCH_PATHS' => '$(inherited) "$(DEVELOPER_LIBRARY_DIR)/Frameworks"' }
end
|
Remove nonexistent header search path
`$(SDKROOT)/Developer/Library/Frameworks` does not exist in the OS X SDK.
|
diff --git a/lib/algorithm.rb b/lib/algorithm.rb
index abc1234..def5678 100644
--- a/lib/algorithm.rb
+++ b/lib/algorithm.rb
@@ -12,7 +12,7 @@ def wrapped_js(options)
js = "calculation = function() {"
- @definitions.each { |d| js += "\n var #{d.label};" }
+ @definitions.each { |d| js += "\n var #{d.label} = #{d.default || 'null'};" }
options.each do |key, value|
type = @definitions.find {|d| d.label == key.to_s }.type
|
Use default values for definitions
|
diff --git a/lib/load_more.rb b/lib/load_more.rb
index abc1234..def5678 100644
--- a/lib/load_more.rb
+++ b/lib/load_more.rb
@@ -16,7 +16,7 @@ per_load = options.delete(:per_load) || self.per_load
last_load_id = options.delete(:last_load)
rel = order(id: :desc).limit(per_load)
- rel = rel.where('id < ?', last_load_id) if last_load_id
+ rel = rel.where("#{self.table_name}.id < ?", last_load_id) if last_load_id
rel
end
|
Use table name in where condition to avoid ambiguous column error
|
diff --git a/lib/pgquilter.rb b/lib/pgquilter.rb
index abc1234..def5678 100644
--- a/lib/pgquilter.rb
+++ b/lib/pgquilter.rb
@@ -4,6 +4,8 @@ require 'json'
require 'mail'
require 'github_api'
+
+$:.unshift File.dirname(__FILE__)
require 'pgquilter/config'
require 'pgquilter/application'
|
Add app root directory to gem path
|
diff --git a/acls.gemspec b/acls.gemspec
index abc1234..def5678 100644
--- a/acls.gemspec
+++ b/acls.gemspec
@@ -10,7 +10,7 @@ s.homepage = 'https://github.com/kolorahl/acls'
s.license = 'MIT'
- s.add_runtime_dependency('activesupport', '~> 4.2.5')
+ s.add_runtime_dependency('activesupport', '~> 4.2', '>= 4.2.5')
- s.add_development_dependency('rspec', '~> 3.4.0')
+ s.add_development_dependency('rspec', '~> 3.4', '>= 3.4.0')
end
|
Fix Gemspec warnings for overzealous dependency restrictions
|
diff --git a/LE.gemspec b/LE.gemspec
index abc1234..def5678 100644
--- a/LE.gemspec
+++ b/LE.gemspec
@@ -3,7 +3,7 @@
Gem::Specification.new do |s|
s.name = "le"
- s.version = "2.2.8"
+ s.version = "2.2.7"
s.date = Time.now
s.summary = "Logentries plugin"
s.description =<<EOD
|
Switch back 2.2.7, last bump not required
|
diff --git a/core/db/migrate/20150609093816_increase_scale_on_pre_tax_amounts.rb b/core/db/migrate/20150609093816_increase_scale_on_pre_tax_amounts.rb
index abc1234..def5678 100644
--- a/core/db/migrate/20150609093816_increase_scale_on_pre_tax_amounts.rb
+++ b/core/db/migrate/20150609093816_increase_scale_on_pre_tax_amounts.rb
@@ -1,5 +1,15 @@ class IncreaseScaleOnPreTaxAmounts < ActiveRecord::Migration
def change
+ # set pre_tax_amount on shipments to discounted_amount - included_tax_total
+ # so that the null: false option on the shipment pre_tax_amount doesn't generate
+ # errors.
+ #
+ execute(<<-SQL)
+ UPDATE spree_shipments
+ SET pre_tax_amount = (cost + promo_total) - included_tax_total
+ WHERE pre_tax_amount IS NULL;
+ SQL
+
change_column :spree_line_items, :pre_tax_amount, :decimal, precision: 12, scale: 4, default: 0.0, null: false
change_column :spree_shipments, :pre_tax_amount, :decimal, precision: 12, scale: 4, default: 0.0, null: false
end
|
Set pre_tax_amount for shipments so that migration works
On existing installations, the migrations `IncreaseScaleOnPreTaxAmounts`
will fail because of existing shipments not having a `pre_tax_amount` set.
Fixes #6525
Fixes #6527
|
diff --git a/core/lib/spree/testing_support/factories/shipping_method_factory.rb b/core/lib/spree/testing_support/factories/shipping_method_factory.rb
index abc1234..def5678 100644
--- a/core/lib/spree/testing_support/factories/shipping_method_factory.rb
+++ b/core/lib/spree/testing_support/factories/shipping_method_factory.rb
@@ -3,6 +3,8 @@ zones { |a| [Spree::Zone.global] }
name 'UPS Ground'
code 'UPS_GROUND'
+ carrier 'UPS'
+ service_level '1DAYGROUND'
before(:create) do |shipping_method, evaluator|
if shipping_method.shipping_categories.empty?
|
Add carrier and service level to the shipping method factory
|
diff --git a/roles/ucl.rb b/roles/ucl.rb
index abc1234..def5678 100644
--- a/roles/ucl.rb
+++ b/roles/ucl.rb
@@ -33,5 +33,6 @@ )
run_list(
- "role[gb]"
+ "role[gb]",
+ "recipe[prometheus]"
)
|
Install basic prometheus node exporter on UCL machines
|
diff --git a/db/migrate/20140708123314_index_role_assignments_filtered_fields.rb b/db/migrate/20140708123314_index_role_assignments_filtered_fields.rb
index abc1234..def5678 100644
--- a/db/migrate/20140708123314_index_role_assignments_filtered_fields.rb
+++ b/db/migrate/20140708123314_index_role_assignments_filtered_fields.rb
@@ -0,0 +1,15 @@+class IndexRoleAssignmentsFilteredFields < ActiveRecord::Migration
+
+ def self.up
+ add_index :role_assignments, [:accessor_id, :accessor_type]
+ add_index :role_assignments, [:accessor_id, :accessor_type, :role_id]
+ add_index :role_assignments, [:resource_id, :resource_type]
+ add_index :role_assignments, [:resource_id, :resource_type, :role_id]
+ add_index :role_assignments, [:accessor_id, :accessor_type, :resource_id, :resource_type]
+ add_index :profiles, [:type]
+ add_index :profiles, [:visible]
+ add_index :profiles, [:enabled]
+ add_index :profiles, [:validated]
+ end
+
+end
|
Speed up role assignments fetch
(ActionItem3197)
|
diff --git a/db/data_migration/20170118111510_revert_scotland_office_rename.rb b/db/data_migration/20170118111510_revert_scotland_office_rename.rb
index abc1234..def5678 100644
--- a/db/data_migration/20170118111510_revert_scotland_office_rename.rb
+++ b/db/data_migration/20170118111510_revert_scotland_office_rename.rb
@@ -0,0 +1,9 @@+scotland_office = Organisation.find_by(slug: "uk-government-scotland")
+
+# Rename the organisation
+new_name = "Scotland Office"
+scotland_office.update_attributes!(name: new_name)
+
+# Modify the address accordingly
+new_slug = "scotland-office"
+DataHygiene::OrganisationReslugger.new(scotland_office, new_slug).run!
|
Rename UK Government Scotland back to Scotland Office
Scotland Office was the original name that was changed in
https://github.com/alphagov/whitehall/pull/2953 but this was done
prematurely so we're changing the name back.
|
diff --git a/db/migrate/20190206235345_change_committee_member_id_to_bigint.rb b/db/migrate/20190206235345_change_committee_member_id_to_bigint.rb
index abc1234..def5678 100644
--- a/db/migrate/20190206235345_change_committee_member_id_to_bigint.rb
+++ b/db/migrate/20190206235345_change_committee_member_id_to_bigint.rb
@@ -0,0 +1,9 @@+class ChangeCommitteeMemberIdToBigint < ActiveRecord::Migration[6.0]
+ def up
+ change_column :committee_members, :id, :bigint
+ end
+
+ def down
+ change_column :committee_members, :id, :integer
+ end
+end
|
Update committee_member_id primary key to bigint
|
diff --git a/BothamUI.podspec b/BothamUI.podspec
index abc1234..def5678 100644
--- a/BothamUI.podspec
+++ b/BothamUI.podspec
@@ -9,9 +9,6 @@ s.source = { :git => 'https://github.com/Karumi/BothamUI.git', :tag => s.version }
s.ios.deployment_target = '8.0'
- s.osx.deployment_target = '10.10'
- s.tvos.deployment_target = '9.0'
- s.watchos.deployment_target = '2.0'
s.source_files = 'BothamUI/*.swift'
|
Remove other deployment_target than iOS
|
diff --git a/to_source.gemspec b/to_source.gemspec
index abc1234..def5678 100644
--- a/to_source.gemspec
+++ b/to_source.gemspec
@@ -5,7 +5,7 @@ s.authors = ['Markus Schirp']
s.email = ['[email protected]']
s.homepage = 'http://github.com/mbj/to_source'
- s.summary = %q{Transform Rubinius 1.9 AST back to equvalent source code.}
+ s.summary = %q{Transform Rubinius 1.9 AST back to equivalent source code}
s.description = s.summary
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {spec,features}/*`.split("\n")
|
Fix typo in gem description
|
diff --git a/Casks/codekit.rb b/Casks/codekit.rb
index abc1234..def5678 100644
--- a/Casks/codekit.rb
+++ b/Casks/codekit.rb
@@ -9,5 +9,7 @@ homepage 'https://incident57.com/codekit/'
license :commercial
+ auto_updates true
+
app 'CodeKit.app'
end
|
Add auto_updates flag to Codekit
|
diff --git a/Casks/vyprvpn.rb b/Casks/vyprvpn.rb
index abc1234..def5678 100644
--- a/Casks/vyprvpn.rb
+++ b/Casks/vyprvpn.rb
@@ -4,7 +4,7 @@
url "https://www.goldenfrog.com/downloads/vyprvpn/desktop/mac/production/#{version}/VyprVPN_v#{version}.dmg"
name 'VyprVPN'
- homepage 'http://www.goldenfrog.com/vyprvpn'
+ homepage 'https://www.goldenfrog.com/vyprvpn'
license :commercial
app 'VyprVPN.app'
|
Fix homepage to use SSL in VyprVPN 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/business.gemspec b/business.gemspec
index abc1234..def5678 100644
--- a/business.gemspec
+++ b/business.gemspec
@@ -21,6 +21,6 @@ spec.add_development_dependency "gc_ruboconfig", "~> 3.3.0"
spec.add_development_dependency "rspec", "~> 3.1"
spec.add_development_dependency "rspec_junit_formatter", "~> 0.5.1"
- spec.add_development_dependency "rubocop", "~> 1.30.0"
+ spec.add_development_dependency "rubocop", "~> 1.31.1"
spec.metadata["rubygems_mfa_required"] = "true"
end
|
Update rubocop requirement from ~> 1.30.0 to ~> 1.31.1
Updates the requirements on [rubocop](https://github.com/rubocop/rubocop) to permit the latest version.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.30.0...v1.31.1)
---
updated-dependencies:
- dependency-name: rubocop
dependency-type: direct:development
...
Signed-off-by: dependabot[bot] <[email protected]>
|
diff --git a/lib/kosmos/packages/better_atmospheres.rb b/lib/kosmos/packages/better_atmospheres.rb
index abc1234..def5678 100644
--- a/lib/kosmos/packages/better_atmospheres.rb
+++ b/lib/kosmos/packages/better_atmospheres.rb
@@ -0,0 +1,41 @@+class BetterAtmospheresLowDef < Kosmos::Package
+ title 'Better Atmospheres - Low Definition (512 x 512)'
+ aliases 'better atmospheres - low def'
+ url 'https://dl.dropboxusercontent.com/s/od4kickxt92jpo2/BetterAtmosphereV4%5BREL%5D.zip?dl=1&token_hash=AAHYhNPX8HwDaTJMtH3TkeQ7Hhb2zpwP9bIgPQitfnhL8w&expiry=1400637112'
+
+ def install
+ merge_directory 'GameData'
+ merge_directory 'City Textures/512/DetailCity.tga',
+ into: 'GameData/BoulderCo/CityLights/Textures'
+ merge_directory 'City Textures/512/detail.tga',
+ into: 'GameData/BoulderCo/Clouds/Textures'
+ end
+end
+
+class BetterAtmospheresMediumDef < Kosmos::Package
+ title 'Better Atmospheres - Medium Definition (1024 x 1024)'
+ aliases 'better atmospheres - medium def', 'better atmospheres'
+ url 'https://dl.dropboxusercontent.com/s/od4kickxt92jpo2/BetterAtmosphereV4%5BREL%5D.zip?dl=1&token_hash=AAHYhNPX8HwDaTJMtH3TkeQ7Hhb2zpwP9bIgPQitfnhL8w&expiry=1400637112'
+
+ def install
+ merge_directory 'GameData'
+ merge_directory 'City Textures/1024/DetailCity.tga',
+ into: 'GameData/BoulderCo/CityLights/Textures'
+ merge_directory 'City Textures/1024/detail.tga',
+ into: 'GameData/BoulderCo/Clouds/Textures'
+ end
+end
+
+class BetterAtmospheresHighDef < Kosmos::Package
+ title 'Better Atmospheres - High Definition (2048 x 2048)'
+ aliases 'better atmospheres - high def'
+ url 'https://dl.dropboxusercontent.com/s/od4kickxt92jpo2/BetterAtmosphereV4%5BREL%5D.zip?dl=1&token_hash=AAHYhNPX8HwDaTJMtH3TkeQ7Hhb2zpwP9bIgPQitfnhL8w&expiry=1400637112'
+
+ def install
+ merge_directory 'GameData'
+ merge_directory 'City Textures/2048/DetailCity.tga',
+ into: 'GameData/BoulderCo/CityLights/Textures'
+ merge_directory 'City Textures/2048/detail.tga',
+ into: 'GameData/BoulderCo/Clouds/Textures'
+ end
+end
|
Add a package for Better Atmospheres.
I'm not entirely sure this works properly, but it definitely has made some
changes.
|
diff --git a/lib/protobuf/active_record/validations.rb b/lib/protobuf/active_record/validations.rb
index abc1234..def5678 100644
--- a/lib/protobuf/active_record/validations.rb
+++ b/lib/protobuf/active_record/validations.rb
@@ -30,7 +30,7 @@ raise ArgumentError, ":with must be specified" if enumerable.nil?
if enumerable < ::Protobuf::Enum
- options[:in] = enumerable.values.values.map(&:value)
+ options[:in] = enumerable.all_tags
end
args << options
|
Use the new Protobuf Enum API
|
diff --git a/week-4/variables-methods.rb b/week-4/variables-methods.rb
index abc1234..def5678 100644
--- a/week-4/variables-methods.rb
+++ b/week-4/variables-methods.rb
@@ -8,3 +8,25 @@ puts "What is your favorite number?"
fav_number = gets.chomp
puts "How about #{fav_number.to_i + 1}? Isn't that a bigger and better favorite number?"
+
+# You define a local variable by assigning it a name and a value.
+# Some examples of defining a local variable would include:
+ # street_name = "Folsom"
+ # age = 30
+ # favorite_number = gets.chomp
+
+#To define a method, you will want to use "def" and "end" to declare the boundaries of the method. If the method will accept any arguments, you will also want to make sure to declare those. Here is an example of a method that takes two arguments:
+ # def method(argument1, argument2)
+ # puts "This is a method"
+ # end
+
+# The difference between a local variable and a method is that a local variable simply stores a value, while a method performs some kind of action and returns a value.
+
+# To run a ruby file from the command line, simply type "ruby filename.rb" (we're using filename.rb as the name of the ruby file here).
+
+# To run an Rspec file from the commandline, just type "rspec filename.rb".
+
+#Nothing about this material has been confusing so far, the only thing I was uncertain about was how to easily copy a directory from Github to my local machine. Is it possible to easily copy a single directory without cloning the entire repository?
+
+
+
|
Add reflection for exercise 4.3.
|
diff --git a/app/models/subscriber.rb b/app/models/subscriber.rb
index abc1234..def5678 100644
--- a/app/models/subscriber.rb
+++ b/app/models/subscriber.rb
@@ -3,16 +3,15 @@ def self.top_ten
@front = RedditKit.front_page(options = {:limit => 10})
end
- # Saves top ten title, score, subreddit to db
+
def self.save_top_ten
- top_ten.each do |f|
- @new_sub = Subscriber.new
- @new_sub[:title] = f.title
- @new_sub[:count] = f.score
- @new_sub[:subreddit] = f.subreddit
- @new_sub.save!
+ @subscriber = Subscriber.title_score_hash
+ @subscriber.each_pair do |x,y|
+ new_sub = Subscriber.new
+ new_sub[:title] = x
+ new_sub[:count] = y
+ new_sub.save!
end
- return @new_sub
end
# Creates hash with title as key and score as value
def self.title_score_hash
|
Revert "rewrite save_top_ten to pull from top_ten"
This reverts commit 311272dda2d01502b050e226d1aff59ee6af8a77.
|
diff --git a/app/services/msg/base.rb b/app/services/msg/base.rb
index abc1234..def5678 100644
--- a/app/services/msg/base.rb
+++ b/app/services/msg/base.rb
@@ -24,5 +24,5 @@ end
# The alias allows us to treat the event_codename as an
# instance attribute
- alias :event_codename, :get_event_codename
+ alias :event_codename :get_event_codename
end
|
Fix the call to alias, no comma is needed.
|
diff --git a/fix_staging_links.rb b/fix_staging_links.rb
index abc1234..def5678 100644
--- a/fix_staging_links.rb
+++ b/fix_staging_links.rb
@@ -0,0 +1,7 @@+Document.record_timestamps = false
+documents = Document.where("body like '%whitehall.staging%'")
+documents.each do |document|
+ fixed_body = document.body.gsub(/whitehall\.staging/, "whitehall.preview")
+ document.update_attribute(:body, fixed_body)
+ puts "Updated document #{document.id}"
+end
|
Fix links in preview that point at the old staging server.
I'll run this manually on preview.
|
diff --git a/floorplanner.gemspec b/floorplanner.gemspec
index abc1234..def5678 100644
--- a/floorplanner.gemspec
+++ b/floorplanner.gemspec
@@ -19,7 +19,7 @@ spec.require_paths = ["lib"]
spec.add_dependency "httpi", "~> 2.2.5"
- spec.add_dependency "nokogiri", "~> 1.6.1"
+ spec.add_dependency "nokogiri", "~> 1.8.5"
spec.add_dependency "nori", "~> 2.3.0"
spec.add_dependency "gyoku", "~> 1.1.1"
spec.add_dependency "hashie"
|
Upgrade nokogiri because of CVE-2017-9050
|
diff --git a/app/models/manageiq/providers/ansible_tower/configuration_manager/refresher.rb b/app/models/manageiq/providers/ansible_tower/configuration_manager/refresher.rb
index abc1234..def5678 100644
--- a/app/models/manageiq/providers/ansible_tower/configuration_manager/refresher.rb
+++ b/app/models/manageiq/providers/ansible_tower/configuration_manager/refresher.rb
@@ -8,7 +8,7 @@ manager.api_version = connection.version
manager.save
- raw_ems_data = {:hosts => connection.hosts}
+ raw_ems_data = {:hosts => connection.api.hosts.all}
ConfigurationManager::RefreshParser.configuration_inv_to_hashes(raw_ems_data)
end
end
|
Update to use the recent gem changes
|
diff --git a/Casks/blender.rb b/Casks/blender.rb
index abc1234..def5678 100644
--- a/Casks/blender.rb
+++ b/Casks/blender.rb
@@ -1,6 +1,6 @@ cask :v1 => 'blender' do
- version '2.76'
- sha256 '542bc7fe9871c5a8f80efd5b9657416eda45d3dbeb455189367303203da695c9'
+ version '2.76a'
+ sha256 '37b583d19eb16123065b62a7c05c574d9ebee2ff7497c1180466447ce6dab383'
url "https://download.blender.org/release/Blender#{version.to_f}/blender-#{version}-OSX_10.6-x86_64.zip"
name 'Blender'
|
Upgrade Blender to 2.76a bugfix release
|
diff --git a/Casks/makemkv.rb b/Casks/makemkv.rb
index abc1234..def5678 100644
--- a/Casks/makemkv.rb
+++ b/Casks/makemkv.rb
@@ -1,6 +1,6 @@ cask :v1 => 'makemkv' do
- version '1.9.5'
- sha256 '091a7ae803296783f018682bda2099d53a3d4fff61560836888ac4e73607a75e'
+ version '1.9.6'
+ sha256 'ef555f8e98ff059baa91144162f81f07cfa57f3bdaa48acaa57350bee5d43363'
url "http://www.makemkv.com/download/makemkv_v#{version}_osx.dmg"
name 'MakeMKV'
|
Update MakeMKV to version 1.9.6
|
diff --git a/SimpleAnimation.podspec b/SimpleAnimation.podspec
index abc1234..def5678 100644
--- a/SimpleAnimation.podspec
+++ b/SimpleAnimation.podspec
@@ -1,6 +1,6 @@ Pod::Spec.new do |s|
s.name = "SimpleAnimation"
- s.version = "0.4.0"
+ s.version = "0.4.1"
s.summary = "A UIView extension to make basic animations, like fades and bounces, simple."
s.homepage = "https://github.com/keithito/SimpleAnimation"
s.license = 'MIT'
@@ -12,5 +12,6 @@ s.tvos.deployment_target = '9.0'
s.source_files = 'Source/*'
+ s.exclude_files = 'Source/*.plist'
s.frameworks = 'UIKit'
end
|
Fix podspec for issue with new build system in xcode 10
|
diff --git a/response.gemspec b/response.gemspec
index abc1234..def5678 100644
--- a/response.gemspec
+++ b/response.gemspec
@@ -18,4 +18,5 @@ gem.add_dependency 'adamantium', '~> 0.0.6'
gem.add_dependency 'equalizer', '~> 0.0.4'
gem.add_dependency 'abstract_type', '~> 0.0.3'
+ gem.add_dependency 'composition', '~> 0.0.1'
end
|
Add missing dependency to gemspec
|
diff --git a/config/deploy.rb b/config/deploy.rb
index abc1234..def5678 100644
--- a/config/deploy.rb
+++ b/config/deploy.rb
@@ -20,7 +20,7 @@
desc 'Pull in local OBRA code'
task :after_update_code do
- sudo "svn co svn+ssh://[email protected]/var/repos/obra /srv/www/rails/#{application}/local"
+ sudo "svn co --password Merckx svn+ssh://[email protected]/var/repos/obra /srv/www/rails/#{application}/local"
end
desc "Set file permissions for Rails app"
|
Add SVN password to deplloy file!
git-svn-id: 96bd6241e080dd4199045f7177cf3384e2eaed71@357 2d86388d-c40f-0410-ad6a-a69da6a65d20
|
diff --git a/server/server.rb b/server/server.rb
index abc1234..def5678 100644
--- a/server/server.rb
+++ b/server/server.rb
@@ -30,10 +30,10 @@
system("fontforge /usr/src/app/accentizer.py '#{tmpfile_name}' 2>&1")
- content_type 'application/octet-stream'
-
out_file = tmpfile_no_extension + "out.ttf"
halt 422 unless File.exist?(out_file)
+
+ attachment("accentized.ttf")
File.read(out_file, mode: "rb")
ensure
|
Make sure we send content-disposition for downloads
|
diff --git a/app/controllers/sponsors_controller.rb b/app/controllers/sponsors_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/sponsors_controller.rb
+++ b/app/controllers/sponsors_controller.rb
@@ -33,7 +33,7 @@ @sponsor = Sponsor.find(params[:id])
if @sponsor.update(sponsor_params)
- render(:file => File.join(Rails.root, 'public/200.html'), :status => 201, :layout => false)
+ redirect_to sponsors_path, :notice => 'Sponsor: ' + Sponsor.find(params[:id]).company + ' has been updated.'
return
else
puts "Could not update in the DB"
|
Fix redirect after editing a sponsor.
Signed-off-by: Siddharth Kannan <[email protected]>
|
diff --git a/app/models/edition/supporting_pages.rb b/app/models/edition/supporting_pages.rb
index abc1234..def5678 100644
--- a/app/models/edition/supporting_pages.rb
+++ b/app/models/edition/supporting_pages.rb
@@ -5,6 +5,7 @@ def process_associations_after_save(edition)
@edition.supporting_pages.each do |sd|
new_supporting_page = edition.supporting_pages.create(sd.attributes.except("id", "edition_id"))
+ new_supporting_page.update_column(:slug, sd.slug)
sd.attachments.each do |a|
new_supporting_page.supporting_page_attachments.create(attachment_id: a.id)
end
|
Set slug value of the new_supporting_page to the old one
The slug will be set on create, but set it back to the old slug
|
diff --git a/config/routes.rb b/config/routes.rb
index abc1234..def5678 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,3 +1,3 @@ JsonSchemaRails::Engine.routes.draw do
- get '*schema(.:format)', to: 'schemas#get'
+ get '/:schema(.:format)', to: 'schemas#get', constraints: { schema: /[\/a-zA-Z0-9_-]+/ }
end
|
Fix schema route for Rails 3
|
diff --git a/config/routes.rb b/config/routes.rb
index abc1234..def5678 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -16,7 +16,7 @@ resources :thermostat_schedules do
resources :thermostat_schedule_rules
end
-
-
+
+ get 'thermostat' => 'thermostats#show', format: :json
root 'thermostats#show'
end
|
Add route for show JSON endpoint
|
diff --git a/congress.gemspec b/congress.gemspec
index abc1234..def5678 100644
--- a/congress.gemspec
+++ b/congress.gemspec
@@ -2,8 +2,8 @@ require File.expand_path('../lib/congress/version', __FILE__)
Gem::Specification.new do |spec|
- spec.add_dependency 'faraday', '~> 0.8.7'
- spec.add_dependency 'faraday_middleware', '~> 0.9.0'
+ spec.add_dependency 'faraday', '~> 0.9.0'
+ spec.add_dependency 'faraday_middleware', '~> 0.9.1'
spec.add_dependency 'hashie', '~> 2.0'
spec.add_dependency 'json', '~> 1.8'
spec.add_dependency 'rash', '~> 0.4'
|
Update faraday_middleware dependency to ~> 0.9.1
|
diff --git a/github-pages.gemspec b/github-pages.gemspec
index abc1234..def5678 100644
--- a/github-pages.gemspec
+++ b/github-pages.gemspec
@@ -4,7 +4,6 @@
s.name = "github-pages"
s.version = "0.0.1"
- s.date = "2013-08-08"
s.summary = "GitHub Pages"
s.description = "Bootstrap the GitHub Pages Jekyll environment locally"
s.authors = "GitHub"
|
Remove the gemspec's hardcoded date
`gem build` will automatically fill this in.
|
diff --git a/spec/coverage.rb b/spec/coverage.rb
index abc1234..def5678 100644
--- a/spec/coverage.rb
+++ b/spec/coverage.rb
@@ -6,5 +6,5 @@ formatters << Coveralls::SimpleCov::Formatter
end
-SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[*formatters]
+SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(*formatters)
SimpleCov.start
|
Resolve deprecation warning from SimpleCov
|
diff --git a/spec/fake_app.rb b/spec/fake_app.rb
index abc1234..def5678 100644
--- a/spec/fake_app.rb
+++ b/spec/fake_app.rb
@@ -8,6 +8,9 @@ config.secret_key_base = "test"
config.paths["config/database"] = ["spec/support/database.yml"]
config.eager_load = false
+ if Rails.gem_version >= Gem::Version.new("5.2")
+ config.active_record.sqlite3.represent_boolean_as_integer = true
+ end
end
end
PaulRevere::Application.initialize!
|
Add sqlite3 boolean configuration option, avoids deprecation warning
|
diff --git a/Casks/omnifocus.rb b/Casks/omnifocus.rb
index abc1234..def5678 100644
--- a/Casks/omnifocus.rb
+++ b/Casks/omnifocus.rb
@@ -1,16 +1,30 @@ cask :v1 => 'omnifocus' do
- version :latest
- sha256 :no_check
+ if MacOS.release <= :mountain_lion
+ version '1.10.6'
+ sha256 'bd3aa44dced86fc3921c01f4467422a7b87a92afbd4be642ea4d4bb8b14b728c'
+ url "http://www.omnigroup.com/ftp1/pub/software/MacOSX/10.6/OmniFocus-#{version}.dmg"
- url 'http://www.omnigroup.com/download/latest/omnifocus'
- homepage 'http://www.omnigroup.com/products/omnifocus/'
+ zap :delete => [
+ '~/Library/Application Support/OmniFocus/Plug-Ins',
+ '~/Library/Application Support/OmniFocus/Themes',
+ '~/Library/Preferences/com.omnigroup.OmniFocus.plist'
+ ]
+ else
+ version '2.0.4'
+ sha256 'c5667f950147cbc33387ab45267b15666eef558391aeaf8d6df543a65edaa799'
+ url "http://www.omnigroup.com/ftp1/pub/software/MacOSX/10.9/OmniFocus-#{version}.dmg"
+
+ zap :delete => [
+ '~/Library/containers/com.omnigroup.omnifocus2',
+ '~/Library/Preferences/com.omnigroup.OmniFocus2.LSSharedFileList.plist',
+ '~/Library/Preferences/com.omnigroup.OmniSoftwareUpdate.plist',
+ '~/Library/Caches/Metadata/com.omnigroup.OmniFocus2'
+ ]
+ end
+
+ name 'OmniFocus'
+ homepage 'https://www.omnigroup.com/omnifocus/'
license :commercial
app 'OmniFocus.app'
-
- zap :delete => [
- '~/Library/Application Support/OmniFocus/Plug-Ins',
- '~/Library/Application Support/OmniFocus/Themes',
- '~/Library/Preferences/com.omnigroup.OmniFocus.plist',
- ]
end
|
Update OmniFocus to use versioned downloads
Make the version check condition more readable
|
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
@@ -10,12 +10,12 @@ def stub_token
stub_request(:get, "http://example.com/micropub/token").
with(headers: {'Authorization'=>'Bearer 1234567890', 'Content-Type'=>'application/x-www-form-urlencoded'}).
- to_return(status: 200, body: URI.encode_www_form([
+ to_return(status: 200, body: URI.encode_www_form({
:me => "https://testsite.example.com",
:issued_by => "http://localhost:4567/micropub/token",
:client_id => "http://testsite.example.com",
:issued_at => "123456789",
:scope => "post",
:nonce => "0987654321"
- ]))
+ }))
end
|
Fix response from test stub
|
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,4 +1,3 @@-RAILS_FRAMEWORK_ROOT='/home/aaron/Projects/Vendor/rails'
# Load the plugin testing framework
$:.unshift("#{File.dirname(__FILE__)}/../../plugin_test_helper/lib")
require 'rubygems'
|
Remove rogue assignment of RAILS_FRAMEWORK_ROOT
|
diff --git a/NBClient.podspec b/NBClient.podspec
index abc1234..def5678 100644
--- a/NBClient.podspec
+++ b/NBClient.podspec
@@ -6,16 +6,33 @@ s.homepage = 'https://github.com/3dna/nationbuilder-ios'
s.authors = { 'Peng Wang' => '[email protected]' }
s.source = { :git => 'https://github.com/3dna/nationbuilder-ios.git', :tag => s.version.to_s }
-
# Platform
s.platform = :ios
s.ios.deployment_target = '7.0'
-
# Build settings
s.requires_arc = true
- s.frameworks = 'Security'
- # File patterns
- s.source_files = 'NBClient/NBClient'
- s.private_header_files = 'NBClient/NBClient/*_Internal.h'
+ s.subspec 'Core' do |sp|
+ # Build settings
+ sp.frameworks = 'Security'
+ # File patterns
+ sp.source_files = 'NBClient/NBClient/*.{h,m}'
+ sp.exclude_files = 'NBClient/UI'
+ sp.private_header_files = 'NBClient/NBClient/*_Internal.h'
+ end
+
+ s.subspec 'UI' do |sp|
+ # Build settings
+ sp.dependency 'NBClient/Core'
+ sp.frameworks = 'UIKit'
+ # File patterns
+ sp.source_files = 'NBClient/NBClient/UI/*.{h,m}'
+ sp.private_header_files = 'NBClient/NBClient/UI/*_Internal.h'
+ sp.resources = [
+ 'NBClient/NBClient/UI/*.xib',
+ 'NBClient/NBClient/UI/Media.xcassets',
+ 'NBClient/NBClient/UI/pe-icon-7-stroke.ttf'
+ ]
+ end
+
end
|
Update podspec to add UI component as a subspec
Refactor core component into a subspec.
Note all subspecs are included in the root spec if
default_subspecs isn't specified.
|
diff --git a/app/controllers/auth.rb b/app/controllers/auth.rb
index abc1234..def5678 100644
--- a/app/controllers/auth.rb
+++ b/app/controllers/auth.rb
@@ -9,9 +9,14 @@
post '/signup' do
user = User.new(params[:user])
- puts user.user_name
- puts user.password_digest
- redirect '/'
+ if user.save
+ session[:user_id] = user.id
+ redirect '/'
+ else
+ redirect '/signin'
+ end
+
+ puts session
end
get '/signout' do
|
Update POST signup route to create user, save to DB and begin session
|
diff --git a/app/controllers/user.rb b/app/controllers/user.rb
index abc1234..def5678 100644
--- a/app/controllers/user.rb
+++ b/app/controllers/user.rb
@@ -0,0 +1,55 @@+post '/login' do
+ user = User.find_by(name: params[:user][:email])
+
+ if user.try(:authenticate, params[:user][:password])
+ session[:user_id] = user.id
+ end
+ redirect "/"
+end
+
+post '/signup' do
+ user = User.create(params[:user])
+ if user.save
+ session[:user_id] = user.id
+ end
+ redirect "/"
+end
+
+get '/signout' do
+ session[:user_id] = nil
+ redirect '/'
+end
+
+#update(edit) a user profile
+get '/user/:id/edit' do
+ @user = User.find_by(id: params[:id])
+ erb :'user/edit'
+end
+
+put '/user/:id' do |id|
+ user = User.find(id)
+ user.update(params[:user])
+ redirect("/user/#{user.id}/home")
+end
+
+delete '/user/:id' do |id|
+ User.find(id).destroy
+ redirect('/')
+end
+
+
+# Dashboard
+
+get '/user/:id/home'
+ erb :home
+end
+
+# Survey routes
+get '/user/:id/survey/new' do
+ erb :'/user/survey'
+end
+
+post '/user/:id/survey/new' do |id|
+ @user = User.find(id)
+ Survey.create(params[:survey])
+end
|
Add routes to survey and dashboard
|
diff --git a/plugins/dns_service/app/services/service_layer_ng/dns_service_services/pool.rb b/plugins/dns_service/app/services/service_layer_ng/dns_service_services/pool.rb
index abc1234..def5678 100644
--- a/plugins/dns_service/app/services/service_layer_ng/dns_service_services/pool.rb
+++ b/plugins/dns_service/app/services/service_layer_ng/dns_service_services/pool.rb
@@ -5,11 +5,11 @@ # This module implements Openstack Designate Pool API
module Pool
def pools(filter = {})
- api.domain_name_server.list_all_pools(filter).map_to(pools: DnsService::PoolNg)
+ api.dns.list_all_pools(filter).map_to(pools: DnsService::PoolNg)
end
def find_pool!(id)
- api.domain_name_server.show_a_pool(id).map_to(response_body: DnsService::PoolNg)
+ api.dns.show_a_pool(id).map_to(response_body: DnsService::PoolNg)
end
def find_pool(id)
|
Revert "fix for service name change in latest misty"
This reverts commit 3ab2902
|
diff --git a/config/environments/production.rb b/config/environments/production.rb
index abc1234..def5678 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -12,7 +12,7 @@ config.active_support.deprecation = :notify
config.log_formatter = ::Logger::Formatter.new
- config.force_ssl = true
+ config.force_ssl = true if ENV.key?('HEROKU_APP_NAME')
config.lograge.formatter = Lograge::Formatters::Logstash.new
config.lograge.logger = ActiveSupport::Logger.new \
|
Enforce SSL only in Heroku
Enforcing SSL with the Rails setting breaks staging and possibly production.
Staging and Production already enforce SSL, so set it only for Heroku.
|
diff --git a/jekyll-github-metadata.gemspec b/jekyll-github-metadata.gemspec
index abc1234..def5678 100644
--- a/jekyll-github-metadata.gemspec
+++ b/jekyll-github-metadata.gemspec
@@ -15,7 +15,7 @@ spec.files = `git ls-files -z`.split("\x0").grep(%r{^(lib|bin)/})
spec.require_paths = ["lib"]
- spec.add_runtime_dependency "octokit", "~> 4.3.0"
+ spec.add_runtime_dependency "octokit", "~> 4.0"
spec.add_runtime_dependency "jekyll", ENV["JEKYLL_VERSION"] ? "~> #{ENV["JEKYLL_VERSION"]}" : "~> 3.1"
spec.add_development_dependency "bundler", "~> 1.5"
|
Revert "Lock Octokit to v4.3.0"
|
diff --git a/imdb.gemspec b/imdb.gemspec
index abc1234..def5678 100644
--- a/imdb.gemspec
+++ b/imdb.gemspec
@@ -8,8 +8,8 @@ spec.version = Imdb::VERSION
spec.authors = ["egwspiti"]
spec.email = ["[email protected]"]
- spec.summary = %q{TODO: Write a short summary. Required.}
- spec.description = %q{TODO: Write a longer description. Optional.}
+ spec.summary = %q{small gem to fetch and parse data from imdb }
+ spec.description = %q{small gem to fetch and parse data from imdb }
spec.homepage = ""
spec.license = "MIT"
|
Update gemspec with summary and description
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.