diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/app/models/spree/bp_order_note.rb b/app/models/spree/bp_order_note.rb
index abc1234..def5678 100644
--- a/app/models/spree/bp_order_note.rb
+++ b/app/models/spree/bp_order_note.rb
@@ -19,7 +19,8 @@ private
def match_fields
{
- text: @order.note
+ text: @order.note,
+ isPublic: true
}
end
end
|
Add order note as public
|
diff --git a/metadata.rb b/metadata.rb
index abc1234..def5678 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -11,4 +11,4 @@
source_url 'https://github.com/chef-cookbooks/apparmor'
issues_url 'https://github.com/chef-cookbooks/apparmor/issues'
-chef_version '>= 12.7' if respond_to?(:chef_version)
+chef_version '>= 12.7'
|
Remove respond_to in the metaadata
Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
|
diff --git a/metadata.rb b/metadata.rb
index abc1234..def5678 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -1,11 +1,11 @@ name 'drone'
-maintainer 'Justin Campbell'
-maintainer_email 'justin@justincampbell.me'
+maintainer 'Jacob McCann'
+maintainer_email 'jmccann.git@gmail.com'
license 'Apache 2.0'
description 'Installs/Configures Drone'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-source_url 'https://github.com/justincampbell/chef-drone'
-issues_url 'https://github.com/justincampbell/chef-drone/issues'
+source_url 'https://github.com/jmccann/chef-drone'
+issues_url 'https://github.com/jmccann/chef-drone/issues'
version '1.0.0'
depends 'chef-vault', '~> 1.3'
|
Update git maintainer and source info
|
diff --git a/test/unit/image_test.rb b/test/unit/image_test.rb
index abc1234..def5678 100644
--- a/test/unit/image_test.rb
+++ b/test/unit/image_test.rb
@@ -13,7 +13,7 @@ end
def test_per_page
- assert_equal 18, Image.per_page(dialog = true)
+ assert_equal 12, Image.per_page(dialog = true)
assert_equal 20, Image.per_page # dialog = false
end
|
Fix image test for new number of items
|
diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb
index abc1234..def5678 100644
--- a/config/initializers/secret_token.rb
+++ b/config/initializers/secret_token.rb
@@ -4,4 +4,6 @@ # If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
-AsciiIo::Application.config.secret_token = 'e43ff30a45b7552eee8da56ec764006dd67ae894e8f2ac7a334feb00a9b0f606e5fae9ff5e01d4fcccb567ac0401437fe351b2ef2c6c62217b85a398bf883797'
+
+# set secret token from the config object and use a default one for development
+AsciiIo::Application.config.secret_token = CFG['SECRET_TOKEN'] || '21deaa1a1228e119434aa783ecb4af21be7513ff1f5b8c1d8894241e5fc70ad395db72c8c1b0508a0ebb994ed88a8d73f6c84e44f7a4bc554a40d77f9844d2f4'
|
Remove old exposed secret token and use the one from CFG
|
diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb
index abc1234..def5678 100644
--- a/config/initializers/secret_token.rb
+++ b/config/initializers/secret_token.rb
@@ -9,4 +9,5 @@
# Make sure your secret_key_base is kept private
# if you're sharing your code publicly.
-StarterKit::Application.config.secret_key_base = 'c4ae9ffbd76300d35947c3cd6dbab75947df833dd54511dfb0b83b5ce63335cbbeab6255d3b3775867f8d0e3b37728a14b18233c1bcb7ce2c6d8678666cc3cf0'
+StarterKit::Application.config.secret_key_base = ENV['SECRET_TOKEN'].presence ||
+ 'c4ae9ffbd76300d35947c3cd6dbab75947df833dd54511dfb0b83b5ce63335cbbeab6255d3b3775867f8d0e3b37728a14b18233c1bcb7ce2c6d8678666cc3cf0'
|
Add ENV config for secret token
|
diff --git a/recipes/mod_ssl.rb b/recipes/mod_ssl.rb
index abc1234..def5678 100644
--- a/recipes/mod_ssl.rb
+++ b/recipes/mod_ssl.rb
@@ -21,8 +21,6 @@ node.default['apache']['listen'] += ["*:#{node['apache']['mod_ssl']['port']}"]
end
-include_recipe 'apache2::default'
-
if platform_family?('rhel', 'fedora', 'suse', 'amazon')
package node['apache']['mod_ssl']['pkg_name'] do
notifies :run, 'execute[generate-module-list]', :immediately
|
Stop including the default recipe in the ssl recipe
|
diff --git a/api/config/routes.rb b/api/config/routes.rb
index abc1234..def5678 100644
--- a/api/config/routes.rb
+++ b/api/config/routes.rb
@@ -32,6 +32,7 @@ resources :payments do
member do
put :authorize
+ put :capture
put :purchase
put :void
put :credit
|
Add missing route to api payments capture
|
diff --git a/Casks/open-office.rb b/Casks/open-office.rb
index abc1234..def5678 100644
--- a/Casks/open-office.rb
+++ b/Casks/open-office.rb
@@ -0,0 +1,6 @@+class OpenOffice < Cask
+ url 'http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.1/Apache_OpenOffice_incubating_3.4.1_MacOS_x86_install_en-US.dmg/download'
+ homepage 'http://www.openoffice.org/'
+ version '3.4.1'
+end
+
|
Add cask for Open Office.
|
diff --git a/dalli.gemspec b/dalli.gemspec
index abc1234..def5678 100644
--- a/dalli.gemspec
+++ b/dalli.gemspec
@@ -15,6 +15,7 @@ "README.md",
"Rakefile",
"Gemfile",
+ "dalli.gemspec",
"Performance.md",
]
s.homepage = %q{http://github.com/mperham/dalli}
|
Include the gemspec in the gem itself for bundling purposes.
|
diff --git a/cookbooks/fateca/recipes/default.rb b/cookbooks/fateca/recipes/default.rb
index abc1234..def5678 100644
--- a/cookbooks/fateca/recipes/default.rb
+++ b/cookbooks/fateca/recipes/default.rb
@@ -35,5 +35,15 @@ file "#{new_resource.path}/current/app/Console/cake" do
mode '777'
end
+
+ # Creates tmp directory
+ %w[ /tmp /tmp/cache /tmp/cache/models /tmp/cache/persistent /tmp/cache/views
+ /tmp/logs /tmp/sessions /tmp/test ].each do |path|
+ directory "#{new_resource.path}/current/app" + path do
+ owner 'vagrant'
+ group 'vagrant'
+ mode '777'
+ end
+ end
end
end
|
Create tmp directory and its subdirectories
As the cakephp demands
|
diff --git a/hero_mapper/app/models/heroe.rb b/hero_mapper/app/models/heroe.rb
index abc1234..def5678 100644
--- a/hero_mapper/app/models/heroe.rb
+++ b/hero_mapper/app/models/heroe.rb
@@ -7,7 +7,7 @@ character_data = marvel_api_call['data']
if !character_data['results'].empty?
character_data['results'].each do |hero|
- character = Heroe.new( :name => hero['name'], :comics => hero['comics']['available'] )
+ character = Heroe.new( :name => hero['name'], :comics => hero['comics']['available'], :marvel_id => hero['id'] )
character.save
end
response_count = character_data['count']
|
Add marvel_id field when saving
|
diff --git a/jssignals-rails.gemspec b/jssignals-rails.gemspec
index abc1234..def5678 100644
--- a/jssignals-rails.gemspec
+++ b/jssignals-rails.gemspec
@@ -21,7 +21,6 @@ Dir["Gemfile"] +
Dir["jssignals-rails.gemspec"] +
Dir["LICENSE"] +
- Dir["Rakefile"] +
Dir["README.md"] +
Dir["**/*.js"] +
Dir["**/*.rb"]
|
Remove Rakefile from files to include
|
diff --git a/spec/default.mspec b/spec/default.mspec
index abc1234..def5678 100644
--- a/spec/default.mspec
+++ b/spec/default.mspec
@@ -4,11 +4,11 @@ set :ci_files, [
'spec/frozen/1.8/core',
'spec/frozen/1.8/language',
+ 'spec/core',
# These additional directories will be enabled as the
# specs in them are updated for the C++ VM.
# 'spec/compiler',
- # 'spec/core',
# 'spec/debugger',
# 'spec/subtend',
# 'spec/parser',
|
Enable running spec/core in CI set.
|
diff --git a/Formula/aws-vault.rb b/Formula/aws-vault.rb
index abc1234..def5678 100644
--- a/Formula/aws-vault.rb
+++ b/Formula/aws-vault.rb
@@ -20,8 +20,8 @@ system "go", "build", "-ldflags=#{flags}"
bin.install "aws-vault"
- zsh_completion.install "completions/zsh/_aws-vault"
- bash_completion.install "completions/bash/aws-vault"
+ zsh_completion.install "contrib/completions/zsh/aws-vault.zsh"
+ bash_completion.install "contrib/completions/bash/aws-vault.bash"
end
test do
|
Update path to shell completions
Closes #21050.
Signed-off-by: Issy Long <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@issyl0.co.uk>
|
diff --git a/Casks/amethyst.rb b/Casks/amethyst.rb
index abc1234..def5678 100644
--- a/Casks/amethyst.rb
+++ b/Casks/amethyst.rb
@@ -1,11 +1,11 @@ cask :v1 => 'amethyst' do
version '0.9.5'
- sha256 '7f346ab0f200d110a0bc058e7ab590bb7dc0a5353e67b3251b5b316c49b60c4f'
+ sha256 'c4e67df3e8c2c9e885f1b5d230d87462dcfc8a50a81cffc62d1096fda589d9a8'
url "https://ianyh.com/amethyst/versions/Amethyst-#{version}.zip"
name 'Amethyst'
appcast 'https://ianyh.com/amethyst/appcast.xml',
- :sha256 => '51b673f6806f2343074ff53aab83e3d4c74d23befccf3882c9db72679d1d8a1a'
+ :sha256 => '7256809d4b302019f17b91ba4209ba02cbd3450758a5d17f37aaf71aa2e50306'
homepage 'https://ianyh.com/amethyst'
license :mit
|
Update the hashes for Amethyst 0.9.5 again
The bundled app name was incorrect, so linking was not working correctly. Can
confirm that it installs correctly now.
|
diff --git a/Casks/dropzone.rb b/Casks/dropzone.rb
index abc1234..def5678 100644
--- a/Casks/dropzone.rb
+++ b/Casks/dropzone.rb
@@ -6,5 +6,5 @@ appcast 'https://aptonic.com/dropzone3/sparkle/updates.xml'
homepage 'https://aptonic.com'
- link 'Dropzone.app'
+ link 'Dropzone 3.app'
end
|
Fix Dropzone app name in the zip file. It changed from 'Dropzone' to 'Dropzone 3'.
|
diff --git a/Casks/smartgit.rb b/Casks/smartgit.rb
index abc1234..def5678 100644
--- a/Casks/smartgit.rb
+++ b/Casks/smartgit.rb
@@ -2,7 +2,7 @@ version '6.5.2'
sha256 '3fc0fd89e1e2b7e5aec5f12b8da2ae1da1d2a84d96ce335a62d922db1640b965'
- url "http://www.syntevo.com/download/smartgit/smartgit-macosx-#{version.gsub('.', '_')}.dmg"
+ url "http://www.syntevo.com/downloads/smartgit/smartgit-macosx-#{version.gsub('.', '_')}.dmg"
homepage 'http://www.syntevo.com/smartgit/'
license :commercial
|
Fix the download url of Smartgit
|
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 = "2.1.1"
+ spec.version = "2.1.2"
spec.summary = "Comfortable syntax for working with frames."
spec.homepage = "https://github.com/Otbivnoe/Framezilla"
|
Update pod version -> 2.1.2
|
diff --git a/lib/alf/rest/helpers.rb b/lib/alf/rest/helpers.rb
index abc1234..def5678 100644
--- a/lib/alf/rest/helpers.rb
+++ b/lib/alf/rest/helpers.rb
@@ -1,6 +1,7 @@ module Alf
module Rest
module Helpers
+ extend Forwardable
include Payload::Server
def alf_config
@@ -8,9 +9,24 @@ end
def alf_agent
- @alf_agent ||= Agent.new(self, alf_config)
+ @alf_agent ||= alf_config.agent_class.new(self, alf_config)
end
alias_method :agent, :alf_agent
+
+ def db_conn
+ alf_config.connection
+ end
+
+ def with_db_conn
+ yield(db_conn)
+ end
+
+ def_delegators :db_conn, :relvar,
+ :query,
+ :tuple_extract,
+ :assert!,
+ :fact!,
+ :deny!
end
end
|
Enhance Helpers with database-related methods.
|
diff --git a/lib/bundler/cli/list.rb b/lib/bundler/cli/list.rb
index abc1234..def5678 100644
--- a/lib/bundler/cli/list.rb
+++ b/lib/bundler/cli/list.rb
@@ -9,7 +9,7 @@ def run
specs = Bundler.load.specs.reject {|s| s.name == "bundler" }.sort_by(&:name)
- return Bundler.ui.error "The `--name-only` and `--paths` options cannot be used together" if @options["name-only"] && @options["paths"]
+ raise InvalidOption, "The `--name-only` and `--paths` options cannot be used together" if @options["name-only"] && @options["paths"]
return specs.each {|s| Bundler.ui.info s.name } if @options["name-only"]
return specs.each {|s| Bundler.ui.info s.full_gem_path } if @options["paths"]
|
[CLI::List] Raise when incompatible options are passed
|
diff --git a/lib/csv2avro/storage.rb b/lib/csv2avro/storage.rb
index abc1234..def5678 100644
--- a/lib/csv2avro/storage.rb
+++ b/lib/csv2avro/storage.rb
@@ -12,7 +12,7 @@ def read
case uri.scheme
when 's3'
- s3 = Aws::S3::Client.new(region: 'us-east-1')
+ s3 = Aws::S3::Client.new
resp = s3.get_object(bucket: uri.host, key: uri.path[1..-1])
resp.body.read
@@ -26,7 +26,7 @@ def write(io)
case uri.scheme
when 's3'
- s3 = Aws::S3::Client.new(region: 'us-east-1')
+ s3 = Aws::S3::Client.new
md5 = Digest::MD5.base64digest(io.string)
s3.put_object(bucket: uri.host, key: uri.path[1..-1], body: io, content_md5: md5)
when 'file'
|
Use the AWS_DEFAULT_REGION env variable
|
diff --git a/app/controllers/upsell_pages_controller.rb b/app/controllers/upsell_pages_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/upsell_pages_controller.rb
+++ b/app/controllers/upsell_pages_controller.rb
@@ -0,0 +1,17 @@+class UpsellPagesController < ApplicationController
+ before_filter :authenticate_user!
+ before_filter :get_club_and_upsell_page, :only => [ :edit, :update ]
+
+ def edit
+ authorize! :update, @upsell_page
+
+ render :text => '', :layout => "mercury"
+ end
+
+ private
+
+ def get_club_and_upsell_page
+ @club = Club.find params[:club_id]
+ @upsell_page = @club.upsell_page
+ end
+end
|
Add edit Action to UpsellPagesController
Update the UpsellPagesController to include an edit action.
|
diff --git a/misc/common.god b/misc/common.god
index abc1234..def5678 100644
--- a/misc/common.god
+++ b/misc/common.god
@@ -9,7 +9,7 @@ def watch_pione_webclient(additional_options="")
God.watch do |w|
w.name = "pione-webclient"
- w.start = "bundle exec pione-webclient %s" % additional_options
+ w.start = "ruby -I lib bin/pione-webclient %s" % additional_options
w.log = File.join(DIR, "pione-webclient-god.log")
w.dir = DIR
w.keepalive
|
Fix a bug of GOD script.
|
diff --git a/lib/rubocop/cop/metrics/method_length.rb b/lib/rubocop/cop/metrics/method_length.rb
index abc1234..def5678 100644
--- a/lib/rubocop/cop/metrics/method_length.rb
+++ b/lib/rubocop/cop/metrics/method_length.rb
@@ -23,9 +23,7 @@ def code_length(node)
lines = node.loc.expression.source.lines.to_a[1..-2] || []
- lines.reject! { |line| irrelevant_line(line) }
-
- lines.size
+ lines.count { |line| !irrelevant_line(line) }
end
end
end
|
Use count instead of reject!..size
|
diff --git a/lib/ruby/new_safe_navigation_operator.rb b/lib/ruby/new_safe_navigation_operator.rb
index abc1234..def5678 100644
--- a/lib/ruby/new_safe_navigation_operator.rb
+++ b/lib/ruby/new_safe_navigation_operator.rb
@@ -4,11 +4,11 @@
u && u.profile && u.profile.thumbnails && u.profiles.thumbnails.large
=>
- u.?profile.?thumbnails.?large
+ u&.profile&.thumbnails&.large
u.try!(:profile).try!(:thumbnails).try!(:large)
=>
- u.?profile.?thumbnails.?large
+ u&.profile&.thumbnails&.large
EOF
# Gem::Version initialize will strip RUBY_VERSION directly in ruby 1.9,
@@ -18,8 +18,8 @@ # u.try!(:profile).try!(:thumbnails).try!(:large)
# u.try(:profile).try(:thumbnails).try(:large)
# =>
- # u.?profile.?thumbnails.?large
- # u.?profile.?thumbnails.?large
+ # u&.profile&.thumbnails&.large
+ # u&.profile&.thumbnails&.large
%w(try! try).each do |message|
within_node type: 'send', message: message do
replace_with "{{receiver}}&.{{arguments.first.to_value}}"
|
Update comments to match new syntax already implemented.
|
diff --git a/test/integration_tests/standalone_spec.rb b/test/integration_tests/standalone_spec.rb
index abc1234..def5678 100644
--- a/test/integration_tests/standalone_spec.rb
+++ b/test/integration_tests/standalone_spec.rb
@@ -0,0 +1,73 @@+source_root = File.expand_path("../..", File.dirname(__FILE__))
+$LOAD_PATH.unshift("#{source_root}/lib")
+require 'phusion_passenger'
+PhusionPassenger.locate_directories
+
+ENV['PATH'] = "#{PhusionPassenger.bin_dir}:#{ENV['PATH']}"
+# This environment variable changes Passenger Standalone's behavior,
+# so ensure that it's not set.
+ENV.delete('PASSENGER_DEBUG')
+
+describe "Passenger Standalone" do
+ def capture_output(command)
+ output = `#{command}`.strip
+ if $?.exitstatus == 0
+ return output
+ else
+ abort "Command #{command} exited with status #{$?.exitstatus}"
+ end
+ end
+
+ specify "invoking 'passenger' without an argument is equivalent to 'passenger help'" do
+ output = capture_output("passenger")
+ output.should == capture_output("passenger help")
+ end
+
+ specify "'passenger --help' is equivalent to 'passenger help'" do
+ output = capture_output("passenger")
+ output.should == capture_output("passenger help")
+ end
+
+ specify "'passenger --version' displays the version number" do
+ output = capture_output("passenger --version")
+ output.should include("version #{PhusionPassenger::VERSION_STRING}\n")
+ end
+
+ describe "start command" do
+ context "if the runtime is not installed" do
+ context "when originally packaged" do
+ it "downloads the runtime from the Internet"
+ it "builds the runtime downloading fails"
+ it "aborts if runtime building fails"
+ end
+
+ context "when natively packaged" do
+ it "doesn't download the runtime from the Internet"
+ it "doesn't build the runtime"
+ it "aborts with an error"
+ end
+ end
+
+ context "if the runtime is installed" do
+ it "doesn't download the runtime from the Internet"
+ it "doesn't build the runtime"
+ end
+
+ it "starts a server which serves the application"
+ it "daemonizes if -d is given"
+ end
+
+ describe "stop command" do
+ # TODO
+ end
+
+ describe "status command" do
+ # TODO
+ end
+
+ describe "help command" do
+ it "displays the available commands" do
+ capture_output("passenger help").should include("Available commands:")
+ end
+ end
+end
|
Add basic tests for Passenger Standalone
|
diff --git a/script/base/modifier_or_file_creator.rb b/script/base/modifier_or_file_creator.rb
index abc1234..def5678 100644
--- a/script/base/modifier_or_file_creator.rb
+++ b/script/base/modifier_or_file_creator.rb
@@ -1,5 +1,6 @@ #! /bin/env ruby
+require File.dirname(__FILE__) + '/file_modifier'
require File.dirname(__FILE__) + '/stream_editor'
require File.dirname(__FILE__) + '/command_line_argument_parser'
|
Fix ModifierOrFileCreator to require 'file_modifier'
script/base/modifier_or_file_creator.rb
- Fix to require 'file_modifier'.
|
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb
index abc1234..def5678 100644
--- a/spec/helpers/application_helper_spec.rb
+++ b/spec/helpers/application_helper_spec.rb
@@ -5,22 +5,22 @@ describe "active_if" do
it "when controller matches" do
params[:controller] = "search"
- helper.active_if(:controller => "search").should == "active"
+ helper.active_if(:controller => ["search"]).should == "active"
end
it "when controller does not match" do
params[:controller] = "search"
- helper.active_if(:controller => "not_search").should == ""
+ helper.active_if(:controller => ["not_search"]).should == ""
end
it "when action matches" do
params[:action] = "index"
- helper.active_if(:action => "index").should == "active"
+ helper.active_if(:action => ["index"]).should == "active"
end
it "when action does not match" do
params[:action] = "index"
- helper.active_if(:action => "not_index").should == ""
+ helper.active_if(:action => ["not_index"]).should == ""
end
end
|
Correct specs for active_if (use arrays)
|
diff --git a/test/encrypt_test.rb b/test/encrypt_test.rb
index abc1234..def5678 100644
--- a/test/encrypt_test.rb
+++ b/test/encrypt_test.rb
@@ -12,6 +12,10 @@ it 'encrypts' do
assert @encrypted != 'sekret'
end
+
+ it 'does not decrypt with incorrect key' do
+ refute_equal 'sekret', @encrypted.decrypt('password')
+ end
it 'decrypts' do
assert_equal 'sekret', @encrypted.decrypt('passw0rd')
|
Add a test for incorrect key.
|
diff --git a/config/schedule.rb b/config/schedule.rb
index abc1234..def5678 100644
--- a/config/schedule.rb
+++ b/config/schedule.rb
@@ -1,8 +1,12 @@+set :output, File.expand_path("#{File.dirname __FILE__}/../log/cron_log.log")
+
# All scheduled tasks need to run with a advisory_lock
# To prevent two processes running them concurrently
# User.with_advisory_lock('name', 0) { block }
-every 5.minutes do
+# Do not run jobs with the same offset
+
+every 7.minutes do
runner "User.with_advisory_lock('email_notification', 0) { Notifiers::EmailNotificationService.run }"
end
|
Change offsets of cron jobs and log output
closes #456
|
diff --git a/BRJPopoverPicker.podspec b/BRJPopoverPicker.podspec
index abc1234..def5678 100644
--- a/BRJPopoverPicker.podspec
+++ b/BRJPopoverPicker.podspec
@@ -5,7 +5,7 @@
s.homepage = "https://github.com/benrobjoh/BRJPopoverPicker"
s.license = 'MIT'
- s.author = { "Ben Johnson" => "ben@benrobjoh.com" }
+ s.author = { "Ben Johnson" => "code@benrobjoh.com" }
s.source = { :git => "https://github.com/benrobjoh/BRJPopoverPicker.git", :tag => s.version.to_s }
s.platform = :ios, '7.0'
|
Update email address in .podspec
|
diff --git a/openfortivpn.rb b/openfortivpn.rb
index abc1234..def5678 100644
--- a/openfortivpn.rb
+++ b/openfortivpn.rb
@@ -1,16 +1,15 @@ class Openfortivpn < Formula
desc "Client for PPP+SSL Fortinet VPN tunnel services."
- homepage "https://github.com/fretn/openfortivpn"
- url "https://github.com/fretn/openfortivpn.git"
- version "1.1.3"
+ homepage "https://github.com/adrienverge/openfortivpn"
+ head "https://github.com/adrienverge/openfortivpn.git"
depends_on "automake" => :build
depends_on "autoconf" => :build
- depends_on "openssl"
+ depends_on "openssl@1.1"
def install
- openssl = Formulary.factory 'openssl'
+ openssl = Formulary.factory 'openssl@1.1'
ENV['CFLAGS'] = "-I#{openssl}/include"
system "autoreconf 2> /dev/null; true"
system "automake", "--add-missing"
|
Use official project now that macOS support has been merged
|
diff --git a/etc/deploy/deploy.rb b/etc/deploy/deploy.rb
index abc1234..def5678 100644
--- a/etc/deploy/deploy.rb
+++ b/etc/deploy/deploy.rb
@@ -31,7 +31,6 @@ namespace :deploy do
after :starting, "composer:install_executable"
after :updated, "deploy:assets:upload"
- after :updated, "symfony:assets:install"
end
|
Remove manual asset install: done as part of composer install
|
diff --git a/CVCalendar.podspec b/CVCalendar.podspec
index abc1234..def5678 100644
--- a/CVCalendar.podspec
+++ b/CVCalendar.podspec
@@ -1,7 +1,7 @@ Pod::Spec.new do |s|
s.name = "CVCalendar"
-s.version = "1.2.6"
+s.version = "1.2.8"
s.summary = "A custom visual calendar for iOS 8+ written in Swift (2.0)."
s.homepage = "https://github.com/Mozharovsky/CVCalendar"
s.screenshot = "https://raw.githubusercontent.com/Mozharovsky/CVCalendar/master/Screenshots/CVCalendar_White.png"
|
Update Podspec for new release
|
diff --git a/Casks/mailplane.rb b/Casks/mailplane.rb
index abc1234..def5678 100644
--- a/Casks/mailplane.rb
+++ b/Casks/mailplane.rb
@@ -5,9 +5,13 @@ url 'http://update.mailplaneapp.com/mailplane_3.php'
name 'Mailplane'
homepage 'http://mailplaneapp.com'
- license :unknown # todo: change license and remove this comment; ':unknown' is a machine-generated placeholder
+ license :commercial
app 'Mailplane 3.app'
+ postflight do
+ suppress_move_to_applications
+ end
+
zap :delete => '~/Library/Preferences/com.mailplaneapp.Mailplane.plist'
end
|
Mailplane: Add suppress_move_to_applications postflight and license info
|
diff --git a/lib/filerary/command.rb b/lib/filerary/command.rb
index abc1234..def5678 100644
--- a/lib/filerary/command.rb
+++ b/lib/filerary/command.rb
@@ -29,7 +29,7 @@ begin
puts Filerary::Librarian.new.show(path)
rescue ArgumentError => e
- puts "#{e.class}: #{e.message}: #{path}"
+ STDERR.puts "#{e.class}: #{e.message}: #{path}"
end
end
@@ -43,7 +43,7 @@ begin
Filerary::Librarian.new.remove(path)
rescue ArgumentError => e
- puts "#{e.class}: #{e.message}: #{path}"
+ STDERR.puts "#{e.class}: #{e.message}: #{path}"
end
end
|
Use STDERR for an error message printing
|
diff --git a/lib/html_massage/cli.rb b/lib/html_massage/cli.rb
index abc1234..def5678 100644
--- a/lib/html_massage/cli.rb
+++ b/lib/html_massage/cli.rb
@@ -6,6 +6,8 @@ module HtmlMassager
class CLI < Thor
+
+ MOBILE_USER_AGENT = "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19"
desc :html, 'Download HTML from given URL and massage into html'
def html url
@@ -25,7 +27,7 @@ no_tasks do
def massage_to output_format, url
HtmlMassage.send output_format,
- RestClient.get(url),
+ RestClient.get(url, :user_agent => MOBILE_USER_AGENT),
:source_url => url,
:links => :absolute,
:images => :absolute
|
Use a mobile user-agent string; allows google docs among others
|
diff --git a/lib/ice_nine/freezer.rb b/lib/ice_nine/freezer.rb
index abc1234..def5678 100644
--- a/lib/ice_nine/freezer.rb
+++ b/lib/ice_nine/freezer.rb
@@ -10,6 +10,9 @@ SKIP_ANCESTORS = (RUBY_VERSION < '1.9' ? [] : [ false ]).freeze
# Lookup the Freezer subclass by object type
+ #
+ # @example
+ # freezer_class = IceNine::Freezer[mod]
#
# @param [Module] mod
#
|
Add YARD example for public API method
|
diff --git a/Casks/opera-developer.rb b/Casks/opera-developer.rb
index abc1234..def5678 100644
--- a/Casks/opera-developer.rb
+++ b/Casks/opera-developer.rb
@@ -1,6 +1,6 @@ cask :v1 => 'opera-developer' do
- version '30.0.1835.5'
- sha256 'f4a8cd8860ac2836b420b9f0456b50629759465eba91bf472a30d529815ba0fa'
+ version '31.0.1857.0'
+ sha256 '5cc4e281b9eefa679640acdbc7cf1a928c5758c3a1e2984acb5a682bd591952b'
url "http://get.geo.opera.com/pub/opera-developer/#{version}/mac/Opera_Developer_#{version}_Setup.dmg"
homepage 'http://www.opera.com/developer'
|
Upgrade Opera Developer.app to v31.0.1857.0
|
diff --git a/lib/minitest/context.rb b/lib/minitest/context.rb
index abc1234..def5678 100644
--- a/lib/minitest/context.rb
+++ b/lib/minitest/context.rb
@@ -30,7 +30,7 @@ #
def define name, &block
raise ArgumentError, "Block expected." unless block_given?
- @list ||= Hash.new { |h,k| h[k] = [] }
+ @list = @list || Hash.new { |h,k| h[k] = [] }
@list[name] << block
end
|
Replace ||= operator with "variable = variable || {}".
|
diff --git a/test/integration/manual_run_test.rb b/test/integration/manual_run_test.rb
index abc1234..def5678 100644
--- a/test/integration/manual_run_test.rb
+++ b/test/integration/manual_run_test.rb
@@ -0,0 +1,11 @@+require 'test_helper'
+
+class ManualRunTest< ActionDispatch::IntegrationTest
+ def test_running_commits_manually
+ @repo = create(:repo)
+
+ ManualRunner.any_instance.expects(:run_last).with(100)
+
+ post(admin_repo_run_path(@repo.name), params: { count: 100 })
+ end
+end
|
Add manual run integration test
|
diff --git a/tests/test_command_matcher_place.rb b/tests/test_command_matcher_place.rb
index abc1234..def5678 100644
--- a/tests/test_command_matcher_place.rb
+++ b/tests/test_command_matcher_place.rb
@@ -21,4 +21,34 @@ 'PLACE 0,NORTH'
]
end
+
+ def test_that_response_args_know_x
+ assert_equal 123,
+ @object.build_with_match('PLACE 123,0,NORTH').args.x
+ end
+
+ def test_that_response_args_know_y
+ assert_equal 123,
+ @object.build_with_match('PLACE 0,123,NORTH').args.y
+ end
+
+ def test_that_response_args_knows_north_orientation
+ assert_equal Pose::Orientation::NORTH,
+ @object.build_with_match('PLACE 0,123,NORTH').args.orientation
+ end
+
+ def test_that_response_args_knows_south_orientation
+ assert_equal Pose::Orientation::SOUTH,
+ @object.build_with_match('PLACE 0,123,SOUTH').args.orientation
+ end
+
+ def test_that_response_args_knows_east_orientation
+ assert_equal Pose::Orientation::EAST,
+ @object.build_with_match('PLACE 0,123,EAST').args.orientation
+ end
+
+ def test_that_response_args_knows_west_orientation
+ assert_equal Pose::Orientation::WEST,
+ @object.build_with_match('PLACE 0,123,WEST').args.orientation
+ end
end
|
Add tests for response in CommandMatcherPlace build_with_match()
Now tests that knows how to build a response with 'x', 'y' and all
four cardinal orientations.
|
diff --git a/lib/bootstrap-navbar/helpers.rb b/lib/bootstrap-navbar/helpers.rb
index abc1234..def5678 100644
--- a/lib/bootstrap-navbar/helpers.rb
+++ b/lib/bootstrap-navbar/helpers.rb
@@ -1,5 +1,6 @@ module BootstrapNavbar::Helpers
def self.included(base)
+ raise 'Bootstrap version is not configured.' if BootstrapNavbar.configuration.bootstrap_version.nil?
helper_version = BootstrapNavbar.configuration.bootstrap_version[0]
base.send :include, const_get("Bootstrap#{helper_version}")
end
|
Raise error when Bootstrap version is not configured
|
diff --git a/app/models/meal.rb b/app/models/meal.rb
index abc1234..def5678 100644
--- a/app/models/meal.rb
+++ b/app/models/meal.rb
@@ -2,7 +2,8 @@ attr_accessible :date, :calories, :carbohydrates, :fat, :protein, :description
validates_presence_of :date, :calories
- validates_numericality_of :calories, :carbohydrates, :fat, :protein
+ validates_numericality_of :calories
+ validates_numericality_of :carbohydrates, :fat, :protein, allow_nil: true
belongs_to :user
|
Allow nil on numericality check fields
|
diff --git a/app/models/repo.rb b/app/models/repo.rb
index abc1234..def5678 100644
--- a/app/models/repo.rb
+++ b/app/models/repo.rb
@@ -1,6 +1,7 @@ # A GitHub project and its data
class Repo
- include ValueObject.new(*%i(
+ include Entity.new(:full_name)
+ attr_accessor(*%i(
author_commit_count_this_year
created_at
description
|
Convert Repo to an Entity object
This will allow it to:
* be built up over time as we pull API data
* be equal with other Repo objects that are more or less filled out
This means that Portfolio, a value object, breaks the rule by referencing a mutable
object, but since each Repo is mutated only in FetchDataWorker while it is being
built, it can act to Portfolio as if it is immutable.
|
diff --git a/app/models/user.rb b/app/models/user.rb
index abc1234..def5678 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -4,11 +4,11 @@ has_many :addresses, :as => :addressable
validates_presence_of :first_name, :last_name
- file_column :photo, :magick => {
- :versions => {
- :thumb => {:size => "40x40"}
- }
- }
+ file_column :photo#, :magick => {
+ # :versions => {
+ # :thumb => {:size => "40x40"}
+ # }
+ # }
def name
last_name.nil? ? first_name : first_name + " " + last_name
|
Include fille_column and bridge in externals. Comment out the :magick hash so the RMagick is an optional dependency.
git-svn-id: b6390d97d9ded5bc793696aad9e4256efc0f90b3@579 561dde7e-7729-0410-be8e-ef83869d6c7d
|
diff --git a/Library/Formula/aria2.rb b/Library/Formula/aria2.rb
index abc1234..def5678 100644
--- a/Library/Formula/aria2.rb
+++ b/Library/Formula/aria2.rb
@@ -1,11 +1,12 @@ require 'formula'
class Aria2 <Formula
- @url='http://downloads.sourceforge.net/project/aria2/stable/latest/aria2-1.8.0.tar.bz2'
- @homepage='http://aria2.sourceforge.net/'
- @md5='13944c95529de6846f0ab9ba09c53e3e'
+ url 'http://downloads.sourceforge.net/project/aria2/stable/latest/aria2-1.8.2.tar.bz2'
+ md5 'ec72262dbe4b4091dfe29d08f8e4d097'
+ homepage 'http://aria2.sourceforge.net/'
def install
+ ENV.gcc_4_2 # 1.8.2 didn't work w/ LLVM on 10.6
system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
system "make install"
end
|
Update Aria2 to 1.8.2; use GCC.
|
diff --git a/lib/pronto/rugged/diff/delta.rb b/lib/pronto/rugged/diff/delta.rb
index abc1234..def5678 100644
--- a/lib/pronto/rugged/diff/delta.rb
+++ b/lib/pronto/rugged/diff/delta.rb
@@ -1,3 +1,5 @@+require 'pathname'
+
module Rugged
class Diff
class Delta
|
Add require of pathname to Rugged::Diff::Delta
|
diff --git a/lib/tasks/taxonomy_metrics.rake b/lib/tasks/taxonomy_metrics.rake
index abc1234..def5678 100644
--- a/lib/tasks/taxonomy_metrics.rake
+++ b/lib/tasks/taxonomy_metrics.rake
@@ -6,5 +6,9 @@ m.count_content_per_level
m.average_tagging_depth
end
+
+ task record_content_coverage_metrics: :environment do
+ Metrics::ContentCoverageMetrics.new.record_all
+ end
end
end
|
Add a rake task to record the content coverage metrics
|
diff --git a/lib/token_auth/authenticator.rb b/lib/token_auth/authenticator.rb
index abc1234..def5678 100644
--- a/lib/token_auth/authenticator.rb
+++ b/lib/token_auth/authenticator.rb
@@ -3,27 +3,34 @@ extend ActiveSupport::Concern
included do
- private :authenticate_entity_by_token!
+ private :authenticate_entity_by_token
+ private :ensure_entity_authenticated!
end
- def authenticate_entity_by_token!(authenticable_class)
+ def authenticate_entity_by_token(authenticable_class)
@current_entity ||= authenticate_with_http_token do |token, options|
authenticable_class.find_by_authentication_token(token)
end
+ end
+ def ensure_entity_authenticated!
raise Unauthorized unless @current_entity.present?
end
-
module ClassMethods
def acts_as_token_authenticator_for(authenticable_class, options = {})
authenticable_class_underscored = authenticable_class.name.parameterize.singularize.underscore
- before_filter :"authenticate_#{authenticable_class_underscored}_by_token!"
+ before_filter :"authenticate_#{authenticable_class_underscored}_by_token"
+ before_filter :"ensure_#{authenticable_class_underscored}_authenticated!"
class_eval <<-AUTHENTICATOR, __FILE__, __LINE__ + 1
- def authenticate_#{authenticable_class_underscored}_by_token!
- authenticate_entity_by_token!(#{authenticable_class})
+ def authenticate_#{authenticable_class_underscored}_by_token
+ authenticate_entity_by_token(#{authenticable_class})
+ end
+
+ def ensure_#{authenticable_class_underscored}_authenticated!
+ ensure_entity_authenticated!
end
AUTHENTICATOR
end
|
Add before filter that raises an exception if user is unauthenticated.
|
diff --git a/recipes/test.rb b/recipes/test.rb
index abc1234..def5678 100644
--- a/recipes/test.rb
+++ b/recipes/test.rb
@@ -26,5 +26,5 @@
puts rightscale.to_yaml
EOH
- only_if node['right_api_client']['test']
+ only_if { node['right_api_client']['test'] }
end
|
Add missing curl braces encapsulation with only_if option.
|
diff --git a/app/models/action.rb b/app/models/action.rb
index abc1234..def5678 100644
--- a/app/models/action.rb
+++ b/app/models/action.rb
@@ -16,17 +16,17 @@ def friendly_description
case request_type
when CREATED
- "#{edition.container.class} created by #{requester.name}."
+ "#{edition.container.class} created by #{requester.name}"
when NEW_VERSION
- "New version \"#{edition.title}\" created by #{requester.name}."
+ "New version \"#{edition.title}\" created by #{requester.name}"
when REVIEW_REQUESTED
- "A review and publish was requested by #{requester.name}."
+ "A review and publish was requested by #{requester.name}"
when REVIEWED
- "Reviewed by #{requester.name}. Not OK'd for publication."
+ "Reviewed by #{requester.name}. Not OK'd for publication"
when OKAYED
- "OK'd for publication by #{requester.name}."
+ "OK'd for publication by #{requester.name}"
when PUBLISHED
- "Published."
+ "Published"
end
end
|
Stop the extra full stop appearing in emails:
http://craig-01.vm.xeriom.net/~craig/screenies/annoying-full-stop-20110915-115319.jpg
|
diff --git a/app/models/mailer.rb b/app/models/mailer.rb
index abc1234..def5678 100644
--- a/app/models/mailer.rb
+++ b/app/models/mailer.rb
@@ -4,7 +4,8 @@
def twitter_invite(congress_person, args = {})
recipients congress_person.email_address
- from args[:from]
+ from "noreply@localpolitics.in"
+ reply_to args[:citizen_email]
subject args[:subject]
citizen_name = args[:citizen_name] || "A citizen"
body :congress_person => congress_person, :personal_message => args[:personal_message], :citizen_name => citizen_name, :invitation_text => Tweet.invitation_text
|
Correct return address for twitter invite
|
diff --git a/rhubarb.gemspec b/rhubarb.gemspec
index abc1234..def5678 100644
--- a/rhubarb.gemspec
+++ b/rhubarb.gemspec
@@ -1,4 +1,5 @@ require File.expand_path('lib/rhubarb/version', File.dirname(__FILE__))
+require 'rake'
Gem::Specification.new do |s|
s.name = %q{rhubarb}
@@ -6,13 +7,15 @@ s.authors = ["Dan Swain"]
s.date = Time.now.utc.strftime("%Y-%m-%d")
s.email = %q{dan.t.swain@gmail.com}
- s.files = `git ls-files`.split("\n")
+ s.files = FileList['lib/**/*.rb', 'bin/*', '[A-Za-z]*',
+ 'spec/**/*',
+ 'clients/*'].to_a
s.homepage = %q{http://github.com/dantswain/rhubarb}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.8.11}
s.summary = %q{A lightweight and extensible IPC server}
- s.test_files = `git ls-files spec examples`.split("\n")
+ s.test_files = FileList['spec/**/*'].to_a
# tests
s.add_development_dependency 'rspec'
end
|
Switch to using rake to determine gemspec files - git ls-files not well-supported on windows.
|
diff --git a/app/admin/message.rb b/app/admin/message.rb
index abc1234..def5678 100644
--- a/app/admin/message.rb
+++ b/app/admin/message.rb
@@ -0,0 +1,17 @@+ActiveAdmin.register Message do
+
+# See permitted parameters documentation:
+# https://github.com/activeadmin/activeadmin/blob/master/docs/2-resource-customization.md#setting-up-strong-parameters
+#
+# permit_params :list, :of, :attributes, :on, :model
+#
+# or
+#
+# permit_params do
+# permitted = [:permitted, :attributes]
+# permitted << :other if params[:action] == 'create' && current_user.admin?
+# permitted
+# end
+
+
+end
|
Add model Message for Admin
|
diff --git a/spec/controllers/sessions_controller_spec.rb b/spec/controllers/sessions_controller_spec.rb
index abc1234..def5678 100644
--- a/spec/controllers/sessions_controller_spec.rb
+++ b/spec/controllers/sessions_controller_spec.rb
@@ -0,0 +1,29 @@+require 'spec_helper'
+
+describe SessionsController do
+ before(:each) do
+ @request.env["devise.mapping"] = Devise.mappings[:user]
+ end
+
+ it "Signs in a user" do
+ User.make!(email: 'user@example.com', password: '654321', password_confirmation: '654321')
+
+ post :create, user: { email: 'user@example.com', password: '654321' }
+
+ response.should redirect_to admin_root_path
+ end
+
+ it "signs in a representatie" do
+ Representative.make!(:attending, email: 'representative@example.com', password: '123456', password_confirmation: '123456')
+
+ post :create, user: { email: 'representative@example.com', password: '123456' }
+
+ response.should redirect_to representative_root_path
+ end
+
+ it "doesn't sign in some random dude" do
+ post :create, user: { email: 'random@haker.com', password: '13377331' }
+
+ response.should redirect_to new_user_session_path
+ end
+end
|
Add spec for sessions controller
|
diff --git a/spec/integration/admin/authorization_spec.rb b/spec/integration/admin/authorization_spec.rb
index abc1234..def5678 100644
--- a/spec/integration/admin/authorization_spec.rb
+++ b/spec/integration/admin/authorization_spec.rb
@@ -6,7 +6,7 @@ end
def assert_denied_access
- visit "/context/admin"
+ visit context_admin_root_path
assert_seen("You must be an admin to access that area.")
page.current_url.should eql("http://www.example.com/")
end
|
Switch to using URL helper rather than hardcoded path
|
diff --git a/bluepotion.gemspec b/bluepotion.gemspec
index abc1234..def5678 100644
--- a/bluepotion.gemspec
+++ b/bluepotion.gemspec
@@ -14,6 +14,7 @@ files = []
files << 'README.md'
files.concat(Dir.glob('lib/**/*.rb'))
+ files.concat(Dir.glob('lib/**/*.java'))
files.concat(Dir.glob('templates/**/*.rb'))
spec.files = files
|
Include .java files in the gemspec
|
diff --git a/test/integration/authentication_test.rb b/test/integration/authentication_test.rb
index abc1234..def5678 100644
--- a/test/integration/authentication_test.rb
+++ b/test/integration/authentication_test.rb
@@ -3,6 +3,7 @@ class AuthenticationTest < ActionDispatch::IntegrationTest
setup do
+ User.delete_all
ENV['GDS_SSO_MOCK_INVALID'] = '1'
end
|
Fix test failure due to test interference
The test interference is due to some users existing in the test database
which were created by previous tests. The existence of users in the
database allows the 'mock' authentication strategy to succeed (which
logs in the first user in the DB).
This is a hacky fix, I think that the correct fix would be to change the
logic around GDS_SSO_MOCK_INVALID in the GDS-SSO gem. However, I'm not
confident about the intention/usage of this flag.
|
diff --git a/event_store-client-http.gemspec b/event_store-client-http.gemspec
index abc1234..def5678 100644
--- a/event_store-client-http.gemspec
+++ b/event_store-client-http.gemspec
@@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = 'event_store-client-http'
- s.version = '0.0.4.1'
+ s.version = '0.0.4.2'
s.summary = 'HTTP Client for EventStore'
s.description = ' '
|
Package version is increased from 0.0.4.1 to 0.0.4.2
|
diff --git a/event_store-client-http.gemspec b/event_store-client-http.gemspec
index abc1234..def5678 100644
--- a/event_store-client-http.gemspec
+++ b/event_store-client-http.gemspec
@@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = 'event_store-client-http'
- s.version = '0.3.3'
+ s.version = '0.3.4'
s.summary = 'HTTP Client for EventStore'
s.description = ' '
|
Package version is increased from 0.3.3 to 0.3.4
|
diff --git a/Casks/kensington-trackball-works.rb b/Casks/kensington-trackball-works.rb
index abc1234..def5678 100644
--- a/Casks/kensington-trackball-works.rb
+++ b/Casks/kensington-trackball-works.rb
@@ -0,0 +1,16 @@+class KensingtonTrackballWorks < Cask
+ version '1.1.2'
+ sha256 '02e3fed2fe01c234206d3fcf2c85f71f10aa2a3bc3d3dd6f4694ac41b725e3df'
+
+ url 'http://accoblobstorageus.blob.core.windows.net/software/38c5e777-b2ef-4434-8091-6290cb41fc16.dmg'
+ homepage 'http://www.kensington.com/'
+
+ install 'Kensington TrackballWorks.pkg'
+ uninstall :pkgutil => 'com.kensington.trackballworks.driver.installer',
+ :kext => 'com.kensington.trackballworks.driver',
+ :launchctl => [
+ 'com.kensington.slimblade.agent',
+ 'com.kensington.slimblade.guiagent.plist',
+ ],
+ :quit => 'com.kensington.trackballworks.helper'
+end
|
Add Kensington TrackballWorks for Mac 1.1.2
|
diff --git a/libraries/etcd_service_manager_docker.rb b/libraries/etcd_service_manager_docker.rb
index abc1234..def5678 100644
--- a/libraries/etcd_service_manager_docker.rb
+++ b/libraries/etcd_service_manager_docker.rb
@@ -13,7 +13,7 @@ docker_container new_resource.container_name do
repo new_resource.repo
tag new_resource.tag
- command etcd_daemon_opts.join(' ').strip
+ command "etcd #{etcd_daemon_opts.join(' ').strip}"
port new_resource.port
network_mode new_resource.network_mode
action :run
|
Fix the etcd command to include the binary name in etcd_service_manage_docker
Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
|
diff --git a/brightbox-gemspec.rb b/brightbox-gemspec.rb
index abc1234..def5678 100644
--- a/brightbox-gemspec.rb
+++ b/brightbox-gemspec.rb
@@ -13,7 +13,7 @@ s.files = FileList["LICENSE", "Rakefile", "*.rb", "bin/brightbox-*","{lib,spec}/**/*.rb"].exclude(/recipe/).to_a
s.add_dependency("ini", ">=0.1.1")
s.summary = "Brightbox Server configuration scripts"
- s.executables = FileList["bin/brightbox-*"].map { |filename| File.basename(filename) }
+ s.executables = FileList["bin/brightbox-*"].sub(/bin\//,'')
end
@client = Gem::Specification.new do |s|
|
Simplify executable line in gemspec
git-svn-id: f394a798e8d9c38072dcc4d4f52f30e4f7567160@59 f14820b4-53c2-4c7b-be4b-41e81b371297
|
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,10 +1,10 @@+# For Code Coverage at coveralls.io
+require 'coveralls'
+Coveralls.wear!('rails')
+
ENV["RAILS_ENV"] ||= "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
-
-# For Code Coverage at coveralls.io
-require 'coveralls'
-Coveralls.wear!('rails')
class ActiveSupport::TestCase
ActiveRecord::Migration.check_pending!
|
Move Coveralls.io code to very top of test spec
|
diff --git a/admin_view.gemspec b/admin_view.gemspec
index abc1234..def5678 100644
--- a/admin_view.gemspec
+++ b/admin_view.gemspec
@@ -6,11 +6,11 @@ s.name = "admin_view"
s.version = AdminView::VERSION
s.platform = Gem::Platform::RUBY
- s.authors = ["RT"]
- s.email = ["devs@"]
- s.homepage = ""
- s.summary = %q{Admin view}
- s.description = %q{admin view}
+ s.authors = ["Marko Anastasov", "Darko Fabijan"]
+ s.email = ["devs@renderedtext.com"]
+ s.homepage = "http://github.com/renderedtext/admin_view"
+ s.summary = %q{Rails 3 generator of admin views and controllers for existing models.}
+ s.description = %q{Rails 3 generator of admin views and controllers for existing models.}
s.rubyforge_project = "admin_view"
@@ -18,4 +18,8 @@ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
+
+ s.add_dependency("rspec-rails", ">= 2.0.0")
+ s.add_dependency("meta_search")
+ s.add_dependency("will_paginate", "~> 3.0.pre2")
end
|
Change gemspec info and add dependencies.
|
diff --git a/Library/Homebrew/formula_support.rb b/Library/Homebrew/formula_support.rb
index abc1234..def5678 100644
--- a/Library/Homebrew/formula_support.rb
+++ b/Library/Homebrew/formula_support.rb
@@ -11,8 +11,6 @@
def valid?
case @reason
- when :provided_by_osx
- OS.mac?
when :provided_pre_mountain_lion
MacOS.version < :mountain_lion
when :provided_until_xcode43
|
Revert "Linuxbrew: keg_only :provided_by_osx only on Mac"
This reverts commit 0b330bf2d8abcd0b914d60a81d20883e1d710d5c.
|
diff --git a/powerdns_db_cli.gemspec b/powerdns_db_cli.gemspec
index abc1234..def5678 100644
--- a/powerdns_db_cli.gemspec
+++ b/powerdns_db_cli.gemspec
@@ -1,6 +1,6 @@ Gem::Specification.new do |s|
s.name = 'powerdns_db_cli'
- s.version = '0.0.5'
+ s.version = '0.0.6'
s.authors = ['henning mueller']
s.email = ['mail@nning.io']
@@ -18,7 +18,7 @@ s.add_development_dependency 'pg', '~> 0.17'
s.add_development_dependency 'rake', '~> 10.0'
- s.add_runtime_dependency 'activerecord', '~> 4.1', '< 4.2.0'
+ s.add_runtime_dependency 'activerecord', '~> 5.0', '< 5.1.0'
s.add_runtime_dependency 'thor', '~> 0.19'
- s.add_runtime_dependency 'terminal-table', '~> 1.4.5'
+ s.add_runtime_dependency 'terminal-table', '~> 1.7.3'
end
|
Update dependencies and bump version
|
diff --git a/tty-which.gemspec b/tty-which.gemspec
index abc1234..def5678 100644
--- a/tty-which.gemspec
+++ b/tty-which.gemspec
@@ -19,6 +19,8 @@ spec.test_files = spec.files.grep(%r{^(spec)/})
spec.require_paths = ["lib"]
+ spec.required_ruby_version = '>= 2.0.0'
+
spec.add_development_dependency 'bundler', '>= 1.5.0', '< 2.0'
spec.add_development_dependency 'rspec', '~> 3.1'
spec.add_development_dependency 'rake'
|
Change to lock ruby version
|
diff --git a/invalid_utf8_rejector.gemspec b/invalid_utf8_rejector.gemspec
index abc1234..def5678 100644
--- a/invalid_utf8_rejector.gemspec
+++ b/invalid_utf8_rejector.gemspec
@@ -18,8 +18,6 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]
- spec.add_dependency "rack", "~> 1.0"
-
spec.add_development_dependency "bundler"
spec.add_development_dependency "rake"
spec.add_development_dependency "rack-test", "0.6.2"
|
Remove runtime dependency on rack
This gem provides rack middleware but doesn't actually rely on the
rack gem itself.
|
diff --git a/Toucan.podspec b/Toucan.podspec
index abc1234..def5678 100644
--- a/Toucan.podspec
+++ b/Toucan.podspec
@@ -1,6 +1,6 @@ Pod::Spec.new do |s|
s.name = 'Toucan'
- s.version = '0.4.0'
+ s.version = '0.4.1'
s.license = 'MIT'
s.summary = 'Fabulous Image Processing in Swift'
s.homepage = 'https://github.com/gavinbunney/Toucan'
|
Prepare for 0.4.1 release with Xcode 7b5 support
|
diff --git a/recipes/default.rb b/recipes/default.rb
index abc1234..def5678 100644
--- a/recipes/default.rb
+++ b/recipes/default.rb
@@ -2,6 +2,6 @@ node.default['jenkins']['master']['source'] = node['rsc_jenkins']['war_url']
node.default['jenkins']['master']['checksum'] = node['rsc_jenkins']['checksum']
+include_recipe 'rsc_jenkins::_software'
include_recipe 'jenkins::master'
include_recipe 'rsc_jenkins::_user'
-include_recipe 'rsc_jenkins::_software'
|
Install software deps before installing Jenkins
|
diff --git a/lib/travis/worker/workers/resque.rb b/lib/travis/worker/workers/resque.rb
index abc1234..def5678 100644
--- a/lib/travis/worker/workers/resque.rb
+++ b/lib/travis/worker/workers/resque.rb
@@ -20,10 +20,6 @@ stop_processing
requeue
raise $!
- end
-
- def shell
- self.class.shell
end
def work!
|
Remove one more unused methods
|
diff --git a/lib/yard/handlers/method_handler.rb b/lib/yard/handlers/method_handler.rb
index abc1234..def5678 100644
--- a/lib/yard/handlers/method_handler.rb
+++ b/lib/yard/handlers/method_handler.rb
@@ -9,7 +9,7 @@ # Class method if prefixed by self(::|.) or Module(::|.)
if meth =~ /(?:#{NSEP}|\.)([^#{NSEP}\.]+)$/
mscope, meth = :class, $1
- nobj = YARD::Registry.resolve(namespace, $`, true) unless $` == "self"
+ nobj = P(namespace, $`) unless $` == "self"
end
obj = MethodObject.new(nobj, meth, mscope) do |o|
|
Use P() instead of Registry.resolve
|
diff --git a/app/models/repository.rb b/app/models/repository.rb
index abc1234..def5678 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -12,6 +12,7 @@ field :longitude
index({ 'snapshots.date' => 1 })
+ index({ 'snapshot.statistics.resources' => 1 })
##
# Returns a list of records sorted in descending by the score with respect to
|
Add index to make statistic compilation scalable
The statistic compilation for the resources did not scale. There was too
much data for sort() in MongoDB. Hence, I have added the appropriate
index.
Signed-off-by: Konrad Reiche <4ff0213f56e2082fcd8c882d04c546881c579ce4@gmail.com>
|
diff --git a/config/schedule.rb b/config/schedule.rb
index abc1234..def5678 100644
--- a/config/schedule.rb
+++ b/config/schedule.rb
@@ -12,5 +12,5 @@ # as that could cause us to get unrespected API backoffs.
every 1.day, :at => '2:00 am' do
- runner 'User.where.not(:api_token => nil).each(&:update_moderator_sites)'
+ runner 'User.where.not(:api_token => nil).each { |u| u.update_moderator_sites rescue nil }'
end
|
Handle moderator site update failure
Looks like someone revoked an access_token and it’s throwing
exceptions, causing the task to never finish all the users.
|
diff --git a/config/schedule.rb b/config/schedule.rb
index abc1234..def5678 100644
--- a/config/schedule.rb
+++ b/config/schedule.rb
@@ -29,9 +29,9 @@ runner 'DigestBuilder.send_daily_email'
end
-every :minute do
+every 1.minute do
command "whoami"
end
-every :minute do
+every 1.minute do
command "which ruby"
end
|
Add crons to check env
|
diff --git a/app/controllers/admin/teams/members_controller.rb b/app/controllers/admin/teams/members_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/admin/teams/members_controller.rb
+++ b/app/controllers/admin/teams/members_controller.rb
@@ -36,6 +36,6 @@ protected
def team_member
- @member ||= user_team.members.find(params[:id])
+ @member ||= user_team.members.find_by_username(params[:id])
end
end
|
Update user finding (by username) in admin teams members controller
|
diff --git a/app/controllers/course/duplications_controller.rb b/app/controllers/course/duplications_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/course/duplications_controller.rb
+++ b/app/controllers/course/duplications_controller.rb
@@ -31,6 +31,6 @@ #
# @return [Hash] Hash of options to be sent to the duplication job
def duplication_job_options
- create_duplication_params.merge(current_user: current_user)
+ create_duplication_params.merge(current_user: current_user).to_h
end
end
|
Convert the duplication params to hash
|
diff --git a/snp.gemspec b/snp.gemspec
index abc1234..def5678 100644
--- a/snp.gemspec
+++ b/snp.gemspec
@@ -7,8 +7,8 @@ s.platform = Gem::Platform::RUBY
s.summary = 'Quickly and easily create code snippets.'
s.email = 'mascarenhas.renato@gmail.com'
- s.homepage = ''
- s.description = 'Quickly and easily create code snippets.'
+ s.homepage = 'https://github.com/rmascarenhas/snp'
+ s.description = 'snp allows you to create snippets in an automated and reusable manner.'
s.authors = ['Renato Mascarenhas']
s.license = 'MIT'
@@ -16,7 +16,7 @@ s.test_files = Dir['test/**/*.rb']
s.require_paths = ['lib']
- s.add_runtime_dependency 'slop'
- s.add_development_dependency 'mocha'
+ s.add_runtime_dependency 'slop', '~> 3.6'
+ s.add_development_dependency 'mocha', '~> 1.1'
s.rubyforge_project = 'snp'
end
|
Fix warnings in the gemspec.
|
diff --git a/app/helpers/oauth.rb b/app/helpers/oauth.rb
index abc1234..def5678 100644
--- a/app/helpers/oauth.rb
+++ b/app/helpers/oauth.rb
@@ -0,0 +1,16 @@+SCOPES = [
+ 'https://www.googleapis.com/auth/userinfo.email'
+].join(' ')
+
+raise RuntimeError, "You must set CLIENT_ID and CLIENT_SECRET in your server environment." unless ENV['CLIENT_ID'] && ENV['CLIENT_SECRET']
+
+CLIENT_ID = ENV['CLIENT_ID']
+CLIENT_SECRET = ENV['CLIENT_SECRET']
+
+def client
+ client ||= OAuth2::Client.new(CLIENT_ID, CLIENT_SECRET, {
+ :site => 'https://accounts.google.com',
+ :authorize_url => "/o/oauth2/auth",
+ :token_url => "/o/oauth2/token"
+ })
+end
|
Add Helper Methods For Oauth Authentication
|
diff --git a/app/models/user.rb b/app/models/user.rb
index abc1234..def5678 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -46,6 +46,10 @@ remotely_signed_out
end
+ def disabled?
+ disabled
+ end
+
def update_attribute(attribute, value)
update({ attribute => value })
end
|
Add `disabled?`` helper method on User for gds-sso linter
|
diff --git a/test/helpers/cache_connection.rb b/test/helpers/cache_connection.rb
index abc1234..def5678 100644
--- a/test/helpers/cache_connection.rb
+++ b/test/helpers/cache_connection.rb
@@ -19,7 +19,7 @@ @backend ||= case ENV['ADAPTER']
when nil, 'dalli'
require 'active_support/cache/mem_cache_store'
- ActiveSupport::Cache::MemCacheStore.new("#{host}:11211", failover: false)
+ ActiveSupport::Cache::MemCacheStore.new("#{host}:11211", failover: false, expires_in: 6.hours.to_i)
when 'memcached'
require 'memcached_store'
require 'active_support/cache/memcached_store'
|
Set up MemCacheStore in a test suite with TTL from docs
|
diff --git a/test/test_rails_relations_fix.rb b/test/test_rails_relations_fix.rb
index abc1234..def5678 100644
--- a/test/test_rails_relations_fix.rb
+++ b/test/test_rails_relations_fix.rb
@@ -16,5 +16,16 @@ assert_equal(@user, @titanic.subject)
end
end
+
+ context "Association bug tests" do
+ setup do
+ @movies = Array.new(@user.movies)
+ end
+
+ should "return empty collection after destroy its only movie" do
+ @user.movies.destroy(@titanic)
+ assert_equal([], @user.movies)
+ end
+ end
end
end
|
Add failing test for association bug
|
diff --git a/spec/feature/login_register_spec.rb b/spec/feature/login_register_spec.rb
index abc1234..def5678 100644
--- a/spec/feature/login_register_spec.rb
+++ b/spec/feature/login_register_spec.rb
@@ -19,7 +19,7 @@ visit '/login'
within('#new_user') do
fill_in 'Email', with: @user.email
- fill_in 'Password', with: "#{@user.password}_is_incorrect"
+ fill_in 'Password', with: "incorrect_#{@user.password}"
end
click_button 'Log in'
expect(page).to have_content 'Invalid Email or password'
|
Add clearer incorrect password language
|
diff --git a/spec/lib/gitlab/ldap/config_spec.rb b/spec/lib/gitlab/ldap/config_spec.rb
index abc1234..def5678 100644
--- a/spec/lib/gitlab/ldap/config_spec.rb
+++ b/spec/lib/gitlab/ldap/config_spec.rb
@@ -16,19 +16,5 @@ it "raises an error if a unknow provider is used" do
expect{ Gitlab::LDAP::Config.new 'unknown' }.to raise_error
end
-
- context "if 'ldap' is the provider name" do
- let(:provider) { 'ldap' }
-
- context "and 'ldap' is not in defined as a provider" do
- before { Gitlab::LDAP::Config.stub(providers: %w{ldapmain}) }
-
- it "uses the first provider" do
- # Fetch the provider_name attribute from 'options' so that we know
- # that the 'options' Hash is not empty/nil.
- expect(config.options['provider_name']).to eq('ldapmain')
- end
- end
- end
end
end
|
Remove test for 'ldap' provider special case
|
diff --git a/core/deprecations.rb b/core/deprecations.rb
index abc1234..def5678 100644
--- a/core/deprecations.rb
+++ b/core/deprecations.rb
@@ -4,5 +4,9 @@ "Ruby 2.1 features that are incompatible with Ruby 2.2 are deprecated." =>
"Use Ruby 2.2 features if they are available.",
"Rubinius::KERNEL_PATH is deprecated." => "Use Rubinius::CORE_PATH instead.",
+ "Support for 32-bit platforms is deprecated." =>
+ "Use 64-bit platforms or open an issue if 32-bit support is a critical feature.",
+ "Support for the GCC compiler is deprecated." =>
+ "Use clang or open an issue if GCC support is a critical feature.",
}
end
|
Add deprecation notice for 32-bit and GCC.
|
diff --git a/app/controllers/auth0_controller.rb b/app/controllers/auth0_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/auth0_controller.rb
+++ b/app/controllers/auth0_controller.rb
@@ -1,34 +1,17 @@ class Auth0Controller < ApplicationController
-<<<<<<< HEAD
-<<<<<<< HEAD
-=======
->>>>>>> Add the shell for the code that will hand the success and failure of the callback
def callback
- user = User.find_or_create_by(uid: request.env['omniauth.auth']['userinfo'])
+
+ user = User.find_or_create_by(userinfo: request.env['omniauth.auth']['userinfo'])
user.name = request.env['omniauth.auth']['info']['name']
user.save
-
+
session[:userinfo] = user.userinfo
- redirect_to '/dashboard'
-<<<<<<< HEAD
+ redirect_to '/'
end
def failure
@error_msg = request.params['message']
-=======
- def callback
- end
-
- def failure
->>>>>>> Add the Auth0 callback handler
-=======
- end
-
- def failure
- # show a failure page or redirect to an error page
- @error_msg = request.params['message']
->>>>>>> Add the shell for the code that will hand the success and failure of the callback
end
end
|
Fix redirect route and change uid to user info
|
diff --git a/app/controllers/items_controller.rb b/app/controllers/items_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/items_controller.rb
+++ b/app/controllers/items_controller.rb
@@ -0,0 +1,30 @@+class ItemsController < ApplicationController
+
+ def create_post
+ @item = item.new
+ @item.name = new_params[:name]
+ @item.user_id = current_user.id
+ @item.price = new_params[:price]
+ @item.sold = false
+ @item.photo = new_params[:photo]
+ if @item.save
+ flash[:error] = nil
+ redirect_to current_user
+ else
+ flash[:error] = @item.errors.full_messages.to_sentence
+ render 'items/new'
+ end
+ end
+
+ def delete
+ @item = item.find(params[:id])
+ @item.destroy
+ end
+
+ private
+
+ def new_params
+ params.require(:item).permit(:name, :price, :photo)
+ end
+
+end
|
Add methods to create and delete posts
|
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index abc1234..def5678 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -4,4 +4,42 @@
def show
end
+
+ STATE = { deleted: -1, normal: 1, blocked: 2 }
+
+ def newbie?
+ return false if self.verified == true
+ self.created_at < 1.week.ago
+ end
+
+ def deleted?
+ return self.state == STATE[:deleted]
+ end
+
+ def soft_delete
+ self.email = "#{self.login}_#{self.id}@cc98.org"
+ self.login = "Guest"
+ self.bio = ""
+ self.website = ""
+ self.tagline = ""
+ self.location = ""
+ self.state = STATE[:deleted]
+ self.save(validate: false)
+ end
+
+ def blocked?
+ return self.state == STATE[:blocked]
+ end
+
+ def admin?
+ Setting.admin_email.include?(self.email)
+ end
+
+ def has_role?(role)
+ case role
+ when :admin then admin?
+ when :member then self.state = STATE[:normal]
+ else false
+ end
+ end
end
|
Add the method to determine the user state.
|
diff --git a/app/models/concerns/translatable.rb b/app/models/concerns/translatable.rb
index abc1234..def5678 100644
--- a/app/models/concerns/translatable.rb
+++ b/app/models/concerns/translatable.rb
@@ -8,7 +8,7 @@
module ClassMethods
def content_association
- "#{name.downcase}_contents".to_sym
+ "#{model_name.singular}_contents".to_sym
end
def content_model
|
Use model_name to create content association
|
diff --git a/lib/add-to-dict.rb b/lib/add-to-dict.rb
index abc1234..def5678 100644
--- a/lib/add-to-dict.rb
+++ b/lib/add-to-dict.rb
@@ -0,0 +1,10 @@+#!/usr/bin/env ruby -i
+require_relative 'marky-markov/markov-dictionary'
+require_relative 'marky-markov/persistent-dictionary'
+
+if __FILE__ == $0
+ unless ARGV[0].nil?
+ pers_dict = PersistentDictionary.new(ARGV[0], 'dictionary')
+ pers_dict.save_dictionary!
+ end
+end
|
Add To Dict creates/adds to PersistentDictionary
When run and given a source and dictionary, add-to-dict will open the
dictionary(if it already exists) and add the source files words.
|
diff --git a/lib/plugins/lyric.rb b/lib/plugins/lyric.rb
index abc1234..def5678 100644
--- a/lib/plugins/lyric.rb
+++ b/lib/plugins/lyric.rb
@@ -9,7 +9,7 @@ def execute(m, command, lyric, keywords)
RapGenius::Client.access_token = "#{ENV['RAPGENIUS']}"
return m.reply 'no song found :(' if RapGenius.search_by_lyrics(lyric) == []
- return m.reply "Corona - Rhythm of the Night https://youtu.be/u3ltZmI5LQw" if keywords.include? ('nike' && 'reebdok')
+ return m.reply "Corona - Rhythm of the Night https://youtu.be/u3ltZmI5LQw" if keywords.include? ('nike' && 'reebok')
song_id = RapGenius.search_by_lyrics(keywords).first.id
song = RapGenius::Song.find(song_id)
title = song.title
|
Debug - Fix spelling mistake
|
diff --git a/lib/snmpjr/getter.rb b/lib/snmpjr/getter.rb
index abc1234..def5678 100644
--- a/lib/snmpjr/getter.rb
+++ b/lib/snmpjr/getter.rb
@@ -9,11 +9,12 @@ end
def get oids
+ #TODO: Change it to be a session do end block
@session.start
begin
- results = oids.each_slice(@max_oids_per_request).map{|partial_oids|
+ results = oids.each_slice(@max_oids_per_request).flat_map{|partial_oids|
get_request partial_oids
- }.flatten
+ }
ensure
@session.close
end
|
Add a refactoring todo and change .flatten to a flatmap
|
diff --git a/lib/wheelie/names.rb b/lib/wheelie/names.rb
index abc1234..def5678 100644
--- a/lib/wheelie/names.rb
+++ b/lib/wheelie/names.rb
@@ -0,0 +1,37 @@+module Wheelie
+ class Names
+
+ attr_accessor :model
+
+ def initialize(model)
+ self.model = model
+ end
+
+ def symbol
+ ":#{variable}"
+ end
+
+ def variable
+ name.underscore
+ end
+
+ def human_plural
+ name.pluralize
+ end
+
+ def human_singular
+ name
+ end
+
+ def class_name
+ name.classify
+ end
+
+ private
+
+ def name
+ model.name.downcase
+ end
+
+ end
+end
|
Create Wheelie::Names, which offers all kinds of name generation from a model
|
diff --git a/app/workers/running_timer_worker.rb b/app/workers/running_timer_worker.rb
index abc1234..def5678 100644
--- a/app/workers/running_timer_worker.rb
+++ b/app/workers/running_timer_worker.rb
@@ -10,7 +10,7 @@ if timer.started_at < (Time.zone.now - 12.hours) ||
(timer.current_value > 12 && timer.started_at < (Time.zone.now - 4.hours))
RunningTimerMailerWorker.perform_async timer.id
- ActionCable.server.broadcast "notifications_#{current_user.id}_all", RunningTimerNotification.new.to_builder.target!
+ ActionCable.server.broadcast "notifications_#{timer.user_id}_all", RunningTimerNotification.new.to_builder.target!
end
end
end
|
Fix running timer worker to broadcast to action cable
|
diff --git a/lib/yubioath/list.rb b/lib/yubioath/list.rb
index abc1234..def5678 100644
--- a/lib/yubioath/list.rb
+++ b/lib/yubioath/list.rb
@@ -0,0 +1,26 @@+require 'bindata'
+
+module YubiOATH
+ class List
+ def self.send(to:)
+ to.transmit(Request.new.to_binary_s)
+ end
+
+ class Request < BinData::Record
+ uint8 :cla, value: CLA
+ uint8 :ins, value: 0xA1
+ uint8 :p1, value: 0x00
+ uint8 :p2, value: 0x00
+ end
+
+ class ListEntry < BinData::Primitive
+ uint8 :name_list_tag, assert: 0x72
+ uint8 :name_length
+ string :name, read_length: -> { name_length - 1 }
+ end
+
+ class Response < BinData::Record
+ array :codes, type: :list_entry
+ end
+ end
+end
|
Call the List instruction using `YubiOATH::List`
|
diff --git a/lib/napa_reserve/initializer.rb b/lib/napa_reserve/initializer.rb
index abc1234..def5678 100644
--- a/lib/napa_reserve/initializer.rb
+++ b/lib/napa_reserve/initializer.rb
@@ -1,7 +1,7 @@ module NapaReserve
class Initializer
def self.run
- Napa::Logger.logger.info NapaReserve::GemDependency.log_all
+ Napa::Logger.logger.info NapaReserve::GemDependency.log_all if Napa.env.production?
end
end
end
|
Disable gem log runner unless production
|
diff --git a/lib/sg_mailer/job.rb b/lib/sg_mailer/job.rb
index abc1234..def5678 100644
--- a/lib/sg_mailer/job.rb
+++ b/lib/sg_mailer/job.rb
@@ -1,7 +1,7 @@ module SGMailer
class Job < ActiveJob::Base
def perform(mail)
- SG.send(mail)
+ SGMailer.send(mail)
end
end
end
|
Fix the SG::Mailer bad constants refs
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.