diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/lib/redmine_menus.rb b/lib/redmine_menus.rb
index abc1234..def5678 100644
--- a/lib/redmine_menus.rb
+++ b/lib/redmine_menus.rb
@@ -1,5 +1,5 @@ Redmine::MenuManager.map :admin_menu do |menu|
- menu.push :redmine_git_hosting, { controller: 'settings', action: 'plugin', id: 'redmine_git_hosting' }, caption: :redmine_git_hosting
+ menu.push :redmine_git_hosting, { controller: 'settings', action: 'plugin', id: 'redmine_git_hosting' }, caption: :redmine_git_hosting, html: { class: 'icon' }
end
Redmine::MenuManager.map :top_menu do |menu|
|
Fix plugin icon with Redmine 3.4.x
|
diff --git a/app/models/candidate.rb b/app/models/candidate.rb
index abc1234..def5678 100644
--- a/app/models/candidate.rb
+++ b/app/models/candidate.rb
@@ -9,7 +9,7 @@ def self.remove_appointed_politicians(zip)
APPOINTED_OFFICES.each do |office|
- Candidate.where(zip: zip). where('office LIKE ?', "%#{office}%").destroy_all
+ Candidate.where(zip: zip).where('office LIKE ?', "%#{office}%").destroy_all
end
end
|
Fix database query by removing a space that somehow got inserted in the query
|
diff --git a/app/models/situation.rb b/app/models/situation.rb
index abc1234..def5678 100644
--- a/app/models/situation.rb
+++ b/app/models/situation.rb
@@ -1,15 +1,6 @@-# class ChoicesSetUnlessEnding < ActiveModel::Validator
-# def validate(record)
-# unless record.name.starts_with? 'X'
-# record.errors[:name] << 'Need a name starting with X please!'
-# end
-# end
-# end
-
class Situation < ActiveRecord::Base
validates :title, presence: true
validates :sit_rep, presence: true
- # validates_with ChoicesSetUnlessEnding
validates :choice_1, presence: true,
unless: Proc.new { |a| a.ending? }
|
Remove comments of failed attempt to custom validate.
|
diff --git a/jeet.gemspec b/jeet.gemspec
index abc1234..def5678 100644
--- a/jeet.gemspec
+++ b/jeet.gemspec
@@ -5,7 +5,7 @@
Gem::Specification.new do |spec|
spec.name = 'jeet'
- spec.version = Jeet::Rails::VERSION
+ spec.version = Jeet::VERSION
spec.authors = ['Cory Simmons', 'Jonah Ruiz']
spec.email = ['csimmonswork@gmail.com', 'jonah@pixelhipsters.com']
spec.summary = 'A grid system for humans.'
|
Remove old Rails namespace from version
|
diff --git a/spec/connection_spec.rb b/spec/connection_spec.rb
index abc1234..def5678 100644
--- a/spec/connection_spec.rb
+++ b/spec/connection_spec.rb
@@ -10,9 +10,10 @@ describe ActiveRecord::ConnectionHandling do
it 'raises NoDatabaseError correctly' do
+ error_class = defined?(ActiveRecord::NoDatabaseError) ? ActiveRecord::NoDatabaseError : Mysql2::Error
expect {
Mock.new.pedant_mysql2_connection({host: 'localhost', database: 'nosuchthing'})
- }.to raise_error(ActiveRecord::NoDatabaseError)
+ }.to raise_error(error_class)
end
end
|
Fix NoDatabaseError test for AR < 4.1
|
diff --git a/gem/lib/commands/push.rb b/gem/lib/commands/push.rb
index abc1234..def5678 100644
--- a/gem/lib/commands/push.rb
+++ b/gem/lib/commands/push.rb
@@ -27,7 +27,7 @@
name = get_one_gem_name
response = make_request(:post, "gems") do |request|
- request.body = File.open(name).read
+ request.body = File.open(name, 'rb'){|io| io.read }
request.add_field("Content-Length", request.body.size)
request.add_field("Content-Type", "application/octet-stream")
request.add_field("Authorization", api_key)
|
Fix wrong Content-Length on Ruby 1.9, leading to Timeout in some cases
|
diff --git a/spec/controllers/portfolios_controller_spec.rb b/spec/controllers/portfolios_controller_spec.rb
index abc1234..def5678 100644
--- a/spec/controllers/portfolios_controller_spec.rb
+++ b/spec/controllers/portfolios_controller_spec.rb
@@ -11,7 +11,9 @@ end
it "shows the user's name if the data is available" do
+ portfolio = Portfolio.new(user: User.new(name: 'Edward Anderson', login: 'nilbus'))
+ PortfolioStore.new.save(portfolio)
get :show, id: 'nilbus'
- expect(response.body).to include 'Edward Anderson'
+ expect(response.body).to include portfolio.user.name
end
end
|
Initialize cache state in the PortfoliosController spec
|
diff --git a/spec/routing/duckrails/dynamic_routing_spec.rb b/spec/routing/duckrails/dynamic_routing_spec.rb
index abc1234..def5678 100644
--- a/spec/routing/duckrails/dynamic_routing_spec.rb
+++ b/spec/routing/duckrails/dynamic_routing_spec.rb
@@ -10,12 +10,12 @@ Duckrails::Application.routes_reloader.reload!
end
- Duckrails::Router::METHODS.each do |method|
- context "Serving mocks with #{method}" do
- let(:request_method) { method }
+ Duckrails::Router::METHODS.each do |current_method|
+ context "Serving mocks with #{current_method}" do
+ let(:request_method) { current_method }
it 'should serve the mock' do
- expect("#{method}": route_path).to route_to({
+ expect(current_method => route_path).to route_to({
controller: 'duckrails/mocks',
action: 'serve_mock',
duckrails_mock_id: mock.id,
|
Fix routing expectation declaration for ruby 2.1.x
|
diff --git a/build_job.rb b/build_job.rb
index abc1234..def5678 100644
--- a/build_job.rb
+++ b/build_job.rb
@@ -7,9 +7,8 @@ clone_repo(repo, token, tmpdir)
Dir.chdir "#{tmpdir}/#{repo}" do
setup_git
- # fetch gh-pages then hop back to master
- puts `git checkout --track origin/gh-pages`
- puts `git checkout master`
+ # fetch gh-pages
+ @git_dir.branch('gh-pages')
Bundler.with_clean_env do
puts "Installing gems..."
puts `bundle install`
|
Use ruby-git to fetch gh-pages
|
diff --git a/app/workers/discourse_synchronization_worker.rb b/app/workers/discourse_synchronization_worker.rb
index abc1234..def5678 100644
--- a/app/workers/discourse_synchronization_worker.rb
+++ b/app/workers/discourse_synchronization_worker.rb
@@ -5,10 +5,10 @@ for_each_tenant(user_id) do |u,t|
client(t) do |c|
c.sso_sync(
- sso_secret: t.settings(:discourse).sso_secret
- name: u.username
- username: u.username
- email: u.email
+ sso_secret: t.settings(:discourse).sso_secret,
+ name: u.username,
+ username: u.username,
+ email: u.email,
external_id: user_id
)
c.update_avatar(username: username, file: t.url + u.avatar.url)
|
Fix typo in hash of sync worker
|
diff --git a/rodf.gemspec b/rodf.gemspec
index abc1234..def5678 100644
--- a/rodf.gemspec
+++ b/rodf.gemspec
@@ -10,7 +10,8 @@ s.homepage = 'https://github.com/thiagoarrais/rodf'
s.authors = ['Weston Ganger', 'Thiago Arrais']
s.email = ["weston@westonganger.com", "thiago.arrais@gmail.com"]
-
+ s.license = "MIT"
+
s.files = Dir.glob("{lib/**/*}") + %w{ LICENSE README.md Rakefile CHANGELOG.md }
s.require_path = 'lib'
|
Add license to gemspec for easier automatic discovery
The LICENSE file already defines this gem as MIT, but this adds that info to the gemspec as well
|
diff --git a/attributes/default.rb b/attributes/default.rb
index abc1234..def5678 100644
--- a/attributes/default.rb
+++ b/attributes/default.rb
@@ -1,8 +1,8 @@ default['kafka']['user'] = 'kafka'
default['kafka']['group'] = 'kafka'
default['kafka']['version'] = '0.8.1'
-default['kafka']['scala_version'] = '2.10'
-default['kafka']['jar_url'] = "http://mirror.symnds.com/software/Apache/kafka/0.8.1/kafka_2.10-0.8.1.tgz"
+default['kafka']['scala_version'] = '2.9.2'
+default['kafka']['jar_url'] = "http://mirror.symnds.com/software/Apache/kafka/0.8.1/kafka_2.9.2-0.8.1.tgz"
default['kafka']['install_directory'] = "/opt/kafka"
default['kafka']['number_of_brokers'] = 1
default['kafka']['zookeeper_hosts'] = []
|
Change scala version to make most commonly used one
|
diff --git a/db/migrate/20110801215540_rename_error_state_to_errored.rb b/db/migrate/20110801215540_rename_error_state_to_errored.rb
index abc1234..def5678 100644
--- a/db/migrate/20110801215540_rename_error_state_to_errored.rb
+++ b/db/migrate/20110801215540_rename_error_state_to_errored.rb
@@ -1,14 +1,11 @@-require 'build'
-require 'build_attempt'
-
class RenameErrorStateToErrored < ActiveRecord::Migration
def self.up
- BuildAttempt.update_all({:state => 'errored'}, {:state => 'error'})
- Build.update_all({:state => 'errored'}, {:state => 'error'})
+ execute("UPDATE build_attempts SET state='errored' WHERE state='error'")
+ execute("UPDATE builds SET state='errored' WHERE state='error'")
end
def self.down
- BuildAttempt.update_all({:state => 'error'}, {:state => 'errored'})
- Build.update_all({:state => 'error'}, {:state => 'errored'})
+ execute("UPDATE builds SET state='error' WHERE state='errored'")
+ execute("UPDATE build_attempts SET state='error' WHERE state='errored'")
end
end
|
Fix update_all syntax for Rails 4.1
In this case, just switch to pure SQL for infinite compatibility
|
diff --git a/db/migrate/20190924072449_remove_travel_advice_editions.rb b/db/migrate/20190924072449_remove_travel_advice_editions.rb
index abc1234..def5678 100644
--- a/db/migrate/20190924072449_remove_travel_advice_editions.rb
+++ b/db/migrate/20190924072449_remove_travel_advice_editions.rb
@@ -0,0 +1,10 @@+class RemoveTravelAdviceEditions < Mongoid::Migration
+ def self.up
+ TravelAdviceEdition.delete_all
+ Artefact.where(kind: "travel-advice").delete_all
+ end
+
+ def self.down
+ raise Mongoid::IrreversibleMigration
+ end
+end
|
Add a migration to remove travel advice editions
Publisher is no longer responsible for these documents so we can remove
them.
|
diff --git a/lib/disco.rb b/lib/disco.rb
index abc1234..def5678 100644
--- a/lib/disco.rb
+++ b/lib/disco.rb
@@ -4,3 +4,5 @@ Bundler.require(:default)
require 'disco/markdown_helper'
+
+ActionView::Base.send(:include, Disco::MarkdownHelper)
|
Include the markdown helper into ActionView
|
diff --git a/lib/active_replicas/railtie.rb b/lib/active_replicas/railtie.rb
index abc1234..def5678 100644
--- a/lib/active_replicas/railtie.rb
+++ b/lib/active_replicas/railtie.rb
@@ -4,10 +4,13 @@ attr_reader :connection_handler
def hijack_active_record(proxy_configuration, overrides: [])
+ ProxyingConnection.generate_replica_delegations
+ ProxyingConnection.generate_primary_delegations
+
@connection_handler =
- ActiveReplicas::ConnectionHandler.new proxy_configuration: proxy_configuration,
- delegate: ActiveRecord::Base.connection_handler,
- overrides: overrides
+ ConnectionHandler.new proxy_configuration: proxy_configuration,
+ delegate: ActiveRecord::Base.connection_handler,
+ overrides: overrides
ActiveRecord::Base.class_eval do
def self.connection_handler
|
Make Railtie properly set up delegations
|
diff --git a/lib/botr/api/authentication.rb b/lib/botr/api/authentication.rb
index abc1234..def5678 100644
--- a/lib/botr/api/authentication.rb
+++ b/lib/botr/api/authentication.rb
@@ -16,7 +16,7 @@ # URL encode params
str_params = URI.encode_www_form(sorted_params)
- Digest::SHA1.hexdigest str_params + secret
+ Digest::SHA1.hexdigest str_params + api_secret_key
end
end
|
Change expected secret key method.
|
diff --git a/lib/capybara_webkit_builder.rb b/lib/capybara_webkit_builder.rb
index abc1234..def5678 100644
--- a/lib/capybara_webkit_builder.rb
+++ b/lib/capybara_webkit_builder.rb
@@ -30,20 +30,11 @@ end
def makefile
- system("#{make_env_variables} #{qmake_bin} -spec #{spec}")
+ system("#{qmake_bin} -spec #{spec}")
end
def qmake
- system("#{make_env_variables} #{make_bin} qmake")
- end
-
- def make_env_variables
- case RbConfig::CONFIG['host_os']
- when /mingw32/
- ''
- else
- "LANG='en_US.UTF-8'"
- end
+ system("#{make_bin} qmake")
end
def path_to_binary
@@ -62,9 +53,16 @@ FileUtils.cp(path_to_binary, "bin", :preserve => true)
end
+ def clean
+ File.open("Makefile", "w") do |file|
+ file.print "all:\n\t@echo ok\ninstall:\n\t@echo ok"
+ end
+ end
+
def build_all
makefile &&
qmake &&
- build
+ build &&
+ clean
end
end
|
Clean makefile after building so rubygems won't crash.
|
diff --git a/lib/jibby.rb b/lib/jibby.rb
index abc1234..def5678 100644
--- a/lib/jibby.rb
+++ b/lib/jibby.rb
@@ -2,9 +2,11 @@
# Jibby is a console client that connects to JIRA
module Jibby
+ class << self
+ attr_reader :gateway
+ end
+
module_function
-
- attr_reader :gateway
def interface
@interface ||= Console.new
|
Make gateway an attr_reader for a class variable
|
diff --git a/rubinius-toolset.gemspec b/rubinius-toolset.gemspec
index abc1234..def5678 100644
--- a/rubinius-toolset.gemspec
+++ b/rubinius-toolset.gemspec
@@ -1,5 +1,5 @@ # coding: utf-8
-require 'rubinius/toolset/version'
+require './lib/rubinius/toolset/version'
Gem::Specification.new do |spec|
spec.name = "rubinius-toolset"
|
Load the version from source.
|
diff --git a/lib/might/filter_predicates.rb b/lib/might/filter_predicates.rb
index abc1234..def5678 100644
--- a/lib/might/filter_predicates.rb
+++ b/lib/might/filter_predicates.rb
@@ -2,24 +2,51 @@ # Contains contains with all supported predicates
#
module FilterPredicates
- ON_VALUE = %w(
- not_eq eq
- does_not_match matches
- gt lt
- gteq lteq
- not_cont cont
- not_start start
- not_end end
- not_true true
- not_false false
- blank present
- not_null null
- )
+ NOT_EQ = 'not_eq'
+ EQ = 'eq'
+ DOES_NOT_MATCH = 'does_not_match'
+ MATCHES = 'matches'
+ GT = 'gt'
+ LT = 'lt'
+ GTEQ = 'gteq'
+ LTEQ = 'lteq'
+ NOT_CONT = 'not_cont'
+ CONT = 'cont'
+ NOT_START = 'not_start'
+ START = 'start'
+ DOES_NOT_END = 'not_end'
+ ENDS = 'end'
+ NOT_TRUE = 'not_true'
+ TRUE = 'true'
+ NOT_FALSE = 'not_false'
+ FALSE = 'false'
+ BLANK = 'blank'
+ PRESENT = 'present'
+ NOT_NULL = 'not_null'
+ NULL = 'null'
+ NOT_IN = 'not_in'
+ IN = 'in'
+ NOT_CONT_ANY = 'not_cont_any'
+ CONT_ANY = 'cont_any'
- ON_ARRAY = %w(
- not_in in
- not_cont_any cont_any
- )
+ ON_VALUE = [
+ NOT_EQ, EQ,
+ DOES_NOT_MATCH, MATCHES,
+ GT, LT,
+ GTEQ, LTEQ,
+ NOT_CONT, CONT,
+ NOT_START, START,
+ DOES_NOT_END, ENDS,
+ NOT_TRUE, TRUE,
+ NOT_FALSE, FALSE,
+ BLANK, PRESENT,
+ NOT_NULL, NULL
+ ]
+
+ ON_ARRAY = [
+ NOT_IN, IN,
+ NOT_CONT_ANY, CONT_ANY
+ ]
ALL = ON_VALUE + ON_ARRAY
end
|
Move all predicates to constants
|
diff --git a/lib/mios/device/power_meter.rb b/lib/mios/device/power_meter.rb
index abc1234..def5678 100644
--- a/lib/mios/device/power_meter.rb
+++ b/lib/mios/device/power_meter.rb
@@ -0,0 +1,20 @@+# NOTE: Currently untested with a real power meter
+class MiOS::Device::PowerMeter < MiOS::Device::Generic
+ ServiceId = "urn:micasaverde-com:serviceId:EnergyMetering1"
+
+ def watts
+ @attributes['watts'].to_i
+ end
+
+ # Reload the status of this device
+ def reload
+ self.class.get("/data_request?id=status&output_format=json&DeviceNum=#{id}")["Device_Num_#{id}"]["states"].each do |h|
+ if h["service"] == ServiceId and h["variable"] == "Watts"
+ @attributes['watts'] = h["value"]
+ break
+ end
+ end
+
+ self
+ end
+end
|
Add support (untested) for a power meter
|
diff --git a/lib/tasks/stagehand_tasks.rake b/lib/tasks/stagehand_tasks.rake
index abc1234..def5678 100644
--- a/lib/tasks/stagehand_tasks.rake
+++ b/lib/tasks/stagehand_tasks.rake
@@ -17,8 +17,8 @@
desc "Migrate both databases used by stagehand"
task :migrate => :environment do
- [Rails.configuration.x.stagehand.staging_connection_name,
- Rails.configuration.x.stagehand.production_connection_name].each do |connection_name|
+ connections = [Stagehand.configuration.staging_connection_name, Stagehand.configuration.production_connection_name]
+ connections.compact.uniq.each do |connection_name|
puts "Migrating #{connection_name}"
Stagehand::Database.with_connection(connection_name) do
ActiveRecord::Migrator.migrate('db/migrate')
|
Use Stagehand.configuration instead of Rails.configuration
This avoids a nil exception in with_connection if the configuration settings are not present.
|
diff --git a/lib/theme_park/rails/server.rb b/lib/theme_park/rails/server.rb
index abc1234..def5678 100644
--- a/lib/theme_park/rails/server.rb
+++ b/lib/theme_park/rails/server.rb
@@ -7,11 +7,32 @@
# Only for Rails application.
def call(env)
- theme_name = env['action_dispatch.request.path_parameters'][:theme_name]
- path = ThemePark.compiled_path(theme_name)
- ActionDispatch::Static.new(@app, path, @cache_control).call(env)
+ path = env['PATH_INFO'].chomp('/')
+ theme_name = env['action_dispatch.request.path_parameters'][:theme_name]
+ lookup_path = ThemePark.compiled_path(theme_name)
+ if File.file?( File.join(lookup_path, path) )
+ ActionDispatch::Static.new(@app, lookup_path, @cache_control).call(env)
+ else
+ # Need return 404
+ fail(404, "File not found: #{path}")
+ end
end
+ private
+
+ # Copy form ::Rack::File#fail
+ def fail(status, body)
+ body += "\n"
+ [
+ status,
+ {
+ "Content-Type" => "text/plain",
+ "Content-Length" => body.size.to_s,
+ "X-Cascade" => "pass"
+ },
+ [body]
+ ]
+ end
end
end
end
|
Fix ThreadError - deadlock; recursive locking
|
diff --git a/lib/thinking_sphinx/railtie.rb b/lib/thinking_sphinx/railtie.rb
index abc1234..def5678 100644
--- a/lib/thinking_sphinx/railtie.rb
+++ b/lib/thinking_sphinx/railtie.rb
@@ -3,7 +3,7 @@
module ThinkingSphinx
class Railtie < Rails::Railtie
-
+
initializer 'thinking_sphinx.sphinx' do
ThinkingSphinx::AutoVersion.detect
end
@@ -26,16 +26,13 @@ end
config.to_prepare do
- I18n.backend.reload!
- I18n.backend.available_locales
-
# ActiveRecord::Base.to_crc32s is dependant on the subclasses being loaded
# consistently. When the environment is reset, subclasses/descendants will
# be lost but our context will not reload them for us.
#
# We reset the context which causes the subclasses/descendants to be
# reloaded next time the context is called.
- #
+ #
ThinkingSphinx.reset_context!
end
|
Load order doesn't seem to matter for translations now, so no need to force the reload of I18n setup.
|
diff --git a/test/models/track_test.rb b/test/models/track_test.rb
index abc1234..def5678 100644
--- a/test/models/track_test.rb
+++ b/test/models/track_test.rb
@@ -1,6 +1,7 @@ # Encoding: utf-8
require 'test_helper'
+# Test track model
class TrackTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
|
Add header to track model test
|
diff --git a/puppet-lint-yumrepo_gpgcheck_enabled-check.gemspec b/puppet-lint-yumrepo_gpgcheck_enabled-check.gemspec
index abc1234..def5678 100644
--- a/puppet-lint-yumrepo_gpgcheck_enabled-check.gemspec
+++ b/puppet-lint-yumrepo_gpgcheck_enabled-check.gemspec
@@ -1,6 +1,6 @@ Gem::Specification.new do |spec|
spec.name = 'puppet-lint-yumrepo_gpgcheck_enabled-check'
- spec.version = '0.0.1'
+ spec.version = '0.0.2'
spec.homepage = 'https://github.com/deanwilson/puppet-lint-yumrepo_gpgcheck_enabled-check'
spec.license = 'MIT'
spec.author = 'Dean Wilson'
@@ -18,7 +18,7 @@ attribute and that it is enabled.
EOF
- spec.add_dependency 'puppet-lint', '~> 1.1'
+ spec.add_dependency 'puppet-lint', '>= 1.1', '< 3.0'
spec.add_development_dependency 'rspec', '~> 3.0'
spec.add_development_dependency 'rspec-its', '~> 1.0'
spec.add_development_dependency 'rspec-collection_matchers', '~> 1.0'
|
Allow puppet-lint 2.0 as a dependency and bump check version
|
diff --git a/test/acceptance/server_requests_info_from_client_test.rb b/test/acceptance/server_requests_info_from_client_test.rb
index abc1234..def5678 100644
--- a/test/acceptance/server_requests_info_from_client_test.rb
+++ b/test/acceptance/server_requests_info_from_client_test.rb
@@ -0,0 +1,27 @@+require 'acceptance/test_helper'
+require 'timeout'
+
+describe "Server requests info from the Client" do
+
+ before do
+ @server, @client1, @client2 = self.class.setup_environment
+ end
+
+ it "asks a client for info and waits for the response" do
+ @client1.on(:request_message) do |message|
+ "Client 1 responds"
+ end
+
+ message = Pantry::Communication::Message.new("request_message")
+ response_future = @server.send_request(@client1.identity, message)
+
+ Timeout::timeout(1) do
+ assert_equal ["Client 1 responds"], response_future.value.body
+ end
+ end
+
+ it "asks multiple clients for info and matches responses with requests"
+
+ it "receives information from all clients with the same identity"
+
+end
|
Add test that server can send request and wait for client response
|
diff --git a/test/data_structures/association_column_test.rb b/test/data_structures/association_column_test.rb
index abc1234..def5678 100644
--- a/test/data_structures/association_column_test.rb
+++ b/test/data_structures/association_column_test.rb
@@ -18,8 +18,9 @@ end
def test_searching
- # right now, there's no intelligent searching on association columns
- assert !@association_column.searchable?
+ # by default searching on association columns uses primary key
+ assert @association_column.searchable?
+ assert_equal 'model_stubs.id', @association_column.search_sql
end
def test_association
|
Fix testing default search for association columns
|
diff --git a/test/unit/calculators/arrested_abroad_calculator_test.rb b/test/unit/calculators/arrested_abroad_calculator_test.rb
index abc1234..def5678 100644
--- a/test/unit/calculators/arrested_abroad_calculator_test.rb
+++ b/test/unit/calculators/arrested_abroad_calculator_test.rb
@@ -16,7 +16,7 @@
should "generate link if country exists" do
link = @calc.generate_url_for_download("argentina", "pdf", "Prisoner pack")
- assert_equal "- [Prisoner pack](http://ukinargentina.fco.gov.uk/resources/en/pdf/pdf1/prisoners-abroad){:rel=\"external\"}", link
+ assert_equal "- [Prisoner pack](/government/publications/argentina-prisoner-pack)", link
end
end
@@ -24,7 +24,7 @@ should "pull the regions out of the YML for Australia" do
resp = @calc.get_country_regions("australia")["new_south_wales"]
expected = {
- "link" => "http://ukinaustralia.fco.gov.uk/resources/en/pdf/consular/nsw-prisoner-pack12",
+ "link" => "/government/publications/australia-prisoner-pack",
"url_text" => "Prisoner pack for New South Wales"
}
assert_equal expected, resp
|
Update tests following link changes
|
diff --git a/AFIncrementalStore.podspec b/AFIncrementalStore.podspec
index abc1234..def5678 100644
--- a/AFIncrementalStore.podspec
+++ b/AFIncrementalStore.podspec
@@ -17,5 +17,5 @@
s.requires_arc = true
- s.dependency 'AFNetworking', '~> 0.9.0'
+ s.dependency 'AFNetworking', '>= 0.9.0'
end
|
Change AFNetworking dependency to >= 0.9.0
|
diff --git a/mta-settings.gemspec b/mta-settings.gemspec
index abc1234..def5678 100644
--- a/mta-settings.gemspec
+++ b/mta-settings.gemspec
@@ -27,5 +27,5 @@ spec.add_development_dependency "bundler", "~> 1.3"
spec.add_development_dependency "rake", "~> 10"
spec.add_development_dependency "minitest", "~> 5"
- spec.add_runtime_dependency "activesupport", ">= 3.0.0", "< 7"
+ spec.add_runtime_dependency "activesupport", ">= 3.0.0", "< 8"
end
|
Allow use with Rails 7
|
diff --git a/Valet.podspec b/Valet.podspec
index abc1234..def5678 100644
--- a/Valet.podspec
+++ b/Valet.podspec
@@ -14,18 +14,4 @@ s.macos.deployment_target = '10.11'
s.tvos.exclude_files = 'Sources/SinglePromptSecureEnclaveValet.swift'
-
- s.test_spec 'Tests' do |test_spec|
- test_spec.ios.requires_app_host = true
- test_spec.ios.source_files = 'Tests/**/*.{h,m,swift}'
- test_spec.ios.exclude_files = 'Tests/MacTests.swift'
- test_spec.tvos.requires_app_host = true
- test_spec.tvos.source_files = 'Tests/**/*.{h,m,swift}'
- test_spec.tvos.exclude_files = ['Tests/MacTests.swift', 'Tests/*BackwardsCompatibilityTests.swift', 'Tests/SinglePromptSecureEnclaveTests.swift']
- test_spec.macos.source_files = 'Tests/**/*.{h,m,swift}'
- test_spec.pod_target_xcconfig = {
- 'SWIFT_OBJC_BRIDGING_HEADER' => '${PODS_TARGET_SRCROOT}/Tests/ValetTests-Bridging-Header.h',
- 'CLANG_WARN_UNGUARDED_AVAILABILITY' => 'YES'
- }
- end
end
|
Remove 'test_spec' from podspec – it doesn't handle test environments that require keychain sharing
|
diff --git a/util/update_proposal_status_from_voting_spreadsheet.rb b/util/update_proposal_status_from_voting_spreadsheet.rb
index abc1234..def5678 100644
--- a/util/update_proposal_status_from_voting_spreadsheet.rb
+++ b/util/update_proposal_status_from_voting_spreadsheet.rb
@@ -8,19 +8,19 @@ waitlist = %w( ).map(&:to_i)
reject.each do |id|
- p = Proposal.find(id)
+ p = OpenConferenceWare::Proposal.find(id)
p.reject! unless p.rejected?
end
accept.each do |id|
- p = Proposal.find(id)
+ p = OpenConferenceWare::Proposal.find(id)
p.accept! unless p.accepted?
end
waitlist.each do |id|
- p = Proposal.find(id)
+ p = OpenConferenceWare::Proposal.find(id)
p.waitlist! unless p.waitlisted?
end
end
-accept_and_reject_from_spreadsheet()
+accept_and_reject_from_spreadsheet
|
Update proposal status script with OpenConferenceWare namespace
|
diff --git a/lib/ajax-datatables-rails/datatable/datatable.rb b/lib/ajax-datatables-rails/datatable/datatable.rb
index abc1234..def5678 100644
--- a/lib/ajax-datatables-rails/datatable/datatable.rb
+++ b/lib/ajax-datatables-rails/datatable/datatable.rb
@@ -18,7 +18,12 @@ end
def orders
- @orders ||= options[:order].map { |_, order_options| SimpleOrder.new(self, order_options) }
+ return @orders if @orders
+ @orders = []
+ options[:order].each do |_, order_options|
+ @orders << SimpleOrder.new(self, order_options)
+ end
+ @orders
end
def order_by(how, what)
@@ -38,9 +43,12 @@ # ----------------- COLUMN METHODS --------------------
def columns
- @columns ||= options[:columns].map do |index, column_options|
- Column.new(datatable, index, column_options)
+ return @columns if @columns
+ @columns = []
+ options[:columns].each do |index, column_options|
+ @columns << Column.new(datatable, index, column_options)
end
+ @columns
end
def column_by(how, what)
|
Fix deprecation warning and be compatible acrross Rails versions
|
diff --git a/Casks/boom.rb b/Casks/boom.rb
index abc1234..def5678 100644
--- a/Casks/boom.rb
+++ b/Casks/boom.rb
@@ -1,6 +1,6 @@ cask :v1 => 'boom' do
- version '1.0'
- sha256 '446605e22d6c4c56e7451373a330c3c86e2a7aa9316ca9aaa2261d200f7e747d'
+ version '1.0.1'
+ sha256 '9ee325c8901bfeaae54ca10be5eac129f42c956a0daef772a5e9b0192fd4ab2c'
url "http://www.globaldelight.com/boom/download/2x/v#{version}/boom2.dmg"
homepage 'http://www.globaldelight.com/boom/'
|
Update Boom 2 to v1.0.1
|
diff --git a/Casks/josm.rb b/Casks/josm.rb
index abc1234..def5678 100644
--- a/Casks/josm.rb
+++ b/Casks/josm.rb
@@ -1,6 +1,6 @@ cask 'josm' do
- version '9963'
- sha256 'd93ae916bc679d0ba1dd56b3262682a862badb7523cc57f099e65f8d056f659d'
+ version '9979'
+ sha256 'd25a69ccf06fb5edc86e9152cda4185b2f8f774bcbb45493f39bcf2b1e8cee5e'
url "https://josm.openstreetmap.de/download/macosx/josm-macosx-#{version}.zip"
name 'JOSM'
|
Update JOSM to version 9979
|
diff --git a/Casks/love.rb b/Casks/love.rb
index abc1234..def5678 100644
--- a/Casks/love.rb
+++ b/Casks/love.rb
@@ -1,6 +1,6 @@ cask :v1 => 'love' do
version '0.9.1'
- sha256 '40dfeb1069f6c056b06d0e87c64f3950fd1b1523a9e19af2b03912a5d5c03b13'
+ sha256 '82bdd5c40440af8f26f622b8772a877c8aa201fd0115a0f57563790d17a96b68'
# bitbucket.org is the official download host per the vendor homepage
url "https://bitbucket.org/rude/love/downloads/love-#{version}-macosx-x64.zip"
@@ -9,4 +9,5 @@ license :oss
app 'love.app'
+ binary 'love.app/Contents/MacOS/love'
end
|
Love: Fix the sha256 and link binary
The shasum didn't match. Also link the binary
|
diff --git a/db/migrate/20110512082750_add_entity_type_names.rb b/db/migrate/20110512082750_add_entity_type_names.rb
index abc1234..def5678 100644
--- a/db/migrate/20110512082750_add_entity_type_names.rb
+++ b/db/migrate/20110512082750_add_entity_type_names.rb
@@ -0,0 +1,22 @@+class AddEntityTypeNames < ActiveRecord::Migration
+ def self.up
+ #insert entity type names to entity types table
+ entity_types = [
+ {:id => 1, :name => 'Person'},
+ {:id => 2, :name => 'Item'},
+ {:id => 3, :name => 'Skill'},
+ {:id => 4, :name => 'Village'},
+ {:id => 5, :name => 'Community'},
+ {:id => 6, :name => 'Project'},
+ {:id => 7, :name => 'Trusted Person'}
+ ]
+ entity_types.each do |entity|
+ et = EntityType.new(:entity_type_name => entity[:name])
+ et.id = entity[:id]
+ et.save!
+ end
+ end
+
+ def self.down
+ end
+end
|
Add entity type names like shown in document
|
diff --git a/lib/cortex/snippets/client.rb b/lib/cortex/snippets/client.rb
index abc1234..def5678 100644
--- a/lib/cortex/snippets/client.rb
+++ b/lib/cortex/snippets/client.rb
@@ -4,7 +4,7 @@ module Cortex
module Snippets
class Client
- include ActionView::Helpers::TranslationHelper
+ include ActionView::Helpers::TagHelper
def initialize(cortex_client)
@cortex_client = cortex_client
|
Include TagHelper instead of TranslationHelper to get content_tag dependency
|
diff --git a/cloud_files.gemspec b/cloud_files.gemspec
index abc1234..def5678 100644
--- a/cloud_files.gemspec
+++ b/cloud_files.gemspec
@@ -23,5 +23,5 @@
spec.add_development_dependency "bundler", "~> 1.10"
spec.add_development_dependency "rake", "~> 10.0"
- spec.add_development_dependency "rspec", "~> 3.3.0"
+ spec.add_development_dependency "rspec", "~> 3.2.0"
end
|
Downgrade RSpec for TM1 compatability
|
diff --git a/spec/integration/cli/key_pair/key_pair_aws_spec.rb b/spec/integration/cli/key_pair/key_pair_aws_spec.rb
index abc1234..def5678 100644
--- a/spec/integration/cli/key_pair/key_pair_aws_spec.rb
+++ b/spec/integration/cli/key_pair/key_pair_aws_spec.rb
@@ -25,18 +25,6 @@ Confirm: Using key pair microbosh-test-bosh
OUT
end
-
- xit "create new key pair (already exists on AWS)" do
- end
-
- xit "existing key pair (matches fingerprint on AWS)" do
- end
-
- xit "existing key pair (fingerprint mismatch)" do
- end
-
- xit "existing key pair (doesn't exist on AWS)" do
- end
end
end
|
Remove test ideas that went into unit tests
|
diff --git a/agate.gemspec b/agate.gemspec
index abc1234..def5678 100644
--- a/agate.gemspec
+++ b/agate.gemspec
@@ -8,8 +8,8 @@ spec.version = Agate::VERSION
spec.authors = ["Jesse B. Hannah"]
spec.email = ["jesse@jbhannah.net"]
- spec.description = %q{Wrap ruby characters (e.g. furigana, Pinyin, Zhuyin) in text with the HTML ruby element.}
- spec.summary = %q{Wrap ruby characters (e.g. furigana, Pinyin, Zhuyin) in text with the HTML ruby element.}
+ spec.description = %q{Wrap ruby characters (currently only furigana) in text with the HTML5 ruby element.}
+ spec.summary = %q{Wrap ruby characters (currently only furigana) in text with the HTML5 ruby element.}
spec.homepage = "https://github.com/jbhannah/agate"
spec.license = "MIT"
|
Update gemspec to reflect Japanese support only for now
[ci skip]
|
diff --git a/Casks/intellij-idea-eap.rb b/Casks/intellij-idea-eap.rb
index abc1234..def5678 100644
--- a/Casks/intellij-idea-eap.rb
+++ b/Casks/intellij-idea-eap.rb
@@ -1,19 +1,19 @@ cask :v1 => 'intellij-idea-eap' do
- version '141.1531.2'
- sha256 '66fe6dcc84508cac655cac251975e69075ed1b0a80e9bf2baaa02b2a0b33c98d'
+ version '142.2491.4'
+ sha256 'a7ce7ec03940b775963cfaf69b2e39bae23a98746691ef9e84b59c8c00d494ff'
- url "http://download-cf.jetbrains.com/idea/ideaIU-#{version}.dmg"
- homepage 'https://confluence.jetbrains.com/display/IDEADEV/IDEA+14.1+EAP'
+ url "https://download.jetbrains.com/idea/ideaIU-#{version}-custom-jdk-bundled.dmg"
+ name 'IntelliJ IDEA EAP'
+ homepage 'https://confluence.jetbrains.com/display/IDEADEV/IDEA+15+EAP'
license :commercial
- app 'IntelliJ IDEA 14 EAP.app'
-
- postflight do
- plist_set(':JVMOptions:JVMVersion', '1.6+')
- end
+ app 'IntelliJ IDEA 15 EAP.app'
zap :delete => [
- '~/Library/Application Support/IntelliJIdea14',
- '~/Library/Preferences/IntelliJIdea14',
+ '~/Library/Preferences/com.jetbrains.intellij.plist',
+ '~/Library/Application Support/IntelliJIdea15',
+ '~/Library/Preferences/IntelliJIdea15',
+ '~/Library/Caches/IntelliJIdea15',
+ '~/Library/Logs/IntelliJIdea15',
]
end
|
Update IntelliJ EAP to 15; version 142.2491.4.
|
diff --git a/cookbooks/wt_streamcollection/recipes/default.rb b/cookbooks/wt_streamcollection/recipes/default.rb
index abc1234..def5678 100644
--- a/cookbooks/wt_streamcollection/recipes/default.rb
+++ b/cookbooks/wt_streamcollection/recipes/default.rb
@@ -15,17 +15,6 @@ install_dir = node[:install_dir]
download_url = node[:download_url]
-remote_file "/tmp/#{tarball}" do
- source download_url
- mode "0644"
-end
-
-execute "tar" do
- user "root"
- group "root"
- cwd install_dir
- command "tar zxf /tmp/#{tarball}"
-end
directory "#{log_dir}" do
owner "root"
@@ -41,6 +30,18 @@ mode "0755"
recursive true
action :create
+end
+
+remote_file "/tmp/#{tarball}" do
+ source download_url
+ mode "0644"
+end
+
+execute "tar" do
+ user "root"
+ group "root"
+ cwd install_dir
+ command "tar zxf /tmp/#{tarball}"
end
template "#{install_dir}/#{name}/bin/#{name}" do
|
Create the directories before we try to download the tar and CD into a
directory that might not exist
|
diff --git a/app/serializers/admin/feedback_report_csv_writer.rb b/app/serializers/admin/feedback_report_csv_writer.rb
index abc1234..def5678 100644
--- a/app/serializers/admin/feedback_report_csv_writer.rb
+++ b/app/serializers/admin/feedback_report_csv_writer.rb
@@ -1,7 +1,7 @@ module Admin
class FeedbackReportCSVWriter < CSVWriter
- columns :id, :service, :feedbackable_type, :rating, :review, :acknowledged, :email, :phone, :traveler
+ columns :id, :service, :feedbackable_type, :rating, :created_at, :review, :acknowledged, :email, :phone, :traveler
associations :user
|
Add Date to the feedback report.
|
diff --git a/rb/lib/selenium/webdriver/firefox/bridge.rb b/rb/lib/selenium/webdriver/firefox/bridge.rb
index abc1234..def5678 100644
--- a/rb/lib/selenium/webdriver/firefox/bridge.rb
+++ b/rb/lib/selenium/webdriver/firefox/bridge.rb
@@ -41,9 +41,9 @@
def quit
super
+ nil
+ ensure
@launcher.quit
-
- nil
end
private
|
JariBakken: Make sure Firefox shutdown happens even if the RPC fails.
git-svn-id: aa1aa1384423cb28c2b1e29129bb3a91de1d9196@16693 07704840-8298-11de-bf8c-fd130f914ac9
|
diff --git a/nagira_active_resource.gemspec b/nagira_active_resource.gemspec
index abc1234..def5678 100644
--- a/nagira_active_resource.gemspec
+++ b/nagira_active_resource.gemspec
@@ -11,7 +11,7 @@ s.email = ["dmytro.kovalov@gmail.com"]
s.homepage = "http://dmytro.github.com"
s.summary = "Rails side to Nagira API."
- s.description = %W{ Since Nagira API in ActiveResource mode is not actually ActiveResource
+ s.description = %q{ Since Nagira API in ActiveResource mode is not actually ActiveResource
compliant, there is a need to have component on the Rails side to
provide additional functionality to make it look like ActiveResource.
@@ -23,6 +23,7 @@ s.test_files = Dir["test/**/*"]
s.add_dependency "rails", "~> 3.2.13"
+ s.add_dependency "nagira", "~> 0.2.7"
s.add_development_dependency "sqlite3"
end
|
Add nagira dependency to Gemfile
|
diff --git a/spec/aspect_on_object_spec.rb b/spec/aspect_on_object_spec.rb
index abc1234..def5678 100644
--- a/spec/aspect_on_object_spec.rb
+++ b/spec/aspect_on_object_spec.rb
@@ -0,0 +1,46 @@+require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+
+describe "Aspector for object" do
+ it "should work" do
+ klass = Class.new do
+ def value
+ @value ||= []
+ end
+
+ def test
+ value << "test"
+ end
+
+ def do_before
+ value << "do_before"
+ end
+
+ def do_after result
+ value << "do_after"
+ result
+ end
+
+ def do_around &block
+ value << "do_around_before"
+ result = block.call
+ value << "do_around_after"
+ result
+ end
+ end
+
+ obj = klass.new
+
+ eigen_aspector(obj) do
+ before :test, :do_before
+ after :test, :do_after
+ around :test, :do_around
+ end
+
+ obj.test
+ obj.value.should == %w"do_around_before do_before test do_after do_around_after"
+
+ obj2 = klass.new
+ obj2.test
+ obj2.value.should == %w"test"
+ end
+end
|
Test aspect for instance objects
|
diff --git a/test/application/app/models/degenerate_user.rb b/test/application/app/models/degenerate_user.rb
index abc1234..def5678 100644
--- a/test/application/app/models/degenerate_user.rb
+++ b/test/application/app/models/degenerate_user.rb
@@ -1,5 +1,5 @@ class ::DegenerateUser
- include Authorize::AuthorizationsTable, Authorize::AuthorizationsTable::TrusteeExtensions
+ include Authorize::AuthorizationsTable::TrusteeExtensions
acts_as_trustee(false)
def authorization_token
|
Remove cruft from DegenerateUser model
|
diff --git a/spec/support/action_mailer.rb b/spec/support/action_mailer.rb
index abc1234..def5678 100644
--- a/spec/support/action_mailer.rb
+++ b/spec/support/action_mailer.rb
@@ -1,7 +1,8 @@+deliver_method = ActionMailer.respond_to?(:version) && ActionMailer.version.to_s.to_f >= 4.2 ? :deliver_now! : :deliver!
shared_examples "with header" do |header, value|
it "sets header #{header}" do
expect {
- subject.deliver!
+ subject.__send__(deliver_method)
}.to change { ActionMailer::Base.deliveries.count }.by(1)
m = ActionMailer::Base.deliveries.last
expect(m.header.to_s).to match(/(\r\n)?#{header}: #{value}(\r\n)?/)
@@ -10,7 +11,7 @@ shared_examples "without header" do |header|
it "does not set header #{header}" do
expect {
- subject.deliver!
+ subject.__send__(deliver_method)
}.to change { ActionMailer::Base.deliveries.count }.by(1)
m = ActionMailer::Base.deliveries.last
expect(m.header.to_s).not_to match(/(\r\n)?#{header}: [^\r]*(\r\n)?/)
@@ -20,7 +21,7 @@ it "raises #{exception}" do
expect {
expect {
- subject.deliver!
+ subject.__send__(deliver_method)
}.to raise_error(exception)
}.to change { ActionMailer::Base.deliveries.count }.by(0)
end
|
Remove deprecation warning in spec test
|
diff --git a/lib/blazer/adapters/mongodb_adapter.rb b/lib/blazer/adapters/mongodb_adapter.rb
index abc1234..def5678 100644
--- a/lib/blazer/adapters/mongodb_adapter.rb
+++ b/lib/blazer/adapters/mongodb_adapter.rb
@@ -7,7 +7,7 @@ error = nil
begin
- documents = db.command({:$eval => "#{statement.strip}.toArray()"}).documents.first["retval"]
+ documents = db.command({:$eval => "#{statement.strip}.toArray()", nolock: true}).documents.first["retval"]
columns = documents.flat_map { |r| r.keys }.uniq
rows = documents.map { |r| columns.map { |c| r[c] } }
rescue => e
|
Use nolock: true for Mongo [skip ci]
|
diff --git a/pakyow-mailer/lib/mailer/helpers.rb b/pakyow-mailer/lib/mailer/helpers.rb
index abc1234..def5678 100644
--- a/pakyow-mailer/lib/mailer/helpers.rb
+++ b/pakyow-mailer/lib/mailer/helpers.rb
@@ -1,5 +1,5 @@ module Pakyow
- module AppHelpers
+ module Helpers
def mailer(view_path)
Mailer.from_store(view_path, @presenter.store)
end
|
Put mailer in Helpers instead of AppHelpers
|
diff --git a/lib/john_hancock/rails/form_builder.rb b/lib/john_hancock/rails/form_builder.rb
index abc1234..def5678 100644
--- a/lib/john_hancock/rails/form_builder.rb
+++ b/lib/john_hancock/rails/form_builder.rb
@@ -3,12 +3,21 @@ module FormBuilder
include ActionView::Helpers::TagHelper
+ def signature_canvas
+ content_tag(:canvas, nil, id: 'JohnHancock-canvas')
+ end
+
+ def hidden_signature_field(attribute)
+ hidden_field(attribute.to_sym, id: 'JohnHancock-hidden')
+ end
+
def signature_field(attribute)
tags = []
- tags << content_tag(:canvas, nil, class: 'Signature-visable Signature-pad', id: 'JohnHancock-canvas')
- tags << hidden_field(attribute.to_sym, id: 'JohnHancock-hidden')
- tags.join(',').html_safe
+ tags << signature_canvas
+ tags << hidden_signature_field(attribute)
+ tags.join(' ').html_safe
end
+
end
end
end
|
Add separate methods for canvas and hidden field
|
diff --git a/lib/generators/thincloud/test/test_generator.rb b/lib/generators/thincloud/test/test_generator.rb
index abc1234..def5678 100644
--- a/lib/generators/thincloud/test/test_generator.rb
+++ b/lib/generators/thincloud/test/test_generator.rb
@@ -27,6 +27,8 @@ empty_directory "spec/mailers"
empty_directory "spec/helpers"
+ run "touch spec/{models,controllers,mailers,helpers}/.gitkeep"
+
copy_file "spec_helper.rb", "spec/spec_helper.rb"
copy_file "spec.rake", "lib/tasks/spec.rake"
|
Add gitkeeps for spec dirs
|
diff --git a/lib/interactive_s3/commands/internal_command.rb b/lib/interactive_s3/commands/internal_command.rb
index abc1234..def5678 100644
--- a/lib/interactive_s3/commands/internal_command.rb
+++ b/lib/interactive_s3/commands/internal_command.rb
@@ -40,7 +40,7 @@
class Pwd < Base
def execute
- puts s3.current_path
+ puts s3.root? ? '/' : s3.current_path
end
end
|
Modify `pwd` command in the root dir.
|
diff --git a/lib/rubocop/cop/mixin/configurable_numbering.rb b/lib/rubocop/cop/mixin/configurable_numbering.rb
index abc1234..def5678 100644
--- a/lib/rubocop/cop/mixin/configurable_numbering.rb
+++ b/lib/rubocop/cop/mixin/configurable_numbering.rb
@@ -7,9 +7,9 @@ module ConfigurableNumbering
include ConfigurableEnforcedStyle
- SNAKE_CASE = /(^_|[a-z]|_\d+)$/
- NORMAL_CASE = /(^_|[A-Za-z]\d*)$/
- NON_INTEGER = /(^_|[A-Za-z])$/
+ SNAKE_CASE = /(?:^_|[a-z]|_\d+)$/
+ NORMAL_CASE = /(?:^_|[A-Za-z]\d*)$/
+ NON_INTEGER = /(?:^_|[A-Za-z])$/
def check_name(node, name, name_range)
return if operator?(name)
|
Change regexes to not capture
|
diff --git a/config/application.rb b/config/application.rb
index abc1234..def5678 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -31,7 +31,7 @@ provider :developer unless Rails.env.production?
provider :github, ENV['GITHUB_CLIENT_ID'], ENV['GITHUB_CLIENT_SECRET'],
request_path: "/api/v1/authorize", callback_path: "/api/v1/authorize/callback",
- provider_ignores_state: true
+ provider_ignores_state: true, scope: 'repo'
end
config.secret_key_base = 'ghcr-web'
|
Add repo scope to github
|
diff --git a/config/application.rb b/config/application.rb
index abc1234..def5678 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -21,5 +21,9 @@ # config.i18n.default_locale = :de
config.sass.preferred_syntax = :sass
+
+ config.generators do |g|
+ g.test_framework :rspec
+ end
end
end
|
Configure Rspec as default test framework for Rails generators
|
diff --git a/config/application.rb b/config/application.rb
index abc1234..def5678 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -1,5 +1,6 @@ require File.expand_path('../boot', __FILE__)
+YAML::ENGINE.yamler = 'syck'
# Pick the frameworks you want:
# require "active_record/railtie"
require "action_controller/railtie"
|
Fix mongoid config loading after ruby 1.9.2 upgrade
|
diff --git a/test/tmp.rb b/test/tmp.rb
index abc1234..def5678 100644
--- a/test/tmp.rb
+++ b/test/tmp.rb
@@ -20,11 +20,11 @@
assert_equal "multicast", queue.push_type
- queue.update_queue(:push_type => 'pull')
+ p queue.update_queue(:push_type => 'pull')
queue.reload
- p queue.type
+ p queue.push_type
assert_equal "pull", queue.push_type
|
Test for converting to back to pull type.
|
diff --git a/config/application.rb b/config/application.rb
index abc1234..def5678 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -12,6 +12,8 @@
# How often should encountering a run trigger a background refresh-from-file job?
config.run_refresh_chance = 0.1
+
+ config.assets.precompile += ['darkmode.css']
end
end
|
Add darkmode.css to precompilation list
|
diff --git a/config/environment.rb b/config/environment.rb
index abc1234..def5678 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -6,9 +6,13 @@ Rails::Initializer.run do |config|
config.action_controller.session = { :session_key => "_active_scaffold_demo", :secret => ("shhh." * 6) }
<<<<<<< HEAD:config/environment.rb
+<<<<<<< HEAD:config/environment.rb
# config.gem 'brynary-webrat', :lib => false, :source => 'http://gems.github.com'
=======
>>>>>>> 49aada3... working on getting edge up to date:config/environment.rb
+=======
+ config.gem 'brynary-webrat', :lib => false, :source => 'http://gems.github.com'
+>>>>>>> 1b66bde... removing requirement for now:config/environment.rb
end
ActiveScaffold.set_defaults do |config|
|
Revert "removing requirement for now"
This reverts commit 1b66bdec303e2c5e515fccd609100118c5b86967.
Conflicts:
config/environment.rb
|
diff --git a/actionpack/lib/action_view/template/handlers/erb.rb b/actionpack/lib/action_view/template/handlers/erb.rb
index abc1234..def5678 100644
--- a/actionpack/lib/action_view/template/handlers/erb.rb
+++ b/actionpack/lib/action_view/template/handlers/erb.rb
@@ -17,7 +17,7 @@ def compile(template)
require 'erb'
- magic = $1 if template.source =~ /\A(<%#.*coding:\s*(\S+)\s*-?%>)/
+ magic = $1 if template.source =~ /\A(<%#.*coding[:=]\s*(\S+)\s*-?%>)/
erb = "#{magic}<% __in_erb_template=true %>#{template.source}"
::ERB.new(erb, nil, erb_trim_mode, '@output_buffer').src
end
|
Fix pattern to match various magic comment formats
|
diff --git a/Runes.podspec b/Runes.podspec
index abc1234..def5678 100644
--- a/Runes.podspec
+++ b/Runes.podspec
@@ -12,6 +12,7 @@ spec.source = { :git => 'https://github.com/thoughtbot/runes.git', :tag => "v#{spec.version}" }
spec.source_files = 'Source/**/*.{h,swift}'
spec.requires_arc = true
+ spec.compiler_flags = '-whole-module-optimization'
spec.ios.deployment_target = '8.0'
spec.osx.deployment_target = '10.9'
spec.watchos.deployment_target = '2.0'
|
Add whole module optimization to the podspec
|
diff --git a/Contentful.podspec b/Contentful.podspec
index abc1234..def5678 100644
--- a/Contentful.podspec
+++ b/Contentful.podspec
@@ -19,9 +19,15 @@ :tag => spec.version.to_s }
spec.requires_arc = true
- spec.source_files = 'Sources/*.swift'
+ spec.source_files = 'Sources/*.swift'
spec.frameworks = 'CoreLocation'
+
+ ## Platform specific source code.
+ spec.ios.source_files = 'Sources/UIKit/*.swift'
+ spec.watchos.source_files = 'Sources/UIKit/*.swift'
+ spec.tvos.source_files = 'Sources/UIKit/*.swift'
+ spec.osx.source_files = 'Sources/AppKit/*.swift'
spec.ios.deployment_target = '8.0'
spec.osx.deployment_target = '10.10'
|
Update podspec with platform specific files
|
diff --git a/app/components/express_admin/flash_message_component.rb b/app/components/express_admin/flash_message_component.rb
index abc1234..def5678 100644
--- a/app/components/express_admin/flash_message_component.rb
+++ b/app/components/express_admin/flash_message_component.rb
@@ -2,14 +2,15 @@ class FlashMessageComponent < ExpressTemplates::Components::Base
Helper = ExpressAdmin::FlashMessageComponent # for convenience
-
helper(:safe_message) {|message| message[1] }
helper(:classes) {|message| "flash nav-alert alert-box #{flash_class(message[0])}" }
emits {
- div(class: Helper.classes('{{flash_message}}'), data: {alert: ''}) {
- safe_message('{{flash_message}}')
- a.close(:href => "#") { "×" }
+ div {
+ div(class: Helper.classes('{{flash_message}}'), data: {alert: ''}) {
+ safe_message('{{flash_message}}')
+ a.close(:href => "#") { "×" }
+ }
}
}
@@ -17,4 +18,4 @@
end
-end+end
|
Add div wrapper for the flash message
|
diff --git a/app/models/ahoy/visit.rb b/app/models/ahoy/visit.rb
index abc1234..def5678 100644
--- a/app/models/ahoy/visit.rb
+++ b/app/models/ahoy/visit.rb
@@ -3,4 +3,5 @@
has_many :events, class_name: "Ahoy::Event"
belongs_to :user, optional: true
+ belongs_to :site, optional: true
end
|
Add association of Ahoy::Visit model with Site
|
diff --git a/lib/electric_sheep/commands/database/mysql_dump.rb b/lib/electric_sheep/commands/database/mysql_dump.rb
index abc1234..def5678 100644
--- a/lib/electric_sheep/commands/database/mysql_dump.rb
+++ b/lib/electric_sheep/commands/database/mysql_dump.rb
@@ -13,25 +13,25 @@ def perform!
logger.info "Creating a dump of the \"#{input.basename}\" MySQL database"
file_resource(host, extension: '.sql').tap do |dump|
- shell.exec cmd(input.name, option(:user), option(:password), dump)
+ shell.exec cmd(dump)
end
end
def stat_database(input)
- cmd=database_size_cmd(input.name, option(:user), option(:password))
+ cmd=database_size_cmd(input)
shell.exec(cmd)[:out].chomp.to_i
end
private
- def cmd(db, user, password, dump)
+ def cmd(dump)
"mysqldump" +
- " #{credentials(user, password)}" +
- " #{shell_safe(db)} > #{shell.expand_path(dump.path)}"
+ " #{credentials}" +
+ " #{shell_safe(input.name)} > #{shell.expand_path(dump.path)}"
end
- def database_size_cmd(db, user, password)
- "echo \"#{database_size_query(db)}\" | " +
- "mysql --skip-column-names #{credentials(user, password)}"
+ def database_size_cmd(input)
+ "echo \"#{database_size_query(input.name)}\" | " +
+ "mysql --skip-column-names #{credentials}"
end
def database_size_query(db)
@@ -40,9 +40,10 @@ " GROUP BY table_schema"
end
- def credentials(user, password)
- user.nil? && "" ||
- "--user=#{shell_safe(user)} --password=#{shell_safe(password)}"
+ def credentials
+ option(:user).nil? && "" ||
+ "--user=#{shell_safe(option(:user))} " +
+ "--password=#{shell_safe(option(:password))}"
end
end
|
Use options instead of arguments
|
diff --git a/lib/generators/user_maintenance/views_generator.rb b/lib/generators/user_maintenance/views_generator.rb
index abc1234..def5678 100644
--- a/lib/generators/user_maintenance/views_generator.rb
+++ b/lib/generators/user_maintenance/views_generator.rb
@@ -0,0 +1,9 @@+module UserMaintenance
+ class ViewsGenerator < Rails::Generators::Base
+
+ def copy_views
+ ViewsGenerator.source_root File.expand_path('../../../../app/views', __FILE__)
+ directory 'user_maintenance', 'app/views/user_maintenance'
+ end
+ end
+end
|
Create view generator in the rule engine
This generator will copy the user view files to the
parent app for customization
Signed-off-by: Joan Tiffany Siy <e0397393f2258e8c6ee68e35ceb46d86a4ac5382@teamcodeflux.com>
|
diff --git a/lib/gphoto2/camera_widgets/toggle_camera_widget.rb b/lib/gphoto2/camera_widgets/toggle_camera_widget.rb
index abc1234..def5678 100644
--- a/lib/gphoto2/camera_widgets/toggle_camera_widget.rb
+++ b/lib/gphoto2/camera_widgets/toggle_camera_widget.rb
@@ -5,6 +5,7 @@ def get_value
val = FFI::MemoryPointer.new(:int)
rc = gp_widget_get_value(ptr, val)
+ GPhoto2.check!(rc)
(val.read_int == 1)
end
|
Add missing return code check
|
diff --git a/base.rb b/base.rb
index abc1234..def5678 100644
--- a/base.rb
+++ b/base.rb
@@ -11,28 +11,16 @@ end
CODE
-file '.gitignore', <<-CODE
-# Ignore bundler config.
-/.bundle
-
-# Ignore all logfiles and tempfiles.
-/log/*
-!/log/.keep
+append_to_file '.gitignore', <<-CODE
/.sass-cache
-/tmp
*.*~
*.bak
.*.log
.DS_Store
-# Ignore the default SQLite database.
+# Ignore the default database
/db/*.db
-/db/*.sqlite3
-/db/*.sqlite3-journal
/db/schema.rb
-
-# Ignore application configuration
-/config/application.yml
# Ignore Gemfile.lock
Gemfile.lock
|
Append to gitignore dot file instead of create a new one
|
diff --git a/blog.rb b/blog.rb
index abc1234..def5678 100644
--- a/blog.rb
+++ b/blog.rb
@@ -1,5 +1,4 @@ require 'sinatra'
-require 'sinatra/reloader' if development?
require 'haml'
require_relative 'lib/config'
|
Revert "Use sinatra/reloader in development mode"
(doesn't seem to work easily. Just drop it for now)
This reverts commit afaeb0eb5180d36c7464d04641582932d8ad0c91.
|
diff --git a/spec/models/group_spec.rb b/spec/models/group_spec.rb
index abc1234..def5678 100644
--- a/spec/models/group_spec.rb
+++ b/spec/models/group_spec.rb
@@ -18,7 +18,7 @@ let(:group) { FactoryGirl.create :group }
it "should returns its name based on its attributes" do
- expect(group.name).to eq("#{group.primary_number} #{group.street_name} #{group.street_suffix}")
+ expect(group.name).to eq("#{group.primary_number} #{group.street_name} #{group.street_suffix}")
end
end
|
Add extra spacing for street_predirection in group name.
|
diff --git a/boot.rb b/boot.rb
index abc1234..def5678 100644
--- a/boot.rb
+++ b/boot.rb
@@ -24,5 +24,6 @@ config.datamapper(:default, {
:adapter => database['adapter'],
:host => database['host'],
- :database => database['name']})
+ :database => database['name'],
+ :password => database['password']})
end
|
Put the password in the setup method
|
diff --git a/Framezilla.podspec b/Framezilla.podspec
index abc1234..def5678 100644
--- a/Framezilla.podspec
+++ b/Framezilla.podspec
@@ -1,6 +1,6 @@ Pod::Spec.new do |spec|
spec.name = "Framezilla"
- spec.version = "1.2.0"
+ spec.version = "1.2.1"
spec.summary = "Comfortable syntax for working with frames."
spec.homepage = "https://github.com/Otbivnoe/Framezilla"
|
Change podspec version -> 1.2.1
|
diff --git a/spec/models/post_spec.rb b/spec/models/post_spec.rb
index abc1234..def5678 100644
--- a/spec/models/post_spec.rb
+++ b/spec/models/post_spec.rb
@@ -1,5 +1,12 @@ require 'rails_helper'
RSpec.describe Post, :type => :model do
- pending "add some examples to (or delete) #{__FILE__}"
+ describe '#sha' do
+ it 'is automatically generated when validating a post instance' do
+ post = build(:post)
+ expect(post.sha).to be_blank
+ post.valid?
+ expect(post.sha).to_not be_blank
+ end
+ end
end
|
Add a first spec. We need to start somewhere, right?
|
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
@@ -4,6 +4,7 @@
module RepositoryHelper
+ # TODO: use 1.8.7's Dir.mktmpdir?
REPO_PATH = File.join(Dir::tmpdir, "git-pair-test-repo")
REPO_GIT_DIR = File.join(REPO_PATH, ".git")
GIT_PAIR = File.expand_path(File.join(File.dirname(__FILE__), "../../bin/git-pair"))
|
Add a note to self
|
diff --git a/spec/support/fixtures.rb b/spec/support/fixtures.rb
index abc1234..def5678 100644
--- a/spec/support/fixtures.rb
+++ b/spec/support/fixtures.rb
@@ -6,9 +6,9 @@ # copy files to a temporary directory and use this directory as a
# fixtures directory, so were are sure that the fixtures are 'reset'.
def copy_fixtures_to_tmp
- FileUtils.rm_r "#{ETSource.root}/tmp/fixtures" , force: true
- FileUtils.mkdir "#{ETSource.root}/tmp/fixtures"
- FileUtils.cp_r "#{ETSource.root}/spec/fixtures", "#{ETSource.root}/tmp"
+ FileUtils.rm_r "#{ETSource.root}/tmp/fixtures" , force: true
+ FileUtils.mkdir_p "#{ETSource.root}/tmp/fixtures"
+ FileUtils.cp_r "#{ETSource.root}/spec/fixtures", "#{ETSource.root}/tmp"
end
# Stub out all the directories of classes that have a DIRECTORY constant
|
Create the tmp/ directory when running tests.
If there is no top-level tmp/ directory, the tests would fail when it
tried to create tmp/fixtures.
|
diff --git a/app/serializers/api/v1/ndc_sdg/target_serializer.rb b/app/serializers/api/v1/ndc_sdg/target_serializer.rb
index abc1234..def5678 100644
--- a/app/serializers/api/v1/ndc_sdg/target_serializer.rb
+++ b/app/serializers/api/v1/ndc_sdg/target_serializer.rb
@@ -4,6 +4,22 @@ class TargetSerializer < ActiveModel::Serializer
attribute :title
attribute :sectors
+ attribute :document_type
+ attribute :language
+
+ def first_ndc
+ ndc_targets = instance_options[:ndc_targets]
+ ndc_targets.find { |ndc_target| ndc_target.target_id == object.id }.
+ ndc
+ end
+
+ def document_type
+ first_ndc.document_type
+ end
+
+ def language
+ first_ndc.language
+ end
def sectors
ndc_targets = instance_options[:ndc_targets]
|
Return target document_type and language from the API
|
diff --git a/app/solidus_decorators/spree/line_item_decorator.rb b/app/solidus_decorators/spree/line_item_decorator.rb
index abc1234..def5678 100644
--- a/app/solidus_decorators/spree/line_item_decorator.rb
+++ b/app/solidus_decorators/spree/line_item_decorator.rb
@@ -2,7 +2,7 @@ after_commit :mailchimp_sync
def mailchimp_sync
- unless order.deleted?
+ if order && !order.destroyed?
# If a LineItem changes, tell the order to Sync for sure.
SolidusMailchimpSync::OrderSynchronizer.new(order).auto_sync(force: true)
end
|
Update order destroy check as order is not acts_as_paranoid
|
diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb
index abc1234..def5678 100644
--- a/spec/support/capybara.rb
+++ b/spec/support/capybara.rb
@@ -0,0 +1,23 @@+# Adds extra matchers for Capybara
+module Capybara::TestGroupHelpers
+ module FeatureHelpers
+ # Finds the given form with the given selector and target.
+ #
+ # @param selector [String|nil] The selector to find the form with.
+ def find_form(selector, action: nil)
+ attribute_selector =
+ if action
+ format('[action="%s"]', action)
+ else
+ ''.freeze
+ end
+
+ result = find('form' + attribute_selector)
+ selector ? result.find(selector) : result
+ end
+ end
+end
+
+RSpec.configure do |config|
+ config.include Capybara::TestGroupHelpers::FeatureHelpers, type: :feature
+end
|
Add a Capybara finder for forms.
|
diff --git a/spec/classes/ceph_rgw_keystone_auth_spec.rb b/spec/classes/ceph_rgw_keystone_auth_spec.rb
index abc1234..def5678 100644
--- a/spec/classes/ceph_rgw_keystone_auth_spec.rb
+++ b/spec/classes/ceph_rgw_keystone_auth_spec.rb
@@ -0,0 +1,56 @@+require 'spec_helper'
+
+describe 'ceph::rgw::keystone::auth' do
+
+ shared_examples 'ceph::rgw::keystone::auth' do
+ let :params do
+ {
+ :password => 'rgw_password',
+ :user => 'rgw_user',
+ :tenant => 'services'
+ }
+ end
+
+ it {
+ should contain_class('openstacklib::openstackclient')
+ should contain_keystone_service('swift::object-store').with(
+ :ensure => 'present',
+ :description => 'Ceph RGW Service',
+ )
+ should contain_keystone_endpoint('RegionOne/swift::object-store').with(
+ :ensure => 'present',
+ :public_url => 'http://127.0.0.1:8080/swift/v1',
+ :admin_url => 'http://127.0.0.1:8080/swift/v1',
+ :internal_url => 'http://127.0.0.1:8080/swift/v1',
+ )
+ should contain_keystone_user('rgw_user').with(
+ :ensure => 'present',
+ :password => 'rgw_password',
+ :email => 'rgwuser@localhost',
+ )
+ should contain_keystone_role('admin').with(
+ :ensure => 'present',
+ )
+ should contain_keystone_role('Member').with(
+ :ensure => 'present',
+ )
+ should contain_keystone_user_role('rgw_user@services').with(
+ :ensure => 'present',
+ :roles => ['admin', 'Member'],
+ )
+ }
+ end
+
+ on_supported_os({
+ :supported_os => OSDefaults.get_supported_os
+ }).each do |os,facts|
+ context "on #{os}" do
+ let (:facts) do
+ facts.merge!(OSDefaults.get_facts())
+ end
+
+ it_behaves_like 'ceph::rgw::keystone::auth'
+ end
+ end
+
+end
|
Add unit tests of ceph::rgw::keystone::auth
Change-Id: I9efcb0657fea134e423a5c95682f81ba9ffd78de
|
diff --git a/spec/features/collection_management_spec.rb b/spec/features/collection_management_spec.rb
index abc1234..def5678 100644
--- a/spec/features/collection_management_spec.rb
+++ b/spec/features/collection_management_spec.rb
@@ -0,0 +1,61 @@+require 'rails_helper'
+
+feature 'Collection management' do
+ let!(:user) { create(:person) }
+ let!(:collection) { create(:collection, user_id: user.id) }
+
+ background do
+ user.confirmed_at = Time.now
+ user.save
+ sign_in(user)
+ end
+
+ describe 'Createa an unshared collection' do
+
+ scenario 'create an unshared collection', js: true do
+
+ # press Collections button (on the left-side tree view)
+ find('div.take-ownership-btn').click
+
+ # press Add(plus) button to add collection
+ find('div.root-actions button:nth-child(2)').click
+
+ # input collection name
+ factory_collection_name = 'Hello Collection'
+ new_collection = find("div#collection-management-tab-pane-1 input[value='New Collection']:last-of-type")
+ new_collection.click
+ new_collection.set(factory_collection_name)
+
+ # press Update button to save
+ find('div.root-actions button:nth-child(1)').click
+
+ # except
+ expect(find('.tree-view', text: factory_collection_name).text).to eq(factory_collection_name)
+
+ end
+ end
+
+ describe 'Delete an unshared collection' do
+
+ scenario 'delete an unshared collection', js: true do
+ # byebug
+ # press Collections button (on the left-side tree view)
+ find('div.take-ownership-btn').click
+
+ factory_collection_name = collection.label
+
+ # except before deletion
+ expect(page).to have_content(factory_collection_name)
+
+ # press Delete button to delete the collection
+ find("div#collection-management-tab-pane-1 button[class='btn btn-xs btn-danger']:last-of-type").click
+
+ # press Update button to save
+ find('div.root-actions button:nth-child(1)').click
+
+ # except after deletion
+ expect(page).not_to have_content(factory_collection_name)
+
+ end
+ end
+end
|
Add Capybara spec for collection
Use Capybara to simulate user interaction with ELN application and do
a testing automation.
Create a collection_management_spec and add two scenarios, one is for
creating a collection and the other is for deleting a collection.
|
diff --git a/site-cookbooks/backup_restore/spec/recipes/default_spec.rb b/site-cookbooks/backup_restore/spec/recipes/default_spec.rb
index abc1234..def5678 100644
--- a/site-cookbooks/backup_restore/spec/recipes/default_spec.rb
+++ b/site-cookbooks/backup_restore/spec/recipes/default_spec.rb
@@ -1,6 +1,6 @@ require_relative '../spec_helper'
-describe 'backup_restore::setup' do
+describe 'backup_restore::default' do
let(:chef_run) do
ChefSpec::Runner.new(
cookbook_path: %w(site-cookbooks cookbooks),
|
Modify describe recipe, from setup to default
|
diff --git a/spree_contact_us.gemspec b/spree_contact_us.gemspec
index abc1234..def5678 100644
--- a/spree_contact_us.gemspec
+++ b/spree_contact_us.gemspec
@@ -1,4 +1,10 @@ # encoding: UTF-8
+
+if RUBY_VERSION =~ /1.9/
+ Encoding.default_external = Encoding::UTF_8
+ Encoding.default_internal = Encoding::UTF_8
+end
+
Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = 'spree_contact_us'
|
Fix encoding error in ruby 1.9.2
|
diff --git a/lib/capsule_crm/track.rb b/lib/capsule_crm/track.rb
index abc1234..def5678 100644
--- a/lib/capsule_crm/track.rb
+++ b/lib/capsule_crm/track.rb
@@ -20,5 +20,13 @@ has_many :cases
validates :id, numericality: { allow_blank: true }
+
+ def self.find(id)
+ all.select { |item| item.id == id }.first
+ end
+
+ def self.find_by_name(name)
+ all.select { |item| item.name == name }.first
+ end
end
end
|
Add find methods to Track class.
|
diff --git a/activesupport/lib/active_support/fork_tracker.rb b/activesupport/lib/active_support/fork_tracker.rb
index abc1234..def5678 100644
--- a/activesupport/lib/active_support/fork_tracker.rb
+++ b/activesupport/lib/active_support/fork_tracker.rb
@@ -20,7 +20,11 @@
module CoreExtPrivate
include CoreExt
- private :fork
+
+ private
+ def fork(*)
+ super
+ end
end
@pid = Process.pid
|
Fix ForkTracker on ruby <= 2.5.3
Making the fork method private by calling `private :fork` raises a
"no superclass method `fork'" error when calling super in a subclass on
ruby <= 2.5.3. The error doesn't occur on ruby 2.5.4 and higher.
Making the method private by redefining doesn't raise the error.
The possible fix on 2.5.4 is https://github.com/ruby/ruby/commit/75aba10d7ae24126b0f9aa561855020bdfcd8c9d
The error can be reproduced with the following script on ruby 2.5.3:
```
class Cluster
def start
fork { puts "forked!" }
end
end
module CoreExt
def fork(*)
super
end
end
module CoreExtPrivate
include CoreExt
private :fork
end
::Object.prepend(CoreExtPrivate)
Cluster.new.start
```
Fixes #40603
|
diff --git a/UrbandManager.podspec b/UrbandManager.podspec
index abc1234..def5678 100644
--- a/UrbandManager.podspec
+++ b/UrbandManager.podspec
@@ -1,7 +1,7 @@ Pod::Spec.new do |s|
# 1
s.name = 'UrbandManager'
- s.version = '0.0.2'
+ s.version = '0.0.3'
s.ios.deployment_target = '10.0'
s.summary = 'By far the most fantastic urband manager I have seen in my entire life. No joke.'
|
feat: Create new tag version to update the pod
|
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/search_controller.rb
+++ b/app/controllers/search_controller.rb
@@ -3,8 +3,6 @@ httpClient = HTTPClient.new
appid = ENV["APPID"]
afid = ENV["AFID"]
- appid = '1015756569079501204'
- afid = '131ebb35.37b19196.131ebb36.64da1433'
p appid
p afid
@jsonData = nil
|
Remove appid and afid literal
|
diff --git a/lib/tasks/temp/sync_effort_elapsed_times.rake b/lib/tasks/temp/sync_effort_elapsed_times.rake
index abc1234..def5678 100644
--- a/lib/tasks/temp/sync_effort_elapsed_times.rake
+++ b/lib/tasks/temp/sync_effort_elapsed_times.rake
@@ -18,6 +18,7 @@ starting_split_times.find_each do |sst|
progress_bar.increment!
sst.send(:sync_effort_elapsed_seconds)
+ sst.save!
rescue ActiveRecordError => e
puts "Could not initialize for effort #{sst.effort_id}:"
puts e
|
Fix bug in rake task
|
diff --git a/app/importers/rows/attendance_row.rb b/app/importers/rows/attendance_row.rb
index abc1234..def5678 100644
--- a/app/importers/rows/attendance_row.rb
+++ b/app/importers/rows/attendance_row.rb
@@ -8,11 +8,13 @@ class NullRelation
class NullEvent
def save!; end
+ def assign_attributes(_); end
end
def find_or_initialize_by(_)
NullEvent.new
end
+
end
def self.build(row)
@@ -20,15 +22,15 @@ end
def build
- attendance_event_class.find_or_initialize_by(
+ attendance_event = attendance_event_class.find_or_initialize_by(
occurred_at: row[:event_date]
)
- attendance_event_class.assign_attributes(
+ attendance_event.assign_attributes(
student: student
)
- attendance_event_class
+ attendance_event
end
private
|
Fix up attendance row import code with help from spec
+ Improve handling of non-absence, non-tardy rows
|
diff --git a/lib/middleman-minify-html/vendor/htmlcompressor-0.0.6/lib/htmlcompressor/rack.rb b/lib/middleman-minify-html/vendor/htmlcompressor-0.0.6/lib/htmlcompressor/rack.rb
index abc1234..def5678 100644
--- a/lib/middleman-minify-html/vendor/htmlcompressor-0.0.6/lib/htmlcompressor/rack.rb
+++ b/lib/middleman-minify-html/vendor/htmlcompressor-0.0.6/lib/htmlcompressor/rack.rb
@@ -43,7 +43,7 @@ end
content = @compressor.compress(content)
- headers['Content-Length'] = content.length.to_s if headers['Content-Length']
+ headers['Content-Length'] = content.bytesize.to_s if headers['Content-Length']
[status, headers, [content]]
else
|
Fix Content-Length computation mode to be based on bytes number rather than on characters number (which is not the same, e.g. with accented characters)
|
diff --git a/app/controllers/api/v1/technicians_controller.rb b/app/controllers/api/v1/technicians_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/api/v1/technicians_controller.rb
+++ b/app/controllers/api/v1/technicians_controller.rb
@@ -1,7 +1,48 @@ module Api
module V1
- class TechniciansController < ApplicationController
- respond_to :json
+ class TechniciansController < ApiApplicationController
+ before_action :set_technician, only: [ :technician_location ]
+ def index
+ respond_with Technician.all
+ end
+
+ def show
+ respond_with Technician.find(params[:id])
+ end
+
+ def create
+ respond_with Technician.create(technician_params)
+ end
+
+ def update
+ respond_with Technician.update(params[:id],location_params)
+ end
+
+ def destroy
+ respond_with Technician.destroy(params[:id])
+ end
+
+ def technician_location
+ if @technician.location != nil
+ respond_with @technician.location.to_json(only: [:id, :lat , :long] ) , status: :ok
+ else
+ respond_with @technician.errors, status: :not_found
+ end
+ end
+
+ private
+ # Use callbacks to share common setup or constraints between actions.
+ def set_technician
+ begin
+ @technician = Technician.find(params[:id])
+ rescue ActiveRecord::RecordNotFound
+ respond_with @technician , status: :not_found
+ end
+ end
+ # Never trust parameters from the scary internet, only allow the white list through.
+ def technician_params
+ params.require(:technician).permit(:name, :email, :password, :gcm_id, location_attributes: [:lat , :long])
+ end
end
end
end
|
Add API version for TechniciansController
|
diff --git a/app/controllers/companies/contacts_controller.rb b/app/controllers/companies/contacts_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/companies/contacts_controller.rb
+++ b/app/controllers/companies/contacts_controller.rb
@@ -9,4 +9,9 @@ return redirect_to companies_contact_path
end
end
+
+ protected
+ def permitted_params
+ params.permit({ company_contact: CompanyContact.attribute_names.map(&:to_sym) })
+ end
end
|
Add permitted_params to company contact
|
diff --git a/app/controllers/sapi_user/sessions_controller.rb b/app/controllers/sapi_user/sessions_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/sapi_user/sessions_controller.rb
+++ b/app/controllers/sapi_user/sessions_controller.rb
@@ -1,7 +1,17 @@ class SapiUser::SessionsController < ::Devise::SessionsController
+ before_action :is_authorised?, only: [:create]
+
def new
@email = params[:user]
@autofocus_email = !@email.present?
super
end
+
+ def is_authorised?
+ email = params[:sapi_user][:email]
+ user = Sapi::User.find_by_email(email)
+ if user && user.role != 'admin'
+ redirect_to new_sapi_user_session_path, flash: { alert: t('unauthorised') }
+ end
+ end
end
|
Check authorisation for sapi user
|
diff --git a/lib/gitlab/gon_helper.rb b/lib/gitlab/gon_helper.rb
index abc1234..def5678 100644
--- a/lib/gitlab/gon_helper.rb
+++ b/lib/gitlab/gon_helper.rb
@@ -6,6 +6,7 @@ gon.default_issues_tracker = Project.new.default_issue_tracker.to_param
gon.max_file_size = current_application_settings.max_attachment_size
gon.relative_url_root = Gitlab.config.gitlab.relative_url_root
+ gon.shortcuts_path = help_shortcuts_path
gon.user_color_scheme = Gitlab::ColorSchemes.for_user(current_user).css_class
if current_user
|
Add shortcut_path to GonHelper module
|
diff --git a/spec/serializers/mission_result_serializer_spec.rb b/spec/serializers/mission_result_serializer_spec.rb
index abc1234..def5678 100644
--- a/spec/serializers/mission_result_serializer_spec.rb
+++ b/spec/serializers/mission_result_serializer_spec.rb
@@ -1,9 +1,6 @@ require 'spec_helper'
-describe MissionResultSerializer, type: :controller do
-
- #include Warden::Test::Helpers
- #Warden.test_mode!
+describe MissionResultSerializer do
it "should include success" do
mission_result = FactoryGirl.build(:mission_result)
|
Clean mission result serializer spec
|
diff --git a/recipes/access_grants.rb b/recipes/access_grants.rb
index abc1234..def5678 100644
--- a/recipes/access_grants.rb
+++ b/recipes/access_grants.rb
@@ -20,3 +20,11 @@ action :nothing
subscribes :run, resources("template[/etc/mysql/grants.sql]"), :immediately
end
+
+# This rewind can come out after https://github.com/phlipper/chef-percona/issues/91
+# and/or https://github.com/phlipper/chef-percona/issues/67 is/are fixed.
+chef_gem "chef-rewind"
+require 'chef/rewind'
+rewind "execute[mysql-install-privileges]" do
+ command "mysql -p'" + passwords.root_password + "' -e '' &> /dev/null > /dev/null &> /dev/null ; if [ $? -eq 0 ] ; then /usr/bin/mysql -p'" + passwords.root_password + "' < /etc/mysql/grants.sql ; else /usr/bin/mysql < /etc/mysql/grants.sql ; fi ;"
+end
|
Add a rewind to fix access grants on first chef run when root password is set.
|
diff --git a/lib/railgun_content/resources_controller/page.rb b/lib/railgun_content/resources_controller/page.rb
index abc1234..def5678 100644
--- a/lib/railgun_content/resources_controller/page.rb
+++ b/lib/railgun_content/resources_controller/page.rb
@@ -5,8 +5,7 @@
def self.included(base)
base.instance_eval do
- include Railgun::Positionable
-
+
option :icon, "file"
actions :all, :except => [:show]
|
Remove positionable from here for now
Doesn't work - update_position route isn't added in the Positionable included callback
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.