commit stringlengths 40 40 | old_file stringlengths 4 184 | new_file stringlengths 4 184 | old_contents stringlengths 1 3.6k | new_contents stringlengths 5 3.38k | subject stringlengths 15 778 | message stringlengths 16 6.74k | lang stringclasses 201 values | license stringclasses 13 values | repos stringlengths 6 116k | config stringclasses 201 values | content stringlengths 137 7.24k | diff stringlengths 26 5.55k | diff_length int64 1 123 | relative_diff_length float64 0.01 89 | n_lines_added int64 0 108 | n_lines_deleted int64 0 106 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
09c24ac93b6e697b48c52b614fe92f7978fe2320 | linter.py | linter.py |
from SublimeLinter.lint import Linter
import sublime
class Iverilog(Linter):
# http://www.sublimelinter.com/en/stable/linter_attributes.html
name = "iverilog"
cmd = "iverilog ${args}"
tempfile_suffix = "verilog"
multiline = True
on_stderr = None
# fmt: off
defaults = {
"selector": "source.verilog | source.systemverilog",
"-t": "null",
"-g": 2012,
"-I +": [],
"-y +": [],
}
# fmt: on
# there is a ":" in the filepath under Windows like C:\DIR\FILE
if sublime.platform() == "windows":
filepath_regex = r"[^:]+:[^:]+"
else:
filepath_regex = r"[^:]+"
# what kind of messages should be caught?
regex = (
r"(?P<file>{0}):(?P<line>\d+):\s*"
r"(?:(?:(?P<warning>warning)|(?P<error>error)):)?\s*"
r"(?P<message>.*)".format(filepath_regex)
)
|
from SublimeLinter.lint import Linter
import sublime
class Iverilog(Linter):
# http://www.sublimelinter.com/en/stable/linter_attributes.html
name = "iverilog"
cmd = "iverilog ${args}"
tempfile_suffix = "verilog"
multiline = True
on_stderr = None
# fmt: off
defaults = {
"selector": "source.verilog | source.systemverilog",
# @see https://iverilog.fandom.com/wiki/Iverilog_Flags
"-t": "null",
"-g": 2012,
"-I +": [],
"-y +": [],
}
# fmt: on
# there is a ":" in the filepath under Windows like C:\DIR\FILE
if sublime.platform() == "windows":
filepath_regex = r"[^:]+:[^:]+"
else:
filepath_regex = r"[^:]+"
# what kind of messages should be caught?
regex = (
r"(?P<file>{0}):(?P<line>\d+):\s*"
r"(?:(?:(?P<warning>warning)|(?P<error>error)):)?\s*"
r"(?P<message>.*)".format(filepath_regex)
)
| Add iverilog flags reference URL | Add iverilog flags reference URL
Signed-off-by: Jack Cherng <159f0f32a62cc912ca55f89bb5e06807cf019bc7@gmail.com>
| Python | mit | jfcherng/SublimeLinter-contrib-iverilog,jfcherng/SublimeLinter-contrib-iverilog | python | ## Code Before:
from SublimeLinter.lint import Linter
import sublime
class Iverilog(Linter):
# http://www.sublimelinter.com/en/stable/linter_attributes.html
name = "iverilog"
cmd = "iverilog ${args}"
tempfile_suffix = "verilog"
multiline = True
on_stderr = None
# fmt: off
defaults = {
"selector": "source.verilog | source.systemverilog",
"-t": "null",
"-g": 2012,
"-I +": [],
"-y +": [],
}
# fmt: on
# there is a ":" in the filepath under Windows like C:\DIR\FILE
if sublime.platform() == "windows":
filepath_regex = r"[^:]+:[^:]+"
else:
filepath_regex = r"[^:]+"
# what kind of messages should be caught?
regex = (
r"(?P<file>{0}):(?P<line>\d+):\s*"
r"(?:(?:(?P<warning>warning)|(?P<error>error)):)?\s*"
r"(?P<message>.*)".format(filepath_regex)
)
## Instruction:
Add iverilog flags reference URL
Signed-off-by: Jack Cherng <159f0f32a62cc912ca55f89bb5e06807cf019bc7@gmail.com>
## Code After:
from SublimeLinter.lint import Linter
import sublime
class Iverilog(Linter):
# http://www.sublimelinter.com/en/stable/linter_attributes.html
name = "iverilog"
cmd = "iverilog ${args}"
tempfile_suffix = "verilog"
multiline = True
on_stderr = None
# fmt: off
defaults = {
"selector": "source.verilog | source.systemverilog",
# @see https://iverilog.fandom.com/wiki/Iverilog_Flags
"-t": "null",
"-g": 2012,
"-I +": [],
"-y +": [],
}
# fmt: on
# there is a ":" in the filepath under Windows like C:\DIR\FILE
if sublime.platform() == "windows":
filepath_regex = r"[^:]+:[^:]+"
else:
filepath_regex = r"[^:]+"
# what kind of messages should be caught?
regex = (
r"(?P<file>{0}):(?P<line>\d+):\s*"
r"(?:(?:(?P<warning>warning)|(?P<error>error)):)?\s*"
r"(?P<message>.*)".format(filepath_regex)
)
|
from SublimeLinter.lint import Linter
import sublime
class Iverilog(Linter):
# http://www.sublimelinter.com/en/stable/linter_attributes.html
name = "iverilog"
cmd = "iverilog ${args}"
tempfile_suffix = "verilog"
multiline = True
on_stderr = None
# fmt: off
defaults = {
"selector": "source.verilog | source.systemverilog",
+ # @see https://iverilog.fandom.com/wiki/Iverilog_Flags
"-t": "null",
"-g": 2012,
"-I +": [],
"-y +": [],
}
# fmt: on
# there is a ":" in the filepath under Windows like C:\DIR\FILE
if sublime.platform() == "windows":
filepath_regex = r"[^:]+:[^:]+"
else:
filepath_regex = r"[^:]+"
# what kind of messages should be caught?
regex = (
r"(?P<file>{0}):(?P<line>\d+):\s*"
r"(?:(?:(?P<warning>warning)|(?P<error>error)):)?\s*"
r"(?P<message>.*)".format(filepath_regex)
) | 1 | 0.028571 | 1 | 0 |
581be825b4fcd62f7a6e2071d7751e26a264cabe | functional/test_unseal.yml | functional/test_unseal.yml | ---
- hosts: localhost
vars:
vault_keys: "{{ lookup('env','VAULT_KEYS') }}"
tasks:
- hashivault_status:
register: 'vault_status'
- assert: { that: "{{vault_status.changed}} == False" }
- assert: { that: "{{vault_status.rc}} == 0" }
- block:
- hashivault_seal:
register: 'vault_seal'
- assert: { that: "{{vault_seal.changed}} == True" }
- assert: { that: "{{vault_seal.rc}} == 0" }
when: "{{vault_status.status.sealed}} == False"
- hashivault_unseal:
keys: '{{vault_keys}}'
register: 'vault_unseal'
- assert: { that: "{{vault_unseal.changed}} == True" }
- assert: { that: "{{vault_unseal.status.progress}} == 0" }
- assert: { that: "{{vault_unseal.status.sealed}} == False" }
- assert: { that: "{{vault_unseal.rc}} == 0" }
| ---
- hosts: localhost
vars:
vault_keys: "{{ lookup('env','VAULT_KEYS') }}"
tasks:
- hashivault_status:
register: 'vault_status'
- assert: { that: "{{vault_status.changed}} == False" }
- assert: { that: "{{vault_status.rc}} == 0" }
- block:
- hashivault_seal:
register: 'vault_seal'
- assert: { that: "{{vault_seal.changed}} == True" }
- assert: { that: "{{vault_seal.rc}} == 0" }
when: "vault_status.status.sealed == False"
- assert: { that: "'{{vault_keys}}' != ''" }
- hashivault_unseal:
keys: '{{vault_keys}}'
register: 'vault_unseal'
- assert: { that: "{{vault_unseal.changed}} == True" }
- assert: { that: "{{vault_unseal.status.progress}} == 0" }
- assert: { that: "{{vault_unseal.status.sealed}} == False" }
- assert: { that: "{{vault_unseal.rc}} == 0" }
| Add assertion to warn that env is not set | Add assertion to warn that env is not set
| YAML | mit | TerryHowe/ansible-modules-hashivault,cloudvisory/ansible-modules-hashivault,TerryHowe/ansible-modules-hashivault,cloudvisory/ansible-modules-hashivault | yaml | ## Code Before:
---
- hosts: localhost
vars:
vault_keys: "{{ lookup('env','VAULT_KEYS') }}"
tasks:
- hashivault_status:
register: 'vault_status'
- assert: { that: "{{vault_status.changed}} == False" }
- assert: { that: "{{vault_status.rc}} == 0" }
- block:
- hashivault_seal:
register: 'vault_seal'
- assert: { that: "{{vault_seal.changed}} == True" }
- assert: { that: "{{vault_seal.rc}} == 0" }
when: "{{vault_status.status.sealed}} == False"
- hashivault_unseal:
keys: '{{vault_keys}}'
register: 'vault_unseal'
- assert: { that: "{{vault_unseal.changed}} == True" }
- assert: { that: "{{vault_unseal.status.progress}} == 0" }
- assert: { that: "{{vault_unseal.status.sealed}} == False" }
- assert: { that: "{{vault_unseal.rc}} == 0" }
## Instruction:
Add assertion to warn that env is not set
## Code After:
---
- hosts: localhost
vars:
vault_keys: "{{ lookup('env','VAULT_KEYS') }}"
tasks:
- hashivault_status:
register: 'vault_status'
- assert: { that: "{{vault_status.changed}} == False" }
- assert: { that: "{{vault_status.rc}} == 0" }
- block:
- hashivault_seal:
register: 'vault_seal'
- assert: { that: "{{vault_seal.changed}} == True" }
- assert: { that: "{{vault_seal.rc}} == 0" }
when: "vault_status.status.sealed == False"
- assert: { that: "'{{vault_keys}}' != ''" }
- hashivault_unseal:
keys: '{{vault_keys}}'
register: 'vault_unseal'
- assert: { that: "{{vault_unseal.changed}} == True" }
- assert: { that: "{{vault_unseal.status.progress}} == 0" }
- assert: { that: "{{vault_unseal.status.sealed}} == False" }
- assert: { that: "{{vault_unseal.rc}} == 0" }
| ---
- hosts: localhost
vars:
vault_keys: "{{ lookup('env','VAULT_KEYS') }}"
tasks:
- hashivault_status:
register: 'vault_status'
- assert: { that: "{{vault_status.changed}} == False" }
- assert: { that: "{{vault_status.rc}} == 0" }
- block:
- hashivault_seal:
register: 'vault_seal'
- assert: { that: "{{vault_seal.changed}} == True" }
- assert: { that: "{{vault_seal.rc}} == 0" }
- when: "{{vault_status.status.sealed}} == False"
? -- --
+ when: "vault_status.status.sealed == False"
+ - assert: { that: "'{{vault_keys}}' != ''" }
- hashivault_unseal:
keys: '{{vault_keys}}'
register: 'vault_unseal'
- assert: { that: "{{vault_unseal.changed}} == True" }
- assert: { that: "{{vault_unseal.status.progress}} == 0" }
- assert: { that: "{{vault_unseal.status.sealed}} == False" }
- assert: { that: "{{vault_unseal.rc}} == 0" } | 3 | 0.125 | 2 | 1 |
f661f6563f8a5a899d899f5c0aedc8d85ff89ce2 | test/unit/local_import_box_test.rb | test/unit/local_import_box_test.rb | require 'minitest/autorun'
require File.expand_path('../../test_helper', __FILE__)
require 'tmpdir'
class LocalImportBoxTest < MiniTest::Unit::TestCase
def setup
@td = Pathname.new(Dir.mktmpdir)
@compute = Fog::Compute.new(:provider => 'octocloud', :local_dir => @td.to_s)
# Download OVA
# We also want to re-use it in all these tests so we fix the path
@tmp_ova_path = "/tmp/fog-octocloud-test-ova.ova"
@test_ova = download_test_ova @tmp_ova_path, true
end
def teardown
@td.rmtree
end
def test_local_import_box
box_path = @td.join('boxes/fog-octocloud-test-ova')
@compute.local_import_box 'fog-octocloud-test-ova', @test_ova, TEST_OVA_MD5
assert File.directory?(box_path)
assert Dir["#{box_path}/*.vmx"].size == 1
# OVAs may have more than one VMDK IIRC
assert Dir["#{box_path}/*.vmdk"].size >= 1
end
end
| require 'minitest/autorun'
require File.expand_path('../../test_helper', __FILE__)
require 'tmpdir'
class LocalImportBoxTest < MiniTest::Unit::TestCase
def setup
@td = Pathname.new(Dir.mktmpdir)
@compute = Fog::Compute.new(:provider => 'octocloud', :local_dir => @td.to_s)
# Download OVA
# We also want to re-use it in all these tests so we fix the path
@tmp_ova_path = "/tmp/fog-octocloud-test-ova.ova"
@test_ova = download_test_ova @tmp_ova_path, true
end
def teardown
@td.rmtree
end
def test_local_import_box_from_file
box_path = @td.join('boxes/fog-octocloud-test-ova')
@compute.local_import_box 'fog-octocloud-test-ova', @test_ova, TEST_OVA_MD5
assert File.directory?(box_path)
assert Dir["#{box_path}/*.vmx"].size == 1
# OVAs may have more than one VMDK IIRC
assert Dir["#{box_path}/*.vmdk"].size >= 1
end
def test_local_import_box_from_url
box_path = @td.join('boxes/fog-octocloud-test-ova')
@compute.local_import_box 'fog-octocloud-test-ova', TEST_OVA_URL, TEST_OVA_MD5
assert File.directory?(box_path)
assert Dir["#{box_path}/*.vmx"].size == 1
# OVAs may have more than one VMDK IIRC
assert Dir["#{box_path}/*.vmdk"].size >= 1
end
end
| Test also remote (URL) OVA import | Test also remote (URL) OVA import
| Ruby | mit | lstoll/fog-octocloud,lstoll/fog-octocloud | ruby | ## Code Before:
require 'minitest/autorun'
require File.expand_path('../../test_helper', __FILE__)
require 'tmpdir'
class LocalImportBoxTest < MiniTest::Unit::TestCase
def setup
@td = Pathname.new(Dir.mktmpdir)
@compute = Fog::Compute.new(:provider => 'octocloud', :local_dir => @td.to_s)
# Download OVA
# We also want to re-use it in all these tests so we fix the path
@tmp_ova_path = "/tmp/fog-octocloud-test-ova.ova"
@test_ova = download_test_ova @tmp_ova_path, true
end
def teardown
@td.rmtree
end
def test_local_import_box
box_path = @td.join('boxes/fog-octocloud-test-ova')
@compute.local_import_box 'fog-octocloud-test-ova', @test_ova, TEST_OVA_MD5
assert File.directory?(box_path)
assert Dir["#{box_path}/*.vmx"].size == 1
# OVAs may have more than one VMDK IIRC
assert Dir["#{box_path}/*.vmdk"].size >= 1
end
end
## Instruction:
Test also remote (URL) OVA import
## Code After:
require 'minitest/autorun'
require File.expand_path('../../test_helper', __FILE__)
require 'tmpdir'
class LocalImportBoxTest < MiniTest::Unit::TestCase
def setup
@td = Pathname.new(Dir.mktmpdir)
@compute = Fog::Compute.new(:provider => 'octocloud', :local_dir => @td.to_s)
# Download OVA
# We also want to re-use it in all these tests so we fix the path
@tmp_ova_path = "/tmp/fog-octocloud-test-ova.ova"
@test_ova = download_test_ova @tmp_ova_path, true
end
def teardown
@td.rmtree
end
def test_local_import_box_from_file
box_path = @td.join('boxes/fog-octocloud-test-ova')
@compute.local_import_box 'fog-octocloud-test-ova', @test_ova, TEST_OVA_MD5
assert File.directory?(box_path)
assert Dir["#{box_path}/*.vmx"].size == 1
# OVAs may have more than one VMDK IIRC
assert Dir["#{box_path}/*.vmdk"].size >= 1
end
def test_local_import_box_from_url
box_path = @td.join('boxes/fog-octocloud-test-ova')
@compute.local_import_box 'fog-octocloud-test-ova', TEST_OVA_URL, TEST_OVA_MD5
assert File.directory?(box_path)
assert Dir["#{box_path}/*.vmx"].size == 1
# OVAs may have more than one VMDK IIRC
assert Dir["#{box_path}/*.vmdk"].size >= 1
end
end
| require 'minitest/autorun'
require File.expand_path('../../test_helper', __FILE__)
require 'tmpdir'
class LocalImportBoxTest < MiniTest::Unit::TestCase
def setup
@td = Pathname.new(Dir.mktmpdir)
@compute = Fog::Compute.new(:provider => 'octocloud', :local_dir => @td.to_s)
# Download OVA
# We also want to re-use it in all these tests so we fix the path
@tmp_ova_path = "/tmp/fog-octocloud-test-ova.ova"
@test_ova = download_test_ova @tmp_ova_path, true
end
def teardown
@td.rmtree
end
- def test_local_import_box
+ def test_local_import_box_from_file
? ++++++++++
box_path = @td.join('boxes/fog-octocloud-test-ova')
@compute.local_import_box 'fog-octocloud-test-ova', @test_ova, TEST_OVA_MD5
assert File.directory?(box_path)
assert Dir["#{box_path}/*.vmx"].size == 1
# OVAs may have more than one VMDK IIRC
assert Dir["#{box_path}/*.vmdk"].size >= 1
end
+ def test_local_import_box_from_url
+ box_path = @td.join('boxes/fog-octocloud-test-ova')
+ @compute.local_import_box 'fog-octocloud-test-ova', TEST_OVA_URL, TEST_OVA_MD5
+ assert File.directory?(box_path)
+ assert Dir["#{box_path}/*.vmx"].size == 1
+ # OVAs may have more than one VMDK IIRC
+ assert Dir["#{box_path}/*.vmdk"].size >= 1
+ end
+
end | 11 | 0.37931 | 10 | 1 |
760f083f0c0a71b6bb5bdb3228867f6a0ed85c4f | app/controllers/concerns/backend/translatable_controller.rb | app/controllers/concerns/backend/translatable_controller.rb | module Concerns
module Backend
module TranslatableController
extend ActiveSupport::Concern
included do
before_action :find_models, only: [:edit_translation, :update_translation]
helper_method :translatable_path
end
def update_translation
if @translation.validate(params[model_name])
@translation.save
redirect_to translatable_path, notice: t('b.msg.changes_saved')
else
render :edit_translation
end
end
private
def find_models
@model ||= find_model
@translation = translation_form
end
def model_name
@model.class.to_s.underscore
end
def set_translatable_path(path)
@translatable_path ||= path
end
def translatable_path
method = "edit_translation_backend_#{model_name}_path"
@translatable_path || send(method, @model, params[:translation_locale])
end
end
end
end
| module Concerns
module Backend
module TranslatableController
extend ActiveSupport::Concern
included do
before_action :find_models, only: [:edit_translation, :update_translation]
helper_method :translatable_path
end
def update_translation
if @translation.validate(params[model_name])
@translation.save
redirect_to translatable_path, notice: t('b.msg.changes_saved')
else
render :edit_translation
end
end
private
def find_models
@model ||= find_model
@translation = translation_form
end
def model_name
@model.class.to_s.underscore.gsub('_decorator', '')
end
def set_translatable_path(path)
@translatable_path ||= path
end
def translatable_path
method = "edit_translation_backend_#{model_name}_path"
@translatable_path || send(method, @model, params[:translation_locale])
end
end
end
end
| Exclude the decorator from the model name. | Exclude the decorator from the model name.
| Ruby | mit | udongo/udongo,udongo/udongo,udongo/udongo | ruby | ## Code Before:
module Concerns
module Backend
module TranslatableController
extend ActiveSupport::Concern
included do
before_action :find_models, only: [:edit_translation, :update_translation]
helper_method :translatable_path
end
def update_translation
if @translation.validate(params[model_name])
@translation.save
redirect_to translatable_path, notice: t('b.msg.changes_saved')
else
render :edit_translation
end
end
private
def find_models
@model ||= find_model
@translation = translation_form
end
def model_name
@model.class.to_s.underscore
end
def set_translatable_path(path)
@translatable_path ||= path
end
def translatable_path
method = "edit_translation_backend_#{model_name}_path"
@translatable_path || send(method, @model, params[:translation_locale])
end
end
end
end
## Instruction:
Exclude the decorator from the model name.
## Code After:
module Concerns
module Backend
module TranslatableController
extend ActiveSupport::Concern
included do
before_action :find_models, only: [:edit_translation, :update_translation]
helper_method :translatable_path
end
def update_translation
if @translation.validate(params[model_name])
@translation.save
redirect_to translatable_path, notice: t('b.msg.changes_saved')
else
render :edit_translation
end
end
private
def find_models
@model ||= find_model
@translation = translation_form
end
def model_name
@model.class.to_s.underscore.gsub('_decorator', '')
end
def set_translatable_path(path)
@translatable_path ||= path
end
def translatable_path
method = "edit_translation_backend_#{model_name}_path"
@translatable_path || send(method, @model, params[:translation_locale])
end
end
end
end
| module Concerns
module Backend
module TranslatableController
extend ActiveSupport::Concern
included do
before_action :find_models, only: [:edit_translation, :update_translation]
helper_method :translatable_path
end
def update_translation
if @translation.validate(params[model_name])
@translation.save
redirect_to translatable_path, notice: t('b.msg.changes_saved')
else
render :edit_translation
end
end
private
def find_models
@model ||= find_model
@translation = translation_form
end
def model_name
- @model.class.to_s.underscore
+ @model.class.to_s.underscore.gsub('_decorator', '')
? +++++++++++++++++++++++
end
def set_translatable_path(path)
@translatable_path ||= path
end
def translatable_path
method = "edit_translation_backend_#{model_name}_path"
@translatable_path || send(method, @model, params[:translation_locale])
end
end
end
end | 2 | 0.04878 | 1 | 1 |
6f29293e6f447dfd80d10c173b7c5a6cc13a4243 | main/urls.py | main/urls.py | from django.conf.urls import url
from django.views import generic
from . import views
app_name = 'main'
urlpatterns = [
url(r'^$', views.AboutView.as_view(), name='about'),
url(r'^chas/$', views.AboutChasView.as_view(), name='chas'),
url(r'^evan/$', views.AboutEvanView.as_view(), name='evan'),
]
| from django.urls import include, path
from . import views
app_name = 'main'
urlpatterns = [
path('', views.AboutView.as_view(), name='about'),
path('chas/', views.AboutChasView.as_view(), name='chas'),
path('evan/', views.AboutEvanView.as_view(), name='evan'),
]
| Move some urlpatterns to DJango 2.0 preferred method | Move some urlpatterns to DJango 2.0 preferred method
| Python | mit | evanepio/dotmanca,evanepio/dotmanca,evanepio/dotmanca | python | ## Code Before:
from django.conf.urls import url
from django.views import generic
from . import views
app_name = 'main'
urlpatterns = [
url(r'^$', views.AboutView.as_view(), name='about'),
url(r'^chas/$', views.AboutChasView.as_view(), name='chas'),
url(r'^evan/$', views.AboutEvanView.as_view(), name='evan'),
]
## Instruction:
Move some urlpatterns to DJango 2.0 preferred method
## Code After:
from django.urls import include, path
from . import views
app_name = 'main'
urlpatterns = [
path('', views.AboutView.as_view(), name='about'),
path('chas/', views.AboutChasView.as_view(), name='chas'),
path('evan/', views.AboutEvanView.as_view(), name='evan'),
]
| + from django.urls import include, path
- from django.conf.urls import url
- from django.views import generic
from . import views
app_name = 'main'
urlpatterns = [
- url(r'^$', views.AboutView.as_view(), name='about'),
? ^^^ - --
+ path('', views.AboutView.as_view(), name='about'),
? ^^^^
- url(r'^chas/$', views.AboutChasView.as_view(), name='chas'),
? ^^^ - - -
+ path('chas/', views.AboutChasView.as_view(), name='chas'),
? ^^^^
- url(r'^evan/$', views.AboutEvanView.as_view(), name='evan'),
? ^^^ - - -
+ path('evan/', views.AboutEvanView.as_view(), name='evan'),
? ^^^^
] | 9 | 0.818182 | 4 | 5 |
8ece892f01c4b32f7fa0a34c88bfdf8ea969e5ce | kobo/apps/__init__.py | kobo/apps/__init__.py | import kombu.exceptions
from django.apps import AppConfig
from django.core.checks import register, Tags
from kpi.utils.two_database_configuration_checker import \
TwoDatabaseConfigurationChecker
class KpiConfig(AppConfig):
name = 'kpi'
def ready(self, *args, **kwargs):
# Once it's okay to read from the database, apply the user-desired
# autoscaling configuration for Celery workers
from kobo.celery import update_concurrency_from_constance
try:
update_concurrency_from_constance.delay()
except kombu.exceptions.OperationalError as e:
# It's normal for Django to start without access to a message
# broker, e.g. while running `./manage.py collectstatic`
# during a Docker image build
pass
return super().ready(*args, **kwargs)
register(TwoDatabaseConfigurationChecker().as_check(), Tags.database)
| import kombu.exceptions
from django.apps import AppConfig
from django.core.checks import register, Tags
from kpi.utils.two_database_configuration_checker import \
TwoDatabaseConfigurationChecker
class KpiConfig(AppConfig):
name = 'kpi'
def ready(self, *args, **kwargs):
# Once it's okay to read from the database, apply the user-desired
# autoscaling configuration for Celery workers
from kobo.celery import update_concurrency_from_constance
try:
# Push this onto the task queue with `delay()` instead of calling
# it directly because a direct call in the absence of any Celery
# workers hangs indefinitely
update_concurrency_from_constance.delay()
except kombu.exceptions.OperationalError as e:
# It's normal for Django to start without access to a message
# broker, e.g. while running `./manage.py collectstatic`
# during a Docker image build
pass
return super().ready(*args, **kwargs)
register(TwoDatabaseConfigurationChecker().as_check(), Tags.database)
| Add explanatory comment for odd use of `delay()` | Add explanatory comment for odd use of `delay()`
| Python | agpl-3.0 | kobotoolbox/kpi,kobotoolbox/kpi,kobotoolbox/kpi,kobotoolbox/kpi,kobotoolbox/kpi | python | ## Code Before:
import kombu.exceptions
from django.apps import AppConfig
from django.core.checks import register, Tags
from kpi.utils.two_database_configuration_checker import \
TwoDatabaseConfigurationChecker
class KpiConfig(AppConfig):
name = 'kpi'
def ready(self, *args, **kwargs):
# Once it's okay to read from the database, apply the user-desired
# autoscaling configuration for Celery workers
from kobo.celery import update_concurrency_from_constance
try:
update_concurrency_from_constance.delay()
except kombu.exceptions.OperationalError as e:
# It's normal for Django to start without access to a message
# broker, e.g. while running `./manage.py collectstatic`
# during a Docker image build
pass
return super().ready(*args, **kwargs)
register(TwoDatabaseConfigurationChecker().as_check(), Tags.database)
## Instruction:
Add explanatory comment for odd use of `delay()`
## Code After:
import kombu.exceptions
from django.apps import AppConfig
from django.core.checks import register, Tags
from kpi.utils.two_database_configuration_checker import \
TwoDatabaseConfigurationChecker
class KpiConfig(AppConfig):
name = 'kpi'
def ready(self, *args, **kwargs):
# Once it's okay to read from the database, apply the user-desired
# autoscaling configuration for Celery workers
from kobo.celery import update_concurrency_from_constance
try:
# Push this onto the task queue with `delay()` instead of calling
# it directly because a direct call in the absence of any Celery
# workers hangs indefinitely
update_concurrency_from_constance.delay()
except kombu.exceptions.OperationalError as e:
# It's normal for Django to start without access to a message
# broker, e.g. while running `./manage.py collectstatic`
# during a Docker image build
pass
return super().ready(*args, **kwargs)
register(TwoDatabaseConfigurationChecker().as_check(), Tags.database)
| import kombu.exceptions
from django.apps import AppConfig
from django.core.checks import register, Tags
from kpi.utils.two_database_configuration_checker import \
TwoDatabaseConfigurationChecker
class KpiConfig(AppConfig):
name = 'kpi'
def ready(self, *args, **kwargs):
# Once it's okay to read from the database, apply the user-desired
# autoscaling configuration for Celery workers
from kobo.celery import update_concurrency_from_constance
try:
+ # Push this onto the task queue with `delay()` instead of calling
+ # it directly because a direct call in the absence of any Celery
+ # workers hangs indefinitely
update_concurrency_from_constance.delay()
except kombu.exceptions.OperationalError as e:
# It's normal for Django to start without access to a message
# broker, e.g. while running `./manage.py collectstatic`
# during a Docker image build
pass
return super().ready(*args, **kwargs)
register(TwoDatabaseConfigurationChecker().as_check(), Tags.database) | 3 | 0.115385 | 3 | 0 |
2f4981acba70cd19e35b16815fa32644b98f1c21 | composer.json | composer.json | {
"name": "domenypl/symfony1-legacy",
"type": "library",
"description": "symfony1-legacy is the unofficial Git mirror for symfony 1.0.22 with Domeny.pl (http://domeny.pl) modifications.",
"keywords": ["symfony1"],
"homepage": "https://github.com/domenypl/symfony1-legacy.git",
"minimum-stability": "stable",
"prefer-stable": true,
"require": {
"php": ">=5.4.0"
}
}
| {
"name": "domenypl/symfony1-legacy",
"type": "library",
"description": "symfony1-legacy is the unofficial Git mirror for symfony 1.0.22 with Domeny.pl (http://domeny.pl) modifications.",
"keywords": ["symfony1"],
"homepage": "https://github.com/domenypl/symfony1-legacy.git",
"minimum-stability": "stable",
"prefer-stable": true,
"require": {
"php": ">=5.4.0"
},
"bin": ["data/bin/symfony"]
}
| Add symlink to symfony script in bin directory | Add symlink to symfony script in bin directory
| JSON | mit | domenypl/symfony1-legacy,domenypl/symfony1-legacy,domenypl/symfony1-legacy,domenypl/symfony1-legacy | json | ## Code Before:
{
"name": "domenypl/symfony1-legacy",
"type": "library",
"description": "symfony1-legacy is the unofficial Git mirror for symfony 1.0.22 with Domeny.pl (http://domeny.pl) modifications.",
"keywords": ["symfony1"],
"homepage": "https://github.com/domenypl/symfony1-legacy.git",
"minimum-stability": "stable",
"prefer-stable": true,
"require": {
"php": ">=5.4.0"
}
}
## Instruction:
Add symlink to symfony script in bin directory
## Code After:
{
"name": "domenypl/symfony1-legacy",
"type": "library",
"description": "symfony1-legacy is the unofficial Git mirror for symfony 1.0.22 with Domeny.pl (http://domeny.pl) modifications.",
"keywords": ["symfony1"],
"homepage": "https://github.com/domenypl/symfony1-legacy.git",
"minimum-stability": "stable",
"prefer-stable": true,
"require": {
"php": ">=5.4.0"
},
"bin": ["data/bin/symfony"]
}
| {
"name": "domenypl/symfony1-legacy",
"type": "library",
"description": "symfony1-legacy is the unofficial Git mirror for symfony 1.0.22 with Domeny.pl (http://domeny.pl) modifications.",
"keywords": ["symfony1"],
"homepage": "https://github.com/domenypl/symfony1-legacy.git",
"minimum-stability": "stable",
"prefer-stable": true,
"require": {
"php": ">=5.4.0"
- }
+ },
? +
+ "bin": ["data/bin/symfony"]
}
| 3 | 0.214286 | 2 | 1 |
af25cb451024b4b26f927defac5340a958156ad0 | api/README.md | api/README.md | 
## Client-side core tools and API
## License
##### OpenFaux is released under the [GNU Affero General Public License (AGPL3)](https://www.gnu.org/licenses/agpl-3.0.html).
The full license text is included in `LICENSE.txt`.
| 
## Client-side core API
| Clean up readme (until we fill it up again) | Clean up readme (until we fill it up again)
| Markdown | agpl-3.0 | openfaux/openfaux-client,openfaux/openfaux-client,openfaux/openfaux-client,openfaux/openfaux-client | markdown | ## Code Before:

## Client-side core tools and API
## License
##### OpenFaux is released under the [GNU Affero General Public License (AGPL3)](https://www.gnu.org/licenses/agpl-3.0.html).
The full license text is included in `LICENSE.txt`.
## Instruction:
Clean up readme (until we fill it up again)
## Code After:

## Client-side core API
| 
- ## Client-side core tools and API
+ ## Client-side core API
- ## License
-
- ##### OpenFaux is released under the [GNU Affero General Public License (AGPL3)](https://www.gnu.org/licenses/agpl-3.0.html).
- The full license text is included in `LICENSE.txt`. | 6 | 0.857143 | 1 | 5 |
8956e12d995088fd0de2b06f53de8e82bc735342 | tests/app/index.html | tests/app/index.html | <!doctype html>
<html>
<head>
<title>MODUL - Components</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.mtest-header {
position: fixed;
top: 0;
right: 0;
left: 0;
z-index: 2;
padding: 16px 32px;
background: #fff;
}
.m-flex-template__menu,
.m-flex-template__page {
padding-top: 52px;
}
.mtest-header h1 {
display: flex;
justify-content: space-between;
align-items: center;
}
@media (max-width: 767px) {
.mtest-header {
padding: 16px;
}
}
</style>
</head>
<body class="m-u--no-margin m-u--app-body">
<header class="mtest-header m-u--box-shadow--s">
<h1 class="m-u--h4 m-u--no-margin-top">MODUL <i class="m-u--font-size--s m-u--no-margin-top">Components</i></h1>
</header>
<div id="vue">... Waiting</div>
</body>
</html>
| <!doctype html>
<html>
<head>
<title>MODUL - Components</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.mtest-header {
position: fixed;
top: 0;
right: 0;
left: 0;
z-index: 2;
padding: 16px 32px;
background: #fff;
}
.m-flex-template__menu,
.m-flex-template__page {
padding-top: 52px;
}
.mtest-header h1 {
display: flex;
justify-content: space-between;
align-items: center;
}
@media (max-width: 767px) {
.mtest-header {
padding: 16px;
}
}
</style>
</head>
<body class="m-u--app-body">
<header class="mtest-header m-u--box-shadow--s">
<h1 class="m-u--h4 m-u--no-margin-top">MODUL <i class="m-u--font-size--s m-u--no-margin-top">Components</i></h1>
</header>
<div id="vue">... Waiting</div>
</body>
</html>
| Remove no-margin class on body tag | Remove no-margin class on body tag
| HTML | apache-2.0 | ulaval/modul-components,ulaval/modul-components,ulaval/modul-components | html | ## Code Before:
<!doctype html>
<html>
<head>
<title>MODUL - Components</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.mtest-header {
position: fixed;
top: 0;
right: 0;
left: 0;
z-index: 2;
padding: 16px 32px;
background: #fff;
}
.m-flex-template__menu,
.m-flex-template__page {
padding-top: 52px;
}
.mtest-header h1 {
display: flex;
justify-content: space-between;
align-items: center;
}
@media (max-width: 767px) {
.mtest-header {
padding: 16px;
}
}
</style>
</head>
<body class="m-u--no-margin m-u--app-body">
<header class="mtest-header m-u--box-shadow--s">
<h1 class="m-u--h4 m-u--no-margin-top">MODUL <i class="m-u--font-size--s m-u--no-margin-top">Components</i></h1>
</header>
<div id="vue">... Waiting</div>
</body>
</html>
## Instruction:
Remove no-margin class on body tag
## Code After:
<!doctype html>
<html>
<head>
<title>MODUL - Components</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.mtest-header {
position: fixed;
top: 0;
right: 0;
left: 0;
z-index: 2;
padding: 16px 32px;
background: #fff;
}
.m-flex-template__menu,
.m-flex-template__page {
padding-top: 52px;
}
.mtest-header h1 {
display: flex;
justify-content: space-between;
align-items: center;
}
@media (max-width: 767px) {
.mtest-header {
padding: 16px;
}
}
</style>
</head>
<body class="m-u--app-body">
<header class="mtest-header m-u--box-shadow--s">
<h1 class="m-u--h4 m-u--no-margin-top">MODUL <i class="m-u--font-size--s m-u--no-margin-top">Components</i></h1>
</header>
<div id="vue">... Waiting</div>
</body>
</html>
| <!doctype html>
<html>
<head>
<title>MODUL - Components</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.mtest-header {
position: fixed;
top: 0;
right: 0;
left: 0;
z-index: 2;
padding: 16px 32px;
background: #fff;
}
.m-flex-template__menu,
.m-flex-template__page {
padding-top: 52px;
}
.mtest-header h1 {
display: flex;
justify-content: space-between;
align-items: center;
}
@media (max-width: 767px) {
.mtest-header {
padding: 16px;
}
}
</style>
</head>
- <body class="m-u--no-margin m-u--app-body">
? ---------------
+ <body class="m-u--app-body">
<header class="mtest-header m-u--box-shadow--s">
<h1 class="m-u--h4 m-u--no-margin-top">MODUL <i class="m-u--font-size--s m-u--no-margin-top">Components</i></h1>
</header>
<div id="vue">... Waiting</div>
</body>
</html> | 2 | 0.045455 | 1 | 1 |
f35dd5afc3232d49b27185cc4e411269317cf16c | src/qx/ui/core/Widget.hx | src/qx/ui/core/Widget.hx | package qx.ui.core;
extern class Widget extends LayoutItem
{
public function setVisibility(v:String):Void;
public function setDecorator(v:String):Void;
public function setAppearance(v:String):String;
public function updateAppearance():Void;
public function show():Void;
public function hide():Void;
public function isVisible():Bool;
public function focus():Void;
public function blur():Void;
}
| package qx.ui.core;
extern class Widget extends LayoutItem
{
public function setVisibility(v:String):Void;
public function getDecorator():Dynamic;
public function setDecorator(v:Dynamic):Void;
public function resetDecorator():Void;
public function getAppearance():String;
public function setAppearance(v:String):String;
public function updateAppearance():Void;
public function getBackgroundColor():Dynamic;
public function setBackgroundColor(value:Dynamic):Void;
public function syncWidget():Void;
public function show():Void;
public function hide():Void;
public function isVisible():Bool;
public function focus():Void;
public function blur():Void;
}
| Add theming methods to Qooxdoo bindings. | Add theming methods to Qooxdoo bindings.
We will need to use them in order to set/reset decorators or appearance.
| Haxe | bsd-3-clause | imps/cncta | haxe | ## Code Before:
package qx.ui.core;
extern class Widget extends LayoutItem
{
public function setVisibility(v:String):Void;
public function setDecorator(v:String):Void;
public function setAppearance(v:String):String;
public function updateAppearance():Void;
public function show():Void;
public function hide():Void;
public function isVisible():Bool;
public function focus():Void;
public function blur():Void;
}
## Instruction:
Add theming methods to Qooxdoo bindings.
We will need to use them in order to set/reset decorators or appearance.
## Code After:
package qx.ui.core;
extern class Widget extends LayoutItem
{
public function setVisibility(v:String):Void;
public function getDecorator():Dynamic;
public function setDecorator(v:Dynamic):Void;
public function resetDecorator():Void;
public function getAppearance():String;
public function setAppearance(v:String):String;
public function updateAppearance():Void;
public function getBackgroundColor():Dynamic;
public function setBackgroundColor(value:Dynamic):Void;
public function syncWidget():Void;
public function show():Void;
public function hide():Void;
public function isVisible():Bool;
public function focus():Void;
public function blur():Void;
}
| package qx.ui.core;
extern class Widget extends LayoutItem
{
public function setVisibility(v:String):Void;
- public function setDecorator(v:String):Void;
+ public function getDecorator():Dynamic;
+ public function setDecorator(v:Dynamic):Void;
+ public function resetDecorator():Void;
+
+ public function getAppearance():String;
public function setAppearance(v:String):String;
public function updateAppearance():Void;
+
+ public function getBackgroundColor():Dynamic;
+ public function setBackgroundColor(value:Dynamic):Void;
+
+ public function syncWidget():Void;
public function show():Void;
public function hide():Void;
public function isVisible():Bool;
public function focus():Void;
public function blur():Void;
} | 11 | 0.647059 | 10 | 1 |
d2a1af471b071f2cc8d7940ec887609577a3be8d | src/jsonapi/jsonapi-response.model.ts | src/jsonapi/jsonapi-response.model.ts | import { JSONAPIResourceObject } from './jsonapi-resource-object.model';
export class JSONAPIResponse<T extends JSONAPIResourceObject | JSONAPIResourceObject[]> {
public data: T;
public included: JSONAPIResourceObject[];
public constructor(json: {data: any, included?: any}) {
this.data = json.data;
this.included = json.included;
}
public toPayload(): T {
return this.data;
}
public toIncluded(): JSONAPIResourceObject | JSONAPIResourceObject[] {
return this.included;
}
public toIncludedByType<U extends JSONAPIResourceObject>(type: string): U[] {
return <U[]>this.included.filter((include: JSONAPIResourceObject) => include.type === type);
}
public toJSON(): {data: T, included?: JSONAPIResourceObject | JSONAPIResourceObject[]} {
if (this.included) {
return {data: this.data, included: this.included};
} else {
return {data: this.data};
}
}
} | import { JSONAPIResourceObject } from './jsonapi-resource-object.model';
export class JSONAPIResponse<T extends JSONAPIResourceObject | JSONAPIResourceObject[]> {
public data: T;
public included: JSONAPIResourceObject[];
public constructor(json: {data: any, included?: any}) {
this.data = json.data;
this.included = json.included;
}
public toPayload(): T {
return this.data;
}
public toIncluded(): JSONAPIResourceObject | JSONAPIResourceObject[] {
return this.included;
}
public toIncludedByType<U extends JSONAPIResourceObject>(type: string): U[] {
if (!this.included) {
return [];
}
return <U[]>this.included.filter((include: JSONAPIResourceObject) => include.type === type);
}
public toJSON(): {data: T, included?: JSONAPIResourceObject | JSONAPIResourceObject[]} {
if (this.included) {
return {data: this.data, included: this.included};
} else {
return {data: this.data};
}
}
}
| Return empty array when include not defined | Return empty array when include not defined
| TypeScript | mit | ValueMiner/ng2-valueminer-connector,ValueMiner/ng2-valueminer-connector | typescript | ## Code Before:
import { JSONAPIResourceObject } from './jsonapi-resource-object.model';
export class JSONAPIResponse<T extends JSONAPIResourceObject | JSONAPIResourceObject[]> {
public data: T;
public included: JSONAPIResourceObject[];
public constructor(json: {data: any, included?: any}) {
this.data = json.data;
this.included = json.included;
}
public toPayload(): T {
return this.data;
}
public toIncluded(): JSONAPIResourceObject | JSONAPIResourceObject[] {
return this.included;
}
public toIncludedByType<U extends JSONAPIResourceObject>(type: string): U[] {
return <U[]>this.included.filter((include: JSONAPIResourceObject) => include.type === type);
}
public toJSON(): {data: T, included?: JSONAPIResourceObject | JSONAPIResourceObject[]} {
if (this.included) {
return {data: this.data, included: this.included};
} else {
return {data: this.data};
}
}
}
## Instruction:
Return empty array when include not defined
## Code After:
import { JSONAPIResourceObject } from './jsonapi-resource-object.model';
export class JSONAPIResponse<T extends JSONAPIResourceObject | JSONAPIResourceObject[]> {
public data: T;
public included: JSONAPIResourceObject[];
public constructor(json: {data: any, included?: any}) {
this.data = json.data;
this.included = json.included;
}
public toPayload(): T {
return this.data;
}
public toIncluded(): JSONAPIResourceObject | JSONAPIResourceObject[] {
return this.included;
}
public toIncludedByType<U extends JSONAPIResourceObject>(type: string): U[] {
if (!this.included) {
return [];
}
return <U[]>this.included.filter((include: JSONAPIResourceObject) => include.type === type);
}
public toJSON(): {data: T, included?: JSONAPIResourceObject | JSONAPIResourceObject[]} {
if (this.included) {
return {data: this.data, included: this.included};
} else {
return {data: this.data};
}
}
}
| import { JSONAPIResourceObject } from './jsonapi-resource-object.model';
export class JSONAPIResponse<T extends JSONAPIResourceObject | JSONAPIResourceObject[]> {
public data: T;
public included: JSONAPIResourceObject[];
public constructor(json: {data: any, included?: any}) {
this.data = json.data;
this.included = json.included;
}
public toPayload(): T {
return this.data;
}
public toIncluded(): JSONAPIResourceObject | JSONAPIResourceObject[] {
return this.included;
}
public toIncludedByType<U extends JSONAPIResourceObject>(type: string): U[] {
+ if (!this.included) {
+ return [];
+ }
- return <U[]>this.included.filter((include: JSONAPIResourceObject) => include.type === type);
? --
+ return <U[]>this.included.filter((include: JSONAPIResourceObject) => include.type === type);
}
public toJSON(): {data: T, included?: JSONAPIResourceObject | JSONAPIResourceObject[]} {
if (this.included) {
return {data: this.data, included: this.included};
} else {
return {data: this.data};
}
}
} | 5 | 0.16129 | 4 | 1 |
360f0ae2a6fb312e29aed9c4a2d21cdf5c5f8b25 | README.md | README.md |
**cargonauts** is a Rust web framework intended for building long lasting,
maintainable web services.
**This project is an incomplete work in progress. Please do not attempt to use
it yet.**
```rust
#[macro_use]
extern crate cargonauts;
use cargonauts::api::{Resource, Get, Environment, Error};
use cargonauts::api::relations::GetOne;
use cargonauts::format::Debug;
use cargonauts::futures::{Future, BoxFuture, future};
#[derive(Debug)]
pub struct MyResource {
slug: String,
}
impl Resource for MyResource {
type Identifier = String;
fn identifier(&self) -> String { self.slug.clone() }
}
impl Get for MyResource {
fn get(slug: String, _: Environment) -> BoxFuture<MyResource, Error> {
future::ok(MyResource { slug }).boxed()
}
}
relation!(AllCaps => MyResource);
impl GetOne<AllCaps> for MyResource {
fn get_one(slug: String, _: Environment) -> BoxFuture<MyResource, Error> {
future::ok(MyResource { slug: slug.to_uppercase() }).boxed()
}
}
routes! {
resource MyResource {
method Get in Debug;
relation AllCaps {
method GetOne in Debug;
}
}
}
fn main() {
let socket_addr = "127.0.0.1:8000".parse().unwrap();
cargonauts::server::Http::new().bind(&socket_addr, routes).unwrap().run().unwrap();
}
```
## License
Cargonauts is primarily distributed under the terms of both the MIT license
and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT for details.
[json-api]: http://jsonapi.org
|
**cargonauts** is a Rust web framework intended for building long lasting,
maintainable web services.
**This project is an incomplete work in progress. Please do not attempt to use
it yet.**
## License
Cargonauts is primarily distributed under the terms of both the MIT license
and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT for details.
| Remove outdated code sample from readme. | Remove outdated code sample from readme.
| Markdown | apache-2.0 | cargonauts-rs/cargonauts,withoutboats/cargonauts,cargonauts-rs/cargonauts | markdown | ## Code Before:
**cargonauts** is a Rust web framework intended for building long lasting,
maintainable web services.
**This project is an incomplete work in progress. Please do not attempt to use
it yet.**
```rust
#[macro_use]
extern crate cargonauts;
use cargonauts::api::{Resource, Get, Environment, Error};
use cargonauts::api::relations::GetOne;
use cargonauts::format::Debug;
use cargonauts::futures::{Future, BoxFuture, future};
#[derive(Debug)]
pub struct MyResource {
slug: String,
}
impl Resource for MyResource {
type Identifier = String;
fn identifier(&self) -> String { self.slug.clone() }
}
impl Get for MyResource {
fn get(slug: String, _: Environment) -> BoxFuture<MyResource, Error> {
future::ok(MyResource { slug }).boxed()
}
}
relation!(AllCaps => MyResource);
impl GetOne<AllCaps> for MyResource {
fn get_one(slug: String, _: Environment) -> BoxFuture<MyResource, Error> {
future::ok(MyResource { slug: slug.to_uppercase() }).boxed()
}
}
routes! {
resource MyResource {
method Get in Debug;
relation AllCaps {
method GetOne in Debug;
}
}
}
fn main() {
let socket_addr = "127.0.0.1:8000".parse().unwrap();
cargonauts::server::Http::new().bind(&socket_addr, routes).unwrap().run().unwrap();
}
```
## License
Cargonauts is primarily distributed under the terms of both the MIT license
and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT for details.
[json-api]: http://jsonapi.org
## Instruction:
Remove outdated code sample from readme.
## Code After:
**cargonauts** is a Rust web framework intended for building long lasting,
maintainable web services.
**This project is an incomplete work in progress. Please do not attempt to use
it yet.**
## License
Cargonauts is primarily distributed under the terms of both the MIT license
and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT for details.
|
**cargonauts** is a Rust web framework intended for building long lasting,
maintainable web services.
**This project is an incomplete work in progress. Please do not attempt to use
it yet.**
-
- ```rust
- #[macro_use]
- extern crate cargonauts;
-
- use cargonauts::api::{Resource, Get, Environment, Error};
- use cargonauts::api::relations::GetOne;
- use cargonauts::format::Debug;
- use cargonauts::futures::{Future, BoxFuture, future};
-
- #[derive(Debug)]
- pub struct MyResource {
- slug: String,
- }
-
- impl Resource for MyResource {
- type Identifier = String;
- fn identifier(&self) -> String { self.slug.clone() }
- }
-
- impl Get for MyResource {
- fn get(slug: String, _: Environment) -> BoxFuture<MyResource, Error> {
- future::ok(MyResource { slug }).boxed()
- }
- }
-
- relation!(AllCaps => MyResource);
-
- impl GetOne<AllCaps> for MyResource {
- fn get_one(slug: String, _: Environment) -> BoxFuture<MyResource, Error> {
- future::ok(MyResource { slug: slug.to_uppercase() }).boxed()
- }
- }
-
- routes! {
- resource MyResource {
- method Get in Debug;
-
- relation AllCaps {
- method GetOne in Debug;
- }
- }
- }
-
- fn main() {
- let socket_addr = "127.0.0.1:8000".parse().unwrap();
- cargonauts::server::Http::new().bind(&socket_addr, routes).unwrap().run().unwrap();
- }
- ```
-
## License
Cargonauts is primarily distributed under the terms of both the MIT license
and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT for details.
-
- [json-api]: http://jsonapi.org | 52 | 0.8 | 0 | 52 |
f6f258337129216e7c454ebcae632e198ae719af | app/views/task_lists/_column.haml | app/views/task_lists/_column.haml | - if @task_list.nil?
- if project.editable?(current_user)
= task_list_link(project)
- else
%p= t('.cant_create')
- case location_name
- when 'show_tasks'
= task_overview_box(@task)
%h2= @task_list
= sidebar_tasks(@task_list.tasks.unarchived)
- when 'show_task_lists'
= task_list_overview_box(@task_list)
%h2= @task_list
= sidebar_tasks(@task_list.tasks.unarchived)
- when 'index_task_lists'
= filter_task_lists(project)
= banner(@events,@chart)
%h2= t('.other_views')
= subscribe_to_calendar_link(project)
= print_task_lists_link(project) | - if @task_list.nil?
- if project.editable?(current_user)
= task_list_link(project)
- else
%p= t('.cant_create')
- case location_name
- when 'show_tasks'
= task_overview_box(@task)
%h2= link_to @task_list, [@task_list.project, @task_list]
= sidebar_tasks(@task_list.tasks.unarchived)
- when 'show_task_lists'
= task_list_overview_box(@task_list)
%h2= @task_list
= sidebar_tasks(@task_list.tasks.unarchived)
- when 'index_task_lists'
= filter_task_lists(project)
= banner(@events,@chart)
%h2= t('.other_views')
= subscribe_to_calendar_link(project)
= print_task_lists_link(project) | Add link to the TaskList on the sidebar when showing a Task | Add link to the TaskList on the sidebar when showing a Task
| Haml | agpl-3.0 | vveliev/teambox,wesbillman/projects,nfredrik/teambox,teambox/teambox,codeforeurope/samenspel,rahouldatta/teambox,ccarruitero/teambox,teambox/teambox,ccarruitero/teambox,nfredrik/teambox,alx/teambox,vveliev/teambox,alx/teambox,wesbillman/projects,crewmate/crewmate,irfanah/teambox,crewmate/crewmate,rahouldatta/teambox,irfanah/teambox,crewmate/crewmate,rahouldatta/teambox,nfredrik/teambox,vveliev/teambox,nfredrik/teambox,irfanah/teambox,codeforeurope/samenspel,vveliev/teambox,irfanah/teambox,teambox/teambox | haml | ## Code Before:
- if @task_list.nil?
- if project.editable?(current_user)
= task_list_link(project)
- else
%p= t('.cant_create')
- case location_name
- when 'show_tasks'
= task_overview_box(@task)
%h2= @task_list
= sidebar_tasks(@task_list.tasks.unarchived)
- when 'show_task_lists'
= task_list_overview_box(@task_list)
%h2= @task_list
= sidebar_tasks(@task_list.tasks.unarchived)
- when 'index_task_lists'
= filter_task_lists(project)
= banner(@events,@chart)
%h2= t('.other_views')
= subscribe_to_calendar_link(project)
= print_task_lists_link(project)
## Instruction:
Add link to the TaskList on the sidebar when showing a Task
## Code After:
- if @task_list.nil?
- if project.editable?(current_user)
= task_list_link(project)
- else
%p= t('.cant_create')
- case location_name
- when 'show_tasks'
= task_overview_box(@task)
%h2= link_to @task_list, [@task_list.project, @task_list]
= sidebar_tasks(@task_list.tasks.unarchived)
- when 'show_task_lists'
= task_list_overview_box(@task_list)
%h2= @task_list
= sidebar_tasks(@task_list.tasks.unarchived)
- when 'index_task_lists'
= filter_task_lists(project)
= banner(@events,@chart)
%h2= t('.other_views')
= subscribe_to_calendar_link(project)
= print_task_lists_link(project) | - if @task_list.nil?
- if project.editable?(current_user)
= task_list_link(project)
- else
%p= t('.cant_create')
- case location_name
- when 'show_tasks'
= task_overview_box(@task)
- %h2= @task_list
+ %h2= link_to @task_list, [@task_list.project, @task_list]
= sidebar_tasks(@task_list.tasks.unarchived)
- when 'show_task_lists'
= task_list_overview_box(@task_list)
%h2= @task_list
= sidebar_tasks(@task_list.tasks.unarchived)
- when 'index_task_lists'
= filter_task_lists(project)
= banner(@events,@chart)
%h2= t('.other_views')
= subscribe_to_calendar_link(project)
= print_task_lists_link(project) | 2 | 0.074074 | 1 | 1 |
071c4cddaa23fad6ea13e2deba121dc2a6e3cbae | src/app/infrastructure/dom.factory.ts | src/app/infrastructure/dom.factory.ts | import { Dom } from "./dom";
import { Component } from "./component";
export class DomFactory {
static createElement(dom: Dom): HTMLElement {
const element = document.createElement(dom.tag);
if (dom.attributes) {
dom.attributes.forEach(attribute => {
element.setAttribute(attribute[0], attribute[1]);
});
}
if (dom.childs) {
dom.childs.forEach(child => {
if (typeof child === 'string') {
element.innerText = child as string;
}
else {
element.appendChild(this.createElement(child as Dom));
}
});
}
return element;
}
static createComponent(component: Component): HTMLElement {
const tag = component.constructor.name;
return this.createElement({
tag: tag,
childs: component.childs
});
}
} | import { Dom } from "./dom";
import { Component } from "./component";
export class DomFactory {
static createElement(dom: Dom): HTMLElement {
const element = document.createElement(dom.tag);
if (dom.attributes) {
dom.attributes.forEach(attribute => {
element.setAttribute(attribute[0], attribute[1]);
});
}
if (dom.childs) {
dom.childs.forEach(child => {
if (typeof child === 'string') {
element.innerText = child;
}
else {
element.appendChild(this.createElement(child as Dom));
}
});
}
return element;
}
static createComponent(component: Component): HTMLElement {
const tag = component
.constructor
.name
.replace(/([A-Z])/g, (word) => `-${word.toLowerCase()}`)
.replace('-component', (word) => '')
.substring(1);
return this.createElement({
tag: tag,
childs: component.childs
});
}
} | Add a convention to component tag name | Add a convention to component tag name
| TypeScript | mit | Vtek/frameworkless,Vtek/frameworkless,Vtek/frameworkless | typescript | ## Code Before:
import { Dom } from "./dom";
import { Component } from "./component";
export class DomFactory {
static createElement(dom: Dom): HTMLElement {
const element = document.createElement(dom.tag);
if (dom.attributes) {
dom.attributes.forEach(attribute => {
element.setAttribute(attribute[0], attribute[1]);
});
}
if (dom.childs) {
dom.childs.forEach(child => {
if (typeof child === 'string') {
element.innerText = child as string;
}
else {
element.appendChild(this.createElement(child as Dom));
}
});
}
return element;
}
static createComponent(component: Component): HTMLElement {
const tag = component.constructor.name;
return this.createElement({
tag: tag,
childs: component.childs
});
}
}
## Instruction:
Add a convention to component tag name
## Code After:
import { Dom } from "./dom";
import { Component } from "./component";
export class DomFactory {
static createElement(dom: Dom): HTMLElement {
const element = document.createElement(dom.tag);
if (dom.attributes) {
dom.attributes.forEach(attribute => {
element.setAttribute(attribute[0], attribute[1]);
});
}
if (dom.childs) {
dom.childs.forEach(child => {
if (typeof child === 'string') {
element.innerText = child;
}
else {
element.appendChild(this.createElement(child as Dom));
}
});
}
return element;
}
static createComponent(component: Component): HTMLElement {
const tag = component
.constructor
.name
.replace(/([A-Z])/g, (word) => `-${word.toLowerCase()}`)
.replace('-component', (word) => '')
.substring(1);
return this.createElement({
tag: tag,
childs: component.childs
});
}
} | import { Dom } from "./dom";
import { Component } from "./component";
export class DomFactory {
static createElement(dom: Dom): HTMLElement {
const element = document.createElement(dom.tag);
if (dom.attributes) {
dom.attributes.forEach(attribute => {
element.setAttribute(attribute[0], attribute[1]);
});
}
if (dom.childs) {
dom.childs.forEach(child => {
if (typeof child === 'string') {
- element.innerText = child as string;
? ----------
+ element.innerText = child;
}
else {
element.appendChild(this.createElement(child as Dom));
}
});
}
return element;
}
static createComponent(component: Component): HTMLElement {
- const tag = component.constructor.name;
? ------------------
+ const tag = component
+ .constructor
+ .name
+ .replace(/([A-Z])/g, (word) => `-${word.toLowerCase()}`)
+ .replace('-component', (word) => '')
+ .substring(1);
+
return this.createElement({
tag: tag,
childs: component.childs
});
}
} | 10 | 0.285714 | 8 | 2 |
db2697958dfbddbe8d44ba66bb5609507dc2b35e | app/views/venues/_form.html.haml | app/views/venues/_form.html.haml | %p
= form.label :name
%br
= form.text_field :name
%p
= form.label :address
%br
= form.text_field :address
%p
= form.label :comments
%br
= form.text_area :comments
%p
= form.label :location_id
%br
%select#venue_location_id{ :name => "venue[location_id]" }
%option{ :value => "" }
Please select a location
- Location.all.each do |location|
%option{ :value => location.id, :selected => location.id == @venue.location_id }
= h location.name
%p
= form.label :sheltered
%br
%input{:type=>"checkbox",:id=>"sheltered",:name=>"venue[sheltered]",:value=> "true",:checked=>@venue.sheltered} | %p
= form.label :name
%br
= form.text_field :name
%p
= form.label :address
%br
= form.text_field :address
%p
= form.label :comments
%br
= form.text_area :comments
%p
= form.label :location_id
%br
= collection_select(:venue, :location_id, Location.all, :location_id, :name, {:prompt => "Please select a location"})
%p
= form.label :sheltered
%br
%input{:type=>"checkbox",:id=>"sheltered",:name=>"venue[sheltered]",:value=> "true",:checked=>@venue.sheltered} | Use collection_select helper in venues form partial | Use collection_select helper in venues form partial | Haml | mit | pugnusferreus/lunchpicker,pugnusferreus/lunchpicker | haml | ## Code Before:
%p
= form.label :name
%br
= form.text_field :name
%p
= form.label :address
%br
= form.text_field :address
%p
= form.label :comments
%br
= form.text_area :comments
%p
= form.label :location_id
%br
%select#venue_location_id{ :name => "venue[location_id]" }
%option{ :value => "" }
Please select a location
- Location.all.each do |location|
%option{ :value => location.id, :selected => location.id == @venue.location_id }
= h location.name
%p
= form.label :sheltered
%br
%input{:type=>"checkbox",:id=>"sheltered",:name=>"venue[sheltered]",:value=> "true",:checked=>@venue.sheltered}
## Instruction:
Use collection_select helper in venues form partial
## Code After:
%p
= form.label :name
%br
= form.text_field :name
%p
= form.label :address
%br
= form.text_field :address
%p
= form.label :comments
%br
= form.text_area :comments
%p
= form.label :location_id
%br
= collection_select(:venue, :location_id, Location.all, :location_id, :name, {:prompt => "Please select a location"})
%p
= form.label :sheltered
%br
%input{:type=>"checkbox",:id=>"sheltered",:name=>"venue[sheltered]",:value=> "true",:checked=>@venue.sheltered} | %p
= form.label :name
%br
= form.text_field :name
%p
= form.label :address
%br
= form.text_field :address
%p
= form.label :comments
%br
= form.text_area :comments
%p
= form.label :location_id
%br
+ = collection_select(:venue, :location_id, Location.all, :location_id, :name, {:prompt => "Please select a location"})
- %select#venue_location_id{ :name => "venue[location_id]" }
- %option{ :value => "" }
- Please select a location
- - Location.all.each do |location|
- %option{ :value => location.id, :selected => location.id == @venue.location_id }
- = h location.name
%p
= form.label :sheltered
%br
%input{:type=>"checkbox",:id=>"sheltered",:name=>"venue[sheltered]",:value=> "true",:checked=>@venue.sheltered} | 7 | 0.241379 | 1 | 6 |
3035987f4fc0bcae48dbc37f240931689c7c7e01 | src/app/inventory/dimStoreReputation.scss | src/app/inventory/dimStoreReputation.scss | .reputation {
& .store-cell:first-child {
margin-left: 28px;
}
}
.factionrep {
margin: 2px 2px -2px 2px;
position: relative;
display: inline-block;
svg {
width: var(--item-size);
height: var(--item-size);
}
}
| .reputation {
& .store-cell:first-child {
margin-left: 28px;
}
}
.factionrep {
margin: 2px 2px -2px 2px;
position: relative;
display: inline-block;
svg {
width: calc(var(--item-size) + 4px);
height: calc(var(--item-size) + 4px);
}
}
| Increase rep size a bit | Increase rep size a bit
| SCSS | mit | delphiactual/DIM,chrisfried/DIM,DestinyItemManager/DIM,DestinyItemManager/DIM,delphiactual/DIM,chrisfried/DIM,bhollis/DIM,DestinyItemManager/DIM,bhollis/DIM,delphiactual/DIM,bhollis/DIM,delphiactual/DIM,chrisfried/DIM,DestinyItemManager/DIM,bhollis/DIM,chrisfried/DIM | scss | ## Code Before:
.reputation {
& .store-cell:first-child {
margin-left: 28px;
}
}
.factionrep {
margin: 2px 2px -2px 2px;
position: relative;
display: inline-block;
svg {
width: var(--item-size);
height: var(--item-size);
}
}
## Instruction:
Increase rep size a bit
## Code After:
.reputation {
& .store-cell:first-child {
margin-left: 28px;
}
}
.factionrep {
margin: 2px 2px -2px 2px;
position: relative;
display: inline-block;
svg {
width: calc(var(--item-size) + 4px);
height: calc(var(--item-size) + 4px);
}
}
| .reputation {
& .store-cell:first-child {
margin-left: 28px;
}
}
.factionrep {
margin: 2px 2px -2px 2px;
position: relative;
display: inline-block;
svg {
- width: var(--item-size);
+ width: calc(var(--item-size) + 4px);
? +++++ +++++++
- height: var(--item-size);
+ height: calc(var(--item-size) + 4px);
? +++++ +++++++
}
} | 4 | 0.25 | 2 | 2 |
673eaff23454bdfeffcb21a11e9775de215fa5ae | src/Modules/Content/Dnn.PersonaBar.Pages/Pages.Web/src/components/DropdownDayPicker/styles.less | src/Modules/Content/Dnn.PersonaBar.Pages/Pages.Web/src/components/DropdownDayPicker/styles.less | @import "~dnn-global-styles/index";
.date-picker{
.calendar-dropdown {
.calendar-dropdown-action-buttons {
width: "100%";
text-align: "center";
height: "30%";
}
}
} | @import "~dnn-global-styles/index";
.date-picker{
.calendar-dropdown {
.calendar-dropdown-action-buttons {
width: "100%";
text-align: "center";
display: "inline-block";
}
}
} | Fix date-picker style for long description on field | DNN-18548: Fix date-picker style for long description on field
| Less | mit | valadas/Dnn.Platform,robsiera/Dnn.Platform,nvisionative/Dnn.Platform,valadas/Dnn.Platform,dnnsoftware/Dnn.Platform,valadas/Dnn.Platform,dnnsoftware/Dnn.Platform,valadas/Dnn.Platform,dnnsoftware/Dnn.Platform,RichardHowells/Dnn.Platform,nvisionative/Dnn.Platform,RichardHowells/Dnn.Platform,dnnsoftware/Dnn.Platform,bdukes/Dnn.Platform,dnnsoftware/Dnn.Platform,mitchelsellers/Dnn.Platform,mitchelsellers/Dnn.Platform,RichardHowells/Dnn.Platform,robsiera/Dnn.Platform,mitchelsellers/Dnn.Platform,dnnsoftware/Dnn.AdminExperience.Extensions,dnnsoftware/Dnn.AdminExperience.Extensions,EPTamminga/Dnn.Platform,EPTamminga/Dnn.Platform,nvisionative/Dnn.Platform,dnnsoftware/Dnn.AdminExperience.Extensions,bdukes/Dnn.Platform,RichardHowells/Dnn.Platform,valadas/Dnn.Platform,mitchelsellers/Dnn.Platform,EPTamminga/Dnn.Platform,bdukes/Dnn.Platform,mitchelsellers/Dnn.Platform,robsiera/Dnn.Platform,bdukes/Dnn.Platform | less | ## Code Before:
@import "~dnn-global-styles/index";
.date-picker{
.calendar-dropdown {
.calendar-dropdown-action-buttons {
width: "100%";
text-align: "center";
height: "30%";
}
}
}
## Instruction:
DNN-18548: Fix date-picker style for long description on field
## Code After:
@import "~dnn-global-styles/index";
.date-picker{
.calendar-dropdown {
.calendar-dropdown-action-buttons {
width: "100%";
text-align: "center";
display: "inline-block";
}
}
} | @import "~dnn-global-styles/index";
.date-picker{
.calendar-dropdown {
.calendar-dropdown-action-buttons {
width: "100%";
text-align: "center";
- height: "30%";
+ display: "inline-block";
}
}
} | 2 | 0.2 | 1 | 1 |
c568f4d3ea475f341490bc81e89c28016e8412a2 | corehq/apps/locations/dbaccessors.py | corehq/apps/locations/dbaccessors.py | from corehq.apps.users.models import CommCareUser
def _users_by_location(location_id, include_docs):
return CommCareUser.view(
'locations/users_by_location_id',
startkey=[location_id],
endkey=[location_id, {}],
include_docs=include_docs,
).all()
def get_users_by_location_id(location_id):
"""
Get all users for a given location
"""
return _users_by_location(location_id, include_docs=True)
def get_user_ids_by_location(location_id):
return [user['id'] for user in
_users_by_location(location_id, include_docs=False)]
| from corehq.apps.users.models import CommCareUser
def _users_by_location(location_id, include_docs, wrap):
view = CommCareUser.view if wrap else CommCareUser.get_db().view
return view(
'locations/users_by_location_id',
startkey=[location_id],
endkey=[location_id, {}],
include_docs=include_docs,
).all()
def get_users_by_location_id(location_id, wrap=True):
"""
Get all users for a given location
"""
return _users_by_location(location_id, include_docs=True, wrap=wrap)
def get_user_ids_by_location(location_id):
return [user['id'] for user in
_users_by_location(location_id, include_docs=False, wrap=False)]
| Allow getting the unwrapped doc | Allow getting the unwrapped doc
| Python | bsd-3-clause | qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq | python | ## Code Before:
from corehq.apps.users.models import CommCareUser
def _users_by_location(location_id, include_docs):
return CommCareUser.view(
'locations/users_by_location_id',
startkey=[location_id],
endkey=[location_id, {}],
include_docs=include_docs,
).all()
def get_users_by_location_id(location_id):
"""
Get all users for a given location
"""
return _users_by_location(location_id, include_docs=True)
def get_user_ids_by_location(location_id):
return [user['id'] for user in
_users_by_location(location_id, include_docs=False)]
## Instruction:
Allow getting the unwrapped doc
## Code After:
from corehq.apps.users.models import CommCareUser
def _users_by_location(location_id, include_docs, wrap):
view = CommCareUser.view if wrap else CommCareUser.get_db().view
return view(
'locations/users_by_location_id',
startkey=[location_id],
endkey=[location_id, {}],
include_docs=include_docs,
).all()
def get_users_by_location_id(location_id, wrap=True):
"""
Get all users for a given location
"""
return _users_by_location(location_id, include_docs=True, wrap=wrap)
def get_user_ids_by_location(location_id):
return [user['id'] for user in
_users_by_location(location_id, include_docs=False, wrap=False)]
| from corehq.apps.users.models import CommCareUser
- def _users_by_location(location_id, include_docs):
+ def _users_by_location(location_id, include_docs, wrap):
? ++++++
- return CommCareUser.view(
+ view = CommCareUser.view if wrap else CommCareUser.get_db().view
+ return view(
'locations/users_by_location_id',
startkey=[location_id],
endkey=[location_id, {}],
include_docs=include_docs,
).all()
- def get_users_by_location_id(location_id):
+ def get_users_by_location_id(location_id, wrap=True):
? +++++++++++
"""
Get all users for a given location
"""
- return _users_by_location(location_id, include_docs=True)
+ return _users_by_location(location_id, include_docs=True, wrap=wrap)
? +++++++++++
def get_user_ids_by_location(location_id):
return [user['id'] for user in
- _users_by_location(location_id, include_docs=False)]
+ _users_by_location(location_id, include_docs=False, wrap=False)]
? ++++++++++++
| 11 | 0.5 | 6 | 5 |
791b7af1287bed046e3bdab336b17bdc521dd39d | appveyor.yml | appveyor.yml | ---
version: "{build}"
clone_depth: 10
install:
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
- ruby --version
- gem --version
- gem install bundler --quiet --no-ri --no-rdoc
- bundler --version
- bundle install --without benchmarks --path vendor/bundle
build_script:
- bundle exec rake compile
test_script:
- '"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql" --version'
- >
"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql" -u root -p"Password12!" -e "
CREATE DATABASE IF NOT EXISTS test;
CREATE USER '%USERNAME%'@'localhost';
SET PASSWORD = PASSWORD('');
FLUSH PRIVILEGES;
"
- bundle exec rake spec
# Where do I get Unix find?
#on_failure:
# - find tmp -name "*.log" -exec cat {};
environment:
matrix:
- ruby_version: "200"
- ruby_version: "200-x64"
- ruby_version: "21"
- ruby_version: "21-x64"
cache:
- vendor
services:
- mysql
| ---
version: "{build}"
clone_depth: 10
install:
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
- ruby --version
- gem --version
- gem install bundler --quiet --no-ri --no-rdoc
- bundler --version
- bundle install --without benchmarks --path vendor/bundle
build_script:
- bundle exec rake compile
test_script:
- '"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql" --version'
- >
"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql" -u root -p"Password12!" -e "
CREATE DATABASE IF NOT EXISTS test;
CREATE USER '%USERNAME%'@'localhost';
SET PASSWORD = PASSWORD('');
FLUSH PRIVILEGES;
"
- bundle exec rake spec
# Where do I get Unix find?
#on_failure:
# - find tmp -name "*.log" -exec cat {};
environment:
matrix:
- ruby_version: "200"
- ruby_version: "200-x64"
- ruby_version: "21"
- ruby_version: "21-x64"
- ruby_version: "22"
- ruby_version: "22-x64"
cache:
- vendor
services:
- mysql
| Add Ruby 2.2 to the Appveyor matrix | Add Ruby 2.2 to the Appveyor matrix
| YAML | mit | zBMNForks/mysql2,modulexcite/mysql2,marshall-lee/mysql2,marshall-lee/mysql2,yui-knk/mysql2,sodabrew/mysql2,kamipo/mysql2,kamipo/mysql2,zmack/mysql2,yui-knk/mysql2,jconroy77/mysql2,sodabrew/mysql2,zBMNForks/mysql2,tamird/mysql2,modulexcite/mysql2,modulexcite/mysql2,zBMNForks/mysql2,sodabrew/mysql2,yui-knk/mysql2,brianmario/mysql2,jeremy/mysql2,brianmario/mysql2,modulexcite/mysql2,jconroy77/mysql2,mkdynamic/mysql2,mkdynamic/mysql2,kamipo/mysql2,zmack/mysql2,marshall-lee/mysql2,tamird/mysql2,webdev1001/mysql2,webdev1001/mysql2,brianmario/mysql2,bigcartel/mysql2,zmack/mysql2,bigcartel/mysql2,yui-knk/mysql2,bigcartel/mysql2,kamipo/mysql2,marshall-lee/mysql2,zBMNForks/mysql2,tamird/mysql2,jconroy77/mysql2,jeremy/mysql2,mkdynamic/mysql2,tamird/mysql2,bigcartel/mysql2,webdev1001/mysql2,jeremy/mysql2,webdev1001/mysql2,zmack/mysql2,mkdynamic/mysql2,jconroy77/mysql2 | yaml | ## Code Before:
---
version: "{build}"
clone_depth: 10
install:
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
- ruby --version
- gem --version
- gem install bundler --quiet --no-ri --no-rdoc
- bundler --version
- bundle install --without benchmarks --path vendor/bundle
build_script:
- bundle exec rake compile
test_script:
- '"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql" --version'
- >
"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql" -u root -p"Password12!" -e "
CREATE DATABASE IF NOT EXISTS test;
CREATE USER '%USERNAME%'@'localhost';
SET PASSWORD = PASSWORD('');
FLUSH PRIVILEGES;
"
- bundle exec rake spec
# Where do I get Unix find?
#on_failure:
# - find tmp -name "*.log" -exec cat {};
environment:
matrix:
- ruby_version: "200"
- ruby_version: "200-x64"
- ruby_version: "21"
- ruby_version: "21-x64"
cache:
- vendor
services:
- mysql
## Instruction:
Add Ruby 2.2 to the Appveyor matrix
## Code After:
---
version: "{build}"
clone_depth: 10
install:
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
- ruby --version
- gem --version
- gem install bundler --quiet --no-ri --no-rdoc
- bundler --version
- bundle install --without benchmarks --path vendor/bundle
build_script:
- bundle exec rake compile
test_script:
- '"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql" --version'
- >
"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql" -u root -p"Password12!" -e "
CREATE DATABASE IF NOT EXISTS test;
CREATE USER '%USERNAME%'@'localhost';
SET PASSWORD = PASSWORD('');
FLUSH PRIVILEGES;
"
- bundle exec rake spec
# Where do I get Unix find?
#on_failure:
# - find tmp -name "*.log" -exec cat {};
environment:
matrix:
- ruby_version: "200"
- ruby_version: "200-x64"
- ruby_version: "21"
- ruby_version: "21-x64"
- ruby_version: "22"
- ruby_version: "22-x64"
cache:
- vendor
services:
- mysql
| ---
version: "{build}"
clone_depth: 10
install:
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
- ruby --version
- gem --version
- gem install bundler --quiet --no-ri --no-rdoc
- bundler --version
- bundle install --without benchmarks --path vendor/bundle
build_script:
- bundle exec rake compile
test_script:
- '"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql" --version'
- >
"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql" -u root -p"Password12!" -e "
CREATE DATABASE IF NOT EXISTS test;
CREATE USER '%USERNAME%'@'localhost';
SET PASSWORD = PASSWORD('');
FLUSH PRIVILEGES;
"
- bundle exec rake spec
# Where do I get Unix find?
#on_failure:
# - find tmp -name "*.log" -exec cat {};
environment:
matrix:
- ruby_version: "200"
- ruby_version: "200-x64"
- ruby_version: "21"
- ruby_version: "21-x64"
+ - ruby_version: "22"
+ - ruby_version: "22-x64"
cache:
- vendor
services:
- mysql | 2 | 0.057143 | 2 | 0 |
c317774e714a0c509b338b551b4a81fae7665e82 | portfolio/frontend/src/App.js | portfolio/frontend/src/App.js | import "./App.css"
import { BrowserRouter, Route } from "react-router-dom"
import Login from "./containers/Login/Login"
import SGonksPlatfrom from "./containers/SGonksPlatform/SGonksPlatform"
function App() {
return (
<BrowserRouter>
<div className="App">
<Route path="/" exact component={Login}></Route>
<Route path="/sgonks-platform" component={SGonksPlatfrom}></Route>
</div>
</BrowserRouter>
)
}
export default App
| import './App.css'
import { BrowserRouter, Route } from 'react-router-dom'
import Login from './containers/Login/Login'
import SGonksPlatfrom from './containers/SGonksPlatform/SGonksPlatform'
function App() {
return (
<BrowserRouter>
<div className='App'>
<Route path='/' exact component={Login}></Route>
<Route path='/sgonks-platform' component={SGonksPlatfrom}></Route>
</div>
</BrowserRouter>
)
}
export default App
| Change double quotes to single quotes to satisfy linter | Change double quotes to single quotes to satisfy linter
| JavaScript | apache-2.0 | googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks | javascript | ## Code Before:
import "./App.css"
import { BrowserRouter, Route } from "react-router-dom"
import Login from "./containers/Login/Login"
import SGonksPlatfrom from "./containers/SGonksPlatform/SGonksPlatform"
function App() {
return (
<BrowserRouter>
<div className="App">
<Route path="/" exact component={Login}></Route>
<Route path="/sgonks-platform" component={SGonksPlatfrom}></Route>
</div>
</BrowserRouter>
)
}
export default App
## Instruction:
Change double quotes to single quotes to satisfy linter
## Code After:
import './App.css'
import { BrowserRouter, Route } from 'react-router-dom'
import Login from './containers/Login/Login'
import SGonksPlatfrom from './containers/SGonksPlatform/SGonksPlatform'
function App() {
return (
<BrowserRouter>
<div className='App'>
<Route path='/' exact component={Login}></Route>
<Route path='/sgonks-platform' component={SGonksPlatfrom}></Route>
</div>
</BrowserRouter>
)
}
export default App
| - import "./App.css"
? ^ ^
+ import './App.css'
? ^ ^
- import { BrowserRouter, Route } from "react-router-dom"
? ^ ^
+ import { BrowserRouter, Route } from 'react-router-dom'
? ^ ^
- import Login from "./containers/Login/Login"
? ^ ^
+ import Login from './containers/Login/Login'
? ^ ^
- import SGonksPlatfrom from "./containers/SGonksPlatform/SGonksPlatform"
? ^ ^
+ import SGonksPlatfrom from './containers/SGonksPlatform/SGonksPlatform'
? ^ ^
function App() {
return (
<BrowserRouter>
- <div className="App">
? ^ ^
+ <div className='App'>
? ^ ^
- <Route path="/" exact component={Login}></Route>
? ^ ^
+ <Route path='/' exact component={Login}></Route>
? ^ ^
- <Route path="/sgonks-platform" component={SGonksPlatfrom}></Route>
? ^ ^
+ <Route path='/sgonks-platform' component={SGonksPlatfrom}></Route>
? ^ ^
</div>
</BrowserRouter>
)
}
export default App | 14 | 0.777778 | 7 | 7 |
36b6f0c1d9851d2edcc777935f98f0a7b4af35a6 | test/.eslintrc.yml | test/.eslintrc.yml | ---
# See https://github.com/avajs/eslint-plugin-ava#usage
plugins:
- ava
rules:
ava/assertion-arguments: error
ava/max-asserts:
- 'off'
- 5
ava/no-async-fn-without-await: error
ava/no-cb-test: 'off'
ava/no-duplicate-modifiers: error
ava/no-identical-title: error
ava/no-ignored-test-files: error
ava/no-invalid-end: error
ava/no-nested-tests: error
ava/no-only-test: error
ava/no-skip-assert: error
# Allow skipping tests
ava/no-skip-test: off
ava/no-statement-after-end: error
ava/no-todo-implementation: error
ava/no-todo-test: warn
ava/no-unknown-modifiers: error
ava/prefer-async-await: error
ava/prefer-power-assert: 'off'
ava/test-ended: error
ava/test-title:
- error
- if-multiple
ava/use-t-well: error
ava/use-t: error
ava/use-test: error
ava/use-true-false: error
# t variable is used for tests
id-length:
- error
- exceptions:
- t
# Support should constructs like result.should.be.true;
no-unused-expressions: 'off'
# Allow local requires for tests
global-require: 'off'
# Allow t.context reassignment
no-param-reassign:
- error
- props: true
ignorePropertyModificationsFor:
- t
| ---
extends: "@dosomething/eslint-config/node/ava"
rules:
# Allow skipping tests for now
ava/no-skip-test: off
| Use provided ava eslint configuration | Use provided ava eslint configuration
| YAML | mit | DoSomething/blink,DoSomething/blink | yaml | ## Code Before:
---
# See https://github.com/avajs/eslint-plugin-ava#usage
plugins:
- ava
rules:
ava/assertion-arguments: error
ava/max-asserts:
- 'off'
- 5
ava/no-async-fn-without-await: error
ava/no-cb-test: 'off'
ava/no-duplicate-modifiers: error
ava/no-identical-title: error
ava/no-ignored-test-files: error
ava/no-invalid-end: error
ava/no-nested-tests: error
ava/no-only-test: error
ava/no-skip-assert: error
# Allow skipping tests
ava/no-skip-test: off
ava/no-statement-after-end: error
ava/no-todo-implementation: error
ava/no-todo-test: warn
ava/no-unknown-modifiers: error
ava/prefer-async-await: error
ava/prefer-power-assert: 'off'
ava/test-ended: error
ava/test-title:
- error
- if-multiple
ava/use-t-well: error
ava/use-t: error
ava/use-test: error
ava/use-true-false: error
# t variable is used for tests
id-length:
- error
- exceptions:
- t
# Support should constructs like result.should.be.true;
no-unused-expressions: 'off'
# Allow local requires for tests
global-require: 'off'
# Allow t.context reassignment
no-param-reassign:
- error
- props: true
ignorePropertyModificationsFor:
- t
## Instruction:
Use provided ava eslint configuration
## Code After:
---
extends: "@dosomething/eslint-config/node/ava"
rules:
# Allow skipping tests for now
ava/no-skip-test: off
| ---
+ extends: "@dosomething/eslint-config/node/ava"
- # See https://github.com/avajs/eslint-plugin-ava#usage
- plugins:
- - ava
rules:
- ava/assertion-arguments: error
- ava/max-asserts:
- - 'off'
- - 5
- ava/no-async-fn-without-await: error
- ava/no-cb-test: 'off'
- ava/no-duplicate-modifiers: error
- ava/no-identical-title: error
- ava/no-ignored-test-files: error
- ava/no-invalid-end: error
- ava/no-nested-tests: error
- ava/no-only-test: error
- ava/no-skip-assert: error
- # Allow skipping tests
+ # Allow skipping tests for now
? ++++++++
ava/no-skip-test: off
- ava/no-statement-after-end: error
- ava/no-todo-implementation: error
- ava/no-todo-test: warn
- ava/no-unknown-modifiers: error
- ava/prefer-async-await: error
- ava/prefer-power-assert: 'off'
- ava/test-ended: error
- ava/test-title:
- - error
- - if-multiple
- ava/use-t-well: error
- ava/use-t: error
- ava/use-test: error
- ava/use-true-false: error
- # t variable is used for tests
- id-length:
- - error
- - exceptions:
- - t
- # Support should constructs like result.should.be.true;
- no-unused-expressions: 'off'
- # Allow local requires for tests
- global-require: 'off'
- # Allow t.context reassignment
- no-param-reassign:
- - error
- - props: true
- ignorePropertyModificationsFor:
- - t | 48 | 0.979592 | 2 | 46 |
c5a5dca212756eda1b14bb3b031981f928f8f173 | lilswf.js | lilswf.js | var lilswf = function(){
var window,
undefined,
self = this;
self.raw = "",
self.version = [],
self.installed = self.isCool = false;
function activeXObjectGetVariable(activeXObj, name){
try{
return activeXObj.GetVariable(name);
}catch(e){
return "";
}
}
function newActiveObject(name){
try{
return new ActiveXObject(name);
}catch(e){
return undefined;
}
}
function parseActiveXVersionVariable(raw){
var parts = raw.split(","),
version = [],
i = 0,
l = parts.length;
for(; i < l; i++){
version[i] = parseInt(parts[i], 10) || -1;
}
return version;
}
self.atLeast = function(){
return false;
};
return self;
}();
| /**
* lil lib to help you detect flash.
* NOTE: I am not production ready yet.
*/
var lilswf = function(){
var window,
undefined,
self = this;
self.raw = "",
self.version = [],
self.installed = self.isCool = false;
/**
* A safe accessor for the native ActiveX GetVariable method.
*
* @param {Object} activeXObj A reference to an ActiveXObject.
* @param {String} name The variable name for lookup.
* @type {String}
* @return The value of the AxtiveX if it is found or an empty string.
*/
function activeXObjectGetVariable(activeXObj, name){
try{
return activeXObj.GetVariable(name);
}catch(e){
return "";
}
}
/**
* A safe accessor for creating a native ActiveX object
*
* @param {String} name The ActiveX object name lookup.
* @type Object || undefined
* @return One of an ActiveX object or undefined.
*/
function newActiveObject(name){
try{
return new ActiveXObject(name);
}catch(e){
return undefined;
}
}
/**
* Parse an ActiveX $version variable into properly casted members:
*
* @param {String} raw The ActiveX Object GetVariable($version) string return value.
* @type Array
* @return An array of integers casted from the original raw version string. Values that can't be casted are returned as a -1 value.
*/
function parseActiveXVersionVariable(raw){
var parts = raw.match(/[0-9]+/g),
i = 0,
l = parts.length;
for(; i < l; i++){
parts[i] = parts[i], 10);
}
return parts;
}
/**
* TBD.
*
* @params arguments
* @type Boolean
*/
self.atLeast = function(){
return false;
};
return self;
}();
| Add jsdocs back. Migrate to rex in string parser. | Add jsdocs back. Migrate to rex in string parser.
| JavaScript | mit | docyes/lilswf | javascript | ## Code Before:
var lilswf = function(){
var window,
undefined,
self = this;
self.raw = "",
self.version = [],
self.installed = self.isCool = false;
function activeXObjectGetVariable(activeXObj, name){
try{
return activeXObj.GetVariable(name);
}catch(e){
return "";
}
}
function newActiveObject(name){
try{
return new ActiveXObject(name);
}catch(e){
return undefined;
}
}
function parseActiveXVersionVariable(raw){
var parts = raw.split(","),
version = [],
i = 0,
l = parts.length;
for(; i < l; i++){
version[i] = parseInt(parts[i], 10) || -1;
}
return version;
}
self.atLeast = function(){
return false;
};
return self;
}();
## Instruction:
Add jsdocs back. Migrate to rex in string parser.
## Code After:
/**
* lil lib to help you detect flash.
* NOTE: I am not production ready yet.
*/
var lilswf = function(){
var window,
undefined,
self = this;
self.raw = "",
self.version = [],
self.installed = self.isCool = false;
/**
* A safe accessor for the native ActiveX GetVariable method.
*
* @param {Object} activeXObj A reference to an ActiveXObject.
* @param {String} name The variable name for lookup.
* @type {String}
* @return The value of the AxtiveX if it is found or an empty string.
*/
function activeXObjectGetVariable(activeXObj, name){
try{
return activeXObj.GetVariable(name);
}catch(e){
return "";
}
}
/**
* A safe accessor for creating a native ActiveX object
*
* @param {String} name The ActiveX object name lookup.
* @type Object || undefined
* @return One of an ActiveX object or undefined.
*/
function newActiveObject(name){
try{
return new ActiveXObject(name);
}catch(e){
return undefined;
}
}
/**
* Parse an ActiveX $version variable into properly casted members:
*
* @param {String} raw The ActiveX Object GetVariable($version) string return value.
* @type Array
* @return An array of integers casted from the original raw version string. Values that can't be casted are returned as a -1 value.
*/
function parseActiveXVersionVariable(raw){
var parts = raw.match(/[0-9]+/g),
i = 0,
l = parts.length;
for(; i < l; i++){
parts[i] = parts[i], 10);
}
return parts;
}
/**
* TBD.
*
* @params arguments
* @type Boolean
*/
self.atLeast = function(){
return false;
};
return self;
}();
| + /**
+ * lil lib to help you detect flash.
+ * NOTE: I am not production ready yet.
+ */
var lilswf = function(){
var window,
undefined,
self = this;
self.raw = "",
self.version = [],
self.installed = self.isCool = false;
+ /**
+ * A safe accessor for the native ActiveX GetVariable method.
+ *
+ * @param {Object} activeXObj A reference to an ActiveXObject.
+ * @param {String} name The variable name for lookup.
+ * @type {String}
+ * @return The value of the AxtiveX if it is found or an empty string.
+ */
function activeXObjectGetVariable(activeXObj, name){
try{
return activeXObj.GetVariable(name);
}catch(e){
return "";
}
}
+ /**
+ * A safe accessor for creating a native ActiveX object
+ *
+ * @param {String} name The ActiveX object name lookup.
+ * @type Object || undefined
+ * @return One of an ActiveX object or undefined.
+ */
function newActiveObject(name){
try{
return new ActiveXObject(name);
}catch(e){
return undefined;
}
}
+ /**
+ * Parse an ActiveX $version variable into properly casted members:
+ *
+ * @param {String} raw The ActiveX Object GetVariable($version) string return value.
+ * @type Array
+ * @return An array of integers casted from the original raw version string. Values that can't be casted are returned as a -1 value.
+ */
function parseActiveXVersionVariable(raw){
+ var parts = raw.match(/[0-9]+/g),
- var parts = raw.split(","),
- version = [],
i = 0,
l = parts.length;
for(; i < l; i++){
- version[i] = parseInt(parts[i], 10) || -1;
+ parts[i] = parts[i], 10);
}
- return version;
? ^^ ---
+ return parts;
? ^^ +
}
+ /**
+ * TBD.
+ *
+ * @params arguments
+ * @type Boolean
+ */
self.atLeast = function(){
return false;
};
return self;
}(); | 39 | 1.083333 | 35 | 4 |
195cc99631cfdd63dbbf8e6e9cddb35b10dd5a0e | _config.yml | _config.yml | permalink: pretty
relative_permalinks: true
# Setup
title: Kir Shatrov blog
tagline: ''
description: 'My personal blog, mostly about technical staff.'
url: http://blog.iempire.ru
baseurl: ''
paginate: 8
exclude: [vendor]
# About/contact
author:
name: Kir Shatrov
url: https://iempire.ru
email: shatrov@me.com
twitter: kirshatrov
# Custom vars
version: 1.0.0
disqus: true
disqus_shortname: 'iempire-blog'
gems:
- jekyll-sitemap
| permalink: pretty
# Setup
title: Kir Shatrov blog
tagline: ''
description: 'My personal blog, mostly about technical staff.'
url: http://blog.iempire.ru
baseurl: ''
paginate: 8
exclude: [vendor]
# About/contact
author:
name: Kir Shatrov
url: https://iempire.ru
email: shatrov@me.com
twitter: kirshatrov
# Custom vars
version: 1.0.0
disqus: true
disqus_shortname: 'iempire-blog'
gems:
- jekyll-sitemap
| Remove `relative_permalinks` option for Github | Remove `relative_permalinks` option for Github | YAML | mit | kirs/blog,kirs/blog | yaml | ## Code Before:
permalink: pretty
relative_permalinks: true
# Setup
title: Kir Shatrov blog
tagline: ''
description: 'My personal blog, mostly about technical staff.'
url: http://blog.iempire.ru
baseurl: ''
paginate: 8
exclude: [vendor]
# About/contact
author:
name: Kir Shatrov
url: https://iempire.ru
email: shatrov@me.com
twitter: kirshatrov
# Custom vars
version: 1.0.0
disqus: true
disqus_shortname: 'iempire-blog'
gems:
- jekyll-sitemap
## Instruction:
Remove `relative_permalinks` option for Github
## Code After:
permalink: pretty
# Setup
title: Kir Shatrov blog
tagline: ''
description: 'My personal blog, mostly about technical staff.'
url: http://blog.iempire.ru
baseurl: ''
paginate: 8
exclude: [vendor]
# About/contact
author:
name: Kir Shatrov
url: https://iempire.ru
email: shatrov@me.com
twitter: kirshatrov
# Custom vars
version: 1.0.0
disqus: true
disqus_shortname: 'iempire-blog'
gems:
- jekyll-sitemap
| permalink: pretty
- relative_permalinks: true
# Setup
title: Kir Shatrov blog
tagline: ''
description: 'My personal blog, mostly about technical staff.'
url: http://blog.iempire.ru
baseurl: ''
paginate: 8
exclude: [vendor]
# About/contact
author:
name: Kir Shatrov
url: https://iempire.ru
email: shatrov@me.com
twitter: kirshatrov
# Custom vars
version: 1.0.0
disqus: true
disqus_shortname: 'iempire-blog'
gems:
- jekyll-sitemap | 1 | 0.038462 | 0 | 1 |
d47684c734a87868ac2c2c1ac2f91b74facb977b | src/exploud/info.clj | src/exploud/info.clj | (ns exploud.info
"## For grabbing information about the things we're dealing with"
(:require [exploud
[asgard :as asgard]
[onix :as onix]
[tyranitar :as tyr]]))
(defn applications
"The list of applications Asgard knows about."
[]
{:names (map :name (asgard/applications))})
(defn application
"The information about a particular application."
[region application-name]
(if-let [full-application (asgard/application region application-name)]
(merge {:name application-name}
(select-keys (:app full-application)
[:description :email :owner]))))
(defn upsert-application
"Upserts an application into Onix, Tyranitar and Asgard. This function can be
run many times, it won't fail if the application is present in any of the
stores."
[region application-name details]
(let [onix-application (onix/upsert-application application-name)
tyranitar-application (tyr/upsert-application application-name)]
(asgard/upsert-application application-name details)
(merge (application region application-name) tyranitar-application)))
| (ns exploud.info
"## For grabbing information about the things we're dealing with"
(:require [exploud
[asgard :as asgard]
[onix :as onix]
[tyranitar :as tyr]]))
(defn applications
"The list of applications Onix knows about."
[]
{:names (map :name (onix/applications))})
(defn application
"The information about a particular application."
[region application-name]
(if-let [full-application (asgard/application region application-name)]
(merge {:name application-name}
(select-keys (:app full-application)
[:description :email :owner]))))
(defn upsert-application
"Upserts an application into Onix, Tyranitar and Asgard. This function can be
run many times, it won't fail if the application is present in any of the
stores."
[region application-name details]
(let [onix-application (onix/upsert-application application-name)
tyranitar-application (tyr/upsert-application application-name)]
(asgard/upsert-application application-name details)
(merge (application region application-name) tyranitar-application)))
| Make Exploud list the applications from Onix | Make Exploud list the applications from Onix
| Clojure | bsd-3-clause | mixradio/mr-maestro | clojure | ## Code Before:
(ns exploud.info
"## For grabbing information about the things we're dealing with"
(:require [exploud
[asgard :as asgard]
[onix :as onix]
[tyranitar :as tyr]]))
(defn applications
"The list of applications Asgard knows about."
[]
{:names (map :name (asgard/applications))})
(defn application
"The information about a particular application."
[region application-name]
(if-let [full-application (asgard/application region application-name)]
(merge {:name application-name}
(select-keys (:app full-application)
[:description :email :owner]))))
(defn upsert-application
"Upserts an application into Onix, Tyranitar and Asgard. This function can be
run many times, it won't fail if the application is present in any of the
stores."
[region application-name details]
(let [onix-application (onix/upsert-application application-name)
tyranitar-application (tyr/upsert-application application-name)]
(asgard/upsert-application application-name details)
(merge (application region application-name) tyranitar-application)))
## Instruction:
Make Exploud list the applications from Onix
## Code After:
(ns exploud.info
"## For grabbing information about the things we're dealing with"
(:require [exploud
[asgard :as asgard]
[onix :as onix]
[tyranitar :as tyr]]))
(defn applications
"The list of applications Onix knows about."
[]
{:names (map :name (onix/applications))})
(defn application
"The information about a particular application."
[region application-name]
(if-let [full-application (asgard/application region application-name)]
(merge {:name application-name}
(select-keys (:app full-application)
[:description :email :owner]))))
(defn upsert-application
"Upserts an application into Onix, Tyranitar and Asgard. This function can be
run many times, it won't fail if the application is present in any of the
stores."
[region application-name details]
(let [onix-application (onix/upsert-application application-name)
tyranitar-application (tyr/upsert-application application-name)]
(asgard/upsert-application application-name details)
(merge (application region application-name) tyranitar-application)))
| (ns exploud.info
"## For grabbing information about the things we're dealing with"
(:require [exploud
[asgard :as asgard]
[onix :as onix]
[tyranitar :as tyr]]))
(defn applications
- "The list of applications Asgard knows about."
? ^^^^^^
+ "The list of applications Onix knows about."
? ^^^^
[]
- {:names (map :name (asgard/applications))})
? ^^^^^^
+ {:names (map :name (onix/applications))})
? ^^^^
(defn application
"The information about a particular application."
[region application-name]
(if-let [full-application (asgard/application region application-name)]
(merge {:name application-name}
(select-keys (:app full-application)
[:description :email :owner]))))
(defn upsert-application
"Upserts an application into Onix, Tyranitar and Asgard. This function can be
run many times, it won't fail if the application is present in any of the
stores."
[region application-name details]
(let [onix-application (onix/upsert-application application-name)
tyranitar-application (tyr/upsert-application application-name)]
(asgard/upsert-application application-name details)
(merge (application region application-name) tyranitar-application))) | 4 | 0.137931 | 2 | 2 |
e59f187f2e4557114e534be57dc078ddf112b87c | completions_dev.py | completions_dev.py | import sublime_plugin
from sublime_lib.path import root_at_packages, get_package_name
PLUGIN_NAME = get_package_name()
COMPLETIONS_SYNTAX_DEF = "Packages/%s/Syntax Definitions/Sublime Completions.tmLanguage" % PLUGIN_NAME
TPL = """{
"scope": "source.${1:off}",
"completions": [
{ "trigger": "${2:some_trigger}", "contents": "${3:Hint: Use f, ff and fff plus Tab inside here.}" }$0
]
}"""
class NewCompletionsCommand(sublime_plugin.WindowCommand):
def run(self):
v = self.window.new_file()
v.run_command('insert_snippet', {"contents": TPL})
v.settings().set('syntax', COMPLETIONS_SYNTAX_DEF)
v.settings().set('default_dir', root_at_packages('User'))
| import sublime_plugin
from sublime_lib.path import root_at_packages, get_package_name
PLUGIN_NAME = get_package_name()
COMPLETIONS_SYNTAX_DEF = "Packages/%s/Syntax Definitions/Sublime Completions.tmLanguage" % PLUGIN_NAME
TPL = """{
"scope": "source.${1:off}",
"completions": [
{ "trigger": "${2:some_trigger}", "contents": "${3:Hint: Use f, ff and fff plus Tab inside here.}" }$0
]
}""".replace(" ", "\t") # NOQA - line length
class NewCompletionsCommand(sublime_plugin.WindowCommand):
def run(self):
v = self.window.new_file()
v.run_command('insert_snippet', {"contents": TPL})
v.settings().set('syntax', COMPLETIONS_SYNTAX_DEF)
v.settings().set('default_dir', root_at_packages('User'))
| Use tabs in new completions file snippet | Use tabs in new completions file snippet
Respects the user's indentation configuration.
| Python | mit | SublimeText/PackageDev,SublimeText/AAAPackageDev,SublimeText/AAAPackageDev | python | ## Code Before:
import sublime_plugin
from sublime_lib.path import root_at_packages, get_package_name
PLUGIN_NAME = get_package_name()
COMPLETIONS_SYNTAX_DEF = "Packages/%s/Syntax Definitions/Sublime Completions.tmLanguage" % PLUGIN_NAME
TPL = """{
"scope": "source.${1:off}",
"completions": [
{ "trigger": "${2:some_trigger}", "contents": "${3:Hint: Use f, ff and fff plus Tab inside here.}" }$0
]
}"""
class NewCompletionsCommand(sublime_plugin.WindowCommand):
def run(self):
v = self.window.new_file()
v.run_command('insert_snippet', {"contents": TPL})
v.settings().set('syntax', COMPLETIONS_SYNTAX_DEF)
v.settings().set('default_dir', root_at_packages('User'))
## Instruction:
Use tabs in new completions file snippet
Respects the user's indentation configuration.
## Code After:
import sublime_plugin
from sublime_lib.path import root_at_packages, get_package_name
PLUGIN_NAME = get_package_name()
COMPLETIONS_SYNTAX_DEF = "Packages/%s/Syntax Definitions/Sublime Completions.tmLanguage" % PLUGIN_NAME
TPL = """{
"scope": "source.${1:off}",
"completions": [
{ "trigger": "${2:some_trigger}", "contents": "${3:Hint: Use f, ff and fff plus Tab inside here.}" }$0
]
}""".replace(" ", "\t") # NOQA - line length
class NewCompletionsCommand(sublime_plugin.WindowCommand):
def run(self):
v = self.window.new_file()
v.run_command('insert_snippet', {"contents": TPL})
v.settings().set('syntax', COMPLETIONS_SYNTAX_DEF)
v.settings().set('default_dir', root_at_packages('User'))
| import sublime_plugin
from sublime_lib.path import root_at_packages, get_package_name
PLUGIN_NAME = get_package_name()
COMPLETIONS_SYNTAX_DEF = "Packages/%s/Syntax Definitions/Sublime Completions.tmLanguage" % PLUGIN_NAME
TPL = """{
"scope": "source.${1:off}",
"completions": [
{ "trigger": "${2:some_trigger}", "contents": "${3:Hint: Use f, ff and fff plus Tab inside here.}" }$0
]
- }"""
+ }""".replace(" ", "\t") # NOQA - line length
class NewCompletionsCommand(sublime_plugin.WindowCommand):
def run(self):
v = self.window.new_file()
v.run_command('insert_snippet', {"contents": TPL})
v.settings().set('syntax', COMPLETIONS_SYNTAX_DEF)
v.settings().set('default_dir', root_at_packages('User')) | 2 | 0.090909 | 1 | 1 |
c25f9446257fc80332ec8eaf59e5af197d757f98 | library/Stratosphere/ResourceImports.hs | library/Stratosphere/ResourceImports.hs | module Stratosphere.ResourceImports
( module X
) where
import Control.Lens as X (Lens', lens)
import Data.Aeson as X
import Data.Maybe as X (catMaybes)
import Data.Map.Strict as X
import Data.Monoid as X (mempty)
import Data.Text as X (Text)
import Stratosphere.Values as X
| module Stratosphere.ResourceImports
( module X
) where
import Control.Lens as X (Lens', lens)
import Data.Aeson as X
import Data.Aeson.TH as X
import Data.Maybe as X (catMaybes)
import Data.Map.Strict as X
import Data.Monoid as X (mempty)
import Data.Text as X (Text)
import Stratosphere.Values as X
| Fix missing Aeson functions in GHC 8 | Fix missing Aeson functions in GHC 8
| Haskell | mit | frontrowed/stratosphere | haskell | ## Code Before:
module Stratosphere.ResourceImports
( module X
) where
import Control.Lens as X (Lens', lens)
import Data.Aeson as X
import Data.Maybe as X (catMaybes)
import Data.Map.Strict as X
import Data.Monoid as X (mempty)
import Data.Text as X (Text)
import Stratosphere.Values as X
## Instruction:
Fix missing Aeson functions in GHC 8
## Code After:
module Stratosphere.ResourceImports
( module X
) where
import Control.Lens as X (Lens', lens)
import Data.Aeson as X
import Data.Aeson.TH as X
import Data.Maybe as X (catMaybes)
import Data.Map.Strict as X
import Data.Monoid as X (mempty)
import Data.Text as X (Text)
import Stratosphere.Values as X
| module Stratosphere.ResourceImports
( module X
) where
import Control.Lens as X (Lens', lens)
import Data.Aeson as X
+ import Data.Aeson.TH as X
import Data.Maybe as X (catMaybes)
import Data.Map.Strict as X
import Data.Monoid as X (mempty)
import Data.Text as X (Text)
import Stratosphere.Values as X | 1 | 0.090909 | 1 | 0 |
aec027660f9e07a65f5091589b2e8e19a771fe83 | app.json | app.json | {
"name": "Renalware",
"description": "Renalware uses demographic, clinical, pathology, and nephrology datasets to improve patient care, undertake clinical and administrative audits and share data with external systems.",
"website": "http://www.airslie.com/renalware.html",
"success_url": "/",
"addons": ["heroku-postgresql:hobby-dev", "sendgrid"],
"env": {
"DEMO": "1",
"RACK_ENV": "staging",
"RAILS_ENV": "staging",
"COOKIE_SECRET": {
"generator": "secret"
},
"SETUP_BY": {
"description": "Who initiated this setup",
"value": "Nicholas Henry"
}
},
"scripts": {
"postdeploy": "bundle exec rake db:seed"
}
}
| {
"name": "Renalware",
"description": "Renalware uses demographic, clinical, pathology, and nephrology datasets to improve patient care, undertake clinical and administrative audits and share data with external systems.",
"website": "http://www.airslie.com/renalware.html",
"success_url": "/",
"addons": ["heroku-postgresql:hobby-dev", "sendgrid"],
"env": {
"DEMO": "1",
"RACK_ENV": "staging",
"RAILS_ENV": "staging",
"COOKIE_SECRET": {
"generator": "secret"
},
"SETUP_BY": {
"description": "Who initiated this setup",
"value": "Nicholas Henry"
}
},
"buildpacks": [
{
"url": "heroku/ruby"
},
{
"url": "https://github.com/ianpurvis/heroku-buildpack-version"
},
{
"url": "https://github.com/danielboggs/heroku-buildpack-pandoc.git"
}
],
"scripts": {
"postdeploy": "bundle exec rake db:seed"
}
}
| Add buildback to install pandoc on heroku | Add buildback to install pandoc on heroku
| JSON | mit | airslie/renalware-core,airslie/renalware-core,airslie/renalware-core,airslie/renalware-core | json | ## Code Before:
{
"name": "Renalware",
"description": "Renalware uses demographic, clinical, pathology, and nephrology datasets to improve patient care, undertake clinical and administrative audits and share data with external systems.",
"website": "http://www.airslie.com/renalware.html",
"success_url": "/",
"addons": ["heroku-postgresql:hobby-dev", "sendgrid"],
"env": {
"DEMO": "1",
"RACK_ENV": "staging",
"RAILS_ENV": "staging",
"COOKIE_SECRET": {
"generator": "secret"
},
"SETUP_BY": {
"description": "Who initiated this setup",
"value": "Nicholas Henry"
}
},
"scripts": {
"postdeploy": "bundle exec rake db:seed"
}
}
## Instruction:
Add buildback to install pandoc on heroku
## Code After:
{
"name": "Renalware",
"description": "Renalware uses demographic, clinical, pathology, and nephrology datasets to improve patient care, undertake clinical and administrative audits and share data with external systems.",
"website": "http://www.airslie.com/renalware.html",
"success_url": "/",
"addons": ["heroku-postgresql:hobby-dev", "sendgrid"],
"env": {
"DEMO": "1",
"RACK_ENV": "staging",
"RAILS_ENV": "staging",
"COOKIE_SECRET": {
"generator": "secret"
},
"SETUP_BY": {
"description": "Who initiated this setup",
"value": "Nicholas Henry"
}
},
"buildpacks": [
{
"url": "heroku/ruby"
},
{
"url": "https://github.com/ianpurvis/heroku-buildpack-version"
},
{
"url": "https://github.com/danielboggs/heroku-buildpack-pandoc.git"
}
],
"scripts": {
"postdeploy": "bundle exec rake db:seed"
}
}
| {
"name": "Renalware",
"description": "Renalware uses demographic, clinical, pathology, and nephrology datasets to improve patient care, undertake clinical and administrative audits and share data with external systems.",
"website": "http://www.airslie.com/renalware.html",
"success_url": "/",
"addons": ["heroku-postgresql:hobby-dev", "sendgrid"],
"env": {
"DEMO": "1",
"RACK_ENV": "staging",
"RAILS_ENV": "staging",
"COOKIE_SECRET": {
"generator": "secret"
},
"SETUP_BY": {
"description": "Who initiated this setup",
"value": "Nicholas Henry"
}
},
+ "buildpacks": [
+ {
+ "url": "heroku/ruby"
+ },
+ {
+ "url": "https://github.com/ianpurvis/heroku-buildpack-version"
+ },
+ {
+ "url": "https://github.com/danielboggs/heroku-buildpack-pandoc.git"
+ }
+ ],
"scripts": {
"postdeploy": "bundle exec rake db:seed"
}
} | 11 | 0.5 | 11 | 0 |
2ca4e31f1ed96c257a26653b58429743dba102b3 | metadata/com.sanskritbasics.memory.yml | metadata/com.sanskritbasics.memory.yml | Categories:
- Games
- Science & Education
License: GPL-3.0-or-later
SourceCode: https://github.com/sanskritbscs/memory
IssueTracker: https://github.com/sanskritbscs/memory/issues
LiberapayID: '1596950'
Bitcoin: bc1q3xasvfn2c84dprkk2mxj5g7n6ujwylphu8qsf3
AutoName: Memory
RepoType: git
Repo: https://github.com/sanskritbscs/memory.git
Builds:
- versionName: '2.6'
versionCode: 20
commit: v2.6
subdir: app
gradle:
- fdroid
- versionName: '2.8'
versionCode: 22
commit: v2.8
subdir: app
gradle:
- fdroid
- versionName: '2.9'
versionCode: 23
commit: v2.9
subdir: app
gradle:
- fdroid
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags .*[0-9]$
CurrentVersion: '2.9'
CurrentVersionCode: 23
| Categories:
- Games
- Science & Education
License: GPL-3.0-or-later
SourceCode: https://github.com/sanskritbscs/memory
IssueTracker: https://github.com/sanskritbscs/memory/issues
LiberapayID: '1596950'
Bitcoin: bc1q3xasvfn2c84dprkk2mxj5g7n6ujwylphu8qsf3
AutoName: Memory
RepoType: git
Repo: https://github.com/sanskritbscs/memory.git
Builds:
- versionName: '2.6'
versionCode: 20
commit: v2.6
subdir: app
gradle:
- fdroid
- versionName: '2.8'
versionCode: 22
commit: v2.8
subdir: app
gradle:
- fdroid
- versionName: '2.9'
versionCode: 23
commit: v2.9
subdir: app
gradle:
- fdroid
- versionName: '3.0'
versionCode: 25
commit: v3.0
subdir: app
gradle:
- fdroid
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags .*[0-9]$
CurrentVersion: '3.0'
CurrentVersionCode: 25
| Update Memory to 3.0 (25) | Update Memory to 3.0 (25)
| YAML | agpl-3.0 | f-droid/fdroiddata,f-droid/fdroiddata | yaml | ## Code Before:
Categories:
- Games
- Science & Education
License: GPL-3.0-or-later
SourceCode: https://github.com/sanskritbscs/memory
IssueTracker: https://github.com/sanskritbscs/memory/issues
LiberapayID: '1596950'
Bitcoin: bc1q3xasvfn2c84dprkk2mxj5g7n6ujwylphu8qsf3
AutoName: Memory
RepoType: git
Repo: https://github.com/sanskritbscs/memory.git
Builds:
- versionName: '2.6'
versionCode: 20
commit: v2.6
subdir: app
gradle:
- fdroid
- versionName: '2.8'
versionCode: 22
commit: v2.8
subdir: app
gradle:
- fdroid
- versionName: '2.9'
versionCode: 23
commit: v2.9
subdir: app
gradle:
- fdroid
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags .*[0-9]$
CurrentVersion: '2.9'
CurrentVersionCode: 23
## Instruction:
Update Memory to 3.0 (25)
## Code After:
Categories:
- Games
- Science & Education
License: GPL-3.0-or-later
SourceCode: https://github.com/sanskritbscs/memory
IssueTracker: https://github.com/sanskritbscs/memory/issues
LiberapayID: '1596950'
Bitcoin: bc1q3xasvfn2c84dprkk2mxj5g7n6ujwylphu8qsf3
AutoName: Memory
RepoType: git
Repo: https://github.com/sanskritbscs/memory.git
Builds:
- versionName: '2.6'
versionCode: 20
commit: v2.6
subdir: app
gradle:
- fdroid
- versionName: '2.8'
versionCode: 22
commit: v2.8
subdir: app
gradle:
- fdroid
- versionName: '2.9'
versionCode: 23
commit: v2.9
subdir: app
gradle:
- fdroid
- versionName: '3.0'
versionCode: 25
commit: v3.0
subdir: app
gradle:
- fdroid
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags .*[0-9]$
CurrentVersion: '3.0'
CurrentVersionCode: 25
| Categories:
- Games
- Science & Education
License: GPL-3.0-or-later
SourceCode: https://github.com/sanskritbscs/memory
IssueTracker: https://github.com/sanskritbscs/memory/issues
LiberapayID: '1596950'
Bitcoin: bc1q3xasvfn2c84dprkk2mxj5g7n6ujwylphu8qsf3
AutoName: Memory
RepoType: git
Repo: https://github.com/sanskritbscs/memory.git
Builds:
- versionName: '2.6'
versionCode: 20
commit: v2.6
subdir: app
gradle:
- fdroid
- versionName: '2.8'
versionCode: 22
commit: v2.8
subdir: app
gradle:
- fdroid
- versionName: '2.9'
versionCode: 23
commit: v2.9
subdir: app
gradle:
- fdroid
+ - versionName: '3.0'
+ versionCode: 25
+ commit: v3.0
+ subdir: app
+ gradle:
+ - fdroid
+
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags .*[0-9]$
- CurrentVersion: '2.9'
? ^ ^
+ CurrentVersion: '3.0'
? ^ ^
- CurrentVersionCode: 23
? ^
+ CurrentVersionCode: 25
? ^
| 11 | 0.275 | 9 | 2 |
faf15d65e75e04257b4f188815956c48a7222492 | README.md | README.md |
A Simple & Fast Node Bloging Platform Base On ThinkJS 2.0 & ReactJS & ES2015
## install
```sh
git clone https://github.com/75team/firekylin.git
```
## install dependencies
```js
npm install
```
## compile
```js
npm run compile
```
## start server
```js
npm start
```
* home <http://localhost:1234/>
* admin <http://localhost:1234/admin/>
|
A Simple & Fast Node Bloging Platform Base On ThinkJS 2.0 & ReactJS & ES2015
## install
```sh
git clone https://github.com/75team/firekylin.git
```
## install dependencies
```js
npm install
```
## compile
```js
npm run compile
```
## start server
```js
npm start
```
* home <http://localhost:1234/>
* admin <http://localhost:1234/admin/>(default username & password: admin)
| Add username & password tip | Add username & password tip
| Markdown | mit | welefen/firekylin,welefen/firekylin,welefen/firekylin,welefen/firekylin | markdown | ## Code Before:
A Simple & Fast Node Bloging Platform Base On ThinkJS 2.0 & ReactJS & ES2015
## install
```sh
git clone https://github.com/75team/firekylin.git
```
## install dependencies
```js
npm install
```
## compile
```js
npm run compile
```
## start server
```js
npm start
```
* home <http://localhost:1234/>
* admin <http://localhost:1234/admin/>
## Instruction:
Add username & password tip
## Code After:
A Simple & Fast Node Bloging Platform Base On ThinkJS 2.0 & ReactJS & ES2015
## install
```sh
git clone https://github.com/75team/firekylin.git
```
## install dependencies
```js
npm install
```
## compile
```js
npm run compile
```
## start server
```js
npm start
```
* home <http://localhost:1234/>
* admin <http://localhost:1234/admin/>(default username & password: admin)
|
A Simple & Fast Node Bloging Platform Base On ThinkJS 2.0 & ReactJS & ES2015
## install
```sh
git clone https://github.com/75team/firekylin.git
```
## install dependencies
```js
npm install
```
## compile
```js
npm run compile
```
## start server
```js
npm start
```
* home <http://localhost:1234/>
- * admin <http://localhost:1234/admin/>
+ * admin <http://localhost:1234/admin/>(default username & password: admin)
| 2 | 0.0625 | 1 | 1 |
692df8ec9da2e2b11a68674c1502aed43735c458 | src/models/application_history.rb | src/models/application_history.rb | require 'sinatra/activerecord'
class ApplicationHistory < ActiveRecord::Base
before_save :allocate_version
before_save :serf_request, if: -> { new_record? }
belongs_to :application
validates :application, presence: true
validates :uri, presence: true, format: { with: URI.regexp }
validates_each :parameters do |record, attr, value|
begin
JSON.parse(value) unless value.nil?
rescue JSON::ParserError
record.errors.add(attr, 'is malformed or invalid json string')
end
end
def allocate_version
self.version = application.histories.count + 1
end
def serf_request
payload = {}
payload[:url] = uri
payload[:revision] = revision
payload[:parameters] = JSON.parse(parameters)
application.system.serf.call('event', 'deploy', payload)
end
end
| require 'sinatra/activerecord'
class ApplicationHistory < ActiveRecord::Base
before_create :allocate_version
before_create :serf_request
belongs_to :application
validates :application, presence: true
validates :uri, presence: true, format: { with: URI.regexp }
validates_each :parameters do |record, attr, value|
begin
JSON.parse(value) unless value.nil?
rescue JSON::ParserError
record.errors.add(attr, 'is malformed or invalid json string')
end
end
def allocate_version
self.version = application.histories.count + 1
end
def serf_request
payload = {}
payload[:url] = uri
payload[:revision] = revision
payload[:parameters] = JSON.parse(parameters)
application.system.serf.call('event', 'deploy', payload)
end
end
| Change timing to call callback from before_save to before_create | Change timing to call callback from before_save to before_create
| Ruby | apache-2.0 | cloudconductor/cloud_conductor,cloudconductor/cloud_conductor,cloudconductor/cloud_conductor | ruby | ## Code Before:
require 'sinatra/activerecord'
class ApplicationHistory < ActiveRecord::Base
before_save :allocate_version
before_save :serf_request, if: -> { new_record? }
belongs_to :application
validates :application, presence: true
validates :uri, presence: true, format: { with: URI.regexp }
validates_each :parameters do |record, attr, value|
begin
JSON.parse(value) unless value.nil?
rescue JSON::ParserError
record.errors.add(attr, 'is malformed or invalid json string')
end
end
def allocate_version
self.version = application.histories.count + 1
end
def serf_request
payload = {}
payload[:url] = uri
payload[:revision] = revision
payload[:parameters] = JSON.parse(parameters)
application.system.serf.call('event', 'deploy', payload)
end
end
## Instruction:
Change timing to call callback from before_save to before_create
## Code After:
require 'sinatra/activerecord'
class ApplicationHistory < ActiveRecord::Base
before_create :allocate_version
before_create :serf_request
belongs_to :application
validates :application, presence: true
validates :uri, presence: true, format: { with: URI.regexp }
validates_each :parameters do |record, attr, value|
begin
JSON.parse(value) unless value.nil?
rescue JSON::ParserError
record.errors.add(attr, 'is malformed or invalid json string')
end
end
def allocate_version
self.version = application.histories.count + 1
end
def serf_request
payload = {}
payload[:url] = uri
payload[:revision] = revision
payload[:parameters] = JSON.parse(parameters)
application.system.serf.call('event', 'deploy', payload)
end
end
| require 'sinatra/activerecord'
class ApplicationHistory < ActiveRecord::Base
- before_save :allocate_version
? ^ ^
+ before_create :allocate_version
? ^^^ ^
- before_save :serf_request, if: -> { new_record? }
+ before_create :serf_request
belongs_to :application
validates :application, presence: true
validates :uri, presence: true, format: { with: URI.regexp }
validates_each :parameters do |record, attr, value|
begin
JSON.parse(value) unless value.nil?
rescue JSON::ParserError
record.errors.add(attr, 'is malformed or invalid json string')
end
end
def allocate_version
self.version = application.histories.count + 1
end
def serf_request
payload = {}
payload[:url] = uri
payload[:revision] = revision
payload[:parameters] = JSON.parse(parameters)
application.system.serf.call('event', 'deploy', payload)
end
end | 4 | 0.125 | 2 | 2 |
81505c006e093aa5c4ab44c8facd122c70c22d9e | _includes/sections/company/contact_us.html | _includes/sections/company/contact_us.html | <section class="
section--say-hej
module
module--txt-c
module--padding
module--white
module--black-bg">
<div class="wrap">
<div class="module-content">
<h2 class="bordered bordered--secondary bordered--centered">{% t company_contact_us.title %}</h2>
<div class="columns columns--inline">
<div>
<img class="profile-pic" src="{{ "/assets/images/profile-pictures/yazan_al_rayyes.jpg" | prepend: site.github.url }}">
<p>
<strong>Yazan Al Rayyes</strong>
<br> Business Development Manager
<br>
<a class="txt-link" href="mailto:yazan.alryyes@justarrived.se">yazan.alrayyes@justarrived.se</a>
<br>
<a class="txt-link formatted-number" href="tel:0046768002780">+46 76 800 27 80</a>
</p>
</div>
</div>
</div>
</div>
</section>
| <section class="
section--say-hej
module
module--txt-c
module--padding
module--white
module--black-bg">
<div class="wrap">
<div class="module-content">
<h2 class="bordered bordered--secondary bordered--centered">{% t company_contact_us.title %}</h2>
<div class="columns columns--inline">
<div class="column-1-2">
<img class="profile-pic" src="{{ "/assets/images/profile-pictures/neven_jugo.jpg" | prepend: site.github.url }}">
<p>
<strong>Neven Jugo</strong>
<br> Head of Sales
<br>
<a class="txt-link" href="mailto:neven.jugo@justarrived.se">neven.jugo@justarrived.se</a>
<br>
<a class="txt-link formatted-number" href="tel:0046709329962">+46 70 932 99 62</a>
</p>
</div>
<div class="column-1-2">
<img class="profile-pic" src="{{ "/assets/images/profile-pictures/per_strangberg.jpg" | prepend: site.github.url }}">
<p>
<strong>Per Strängberg</strong>
<br> Customer Success Manager
<br>
<a class="txt-link" href="mailto:per.strangberg@justarrived.se">per.strangberg@justarrived.se</a>
<br>
<a class="txt-link formatted-number" href="tel:0046734348359">+46 73 434 83 59</a>
</p>
</div>
</div>
</div>
</div>
</section>
| Update company contact page with Per and Neven | Update company contact page with Per and Neven
| HTML | mit | justarrived/justarrived.github.io,justarrived/justarrived.github.io,justarrived/justarrived.github.io,justarrived/justarrived.github.io | html | ## Code Before:
<section class="
section--say-hej
module
module--txt-c
module--padding
module--white
module--black-bg">
<div class="wrap">
<div class="module-content">
<h2 class="bordered bordered--secondary bordered--centered">{% t company_contact_us.title %}</h2>
<div class="columns columns--inline">
<div>
<img class="profile-pic" src="{{ "/assets/images/profile-pictures/yazan_al_rayyes.jpg" | prepend: site.github.url }}">
<p>
<strong>Yazan Al Rayyes</strong>
<br> Business Development Manager
<br>
<a class="txt-link" href="mailto:yazan.alryyes@justarrived.se">yazan.alrayyes@justarrived.se</a>
<br>
<a class="txt-link formatted-number" href="tel:0046768002780">+46 76 800 27 80</a>
</p>
</div>
</div>
</div>
</div>
</section>
## Instruction:
Update company contact page with Per and Neven
## Code After:
<section class="
section--say-hej
module
module--txt-c
module--padding
module--white
module--black-bg">
<div class="wrap">
<div class="module-content">
<h2 class="bordered bordered--secondary bordered--centered">{% t company_contact_us.title %}</h2>
<div class="columns columns--inline">
<div class="column-1-2">
<img class="profile-pic" src="{{ "/assets/images/profile-pictures/neven_jugo.jpg" | prepend: site.github.url }}">
<p>
<strong>Neven Jugo</strong>
<br> Head of Sales
<br>
<a class="txt-link" href="mailto:neven.jugo@justarrived.se">neven.jugo@justarrived.se</a>
<br>
<a class="txt-link formatted-number" href="tel:0046709329962">+46 70 932 99 62</a>
</p>
</div>
<div class="column-1-2">
<img class="profile-pic" src="{{ "/assets/images/profile-pictures/per_strangberg.jpg" | prepend: site.github.url }}">
<p>
<strong>Per Strängberg</strong>
<br> Customer Success Manager
<br>
<a class="txt-link" href="mailto:per.strangberg@justarrived.se">per.strangberg@justarrived.se</a>
<br>
<a class="txt-link formatted-number" href="tel:0046734348359">+46 73 434 83 59</a>
</p>
</div>
</div>
</div>
</div>
</section>
| <section class="
section--say-hej
module
module--txt-c
module--padding
module--white
module--black-bg">
<div class="wrap">
<div class="module-content">
<h2 class="bordered bordered--secondary bordered--centered">{% t company_contact_us.title %}</h2>
<div class="columns columns--inline">
- <div>
+ <div class="column-1-2">
- <img class="profile-pic" src="{{ "/assets/images/profile-pictures/yazan_al_rayyes.jpg" | prepend: site.github.url }}">
? ^^^^ ^^^^^^^^^
+ <img class="profile-pic" src="{{ "/assets/images/profile-pictures/neven_jugo.jpg" | prepend: site.github.url }}">
? ^^^^ ^^^^
<p>
- <strong>Yazan Al Rayyes</strong>
- <br> Business Development Manager
+ <strong>Neven Jugo</strong>
+ <br> Head of Sales
<br>
- <a class="txt-link" href="mailto:yazan.alryyes@justarrived.se">yazan.alrayyes@justarrived.se</a>
? ^^^^ ^^^^^^^ ^^^^ ^^^^^^^^
+ <a class="txt-link" href="mailto:neven.jugo@justarrived.se">neven.jugo@justarrived.se</a>
? ^^^^ ^^^^ ^^^^ ^^^^
<br>
- <a class="txt-link formatted-number" href="tel:0046768002780">+46 76 800 27 80</a>
? --- --- ---- - ^^
+ <a class="txt-link formatted-number" href="tel:0046709329962">+46 70 932 99 62</a>
? ++++++ ++ ^^^^^
+ </p>
+ </div>
+ <div class="column-1-2">
+ <img class="profile-pic" src="{{ "/assets/images/profile-pictures/per_strangberg.jpg" | prepend: site.github.url }}">
+ <p>
+ <strong>Per Strängberg</strong>
+ <br> Customer Success Manager
+ <br>
+ <a class="txt-link" href="mailto:per.strangberg@justarrived.se">per.strangberg@justarrived.se</a>
+ <br>
+ <a class="txt-link formatted-number" href="tel:0046734348359">+46 73 434 83 59</a>
</p>
</div>
</div>
</div>
</div>
</section> | 23 | 0.821429 | 17 | 6 |
f3aac4dfe89e888dbb5a64da3b4cc66399c27c15 | tox_acceptance.ini | tox_acceptance.ini | [tox]
envlist = py{27,36}-unittest, py{27,36}-kafka{10,11}-dockeritest
tox_pip_extensions_ext_pip_custom_platform = true
tox_pip_extensions_ext_venv_update = true
distdir = {toxworkdir}/dist_acceptance
[testenv]
deps =
-rrequirements-dev.txt
flake8
mock
acceptance: behave
whitelist_externals = /bin/bash
passenv = ITEST_PYTHON_FACTOR KAFKA_VERSION ACCEPTANCE_TAGS
setenv =
py27: ITEST_PYTHON_FACTOR = py27
py36: ITEST_PYTHON_FACTOR = py36
kafka10: KAFKA_VERSION = 0.10.1.1
kafka10: ACCEPTANCE_TAGS = ~kafka11
kafka11: KAFKA_VERSION = 1.1.0
kafka11: ACCEPTANCE_TAGS =
commands =
acceptance: /bin/bash -c 'echo "Running acceptance tests using" $({envbindir}/python --version)'
acceptance: /bin/bash -c 'env'
acceptance: /bin/bash -c 'behave tests/acceptance --tags=$ACCEPTANCE_TAGS --no-capture'
| [tox]
envlist = py{27,36}-kafka{10,11}-dockeritest
tox_pip_extensions_ext_pip_custom_platform = true
tox_pip_extensions_ext_venv_update = true
distdir = {toxworkdir}/dist_acceptance
[testenv]
deps =
-rrequirements-dev.txt
flake8
mock
acceptance: behave
whitelist_externals = /bin/bash
passenv = ITEST_PYTHON_FACTOR KAFKA_VERSION ACCEPTANCE_TAGS
setenv =
py27: ITEST_PYTHON_FACTOR = py27
py36: ITEST_PYTHON_FACTOR = py36
kafka10: KAFKA_VERSION = 0.10.1.1
kafka10: ACCEPTANCE_TAGS = ~kafka11
kafka11: KAFKA_VERSION = 1.1.0
kafka11: ACCEPTANCE_TAGS =
commands =
acceptance: /bin/bash -c 'echo "Running acceptance tests using" $({envbindir}/python --version)'
acceptance: /bin/bash -c 'env'
acceptance: /bin/bash -c 'behave tests/acceptance --tags=$ACCEPTANCE_TAGS --no-capture'
| Clarify how the acceptance tests are run and remove unused targets | Clarify how the acceptance tests are run and remove unused targets
| INI | apache-2.0 | Yelp/kafka-utils,Yelp/kafka-utils | ini | ## Code Before:
[tox]
envlist = py{27,36}-unittest, py{27,36}-kafka{10,11}-dockeritest
tox_pip_extensions_ext_pip_custom_platform = true
tox_pip_extensions_ext_venv_update = true
distdir = {toxworkdir}/dist_acceptance
[testenv]
deps =
-rrequirements-dev.txt
flake8
mock
acceptance: behave
whitelist_externals = /bin/bash
passenv = ITEST_PYTHON_FACTOR KAFKA_VERSION ACCEPTANCE_TAGS
setenv =
py27: ITEST_PYTHON_FACTOR = py27
py36: ITEST_PYTHON_FACTOR = py36
kafka10: KAFKA_VERSION = 0.10.1.1
kafka10: ACCEPTANCE_TAGS = ~kafka11
kafka11: KAFKA_VERSION = 1.1.0
kafka11: ACCEPTANCE_TAGS =
commands =
acceptance: /bin/bash -c 'echo "Running acceptance tests using" $({envbindir}/python --version)'
acceptance: /bin/bash -c 'env'
acceptance: /bin/bash -c 'behave tests/acceptance --tags=$ACCEPTANCE_TAGS --no-capture'
## Instruction:
Clarify how the acceptance tests are run and remove unused targets
## Code After:
[tox]
envlist = py{27,36}-kafka{10,11}-dockeritest
tox_pip_extensions_ext_pip_custom_platform = true
tox_pip_extensions_ext_venv_update = true
distdir = {toxworkdir}/dist_acceptance
[testenv]
deps =
-rrequirements-dev.txt
flake8
mock
acceptance: behave
whitelist_externals = /bin/bash
passenv = ITEST_PYTHON_FACTOR KAFKA_VERSION ACCEPTANCE_TAGS
setenv =
py27: ITEST_PYTHON_FACTOR = py27
py36: ITEST_PYTHON_FACTOR = py36
kafka10: KAFKA_VERSION = 0.10.1.1
kafka10: ACCEPTANCE_TAGS = ~kafka11
kafka11: KAFKA_VERSION = 1.1.0
kafka11: ACCEPTANCE_TAGS =
commands =
acceptance: /bin/bash -c 'echo "Running acceptance tests using" $({envbindir}/python --version)'
acceptance: /bin/bash -c 'env'
acceptance: /bin/bash -c 'behave tests/acceptance --tags=$ACCEPTANCE_TAGS --no-capture'
| [tox]
- envlist = py{27,36}-unittest, py{27,36}-kafka{10,11}-dockeritest
? --------------------
+ envlist = py{27,36}-kafka{10,11}-dockeritest
tox_pip_extensions_ext_pip_custom_platform = true
tox_pip_extensions_ext_venv_update = true
distdir = {toxworkdir}/dist_acceptance
[testenv]
deps =
-rrequirements-dev.txt
flake8
mock
acceptance: behave
whitelist_externals = /bin/bash
passenv = ITEST_PYTHON_FACTOR KAFKA_VERSION ACCEPTANCE_TAGS
setenv =
py27: ITEST_PYTHON_FACTOR = py27
py36: ITEST_PYTHON_FACTOR = py36
kafka10: KAFKA_VERSION = 0.10.1.1
kafka10: ACCEPTANCE_TAGS = ~kafka11
kafka11: KAFKA_VERSION = 1.1.0
kafka11: ACCEPTANCE_TAGS =
commands =
acceptance: /bin/bash -c 'echo "Running acceptance tests using" $({envbindir}/python --version)'
acceptance: /bin/bash -c 'env'
acceptance: /bin/bash -c 'behave tests/acceptance --tags=$ACCEPTANCE_TAGS --no-capture' | 2 | 0.08 | 1 | 1 |
b3be7b3c51c7bc63697aea9100ff65823b425a5c | src/main/kotlin/com/elpassion/intelijidea/task/edit/MFBeforeRunTaskDialog.kt | src/main/kotlin/com/elpassion/intelijidea/task/edit/MFBeforeRunTaskDialog.kt | package com.elpassion.intelijidea.task.edit
import com.elpassion.intelijidea.task.MFTaskData
import com.intellij.openapi.project.Project
import com.intellij.openapi.ui.DialogWrapper
import com.intellij.openapi.ui.TextFieldWithBrowseButton
import com.intellij.openapi.ui.ValidationInfo
import javax.swing.JComponent
import javax.swing.JTextField
class MFBeforeRunTaskDialog(project: Project) : DialogWrapper(project), TaskEditForm {
private val taskEditValidator = TaskEditValidator(this)
val form = MFBeforeRunTaskForm(project)
init {
isModal = true
init()
}
override fun createCenterPanel(): JComponent {
return form.panel
}
override fun doValidate(): ValidationInfo? {
return taskEditValidator.doValidate()
}
override fun taskField(): JTextField {
return form.taskField
}
override fun buildCommandField(): JTextField {
return form.buildCommandField
}
override fun mainframerToolField(): TextFieldWithBrowseButton {
return form.mainframerToolField
}
fun restoreMainframerTask(data: MFTaskData) {
form.mainframerToolField.text = data.mainframerPath
form.buildCommandField.text = data.buildCommand
form.taskField.text = data.taskName
}
fun createMFTaskDataFromForms() = MFTaskData(
mainframerPath = form.mainframerToolField.text,
buildCommand = form.buildCommandField.text,
taskName = form.taskField.text)
} | package com.elpassion.intelijidea.task.edit
import com.elpassion.intelijidea.task.MFTaskData
import com.intellij.openapi.project.Project
import com.intellij.openapi.ui.DialogWrapper
import com.intellij.openapi.ui.TextFieldWithBrowseButton
import com.intellij.openapi.ui.ValidationInfo
import javax.swing.JComponent
import javax.swing.JTextField
class MFBeforeRunTaskDialog(project: Project) : DialogWrapper(project), TaskEditForm {
private val taskEditValidator = TaskEditValidator(this)
val form = MFBeforeRunTaskForm(project)
init {
isModal = true
init()
}
override fun createCenterPanel(): JComponent = form.panel
override fun doValidate(): ValidationInfo? = taskEditValidator.doValidate()
override fun taskField(): JTextField = form.taskField
override fun buildCommandField(): JTextField = form.buildCommandField
override fun mainframerToolField(): TextFieldWithBrowseButton = form.mainframerToolField
fun restoreMainframerTask(data: MFTaskData) {
form.mainframerToolField.text = data.mainframerPath
form.buildCommandField.text = data.buildCommand
form.taskField.text = data.taskName
}
fun createMFTaskDataFromForms() = MFTaskData(
mainframerPath = form.mainframerToolField.text,
buildCommand = form.buildCommandField.text,
taskName = form.taskField.text)
} | Convert methods bodies to expression | [Refactoring] Convert methods bodies to expression
| Kotlin | apache-2.0 | elpassion/mainframer-intellij-plugin,elpassion/mainframer-intellij-plugin,elpassion/mainframer-intellij-plugin | kotlin | ## Code Before:
package com.elpassion.intelijidea.task.edit
import com.elpassion.intelijidea.task.MFTaskData
import com.intellij.openapi.project.Project
import com.intellij.openapi.ui.DialogWrapper
import com.intellij.openapi.ui.TextFieldWithBrowseButton
import com.intellij.openapi.ui.ValidationInfo
import javax.swing.JComponent
import javax.swing.JTextField
class MFBeforeRunTaskDialog(project: Project) : DialogWrapper(project), TaskEditForm {
private val taskEditValidator = TaskEditValidator(this)
val form = MFBeforeRunTaskForm(project)
init {
isModal = true
init()
}
override fun createCenterPanel(): JComponent {
return form.panel
}
override fun doValidate(): ValidationInfo? {
return taskEditValidator.doValidate()
}
override fun taskField(): JTextField {
return form.taskField
}
override fun buildCommandField(): JTextField {
return form.buildCommandField
}
override fun mainframerToolField(): TextFieldWithBrowseButton {
return form.mainframerToolField
}
fun restoreMainframerTask(data: MFTaskData) {
form.mainframerToolField.text = data.mainframerPath
form.buildCommandField.text = data.buildCommand
form.taskField.text = data.taskName
}
fun createMFTaskDataFromForms() = MFTaskData(
mainframerPath = form.mainframerToolField.text,
buildCommand = form.buildCommandField.text,
taskName = form.taskField.text)
}
## Instruction:
[Refactoring] Convert methods bodies to expression
## Code After:
package com.elpassion.intelijidea.task.edit
import com.elpassion.intelijidea.task.MFTaskData
import com.intellij.openapi.project.Project
import com.intellij.openapi.ui.DialogWrapper
import com.intellij.openapi.ui.TextFieldWithBrowseButton
import com.intellij.openapi.ui.ValidationInfo
import javax.swing.JComponent
import javax.swing.JTextField
class MFBeforeRunTaskDialog(project: Project) : DialogWrapper(project), TaskEditForm {
private val taskEditValidator = TaskEditValidator(this)
val form = MFBeforeRunTaskForm(project)
init {
isModal = true
init()
}
override fun createCenterPanel(): JComponent = form.panel
override fun doValidate(): ValidationInfo? = taskEditValidator.doValidate()
override fun taskField(): JTextField = form.taskField
override fun buildCommandField(): JTextField = form.buildCommandField
override fun mainframerToolField(): TextFieldWithBrowseButton = form.mainframerToolField
fun restoreMainframerTask(data: MFTaskData) {
form.mainframerToolField.text = data.mainframerPath
form.buildCommandField.text = data.buildCommand
form.taskField.text = data.taskName
}
fun createMFTaskDataFromForms() = MFTaskData(
mainframerPath = form.mainframerToolField.text,
buildCommand = form.buildCommandField.text,
taskName = form.taskField.text)
} | package com.elpassion.intelijidea.task.edit
import com.elpassion.intelijidea.task.MFTaskData
import com.intellij.openapi.project.Project
import com.intellij.openapi.ui.DialogWrapper
import com.intellij.openapi.ui.TextFieldWithBrowseButton
import com.intellij.openapi.ui.ValidationInfo
import javax.swing.JComponent
import javax.swing.JTextField
class MFBeforeRunTaskDialog(project: Project) : DialogWrapper(project), TaskEditForm {
private val taskEditValidator = TaskEditValidator(this)
val form = MFBeforeRunTaskForm(project)
init {
isModal = true
init()
}
- override fun createCenterPanel(): JComponent {
? ^
+ override fun createCenterPanel(): JComponent = form.panel
? ^^^^^^^^^^^^
- return form.panel
- }
+ override fun doValidate(): ValidationInfo? = taskEditValidator.doValidate()
- override fun doValidate(): ValidationInfo? {
- return taskEditValidator.doValidate()
- }
- override fun taskField(): JTextField {
? ^
+ override fun taskField(): JTextField = form.taskField
? ^^^^^^^^^^^^^^^^
- return form.taskField
- }
- override fun buildCommandField(): JTextField {
? ^
+ override fun buildCommandField(): JTextField = form.buildCommandField
? ^^^^^^^^^^^^^^^^^^^^^^^^
- return form.buildCommandField
- }
- override fun mainframerToolField(): TextFieldWithBrowseButton {
? ^
+ override fun mainframerToolField(): TextFieldWithBrowseButton = form.mainframerToolField
? ^^^^^^^^^^^^^^^^^^^^^^^^^^
- return form.mainframerToolField
- }
fun restoreMainframerTask(data: MFTaskData) {
form.mainframerToolField.text = data.mainframerPath
form.buildCommandField.text = data.buildCommand
form.taskField.text = data.taskName
}
fun createMFTaskDataFromForms() = MFTaskData(
mainframerPath = form.mainframerToolField.text,
buildCommand = form.buildCommandField.text,
taskName = form.taskField.text)
} | 20 | 0.392157 | 5 | 15 |
1c76d73a9c165ecc036abec0e502e6f0ee8beb02 | week-13.md | week-13.md | ---
topic: "Partnered checkout form page"
desc: "Create the checkout form page using all the form input and common page patterns."
clr: "1, 2, 3, 4, 5, 7, 8"
video_tutorials:
- title: "Markdown & YAML cheat sheet"
url: markdown-yaml-cheat-sheet
highlight: true
- title: "Writing a readme"
url: writing-a-readme
- title: "GitHub Issues"
url: github-issues
- title: "Branching & GitHub Flow"
url: branching-github-flow
- title: "Using GitHub for project management"
url: using-github-for-project-management
slides:
# Merging, approvals, more commits
- title: "Everybody makes mistakes"
url: everybody-makes-mistakes
disabled: true
tasks:
- type: blank
- title: "Merging teammate work"
url: merging-teammate-work
type: lesson
pair: true
disabled: true
- title: "Checkout form docs hand-off"
url: "https://github.com/acgd-webdev-4/ecommerce-checkout-form-docs-hand-off"
type: basic
submit: "Submit nothing."
button: activity
pair: true
disabled: true
graded-as: false
- title: "Checkout form page template"
url: "https://github.com/acgd-webdev-4/ecommerce-checkout-form-page-template"
submit: show
pair: true
disabled: true
no-solution: true
---
| ---
topic: "Partnered checkout form page"
desc: "Create the checkout form page using all the form input and common page patterns."
clr: "1, 2, 3, 4, 5, 7, 8"
video_tutorials:
- title: "Markdown & YAML cheat sheet"
url: markdown-yaml-cheat-sheet
highlight: true
- title: "Writing a readme"
url: writing-a-readme
- title: "GitHub Issues"
url: github-issues
- title: "Branching & GitHub Flow"
url: branching-github-flow
- title: "Using GitHub for project management"
url: using-github-for-project-management
slides:
# Merging, approvals, more commits
- title: "Everybody makes mistakes"
url: everybody-makes-mistakes
disabled: true
tasks:
- type: blank
- title: "Merging teammate work"
url: merging-teammate-work
type: lesson
pair: true
disabled: true
- title: "Project hand-off & documentation"
url: "https://github.com/acgd-webdev-4/ecommerce-project-hand-off-and-documentation"
type: basic
submit: "Submit nothing."
button: activity
pair: true
graded-as: false
- title: "Checkout form page template"
url: "https://github.com/acgd-webdev-4/ecommerce-checkout-form-page-template"
submit: show
pair: true
no-solution: true
---
| Rename an exercise & enable another | Rename an exercise & enable another
| Markdown | unlicense | acgd-webdev-3/syllabus | markdown | ## Code Before:
---
topic: "Partnered checkout form page"
desc: "Create the checkout form page using all the form input and common page patterns."
clr: "1, 2, 3, 4, 5, 7, 8"
video_tutorials:
- title: "Markdown & YAML cheat sheet"
url: markdown-yaml-cheat-sheet
highlight: true
- title: "Writing a readme"
url: writing-a-readme
- title: "GitHub Issues"
url: github-issues
- title: "Branching & GitHub Flow"
url: branching-github-flow
- title: "Using GitHub for project management"
url: using-github-for-project-management
slides:
# Merging, approvals, more commits
- title: "Everybody makes mistakes"
url: everybody-makes-mistakes
disabled: true
tasks:
- type: blank
- title: "Merging teammate work"
url: merging-teammate-work
type: lesson
pair: true
disabled: true
- title: "Checkout form docs hand-off"
url: "https://github.com/acgd-webdev-4/ecommerce-checkout-form-docs-hand-off"
type: basic
submit: "Submit nothing."
button: activity
pair: true
disabled: true
graded-as: false
- title: "Checkout form page template"
url: "https://github.com/acgd-webdev-4/ecommerce-checkout-form-page-template"
submit: show
pair: true
disabled: true
no-solution: true
---
## Instruction:
Rename an exercise & enable another
## Code After:
---
topic: "Partnered checkout form page"
desc: "Create the checkout form page using all the form input and common page patterns."
clr: "1, 2, 3, 4, 5, 7, 8"
video_tutorials:
- title: "Markdown & YAML cheat sheet"
url: markdown-yaml-cheat-sheet
highlight: true
- title: "Writing a readme"
url: writing-a-readme
- title: "GitHub Issues"
url: github-issues
- title: "Branching & GitHub Flow"
url: branching-github-flow
- title: "Using GitHub for project management"
url: using-github-for-project-management
slides:
# Merging, approvals, more commits
- title: "Everybody makes mistakes"
url: everybody-makes-mistakes
disabled: true
tasks:
- type: blank
- title: "Merging teammate work"
url: merging-teammate-work
type: lesson
pair: true
disabled: true
- title: "Project hand-off & documentation"
url: "https://github.com/acgd-webdev-4/ecommerce-project-hand-off-and-documentation"
type: basic
submit: "Submit nothing."
button: activity
pair: true
graded-as: false
- title: "Checkout form page template"
url: "https://github.com/acgd-webdev-4/ecommerce-checkout-form-page-template"
submit: show
pair: true
no-solution: true
---
| ---
topic: "Partnered checkout form page"
desc: "Create the checkout form page using all the form input and common page patterns."
clr: "1, 2, 3, 4, 5, 7, 8"
video_tutorials:
- title: "Markdown & YAML cheat sheet"
url: markdown-yaml-cheat-sheet
highlight: true
- title: "Writing a readme"
url: writing-a-readme
- title: "GitHub Issues"
url: github-issues
- title: "Branching & GitHub Flow"
url: branching-github-flow
- title: "Using GitHub for project management"
url: using-github-for-project-management
slides:
# Merging, approvals, more commits
- title: "Everybody makes mistakes"
url: everybody-makes-mistakes
disabled: true
tasks:
- type: blank
- title: "Merging teammate work"
url: merging-teammate-work
type: lesson
pair: true
disabled: true
- - title: "Checkout form docs hand-off"
+ - title: "Project hand-off & documentation"
- url: "https://github.com/acgd-webdev-4/ecommerce-checkout-form-docs-hand-off"
? ^^ --- ----------
+ url: "https://github.com/acgd-webdev-4/ecommerce-project-hand-off-and-documentation"
? ^^^^ ++++++++++++++++++
type: basic
submit: "Submit nothing."
button: activity
pair: true
- disabled: true
graded-as: false
- title: "Checkout form page template"
url: "https://github.com/acgd-webdev-4/ecommerce-checkout-form-page-template"
submit: show
pair: true
- disabled: true
no-solution: true
--- | 6 | 0.130435 | 2 | 4 |
9ee8cd7439399f7fe2467775a8c231b8e29f6ed7 | blog/index.html | blog/index.html | ---
title: Blog
---
{% for post in paginator.posts %}
<div class="row medium-10 large-9 columns">
<article class="post-list">
<header>
<h2>
<a href="{{ post.url | prepend: site.github.url }}">{{ post.title }}</a>
</h2>
{% include post-meta.html %}
</header>
{{ post.excerpt }}
<p>
<a href="{{ post.url | prepend: site.github.url }}">Read more</a>
</p>
</article>
</div>
{% endfor %}
{% include paginator.html %} | ---
title: Blog
---
{% for post in paginator.posts %}
<article class="post-list">
<header>
<h2>
<a href="{{ post.url | prepend: site.github.url }}">{{ post.title }}</a>
</h2>
{% include post-meta.html %}
</header>
{{ post.excerpt }}
<p>
<a href="{{ post.url | prepend: site.github.url }}">Read more</a>
</p>
</article>
{% endfor %}
{% include paginator.html %} | Remove redundant foundation row columns class in post list | Remove redundant foundation row columns class in post list
| HTML | mit | yyl29/jekyll-blog,yyl29/jekyll-blog,yyl29/jekyll-blog | html | ## Code Before:
---
title: Blog
---
{% for post in paginator.posts %}
<div class="row medium-10 large-9 columns">
<article class="post-list">
<header>
<h2>
<a href="{{ post.url | prepend: site.github.url }}">{{ post.title }}</a>
</h2>
{% include post-meta.html %}
</header>
{{ post.excerpt }}
<p>
<a href="{{ post.url | prepend: site.github.url }}">Read more</a>
</p>
</article>
</div>
{% endfor %}
{% include paginator.html %}
## Instruction:
Remove redundant foundation row columns class in post list
## Code After:
---
title: Blog
---
{% for post in paginator.posts %}
<article class="post-list">
<header>
<h2>
<a href="{{ post.url | prepend: site.github.url }}">{{ post.title }}</a>
</h2>
{% include post-meta.html %}
</header>
{{ post.excerpt }}
<p>
<a href="{{ post.url | prepend: site.github.url }}">Read more</a>
</p>
</article>
{% endfor %}
{% include paginator.html %} | ---
title: Blog
---
{% for post in paginator.posts %}
- <div class="row medium-10 large-9 columns">
<article class="post-list">
<header>
<h2>
<a href="{{ post.url | prepend: site.github.url }}">{{ post.title }}</a>
</h2>
{% include post-meta.html %}
</header>
{{ post.excerpt }}
<p>
<a href="{{ post.url | prepend: site.github.url }}">Read more</a>
</p>
</article>
- </div>
{% endfor %}
{% include paginator.html %} | 2 | 0.090909 | 0 | 2 |
c239fd7882947372d9382cdcc7df3bc38a1d200e | loritta-plugins/rosbife/src/commonMain/kotlin/net/perfectdreams/loritta/plugin/rosbife/commands/BobBurningPaperCommand.kt | loritta-plugins/rosbife/src/commonMain/kotlin/net/perfectdreams/loritta/plugin/rosbife/commands/BobBurningPaperCommand.kt | package net.perfectdreams.loritta.plugin.rosbife.commands
import net.perfectdreams.loritta.plugin.rosbife.RosbifePlugin
import net.perfectdreams.loritta.plugin.rosbife.commands.base.BasicSkewedImageCommand
class BobBurningPaperCommand(m: RosbifePlugin) : BasicSkewedImageCommand(
m.loritta,
listOf("bobburningpaper", "bobpaperfire", "bobfire", "bobpapelfogo", "bobfogo"),
"commands.images.bobfire.description",
"bobfire.png",
Corners(
21f, 373f,
14f, 353f,
48f, 334f,
82f, 354f
)
) | package net.perfectdreams.loritta.plugin.rosbife.commands
import net.perfectdreams.loritta.plugin.rosbife.RosbifePlugin
import net.perfectdreams.loritta.plugin.rosbife.commands.base.BasicSkewedImageCommand
class BobBurningPaperCommand(m: RosbifePlugin) : BasicSkewedImageCommand(
m.loritta,
listOf("bobburningpaper", "bobpaperfire", "bobfire", "bobpapelfogo", "bobfogo"),
"commands.images.bobfire.description",
"bobfire.png",
listOf(
Corners(
21f, 373f,
14f, 353f,
48f, 334f,
82f, 354f
),
Corners(
24f, 32f,
138f, 33f,
137f, 177f,
20f, 175f
)
)
) | Fix BobBurningFireCommand not working at all | Fix BobBurningFireCommand not working at all
| Kotlin | agpl-3.0 | LorittaBot/Loritta,LorittaBot/Loritta,LorittaBot/Loritta,LorittaBot/Loritta | kotlin | ## Code Before:
package net.perfectdreams.loritta.plugin.rosbife.commands
import net.perfectdreams.loritta.plugin.rosbife.RosbifePlugin
import net.perfectdreams.loritta.plugin.rosbife.commands.base.BasicSkewedImageCommand
class BobBurningPaperCommand(m: RosbifePlugin) : BasicSkewedImageCommand(
m.loritta,
listOf("bobburningpaper", "bobpaperfire", "bobfire", "bobpapelfogo", "bobfogo"),
"commands.images.bobfire.description",
"bobfire.png",
Corners(
21f, 373f,
14f, 353f,
48f, 334f,
82f, 354f
)
)
## Instruction:
Fix BobBurningFireCommand not working at all
## Code After:
package net.perfectdreams.loritta.plugin.rosbife.commands
import net.perfectdreams.loritta.plugin.rosbife.RosbifePlugin
import net.perfectdreams.loritta.plugin.rosbife.commands.base.BasicSkewedImageCommand
class BobBurningPaperCommand(m: RosbifePlugin) : BasicSkewedImageCommand(
m.loritta,
listOf("bobburningpaper", "bobpaperfire", "bobfire", "bobpapelfogo", "bobfogo"),
"commands.images.bobfire.description",
"bobfire.png",
listOf(
Corners(
21f, 373f,
14f, 353f,
48f, 334f,
82f, 354f
),
Corners(
24f, 32f,
138f, 33f,
137f, 177f,
20f, 175f
)
)
) | package net.perfectdreams.loritta.plugin.rosbife.commands
import net.perfectdreams.loritta.plugin.rosbife.RosbifePlugin
import net.perfectdreams.loritta.plugin.rosbife.commands.base.BasicSkewedImageCommand
class BobBurningPaperCommand(m: RosbifePlugin) : BasicSkewedImageCommand(
m.loritta,
listOf("bobburningpaper", "bobpaperfire", "bobfire", "bobpapelfogo", "bobfogo"),
"commands.images.bobfire.description",
"bobfire.png",
+ listOf(
- Corners(
+ Corners(
? ++
- 21f, 373f,
+ 21f, 373f,
? ++
+
- 14f, 353f,
+ 14f, 353f,
? ++
+
- 48f, 334f,
+ 48f, 334f,
? ++
+
- 82f, 354f
+ 82f, 354f
? ++
+ ),
+ Corners(
+ 24f, 32f,
+
+ 138f, 33f,
+
+ 137f, 177f,
+
+ 20f, 175f
+ )
)
) | 24 | 1.411765 | 19 | 5 |
48b71fd2fc31c4510a4d9aa11c3e86cafe129bef | app/views/top/index.html.slim | app/views/top/index.html.slim | header
.photo-bg.overlay
.noise.overlay
.header-innner.overlay
p.catch
| Rubyist は、すぐそこに
h2
| Rubyist Connect
span beta
p.header-lead
| Rubyist Connect は、あなたの身近な Rubyist や趣味の近い Rubyist を探すことができます。
br
| 魅力的な Rubyist とつながって一緒に勉強してみませんか。
= link_to user_omniauth_authorize_path(:github), class: 'login-btn btn' do
i.fa.fa-github-square
| Sign in with GitHub
article.about
h2.bold about
ul
li
i.fa.fa-search
h3 Search
p 近くの Rubyist と
li
i.fa.fa-share-alt
h3 Share
p 趣味の近い Rubyist を
li
i.fa.fa-pencil
h3 Study
p 勉強会をサポート
article.new-members
h2.bold new members
ul
- @users.each do |user|
li
= image_tag user.image, class: 'img-circle', size: '80x80', alt: user.name_or_nickname
a.btn
| more...
footer
p
| Author by
= link_to '@yuji_shimoda', 'https://twitter.com/yuji_shimoda', target: '_blank' | header
.photo-bg.overlay
.noise.overlay
.header-innner.overlay
p.catch
| Rubyist は、すぐそこに
h2
| Rubyist Connect
span beta
p.header-lead
| Rubyist Connect は、あなたの身近な Rubyist や趣味の近い Rubyist を探すことができます。
br
| 魅力的な Rubyist とつながって一緒に勉強してみませんか。
= link_to user_omniauth_authorize_path(:github), class: 'login-btn btn' do
= fa_icon 'github-square'
| Sign in with GitHub
article.about
h2.bold about
ul
li
= fa_icon 'search'
h3 Search
p 近くの Rubyist と
li
= fa_icon 'share-alt'
h3 Share
p 趣味の近い Rubyist を
li
= fa_icon 'pencil'
h3 Study
p 勉強会をサポート
article.new-members
h2.bold new members
ul
- @users.each do |user|
li
= image_tag user.image, class: 'img-circle', size: '80x80', alt: user.name_or_nickname
a.btn
| more...
footer
p
| Author by
= link_to '@yuji_shimoda', 'https://twitter.com/yuji_shimoda', target: '_blank' | Use helper method for fontawesome | Use helper method for fontawesome
| Slim | mit | rubyist-connect/rubyist-connect,rubyist-connect/rubyist-connect,JunichiIto/rubyist-connect,rubyist-connect/rubyist-connect,JunichiIto/rubyist-connect,JunichiIto/rubyist-connect | slim | ## Code Before:
header
.photo-bg.overlay
.noise.overlay
.header-innner.overlay
p.catch
| Rubyist は、すぐそこに
h2
| Rubyist Connect
span beta
p.header-lead
| Rubyist Connect は、あなたの身近な Rubyist や趣味の近い Rubyist を探すことができます。
br
| 魅力的な Rubyist とつながって一緒に勉強してみませんか。
= link_to user_omniauth_authorize_path(:github), class: 'login-btn btn' do
i.fa.fa-github-square
| Sign in with GitHub
article.about
h2.bold about
ul
li
i.fa.fa-search
h3 Search
p 近くの Rubyist と
li
i.fa.fa-share-alt
h3 Share
p 趣味の近い Rubyist を
li
i.fa.fa-pencil
h3 Study
p 勉強会をサポート
article.new-members
h2.bold new members
ul
- @users.each do |user|
li
= image_tag user.image, class: 'img-circle', size: '80x80', alt: user.name_or_nickname
a.btn
| more...
footer
p
| Author by
= link_to '@yuji_shimoda', 'https://twitter.com/yuji_shimoda', target: '_blank'
## Instruction:
Use helper method for fontawesome
## Code After:
header
.photo-bg.overlay
.noise.overlay
.header-innner.overlay
p.catch
| Rubyist は、すぐそこに
h2
| Rubyist Connect
span beta
p.header-lead
| Rubyist Connect は、あなたの身近な Rubyist や趣味の近い Rubyist を探すことができます。
br
| 魅力的な Rubyist とつながって一緒に勉強してみませんか。
= link_to user_omniauth_authorize_path(:github), class: 'login-btn btn' do
= fa_icon 'github-square'
| Sign in with GitHub
article.about
h2.bold about
ul
li
= fa_icon 'search'
h3 Search
p 近くの Rubyist と
li
= fa_icon 'share-alt'
h3 Share
p 趣味の近い Rubyist を
li
= fa_icon 'pencil'
h3 Study
p 勉強会をサポート
article.new-members
h2.bold new members
ul
- @users.each do |user|
li
= image_tag user.image, class: 'img-circle', size: '80x80', alt: user.name_or_nickname
a.btn
| more...
footer
p
| Author by
= link_to '@yuji_shimoda', 'https://twitter.com/yuji_shimoda', target: '_blank' | header
.photo-bg.overlay
.noise.overlay
.header-innner.overlay
p.catch
| Rubyist は、すぐそこに
h2
| Rubyist Connect
span beta
p.header-lead
| Rubyist Connect は、あなたの身近な Rubyist や趣味の近い Rubyist を探すことができます。
br
| 魅力的な Rubyist とつながって一緒に勉強してみませんか。
= link_to user_omniauth_authorize_path(:github), class: 'login-btn btn' do
- i.fa.fa-github-square
+ = fa_icon 'github-square'
| Sign in with GitHub
article.about
h2.bold about
ul
li
- i.fa.fa-search
+ = fa_icon 'search'
h3 Search
p 近くの Rubyist と
li
- i.fa.fa-share-alt
+ = fa_icon 'share-alt'
h3 Share
p 趣味の近い Rubyist を
li
- i.fa.fa-pencil
+ = fa_icon 'pencil'
h3 Study
p 勉強会をサポート
article.new-members
h2.bold new members
ul
- @users.each do |user|
li
= image_tag user.image, class: 'img-circle', size: '80x80', alt: user.name_or_nickname
a.btn
| more...
footer
p
| Author by
= link_to '@yuji_shimoda', 'https://twitter.com/yuji_shimoda', target: '_blank' | 8 | 0.173913 | 4 | 4 |
14c3bfcf1473848a89485c66111a4d1345734535 | core/templates/dev/head/editor/sidebar_state_parameter_changes.html | core/templates/dev/head/editor/sidebar_state_parameter_changes.html | <div ng-controller="StateParamChangesEditor" style="margin-top: 35px;">
<span style="font-size: 16px;">
<strong ng-if="editabilityService.isEditable() || stateParamChanges.length > 0">State Parameter Changes (Advanced)</strong>
</span>
<span class="glyphicon glyphicon-info-sign" tooltip="These are applied at the beginning of the state." tooltip-placement="bottom" style="font-size: 12px; padding-left: 18px;"></span>
<md-card style="background-color: white; margin: 20px 0px; padding: 10px 10px;">
<param-change-editor param-changes="stateParamChanges"
save-param-changes="saveStateParamChanges"
is-editable="editabilityService.isEditable()">
</param-change-editor>
</md-card>
</div>
| <div ng-controller="StateParamChangesEditor" style="margin-top: 35px;">
<span style="font-size: 16px;">
<strong ng-if="editabilityService.isEditableOutsideTutorialMode() || stateParamChanges.length > 0">State Parameter Changes (Advanced)</strong>
</span>
<span class="glyphicon glyphicon-info-sign" tooltip="These are applied at the beginning of the state." tooltip-placement="bottom" style="font-size: 12px; padding-left: 18px;"></span>
<md-card style="background-color: white; margin: 20px 0px; padding: 10px 10px;">
<param-change-editor param-changes="stateParamChanges"
save-param-changes="saveStateParamChanges"
is-editable="editabilityService.isEditableOutsideTutorialMode()">
</param-change-editor>
</md-card>
</div>
| Fix bug in header disappearing when tutorial is loaded. | Fix bug in header disappearing when tutorial is loaded.
| HTML | apache-2.0 | toooooper/oppia,MAKOSCAFEE/oppia,nagyistoce/oppia,infinyte/oppia,anthkris/oppia,kingctan/oppia,kevinlee12/oppia,virajprabhu/oppia,michaelWagner/oppia,sanyaade-teachings/oppia,sdulal/oppia,anggorodewanto/oppia,oulan/oppia,oulan/oppia,Atlas-Sailed-Co/oppia,anggorodewanto/oppia,edallison/oppia,jestapinski/oppia,leandrotoledo/oppia,virajprabhu/oppia,AllanYangZhou/oppia,Dev4X/oppia,DewarM/oppia,dippatel1994/oppia,Atlas-Sailed-Co/oppia,danieljjh/oppia,edallison/oppia,gale320/oppia,sbhowmik89/oppia,brianrodri/oppia,MAKOSCAFEE/oppia,prasanna08/oppia,oppia/oppia,kennho/oppia,kingctan/oppia,hazmatzo/oppia,zgchizi/oppia-uc,mit0110/oppia,zgchizi/oppia-uc,AllanYangZhou/oppia,sanyaade-teachings/oppia,oppia/oppia,sarahfo/oppia,nagyistoce/oppia,bjvoth/oppia,directorlive/oppia,CMDann/oppia,wangsai/oppia,kingctan/oppia,virajprabhu/oppia,directorlive/oppia,MAKOSCAFEE/oppia,sanyaade-teachings/oppia,won0089/oppia,sunu/oppia,amgowano/oppia,raju249/oppia,kennho/oppia,rackstar17/oppia,MaximLich/oppia,CMDann/oppia,dippatel1994/oppia,Dev4X/oppia,whygee/oppia,sdulal/oppia,felipecocco/oppia,sbhowmik89/oppia,souravbadami/oppia,gale320/oppia,sbhowmik89/oppia,raju249/oppia,raju249/oppia,felipecocco/oppia,nagyistoce/oppia,Atlas-Sailed-Co/oppia,shaz13/oppia,brylie/oppia,gale320/oppia,whygee/oppia,jestapinski/oppia,BenHenning/oppia,amgowano/oppia,anggorodewanto/oppia,won0089/oppia,DewarM/oppia,cleophasmashiri/oppia,anggorodewanto/oppia,fernandopinhati/oppia,wangsai/oppia,dippatel1994/oppia,whygee/oppia,brianrodri/oppia,kaffeel/oppia,terrameijar/oppia,edallison/oppia,virajprabhu/oppia,rackstar17/oppia,Atlas-Sailed-Co/oppia,kingctan/oppia,toooooper/oppia,sunu/oppia,brianrodri/oppia,sarahfo/oppia,nagyistoce/oppia,AllanYangZhou/oppia,toooooper/oppia,anthkris/oppia,google-code-export/oppia,danieljjh/oppia,mit0110/oppia,cleophasmashiri/oppia,sbhowmik89/oppia,felipecocco/oppia,sbhowmik89/oppia,directorlive/oppia,gale320/oppia,kennho/oppia,prasanna08/oppia,rackstar17/oppia,himanshu-dixit/oppia,infinyte/oppia,wangsai/oppia,amitdeutsch/oppia,Atlas-Sailed-Co/oppia,VictoriaRoux/oppia,brylie/oppia,zgchizi/oppia-uc,raju249/oppia,won0089/oppia,asandyz/oppia,BenHenning/oppia,hazmatzo/oppia,oulan/oppia,michaelWagner/oppia,MaximLich/oppia,kaffeel/oppia,wangsai/oppia,BenHenning/oppia,dippatel1994/oppia,infinyte/oppia,michaelWagner/oppia,sdulal/oppia,hazmatzo/oppia,cleophasmashiri/oppia,shaz13/oppia,fernandopinhati/oppia,jestapinski/oppia,amitdeutsch/oppia,infinyte/oppia,michaelWagner/oppia,BenHenning/oppia,amitdeutsch/oppia,Cgruppo/oppia,sdulal/oppia,Dev4X/oppia,danieljjh/oppia,anthkris/oppia,VictoriaRoux/oppia,kingctan/oppia,leandrotoledo/oppia,asandyz/oppia,infinyte/oppia,souravbadami/oppia,prasanna08/oppia,leandrotoledo/oppia,MAKOSCAFEE/oppia,oppia/oppia,souravbadami/oppia,anthkris/oppia,DewarM/oppia,oulan/oppia,amitdeutsch/oppia,sarahfo/oppia,sunu/oppia,VictoriaRoux/oppia,google-code-export/oppia,terrameijar/oppia,directorlive/oppia,kaffeel/oppia,shaz13/oppia,toooooper/oppia,whygee/oppia,brylie/oppia,kennho/oppia,wangsai/oppia,sarahfo/oppia,DewarM/oppia,brianrodri/oppia,CMDann/oppia,mit0110/oppia,nagyistoce/oppia,terrameijar/oppia,leandrotoledo/oppia,felipecocco/oppia,google-code-export/oppia,sanyaade-teachings/oppia,virajprabhu/oppia,Cgruppo/oppia,brylie/oppia,AllanYangZhou/oppia,Cgruppo/oppia,MaximLich/oppia,bjvoth/oppia,asandyz/oppia,gale320/oppia,Cgruppo/oppia,felipecocco/oppia,jestapinski/oppia,souravbadami/oppia,directorlive/oppia,rackstar17/oppia,kevinlee12/oppia,oppia/oppia,bjvoth/oppia,himanshu-dixit/oppia,sanyaade-teachings/oppia,sarahfo/oppia,amgowano/oppia,asandyz/oppia,oulan/oppia,dippatel1994/oppia,amgowano/oppia,VictoriaRoux/oppia,shaz13/oppia,terrameijar/oppia,bjvoth/oppia,prasanna08/oppia,toooooper/oppia,won0089/oppia,CMDann/oppia,sunu/oppia,Dev4X/oppia,mit0110/oppia,souravbadami/oppia,google-code-export/oppia,google-code-export/oppia,Cgruppo/oppia,VictoriaRoux/oppia,asandyz/oppia,cleophasmashiri/oppia,oppia/oppia,mit0110/oppia,fernandopinhati/oppia,zgchizi/oppia-uc,brianrodri/oppia,DewarM/oppia,prasanna08/oppia,bjvoth/oppia,BenHenning/oppia,fernandopinhati/oppia,himanshu-dixit/oppia,kevinlee12/oppia,michaelWagner/oppia,danieljjh/oppia,cleophasmashiri/oppia,sdulal/oppia,kaffeel/oppia,won0089/oppia,kevinlee12/oppia,kevinlee12/oppia,hazmatzo/oppia,brylie/oppia,danieljjh/oppia,MaximLich/oppia,fernandopinhati/oppia,kaffeel/oppia,Dev4X/oppia,sunu/oppia,hazmatzo/oppia,leandrotoledo/oppia,amitdeutsch/oppia,kennho/oppia,himanshu-dixit/oppia,CMDann/oppia,edallison/oppia,whygee/oppia | html | ## Code Before:
<div ng-controller="StateParamChangesEditor" style="margin-top: 35px;">
<span style="font-size: 16px;">
<strong ng-if="editabilityService.isEditable() || stateParamChanges.length > 0">State Parameter Changes (Advanced)</strong>
</span>
<span class="glyphicon glyphicon-info-sign" tooltip="These are applied at the beginning of the state." tooltip-placement="bottom" style="font-size: 12px; padding-left: 18px;"></span>
<md-card style="background-color: white; margin: 20px 0px; padding: 10px 10px;">
<param-change-editor param-changes="stateParamChanges"
save-param-changes="saveStateParamChanges"
is-editable="editabilityService.isEditable()">
</param-change-editor>
</md-card>
</div>
## Instruction:
Fix bug in header disappearing when tutorial is loaded.
## Code After:
<div ng-controller="StateParamChangesEditor" style="margin-top: 35px;">
<span style="font-size: 16px;">
<strong ng-if="editabilityService.isEditableOutsideTutorialMode() || stateParamChanges.length > 0">State Parameter Changes (Advanced)</strong>
</span>
<span class="glyphicon glyphicon-info-sign" tooltip="These are applied at the beginning of the state." tooltip-placement="bottom" style="font-size: 12px; padding-left: 18px;"></span>
<md-card style="background-color: white; margin: 20px 0px; padding: 10px 10px;">
<param-change-editor param-changes="stateParamChanges"
save-param-changes="saveStateParamChanges"
is-editable="editabilityService.isEditableOutsideTutorialMode()">
</param-change-editor>
</md-card>
</div>
| <div ng-controller="StateParamChangesEditor" style="margin-top: 35px;">
<span style="font-size: 16px;">
- <strong ng-if="editabilityService.isEditable() || stateParamChanges.length > 0">State Parameter Changes (Advanced)</strong>
+ <strong ng-if="editabilityService.isEditableOutsideTutorialMode() || stateParamChanges.length > 0">State Parameter Changes (Advanced)</strong>
? +++++++++++++++++++
</span>
<span class="glyphicon glyphicon-info-sign" tooltip="These are applied at the beginning of the state." tooltip-placement="bottom" style="font-size: 12px; padding-left: 18px;"></span>
<md-card style="background-color: white; margin: 20px 0px; padding: 10px 10px;">
<param-change-editor param-changes="stateParamChanges"
save-param-changes="saveStateParamChanges"
- is-editable="editabilityService.isEditable()">
+ is-editable="editabilityService.isEditableOutsideTutorialMode()">
? +++++++++++++++++++
</param-change-editor>
</md-card>
</div> | 4 | 0.333333 | 2 | 2 |
9ae5b882b987cd56fe20996733a828171b18aa3a | polygraph/types/tests/test_object_type.py | polygraph/types/tests/test_object_type.py | from collections import OrderedDict
from unittest import TestCase
from graphql.type.definition import GraphQLField, GraphQLObjectType
from graphql.type.scalars import GraphQLString
from polygraph.types.definitions import PolygraphNonNull
from polygraph.types.fields import String
from polygraph.types.object_type import ObjectType
from polygraph.types.tests.helpers import graphql_objects_equal
class HelloWorldObject(ObjectType):
"""
This is a test object
"""
first = String(description="First violin", nullable=True)
second = String(description="Second fiddle", nullable=False)
third = String(deprecation_reason="Third is dead")
class ObjectTypeTest(TestCase):
def test_simple_object_type(self):
hello_world = HelloWorldObject()
expected = GraphQLObjectType(
name="HelloWorldObject",
description="This is a test object",
fields=OrderedDict({
"first": GraphQLField(GraphQLString, None, None, None, "First violin"),
"second": GraphQLField(
PolygraphNonNull(GraphQLString), None, None, None, "Second fiddle"),
"third": GraphQLField(
PolygraphNonNull(GraphQLString), None, None, "Third is dead", None),
})
)
actual = hello_world.build_definition()
self.assertTrue(graphql_objects_equal(expected, actual))
| from collections import OrderedDict
from unittest import TestCase
from graphql.type.definition import GraphQLField, GraphQLObjectType
from graphql.type.scalars import GraphQLString
from polygraph.types.definitions import PolygraphNonNull
from polygraph.types.fields import String, Int
from polygraph.types.object_type import ObjectType
from polygraph.types.tests.helpers import graphql_objects_equal
class ObjectTypeTest(TestCase):
def test_simple_object_type(self):
class HelloWorldObject(ObjectType):
"""
This is a test object
"""
first = String(description="First violin", nullable=True)
second = String(description="Second fiddle", nullable=False)
third = String(deprecation_reason="Third is dead")
hello_world = HelloWorldObject()
expected = GraphQLObjectType(
name="HelloWorldObject",
description="This is a test object",
fields=OrderedDict({
"first": GraphQLField(GraphQLString, None, None, None, "First violin"),
"second": GraphQLField(
PolygraphNonNull(GraphQLString), None, None, None, "Second fiddle"),
"third": GraphQLField(
PolygraphNonNull(GraphQLString), None, None, "Third is dead", None),
})
)
actual = hello_world.build_definition()
self.assertTrue(graphql_objects_equal(expected, actual))
def test_object_type_meta(self):
class MetaObject(ObjectType):
"""
This docstring is _not_ the description
"""
count = Int()
class Meta:
name = "Meta"
description = "Actual meta description is here"
meta = MetaObject()
self.assertEqual(meta.description, "Actual meta description is here")
self.assertEqual(meta.name, "Meta")
| Add tests around ObjectType Meta | Add tests around ObjectType Meta
| Python | mit | polygraph-python/polygraph | python | ## Code Before:
from collections import OrderedDict
from unittest import TestCase
from graphql.type.definition import GraphQLField, GraphQLObjectType
from graphql.type.scalars import GraphQLString
from polygraph.types.definitions import PolygraphNonNull
from polygraph.types.fields import String
from polygraph.types.object_type import ObjectType
from polygraph.types.tests.helpers import graphql_objects_equal
class HelloWorldObject(ObjectType):
"""
This is a test object
"""
first = String(description="First violin", nullable=True)
second = String(description="Second fiddle", nullable=False)
third = String(deprecation_reason="Third is dead")
class ObjectTypeTest(TestCase):
def test_simple_object_type(self):
hello_world = HelloWorldObject()
expected = GraphQLObjectType(
name="HelloWorldObject",
description="This is a test object",
fields=OrderedDict({
"first": GraphQLField(GraphQLString, None, None, None, "First violin"),
"second": GraphQLField(
PolygraphNonNull(GraphQLString), None, None, None, "Second fiddle"),
"third": GraphQLField(
PolygraphNonNull(GraphQLString), None, None, "Third is dead", None),
})
)
actual = hello_world.build_definition()
self.assertTrue(graphql_objects_equal(expected, actual))
## Instruction:
Add tests around ObjectType Meta
## Code After:
from collections import OrderedDict
from unittest import TestCase
from graphql.type.definition import GraphQLField, GraphQLObjectType
from graphql.type.scalars import GraphQLString
from polygraph.types.definitions import PolygraphNonNull
from polygraph.types.fields import String, Int
from polygraph.types.object_type import ObjectType
from polygraph.types.tests.helpers import graphql_objects_equal
class ObjectTypeTest(TestCase):
def test_simple_object_type(self):
class HelloWorldObject(ObjectType):
"""
This is a test object
"""
first = String(description="First violin", nullable=True)
second = String(description="Second fiddle", nullable=False)
third = String(deprecation_reason="Third is dead")
hello_world = HelloWorldObject()
expected = GraphQLObjectType(
name="HelloWorldObject",
description="This is a test object",
fields=OrderedDict({
"first": GraphQLField(GraphQLString, None, None, None, "First violin"),
"second": GraphQLField(
PolygraphNonNull(GraphQLString), None, None, None, "Second fiddle"),
"third": GraphQLField(
PolygraphNonNull(GraphQLString), None, None, "Third is dead", None),
})
)
actual = hello_world.build_definition()
self.assertTrue(graphql_objects_equal(expected, actual))
def test_object_type_meta(self):
class MetaObject(ObjectType):
"""
This docstring is _not_ the description
"""
count = Int()
class Meta:
name = "Meta"
description = "Actual meta description is here"
meta = MetaObject()
self.assertEqual(meta.description, "Actual meta description is here")
self.assertEqual(meta.name, "Meta")
| from collections import OrderedDict
from unittest import TestCase
from graphql.type.definition import GraphQLField, GraphQLObjectType
from graphql.type.scalars import GraphQLString
from polygraph.types.definitions import PolygraphNonNull
- from polygraph.types.fields import String
+ from polygraph.types.fields import String, Int
? +++++
from polygraph.types.object_type import ObjectType
from polygraph.types.tests.helpers import graphql_objects_equal
- class HelloWorldObject(ObjectType):
- """
- This is a test object
- """
- first = String(description="First violin", nullable=True)
- second = String(description="Second fiddle", nullable=False)
- third = String(deprecation_reason="Third is dead")
-
-
class ObjectTypeTest(TestCase):
def test_simple_object_type(self):
+ class HelloWorldObject(ObjectType):
+ """
+ This is a test object
+ """
+ first = String(description="First violin", nullable=True)
+ second = String(description="Second fiddle", nullable=False)
+ third = String(deprecation_reason="Third is dead")
+
hello_world = HelloWorldObject()
expected = GraphQLObjectType(
name="HelloWorldObject",
description="This is a test object",
fields=OrderedDict({
"first": GraphQLField(GraphQLString, None, None, None, "First violin"),
"second": GraphQLField(
PolygraphNonNull(GraphQLString), None, None, None, "Second fiddle"),
"third": GraphQLField(
PolygraphNonNull(GraphQLString), None, None, "Third is dead", None),
})
)
actual = hello_world.build_definition()
self.assertTrue(graphql_objects_equal(expected, actual))
+
+ def test_object_type_meta(self):
+ class MetaObject(ObjectType):
+ """
+ This docstring is _not_ the description
+ """
+ count = Int()
+
+ class Meta:
+ name = "Meta"
+ description = "Actual meta description is here"
+
+ meta = MetaObject()
+ self.assertEqual(meta.description, "Actual meta description is here")
+ self.assertEqual(meta.name, "Meta") | 34 | 0.918919 | 24 | 10 |
09ac34824180399a21e6d55ee18c80f5bdf93373 | .vscode/settings.json | .vscode/settings.json | // Place your settings in this file to overwrite default and user settings.
{
"python.pythonPath": "~/.pyenv/shims/python",
"files.exclude": {
"**/*.pyc": true,
"docs/_build": true,
"build": true
},
"git.ignoreLimitWarning": true,
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.testing.pytestEnabled": true,
"python.formatting.provider": "autopep8",
"python.formatting.autopep8Args": [
"--ignore-local-config",
"--ignore",
"E265,E402,E202,E225,E226",
"--max-line-length",
"120"
]
}
| // Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"**/*.pyc": true,
"docs/_build": true,
"build": true
},
"git.ignoreLimitWarning": true,
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.testing.pytestEnabled": true,
"python.formatting.provider": "autopep8",
"python.formatting.autopep8Args": [
"--ignore-local-config",
"--ignore",
"E265,E402,E202,E225,E226",
"--max-line-length",
"120"
]
}
| Read Google key from github secrets | Read Google key from github secrets
| JSON | mit | wandb/client,wandb/client,wandb/client | json | ## Code Before:
// Place your settings in this file to overwrite default and user settings.
{
"python.pythonPath": "~/.pyenv/shims/python",
"files.exclude": {
"**/*.pyc": true,
"docs/_build": true,
"build": true
},
"git.ignoreLimitWarning": true,
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.testing.pytestEnabled": true,
"python.formatting.provider": "autopep8",
"python.formatting.autopep8Args": [
"--ignore-local-config",
"--ignore",
"E265,E402,E202,E225,E226",
"--max-line-length",
"120"
]
}
## Instruction:
Read Google key from github secrets
## Code After:
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"**/*.pyc": true,
"docs/_build": true,
"build": true
},
"git.ignoreLimitWarning": true,
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.testing.pytestEnabled": true,
"python.formatting.provider": "autopep8",
"python.formatting.autopep8Args": [
"--ignore-local-config",
"--ignore",
"E265,E402,E202,E225,E226",
"--max-line-length",
"120"
]
}
| // Place your settings in this file to overwrite default and user settings.
{
- "python.pythonPath": "~/.pyenv/shims/python",
"files.exclude": {
"**/*.pyc": true,
"docs/_build": true,
"build": true
},
"git.ignoreLimitWarning": true,
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.testing.pytestEnabled": true,
"python.formatting.provider": "autopep8",
"python.formatting.autopep8Args": [
"--ignore-local-config",
"--ignore",
"E265,E402,E202,E225,E226",
"--max-line-length",
"120"
]
} | 1 | 0.047619 | 0 | 1 |
ffff50925244869610bc499113235a01b3f74c0f | resources/views/layouts/_navbar.blade.php | resources/views/layouts/_navbar.blade.php | <div class="row">
<div class="columns twelve-xs">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="collapse navbar-collapse" id="navbar_main">
<offcanvas element=".wrapper"></offcanvas>
<a class="navbar-brand navbar-left" href="{{ handles('orchestra::/') }}">
{{ memorize('site.name', 'Orchestra Platform') }}
</a>
<div class="navbar-form navbar-left hidden-xs">
@yield('navbar-left')
</div>
@section('navbar-right')
<a href="{{ handles('orchestra::logout', ['csrf' => true]) }}" class="btn btn-primary navbar-btn navbar-right" v-if="user">
{{ trans('orchestra/foundation::title.logout') }}
</a>
@show
</div>
</div>
</nav>
</div>
</div>
| <div class="row">
<div class="columns twelve-xs">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="collapse navbar-collapse" id="navbar_main">
<offcanvas element=".wrapper"></offcanvas>
<a class="navbar-brand navbar-left" href="{{ handles('orchestra::/') }}">
{{ memorize('site.name', 'Orchestra Platform') }}
</a>
<div class="navbar-form navbar-left hidden-xs">
@yield('navbar-left')
</div>
@section('navbar-right')
<a href="{{ handles('orchestra::logout', ['csrf' => true]) }}" class="btn btn-primary navbar-btn navbar-right v-cloak--hidden" v-if="user">
{{ trans('orchestra/foundation::title.logout') }}
</a>
@show
</div>
</div>
</nav>
</div>
</div>
| Use v-cloak until page is ready. | Use v-cloak until page is ready.
Signed-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>
| PHP | mit | orchestral/foundation,orchestral/foundation,orchestral/foundation | php | ## Code Before:
<div class="row">
<div class="columns twelve-xs">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="collapse navbar-collapse" id="navbar_main">
<offcanvas element=".wrapper"></offcanvas>
<a class="navbar-brand navbar-left" href="{{ handles('orchestra::/') }}">
{{ memorize('site.name', 'Orchestra Platform') }}
</a>
<div class="navbar-form navbar-left hidden-xs">
@yield('navbar-left')
</div>
@section('navbar-right')
<a href="{{ handles('orchestra::logout', ['csrf' => true]) }}" class="btn btn-primary navbar-btn navbar-right" v-if="user">
{{ trans('orchestra/foundation::title.logout') }}
</a>
@show
</div>
</div>
</nav>
</div>
</div>
## Instruction:
Use v-cloak until page is ready.
Signed-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>
## Code After:
<div class="row">
<div class="columns twelve-xs">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="collapse navbar-collapse" id="navbar_main">
<offcanvas element=".wrapper"></offcanvas>
<a class="navbar-brand navbar-left" href="{{ handles('orchestra::/') }}">
{{ memorize('site.name', 'Orchestra Platform') }}
</a>
<div class="navbar-form navbar-left hidden-xs">
@yield('navbar-left')
</div>
@section('navbar-right')
<a href="{{ handles('orchestra::logout', ['csrf' => true]) }}" class="btn btn-primary navbar-btn navbar-right v-cloak--hidden" v-if="user">
{{ trans('orchestra/foundation::title.logout') }}
</a>
@show
</div>
</div>
</nav>
</div>
</div>
| <div class="row">
<div class="columns twelve-xs">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="collapse navbar-collapse" id="navbar_main">
<offcanvas element=".wrapper"></offcanvas>
<a class="navbar-brand navbar-left" href="{{ handles('orchestra::/') }}">
{{ memorize('site.name', 'Orchestra Platform') }}
</a>
<div class="navbar-form navbar-left hidden-xs">
@yield('navbar-left')
</div>
@section('navbar-right')
- <a href="{{ handles('orchestra::logout', ['csrf' => true]) }}" class="btn btn-primary navbar-btn navbar-right" v-if="user">
+ <a href="{{ handles('orchestra::logout', ['csrf' => true]) }}" class="btn btn-primary navbar-btn navbar-right v-cloak--hidden" v-if="user">
? ++++++++++++++++
{{ trans('orchestra/foundation::title.logout') }}
</a>
@show
</div>
</div>
</nav>
</div>
</div>
| 2 | 0.08 | 1 | 1 |
411f04d3df8b1ef8adf4ff9ff4b9447f8e86fefa | src/model/effects/ModifyAttribute.java | src/model/effects/ModifyAttribute.java | package model.effects;
import model.Effect;
import model.stats.Stat;
import model.unit.Unit;
public class ModifyAttribute extends Effect {
public ModifyAttribute(String name, String attribute, double power) {
super(name,attribute);
this.addStat(new Stat("Power",power));
}
@Override
public void enact(Unit target) {
target.getStatCollection("Attributes").setStat(this.getID(),
target.getStatCollection("Attributes").getValue(this.getID())+this.getValue("Power"));
}
@Override
public Effect copy() {
return new ModifyAttribute(this.getName(),this.getID(),this.getValue("Power"));
}
}
| package model.effects;
import model.Effect;
import model.stats.Stat;
import model.unit.Unit;
public class ModifyAttribute extends Effect {
public ModifyAttribute(String name, String attribute, double power) {
super(name,attribute);
this.addStat(new Stat("Power",power));
}
@Override
public void enact(Unit target) {
target.getStatCollection("Attributes").setStat(this.getID(),
target.getStatCollection("Attributes").getValue(this.getID())+this.getValue("Power"));
if(target.getStatCollection("Attributes").getValue("Health")<=0){
target.getPlayer().removeUnit(target);
target.getCurrentTile().removeUnit(target);
target.getPlayer().getModel().destroyUnit(target);
}
}
@Override
public Effect copy() {
return new ModifyAttribute(this.getName(),this.getID(),this.getValue("Power"));
}
}
| Destroy units properly using Custom Abilities | Destroy units properly using Custom Abilities
| Java | mit | dylangsjackson/MissingNoEngine,dylangsjackson/MissingNoEngine,bradleysykes/game_leprechaun | java | ## Code Before:
package model.effects;
import model.Effect;
import model.stats.Stat;
import model.unit.Unit;
public class ModifyAttribute extends Effect {
public ModifyAttribute(String name, String attribute, double power) {
super(name,attribute);
this.addStat(new Stat("Power",power));
}
@Override
public void enact(Unit target) {
target.getStatCollection("Attributes").setStat(this.getID(),
target.getStatCollection("Attributes").getValue(this.getID())+this.getValue("Power"));
}
@Override
public Effect copy() {
return new ModifyAttribute(this.getName(),this.getID(),this.getValue("Power"));
}
}
## Instruction:
Destroy units properly using Custom Abilities
## Code After:
package model.effects;
import model.Effect;
import model.stats.Stat;
import model.unit.Unit;
public class ModifyAttribute extends Effect {
public ModifyAttribute(String name, String attribute, double power) {
super(name,attribute);
this.addStat(new Stat("Power",power));
}
@Override
public void enact(Unit target) {
target.getStatCollection("Attributes").setStat(this.getID(),
target.getStatCollection("Attributes").getValue(this.getID())+this.getValue("Power"));
if(target.getStatCollection("Attributes").getValue("Health")<=0){
target.getPlayer().removeUnit(target);
target.getCurrentTile().removeUnit(target);
target.getPlayer().getModel().destroyUnit(target);
}
}
@Override
public Effect copy() {
return new ModifyAttribute(this.getName(),this.getID(),this.getValue("Power"));
}
}
| package model.effects;
import model.Effect;
import model.stats.Stat;
import model.unit.Unit;
public class ModifyAttribute extends Effect {
public ModifyAttribute(String name, String attribute, double power) {
super(name,attribute);
this.addStat(new Stat("Power",power));
}
@Override
public void enact(Unit target) {
target.getStatCollection("Attributes").setStat(this.getID(),
target.getStatCollection("Attributes").getValue(this.getID())+this.getValue("Power"));
+ if(target.getStatCollection("Attributes").getValue("Health")<=0){
+ target.getPlayer().removeUnit(target);
+ target.getCurrentTile().removeUnit(target);
+ target.getPlayer().getModel().destroyUnit(target);
+ }
}
@Override
public Effect copy() {
return new ModifyAttribute(this.getName(),this.getID(),this.getValue("Power"));
}
} | 5 | 0.2 | 5 | 0 |
bb9b6a07b07fc18be19b97565c41b3f7995bf898 | app/serializers/sprangular/adjustment_serializer.rb | app/serializers/sprangular/adjustment_serializer.rb | module Sprangular
class AdjustmentSerializer < BaseSerializer
attributes :id, :source_type, :source_id,
:amount, :label, :mandatory,
:included, :eligible, :display_amount
end
end
| module Sprangular
class AdjustmentSerializer < BaseSerializer
attributes :id, :source_type, :source_id, :adjustable_type, :adjustable_id,
:amount, :label, :mandatory,
:included, :eligible, :display_amount
end
end
| Revert "Attempt to fix error in prod. with adjustable_type" | Revert "Attempt to fix error in prod. with adjustable_type"
This reverts commit 0099fadab39dab6eadc880e30e1c088900d124c5.
| Ruby | mit | sprangular/sprangular,sprangular/sprangular,sprangular/sprangular | ruby | ## Code Before:
module Sprangular
class AdjustmentSerializer < BaseSerializer
attributes :id, :source_type, :source_id,
:amount, :label, :mandatory,
:included, :eligible, :display_amount
end
end
## Instruction:
Revert "Attempt to fix error in prod. with adjustable_type"
This reverts commit 0099fadab39dab6eadc880e30e1c088900d124c5.
## Code After:
module Sprangular
class AdjustmentSerializer < BaseSerializer
attributes :id, :source_type, :source_id, :adjustable_type, :adjustable_id,
:amount, :label, :mandatory,
:included, :eligible, :display_amount
end
end
| module Sprangular
class AdjustmentSerializer < BaseSerializer
- attributes :id, :source_type, :source_id,
+ attributes :id, :source_type, :source_id, :adjustable_type, :adjustable_id,
:amount, :label, :mandatory,
:included, :eligible, :display_amount
end
end | 2 | 0.285714 | 1 | 1 |
d5e0f874a7fb89c76476cdbd3c1c82b439cb4f85 | schema/ContactPoint.schema.yaml | schema/ContactPoint.schema.yaml | title: ContactPoint
'@id': schema:ContactPoint
extends: Thing
role: tertiary
status: unstable
category: metadata
description: A contact point—for example, a R&D department.
properties:
availableLanguages:
'@id': schema:availableLanguage
description: |
Languages (human not programming) in which it is possible to communicate
with the organization/department etc.
type: array
items:
type: string
emails:
'@id': schema:email
description: Email address for correspondence.
type: array
items:
type: string
format: email
telephone:
'@id': schema:telephone
description: 'The telephone number of the contact point. Accepted formats: +44 123455, (02)12345, 006645667.'
type: string
pattern: '^[+#*\(\)\[\]]*([0-9][ ext+-pw#*\(\)\[\]]*){6,45}$'
| title: ContactPoint
'@id': schema:ContactPoint
extends: Thing
role: tertiary
status: unstable
category: metadata
description: A contact point, for example, a R&D department.
properties:
availableLanguages:
'@id': schema:availableLanguage
description: |
Languages (human not programming) in which it is possible to communicate
with the organization/department etc.
type: array
items:
type: string
emails:
'@id': schema:email
description: Email address for correspondence.
type: array
items:
type: string
format: email
telephoneNumbers:
'@id': schema:telephone
aliases:
- telephone
description: Telephone numbers for the contact point.
type: array
items:
type: string
| Make telephone number prop conistent with Person | fix(ContactPoint): Make telephone number prop conistent with Person
| YAML | apache-2.0 | stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila | yaml | ## Code Before:
title: ContactPoint
'@id': schema:ContactPoint
extends: Thing
role: tertiary
status: unstable
category: metadata
description: A contact point—for example, a R&D department.
properties:
availableLanguages:
'@id': schema:availableLanguage
description: |
Languages (human not programming) in which it is possible to communicate
with the organization/department etc.
type: array
items:
type: string
emails:
'@id': schema:email
description: Email address for correspondence.
type: array
items:
type: string
format: email
telephone:
'@id': schema:telephone
description: 'The telephone number of the contact point. Accepted formats: +44 123455, (02)12345, 006645667.'
type: string
pattern: '^[+#*\(\)\[\]]*([0-9][ ext+-pw#*\(\)\[\]]*){6,45}$'
## Instruction:
fix(ContactPoint): Make telephone number prop conistent with Person
## Code After:
title: ContactPoint
'@id': schema:ContactPoint
extends: Thing
role: tertiary
status: unstable
category: metadata
description: A contact point, for example, a R&D department.
properties:
availableLanguages:
'@id': schema:availableLanguage
description: |
Languages (human not programming) in which it is possible to communicate
with the organization/department etc.
type: array
items:
type: string
emails:
'@id': schema:email
description: Email address for correspondence.
type: array
items:
type: string
format: email
telephoneNumbers:
'@id': schema:telephone
aliases:
- telephone
description: Telephone numbers for the contact point.
type: array
items:
type: string
| title: ContactPoint
'@id': schema:ContactPoint
extends: Thing
role: tertiary
status: unstable
category: metadata
- description: A contact point—for example, a R&D department.
? ^
+ description: A contact point, for example, a R&D department.
? ^^
properties:
availableLanguages:
'@id': schema:availableLanguage
description: |
Languages (human not programming) in which it is possible to communicate
with the organization/department etc.
type: array
items:
type: string
emails:
'@id': schema:email
description: Email address for correspondence.
type: array
items:
type: string
format: email
- telephone:
+ telephoneNumbers:
? +++++++
'@id': schema:telephone
- description: 'The telephone number of the contact point. Accepted formats: +44 123455, (02)12345, 006645667.'
+ aliases:
+ - telephone
+ description: Telephone numbers for the contact point.
+ type: array
+ items:
- type: string
+ type: string
? ++
- pattern: '^[+#*\(\)\[\]]*([0-9][ ext+-pw#*\(\)\[\]]*){6,45}$' | 13 | 0.464286 | 8 | 5 |
2a942cb1b5f3380508abc84362171fa628d43f1f | .github/workflows/readmechanged.yml | .github/workflows/readmechanged.yml | name: README.md Changed
on:
push:
paths:
- 'README.md'
jobs:
send_notification:
runs-on: ubuntu-latest
steps:
- name: Send notification to README Authors
run: |
BODY='🤓 @willmcgugan @oleksis @Adilius README.md changed.'
DISCUSSIONID='MDEwOkRpc2N1c3Npb24zMzI2MjEw'
gh api graphql -H 'GraphQL-Features: discussions_api' -f body="$BODY" -F discussionId="$DISCUSSIONID" -f query='mutation($body: String!, $discussionId: ID!){addDiscussionComment(input:{body: $body , discussionId: $discussionId}){comment{id}}}'
| name: README.md Changed
on:
push:
paths:
- 'README.md'
jobs:
send_notification:
runs-on: ubuntu-latest
steps:
- name: Send notification to README Authors
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BODY='🤓 @willmcgugan @oleksis @Adilius README.md changed.'
DISCUSSIONID='MDEwOkRpc2N1c3Npb24zMzI2MjEw'
gh api graphql -H 'GraphQL-Features: discussions_api' -f body="$BODY" -F discussionId="$DISCUSSIONID" -f query='mutation($body: String!, $discussionId: ID!){addDiscussionComment(input:{body: $body , discussionId: $discussionId}){comment{id}}}'
| Add Github Token to workflow | Add Github Token to workflow
| YAML | mit | willmcgugan/rich | yaml | ## Code Before:
name: README.md Changed
on:
push:
paths:
- 'README.md'
jobs:
send_notification:
runs-on: ubuntu-latest
steps:
- name: Send notification to README Authors
run: |
BODY='🤓 @willmcgugan @oleksis @Adilius README.md changed.'
DISCUSSIONID='MDEwOkRpc2N1c3Npb24zMzI2MjEw'
gh api graphql -H 'GraphQL-Features: discussions_api' -f body="$BODY" -F discussionId="$DISCUSSIONID" -f query='mutation($body: String!, $discussionId: ID!){addDiscussionComment(input:{body: $body , discussionId: $discussionId}){comment{id}}}'
## Instruction:
Add Github Token to workflow
## Code After:
name: README.md Changed
on:
push:
paths:
- 'README.md'
jobs:
send_notification:
runs-on: ubuntu-latest
steps:
- name: Send notification to README Authors
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BODY='🤓 @willmcgugan @oleksis @Adilius README.md changed.'
DISCUSSIONID='MDEwOkRpc2N1c3Npb24zMzI2MjEw'
gh api graphql -H 'GraphQL-Features: discussions_api' -f body="$BODY" -F discussionId="$DISCUSSIONID" -f query='mutation($body: String!, $discussionId: ID!){addDiscussionComment(input:{body: $body , discussionId: $discussionId}){comment{id}}}'
| name: README.md Changed
on:
push:
paths:
- 'README.md'
jobs:
send_notification:
runs-on: ubuntu-latest
steps:
- name: Send notification to README Authors
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BODY='🤓 @willmcgugan @oleksis @Adilius README.md changed.'
DISCUSSIONID='MDEwOkRpc2N1c3Npb24zMzI2MjEw'
gh api graphql -H 'GraphQL-Features: discussions_api' -f body="$BODY" -F discussionId="$DISCUSSIONID" -f query='mutation($body: String!, $discussionId: ID!){addDiscussionComment(input:{body: $body , discussionId: $discussionId}){comment{id}}}' | 2 | 0.125 | 2 | 0 |
02c17a5fedc6e408eb92b839692de009e506a640 | src/mmw/js/src/modeling/gwlfe/entry/templates/landCoverTotal.html | src/mmw/js/src/modeling/gwlfe/entry/templates/landCoverTotal.html | {% if is_modified %}
Total: <strong>{{ userTotal }} ha</strong>
{% if (userTotal) != (autoTotal) %}
<small>
(<span class="error">{{ (userTotal - autoTotal) | abs | round(3) }}
{{ 'less' if userTotal < autoTotal else 'more' }} than
</span>
required {{ autoTotal }})
</small>
{% endif %}
{% else %}
Total: {{ autoTotal }} ha
{% endif %}
| {% if is_modified %}
Total: <strong>{{ userTotal | toLocaleString(3) }} ha</strong>
{% if (userTotal) != (autoTotal) %}
<small>
(<span class="error">{{ (userTotal - autoTotal) | abs | toLocaleString(3) }}
{{ 'less' if userTotal < autoTotal else 'more' }} than
</span>
required {{ autoTotal | toLocaleString(3) }})
</small>
{% endif %}
{% else %}
Total: {{ autoTotal | toLocaleString(3) }} ha
{% endif %}
| Format area total with thousands separators | Format area total with thousands separators
Since many of these numbers tend to be pretty large, it helps
to have some thousands separators to make reading them easier.
| HTML | apache-2.0 | WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed | html | ## Code Before:
{% if is_modified %}
Total: <strong>{{ userTotal }} ha</strong>
{% if (userTotal) != (autoTotal) %}
<small>
(<span class="error">{{ (userTotal - autoTotal) | abs | round(3) }}
{{ 'less' if userTotal < autoTotal else 'more' }} than
</span>
required {{ autoTotal }})
</small>
{% endif %}
{% else %}
Total: {{ autoTotal }} ha
{% endif %}
## Instruction:
Format area total with thousands separators
Since many of these numbers tend to be pretty large, it helps
to have some thousands separators to make reading them easier.
## Code After:
{% if is_modified %}
Total: <strong>{{ userTotal | toLocaleString(3) }} ha</strong>
{% if (userTotal) != (autoTotal) %}
<small>
(<span class="error">{{ (userTotal - autoTotal) | abs | toLocaleString(3) }}
{{ 'less' if userTotal < autoTotal else 'more' }} than
</span>
required {{ autoTotal | toLocaleString(3) }})
</small>
{% endif %}
{% else %}
Total: {{ autoTotal | toLocaleString(3) }} ha
{% endif %}
| {% if is_modified %}
- Total: <strong>{{ userTotal }} ha</strong>
+ Total: <strong>{{ userTotal | toLocaleString(3) }} ha</strong>
? ++++++++++++++++++++
{% if (userTotal) != (autoTotal) %}
<small>
- (<span class="error">{{ (userTotal - autoTotal) | abs | round(3) }}
? ^^ ^
+ (<span class="error">{{ (userTotal - autoTotal) | abs | toLocaleString(3) }}
? ++++++++++ ^ ^
{{ 'less' if userTotal < autoTotal else 'more' }} than
</span>
- required {{ autoTotal }})
+ required {{ autoTotal | toLocaleString(3) }})
? ++++++++++++++++++++
</small>
{% endif %}
{% else %}
- Total: {{ autoTotal }} ha
+ Total: {{ autoTotal | toLocaleString(3) }} ha
{% endif %} | 8 | 0.615385 | 4 | 4 |
384e7076f8c07f6192f11a813569540ddc98cc0c | kmeans.py | kmeans.py | import numpy as np
class KMeans(object):
def __init__(self, clusters, init=None):
self.clusters = clusters
self.init = init
self.centroids = np.array([])
self.partition = np.array([])
def cluster(self, dataset):
# Randomly choose initial set of centroids if undefined
if not self.init:
rows = dataset.shape[0]
self.init = np.array([dataset[i] for i in np.random.randint(0, rows-1, size=self.clusters)], dtype=np.float)
self.centroids = self.init
# Optimize
for n in range(100):
# Partition dataset
partition = []
for d in dataset:
partition.append(np.argmin([self.__distance(c, d) for c in self.centroids]))
self.partition = np.array(partition, np.float)
# Update centroids
centroids = []
for i in range(self.clusters):
vs = [d for j,d in zip(self.partition, dataset) if j == i]
if vs:
centroids.append(np.mean(vs, axis=0))
else:
centroids.append(self.centroids[i])
self.centroids = np.array(centroids, np.float)
def __distance(self, v1, v2):
return np.sum(np.power(v1 - v2, 2))
| import numpy as np
class KMeans:
def __init__(self, clusters, init=None):
self.clusters = clusters
self.init = init
self.centroids = None
self.partition = None
def cluster(self, dataset):
# Randomly choose initial set of centroids if undefined
if not self.init:
rows = np.arange(dataset.shape[0])
self.init = np.array([dataset[i] for i in np.random.choice(rows, size=self.clusters, replace=False)], dtype=np.float)
self.centroids = self.init
# Optimize
for n in range(100):
# Partition dataset
partition = []
for d in dataset:
partition.append(np.argmin([self.__distance(c, d) for c in self.centroids]))
self.partition = np.array(partition, np.float)
# Update centroids
centroids = []
for i in range(self.clusters):
vs = [d for j,d in zip(self.partition, dataset) if j == i]
if vs:
centroids.append(np.mean(vs, axis=0))
else:
centroids.append(self.centroids[i])
self.centroids = np.array(centroids, np.float)
def __distance(self, v1, v2):
return np.sum(np.power(v1 - v2, 2))
| Use numpy.random.choice in place of numpy.random.randint. | Use numpy.random.choice in place of numpy.random.randint.
Allows sampling without replacement; hence, removing the possibility
of choosing equal initial centroids.
| Python | mit | kubkon/kmeans | python | ## Code Before:
import numpy as np
class KMeans(object):
def __init__(self, clusters, init=None):
self.clusters = clusters
self.init = init
self.centroids = np.array([])
self.partition = np.array([])
def cluster(self, dataset):
# Randomly choose initial set of centroids if undefined
if not self.init:
rows = dataset.shape[0]
self.init = np.array([dataset[i] for i in np.random.randint(0, rows-1, size=self.clusters)], dtype=np.float)
self.centroids = self.init
# Optimize
for n in range(100):
# Partition dataset
partition = []
for d in dataset:
partition.append(np.argmin([self.__distance(c, d) for c in self.centroids]))
self.partition = np.array(partition, np.float)
# Update centroids
centroids = []
for i in range(self.clusters):
vs = [d for j,d in zip(self.partition, dataset) if j == i]
if vs:
centroids.append(np.mean(vs, axis=0))
else:
centroids.append(self.centroids[i])
self.centroids = np.array(centroids, np.float)
def __distance(self, v1, v2):
return np.sum(np.power(v1 - v2, 2))
## Instruction:
Use numpy.random.choice in place of numpy.random.randint.
Allows sampling without replacement; hence, removing the possibility
of choosing equal initial centroids.
## Code After:
import numpy as np
class KMeans:
def __init__(self, clusters, init=None):
self.clusters = clusters
self.init = init
self.centroids = None
self.partition = None
def cluster(self, dataset):
# Randomly choose initial set of centroids if undefined
if not self.init:
rows = np.arange(dataset.shape[0])
self.init = np.array([dataset[i] for i in np.random.choice(rows, size=self.clusters, replace=False)], dtype=np.float)
self.centroids = self.init
# Optimize
for n in range(100):
# Partition dataset
partition = []
for d in dataset:
partition.append(np.argmin([self.__distance(c, d) for c in self.centroids]))
self.partition = np.array(partition, np.float)
# Update centroids
centroids = []
for i in range(self.clusters):
vs = [d for j,d in zip(self.partition, dataset) if j == i]
if vs:
centroids.append(np.mean(vs, axis=0))
else:
centroids.append(self.centroids[i])
self.centroids = np.array(centroids, np.float)
def __distance(self, v1, v2):
return np.sum(np.power(v1 - v2, 2))
| import numpy as np
- class KMeans(object):
? --------
+ class KMeans:
def __init__(self, clusters, init=None):
self.clusters = clusters
self.init = init
- self.centroids = np.array([])
? ^^^^^^^^^^^
+ self.centroids = None
? ++ ^
- self.partition = np.array([])
? ^^^^^^^^^^^
+ self.partition = None
? ++ ^
def cluster(self, dataset):
# Randomly choose initial set of centroids if undefined
if not self.init:
- rows = dataset.shape[0]
+ rows = np.arange(dataset.shape[0])
? ++++++++++ +
- self.init = np.array([dataset[i] for i in np.random.randint(0, rows-1, size=self.clusters)], dtype=np.float)
? ^^^^ ^^ --- --
+ self.init = np.array([dataset[i] for i in np.random.choice(rows, size=self.clusters, replace=False)], dtype=np.float)
? ^^^ ^^ +++++++++++++++
self.centroids = self.init
# Optimize
for n in range(100):
# Partition dataset
partition = []
for d in dataset:
partition.append(np.argmin([self.__distance(c, d) for c in self.centroids]))
self.partition = np.array(partition, np.float)
# Update centroids
centroids = []
for i in range(self.clusters):
vs = [d for j,d in zip(self.partition, dataset) if j == i]
if vs:
centroids.append(np.mean(vs, axis=0))
else:
centroids.append(self.centroids[i])
self.centroids = np.array(centroids, np.float)
def __distance(self, v1, v2):
return np.sum(np.power(v1 - v2, 2)) | 10 | 0.27027 | 5 | 5 |
943d8f653f2379521a64b58780688e104ee961b1 | index.html | index.html | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>League Summoner Stats</title>
<link rel="stylesheet" href="app.css">
</head>
<body>
<div id="app">
<div class="summoner-selector">
<ul>
<li v-for="summoner in summoners" @click="selectedSummoner = summoner" v-bind:class="{'highlight' : summoner.name == selectedSummoner.name}"><a href="#">{{ summoner.name }}</a></li>
<li class="add-summoner">
<form>
<input type="text" v-model="newSummonerInput" id="newSummonerInput">
<input type="submit" @click="addNewSummoner" value="+" id="newSummonerButton"></input>
</form>
</li>
</ul>
</div>
<div class="summoner-container">
<h2> {{ selectedSummoner.name }} </h2>
</div>
</div>
<script src="vue.js"></script> <!-- Use vue.min.js for production -->
<script src="script.js"></script>
</body>
</html>
| <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>League Summoner Stats</title>
<link rel="stylesheet" href="app.css">
</head>
<body>
<div id="app">
<div class="summoner-selector">
<ul>
<li v-for="summoner in summoners" @click="selectedSummoner = summoner" v-bind:class="{'highlight' : summoner.name == selectedSummoner.name}"><a href="#">{{ summoner.name }}</a></li>
<li class="add-summoner">
<form>
<input type="text" v-model="newSummonerInput" id="newSummonerInput" placeholder="Add New Summoner">
<input type="submit" @click="addNewSummoner" value="+" id="newSummonerButton"></input>
</form>
</li>
</ul>
</div>
<div class="summoner-container">
<h2> {{ selectedSummoner.name }} </h2>
</div>
</div>
<script src="vue.js"></script> <!-- Use vue.min.js for production -->
<script src="script.js"></script>
</body>
</html>
| Add placeholder text for input to make it more clear | Add placeholder text for input to make it more clear
| HTML | cc0-1.0 | Quartz-Dev/LeagueSummonerStats,Quartz-Dev/LeagueSummonerStats | html | ## Code Before:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>League Summoner Stats</title>
<link rel="stylesheet" href="app.css">
</head>
<body>
<div id="app">
<div class="summoner-selector">
<ul>
<li v-for="summoner in summoners" @click="selectedSummoner = summoner" v-bind:class="{'highlight' : summoner.name == selectedSummoner.name}"><a href="#">{{ summoner.name }}</a></li>
<li class="add-summoner">
<form>
<input type="text" v-model="newSummonerInput" id="newSummonerInput">
<input type="submit" @click="addNewSummoner" value="+" id="newSummonerButton"></input>
</form>
</li>
</ul>
</div>
<div class="summoner-container">
<h2> {{ selectedSummoner.name }} </h2>
</div>
</div>
<script src="vue.js"></script> <!-- Use vue.min.js for production -->
<script src="script.js"></script>
</body>
</html>
## Instruction:
Add placeholder text for input to make it more clear
## Code After:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>League Summoner Stats</title>
<link rel="stylesheet" href="app.css">
</head>
<body>
<div id="app">
<div class="summoner-selector">
<ul>
<li v-for="summoner in summoners" @click="selectedSummoner = summoner" v-bind:class="{'highlight' : summoner.name == selectedSummoner.name}"><a href="#">{{ summoner.name }}</a></li>
<li class="add-summoner">
<form>
<input type="text" v-model="newSummonerInput" id="newSummonerInput" placeholder="Add New Summoner">
<input type="submit" @click="addNewSummoner" value="+" id="newSummonerButton"></input>
</form>
</li>
</ul>
</div>
<div class="summoner-container">
<h2> {{ selectedSummoner.name }} </h2>
</div>
</div>
<script src="vue.js"></script> <!-- Use vue.min.js for production -->
<script src="script.js"></script>
</body>
</html>
| <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>League Summoner Stats</title>
<link rel="stylesheet" href="app.css">
</head>
<body>
<div id="app">
<div class="summoner-selector">
<ul>
<li v-for="summoner in summoners" @click="selectedSummoner = summoner" v-bind:class="{'highlight' : summoner.name == selectedSummoner.name}"><a href="#">{{ summoner.name }}</a></li>
<li class="add-summoner">
<form>
- <input type="text" v-model="newSummonerInput" id="newSummonerInput">
+ <input type="text" v-model="newSummonerInput" id="newSummonerInput" placeholder="Add New Summoner">
? +++++++++++++++++++++++++++++++
<input type="submit" @click="addNewSummoner" value="+" id="newSummonerButton"></input>
</form>
</li>
</ul>
</div>
<div class="summoner-container">
<h2> {{ selectedSummoner.name }} </h2>
</div>
</div>
<script src="vue.js"></script> <!-- Use vue.min.js for production -->
<script src="script.js"></script>
</body>
</html> | 2 | 0.066667 | 1 | 1 |
a6c287ab9731c5e7bcd866a983282b2a9a1d685a | lib/smart_answer_flows/check-uk-visa/outcomes/outcome_joining_family_y.govspeak.erb | lib/smart_answer_flows/check-uk-visa/outcomes/outcome_joining_family_y.govspeak.erb | <% content_for :title do %>
You’ll need a visa to join your family or partner in the UK
<% end %>
<% content_for :body do %>
^If you’re visiting family or partner for 6 months or less, you’ll need a [family visit visa](/family-visit-visa).^
The visa you apply for depends on your family member’s situation.
<%= render partial: 'stateless_or_refugee.govspeak.erb', locals: {calculator: calculator} %>
<%= render partial: 'estonia_or_latvia.govspeak.erb', locals: {calculator: calculator} %>
##They’re settled in the UK
Apply for a [‘family of a settled person’ visa](/join-family-in-uk) if your family member or partner is either a British citizen or from outside the European Economic Area (EEA) and settled in the UK.
##They’re working or studying in the UK
You may be able to apply as a ‘dependant’ of [your family member's visa category](/visas-immigration) if they're from outside the EEA and they're working or studying in the UK.
##They’re from the EEA
Apply for a [family permit](/family-permit) to join your family or partner for a short or long stay if they’re living in the UK.
<% end %>
| <% content_for :title do %>
You’ll need a visa to join your family or partner in the UK
<% end %>
<% content_for :body do %>
^If you’re visiting family or partner for 6 months or less, you’ll need a [Standard Visitor visa](/standard-visitor-visa).^
The visa you apply for depends on your family member’s situation.
<%= render partial: 'stateless_or_refugee.govspeak.erb', locals: {calculator: calculator} %>
<%= render partial: 'estonia_or_latvia.govspeak.erb', locals: {calculator: calculator} %>
##They’re settled in the UK
Apply for a [‘family of a settled person’ visa](/join-family-in-uk) if your family member or partner is either a British citizen or from outside the European Economic Area (EEA) and settled in the UK.
##They’re working or studying in the UK
You may be able to apply as a ‘dependant’ of [your family member's visa category](/visas-immigration) if they're from outside the EEA and they're working or studying in the UK.
##They’re from the EEA
Apply for a [family permit](/family-permit) to join your family or partner for a short or long stay if they’re living in the UK.
<% end %>
| Fix link for family visit visas | Fix link for family visit visas
Family visit visas have been replaced by standard visitor visas, so
update the link.
| HTML+ERB | mit | alphagov/smart-answers,alphagov/smart-answers,alphagov/smart-answers,alphagov/smart-answers | html+erb | ## Code Before:
<% content_for :title do %>
You’ll need a visa to join your family or partner in the UK
<% end %>
<% content_for :body do %>
^If you’re visiting family or partner for 6 months or less, you’ll need a [family visit visa](/family-visit-visa).^
The visa you apply for depends on your family member’s situation.
<%= render partial: 'stateless_or_refugee.govspeak.erb', locals: {calculator: calculator} %>
<%= render partial: 'estonia_or_latvia.govspeak.erb', locals: {calculator: calculator} %>
##They’re settled in the UK
Apply for a [‘family of a settled person’ visa](/join-family-in-uk) if your family member or partner is either a British citizen or from outside the European Economic Area (EEA) and settled in the UK.
##They’re working or studying in the UK
You may be able to apply as a ‘dependant’ of [your family member's visa category](/visas-immigration) if they're from outside the EEA and they're working or studying in the UK.
##They’re from the EEA
Apply for a [family permit](/family-permit) to join your family or partner for a short or long stay if they’re living in the UK.
<% end %>
## Instruction:
Fix link for family visit visas
Family visit visas have been replaced by standard visitor visas, so
update the link.
## Code After:
<% content_for :title do %>
You’ll need a visa to join your family or partner in the UK
<% end %>
<% content_for :body do %>
^If you’re visiting family or partner for 6 months or less, you’ll need a [Standard Visitor visa](/standard-visitor-visa).^
The visa you apply for depends on your family member’s situation.
<%= render partial: 'stateless_or_refugee.govspeak.erb', locals: {calculator: calculator} %>
<%= render partial: 'estonia_or_latvia.govspeak.erb', locals: {calculator: calculator} %>
##They’re settled in the UK
Apply for a [‘family of a settled person’ visa](/join-family-in-uk) if your family member or partner is either a British citizen or from outside the European Economic Area (EEA) and settled in the UK.
##They’re working or studying in the UK
You may be able to apply as a ‘dependant’ of [your family member's visa category](/visas-immigration) if they're from outside the EEA and they're working or studying in the UK.
##They’re from the EEA
Apply for a [family permit](/family-permit) to join your family or partner for a short or long stay if they’re living in the UK.
<% end %>
| <% content_for :title do %>
You’ll need a visa to join your family or partner in the UK
<% end %>
<% content_for :body do %>
- ^If you’re visiting family or partner for 6 months or less, you’ll need a [family visit visa](/family-visit-visa).^
? ^ ^^^^ ^ ^ ^^^^
+ ^If you’re visiting family or partner for 6 months or less, you’ll need a [Standard Visitor visa](/standard-visitor-visa).^
? ^^ ^^^^^ ^ ++ ^^ ^^^^^ ++
The visa you apply for depends on your family member’s situation.
<%= render partial: 'stateless_or_refugee.govspeak.erb', locals: {calculator: calculator} %>
<%= render partial: 'estonia_or_latvia.govspeak.erb', locals: {calculator: calculator} %>
##They’re settled in the UK
Apply for a [‘family of a settled person’ visa](/join-family-in-uk) if your family member or partner is either a British citizen or from outside the European Economic Area (EEA) and settled in the UK.
##They’re working or studying in the UK
You may be able to apply as a ‘dependant’ of [your family member's visa category](/visas-immigration) if they're from outside the EEA and they're working or studying in the UK.
##They’re from the EEA
Apply for a [family permit](/family-permit) to join your family or partner for a short or long stay if they’re living in the UK.
<% end %> | 2 | 0.08 | 1 | 1 |
8ac1cde741a022fd6d9e2d6aa2b5a833bc0a23fb | app/assets/javascripts/templates/apps.hbs | app/assets/javascripts/templates/apps.hbs | <div class="apps-page">
<div class="row">
<div class="apps-page-card">
<div class="app-card app-inner">
<h2 class="apps-page-title">Hummingbird Community Apps</h2>
<p class="apps-page-desc">
On this site, you can find a list of apps and tools for Hummingbird,
developed and maintained by our community. Please note, that these
are all third party applications, for any requests or suggestions,
please contact the developer of the respective application.
</p>
</div>
</div>
{{#each}}
<div class="apps-page-card">
<div class="app-card">
<img class="app-image" {{bind-attr src=cover}} />
<div class="app-inner">
<h3 class="app-title">{{name}} <span class="app-type">{{type}}</span></h3>
<p class="app-desc">{{desc}}</p>
<p class="app-link">
{{#each links}}
<a {{bind-attr href=link}}>{{name}}</a> <span class="app-bull">•</span>
{{/each}}
</p>
</div>
</div>
</div>
{{/each}}
</div>
</div> | <div class="apps-page">
<div class="row">
<div class="apps-page-card">
<div class="app-card app-inner">
<h2 class="apps-page-title">Hummingbird Community Apps</h2>
<p class="apps-page-desc">
On this site, you can find a list of apps and tools for Hummingbird,
developed and maintained by our community. Please note, that these
are all third party applications, for any requests or suggestions,
please contact the developer of the respective application.
</p>
</div>
</div>
{{#each}}
<div class="apps-page-card">
<div class="app-card">
{{!--
<img class="app-image" {{bind-attr src=cover}} />
--}}
<div class="app-inner">
<h3 class="app-title">{{name}} <span class="app-type">{{type}}</span></h3>
<p class="app-desc">{{desc}}</p>
<p class="app-link">
{{#each links}}
<a {{bind-attr href=link}}>{{name}}</a> <span class="app-bull">•</span>
{{/each}}
</p>
</div>
</div>
</div>
{{/each}}
</div>
</div> | Hide cover image for now | Hide cover image for now
| Handlebars | apache-2.0 | vevix/hummingbird,xhocquet/hummingbird,qgustavor/hummingbird,saintsantos/hummingbird,erengy/hummingbird,cybrox/hummingbird,synthtech/hummingbird,saintsantos/hummingbird,astraldragon/hummingbird,xhocquet/hummingbird,NuckChorris/hummingbird,MiLk/hummingbird,xhocquet/hummingbird,saintsantos/hummingbird,sidaga/hummingbird,vevix/hummingbird,erengy/hummingbird,qgustavor/hummingbird,Snitzle/hummingbird,xhocquet/hummingbird,NuckChorris/hummingbird,saintsantos/hummingbird,Snitzle/hummingbird,qgustavor/hummingbird,jcoady9/hummingbird,hummingbird-me/hummingbird,xhocquet/hummingbird,paladique/hummingbird,hummingbird-me/hummingbird,sidaga/hummingbird,paladique/hummingbird,qgustavor/hummingbird,wlads/hummingbird,jcoady9/hummingbird,erengy/hummingbird,paladique/hummingbird,MiLk/hummingbird,Snitzle/hummingbird,vevix/hummingbird,wlads/hummingbird,NuckChorris/hummingbird,erengy/hummingbird,synthtech/hummingbird,wlads/hummingbird,NuckChorris/hummingbird,astraldragon/hummingbird,jcoady9/hummingbird,jcoady9/hummingbird,sidaga/hummingbird,vevix/hummingbird,MiLk/hummingbird,xhocquet/hummingbird,xhocquet/hummingbird,MiLk/hummingbird,astraldragon/hummingbird,astraldragon/hummingbird,sidaga/hummingbird,wlads/hummingbird,Snitzle/hummingbird,paladique/hummingbird | handlebars | ## Code Before:
<div class="apps-page">
<div class="row">
<div class="apps-page-card">
<div class="app-card app-inner">
<h2 class="apps-page-title">Hummingbird Community Apps</h2>
<p class="apps-page-desc">
On this site, you can find a list of apps and tools for Hummingbird,
developed and maintained by our community. Please note, that these
are all third party applications, for any requests or suggestions,
please contact the developer of the respective application.
</p>
</div>
</div>
{{#each}}
<div class="apps-page-card">
<div class="app-card">
<img class="app-image" {{bind-attr src=cover}} />
<div class="app-inner">
<h3 class="app-title">{{name}} <span class="app-type">{{type}}</span></h3>
<p class="app-desc">{{desc}}</p>
<p class="app-link">
{{#each links}}
<a {{bind-attr href=link}}>{{name}}</a> <span class="app-bull">•</span>
{{/each}}
</p>
</div>
</div>
</div>
{{/each}}
</div>
</div>
## Instruction:
Hide cover image for now
## Code After:
<div class="apps-page">
<div class="row">
<div class="apps-page-card">
<div class="app-card app-inner">
<h2 class="apps-page-title">Hummingbird Community Apps</h2>
<p class="apps-page-desc">
On this site, you can find a list of apps and tools for Hummingbird,
developed and maintained by our community. Please note, that these
are all third party applications, for any requests or suggestions,
please contact the developer of the respective application.
</p>
</div>
</div>
{{#each}}
<div class="apps-page-card">
<div class="app-card">
{{!--
<img class="app-image" {{bind-attr src=cover}} />
--}}
<div class="app-inner">
<h3 class="app-title">{{name}} <span class="app-type">{{type}}</span></h3>
<p class="app-desc">{{desc}}</p>
<p class="app-link">
{{#each links}}
<a {{bind-attr href=link}}>{{name}}</a> <span class="app-bull">•</span>
{{/each}}
</p>
</div>
</div>
</div>
{{/each}}
</div>
</div> | <div class="apps-page">
<div class="row">
<div class="apps-page-card">
<div class="app-card app-inner">
<h2 class="apps-page-title">Hummingbird Community Apps</h2>
<p class="apps-page-desc">
On this site, you can find a list of apps and tools for Hummingbird,
developed and maintained by our community. Please note, that these
are all third party applications, for any requests or suggestions,
please contact the developer of the respective application.
</p>
</div>
</div>
{{#each}}
<div class="apps-page-card">
<div class="app-card">
+ {{!--
- <img class="app-image" {{bind-attr src=cover}} />
+ <img class="app-image" {{bind-attr src=cover}} />
? ++
+ --}}
<div class="app-inner">
<h3 class="app-title">{{name}} <span class="app-type">{{type}}</span></h3>
<p class="app-desc">{{desc}}</p>
<p class="app-link">
{{#each links}}
<a {{bind-attr href=link}}>{{name}}</a> <span class="app-bull">•</span>
{{/each}}
</p>
</div>
</div>
</div>
{{/each}}
</div>
</div> | 4 | 0.125 | 3 | 1 |
3a0a6408de8a51d6f5b2b239d5e4b58c36381c28 | src/_plugins/css_fingerprint.rb | src/_plugins/css_fingerprint.rb |
checksums = Dir.glob("src/_scss/*.scss").map { |f|
Digest::MD5.file(open f).hexdigest
}
fingerprint = Digest::MD5.new
fingerprint.update checksums.join("")
FINGERPRINT = fingerprint.hexdigest
module Jekyll
class CssFingerPrintTag < Liquid::Tag
def render(context)
FINGERPRINT
end
end
end
Liquid::Template.register_tag("css_fingerprint", Jekyll::CssFingerPrintTag)
| source_files = Dir.glob("src/_scss/*.scss").sort
checksums = source_files.map { |f|
Digest::MD5.file(open f).hexdigest
}
fingerprint = Digest::MD5.new
fingerprint.update checksums.join("")
FINGERPRINT = fingerprint.hexdigest
module Jekyll
class CssFingerPrintTag < Liquid::Tag
def render(context)
FINGERPRINT
end
end
end
Liquid::Template.register_tag("css_fingerprint", Jekyll::CssFingerPrintTag)
| Sort the source files for the CSS fingerprint | Sort the source files for the CSS fingerprint
For #493
| Ruby | mit | alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net | ruby | ## Code Before:
checksums = Dir.glob("src/_scss/*.scss").map { |f|
Digest::MD5.file(open f).hexdigest
}
fingerprint = Digest::MD5.new
fingerprint.update checksums.join("")
FINGERPRINT = fingerprint.hexdigest
module Jekyll
class CssFingerPrintTag < Liquid::Tag
def render(context)
FINGERPRINT
end
end
end
Liquid::Template.register_tag("css_fingerprint", Jekyll::CssFingerPrintTag)
## Instruction:
Sort the source files for the CSS fingerprint
For #493
## Code After:
source_files = Dir.glob("src/_scss/*.scss").sort
checksums = source_files.map { |f|
Digest::MD5.file(open f).hexdigest
}
fingerprint = Digest::MD5.new
fingerprint.update checksums.join("")
FINGERPRINT = fingerprint.hexdigest
module Jekyll
class CssFingerPrintTag < Liquid::Tag
def render(context)
FINGERPRINT
end
end
end
Liquid::Template.register_tag("css_fingerprint", Jekyll::CssFingerPrintTag)
| + source_files = Dir.glob("src/_scss/*.scss").sort
- checksums = Dir.glob("src/_scss/*.scss").map { |f|
+ checksums = source_files.map { |f|
Digest::MD5.file(open f).hexdigest
}
fingerprint = Digest::MD5.new
fingerprint.update checksums.join("")
FINGERPRINT = fingerprint.hexdigest
module Jekyll
class CssFingerPrintTag < Liquid::Tag
def render(context)
FINGERPRINT
end
end
end
Liquid::Template.register_tag("css_fingerprint", Jekyll::CssFingerPrintTag) | 3 | 0.157895 | 2 | 1 |
3efc09796a662d62f69b1241db67c748c07f17e7 | bin/mougrim-deployer.php | bin/mougrim-deployer.php | <?php
/**
* @author Mougrim <rinat@mougrim.ru>
*/
require_once __DIR__ . '/../vendor/autoload.php';
use Mougrim\Deployer\Kernel\Request;
use Mougrim\Deployer\Kernel\Application;
Logger::configure(require_once __DIR__ . '/../config/logger.php');
$request = new Request();
$request->setRawRequest($argv);
$application = new Application();
$application->setControllersNamespace('\Mougrim\Deployer\Command');
$application->setRequest($request);
$application->run();
| <?php
/**
* @author Mougrim <rinat@mougrim.ru>
*/
// require composer autoloader
$autoloadPath = dirname(__DIR__) . '/vendor/autoload.php';
if (file_exists($autoloadPath)) {
/** @noinspection PhpIncludeInspection */
require_once $autoloadPath;
} else {
/** @noinspection PhpIncludeInspection */
require_once dirname(dirname(dirname(__DIR__))) . '/autoload.php';
}
use Mougrim\Deployer\Kernel\Request;
use Mougrim\Deployer\Kernel\Application;
Logger::configure(require_once __DIR__ . '/../config/logger.php');
$request = new Request();
$request->setRawRequest($argv);
$application = new Application();
$application->setControllersNamespace('\Mougrim\Deployer\Command');
$application->setRequest($request);
$application->run();
| Fix autoload require fatal if installed via composer | Fix autoload require fatal if installed via composer
| PHP | mit | mougrim/php-mougrim-deployer | php | ## Code Before:
<?php
/**
* @author Mougrim <rinat@mougrim.ru>
*/
require_once __DIR__ . '/../vendor/autoload.php';
use Mougrim\Deployer\Kernel\Request;
use Mougrim\Deployer\Kernel\Application;
Logger::configure(require_once __DIR__ . '/../config/logger.php');
$request = new Request();
$request->setRawRequest($argv);
$application = new Application();
$application->setControllersNamespace('\Mougrim\Deployer\Command');
$application->setRequest($request);
$application->run();
## Instruction:
Fix autoload require fatal if installed via composer
## Code After:
<?php
/**
* @author Mougrim <rinat@mougrim.ru>
*/
// require composer autoloader
$autoloadPath = dirname(__DIR__) . '/vendor/autoload.php';
if (file_exists($autoloadPath)) {
/** @noinspection PhpIncludeInspection */
require_once $autoloadPath;
} else {
/** @noinspection PhpIncludeInspection */
require_once dirname(dirname(dirname(__DIR__))) . '/autoload.php';
}
use Mougrim\Deployer\Kernel\Request;
use Mougrim\Deployer\Kernel\Application;
Logger::configure(require_once __DIR__ . '/../config/logger.php');
$request = new Request();
$request->setRawRequest($argv);
$application = new Application();
$application->setControllersNamespace('\Mougrim\Deployer\Command');
$application->setRequest($request);
$application->run();
| <?php
/**
* @author Mougrim <rinat@mougrim.ru>
*/
- require_once __DIR__ . '/../vendor/autoload.php';
+ // require composer autoloader
+ $autoloadPath = dirname(__DIR__) . '/vendor/autoload.php';
+ if (file_exists($autoloadPath)) {
+ /** @noinspection PhpIncludeInspection */
+ require_once $autoloadPath;
+ } else {
+ /** @noinspection PhpIncludeInspection */
+ require_once dirname(dirname(dirname(__DIR__))) . '/autoload.php';
+ }
use Mougrim\Deployer\Kernel\Request;
use Mougrim\Deployer\Kernel\Application;
Logger::configure(require_once __DIR__ . '/../config/logger.php');
$request = new Request();
$request->setRawRequest($argv);
$application = new Application();
$application->setControllersNamespace('\Mougrim\Deployer\Command');
$application->setRequest($request);
$application->run(); | 10 | 0.588235 | 9 | 1 |
f90926c98bcd05cc68e51a2c3cbc13b12d38f23e | Code/Cleavir/HIR-transformations/Simple-value-numbering/simple-value-numbering.lisp | Code/Cleavir/HIR-transformations/Simple-value-numbering/simple-value-numbering.lisp | (cl:in-package #:cleavir-simple-value-numbering)
;;; We attribute a unique number to each value designator. That way,
;;; we can keep the value designators in a partition sorted by the
;;; unique number which makes operations on partitions faster.
;;;
;;; This variable should be bound to some small integer at the
;;; beginning of processing.
(defvar *unique-number*)
;;; We use instances of this class to designate values.
(defclass value-designator () ())
;;; This variable holds and EQ hash table mapping constants to value
;;; designators.
(defvar *constant-designators*)
(defun constant-designator (constant)
(let ((result (gethash constant *constant-designators*)))
(when (null result)
(setf result (make-instance 'value-designator))
(setf (gethash constant *constant-designators*) result))
result))
;; LocalWords: designator designators
| (cl:in-package #:cleavir-simple-value-numbering)
;;; We attribute a unique number to each value designator. That way,
;;; we can keep the value designators in a partition sorted by the
;;; unique number which makes operations on partitions faster.
;;;
;;; This variable should be bound to some small integer at the
;;; beginning of processing.
(defvar *unique-number*)
;;; We use instances of this class to designate values.
(defclass value-designator ()
((%unique-number :initform (incf *unique-number*) :reader unique-number)))
;;; This variable holds and EQ hash table mapping constants to value
;;; designators.
(defvar *constant-designators*)
(defun constant-designator (constant)
(let ((result (gethash constant *constant-designators*)))
(when (null result)
(setf result (make-instance 'value-designator))
(setf (gethash constant *constant-designators*) result))
result))
;; LocalWords: designator designators
| Add a slot to the VALUE-DESIGNATOR class for unique number. | Add a slot to the VALUE-DESIGNATOR class for unique number.
| Common Lisp | bsd-2-clause | vtomole/SICL,clasp-developers/SICL,vtomole/SICL,clasp-developers/SICL,clasp-developers/SICL,clasp-developers/SICL,vtomole/SICL,vtomole/SICL | common-lisp | ## Code Before:
(cl:in-package #:cleavir-simple-value-numbering)
;;; We attribute a unique number to each value designator. That way,
;;; we can keep the value designators in a partition sorted by the
;;; unique number which makes operations on partitions faster.
;;;
;;; This variable should be bound to some small integer at the
;;; beginning of processing.
(defvar *unique-number*)
;;; We use instances of this class to designate values.
(defclass value-designator () ())
;;; This variable holds and EQ hash table mapping constants to value
;;; designators.
(defvar *constant-designators*)
(defun constant-designator (constant)
(let ((result (gethash constant *constant-designators*)))
(when (null result)
(setf result (make-instance 'value-designator))
(setf (gethash constant *constant-designators*) result))
result))
;; LocalWords: designator designators
## Instruction:
Add a slot to the VALUE-DESIGNATOR class for unique number.
## Code After:
(cl:in-package #:cleavir-simple-value-numbering)
;;; We attribute a unique number to each value designator. That way,
;;; we can keep the value designators in a partition sorted by the
;;; unique number which makes operations on partitions faster.
;;;
;;; This variable should be bound to some small integer at the
;;; beginning of processing.
(defvar *unique-number*)
;;; We use instances of this class to designate values.
(defclass value-designator ()
((%unique-number :initform (incf *unique-number*) :reader unique-number)))
;;; This variable holds and EQ hash table mapping constants to value
;;; designators.
(defvar *constant-designators*)
(defun constant-designator (constant)
(let ((result (gethash constant *constant-designators*)))
(when (null result)
(setf result (make-instance 'value-designator))
(setf (gethash constant *constant-designators*) result))
result))
;; LocalWords: designator designators
| (cl:in-package #:cleavir-simple-value-numbering)
;;; We attribute a unique number to each value designator. That way,
;;; we can keep the value designators in a partition sorted by the
;;; unique number which makes operations on partitions faster.
;;;
;;; This variable should be bound to some small integer at the
;;; beginning of processing.
(defvar *unique-number*)
;;; We use instances of this class to designate values.
- (defclass value-designator () ())
? ----
+ (defclass value-designator ()
+ ((%unique-number :initform (incf *unique-number*) :reader unique-number)))
;;; This variable holds and EQ hash table mapping constants to value
;;; designators.
(defvar *constant-designators*)
(defun constant-designator (constant)
(let ((result (gethash constant *constant-designators*)))
(when (null result)
(setf result (make-instance 'value-designator))
(setf (gethash constant *constant-designators*) result))
result))
;; LocalWords: designator designators | 3 | 0.12 | 2 | 1 |
ba1cb87d91bbddbe6c5e6793d8f90e4be7a1f168 | package.json | package.json | {
"name": "kaba-babel-preset",
"description": "Babel preset for usage in kaba.",
"license": "BSD-3-Clause",
"homepage": "https://github.com/Becklyn/kaba-babel-preset",
"repository": {
"type": "git",
"url": "https://github.com/Becklyn/kaba-babel-preset.git"
},
"version": "4.1.1",
"main": "index.js",
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.4.4",
"@babel/plugin-proposal-json-strings": "^7.2.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
"@babel/plugin-proposal-numeric-separator": "^7.2.0",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/preset-env": "^7.4.5",
"@babel/preset-react": "^7.0.0",
"@becklyn/browserslist-config": "^2.1.0"
}
}
| {
"name": "kaba-babel-preset",
"description": "Babel preset for usage in kaba.",
"license": "BSD-3-Clause",
"homepage": "https://github.com/Becklyn/kaba-babel-preset",
"repository": {
"type": "git",
"url": "https://github.com/Becklyn/kaba-babel-preset.git"
},
"version": "4.1.1",
"main": "index.js",
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.4.4",
"@babel/plugin-proposal-json-strings": "^7.2.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
"@babel/plugin-proposal-numeric-separator": "^7.2.0",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/preset-env": "^7.4.5",
"@babel/preset-react": "^7.0.0",
"@becklyn/browserslist-config": "^2.1.0"
},
"peerDependencies": {
"core-js": "^3.0.0"
}
}
| Add peer dependency for core-js 3+ | Add peer dependency for core-js 3+
| JSON | bsd-3-clause | Becklyn/kaba-babel-preset | json | ## Code Before:
{
"name": "kaba-babel-preset",
"description": "Babel preset for usage in kaba.",
"license": "BSD-3-Clause",
"homepage": "https://github.com/Becklyn/kaba-babel-preset",
"repository": {
"type": "git",
"url": "https://github.com/Becklyn/kaba-babel-preset.git"
},
"version": "4.1.1",
"main": "index.js",
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.4.4",
"@babel/plugin-proposal-json-strings": "^7.2.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
"@babel/plugin-proposal-numeric-separator": "^7.2.0",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/preset-env": "^7.4.5",
"@babel/preset-react": "^7.0.0",
"@becklyn/browserslist-config": "^2.1.0"
}
}
## Instruction:
Add peer dependency for core-js 3+
## Code After:
{
"name": "kaba-babel-preset",
"description": "Babel preset for usage in kaba.",
"license": "BSD-3-Clause",
"homepage": "https://github.com/Becklyn/kaba-babel-preset",
"repository": {
"type": "git",
"url": "https://github.com/Becklyn/kaba-babel-preset.git"
},
"version": "4.1.1",
"main": "index.js",
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.4.4",
"@babel/plugin-proposal-json-strings": "^7.2.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
"@babel/plugin-proposal-numeric-separator": "^7.2.0",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/preset-env": "^7.4.5",
"@babel/preset-react": "^7.0.0",
"@becklyn/browserslist-config": "^2.1.0"
},
"peerDependencies": {
"core-js": "^3.0.0"
}
}
| {
"name": "kaba-babel-preset",
"description": "Babel preset for usage in kaba.",
"license": "BSD-3-Clause",
"homepage": "https://github.com/Becklyn/kaba-babel-preset",
"repository": {
"type": "git",
"url": "https://github.com/Becklyn/kaba-babel-preset.git"
},
"version": "4.1.1",
"main": "index.js",
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.4.4",
"@babel/plugin-proposal-json-strings": "^7.2.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
"@babel/plugin-proposal-numeric-separator": "^7.2.0",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/preset-env": "^7.4.5",
"@babel/preset-react": "^7.0.0",
"@becklyn/browserslist-config": "^2.1.0"
+ },
+ "peerDependencies": {
+ "core-js": "^3.0.0"
}
} | 3 | 0.136364 | 3 | 0 |
01bc0e22a88ffcb10aa2dccf2e486f6bd07e35b4 | src/bindings/swig/ruby/tests/CMakeLists.txt | src/bindings/swig/ruby/tests/CMakeLists.txt | file (GLOB TESTS testruby_*.rb)
foreach (file ${TESTS})
get_filename_component (name ${file} NAME_WE)
add_test (
NAME ${name}
COMMAND ${RUBY_EXECUTABLE} ${file} --verbose
)
# set RUBYLIB to find newly built binding lib
set_property (
TEST ${name}
PROPERTY ENVIRONMENT
"RUBYLIB=${CMAKE_CURRENT_BINARY_DIR}/..:${CMAKE_CURRENT_SOURCE_DIR}/.."
"LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib"
)
set_property (
TEST ${name}
PROPERTY LABELS bindings memleak
)
endforeach (file ${TESTS})
# special label for kdb
set_property (
TEST "testruby_kdb"
APPEND PROPERTY LABELS kdbtests
)
| if (NOT (APPLE AND ENABLE_ASAN))
file (GLOB TESTS testruby_*.rb)
endif (NOT (APPLE AND ENABLE_ASAN))
foreach (file ${TESTS})
get_filename_component (name ${file} NAME_WE)
add_test (
NAME ${name}
COMMAND ${RUBY_EXECUTABLE} ${file} --verbose
)
# set RUBYLIB to find newly built binding lib
set_property (
TEST ${name}
PROPERTY ENVIRONMENT
"RUBYLIB=${CMAKE_CURRENT_BINARY_DIR}/..:${CMAKE_CURRENT_SOURCE_DIR}/.."
"LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib"
)
set_property (
TEST ${name}
PROPERTY LABELS bindings memleak
)
endforeach (file ${TESTS})
if (NOT (APPLE AND ENABLE_ASAN))
# special label for kdb
set_property (
TEST "testruby_kdb"
APPEND PROPERTY LABELS kdbtests
)
endif (NOT (APPLE AND ENABLE_ASAN))
| Disable tests on macOS if ASAN is enabled | Ruby: Disable tests on macOS if ASAN is enabled
| Text | bsd-3-clause | petermax2/libelektra,ElektraInitiative/libelektra,e1528532/libelektra,mpranj/libelektra,mpranj/libelektra,BernhardDenner/libelektra,mpranj/libelektra,ElektraInitiative/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,ElektraInitiative/libelektra,petermax2/libelektra,BernhardDenner/libelektra,petermax2/libelektra,ElektraInitiative/libelektra,BernhardDenner/libelektra,e1528532/libelektra,BernhardDenner/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,e1528532/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,mpranj/libelektra,mpranj/libelektra,ElektraInitiative/libelektra,petermax2/libelektra,petermax2/libelektra,BernhardDenner/libelektra,BernhardDenner/libelektra,mpranj/libelektra,e1528532/libelektra,petermax2/libelektra,e1528532/libelektra,BernhardDenner/libelektra,mpranj/libelektra,e1528532/libelektra,e1528532/libelektra,petermax2/libelektra,ElektraInitiative/libelektra,petermax2/libelektra,petermax2/libelektra,mpranj/libelektra,e1528532/libelektra,mpranj/libelektra,ElektraInitiative/libelektra,ElektraInitiative/libelektra,mpranj/libelektra | text | ## Code Before:
file (GLOB TESTS testruby_*.rb)
foreach (file ${TESTS})
get_filename_component (name ${file} NAME_WE)
add_test (
NAME ${name}
COMMAND ${RUBY_EXECUTABLE} ${file} --verbose
)
# set RUBYLIB to find newly built binding lib
set_property (
TEST ${name}
PROPERTY ENVIRONMENT
"RUBYLIB=${CMAKE_CURRENT_BINARY_DIR}/..:${CMAKE_CURRENT_SOURCE_DIR}/.."
"LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib"
)
set_property (
TEST ${name}
PROPERTY LABELS bindings memleak
)
endforeach (file ${TESTS})
# special label for kdb
set_property (
TEST "testruby_kdb"
APPEND PROPERTY LABELS kdbtests
)
## Instruction:
Ruby: Disable tests on macOS if ASAN is enabled
## Code After:
if (NOT (APPLE AND ENABLE_ASAN))
file (GLOB TESTS testruby_*.rb)
endif (NOT (APPLE AND ENABLE_ASAN))
foreach (file ${TESTS})
get_filename_component (name ${file} NAME_WE)
add_test (
NAME ${name}
COMMAND ${RUBY_EXECUTABLE} ${file} --verbose
)
# set RUBYLIB to find newly built binding lib
set_property (
TEST ${name}
PROPERTY ENVIRONMENT
"RUBYLIB=${CMAKE_CURRENT_BINARY_DIR}/..:${CMAKE_CURRENT_SOURCE_DIR}/.."
"LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib"
)
set_property (
TEST ${name}
PROPERTY LABELS bindings memleak
)
endforeach (file ${TESTS})
if (NOT (APPLE AND ENABLE_ASAN))
# special label for kdb
set_property (
TEST "testruby_kdb"
APPEND PROPERTY LABELS kdbtests
)
endif (NOT (APPLE AND ENABLE_ASAN))
| + if (NOT (APPLE AND ENABLE_ASAN))
- file (GLOB TESTS testruby_*.rb)
+ file (GLOB TESTS testruby_*.rb)
? +
+ endif (NOT (APPLE AND ENABLE_ASAN))
+
foreach (file ${TESTS})
get_filename_component (name ${file} NAME_WE)
add_test (
NAME ${name}
COMMAND ${RUBY_EXECUTABLE} ${file} --verbose
)
# set RUBYLIB to find newly built binding lib
set_property (
TEST ${name}
PROPERTY ENVIRONMENT
"RUBYLIB=${CMAKE_CURRENT_BINARY_DIR}/..:${CMAKE_CURRENT_SOURCE_DIR}/.."
"LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib"
)
set_property (
TEST ${name}
PROPERTY LABELS bindings memleak
)
endforeach (file ${TESTS})
+ if (NOT (APPLE AND ENABLE_ASAN))
- # special label for kdb
+ # special label for kdb
? +
- set_property (
+ set_property (
? +
- TEST "testruby_kdb"
+ TEST "testruby_kdb"
? +
- APPEND PROPERTY LABELS kdbtests
+ APPEND PROPERTY LABELS kdbtests
? +
- )
+ )
+ endif (NOT (APPLE AND ENABLE_ASAN)) | 17 | 0.607143 | 11 | 6 |
93691a5572245cde0526b175960d5cfbe331395a | src/java/org/apache/commons/codec/BinaryDecoder.java | src/java/org/apache/commons/codec/BinaryDecoder.java | /*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.codec;
/**
* Defines common decoding methods for byte array decoders.
*
* @author Tim O'Brien
* @author Gary Gregory
* @version $Id: BinaryDecoder.java,v 1.9 2004/02/23 07:32:49 ggregory Exp $
*/
public interface BinaryDecoder extends Decoder {
/**
* Decodes a byte array and returns the results as a byte array.
*
* @param pArray A byte array which has been encoded with the
* appropriate encoder
*
* @return a byte array that contains decoded content
*
* @throws DecoderException A decoder exception is thrown
* if a Decoder encounters a failure condition during
* the decode process.
*/
byte[] decode(byte[] pArray) throws DecoderException;
}
| /*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.codec;
/**
* Defines common decoding methods for byte array decoders.
*
* @author Apache Software Foundation
* @version $Id: BinaryDecoder.java,v 1.10 2004/06/15 18:14:15 ggregory Exp $
*/
public interface BinaryDecoder extends Decoder {
/**
* Decodes a byte array and returns the results as a byte array.
*
* @param pArray A byte array which has been encoded with the
* appropriate encoder
*
* @return a byte array that contains decoded content
*
* @throws DecoderException A decoder exception is thrown
* if a Decoder encounters a failure condition during
* the decode process.
*/
byte[] decode(byte[] pArray) throws DecoderException;
}
| Replace custom author tags with @author Apache Software Foundation. | Replace custom author tags with @author Apache Software Foundation.
git-svn-id: 774b6be6af7f353471b728afb213ebe1be89b277@130378 13f79535-47bb-0310-9956-ffa450edef68
| Java | apache-2.0 | mohanaraosv/commons-codec,mohanaraosv/commons-codec,adrie4mac/commons-codec,adrie4mac/commons-codec,mohanaraosv/commons-codec,apache/commons-codec,adrie4mac/commons-codec,apache/commons-codec,apache/commons-codec | java | ## Code Before:
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.codec;
/**
* Defines common decoding methods for byte array decoders.
*
* @author Tim O'Brien
* @author Gary Gregory
* @version $Id: BinaryDecoder.java,v 1.9 2004/02/23 07:32:49 ggregory Exp $
*/
public interface BinaryDecoder extends Decoder {
/**
* Decodes a byte array and returns the results as a byte array.
*
* @param pArray A byte array which has been encoded with the
* appropriate encoder
*
* @return a byte array that contains decoded content
*
* @throws DecoderException A decoder exception is thrown
* if a Decoder encounters a failure condition during
* the decode process.
*/
byte[] decode(byte[] pArray) throws DecoderException;
}
## Instruction:
Replace custom author tags with @author Apache Software Foundation.
git-svn-id: 774b6be6af7f353471b728afb213ebe1be89b277@130378 13f79535-47bb-0310-9956-ffa450edef68
## Code After:
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.codec;
/**
* Defines common decoding methods for byte array decoders.
*
* @author Apache Software Foundation
* @version $Id: BinaryDecoder.java,v 1.10 2004/06/15 18:14:15 ggregory Exp $
*/
public interface BinaryDecoder extends Decoder {
/**
* Decodes a byte array and returns the results as a byte array.
*
* @param pArray A byte array which has been encoded with the
* appropriate encoder
*
* @return a byte array that contains decoded content
*
* @throws DecoderException A decoder exception is thrown
* if a Decoder encounters a failure condition during
* the decode process.
*/
byte[] decode(byte[] pArray) throws DecoderException;
}
| /*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.codec;
/**
* Defines common decoding methods for byte array decoders.
*
+ * @author Apache Software Foundation
- * @author Tim O'Brien
- * @author Gary Gregory
- * @version $Id: BinaryDecoder.java,v 1.9 2004/02/23 07:32:49 ggregory Exp $
? ^ ^ ^^ ^^ ^^ ^^
+ * @version $Id: BinaryDecoder.java,v 1.10 2004/06/15 18:14:15 ggregory Exp $
? ^^ ^ ^^ ^^ ^^ ^^
*/
public interface BinaryDecoder extends Decoder {
/**
* Decodes a byte array and returns the results as a byte array.
*
* @param pArray A byte array which has been encoded with the
* appropriate encoder
*
* @return a byte array that contains decoded content
*
* @throws DecoderException A decoder exception is thrown
* if a Decoder encounters a failure condition during
* the decode process.
*/
byte[] decode(byte[] pArray) throws DecoderException;
}
| 5 | 0.119048 | 2 | 3 |
7f22dadeb4065233bbed6acc2ea3812f6da1f0a1 | project/run_tests.sh | project/run_tests.sh |
sudo -u postgres psql -U postgres -d postgres -c "alter user asylum createdb;"
./manage.py test $*
| sudo pip install -r requirements/test.txt
sudo -u postgres service postgresql start
export PGPASSWORD=asylum; while true; do psql -q asylum -c 'SELECT 1;' 1>/dev/null 2>&1 ; if [ "$?" -ne "0" ]; then echo "Waiting for psql"; sleep 1; else break; fi; done
sudo -u postgres psql -U postgres -d postgres -c "alter user asylum createdb;"
py.test $*
| Use py.test as the testrunner, wait for postgres before starting, install the test deps first too | Use py.test as the testrunner, wait for postgres before starting, install the test deps first too
| Shell | mit | hacklab-fi/asylum,hacklab-fi/asylum,HelsinkiHacklab/asylum,jautero/asylum,HelsinkiHacklab/asylum,rambo/asylum,hacklab-fi/asylum,jautero/asylum,hacklab-fi/asylum,jautero/asylum,HelsinkiHacklab/asylum,rambo/asylum,rambo/asylum,rambo/asylum,HelsinkiHacklab/asylum,jautero/asylum | shell | ## Code Before:
sudo -u postgres psql -U postgres -d postgres -c "alter user asylum createdb;"
./manage.py test $*
## Instruction:
Use py.test as the testrunner, wait for postgres before starting, install the test deps first too
## Code After:
sudo pip install -r requirements/test.txt
sudo -u postgres service postgresql start
export PGPASSWORD=asylum; while true; do psql -q asylum -c 'SELECT 1;' 1>/dev/null 2>&1 ; if [ "$?" -ne "0" ]; then echo "Waiting for psql"; sleep 1; else break; fi; done
sudo -u postgres psql -U postgres -d postgres -c "alter user asylum createdb;"
py.test $*
| -
+ sudo pip install -r requirements/test.txt
+ sudo -u postgres service postgresql start
+ export PGPASSWORD=asylum; while true; do psql -q asylum -c 'SELECT 1;' 1>/dev/null 2>&1 ; if [ "$?" -ne "0" ]; then echo "Waiting for psql"; sleep 1; else break; fi; done
sudo -u postgres psql -U postgres -d postgres -c "alter user asylum createdb;"
- ./manage.py test $*
+ py.test $* | 6 | 1.5 | 4 | 2 |
e17b25f5bcc3b88c1fc72ce29bc1e5d8972a2079 | Modules/SceneSerialization/test/CMakeLists.txt | Modules/SceneSerialization/test/CMakeLists.txt | MITK_CREATE_MODULE_TESTS(LABELS MITK-Modules)
if(TARGET ${TESTDRIVER})
if(BUILD_TESTING AND MODULE_IS_ENABLED)
add_test(mitkSceneIOTest_Pic3D.nrrd_binary.stl
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TESTDRIVER}
mitkSceneIOTest
${MITK_DATA_DIR}/Pic3D.nrrd
${MITK_DATA_DIR}/binary.stl
)
set_property(TEST mitkSceneIOTest_Pic3D.nrrd_binary.stl PROPERTY LABELS MITK-Modules)
if(MITK_ENABLE_RENDERING_TESTING)
mitkAddCustomModuleTest(mitkSceneIOCompatibility_NoRainbowCT mitkSceneIOCompatibilityTest
${MITK_DATA_DIR}/RenderingTestData/SceneFiles/rainbows-post-17547.mitk # scene to load
-V ${MITK_DATA_DIR}/RenderingTestData/ReferenceScreenshots/rainbows-post-17547.png) # reference rendering
endif()
endif()
endif()
| MITK_CREATE_MODULE_TESTS(LABELS MITK-Modules)
if(TARGET ${TESTDRIVER})
if(BUILD_TESTING AND MODULE_IS_ENABLED)
add_test(mitkSceneIOTest_Pic3D.nrrd_binary.stl
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TESTDRIVER}
mitkSceneIOTest
${MITK_DATA_DIR}/Pic3D.nrrd
${MITK_DATA_DIR}/binary.stl
)
set_property(TEST mitkSceneIOTest_Pic3D.nrrd_binary.stl PROPERTY LABELS MITK-Modules)
if(MITK_ENABLE_RENDERING_TESTING)
mitkAddCustomModuleTest(mitkSceneIOCompatibility_NoRainbowCT mitkSceneIOCompatibilityTest
${MITK_DATA_DIR}/RenderingTestData/SceneFiles/rainbows-post-17547.mitk # scene to load
-V ${MITK_DATA_DIR}/RenderingTestData/ReferenceScreenshots/rainbows-post-17547.png) # reference rendering
mitkAddCustomModuleTest(mitkSceneIOCompatibility_SurfaceIntLineWidth mitkSceneIOCompatibilityTest
${MITK_DATA_DIR}/RenderingTestData/SceneFiles/surface-pre-18528.mitk # scene to load
-V ${MITK_DATA_DIR}/RenderingTestData/ReferenceScreenshots/surface-pre-18528.png) # reference rendering
endif()
endif()
endif()
| Add rendering test (line width for Surface changed int to float) | Add rendering test (line width for Surface changed int to float)
| Text | bsd-3-clause | MITK/MITK,fmilano/mitk,fmilano/mitk,MITK/MITK,NifTK/MITK,iwegner/MITK,fmilano/mitk,iwegner/MITK,MITK/MITK,fmilano/mitk,RabadanLab/MITKats,iwegner/MITK,fmilano/mitk,NifTK/MITK,RabadanLab/MITKats,NifTK/MITK,MITK/MITK,MITK/MITK,NifTK/MITK,RabadanLab/MITKats,MITK/MITK,iwegner/MITK,RabadanLab/MITKats,iwegner/MITK,NifTK/MITK,iwegner/MITK,fmilano/mitk,NifTK/MITK,fmilano/mitk,RabadanLab/MITKats,RabadanLab/MITKats | text | ## Code Before:
MITK_CREATE_MODULE_TESTS(LABELS MITK-Modules)
if(TARGET ${TESTDRIVER})
if(BUILD_TESTING AND MODULE_IS_ENABLED)
add_test(mitkSceneIOTest_Pic3D.nrrd_binary.stl
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TESTDRIVER}
mitkSceneIOTest
${MITK_DATA_DIR}/Pic3D.nrrd
${MITK_DATA_DIR}/binary.stl
)
set_property(TEST mitkSceneIOTest_Pic3D.nrrd_binary.stl PROPERTY LABELS MITK-Modules)
if(MITK_ENABLE_RENDERING_TESTING)
mitkAddCustomModuleTest(mitkSceneIOCompatibility_NoRainbowCT mitkSceneIOCompatibilityTest
${MITK_DATA_DIR}/RenderingTestData/SceneFiles/rainbows-post-17547.mitk # scene to load
-V ${MITK_DATA_DIR}/RenderingTestData/ReferenceScreenshots/rainbows-post-17547.png) # reference rendering
endif()
endif()
endif()
## Instruction:
Add rendering test (line width for Surface changed int to float)
## Code After:
MITK_CREATE_MODULE_TESTS(LABELS MITK-Modules)
if(TARGET ${TESTDRIVER})
if(BUILD_TESTING AND MODULE_IS_ENABLED)
add_test(mitkSceneIOTest_Pic3D.nrrd_binary.stl
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TESTDRIVER}
mitkSceneIOTest
${MITK_DATA_DIR}/Pic3D.nrrd
${MITK_DATA_DIR}/binary.stl
)
set_property(TEST mitkSceneIOTest_Pic3D.nrrd_binary.stl PROPERTY LABELS MITK-Modules)
if(MITK_ENABLE_RENDERING_TESTING)
mitkAddCustomModuleTest(mitkSceneIOCompatibility_NoRainbowCT mitkSceneIOCompatibilityTest
${MITK_DATA_DIR}/RenderingTestData/SceneFiles/rainbows-post-17547.mitk # scene to load
-V ${MITK_DATA_DIR}/RenderingTestData/ReferenceScreenshots/rainbows-post-17547.png) # reference rendering
mitkAddCustomModuleTest(mitkSceneIOCompatibility_SurfaceIntLineWidth mitkSceneIOCompatibilityTest
${MITK_DATA_DIR}/RenderingTestData/SceneFiles/surface-pre-18528.mitk # scene to load
-V ${MITK_DATA_DIR}/RenderingTestData/ReferenceScreenshots/surface-pre-18528.png) # reference rendering
endif()
endif()
endif()
| MITK_CREATE_MODULE_TESTS(LABELS MITK-Modules)
if(TARGET ${TESTDRIVER})
if(BUILD_TESTING AND MODULE_IS_ENABLED)
add_test(mitkSceneIOTest_Pic3D.nrrd_binary.stl
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TESTDRIVER}
mitkSceneIOTest
${MITK_DATA_DIR}/Pic3D.nrrd
${MITK_DATA_DIR}/binary.stl
)
set_property(TEST mitkSceneIOTest_Pic3D.nrrd_binary.stl PROPERTY LABELS MITK-Modules)
if(MITK_ENABLE_RENDERING_TESTING)
mitkAddCustomModuleTest(mitkSceneIOCompatibility_NoRainbowCT mitkSceneIOCompatibilityTest
${MITK_DATA_DIR}/RenderingTestData/SceneFiles/rainbows-post-17547.mitk # scene to load
-V ${MITK_DATA_DIR}/RenderingTestData/ReferenceScreenshots/rainbows-post-17547.png) # reference rendering
+
+ mitkAddCustomModuleTest(mitkSceneIOCompatibility_SurfaceIntLineWidth mitkSceneIOCompatibilityTest
+ ${MITK_DATA_DIR}/RenderingTestData/SceneFiles/surface-pre-18528.mitk # scene to load
+ -V ${MITK_DATA_DIR}/RenderingTestData/ReferenceScreenshots/surface-pre-18528.png) # reference rendering
endif()
endif()
endif() | 4 | 0.190476 | 4 | 0 |
f631a7789ba727e9a0f50fc1cde9d23f8ef1719a | lib/create_multiple.js | lib/create_multiple.js | var is = require('is-js');
module.exports = function(sugar, models, assert) {
return function createMultipleAuthors(cb) {
var firstAuthor = {name: 'foo'};
var secondAuthor = {name: 'bar'};
sugar.create(models.Author, [firstAuthor, secondAuthor], function(err, authors) {
if(err) return cb(err);
assert(is.array(authors));
assert.equal(authors && authors[0], firstAuthor);
assert.equal(authors && authors[1], secondAuthor);
cb();
});
};
};
| var is = require('is-js');
module.exports = function(sugar, models, assert) {
return function createMultipleAuthors(cb) {
var firstAuthor = {name: 'foo'};
var secondAuthor = {name: 'bar'};
sugar.create(models.Author, [firstAuthor, secondAuthor], function(err, authors) {
if(err) return cb(err);
assert(is.array(authors));
assert.equal(authors && authors[0].name, firstAuthor.name);
assert.equal(authors && authors[1].name, secondAuthor.name);
cb();
});
};
};
| Make create multiple specification more specific | Make create multiple specification more specific
| JavaScript | mit | sugarjs/sugar-spec | javascript | ## Code Before:
var is = require('is-js');
module.exports = function(sugar, models, assert) {
return function createMultipleAuthors(cb) {
var firstAuthor = {name: 'foo'};
var secondAuthor = {name: 'bar'};
sugar.create(models.Author, [firstAuthor, secondAuthor], function(err, authors) {
if(err) return cb(err);
assert(is.array(authors));
assert.equal(authors && authors[0], firstAuthor);
assert.equal(authors && authors[1], secondAuthor);
cb();
});
};
};
## Instruction:
Make create multiple specification more specific
## Code After:
var is = require('is-js');
module.exports = function(sugar, models, assert) {
return function createMultipleAuthors(cb) {
var firstAuthor = {name: 'foo'};
var secondAuthor = {name: 'bar'};
sugar.create(models.Author, [firstAuthor, secondAuthor], function(err, authors) {
if(err) return cb(err);
assert(is.array(authors));
assert.equal(authors && authors[0].name, firstAuthor.name);
assert.equal(authors && authors[1].name, secondAuthor.name);
cb();
});
};
};
| var is = require('is-js');
module.exports = function(sugar, models, assert) {
return function createMultipleAuthors(cb) {
var firstAuthor = {name: 'foo'};
var secondAuthor = {name: 'bar'};
sugar.create(models.Author, [firstAuthor, secondAuthor], function(err, authors) {
if(err) return cb(err);
assert(is.array(authors));
- assert.equal(authors && authors[0], firstAuthor);
+ assert.equal(authors && authors[0].name, firstAuthor.name);
? +++++ +++++
- assert.equal(authors && authors[1], secondAuthor);
+ assert.equal(authors && authors[1].name, secondAuthor.name);
? +++++ +++++
cb();
});
};
}; | 4 | 0.210526 | 2 | 2 |
d29aca3850e89d61965e9b49e9b5c4a0f4e45e8f | README.md | README.md | 
===
Generic B-Spline curves in Rust. In development.
| [](http://i.imgur.com/RUEw8EW.png)
===
Generic B-Spline curves in Rust. In development.
| Add link to big image | Add link to big image | Markdown | mit | Twinklebear/bspline | markdown | ## Code Before:

===
Generic B-Spline curves in Rust. In development.
## Instruction:
Add link to big image
## Code After:
[](http://i.imgur.com/RUEw8EW.png)
===
Generic B-Spline curves in Rust. In development.
| - 
+ [](http://i.imgur.com/RUEw8EW.png)
===
Generic B-Spline curves in Rust. In development.
| 2 | 0.5 | 1 | 1 |
0775e0b6a173cf30f908c321b39f17d02b9da7dc | make/target/ps4_bin.mk | make/target/ps4_bin.mk |
include $(MakePath)/trait/freestanding.mk
include $(MakePath)/trait/ps4.mk
###################################
include $(MakePath)/trait/kernel_execute.mk
include $(MakePath)/trait/common.mk
include $(MakePath)/trait/adaptive.mk
include $(MakePath)/trait/sce.mk
include $(MakePath)/trait/kernel.mk
include $(MakePath)/trait/base.mk
include $(MakePath)/trait/system_call_rop_0x93a4FFFF8.mk
###################################
ifndef KeepElf
ifdef keepelf
KeepElf := $(keepelf)
endif
ifdef KEEPELF
KeepElf := $(KEEPELF)
endif
endif
###################################
#Text ?= 0x926200000
Text ?= 0x93a300000
#Data ?= 0x926300000
Data ?= 0x93a400000
###################################
LinkerFlags += -Wl,-Ttext,$(Text) -Wl,-Tdata,$(Data)
#LinkerFlags += -Wl,--build-id=none -Ttext $(Text) -Tdata $(Data)
###################################
bincopy = $(ObjectCopy) $@ -O binary $@
copy = cp $@ $@.elf
###################################
$(OutPath)/$(TargetFile):: $(ObjectFiles)
$(dirp)
$(link)
ifdef KeepElf
$(copy)
endif
$(bincopy)
###################################
include $(MakePath)/trait/all_and_clean.mk
###################################
|
include $(MakePath)/trait/freestanding.mk
include $(MakePath)/trait/ps4.mk
###################################
include $(MakePath)/trait/kernel_execute.mk
include $(MakePath)/trait/common.mk
include $(MakePath)/trait/adaptive.mk
include $(MakePath)/trait/sce.mk
include $(MakePath)/trait/kernel.mk
include $(MakePath)/trait/base.mk
include $(MakePath)/trait/system_call_rop_0x93a4FFFF8.mk
###################################
ifndef KeepElf
ifdef keepelf
KeepElf := $(keepelf)
endif
ifdef KEEPELF
KeepElf := $(KEEPELF)
endif
endif
###################################
LinkerFlags += -Xlinker -T $(Ps4Sdk)/linker.x -Wl,--build-id=none
###################################
bincopy = $(ObjectCopy) $@ -O binary $@
copy = cp $@ $@.elf
###################################
$(OutPath)/$(TargetFile):: $(ObjectFiles)
$(dirp)
$(link)
ifdef KeepElf
$(copy)
endif
$(bincopy)
###################################
include $(MakePath)/trait/all_and_clean.mk
###################################
| Add linker definition to binary build target | Add linker definition to binary build target
| Makefile | unlicense | ps4dev/ps4sdk,ps4dev/ps4sdk | makefile | ## Code Before:
include $(MakePath)/trait/freestanding.mk
include $(MakePath)/trait/ps4.mk
###################################
include $(MakePath)/trait/kernel_execute.mk
include $(MakePath)/trait/common.mk
include $(MakePath)/trait/adaptive.mk
include $(MakePath)/trait/sce.mk
include $(MakePath)/trait/kernel.mk
include $(MakePath)/trait/base.mk
include $(MakePath)/trait/system_call_rop_0x93a4FFFF8.mk
###################################
ifndef KeepElf
ifdef keepelf
KeepElf := $(keepelf)
endif
ifdef KEEPELF
KeepElf := $(KEEPELF)
endif
endif
###################################
#Text ?= 0x926200000
Text ?= 0x93a300000
#Data ?= 0x926300000
Data ?= 0x93a400000
###################################
LinkerFlags += -Wl,-Ttext,$(Text) -Wl,-Tdata,$(Data)
#LinkerFlags += -Wl,--build-id=none -Ttext $(Text) -Tdata $(Data)
###################################
bincopy = $(ObjectCopy) $@ -O binary $@
copy = cp $@ $@.elf
###################################
$(OutPath)/$(TargetFile):: $(ObjectFiles)
$(dirp)
$(link)
ifdef KeepElf
$(copy)
endif
$(bincopy)
###################################
include $(MakePath)/trait/all_and_clean.mk
###################################
## Instruction:
Add linker definition to binary build target
## Code After:
include $(MakePath)/trait/freestanding.mk
include $(MakePath)/trait/ps4.mk
###################################
include $(MakePath)/trait/kernel_execute.mk
include $(MakePath)/trait/common.mk
include $(MakePath)/trait/adaptive.mk
include $(MakePath)/trait/sce.mk
include $(MakePath)/trait/kernel.mk
include $(MakePath)/trait/base.mk
include $(MakePath)/trait/system_call_rop_0x93a4FFFF8.mk
###################################
ifndef KeepElf
ifdef keepelf
KeepElf := $(keepelf)
endif
ifdef KEEPELF
KeepElf := $(KEEPELF)
endif
endif
###################################
LinkerFlags += -Xlinker -T $(Ps4Sdk)/linker.x -Wl,--build-id=none
###################################
bincopy = $(ObjectCopy) $@ -O binary $@
copy = cp $@ $@.elf
###################################
$(OutPath)/$(TargetFile):: $(ObjectFiles)
$(dirp)
$(link)
ifdef KeepElf
$(copy)
endif
$(bincopy)
###################################
include $(MakePath)/trait/all_and_clean.mk
###################################
|
include $(MakePath)/trait/freestanding.mk
include $(MakePath)/trait/ps4.mk
###################################
include $(MakePath)/trait/kernel_execute.mk
include $(MakePath)/trait/common.mk
include $(MakePath)/trait/adaptive.mk
include $(MakePath)/trait/sce.mk
include $(MakePath)/trait/kernel.mk
include $(MakePath)/trait/base.mk
include $(MakePath)/trait/system_call_rop_0x93a4FFFF8.mk
###################################
ifndef KeepElf
ifdef keepelf
KeepElf := $(keepelf)
endif
ifdef KEEPELF
KeepElf := $(KEEPELF)
endif
endif
###################################
+ LinkerFlags += -Xlinker -T $(Ps4Sdk)/linker.x -Wl,--build-id=none
- #Text ?= 0x926200000
- Text ?= 0x93a300000
- #Data ?= 0x926300000
- Data ?= 0x93a400000
-
- ###################################
-
- LinkerFlags += -Wl,-Ttext,$(Text) -Wl,-Tdata,$(Data)
- #LinkerFlags += -Wl,--build-id=none -Ttext $(Text) -Tdata $(Data)
###################################
bincopy = $(ObjectCopy) $@ -O binary $@
copy = cp $@ $@.elf
###################################
$(OutPath)/$(TargetFile):: $(ObjectFiles)
$(dirp)
$(link)
ifdef KeepElf
$(copy)
endif
$(bincopy)
###################################
include $(MakePath)/trait/all_and_clean.mk
################################### | 10 | 0.175439 | 1 | 9 |
b5bc037a8fb178361c8c320d7eebfa6257108b8b | .travis.yml | .travis.yml |
language: objective-c
osx_image: xcode7.2
xcode_scheme: RouterKit
before_install: true
install:
- bundle exec gem install slather
script:
- set -o pipefail
- xctool -scheme 'RouterKit' -sdk iphonesimulator CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO test -parallelize
after_success:
- pod lib lint --quick # ensure podspec is still valid
- slather
|
language: objective-c
osx_image: xcode7.2
xcode_scheme: RouterKit
before_install: true
install:
- gem install slather
script:
- set -o pipefail
- xctool -scheme 'RouterKit' -sdk iphonesimulator CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO test -parallelize
after_success:
- pod lib lint --quick # ensure podspec is still valid
- slather
| Remove bundler invocation when installing gems | Remove bundler invocation when installing gems
| YAML | mit | kimyoutora/RouterKit,kimyoutora/RouterKit,kimyoutora/RouterKit | yaml | ## Code Before:
language: objective-c
osx_image: xcode7.2
xcode_scheme: RouterKit
before_install: true
install:
- bundle exec gem install slather
script:
- set -o pipefail
- xctool -scheme 'RouterKit' -sdk iphonesimulator CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO test -parallelize
after_success:
- pod lib lint --quick # ensure podspec is still valid
- slather
## Instruction:
Remove bundler invocation when installing gems
## Code After:
language: objective-c
osx_image: xcode7.2
xcode_scheme: RouterKit
before_install: true
install:
- gem install slather
script:
- set -o pipefail
- xctool -scheme 'RouterKit' -sdk iphonesimulator CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO test -parallelize
after_success:
- pod lib lint --quick # ensure podspec is still valid
- slather
|
language: objective-c
osx_image: xcode7.2
xcode_scheme: RouterKit
before_install: true
install:
- - bundle exec gem install slather
? ------------
+ - gem install slather
script:
- set -o pipefail
- xctool -scheme 'RouterKit' -sdk iphonesimulator CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO test -parallelize
after_success:
- pod lib lint --quick # ensure podspec is still valid
- slather | 2 | 0.153846 | 1 | 1 |
80a1a84ffc3bdb55e92d9443aad4e11e3f772ff0 | monitoring/os.go | monitoring/os.go | // +build !linux
/*
Copyright 2017 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package monitoring
// NewOSChecker returns a new checker to verify OS distribution
// against the list of supported releases.
//
// The checker only supports Linux.
func NewOSChecker(releases ...OSRelease) noopChecker {
return noopChecker{}
}
// OSRelease describes an OS distribution.
// It only supports Linux.
type OSRelease struct {
// ID identifies the distributor: ubuntu, redhat/centos, etc.
ID string
// VersionID is the release version i.e. 16.04 for Ubuntu
VersionID string
// Like specifies the list of root OS distributions this
// distribution is a descendant of
Like []string
}
// GetOSRelease deteremines the OS distribution release information.
//
// It only supports Linux.
func GetOSRelease() (*OSRelease, error) {
return nil, trace.BadParameter("not implemented")
}
| // +build !linux
/*
Copyright 2017 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package monitoring
import "github.com/gravitational/trace"
// NewOSChecker returns a new checker to verify OS distribution
// against the list of supported releases.
//
// The checker only supports Linux.
func NewOSChecker(releases ...OSRelease) noopChecker {
return noopChecker{}
}
// OSRelease describes an OS distribution.
// It only supports Linux.
type OSRelease struct {
// ID identifies the distributor: ubuntu, redhat/centos, etc.
ID string
// VersionID is the release version i.e. 16.04 for Ubuntu
VersionID string
// Like specifies the list of root OS distributions this
// distribution is a descendant of
Like []string
}
// GetOSRelease deteremines the OS distribution release information.
//
// It only supports Linux.
func GetOSRelease() (*OSRelease, error) {
return nil, trace.BadParameter("not implemented")
}
| Add missing dependency on darwin | Add missing dependency on darwin
| Go | apache-2.0 | gravitational/satellite,gravitational/satellite | go | ## Code Before:
// +build !linux
/*
Copyright 2017 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package monitoring
// NewOSChecker returns a new checker to verify OS distribution
// against the list of supported releases.
//
// The checker only supports Linux.
func NewOSChecker(releases ...OSRelease) noopChecker {
return noopChecker{}
}
// OSRelease describes an OS distribution.
// It only supports Linux.
type OSRelease struct {
// ID identifies the distributor: ubuntu, redhat/centos, etc.
ID string
// VersionID is the release version i.e. 16.04 for Ubuntu
VersionID string
// Like specifies the list of root OS distributions this
// distribution is a descendant of
Like []string
}
// GetOSRelease deteremines the OS distribution release information.
//
// It only supports Linux.
func GetOSRelease() (*OSRelease, error) {
return nil, trace.BadParameter("not implemented")
}
## Instruction:
Add missing dependency on darwin
## Code After:
// +build !linux
/*
Copyright 2017 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package monitoring
import "github.com/gravitational/trace"
// NewOSChecker returns a new checker to verify OS distribution
// against the list of supported releases.
//
// The checker only supports Linux.
func NewOSChecker(releases ...OSRelease) noopChecker {
return noopChecker{}
}
// OSRelease describes an OS distribution.
// It only supports Linux.
type OSRelease struct {
// ID identifies the distributor: ubuntu, redhat/centos, etc.
ID string
// VersionID is the release version i.e. 16.04 for Ubuntu
VersionID string
// Like specifies the list of root OS distributions this
// distribution is a descendant of
Like []string
}
// GetOSRelease deteremines the OS distribution release information.
//
// It only supports Linux.
func GetOSRelease() (*OSRelease, error) {
return nil, trace.BadParameter("not implemented")
}
| // +build !linux
/*
Copyright 2017 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package monitoring
+
+ import "github.com/gravitational/trace"
// NewOSChecker returns a new checker to verify OS distribution
// against the list of supported releases.
//
// The checker only supports Linux.
func NewOSChecker(releases ...OSRelease) noopChecker {
return noopChecker{}
}
// OSRelease describes an OS distribution.
// It only supports Linux.
type OSRelease struct {
// ID identifies the distributor: ubuntu, redhat/centos, etc.
ID string
// VersionID is the release version i.e. 16.04 for Ubuntu
VersionID string
// Like specifies the list of root OS distributions this
// distribution is a descendant of
Like []string
}
// GetOSRelease deteremines the OS distribution release information.
//
// It only supports Linux.
func GetOSRelease() (*OSRelease, error) {
return nil, trace.BadParameter("not implemented")
} | 2 | 0.044444 | 2 | 0 |
b8576e654547bda16b2d4e952f0620ac25e152b8 | lib/qblox/dialog.rb | lib/qblox/dialog.rb | module Qblox
class Dialog < Qblox::Base
attr_accessor(:_id, :accessible_for_ids, :created_at, :last_message,
:last_message_date_sent, :last_message_user_id, :name,
:occupants_ids, :photo, :type, :updated_at, :user_id,
:xmpp_room_jid, :unread_messages_count)
def messages(token: nil, options: {})
return @messages unless @messages.nil? || options != {}
messages = Qblox::Api::Message.new(token: token || @token).index(id, options)
messages = Qblox::Message::Collection.new(messages, token: token || @token)
@messages = messages unless options != {}
messages
end
class Collection < Array
attr_accessor(:total_entries, :skip, :limit, :items)
def initialize(attrs, token: nil)
self.total_entries = attrs['total_entries']
self.skip = attrs['skip']
self.limit = attrs['limit']
self.items = attrs['items']
items.each do |item|
push(Qblox::Dialog.new(item.merge(token: token)))
end
end
end
end
end
| module Qblox
class Dialog < Qblox::Base
ATTRIBUTES = [:_id, :accessible_for_ids, :created_at, :last_message,
:last_message_date_sent, :last_message_user_id, :name,
:occupants_ids, :photo, :type, :updated_at, :user_id,
:xmpp_room_jid, :unread_messages_count]
attr_accessor(*ATTRIBUTES)
def messages(token: nil, options: {})
return @messages unless @messages.nil? || options != {}
messages = Qblox::Api::Message.new(token: token || @token).index(id, options)
messages = Qblox::Message::Collection.new(messages, token: token || @token)
@messages = messages unless options != {}
messages
end
def attributes
ATTRIBUTES.each_with_object({}) do |key, hash|
hash[key] = send(key)
end
end
class Collection < Array
attr_accessor(:total_entries, :skip, :limit, :items)
def initialize(attrs, token: nil)
self.total_entries = attrs['total_entries']
self.skip = attrs['skip']
self.limit = attrs['limit']
self.items = attrs['items']
items.each do |item|
push(Qblox::Dialog.new(item.merge(token: token)))
end
end
end
end
end
| Enable to export to hash object attributes | Enable to export to hash object attributes
| Ruby | mit | nelsonmhjr/qblox,nelsonmhjr/qblox | ruby | ## Code Before:
module Qblox
class Dialog < Qblox::Base
attr_accessor(:_id, :accessible_for_ids, :created_at, :last_message,
:last_message_date_sent, :last_message_user_id, :name,
:occupants_ids, :photo, :type, :updated_at, :user_id,
:xmpp_room_jid, :unread_messages_count)
def messages(token: nil, options: {})
return @messages unless @messages.nil? || options != {}
messages = Qblox::Api::Message.new(token: token || @token).index(id, options)
messages = Qblox::Message::Collection.new(messages, token: token || @token)
@messages = messages unless options != {}
messages
end
class Collection < Array
attr_accessor(:total_entries, :skip, :limit, :items)
def initialize(attrs, token: nil)
self.total_entries = attrs['total_entries']
self.skip = attrs['skip']
self.limit = attrs['limit']
self.items = attrs['items']
items.each do |item|
push(Qblox::Dialog.new(item.merge(token: token)))
end
end
end
end
end
## Instruction:
Enable to export to hash object attributes
## Code After:
module Qblox
class Dialog < Qblox::Base
ATTRIBUTES = [:_id, :accessible_for_ids, :created_at, :last_message,
:last_message_date_sent, :last_message_user_id, :name,
:occupants_ids, :photo, :type, :updated_at, :user_id,
:xmpp_room_jid, :unread_messages_count]
attr_accessor(*ATTRIBUTES)
def messages(token: nil, options: {})
return @messages unless @messages.nil? || options != {}
messages = Qblox::Api::Message.new(token: token || @token).index(id, options)
messages = Qblox::Message::Collection.new(messages, token: token || @token)
@messages = messages unless options != {}
messages
end
def attributes
ATTRIBUTES.each_with_object({}) do |key, hash|
hash[key] = send(key)
end
end
class Collection < Array
attr_accessor(:total_entries, :skip, :limit, :items)
def initialize(attrs, token: nil)
self.total_entries = attrs['total_entries']
self.skip = attrs['skip']
self.limit = attrs['limit']
self.items = attrs['items']
items.each do |item|
push(Qblox::Dialog.new(item.merge(token: token)))
end
end
end
end
end
| module Qblox
class Dialog < Qblox::Base
- attr_accessor(:_id, :accessible_for_ids, :created_at, :last_message,
? ^^^^^^^^^^^^^^
+ ATTRIBUTES = [:_id, :accessible_for_ids, :created_at, :last_message,
? ^^^^^^^^^^^^^^
:last_message_date_sent, :last_message_user_id, :name,
:occupants_ids, :photo, :type, :updated_at, :user_id,
- :xmpp_room_jid, :unread_messages_count)
? ^
+ :xmpp_room_jid, :unread_messages_count]
? ^
+
+ attr_accessor(*ATTRIBUTES)
def messages(token: nil, options: {})
return @messages unless @messages.nil? || options != {}
messages = Qblox::Api::Message.new(token: token || @token).index(id, options)
messages = Qblox::Message::Collection.new(messages, token: token || @token)
@messages = messages unless options != {}
messages
+ end
+
+ def attributes
+ ATTRIBUTES.each_with_object({}) do |key, hash|
+ hash[key] = send(key)
+ end
end
class Collection < Array
attr_accessor(:total_entries, :skip, :limit, :items)
def initialize(attrs, token: nil)
self.total_entries = attrs['total_entries']
self.skip = attrs['skip']
self.limit = attrs['limit']
self.items = attrs['items']
items.each do |item|
push(Qblox::Dialog.new(item.merge(token: token)))
end
end
end
end
end | 12 | 0.4 | 10 | 2 |
a04ed7145e2fa87e9ca0de254237fa3de08a46a8 | worker/src/main/java/com/github/k0kubun/github_ranking/Main.java | worker/src/main/java/com/github/k0kubun/github_ranking/Main.java | package com.github.k0kubun.github_ranking;
import com.github.k0kubun.github_ranking.config.Config;
import com.github.k0kubun.github_ranking.worker.UpdateUserWorker;
import com.github.k0kubun.github_ranking.worker.WorkerManager;
import javax.sql.DataSource;
public class Main
{
public static void main(String[] args)
{
Config config = new Config(System.getenv());
WorkerManager workers = buildWorkers(config);
Runtime.getRuntime().addShutdownHook(new Thread(workers::stop));
workers.start();
}
private static WorkerManager buildWorkers(Config config)
{
DataSource dataSource = config.getDatabaseConfig().getDataSource();
WorkerManager workers = new WorkerManager();
workers.add(new UpdateUserWorker(dataSource));
return workers;
}
}
| package com.github.k0kubun.github_ranking;
import com.github.k0kubun.github_ranking.config.Config;
import com.github.k0kubun.github_ranking.worker.UpdateUserWorker;
import com.github.k0kubun.github_ranking.worker.WorkerManager;
import javax.sql.DataSource;
public class Main
{
private static final int NUM_UPDATE_USER_WORKERS = 3;
public static void main(String[] args)
{
Config config = new Config(System.getenv());
WorkerManager workers = buildWorkers(config);
Runtime.getRuntime().addShutdownHook(new Thread(workers::stop));
workers.start();
}
private static WorkerManager buildWorkers(Config config)
{
DataSource dataSource = config.getDatabaseConfig().getDataSource();
WorkerManager workers = new WorkerManager();
for (int i = 0; i < NUM_UPDATE_USER_WORKERS; i++) {
workers.add(new UpdateUserWorker(dataSource));
}
return workers;
}
}
| Increase UpdateUserWorker: 1 -> 3 | Increase UpdateUserWorker: 1 -> 3
| Java | mit | k0kubun/github-ranking,k0kubun/githubranking,k0kubun/githubranking,k0kubun/github-ranking,k0kubun/github-ranking,k0kubun/githubranking,k0kubun/githubranking,k0kubun/github-ranking,k0kubun/github-ranking,k0kubun/githubranking | java | ## Code Before:
package com.github.k0kubun.github_ranking;
import com.github.k0kubun.github_ranking.config.Config;
import com.github.k0kubun.github_ranking.worker.UpdateUserWorker;
import com.github.k0kubun.github_ranking.worker.WorkerManager;
import javax.sql.DataSource;
public class Main
{
public static void main(String[] args)
{
Config config = new Config(System.getenv());
WorkerManager workers = buildWorkers(config);
Runtime.getRuntime().addShutdownHook(new Thread(workers::stop));
workers.start();
}
private static WorkerManager buildWorkers(Config config)
{
DataSource dataSource = config.getDatabaseConfig().getDataSource();
WorkerManager workers = new WorkerManager();
workers.add(new UpdateUserWorker(dataSource));
return workers;
}
}
## Instruction:
Increase UpdateUserWorker: 1 -> 3
## Code After:
package com.github.k0kubun.github_ranking;
import com.github.k0kubun.github_ranking.config.Config;
import com.github.k0kubun.github_ranking.worker.UpdateUserWorker;
import com.github.k0kubun.github_ranking.worker.WorkerManager;
import javax.sql.DataSource;
public class Main
{
private static final int NUM_UPDATE_USER_WORKERS = 3;
public static void main(String[] args)
{
Config config = new Config(System.getenv());
WorkerManager workers = buildWorkers(config);
Runtime.getRuntime().addShutdownHook(new Thread(workers::stop));
workers.start();
}
private static WorkerManager buildWorkers(Config config)
{
DataSource dataSource = config.getDatabaseConfig().getDataSource();
WorkerManager workers = new WorkerManager();
for (int i = 0; i < NUM_UPDATE_USER_WORKERS; i++) {
workers.add(new UpdateUserWorker(dataSource));
}
return workers;
}
}
| package com.github.k0kubun.github_ranking;
import com.github.k0kubun.github_ranking.config.Config;
import com.github.k0kubun.github_ranking.worker.UpdateUserWorker;
import com.github.k0kubun.github_ranking.worker.WorkerManager;
import javax.sql.DataSource;
public class Main
{
+ private static final int NUM_UPDATE_USER_WORKERS = 3;
+
public static void main(String[] args)
{
Config config = new Config(System.getenv());
WorkerManager workers = buildWorkers(config);
Runtime.getRuntime().addShutdownHook(new Thread(workers::stop));
workers.start();
}
private static WorkerManager buildWorkers(Config config)
{
DataSource dataSource = config.getDatabaseConfig().getDataSource();
WorkerManager workers = new WorkerManager();
+ for (int i = 0; i < NUM_UPDATE_USER_WORKERS; i++) {
- workers.add(new UpdateUserWorker(dataSource));
+ workers.add(new UpdateUserWorker(dataSource));
? ++++
+ }
return workers;
}
} | 6 | 0.222222 | 5 | 1 |
a03a0c9fdb2346cc4a53efeb9973a7b8f3dab407 | spec/models/character_spec.rb | spec/models/character_spec.rb | require 'rails_helper'
require 'support/privacy_example'
require 'support/public_scope_example'
RSpec.describe Character, type: :model do
it_behaves_like 'content with privacy'
it_behaves_like 'content with an is_public scope'
it { is_expected.to validate_presence_of(:name) }
end
| require 'rails_helper'
require 'support/privacy_example'
require 'support/public_scope_example'
RSpec.describe Character, type: :model do
it_behaves_like 'content with privacy'
it_behaves_like 'content with an is_public scope'
it { is_expected.to validate_presence_of(:name) }
context "when character having a sibling is deleted" do
before do
@alice = create(:character, name: "Alice")
@bob = create(:character, name: "Bob")
@alice.siblings << @bob
@alice.destroy()
end
it "don't delete the sibling" do
expect(Character.exists?(@bob.id)).to be true
end
it "delete sibling relation" do
expect(@alice.siblings.include?(@bob)).to be false
end
it "delete reverse sibling relation" do
expect(@bob.siblings.include?(@alice)).to be false
end
end
end
| Add deletion test for sibling relation | Add deletion test for sibling relation
| Ruby | mit | indentlabs/notebook,indentlabs/notebook,indentlabs/notebook | ruby | ## Code Before:
require 'rails_helper'
require 'support/privacy_example'
require 'support/public_scope_example'
RSpec.describe Character, type: :model do
it_behaves_like 'content with privacy'
it_behaves_like 'content with an is_public scope'
it { is_expected.to validate_presence_of(:name) }
end
## Instruction:
Add deletion test for sibling relation
## Code After:
require 'rails_helper'
require 'support/privacy_example'
require 'support/public_scope_example'
RSpec.describe Character, type: :model do
it_behaves_like 'content with privacy'
it_behaves_like 'content with an is_public scope'
it { is_expected.to validate_presence_of(:name) }
context "when character having a sibling is deleted" do
before do
@alice = create(:character, name: "Alice")
@bob = create(:character, name: "Bob")
@alice.siblings << @bob
@alice.destroy()
end
it "don't delete the sibling" do
expect(Character.exists?(@bob.id)).to be true
end
it "delete sibling relation" do
expect(@alice.siblings.include?(@bob)).to be false
end
it "delete reverse sibling relation" do
expect(@bob.siblings.include?(@alice)).to be false
end
end
end
| require 'rails_helper'
require 'support/privacy_example'
require 'support/public_scope_example'
RSpec.describe Character, type: :model do
it_behaves_like 'content with privacy'
it_behaves_like 'content with an is_public scope'
it { is_expected.to validate_presence_of(:name) }
+
+ context "when character having a sibling is deleted" do
+ before do
+ @alice = create(:character, name: "Alice")
+ @bob = create(:character, name: "Bob")
+ @alice.siblings << @bob
+ @alice.destroy()
+ end
+
+ it "don't delete the sibling" do
+ expect(Character.exists?(@bob.id)).to be true
+ end
+
+ it "delete sibling relation" do
+ expect(@alice.siblings.include?(@bob)).to be false
+ end
+
+ it "delete reverse sibling relation" do
+ expect(@bob.siblings.include?(@alice)).to be false
+ end
+ end
end | 21 | 2.333333 | 21 | 0 |
689e33f3caf9056093e87eda5091e340c7986f81 | download_deps.sh | download_deps.sh |
SSL=openssl-1.1.1n.tar.gz
APR=apr-1.7.0.tar.gz
mkdir -p deps
if [ ! -f deps/$SSL ] ; then
curl https://www.openssl.org/source/$SSL -o deps/$SSL
fi
if [ ! -d deps/src/openssl ] ; then
mkdir -p deps/src/openssl
(cd deps/src/openssl; tar -xvz --strip-components=1 -f ../../$SSL)
fi
if [ ! -f deps/src/openssl/Makefile ] ; then
(cd deps/src/openssl; ./config )
fi
(cd deps/src/openssl; make build_libs )
if [ ! -f deps/$APR ] ; then
curl https://archive.apache.org/dist/apr/$APR -o deps/$APR
fi
if [ ! -d deps/src/apr ] ; then
mkdir -p deps/src/apr
(cd deps/src/apr; tar -xvz --strip-components=1 -f ../../$APR)
fi
|
cd $(dirname $0)
SSL=openssl-1.1.1n.tar.gz
APR=apr-1.7.0.tar.gz
mkdir -p deps
if [ ! -f deps/$SSL ] ; then
curl https://www.openssl.org/source/$SSL -o deps/$SSL
fi
if [ ! -d deps/src/openssl ] ; then
mkdir -p deps/src/openssl
(cd deps/src/openssl; tar -xvz --strip-components=1 -f ../../$SSL)
fi
if [ ! -f deps/src/openssl/Makefile ] ; then
(cd deps/src/openssl; ./config )
fi
(cd deps/src/openssl; make build_libs )
if [ ! -f deps/$APR ] ; then
curl https://archive.apache.org/dist/apr/$APR -o deps/$APR
fi
if [ ! -d deps/src/apr ] ; then
mkdir -p deps/src/apr
(cd deps/src/apr; tar -xvz --strip-components=1 -f ../../$APR)
fi
| Fix script to run from different directories | Fix script to run from different directories
By adding cd $(dirname $0) , user can run script from external directory and not having issues with the actual location of deps directory. | Shell | apache-2.0 | apache/tomcat-native,apache/tomcat-native,apache/tomcat-native,apache/tomcat-native,apache/tomcat-native | shell | ## Code Before:
SSL=openssl-1.1.1n.tar.gz
APR=apr-1.7.0.tar.gz
mkdir -p deps
if [ ! -f deps/$SSL ] ; then
curl https://www.openssl.org/source/$SSL -o deps/$SSL
fi
if [ ! -d deps/src/openssl ] ; then
mkdir -p deps/src/openssl
(cd deps/src/openssl; tar -xvz --strip-components=1 -f ../../$SSL)
fi
if [ ! -f deps/src/openssl/Makefile ] ; then
(cd deps/src/openssl; ./config )
fi
(cd deps/src/openssl; make build_libs )
if [ ! -f deps/$APR ] ; then
curl https://archive.apache.org/dist/apr/$APR -o deps/$APR
fi
if [ ! -d deps/src/apr ] ; then
mkdir -p deps/src/apr
(cd deps/src/apr; tar -xvz --strip-components=1 -f ../../$APR)
fi
## Instruction:
Fix script to run from different directories
By adding cd $(dirname $0) , user can run script from external directory and not having issues with the actual location of deps directory.
## Code After:
cd $(dirname $0)
SSL=openssl-1.1.1n.tar.gz
APR=apr-1.7.0.tar.gz
mkdir -p deps
if [ ! -f deps/$SSL ] ; then
curl https://www.openssl.org/source/$SSL -o deps/$SSL
fi
if [ ! -d deps/src/openssl ] ; then
mkdir -p deps/src/openssl
(cd deps/src/openssl; tar -xvz --strip-components=1 -f ../../$SSL)
fi
if [ ! -f deps/src/openssl/Makefile ] ; then
(cd deps/src/openssl; ./config )
fi
(cd deps/src/openssl; make build_libs )
if [ ! -f deps/$APR ] ; then
curl https://archive.apache.org/dist/apr/$APR -o deps/$APR
fi
if [ ! -d deps/src/apr ] ; then
mkdir -p deps/src/apr
(cd deps/src/apr; tar -xvz --strip-components=1 -f ../../$APR)
fi
| +
+ cd $(dirname $0)
SSL=openssl-1.1.1n.tar.gz
APR=apr-1.7.0.tar.gz
mkdir -p deps
if [ ! -f deps/$SSL ] ; then
curl https://www.openssl.org/source/$SSL -o deps/$SSL
fi
if [ ! -d deps/src/openssl ] ; then
mkdir -p deps/src/openssl
(cd deps/src/openssl; tar -xvz --strip-components=1 -f ../../$SSL)
fi
if [ ! -f deps/src/openssl/Makefile ] ; then
(cd deps/src/openssl; ./config )
fi
(cd deps/src/openssl; make build_libs )
if [ ! -f deps/$APR ] ; then
curl https://archive.apache.org/dist/apr/$APR -o deps/$APR
fi
if [ ! -d deps/src/apr ] ; then
mkdir -p deps/src/apr
(cd deps/src/apr; tar -xvz --strip-components=1 -f ../../$APR)
fi | 2 | 0.08 | 2 | 0 |
7b70c8317eae156c768a416887798d84f1e2cba5 | tools/distrib/README.client.txt | tools/distrib/README.client.txt | CONTENTS
--------
Release Contains a release build of the cefclient sample application.
USAGE
-----
Please visit the CEF Website for additional usage information.
http://code.google.com/p/chromiumembedded
| CONTENTS
--------
Release Contains a release build of the cefclient sample application.
USAGE
-----
Please visit the CEF Website for additional usage information.
https://bitbucket.org/chromiumembedded/cef/
| Update the project URL in the binary distribution README.txt | Update the project URL in the binary distribution README.txt
| Text | bsd-3-clause | bkeiren/cef,bkeiren/cef,zmike/cef-rebase,bkeiren/cef,zmike/cef-rebase,zmike/cef-rebase,zmike/cef-rebase,zmike/cef-rebase,bkeiren/cef,bkeiren/cef | text | ## Code Before:
CONTENTS
--------
Release Contains a release build of the cefclient sample application.
USAGE
-----
Please visit the CEF Website for additional usage information.
http://code.google.com/p/chromiumembedded
## Instruction:
Update the project URL in the binary distribution README.txt
## Code After:
CONTENTS
--------
Release Contains a release build of the cefclient sample application.
USAGE
-----
Please visit the CEF Website for additional usage information.
https://bitbucket.org/chromiumembedded/cef/
| CONTENTS
--------
Release Contains a release build of the cefclient sample application.
USAGE
-----
Please visit the CEF Website for additional usage information.
- http://code.google.com/p/chromiumembedded
+ https://bitbucket.org/chromiumembedded/cef/ | 2 | 0.166667 | 1 | 1 |
a948fc5f83b8def4bf376ebfe5231cb198c6a7a0 | themes/default/layout/component.mustache | themes/default/layout/component.mustache | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{title}}</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/3.3.0/build/cssgrids/grids-min.css">
<link rel="stylesheet" href="../assets/css/main.css">
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
</head>
<body>
<div id="doc">
<h1>{{title}}</h1>
<div class="yui3-g">
<div id="sidebar" class="yui3-u">
<div id="toc">
<h2>Table of Contents</h2>
{{toc}}
</div>
</div>
<div id="main" class="yui3-u">
<div class="content">{{>layout_content}}</div>
</div>
</div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
</body>
</html>
| <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{title}}</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/3.3.0/build/cssgrids/grids-min.css">
<link rel="stylesheet" href="../assets/css/main.css">
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
</head>
<body>
<div id="doc">
<h1>{{title}}</h1>
<div class="yui3-g">
<div id="main" class="yui3-u">
<div class="content">{{>layout_content}}</div>
</div>
<div id="sidebar" class="yui3-u">
<div id="toc">
<h2>Table of Contents</h2>
{{toc}}
</div>
</div>
</div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
</body>
</html>
| Move TOC to the right of the content. | Move TOC to the right of the content. | HTML+Django | bsd-3-clause | rgrove/selleck,yui/selleck | html+django | ## Code Before:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{title}}</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/3.3.0/build/cssgrids/grids-min.css">
<link rel="stylesheet" href="../assets/css/main.css">
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
</head>
<body>
<div id="doc">
<h1>{{title}}</h1>
<div class="yui3-g">
<div id="sidebar" class="yui3-u">
<div id="toc">
<h2>Table of Contents</h2>
{{toc}}
</div>
</div>
<div id="main" class="yui3-u">
<div class="content">{{>layout_content}}</div>
</div>
</div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
</body>
</html>
## Instruction:
Move TOC to the right of the content.
## Code After:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{title}}</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/3.3.0/build/cssgrids/grids-min.css">
<link rel="stylesheet" href="../assets/css/main.css">
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
</head>
<body>
<div id="doc">
<h1>{{title}}</h1>
<div class="yui3-g">
<div id="main" class="yui3-u">
<div class="content">{{>layout_content}}</div>
</div>
<div id="sidebar" class="yui3-u">
<div id="toc">
<h2>Table of Contents</h2>
{{toc}}
</div>
</div>
</div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
</body>
</html>
| <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{title}}</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/3.3.0/build/cssgrids/grids-min.css">
<link rel="stylesheet" href="../assets/css/main.css">
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
</head>
<body>
<div id="doc">
<h1>{{title}}</h1>
<div class="yui3-g">
+ <div id="main" class="yui3-u">
+ <div class="content">{{>layout_content}}</div>
+ </div>
+
<div id="sidebar" class="yui3-u">
<div id="toc">
<h2>Table of Contents</h2>
{{toc}}
</div>
- </div>
-
- <div id="main" class="yui3-u">
- <div class="content">{{>layout_content}}</div>
</div>
</div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
</body>
</html> | 8 | 0.242424 | 4 | 4 |
9e379e13708700bb5b9fc8f9b5bc1a52a04f5813 | lib/frontkick/error.rb | lib/frontkick/error.rb | require 'json'
module Frontkick
# ref. http://docs.ruby-lang.org/ja/1.9.3/class/Timeout=3a=3aError.html
class TimeoutLocal < ::Timeout::Error; end
class Locked < StandardError; end
class Timeout < StandardError
attr_reader :pid, :command, :killed
def initialize(pid, command, killed)
@pid = pid
@command = command
@killed = killed
end
def to_s
{pid: @pid, command: @command, killed: @killed}.to_json
end
alias_method :message, :to_s
end
end
| require 'json'
require 'timeout'
module Frontkick
# ref. http://docs.ruby-lang.org/ja/1.9.3/class/Timeout=3a=3aError.html
class TimeoutLocal < ::Timeout::Error; end
class Locked < StandardError; end
class Timeout < StandardError
attr_reader :pid, :command, :killed
def initialize(pid, command, killed)
@pid = pid
@command = command
@killed = killed
end
def to_s
{pid: @pid, command: @command, killed: @killed}.to_json
end
alias_method :message, :to_s
end
end
| Fix uninitialized constant Timeout (NameError) | Fix uninitialized constant Timeout (NameError)
| Ruby | mit | sonots/frontkick | ruby | ## Code Before:
require 'json'
module Frontkick
# ref. http://docs.ruby-lang.org/ja/1.9.3/class/Timeout=3a=3aError.html
class TimeoutLocal < ::Timeout::Error; end
class Locked < StandardError; end
class Timeout < StandardError
attr_reader :pid, :command, :killed
def initialize(pid, command, killed)
@pid = pid
@command = command
@killed = killed
end
def to_s
{pid: @pid, command: @command, killed: @killed}.to_json
end
alias_method :message, :to_s
end
end
## Instruction:
Fix uninitialized constant Timeout (NameError)
## Code After:
require 'json'
require 'timeout'
module Frontkick
# ref. http://docs.ruby-lang.org/ja/1.9.3/class/Timeout=3a=3aError.html
class TimeoutLocal < ::Timeout::Error; end
class Locked < StandardError; end
class Timeout < StandardError
attr_reader :pid, :command, :killed
def initialize(pid, command, killed)
@pid = pid
@command = command
@killed = killed
end
def to_s
{pid: @pid, command: @command, killed: @killed}.to_json
end
alias_method :message, :to_s
end
end
| require 'json'
+ require 'timeout'
module Frontkick
# ref. http://docs.ruby-lang.org/ja/1.9.3/class/Timeout=3a=3aError.html
class TimeoutLocal < ::Timeout::Error; end
class Locked < StandardError; end
class Timeout < StandardError
attr_reader :pid, :command, :killed
def initialize(pid, command, killed)
@pid = pid
@command = command
@killed = killed
end
def to_s
{pid: @pid, command: @command, killed: @killed}.to_json
end
alias_method :message, :to_s
end
end | 1 | 0.045455 | 1 | 0 |
12187a07c73579bab9f5bb112de8487c3f86f9c9 | build/build-order.txt | build/build-order.txt | src/Nether.Data.MongoDB
src/Nether.Web
tests/Nether.Web.UnitTests | src/Nether.Data.MongoDB
src/Nether.Web
src/TestClients/FacebookUserTokenClient
src/TestClients/IdentityServerTestClient
src/PerformanceTests/LeaderboardLoadTest
tests/Nether.Web.UnitTests | Add new projects to build script | Add new projects to build script
| Text | mit | ankodu/nether,ankodu/nether,navalev/nether,oliviak/nether,stuartleeks/nether,brentstineman/nether,krist00fer/nether,brentstineman/nether,navalev/nether,vflorusso/nether,navalev/nether,ankodu/nether,brentstineman/nether,vflorusso/nether,vflorusso/nether,navalev/nether,stuartleeks/nether,vflorusso/nether,ankodu/nether,stuartleeks/nether,brentstineman/nether,stuartleeks/nether,vflorusso/nether,MicrosoftDX/nether,brentstineman/nether,stuartleeks/nether | text | ## Code Before:
src/Nether.Data.MongoDB
src/Nether.Web
tests/Nether.Web.UnitTests
## Instruction:
Add new projects to build script
## Code After:
src/Nether.Data.MongoDB
src/Nether.Web
src/TestClients/FacebookUserTokenClient
src/TestClients/IdentityServerTestClient
src/PerformanceTests/LeaderboardLoadTest
tests/Nether.Web.UnitTests | src/Nether.Data.MongoDB
src/Nether.Web
+ src/TestClients/FacebookUserTokenClient
+ src/TestClients/IdentityServerTestClient
+ src/PerformanceTests/LeaderboardLoadTest
tests/Nether.Web.UnitTests | 3 | 1 | 3 | 0 |
55f010c72438fcc227fd1bd967467ca13f9ea64e | specs/services/people_spec.js | specs/services/people_spec.js | /**
* @author Hamza Waqas <hamzawaqas@live.com>
* @since 2/9/14
*/
var linkedin = require('../../')('75gyccfxufrozz', 'HKwSAPg0z7oGYfh5')
token = process.env.IN_TOKEN;
jasmine.getEnv().defaultTimeoutInterval = 20000;
linkedin = linkedin.init(token);
describe('API: People Test Suite', function() {
it('should retrieve profile of current user', function(done) {
linkedin.people.me(function(err, data) {
done();
});
});
it('should invite someone to connect', function(done) {
linkedin.people.invite({
"recipients": {
"values": [{
"person": {
"_path": "/people/email=glavin.wiechert@gmail.com",
"first-name": "Glavin",
"last-name": "Wiechert"
}
}]
},
"subject": "Invitation to connect.",
"body": "Say yes!",
"item-content": {
"invitation-request": {
"connect-type": "friend"
}
}
}, function(err, data) {
console.log(err, data);
});
});
});
| /**
* @author Hamza Waqas <hamzawaqas@live.com>
* @since 2/9/14
*/
var linkedin = require('../../')('75gyccfxufrozz', 'HKwSAPg0z7oGYfh5')
token = process.env.IN_TOKEN;
jasmine.getEnv().defaultTimeoutInterval = 20000;
linkedin = linkedin.init(token);
describe('API: People Test Suite', function() {
it('should retrieve profile of current user', function(done) {
linkedin.people.me(function(err, data) {
done();
});
});
it('should invite someone to connect', function(done) {
linkedin.people.invite({
"recipients": {
"values": [{
"person": {
"_path": "/people/email=glavin.wiechert@gmail.com",
"first-name": "Glavin",
"last-name": "Wiechert"
}
}]
},
"subject": "Invitation to connect.",
"body": "Say yes!",
"item-content": {
"invitation-request": {
"connect-type": "friend"
}
}
}, function(err, data) {
done();
});
});
});
| Remove console.log and add in done() for people spec. | Remove console.log and add in done() for people spec.
| JavaScript | mit | ArkeologeN/node-linkedin | javascript | ## Code Before:
/**
* @author Hamza Waqas <hamzawaqas@live.com>
* @since 2/9/14
*/
var linkedin = require('../../')('75gyccfxufrozz', 'HKwSAPg0z7oGYfh5')
token = process.env.IN_TOKEN;
jasmine.getEnv().defaultTimeoutInterval = 20000;
linkedin = linkedin.init(token);
describe('API: People Test Suite', function() {
it('should retrieve profile of current user', function(done) {
linkedin.people.me(function(err, data) {
done();
});
});
it('should invite someone to connect', function(done) {
linkedin.people.invite({
"recipients": {
"values": [{
"person": {
"_path": "/people/email=glavin.wiechert@gmail.com",
"first-name": "Glavin",
"last-name": "Wiechert"
}
}]
},
"subject": "Invitation to connect.",
"body": "Say yes!",
"item-content": {
"invitation-request": {
"connect-type": "friend"
}
}
}, function(err, data) {
console.log(err, data);
});
});
});
## Instruction:
Remove console.log and add in done() for people spec.
## Code After:
/**
* @author Hamza Waqas <hamzawaqas@live.com>
* @since 2/9/14
*/
var linkedin = require('../../')('75gyccfxufrozz', 'HKwSAPg0z7oGYfh5')
token = process.env.IN_TOKEN;
jasmine.getEnv().defaultTimeoutInterval = 20000;
linkedin = linkedin.init(token);
describe('API: People Test Suite', function() {
it('should retrieve profile of current user', function(done) {
linkedin.people.me(function(err, data) {
done();
});
});
it('should invite someone to connect', function(done) {
linkedin.people.invite({
"recipients": {
"values": [{
"person": {
"_path": "/people/email=glavin.wiechert@gmail.com",
"first-name": "Glavin",
"last-name": "Wiechert"
}
}]
},
"subject": "Invitation to connect.",
"body": "Say yes!",
"item-content": {
"invitation-request": {
"connect-type": "friend"
}
}
}, function(err, data) {
done();
});
});
});
| /**
* @author Hamza Waqas <hamzawaqas@live.com>
* @since 2/9/14
*/
var linkedin = require('../../')('75gyccfxufrozz', 'HKwSAPg0z7oGYfh5')
token = process.env.IN_TOKEN;
jasmine.getEnv().defaultTimeoutInterval = 20000;
linkedin = linkedin.init(token);
describe('API: People Test Suite', function() {
it('should retrieve profile of current user', function(done) {
linkedin.people.me(function(err, data) {
done();
});
});
it('should invite someone to connect', function(done) {
linkedin.people.invite({
"recipients": {
"values": [{
"person": {
"_path": "/people/email=glavin.wiechert@gmail.com",
"first-name": "Glavin",
"last-name": "Wiechert"
}
}]
},
"subject": "Invitation to connect.",
"body": "Say yes!",
"item-content": {
"invitation-request": {
"connect-type": "friend"
}
}
}, function(err, data) {
- console.log(err, data);
+ done();
});
});
}); | 2 | 0.046512 | 1 | 1 |
5b173e2e5564a6f23e1cb4bcd6db534c7aefcc13 | go/index.html.md.erb | go/index.html.md.erb | ---
title: Go Buildpack
owner: Buildpacks
---
<strong><%= modified_date %></strong>
## <a id='buildpack'></a>About the Go Buildpack ##
For information about using and extending the Go buildpack in Cloud Foundry, see
the [go-buildpack GitHub repo](https://github.com/cloudfoundry/go-buildpack).
You can find current information about this buildpack on the Go buildpack
[release page](https://github.com/cloudfoundry/go-buildpack/releases) in GitHub.
### Specifying a Go version
#### with Godeps
The Go version is saved in `Godeps.json` with the command `godep save`.
| ---
title: Go Buildpack
owner: Buildpacks
---
<strong><%= modified_date %></strong>
## <a id='buildpack'></a>Using the Go Buildpack ##
This buildpack will get used if you have any files with the `.go` extension in your repository, or you request the buildpack with
```bash
cf push my_app -b go_buildpack
```
If your Cloud Foundry deployment does not have the Go Buildpack installed, or the installed version is out of date, you can use the latest version with the command:
```bash
cf push my_app -b https://github.com/cloudfoundry/go-buildpack.git
```
When pushing go apps, you must specify a start command for the app. The start command can be placed in the file `Procfile` in your app's root directory, for example:
```
web: my-go-server
```
if the binary generated by your go project is `my-go-server`. You can also specify your app's start command in the `manifest.yml` file in the root directory, for example:
```yaml
---
application
- name: my-app-name
command: my-go-server
```
Finally, make sure that you have packaged your dependencies using the [Godep](https://github.com/tools/godep) dependency packager. Cloud Foundry requires a valid `Godeps/Godeps.json` file in the root directory for your app to deploy. For further help, please see these fixture apps for examples of valid go applications you can deploy:
* [go app](https://github.com/cloudfoundry/go-buildpack/tree/master/cf_spec/fixtures/go_app/src/go_app)
* [go app with dependencies](https://github.com/cloudfoundry/go-buildpack/tree/master/cf_spec/fixtures/go_app_with_dependencies/src/go_app_with_dependencies)
For more information about using and extending the Go buildpack in Cloud Foundry, see
the [go-buildpack GitHub repo](https://github.com/cloudfoundry/go-buildpack).
You can find current information about this buildpack on the Go buildpack
[release page](https://github.com/cloudfoundry/go-buildpack/releases) in GitHub.
### Specifying a Go version
#### with Godeps
The Go version is saved in `Godeps.json` with the command `godep save`.
| Improve documentation for the Go Buildpack | Improve documentation for the Go Buildpack
[#115740799]
- Closes cloudfoundry/go-buildpack#33
Signed-off-by: David Jahn <ea2208fe99a56ed20c9ae20b0a1446b61f13a269@gmail.com>
| HTML+ERB | apache-2.0 | cloudfoundry/docs-buildpacks,TimGerlach/docs-buildpacks | html+erb | ## Code Before:
---
title: Go Buildpack
owner: Buildpacks
---
<strong><%= modified_date %></strong>
## <a id='buildpack'></a>About the Go Buildpack ##
For information about using and extending the Go buildpack in Cloud Foundry, see
the [go-buildpack GitHub repo](https://github.com/cloudfoundry/go-buildpack).
You can find current information about this buildpack on the Go buildpack
[release page](https://github.com/cloudfoundry/go-buildpack/releases) in GitHub.
### Specifying a Go version
#### with Godeps
The Go version is saved in `Godeps.json` with the command `godep save`.
## Instruction:
Improve documentation for the Go Buildpack
[#115740799]
- Closes cloudfoundry/go-buildpack#33
Signed-off-by: David Jahn <ea2208fe99a56ed20c9ae20b0a1446b61f13a269@gmail.com>
## Code After:
---
title: Go Buildpack
owner: Buildpacks
---
<strong><%= modified_date %></strong>
## <a id='buildpack'></a>Using the Go Buildpack ##
This buildpack will get used if you have any files with the `.go` extension in your repository, or you request the buildpack with
```bash
cf push my_app -b go_buildpack
```
If your Cloud Foundry deployment does not have the Go Buildpack installed, or the installed version is out of date, you can use the latest version with the command:
```bash
cf push my_app -b https://github.com/cloudfoundry/go-buildpack.git
```
When pushing go apps, you must specify a start command for the app. The start command can be placed in the file `Procfile` in your app's root directory, for example:
```
web: my-go-server
```
if the binary generated by your go project is `my-go-server`. You can also specify your app's start command in the `manifest.yml` file in the root directory, for example:
```yaml
---
application
- name: my-app-name
command: my-go-server
```
Finally, make sure that you have packaged your dependencies using the [Godep](https://github.com/tools/godep) dependency packager. Cloud Foundry requires a valid `Godeps/Godeps.json` file in the root directory for your app to deploy. For further help, please see these fixture apps for examples of valid go applications you can deploy:
* [go app](https://github.com/cloudfoundry/go-buildpack/tree/master/cf_spec/fixtures/go_app/src/go_app)
* [go app with dependencies](https://github.com/cloudfoundry/go-buildpack/tree/master/cf_spec/fixtures/go_app_with_dependencies/src/go_app_with_dependencies)
For more information about using and extending the Go buildpack in Cloud Foundry, see
the [go-buildpack GitHub repo](https://github.com/cloudfoundry/go-buildpack).
You can find current information about this buildpack on the Go buildpack
[release page](https://github.com/cloudfoundry/go-buildpack/releases) in GitHub.
### Specifying a Go version
#### with Godeps
The Go version is saved in `Godeps.json` with the command `godep save`.
| ---
title: Go Buildpack
owner: Buildpacks
---
<strong><%= modified_date %></strong>
- ## <a id='buildpack'></a>About the Go Buildpack ##
? ^^^^^
+ ## <a id='buildpack'></a>Using the Go Buildpack ##
? ^^^^^
+ This buildpack will get used if you have any files with the `.go` extension in your repository, or you request the buildpack with
+
+ ```bash
+ cf push my_app -b go_buildpack
+ ```
+
+ If your Cloud Foundry deployment does not have the Go Buildpack installed, or the installed version is out of date, you can use the latest version with the command:
+
+ ```bash
+ cf push my_app -b https://github.com/cloudfoundry/go-buildpack.git
+ ```
+
+ When pushing go apps, you must specify a start command for the app. The start command can be placed in the file `Procfile` in your app's root directory, for example:
+
+ ```
+ web: my-go-server
+ ```
+
+ if the binary generated by your go project is `my-go-server`. You can also specify your app's start command in the `manifest.yml` file in the root directory, for example:
+
+ ```yaml
+ ---
+ application
+ - name: my-app-name
+ command: my-go-server
+ ```
+
+ Finally, make sure that you have packaged your dependencies using the [Godep](https://github.com/tools/godep) dependency packager. Cloud Foundry requires a valid `Godeps/Godeps.json` file in the root directory for your app to deploy. For further help, please see these fixture apps for examples of valid go applications you can deploy:
+
+ * [go app](https://github.com/cloudfoundry/go-buildpack/tree/master/cf_spec/fixtures/go_app/src/go_app)
+ * [go app with dependencies](https://github.com/cloudfoundry/go-buildpack/tree/master/cf_spec/fixtures/go_app_with_dependencies/src/go_app_with_dependencies)
+
+
- For information about using and extending the Go buildpack in Cloud Foundry, see
+ For more information about using and extending the Go buildpack in Cloud Foundry, see
? +++++
the [go-buildpack GitHub repo](https://github.com/cloudfoundry/go-buildpack).
You can find current information about this buildpack on the Go buildpack
[release page](https://github.com/cloudfoundry/go-buildpack/releases) in GitHub.
### Specifying a Go version
#### with Godeps
The Go version is saved in `Godeps.json` with the command `godep save`. | 37 | 1.85 | 35 | 2 |
87e63f10ac615bf2eeac5b0916ef54d11a933e0b | README.md | README.md | Concuerror
==========
Concuerror is a systematic testing tool for concurrent Erlang programs.
Copyright and License
----------------------
Copyright (c) 2011-2012,
Alkis Gotovos (<el3ctrologos@hotmail.com>),
Maria Christakis (<mchrista@softlab.ntua.gr>) and
Kostis Sagonas (<kostis@cs.ntua.gr>).
All rights reserved.
Concuerror is distributed under the Simplified BSD License.
Details can be found in the LICENSE file.
Howto
------
* Build Concuerror : `make`
* Run Concuerror : `concuerror --help`
* Run Concuerror GUI : `concuerror --gui`
* Run testsuite : `make THREADS=4 test`
* Run unit tests : `make utest`
* Dialyze : `make dialyze`
* Cleanup : `make clean`
| Attention!
----------
This is an old version of Concuerror. The actively maintained version is now hosted at https://github.com/parapluu/Concuerror.
Concuerror
==========
Concuerror is a systematic testing tool for concurrent Erlang programs.
Copyright and License
----------------------
Copyright (c) 2011-2012,
Alkis Gotovos (<el3ctrologos@hotmail.com>),
Maria Christakis (<mchrista@softlab.ntua.gr>) and
Kostis Sagonas (<kostis@cs.ntua.gr>).
All rights reserved.
Concuerror is distributed under the Simplified BSD License.
Details can be found in the LICENSE file.
Howto
------
* Build Concuerror : `make`
* Run Concuerror : `concuerror --help`
* Run Concuerror GUI : `concuerror --gui`
* Run testsuite : `make THREADS=4 test`
* Run unit tests : `make utest`
* Dialyze : `make dialyze`
* Cleanup : `make clean`
| Add notice for new repository | Add notice for new repository
| Markdown | bsd-2-clause | mariachris/Concuerror,mariachris/Concuerror | markdown | ## Code Before:
Concuerror
==========
Concuerror is a systematic testing tool for concurrent Erlang programs.
Copyright and License
----------------------
Copyright (c) 2011-2012,
Alkis Gotovos (<el3ctrologos@hotmail.com>),
Maria Christakis (<mchrista@softlab.ntua.gr>) and
Kostis Sagonas (<kostis@cs.ntua.gr>).
All rights reserved.
Concuerror is distributed under the Simplified BSD License.
Details can be found in the LICENSE file.
Howto
------
* Build Concuerror : `make`
* Run Concuerror : `concuerror --help`
* Run Concuerror GUI : `concuerror --gui`
* Run testsuite : `make THREADS=4 test`
* Run unit tests : `make utest`
* Dialyze : `make dialyze`
* Cleanup : `make clean`
## Instruction:
Add notice for new repository
## Code After:
Attention!
----------
This is an old version of Concuerror. The actively maintained version is now hosted at https://github.com/parapluu/Concuerror.
Concuerror
==========
Concuerror is a systematic testing tool for concurrent Erlang programs.
Copyright and License
----------------------
Copyright (c) 2011-2012,
Alkis Gotovos (<el3ctrologos@hotmail.com>),
Maria Christakis (<mchrista@softlab.ntua.gr>) and
Kostis Sagonas (<kostis@cs.ntua.gr>).
All rights reserved.
Concuerror is distributed under the Simplified BSD License.
Details can be found in the LICENSE file.
Howto
------
* Build Concuerror : `make`
* Run Concuerror : `concuerror --help`
* Run Concuerror GUI : `concuerror --gui`
* Run testsuite : `make THREADS=4 test`
* Run unit tests : `make utest`
* Dialyze : `make dialyze`
* Cleanup : `make clean`
| + Attention!
+ ----------
+ This is an old version of Concuerror. The actively maintained version is now hosted at https://github.com/parapluu/Concuerror.
+
Concuerror
==========
Concuerror is a systematic testing tool for concurrent Erlang programs.
Copyright and License
----------------------
Copyright (c) 2011-2012,
Alkis Gotovos (<el3ctrologos@hotmail.com>),
Maria Christakis (<mchrista@softlab.ntua.gr>) and
Kostis Sagonas (<kostis@cs.ntua.gr>).
All rights reserved.
Concuerror is distributed under the Simplified BSD License.
Details can be found in the LICENSE file.
Howto
------
* Build Concuerror : `make`
* Run Concuerror : `concuerror --help`
* Run Concuerror GUI : `concuerror --gui`
* Run testsuite : `make THREADS=4 test`
* Run unit tests : `make utest`
* Dialyze : `make dialyze`
* Cleanup : `make clean` | 4 | 0.16 | 4 | 0 |
021d49405d0f74782749aae7482c1798733558b9 | .travis.yml | .travis.yml | language: python
python:
- "3.5.2"
# - "nightly"
install:
# - pip3 install codecov pyyaml
- pip3 install pyyaml
script:
- python3 -m unittest discover
# - python3 -m doctest README.adoc
# - coverage run --source pylibofp -m test
#after_success:
# - if [ "$TRAVIS_PYTHON_VERSION" != "nightly" ]; then codecov; fi
before_install:
# Install libofp from launchpad.
- sudo add-apt-repository ppa:byllyfish/libofp-dev -y
- sudo apt-get update -qq
- sudo apt-get install libofp -y
- dpkg -L libofp
# Per https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments
sudo: required
dist: trusty
| language: python
python:
- "3.5.2"
# - "nightly"
install:
# - pip3 install codecov pyyaml
- pip3 install pyyaml
script:
- libofp version
- libofp jsonrpc --loglevel=info < /dev/null
- python3 -m unittest discover
# - python3 -m doctest README.adoc
# - coverage run --source pylibofp -m test
#after_success:
# - if [ "$TRAVIS_PYTHON_VERSION" != "nightly" ]; then codecov; fi
before_install:
# Install libofp from launchpad.
- sudo add-apt-repository ppa:byllyfish/libofp-dev -y
- sudo apt-get update -qq
- sudo apt-get install libofp -y
- dpkg -L libofp
# Per https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments
sudo: required
dist: trusty
| Check libofp version and default log settings. | Check libofp version and default log settings.
| YAML | mit | byllyfish/pylibofp,byllyfish/pylibofp | yaml | ## Code Before:
language: python
python:
- "3.5.2"
# - "nightly"
install:
# - pip3 install codecov pyyaml
- pip3 install pyyaml
script:
- python3 -m unittest discover
# - python3 -m doctest README.adoc
# - coverage run --source pylibofp -m test
#after_success:
# - if [ "$TRAVIS_PYTHON_VERSION" != "nightly" ]; then codecov; fi
before_install:
# Install libofp from launchpad.
- sudo add-apt-repository ppa:byllyfish/libofp-dev -y
- sudo apt-get update -qq
- sudo apt-get install libofp -y
- dpkg -L libofp
# Per https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments
sudo: required
dist: trusty
## Instruction:
Check libofp version and default log settings.
## Code After:
language: python
python:
- "3.5.2"
# - "nightly"
install:
# - pip3 install codecov pyyaml
- pip3 install pyyaml
script:
- libofp version
- libofp jsonrpc --loglevel=info < /dev/null
- python3 -m unittest discover
# - python3 -m doctest README.adoc
# - coverage run --source pylibofp -m test
#after_success:
# - if [ "$TRAVIS_PYTHON_VERSION" != "nightly" ]; then codecov; fi
before_install:
# Install libofp from launchpad.
- sudo add-apt-repository ppa:byllyfish/libofp-dev -y
- sudo apt-get update -qq
- sudo apt-get install libofp -y
- dpkg -L libofp
# Per https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments
sudo: required
dist: trusty
| language: python
python:
- "3.5.2"
# - "nightly"
install:
# - pip3 install codecov pyyaml
- pip3 install pyyaml
script:
+ - libofp version
+ - libofp jsonrpc --loglevel=info < /dev/null
- python3 -m unittest discover
# - python3 -m doctest README.adoc
# - coverage run --source pylibofp -m test
#after_success:
# - if [ "$TRAVIS_PYTHON_VERSION" != "nightly" ]; then codecov; fi
before_install:
# Install libofp from launchpad.
- sudo add-apt-repository ppa:byllyfish/libofp-dev -y
- sudo apt-get update -qq
- sudo apt-get install libofp -y
- dpkg -L libofp
# Per https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments
sudo: required
dist: trusty | 2 | 0.08 | 2 | 0 |
5820b643b59144d7adfc629889f6ed2f9f0071da | src/main/groovy/nebula/plugin/clojuresque/tasks/DefaultClojureSourceSet.groovy | src/main/groovy/nebula/plugin/clojuresque/tasks/DefaultClojureSourceSet.groovy | package nebula.plugin.clojuresque.tasks
import org.gradle.api.file.SourceDirectorySet
import org.gradle.api.model.ObjectFactory
class DefaultClojureSourceSet implements ClojureSourceSet {
private final SourceDirectorySet clojure
DefaultClojureSourceSet(String name, ObjectFactory objects) {
this.clojure = objects.sourceDirectorySet(name, name)
this.clojure.getFilter().include("**/*.clj", "**/*.cljs", "**/*.cljc")
}
@Override
SourceDirectorySet getClojure() {
return clojure
}
}
| package nebula.plugin.clojuresque.tasks
import org.gradle.api.file.SourceDirectorySet
import org.gradle.api.model.ObjectFactory
class DefaultClojureSourceSet implements ClojureSourceSet {
private final SourceDirectorySet clojure
DefaultClojureSourceSet(String displayName, ObjectFactory objects) {
this.clojure = objects.sourceDirectorySet("clojure", displayName + " Clojure source")
this.clojure.getFilter().include("**/*.clj", "**/*.cljs", "**/*.cljc")
}
@Override
SourceDirectorySet getClojure() {
return clojure
}
}
| Fix clojure source set name | Fix clojure source set name
| Groovy | mit | nebula-plugins/nebula-clojure-plugin | groovy | ## Code Before:
package nebula.plugin.clojuresque.tasks
import org.gradle.api.file.SourceDirectorySet
import org.gradle.api.model.ObjectFactory
class DefaultClojureSourceSet implements ClojureSourceSet {
private final SourceDirectorySet clojure
DefaultClojureSourceSet(String name, ObjectFactory objects) {
this.clojure = objects.sourceDirectorySet(name, name)
this.clojure.getFilter().include("**/*.clj", "**/*.cljs", "**/*.cljc")
}
@Override
SourceDirectorySet getClojure() {
return clojure
}
}
## Instruction:
Fix clojure source set name
## Code After:
package nebula.plugin.clojuresque.tasks
import org.gradle.api.file.SourceDirectorySet
import org.gradle.api.model.ObjectFactory
class DefaultClojureSourceSet implements ClojureSourceSet {
private final SourceDirectorySet clojure
DefaultClojureSourceSet(String displayName, ObjectFactory objects) {
this.clojure = objects.sourceDirectorySet("clojure", displayName + " Clojure source")
this.clojure.getFilter().include("**/*.clj", "**/*.cljs", "**/*.cljc")
}
@Override
SourceDirectorySet getClojure() {
return clojure
}
}
| package nebula.plugin.clojuresque.tasks
import org.gradle.api.file.SourceDirectorySet
import org.gradle.api.model.ObjectFactory
class DefaultClojureSourceSet implements ClojureSourceSet {
private final SourceDirectorySet clojure
- DefaultClojureSourceSet(String name, ObjectFactory objects) {
? ^
+ DefaultClojureSourceSet(String displayName, ObjectFactory objects) {
? ^^^^^^^^
- this.clojure = objects.sourceDirectorySet(name, name)
+ this.clojure = objects.sourceDirectorySet("clojure", displayName + " Clojure source")
this.clojure.getFilter().include("**/*.clj", "**/*.cljs", "**/*.cljc")
}
@Override
SourceDirectorySet getClojure() {
return clojure
}
} | 4 | 0.222222 | 2 | 2 |
ffc2369216770bf5dd75a2309b3bf7b15be997ed | lib/enum_set.rb | lib/enum_set.rb | require "enum_set/version"
module EnumSet
EnumError = Class.new(NameError)
def self.included(base)
base.extend ClassMethods
end
module ClassMethods
def enum_set(enums)
enums.each do |column, names|
names.map!(&:to_sym)
names_with_bits = names.each_with_index.map { |name, i| [name, 1 << i] }
define_method :"#{column}_bitfield" do
self[column] || 0
end
names_with_bits.each do |name, bit|
define_method :"#{name}?" do
(bit & send("#{column}_bitfield")) != 0
end
scope :"#{name}", -> {
where("#{column} & ? <> 0", bit)
}
end
define_method :"#{column}=" do |values|
case values
when Array
new_value = send("#{column}_bitfield")
values.each do |val|
raise EnumError.new("Unrecognized value for #{column}: #{val.inspect}") unless names.include?(val)
end
values.each do |val|
bit = names_with_bits.find { |name,_| name == val.to_sym }.last
new_value |= bit
end
when Fixnum
new_value = values
end
self[column] = new_value
send(column)
end
define_method column do
names.select { |name| send(:"#{name}?") }
end
end
end
end
end
| require "enum_set/version"
module EnumSet
EnumError = Class.new(NameError)
def self.included(base)
base.extend ClassMethods
end
module ClassMethods
def enum_set(enums)
enums.each do |column, names|
names.map!(&:to_sym)
names_with_bits = Hash[
names.each_with_index.map { |name, i| [name, 1 << i] }
]
define_method :"#{column}_bitfield" do
self[column] || 0
end
names_with_bits.each do |name, bit|
define_method :"#{name}?" do
(bit & send("#{column}_bitfield")) != 0
end
scope :"#{name}", -> {
where("#{column} & ? <> 0", bit)
}
end
define_method :"#{column}=" do |values|
case values
when Array
values.each do |val|
raise EnumError.new("Unrecognized value for #{column}: #{val.inspect}") unless names.include?(val)
end
current_value = send("#{column}_bitfield")
new_value = values.reduce(current_value) do |acc, val|
acc | names_with_bits[val.to_sym]
end
when Fixnum
new_value = values
end
self[column] = new_value
send(column)
end
define_method column do
names.select { |name| send(:"#{name}?") }
end
end
end
end
end
| Use clearer(?) `reduce` block for setter | Use clearer(?) `reduce` block for setter
| Ruby | mit | breestanwyck/enum_set | ruby | ## Code Before:
require "enum_set/version"
module EnumSet
EnumError = Class.new(NameError)
def self.included(base)
base.extend ClassMethods
end
module ClassMethods
def enum_set(enums)
enums.each do |column, names|
names.map!(&:to_sym)
names_with_bits = names.each_with_index.map { |name, i| [name, 1 << i] }
define_method :"#{column}_bitfield" do
self[column] || 0
end
names_with_bits.each do |name, bit|
define_method :"#{name}?" do
(bit & send("#{column}_bitfield")) != 0
end
scope :"#{name}", -> {
where("#{column} & ? <> 0", bit)
}
end
define_method :"#{column}=" do |values|
case values
when Array
new_value = send("#{column}_bitfield")
values.each do |val|
raise EnumError.new("Unrecognized value for #{column}: #{val.inspect}") unless names.include?(val)
end
values.each do |val|
bit = names_with_bits.find { |name,_| name == val.to_sym }.last
new_value |= bit
end
when Fixnum
new_value = values
end
self[column] = new_value
send(column)
end
define_method column do
names.select { |name| send(:"#{name}?") }
end
end
end
end
end
## Instruction:
Use clearer(?) `reduce` block for setter
## Code After:
require "enum_set/version"
module EnumSet
EnumError = Class.new(NameError)
def self.included(base)
base.extend ClassMethods
end
module ClassMethods
def enum_set(enums)
enums.each do |column, names|
names.map!(&:to_sym)
names_with_bits = Hash[
names.each_with_index.map { |name, i| [name, 1 << i] }
]
define_method :"#{column}_bitfield" do
self[column] || 0
end
names_with_bits.each do |name, bit|
define_method :"#{name}?" do
(bit & send("#{column}_bitfield")) != 0
end
scope :"#{name}", -> {
where("#{column} & ? <> 0", bit)
}
end
define_method :"#{column}=" do |values|
case values
when Array
values.each do |val|
raise EnumError.new("Unrecognized value for #{column}: #{val.inspect}") unless names.include?(val)
end
current_value = send("#{column}_bitfield")
new_value = values.reduce(current_value) do |acc, val|
acc | names_with_bits[val.to_sym]
end
when Fixnum
new_value = values
end
self[column] = new_value
send(column)
end
define_method column do
names.select { |name| send(:"#{name}?") }
end
end
end
end
end
| require "enum_set/version"
module EnumSet
EnumError = Class.new(NameError)
def self.included(base)
base.extend ClassMethods
end
module ClassMethods
def enum_set(enums)
enums.each do |column, names|
names.map!(&:to_sym)
+ names_with_bits = Hash[
- names_with_bits = names.each_with_index.map { |name, i| [name, 1 << i] }
? --------------- -
+ names.each_with_index.map { |name, i| [name, 1 << i] }
+ ]
define_method :"#{column}_bitfield" do
self[column] || 0
end
names_with_bits.each do |name, bit|
define_method :"#{name}?" do
(bit & send("#{column}_bitfield")) != 0
end
scope :"#{name}", -> {
where("#{column} & ? <> 0", bit)
}
end
define_method :"#{column}=" do |values|
case values
when Array
- new_value = send("#{column}_bitfield")
-
values.each do |val|
raise EnumError.new("Unrecognized value for #{column}: #{val.inspect}") unless names.include?(val)
end
- values.each do |val|
- bit = names_with_bits.find { |name,_| name == val.to_sym }.last
- new_value |= bit
+ current_value = send("#{column}_bitfield")
+
+ new_value = values.reduce(current_value) do |acc, val|
+ acc | names_with_bits[val.to_sym]
end
when Fixnum
new_value = values
end
self[column] = new_value
send(column)
end
define_method column do
names.select { |name| send(:"#{name}?") }
end
end
end
end
end | 13 | 0.22807 | 7 | 6 |
89e196e86d3b337ff6addb9e0ba289cbd63950d5 | netbox/extras/querysets.py | netbox/extras/querysets.py | from __future__ import unicode_literals
from django.db.models import Q, QuerySet
class ConfigContextQuerySet(QuerySet):
def get_for_object(self, obj):
"""
Return all applicable ConfigContexts for a given object. Only active ConfigContexts will be included.
"""
# `device_role` for Device; `role` for VirtualMachine
role = getattr(obj, 'device_role', None) or obj.role
return self.filter(
Q(regions=obj.site.region) | Q(regions=None),
Q(sites=obj.site) | Q(sites=None),
Q(roles=role) | Q(roles=None),
Q(tenants=obj.tenant) | Q(tenants=None),
Q(platforms=obj.platform) | Q(platforms=None),
is_active=True,
).order_by('weight', 'name')
| from __future__ import unicode_literals
from django.db.models import Q, QuerySet
class ConfigContextQuerySet(QuerySet):
def get_for_object(self, obj):
"""
Return all applicable ConfigContexts for a given object. Only active ConfigContexts will be included.
"""
# `device_role` for Device; `role` for VirtualMachine
role = getattr(obj, 'device_role', None) or obj.role
return self.filter(
Q(regions=getattr(obj.site, 'region', None)) | Q(regions=None),
Q(sites=obj.site) | Q(sites=None),
Q(roles=role) | Q(roles=None),
Q(tenants=obj.tenant) | Q(tenants=None),
Q(platforms=obj.platform) | Q(platforms=None),
is_active=True,
).order_by('weight', 'name')
| Tweak ConfigContext manager to allow for objects with a regionless site | Tweak ConfigContext manager to allow for objects with a regionless site
| Python | apache-2.0 | digitalocean/netbox,lampwins/netbox,lampwins/netbox,lampwins/netbox,digitalocean/netbox,digitalocean/netbox,lampwins/netbox,digitalocean/netbox | python | ## Code Before:
from __future__ import unicode_literals
from django.db.models import Q, QuerySet
class ConfigContextQuerySet(QuerySet):
def get_for_object(self, obj):
"""
Return all applicable ConfigContexts for a given object. Only active ConfigContexts will be included.
"""
# `device_role` for Device; `role` for VirtualMachine
role = getattr(obj, 'device_role', None) or obj.role
return self.filter(
Q(regions=obj.site.region) | Q(regions=None),
Q(sites=obj.site) | Q(sites=None),
Q(roles=role) | Q(roles=None),
Q(tenants=obj.tenant) | Q(tenants=None),
Q(platforms=obj.platform) | Q(platforms=None),
is_active=True,
).order_by('weight', 'name')
## Instruction:
Tweak ConfigContext manager to allow for objects with a regionless site
## Code After:
from __future__ import unicode_literals
from django.db.models import Q, QuerySet
class ConfigContextQuerySet(QuerySet):
def get_for_object(self, obj):
"""
Return all applicable ConfigContexts for a given object. Only active ConfigContexts will be included.
"""
# `device_role` for Device; `role` for VirtualMachine
role = getattr(obj, 'device_role', None) or obj.role
return self.filter(
Q(regions=getattr(obj.site, 'region', None)) | Q(regions=None),
Q(sites=obj.site) | Q(sites=None),
Q(roles=role) | Q(roles=None),
Q(tenants=obj.tenant) | Q(tenants=None),
Q(platforms=obj.platform) | Q(platforms=None),
is_active=True,
).order_by('weight', 'name')
| from __future__ import unicode_literals
from django.db.models import Q, QuerySet
class ConfigContextQuerySet(QuerySet):
def get_for_object(self, obj):
"""
Return all applicable ConfigContexts for a given object. Only active ConfigContexts will be included.
"""
# `device_role` for Device; `role` for VirtualMachine
role = getattr(obj, 'device_role', None) or obj.role
return self.filter(
- Q(regions=obj.site.region) | Q(regions=None),
? ^
+ Q(regions=getattr(obj.site, 'region', None)) | Q(regions=None),
? ++++++++ ^^^ ++++++++
Q(sites=obj.site) | Q(sites=None),
Q(roles=role) | Q(roles=None),
Q(tenants=obj.tenant) | Q(tenants=None),
Q(platforms=obj.platform) | Q(platforms=None),
is_active=True,
).order_by('weight', 'name') | 2 | 0.086957 | 1 | 1 |
a925e1e3efd824112fee1c7fbb056f945e2bd903 | lib/all_seeing_pi/uploader.rb | lib/all_seeing_pi/uploader.rb | require 'fog'
module AllSeeingPi
class Uploader
DIRECTORY_PREFIX = 'all-seeing-pi'
attr_reader :client
def initialize
@client = Fog::Storage.new(
provider: 'AWS',
aws_access_key_id: AllSeeingPi.config[:aws_key],
aws_secret_access_key: AllSeeingPi.config[:aws_secret]
)
end
def upload(image_path)
directories = client.directories
directory_name = fetch_or_create_directory_name(directories)
directory = directories.get(directory_name) || directories.create(key: directory_name)
filename = File.basename(image_path)
directory.files.create(key: filename, body: File.open(image_path))
end
def fetch_or_create_directory_name(directories)
directory_name = directories.map do |directory|
key = directory.key
key if key.match /all_seeing_pi/
end.compact.first
AllSeeingPi.config[:directory_name] ||= "#{DIRECTORY_PREFIX}-#{directory_id}"
end
def directory_id
Time.now.to_f.to_s.split('.').join.to_i
end
end
end
| require 'fog'
module AllSeeingPi
class Uploader
DIRECTORY_PREFIX = 'all-seeing-pi'
attr_reader :client
def initialize
@client = Fog::Storage.new(
provider: 'AWS',
aws_access_key_id: AllSeeingPi.config[:aws_key],
aws_secret_access_key: AllSeeingPi.config[:aws_secret]
)
end
def upload(image_path)
directories = client.directories
directory_name = fetch_or_create_directory_name(directories)
directory = directories.get(directory_name) || directories.create(key: directory_name)
filename = File.basename(image_path)
directory.files.create(key: filename, body: File.open(image_path))
end
def fetch_or_create_directory_name(directories)
directory_name = directories.map do |directory|
key = directory.key
key if key.match /#{DIRECTORY_PREFIX}/
end.compact.first
AllSeeingPi.config[:directory_name] ||= "#{DIRECTORY_PREFIX}-#{directory_id}"
end
def directory_id
Time.now.to_f.to_s.split('.').join.to_i
end
end
end
| Use directory prefix to find existing directory. | Use directory prefix to find existing directory.
| Ruby | mit | markmcdonald51/all_seeing_pi,amypivo/all_seeing_pi,1337807/all_seeing_pi,IAMRYO/all_seeing_pi,IAMRYO/all_seeing_pi,dopudesign/all_seeing_pi,markmcdonald51/all_seeing_pi,dopudesign/all_seeing_pi,1337807/all_seeing_pi,amypivo/all_seeing_pi | ruby | ## Code Before:
require 'fog'
module AllSeeingPi
class Uploader
DIRECTORY_PREFIX = 'all-seeing-pi'
attr_reader :client
def initialize
@client = Fog::Storage.new(
provider: 'AWS',
aws_access_key_id: AllSeeingPi.config[:aws_key],
aws_secret_access_key: AllSeeingPi.config[:aws_secret]
)
end
def upload(image_path)
directories = client.directories
directory_name = fetch_or_create_directory_name(directories)
directory = directories.get(directory_name) || directories.create(key: directory_name)
filename = File.basename(image_path)
directory.files.create(key: filename, body: File.open(image_path))
end
def fetch_or_create_directory_name(directories)
directory_name = directories.map do |directory|
key = directory.key
key if key.match /all_seeing_pi/
end.compact.first
AllSeeingPi.config[:directory_name] ||= "#{DIRECTORY_PREFIX}-#{directory_id}"
end
def directory_id
Time.now.to_f.to_s.split('.').join.to_i
end
end
end
## Instruction:
Use directory prefix to find existing directory.
## Code After:
require 'fog'
module AllSeeingPi
class Uploader
DIRECTORY_PREFIX = 'all-seeing-pi'
attr_reader :client
def initialize
@client = Fog::Storage.new(
provider: 'AWS',
aws_access_key_id: AllSeeingPi.config[:aws_key],
aws_secret_access_key: AllSeeingPi.config[:aws_secret]
)
end
def upload(image_path)
directories = client.directories
directory_name = fetch_or_create_directory_name(directories)
directory = directories.get(directory_name) || directories.create(key: directory_name)
filename = File.basename(image_path)
directory.files.create(key: filename, body: File.open(image_path))
end
def fetch_or_create_directory_name(directories)
directory_name = directories.map do |directory|
key = directory.key
key if key.match /#{DIRECTORY_PREFIX}/
end.compact.first
AllSeeingPi.config[:directory_name] ||= "#{DIRECTORY_PREFIX}-#{directory_id}"
end
def directory_id
Time.now.to_f.to_s.split('.').join.to_i
end
end
end
| require 'fog'
module AllSeeingPi
class Uploader
DIRECTORY_PREFIX = 'all-seeing-pi'
attr_reader :client
def initialize
@client = Fog::Storage.new(
provider: 'AWS',
aws_access_key_id: AllSeeingPi.config[:aws_key],
aws_secret_access_key: AllSeeingPi.config[:aws_secret]
)
end
def upload(image_path)
directories = client.directories
directory_name = fetch_or_create_directory_name(directories)
directory = directories.get(directory_name) || directories.create(key: directory_name)
filename = File.basename(image_path)
directory.files.create(key: filename, body: File.open(image_path))
end
def fetch_or_create_directory_name(directories)
directory_name = directories.map do |directory|
key = directory.key
- key if key.match /all_seeing_pi/
+ key if key.match /#{DIRECTORY_PREFIX}/
end.compact.first
AllSeeingPi.config[:directory_name] ||= "#{DIRECTORY_PREFIX}-#{directory_id}"
end
def directory_id
Time.now.to_f.to_s.split('.').join.to_i
end
end
end | 2 | 0.05 | 1 | 1 |
bc9d017e9cfc00d43b66431afd6e907eb210171a | assets/js/frontpage/events/containers/EventImageContainer.js | assets/js/frontpage/events/containers/EventImageContainer.js | import React, { Component, PropTypes } from 'react';
import EventImage from '../components/EventImage';
import CompanyPropTypes from '../proptypes/CompanyPropTypes';
import ImagePropTypes from '../proptypes/ImagePropTypes';
class EventImageContainer extends Component {
mergeImages() {
const images = [];
// Event images
if (this.props.image) {
images.push(this.props.image);
}
// Company images
for (const company of this.props.company_event) {
images.push(company.company.image);
}
return images;
}
render() {
return <EventImage {...this.props} images={this.mergeImages()} />;
}
}
EventImageContainer.propTypes = {
company_event: PropTypes.arrayOf(PropTypes.shape({
company: PropTypes.shape(CompanyPropTypes),
event: PropTypes.number,
})),
image: PropTypes.shape(ImagePropTypes),
};
export default EventImageContainer;
| import React, { Component, PropTypes } from 'react';
import EventImage from '../components/EventImage';
import CompanyPropTypes from '../proptypes/CompanyPropTypes';
import ImagePropTypes from '../proptypes/ImagePropTypes';
class EventImageContainer extends Component {
mergeImages() {
const { image, company_event } = this.props;
const eventImages = [];
// Event images
if (image) {
eventImages.push(image);
}
// Company images
const companyImages = company_event.map(company => (
company.company.image
));
return [...eventImages, ...companyImages];
}
render() {
return <EventImage {...this.props} images={this.mergeImages()} />;
}
}
EventImageContainer.propTypes = {
company_event: PropTypes.arrayOf(PropTypes.shape({
company: PropTypes.shape(CompanyPropTypes),
event: PropTypes.number,
})),
image: PropTypes.shape(ImagePropTypes),
};
export default EventImageContainer;
| Use map instead of for loop | Use map instead of for loop
| JavaScript | mit | dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4 | javascript | ## Code Before:
import React, { Component, PropTypes } from 'react';
import EventImage from '../components/EventImage';
import CompanyPropTypes from '../proptypes/CompanyPropTypes';
import ImagePropTypes from '../proptypes/ImagePropTypes';
class EventImageContainer extends Component {
mergeImages() {
const images = [];
// Event images
if (this.props.image) {
images.push(this.props.image);
}
// Company images
for (const company of this.props.company_event) {
images.push(company.company.image);
}
return images;
}
render() {
return <EventImage {...this.props} images={this.mergeImages()} />;
}
}
EventImageContainer.propTypes = {
company_event: PropTypes.arrayOf(PropTypes.shape({
company: PropTypes.shape(CompanyPropTypes),
event: PropTypes.number,
})),
image: PropTypes.shape(ImagePropTypes),
};
export default EventImageContainer;
## Instruction:
Use map instead of for loop
## Code After:
import React, { Component, PropTypes } from 'react';
import EventImage from '../components/EventImage';
import CompanyPropTypes from '../proptypes/CompanyPropTypes';
import ImagePropTypes from '../proptypes/ImagePropTypes';
class EventImageContainer extends Component {
mergeImages() {
const { image, company_event } = this.props;
const eventImages = [];
// Event images
if (image) {
eventImages.push(image);
}
// Company images
const companyImages = company_event.map(company => (
company.company.image
));
return [...eventImages, ...companyImages];
}
render() {
return <EventImage {...this.props} images={this.mergeImages()} />;
}
}
EventImageContainer.propTypes = {
company_event: PropTypes.arrayOf(PropTypes.shape({
company: PropTypes.shape(CompanyPropTypes),
event: PropTypes.number,
})),
image: PropTypes.shape(ImagePropTypes),
};
export default EventImageContainer;
| import React, { Component, PropTypes } from 'react';
import EventImage from '../components/EventImage';
import CompanyPropTypes from '../proptypes/CompanyPropTypes';
import ImagePropTypes from '../proptypes/ImagePropTypes';
class EventImageContainer extends Component {
mergeImages() {
+ const { image, company_event } = this.props;
- const images = [];
? ^
+ const eventImages = [];
? ^^^^^^
// Event images
- if (this.props.image) {
- images.push(this.props.image);
+ if (image) {
+ eventImages.push(image);
}
// Company images
- for (const company of this.props.company_event) {
+ const companyImages = company_event.map(company => (
- images.push(company.company.image);
? ------------ --
+ company.company.image
- }
- return images;
+ ));
+ return [...eventImages, ...companyImages];
}
render() {
return <EventImage {...this.props} images={this.mergeImages()} />;
}
}
EventImageContainer.propTypes = {
company_event: PropTypes.arrayOf(PropTypes.shape({
company: PropTypes.shape(CompanyPropTypes),
event: PropTypes.number,
})),
image: PropTypes.shape(ImagePropTypes),
};
export default EventImageContainer; | 15 | 0.441176 | 8 | 7 |
695873240050441b0f2ce88083fd6d0c205a53aa | configuration/data/query/suggest_project_name_flt.json | configuration/data/query/suggest_project_name_flt.json | {
"id" : "suggest_project_name_flt",
"description" : "Project name suggestions using FLT.",
"default" : {
"sys_content_type" : "jbossorg_project_info",
"sys_type" : "project_info"
},
"template" : {
"fields" : [ "sys_project", "sys_project_name" ],
"size" : 5,
"query" : {
"flt" : {
"fields" : [ "sys_project_name", "sys_project_name.ngram" ],
"like_text" : "{{query}}",
"max_query_terms" : 10,
"analyzer" : "whitespace_lowercase"
}
},
"highlight" : {
"fields" : {
"sys_project_name" : {
"fragment_size" : 1,
"number_of_fragments" : 0
},
"sys_project_name.ngram" : {
"fragment_size" : 1,
"number_of_fragments" : 0
},
"sys_project_name.edgengram" : {
"fragment_size" : 1,
"number_of_fragments" : 0
}
}
}
}
} | {
"id" : "suggest_project_name_flt",
"description" : "Project name suggestions using FLT.",
"default" : {
"sys_content_type" : "jbossorg_project_info",
"sys_type" : "project_info"
},
"template" : {
"fields" : [ "sys_project", "sys_project_name" ],
"size" : 5,
"query" : {
"fuzzy_like_this" : {
"fields" : [ "sys_project_name", "sys_project_name.ngram" ],
"like_text" : "{{query}}",
"max_query_terms" : 10,
"analyzer" : "whitespace_lowercase"
}
},
"highlight" : {
"fields" : {
"sys_project_name" : {
"fragment_size" : 1,
"number_of_fragments" : 0
},
"sys_project_name.ngram" : {
"fragment_size" : 1,
"number_of_fragments" : 0
},
"sys_project_name.edgengram" : {
"fragment_size" : 1,
"number_of_fragments" : 0
}
}
}
}
} | Use full name of query type in FLT template. | Use full name of query type in FLT template.
| JSON | apache-2.0 | searchisko/searchisko,ollyjshaw/searchisko,ollyjshaw/searchisko,searchisko/searchisko,ollyjshaw/searchisko,searchisko/searchisko | json | ## Code Before:
{
"id" : "suggest_project_name_flt",
"description" : "Project name suggestions using FLT.",
"default" : {
"sys_content_type" : "jbossorg_project_info",
"sys_type" : "project_info"
},
"template" : {
"fields" : [ "sys_project", "sys_project_name" ],
"size" : 5,
"query" : {
"flt" : {
"fields" : [ "sys_project_name", "sys_project_name.ngram" ],
"like_text" : "{{query}}",
"max_query_terms" : 10,
"analyzer" : "whitespace_lowercase"
}
},
"highlight" : {
"fields" : {
"sys_project_name" : {
"fragment_size" : 1,
"number_of_fragments" : 0
},
"sys_project_name.ngram" : {
"fragment_size" : 1,
"number_of_fragments" : 0
},
"sys_project_name.edgengram" : {
"fragment_size" : 1,
"number_of_fragments" : 0
}
}
}
}
}
## Instruction:
Use full name of query type in FLT template.
## Code After:
{
"id" : "suggest_project_name_flt",
"description" : "Project name suggestions using FLT.",
"default" : {
"sys_content_type" : "jbossorg_project_info",
"sys_type" : "project_info"
},
"template" : {
"fields" : [ "sys_project", "sys_project_name" ],
"size" : 5,
"query" : {
"fuzzy_like_this" : {
"fields" : [ "sys_project_name", "sys_project_name.ngram" ],
"like_text" : "{{query}}",
"max_query_terms" : 10,
"analyzer" : "whitespace_lowercase"
}
},
"highlight" : {
"fields" : {
"sys_project_name" : {
"fragment_size" : 1,
"number_of_fragments" : 0
},
"sys_project_name.ngram" : {
"fragment_size" : 1,
"number_of_fragments" : 0
},
"sys_project_name.edgengram" : {
"fragment_size" : 1,
"number_of_fragments" : 0
}
}
}
}
} | {
"id" : "suggest_project_name_flt",
"description" : "Project name suggestions using FLT.",
"default" : {
"sys_content_type" : "jbossorg_project_info",
"sys_type" : "project_info"
},
"template" : {
"fields" : [ "sys_project", "sys_project_name" ],
"size" : 5,
"query" : {
- "flt" : {
+ "fuzzy_like_this" : {
"fields" : [ "sys_project_name", "sys_project_name.ngram" ],
"like_text" : "{{query}}",
"max_query_terms" : 10,
"analyzer" : "whitespace_lowercase"
}
},
"highlight" : {
"fields" : {
"sys_project_name" : {
"fragment_size" : 1,
"number_of_fragments" : 0
},
"sys_project_name.ngram" : {
"fragment_size" : 1,
"number_of_fragments" : 0
},
"sys_project_name.edgengram" : {
"fragment_size" : 1,
"number_of_fragments" : 0
}
}
}
}
} | 2 | 0.055556 | 1 | 1 |
362dcc89183a16be33550833959f1cb0ad24f2a2 | ext/trusted/Cargo.toml | ext/trusted/Cargo.toml | [package]
name = "trusted"
version = "0.1.0"
authors = ["Dmitry Gritsay <dmitry@vinted.com>"]
[lib]
crate-type = ["dylib"]
[dependencies]
hyper = "0.9.10"
lazy_static = "0.2.1"
ruru = { path = "/Users/dmitry/sites/rust/ruru" }
| [package]
name = "trusted"
version = "0.1.0"
authors = ["Dmitry Gritsay <dmitry@vinted.com>"]
[lib]
crate-type = ["dylib"]
[dependencies]
hyper = "0.9.10"
lazy_static = "0.2.1"
ruru = "0.8.1"
| Update ruru version to 0.8.1 | Update ruru version to 0.8.1
| TOML | mit | d-unseductable/trusted,d-unseductable/trusted,d-unseductable/trusted | toml | ## Code Before:
[package]
name = "trusted"
version = "0.1.0"
authors = ["Dmitry Gritsay <dmitry@vinted.com>"]
[lib]
crate-type = ["dylib"]
[dependencies]
hyper = "0.9.10"
lazy_static = "0.2.1"
ruru = { path = "/Users/dmitry/sites/rust/ruru" }
## Instruction:
Update ruru version to 0.8.1
## Code After:
[package]
name = "trusted"
version = "0.1.0"
authors = ["Dmitry Gritsay <dmitry@vinted.com>"]
[lib]
crate-type = ["dylib"]
[dependencies]
hyper = "0.9.10"
lazy_static = "0.2.1"
ruru = "0.8.1"
| [package]
name = "trusted"
version = "0.1.0"
authors = ["Dmitry Gritsay <dmitry@vinted.com>"]
[lib]
crate-type = ["dylib"]
[dependencies]
hyper = "0.9.10"
lazy_static = "0.2.1"
- ruru = { path = "/Users/dmitry/sites/rust/ruru" }
+ ruru = "0.8.1" | 2 | 0.166667 | 1 | 1 |
14fee8a3cd0650f07da81981e6626cc532da72a4 | app/professions-page/professionsPage.js | app/professions-page/professionsPage.js | var ProfessionsPageController = (function(){
function ProfessionsPageController(
currentProfessions,
currentPaths,
$location
) {
this.professions = currentProfessions.getCurrentData().professions;
this.currentPaths = currentPaths;
this.$location = $location;
}
ProfessionsPageController.prototype.loadPaths = function(chosenProfession) {
this.currentPaths.setNewData(chosenProfession.educationPaths);
this.$location.path('/paths');
};
ProfessionsPageController.$inject = [
'currentProfessions',
'currentPaths',
'$location'
];
return ProfessionsPageController;
})();
function configProfessionsPageRoute($routeProvider) {
$routeProvider.when('/professions', {
templateUrl: 'professions-page/professionsPage.html',
controller: ProfessionsPageController,
controllerAs: 'professionsPage'
});
}
configProfessionsPageRoute.$inject = ['$routeProvider'];
angular.module('myApp.searchPage', ['ngRoute'])
.config(configProfessionsPageRoute);
| var ProfessionsPageController = (function(){
function ProfessionsPageController(
currentProfessions,
currentPaths,
$location
) {
this.professions = currentProfessions.getCurrentData().professions;
this.currentPaths = currentPaths;
this.currentProfessions = currentProfessions;
this.$location = $location;
}
ProfessionsPageController.prototype.loadPaths = function(chosenProfession) {
this.currentProfessions.setNewData(chosenProfession);
this.currentPaths.setNewData(chosenProfession.educationPaths);
this.$location.path('/paths');
};
ProfessionsPageController.$inject = [
'currentProfessions',
'currentPaths',
'$location'
];
return ProfessionsPageController;
})();
function configProfessionsPageRoute($routeProvider) {
$routeProvider.when('/professions', {
templateUrl: 'professions-page/professionsPage.html',
controller: ProfessionsPageController,
controllerAs: 'professionsPage'
});
}
configProfessionsPageRoute.$inject = ['$routeProvider'];
angular.module('myApp.searchPage', ['ngRoute'])
.config(configProfessionsPageRoute);
| Fix title of paths page when redirected from professions page | Fix title of paths page when redirected from professions page
| JavaScript | mit | mczernow/whats-next,mczernow/whats-next | javascript | ## Code Before:
var ProfessionsPageController = (function(){
function ProfessionsPageController(
currentProfessions,
currentPaths,
$location
) {
this.professions = currentProfessions.getCurrentData().professions;
this.currentPaths = currentPaths;
this.$location = $location;
}
ProfessionsPageController.prototype.loadPaths = function(chosenProfession) {
this.currentPaths.setNewData(chosenProfession.educationPaths);
this.$location.path('/paths');
};
ProfessionsPageController.$inject = [
'currentProfessions',
'currentPaths',
'$location'
];
return ProfessionsPageController;
})();
function configProfessionsPageRoute($routeProvider) {
$routeProvider.when('/professions', {
templateUrl: 'professions-page/professionsPage.html',
controller: ProfessionsPageController,
controllerAs: 'professionsPage'
});
}
configProfessionsPageRoute.$inject = ['$routeProvider'];
angular.module('myApp.searchPage', ['ngRoute'])
.config(configProfessionsPageRoute);
## Instruction:
Fix title of paths page when redirected from professions page
## Code After:
var ProfessionsPageController = (function(){
function ProfessionsPageController(
currentProfessions,
currentPaths,
$location
) {
this.professions = currentProfessions.getCurrentData().professions;
this.currentPaths = currentPaths;
this.currentProfessions = currentProfessions;
this.$location = $location;
}
ProfessionsPageController.prototype.loadPaths = function(chosenProfession) {
this.currentProfessions.setNewData(chosenProfession);
this.currentPaths.setNewData(chosenProfession.educationPaths);
this.$location.path('/paths');
};
ProfessionsPageController.$inject = [
'currentProfessions',
'currentPaths',
'$location'
];
return ProfessionsPageController;
})();
function configProfessionsPageRoute($routeProvider) {
$routeProvider.when('/professions', {
templateUrl: 'professions-page/professionsPage.html',
controller: ProfessionsPageController,
controllerAs: 'professionsPage'
});
}
configProfessionsPageRoute.$inject = ['$routeProvider'];
angular.module('myApp.searchPage', ['ngRoute'])
.config(configProfessionsPageRoute);
| var ProfessionsPageController = (function(){
function ProfessionsPageController(
currentProfessions,
currentPaths,
$location
) {
this.professions = currentProfessions.getCurrentData().professions;
this.currentPaths = currentPaths;
+ this.currentProfessions = currentProfessions;
this.$location = $location;
}
ProfessionsPageController.prototype.loadPaths = function(chosenProfession) {
+ this.currentProfessions.setNewData(chosenProfession);
this.currentPaths.setNewData(chosenProfession.educationPaths);
this.$location.path('/paths');
};
ProfessionsPageController.$inject = [
'currentProfessions',
'currentPaths',
'$location'
];
return ProfessionsPageController;
})();
function configProfessionsPageRoute($routeProvider) {
$routeProvider.when('/professions', {
templateUrl: 'professions-page/professionsPage.html',
controller: ProfessionsPageController,
controllerAs: 'professionsPage'
});
}
configProfessionsPageRoute.$inject = ['$routeProvider'];
angular.module('myApp.searchPage', ['ngRoute'])
.config(configProfessionsPageRoute);
| 2 | 0.055556 | 2 | 0 |
fd1acc0b0efb3dffc2da2788a59436c46d6492d4 | app/views/general/_locale_switcher.rhtml | app/views/general/_locale_switcher.rhtml | <% if FastGettext.default_available_locales.length > 1 && !params.empty? %>
<div id="user_locale_switcher" class="well btn-toolbar">
<div class="btn-group">
<% for possible_locale in FastGettext.default_available_locales %>
<% if possible_locale == I18n.locale.to_s %>
<a href="#" class="btn disabled"><%= locale_name(possible_locale) %></a>
<% else %>
<a href="<%= locale_switcher(possible_locale, params) %>" class="btn"><%= locale_name(possible_locale) %></a>
<% end %>
<% end %>
</div>
</div>
<% end %>
| <% if FastGettext.default_available_locales.length > 1 && !params.empty? %>
<div id="user_locale_switcher">
<div class="btn-group">
<% for possible_locale in FastGettext.default_available_locales %>
<% if possible_locale == I18n.locale.to_s %>
<a href="#" class="btn disabled"><%= locale_name(possible_locale) %></a>
<% else %>
<a href="<%= locale_switcher(possible_locale, params) %>" class="btn"><%= locale_name(possible_locale) %></a>
<% end %>
<% end %>
</div>
</div>
<% end %>
| Remove unwanted CSS class from locale switcher | Remove unwanted CSS class from locale switcher
| RHTML | agpl-3.0 | nzherald/alaveteli,10layer/alaveteli,obshtestvo/alaveteli-bulgaria,hasadna/alaveteli,andreicristianpetcu/alaveteli_old,andreicristianpetcu/alaveteli_old,10layer/alaveteli,Br3nda/alaveteli,nzherald/alaveteli,andreicristianpetcu/alaveteli,obshtestvo/alaveteli-bulgaria,hasadna/alaveteli,Br3nda/alaveteli,nzherald/alaveteli,obshtestvo/alaveteli-bulgaria,10layer/alaveteli,petterreinholdtsen/alaveteli,4bic/alaveteli,andreicristianpetcu/alaveteli,petterreinholdtsen/alaveteli,petterreinholdtsen/alaveteli,hasadna/alaveteli,TEDICpy/QueremoSaber,obshtestvo/alaveteli-bulgaria,sarhane/alaveteli-test,TEDICpy/QueremoSaber,codeforcroatia/alaveteli,4bic/alaveteli,petterreinholdtsen/alaveteli,4bic/alaveteli,TEDICpy/QueremoSaber,hasadna/alaveteli,Br3nda/alaveteli,TEDICpy/QueremoSaber,andreicristianpetcu/alaveteli_old,datauy/alaveteli,andreicristianpetcu/alaveteli,Br3nda/alaveteli,TEDICpy/QueremoSaber,codeforcroatia/alaveteli,andreicristianpetcu/alaveteli_old,andreicristianpetcu/alaveteli,obshtestvo/alaveteli-bulgaria,andreicristianpetcu/alaveteli_old,codeforcroatia/alaveteli,hasadna/alaveteli,4bic/alaveteli,codeforcroatia/alaveteli,datauy/alaveteli,sarhane/alaveteli-test,sarhane/alaveteli-test,datauy/alaveteli,nzherald/alaveteli,hasadna/alaveteli,petterreinholdtsen/alaveteli,nzherald/alaveteli,andreicristianpetcu/alaveteli,4bic/alaveteli,Br3nda/alaveteli,sarhane/alaveteli-test | rhtml | ## Code Before:
<% if FastGettext.default_available_locales.length > 1 && !params.empty? %>
<div id="user_locale_switcher" class="well btn-toolbar">
<div class="btn-group">
<% for possible_locale in FastGettext.default_available_locales %>
<% if possible_locale == I18n.locale.to_s %>
<a href="#" class="btn disabled"><%= locale_name(possible_locale) %></a>
<% else %>
<a href="<%= locale_switcher(possible_locale, params) %>" class="btn"><%= locale_name(possible_locale) %></a>
<% end %>
<% end %>
</div>
</div>
<% end %>
## Instruction:
Remove unwanted CSS class from locale switcher
## Code After:
<% if FastGettext.default_available_locales.length > 1 && !params.empty? %>
<div id="user_locale_switcher">
<div class="btn-group">
<% for possible_locale in FastGettext.default_available_locales %>
<% if possible_locale == I18n.locale.to_s %>
<a href="#" class="btn disabled"><%= locale_name(possible_locale) %></a>
<% else %>
<a href="<%= locale_switcher(possible_locale, params) %>" class="btn"><%= locale_name(possible_locale) %></a>
<% end %>
<% end %>
</div>
</div>
<% end %>
| <% if FastGettext.default_available_locales.length > 1 && !params.empty? %>
- <div id="user_locale_switcher" class="well btn-toolbar">
+ <div id="user_locale_switcher">
<div class="btn-group">
<% for possible_locale in FastGettext.default_available_locales %>
<% if possible_locale == I18n.locale.to_s %>
<a href="#" class="btn disabled"><%= locale_name(possible_locale) %></a>
<% else %>
<a href="<%= locale_switcher(possible_locale, params) %>" class="btn"><%= locale_name(possible_locale) %></a>
<% end %>
<% end %>
</div>
</div>
<% end %> | 2 | 0.153846 | 1 | 1 |
86ad24ec08abc55e197e891ba594a56af3194fa1 | js/entities/trash.js | js/entities/trash.js | /*globals define*/
define([
'entities/physics-entity'
], function( PhysicsEntity ) {
'use strict';
function Trash( options, lifeTime ) {
PhysicsEntity.call( this, options );
// In seconds.
this.lifeTime = lifeTime || 0;
this.time = 0;
}
Trash.prototype = new PhysicsEntity();
Trash.prototype.constructor = Trash;
Trash.prototype.update = function( dt ) {
PhysicsEntity.prototype.update.call( this, dt );
this.time += dt;
if ( this.time > this.lifeTime ) {
this.game.removed.push( this );
}
};
Trash.prototype.draw = function( ctx ) {
ctx.lineJoin = 'round';
PhysicsEntity.prototype.draw.call( this, ctx );
ctx.lineJoin = 'miter';
};
return Trash;
});
| /*jshint bitwise: false*/
/*globals define*/
define([
'entities/physics-entity',
'entities/explosion',
'config/colors',
'config/material'
], function( PhysicsEntity, Explosion, Colors, Material ) {
'use strict';
function Trash( options, lifeTime ) {
PhysicsEntity.call( this, options );
// In seconds.
this.lifeTime = lifeTime || 0;
this.time = 0;
}
Trash.prototype = new PhysicsEntity();
Trash.prototype.constructor = Trash;
Trash.prototype.update = function( dt ) {
PhysicsEntity.prototype.update.call( this, dt );
this.time += dt;
var explosion, fill;
if ( this.time > this.lifeTime ) {
this.game.removed.push( this );
if ( this.material & Material.MATTER ) {
fill = Colors.Explosion.MATTER;
} else if ( this.material & Material.ANTIMATTER ) {
fill = Colors.Explosion.ANTIMATTER;
}
if ( fill ) {
explosion = new Explosion( this.x, this.y );
explosion.fill.set( fill );
this.game.add( explosion );
}
}
};
Trash.prototype.draw = function( ctx ) {
ctx.lineJoin = 'round';
PhysicsEntity.prototype.draw.call( this, ctx );
ctx.lineJoin = 'miter';
};
return Trash;
});
| Add Trash explosions on lifeTime end. | Add Trash explosions on lifeTime end.
| JavaScript | mit | razh/game-off-2013,razh/game-off-2013 | javascript | ## Code Before:
/*globals define*/
define([
'entities/physics-entity'
], function( PhysicsEntity ) {
'use strict';
function Trash( options, lifeTime ) {
PhysicsEntity.call( this, options );
// In seconds.
this.lifeTime = lifeTime || 0;
this.time = 0;
}
Trash.prototype = new PhysicsEntity();
Trash.prototype.constructor = Trash;
Trash.prototype.update = function( dt ) {
PhysicsEntity.prototype.update.call( this, dt );
this.time += dt;
if ( this.time > this.lifeTime ) {
this.game.removed.push( this );
}
};
Trash.prototype.draw = function( ctx ) {
ctx.lineJoin = 'round';
PhysicsEntity.prototype.draw.call( this, ctx );
ctx.lineJoin = 'miter';
};
return Trash;
});
## Instruction:
Add Trash explosions on lifeTime end.
## Code After:
/*jshint bitwise: false*/
/*globals define*/
define([
'entities/physics-entity',
'entities/explosion',
'config/colors',
'config/material'
], function( PhysicsEntity, Explosion, Colors, Material ) {
'use strict';
function Trash( options, lifeTime ) {
PhysicsEntity.call( this, options );
// In seconds.
this.lifeTime = lifeTime || 0;
this.time = 0;
}
Trash.prototype = new PhysicsEntity();
Trash.prototype.constructor = Trash;
Trash.prototype.update = function( dt ) {
PhysicsEntity.prototype.update.call( this, dt );
this.time += dt;
var explosion, fill;
if ( this.time > this.lifeTime ) {
this.game.removed.push( this );
if ( this.material & Material.MATTER ) {
fill = Colors.Explosion.MATTER;
} else if ( this.material & Material.ANTIMATTER ) {
fill = Colors.Explosion.ANTIMATTER;
}
if ( fill ) {
explosion = new Explosion( this.x, this.y );
explosion.fill.set( fill );
this.game.add( explosion );
}
}
};
Trash.prototype.draw = function( ctx ) {
ctx.lineJoin = 'round';
PhysicsEntity.prototype.draw.call( this, ctx );
ctx.lineJoin = 'miter';
};
return Trash;
});
| + /*jshint bitwise: false*/
/*globals define*/
define([
- 'entities/physics-entity'
+ 'entities/physics-entity',
? +
- ], function( PhysicsEntity ) {
+ 'entities/explosion',
+ 'config/colors',
+ 'config/material'
+ ], function( PhysicsEntity, Explosion, Colors, Material ) {
'use strict';
function Trash( options, lifeTime ) {
PhysicsEntity.call( this, options );
// In seconds.
this.lifeTime = lifeTime || 0;
this.time = 0;
}
Trash.prototype = new PhysicsEntity();
Trash.prototype.constructor = Trash;
Trash.prototype.update = function( dt ) {
PhysicsEntity.prototype.update.call( this, dt );
this.time += dt;
+
+ var explosion, fill;
if ( this.time > this.lifeTime ) {
this.game.removed.push( this );
+
+ if ( this.material & Material.MATTER ) {
+ fill = Colors.Explosion.MATTER;
+ } else if ( this.material & Material.ANTIMATTER ) {
+ fill = Colors.Explosion.ANTIMATTER;
+ }
+
+ if ( fill ) {
+ explosion = new Explosion( this.x, this.y );
+ explosion.fill.set( fill );
+ this.game.add( explosion );
+ }
}
};
Trash.prototype.draw = function( ctx ) {
ctx.lineJoin = 'round';
PhysicsEntity.prototype.draw.call( this, ctx );
ctx.lineJoin = 'miter';
};
return Trash;
}); | 22 | 0.647059 | 20 | 2 |
e778a2da7938dcf565282635e395dc410ef989d6 | terraform-gce/worker/generate-certs.py | terraform-gce/worker/generate-certs.py | import os.path
import subprocess
import argparse
import shutil
cl_parser = argparse.ArgumentParser()
args = cl_parser.parse_args()
os.chdir(os.path.abspath(os.path.dirname(__file__)))
if not os.path.exists('assets/certificates'):
os.makedirs('assets/certificates')
os.chdir('assets/certificates')
print(os.listdir('.'))
with file('worker.json', 'wt') as f:
f.write("""{
"CN": "node.staging.realtimemusic.com",
"hosts": [
"127.0.0.1",
"staging-node"
],
"key": {
"algo": "rsa",
"size": 2048
},
"names": [
{
"C": "DE",
"L": "Germany",
"ST": ""
}
]
}
""")
subprocess.check_call(
'cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=ca-config.json '
'-profile=client-server worker.json | '
'cfssljson -bare worker-client', shell=True)
| import os.path
import subprocess
import argparse
import shutil
cl_parser = argparse.ArgumentParser()
args = cl_parser.parse_args()
os.chdir(os.path.abspath(os.path.dirname(__file__)))
if not os.path.exists('assets/certificates'):
os.makedirs('assets/certificates')
os.chdir('assets/certificates')
shutil.copy2(
'../../../master/assets/certificates/ca.pem', 'ca.pem'
)
shutil.copy2(
'../../../master/assets/certificates/ca-key.pem',
'ca-key.pem'
)
with file('worker.json', 'wt') as f:
f.write("""{
"CN": "node.staging.realtimemusic.com",
"hosts": [
"127.0.0.1",
"staging-node"
],
"key": {
"algo": "rsa",
"size": 2048
},
"names": [
{
"C": "DE",
"L": "Germany",
"ST": ""
}
]
}
""")
subprocess.check_call(
'cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=ca-config.json '
'-profile=client-server worker.json | '
'cfssljson -bare worker-client', shell=True)
| Copy cert auth from master | Copy cert auth from master
| Python | apache-2.0 | aknuds1/contrib,aknuds1/contrib,aknuds1/contrib,aknuds1/contrib,aknuds1/contrib,aknuds1/contrib | python | ## Code Before:
import os.path
import subprocess
import argparse
import shutil
cl_parser = argparse.ArgumentParser()
args = cl_parser.parse_args()
os.chdir(os.path.abspath(os.path.dirname(__file__)))
if not os.path.exists('assets/certificates'):
os.makedirs('assets/certificates')
os.chdir('assets/certificates')
print(os.listdir('.'))
with file('worker.json', 'wt') as f:
f.write("""{
"CN": "node.staging.realtimemusic.com",
"hosts": [
"127.0.0.1",
"staging-node"
],
"key": {
"algo": "rsa",
"size": 2048
},
"names": [
{
"C": "DE",
"L": "Germany",
"ST": ""
}
]
}
""")
subprocess.check_call(
'cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=ca-config.json '
'-profile=client-server worker.json | '
'cfssljson -bare worker-client', shell=True)
## Instruction:
Copy cert auth from master
## Code After:
import os.path
import subprocess
import argparse
import shutil
cl_parser = argparse.ArgumentParser()
args = cl_parser.parse_args()
os.chdir(os.path.abspath(os.path.dirname(__file__)))
if not os.path.exists('assets/certificates'):
os.makedirs('assets/certificates')
os.chdir('assets/certificates')
shutil.copy2(
'../../../master/assets/certificates/ca.pem', 'ca.pem'
)
shutil.copy2(
'../../../master/assets/certificates/ca-key.pem',
'ca-key.pem'
)
with file('worker.json', 'wt') as f:
f.write("""{
"CN": "node.staging.realtimemusic.com",
"hosts": [
"127.0.0.1",
"staging-node"
],
"key": {
"algo": "rsa",
"size": 2048
},
"names": [
{
"C": "DE",
"L": "Germany",
"ST": ""
}
]
}
""")
subprocess.check_call(
'cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=ca-config.json '
'-profile=client-server worker.json | '
'cfssljson -bare worker-client', shell=True)
| import os.path
import subprocess
import argparse
import shutil
cl_parser = argparse.ArgumentParser()
args = cl_parser.parse_args()
os.chdir(os.path.abspath(os.path.dirname(__file__)))
if not os.path.exists('assets/certificates'):
os.makedirs('assets/certificates')
os.chdir('assets/certificates')
- print(os.listdir('.'))
+ shutil.copy2(
+ '../../../master/assets/certificates/ca.pem', 'ca.pem'
+ )
+ shutil.copy2(
+ '../../../master/assets/certificates/ca-key.pem',
+ 'ca-key.pem'
+ )
with file('worker.json', 'wt') as f:
f.write("""{
"CN": "node.staging.realtimemusic.com",
"hosts": [
"127.0.0.1",
"staging-node"
],
"key": {
"algo": "rsa",
"size": 2048
},
"names": [
{
"C": "DE",
"L": "Germany",
"ST": ""
}
]
}
""")
subprocess.check_call(
'cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=ca-config.json '
'-profile=client-server worker.json | '
'cfssljson -bare worker-client', shell=True) | 8 | 0.190476 | 7 | 1 |
12698bf82446abc306414536454cb34bcab73cbc | README.md | README.md | A tool that I created to use some of the known methods of disabling tracking in Windows 10.
## Dependencies
* wxPython
* PyWin32
* Windows 10 (Duh)
## How to use
You can either
A. Install Python and the 2 dependencies and run the script from an elevated (admin) command prompt and select which options you'd like
B. Run the binary uploaded to the Release tab as an Administrator and select which options you'd like
## Delete Services vs Disable Services?
Selecting the "Delete" choice will completely delete the tracking services. This is the recommended choice.
Selecting "Disable" however will simply stop the services from being able to run.
#
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
| [GIF of GUI](http://i.imgur.com/AV8btDc.gifv)
A tool that I created to use some of the known methods of disabling tracking in Windows 10.
## Dependencies
* wxPython
* PyWin32
* Windows 10 (Duh)
## Methods Used
#### Telemetry
Set the "AllowTelemetry" string in "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection" to 0
#### DiagTrack Log
Clears log and disables writing to the log located in "C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger"
#### Services
* Delete: Remove both services
* Disable: Set the "Start" registry key for both services to 4 (Disabled) Located at "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\"
#### HOSTS
Append known tracking domains to the HOSTS file located in "C:\Windows\System32\drivers\etc"
## How to use
You can either
A. Install Python and the 2 dependencies and run the script from an elevated (admin) command prompt and select which options you'd like
B. Run the binary uploaded to the Release tab as an Administrator and select which options you'd like
## Delete Services vs Disable Services?
Selecting the "Delete" choice will completely delete the tracking services. This is the recommended choice.
Selecting "Disable" however will simply stop the services from being able to run.
#
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
| Add some description to methods | Add some description to methods | Markdown | mit | Dx724/DisableWinTracking | markdown | ## Code Before:
A tool that I created to use some of the known methods of disabling tracking in Windows 10.
## Dependencies
* wxPython
* PyWin32
* Windows 10 (Duh)
## How to use
You can either
A. Install Python and the 2 dependencies and run the script from an elevated (admin) command prompt and select which options you'd like
B. Run the binary uploaded to the Release tab as an Administrator and select which options you'd like
## Delete Services vs Disable Services?
Selecting the "Delete" choice will completely delete the tracking services. This is the recommended choice.
Selecting "Disable" however will simply stop the services from being able to run.
#
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
## Instruction:
Add some description to methods
## Code After:
[GIF of GUI](http://i.imgur.com/AV8btDc.gifv)
A tool that I created to use some of the known methods of disabling tracking in Windows 10.
## Dependencies
* wxPython
* PyWin32
* Windows 10 (Duh)
## Methods Used
#### Telemetry
Set the "AllowTelemetry" string in "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection" to 0
#### DiagTrack Log
Clears log and disables writing to the log located in "C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger"
#### Services
* Delete: Remove both services
* Disable: Set the "Start" registry key for both services to 4 (Disabled) Located at "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\"
#### HOSTS
Append known tracking domains to the HOSTS file located in "C:\Windows\System32\drivers\etc"
## How to use
You can either
A. Install Python and the 2 dependencies and run the script from an elevated (admin) command prompt and select which options you'd like
B. Run the binary uploaded to the Release tab as an Administrator and select which options you'd like
## Delete Services vs Disable Services?
Selecting the "Delete" choice will completely delete the tracking services. This is the recommended choice.
Selecting "Disable" however will simply stop the services from being able to run.
#
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
| + [GIF of GUI](http://i.imgur.com/AV8btDc.gifv)
A tool that I created to use some of the known methods of disabling tracking in Windows 10.
## Dependencies
* wxPython
* PyWin32
* Windows 10 (Duh)
+
+ ## Methods Used
+ #### Telemetry
+ Set the "AllowTelemetry" string in "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection" to 0
+
+ #### DiagTrack Log
+ Clears log and disables writing to the log located in "C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger"
+
+ #### Services
+ * Delete: Remove both services
+ * Disable: Set the "Start" registry key for both services to 4 (Disabled) Located at "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\"
+
+ #### HOSTS
+ Append known tracking domains to the HOSTS file located in "C:\Windows\System32\drivers\etc"
+
+
## How to use
You can either
A. Install Python and the 2 dependencies and run the script from an elevated (admin) command prompt and select which options you'd like
B. Run the binary uploaded to the Release tab as an Administrator and select which options you'd like
## Delete Services vs Disable Services?
Selecting the "Delete" choice will completely delete the tracking services. This is the recommended choice.
Selecting "Disable" however will simply stop the services from being able to run.
#
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
| 17 | 0.708333 | 17 | 0 |
a4a1f185922f644a50108857e2755ce91c974d86 | phpunit.xml | phpunit.xml | <?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="bootstrap/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
>
<testsuites>
<testsuite name="Application Test Suite">
<directory>./app/tests/</directory>
</testsuite>
</testsuites>
</phpunit> | <?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0">
<url>
<loc>http://www.irexinc.org/</loc>
<changefreq>daily</changefreq>
<priority>1.000</priority>
</url>
<url>
<loc>http://www.irexinc.org/members/</loc>
<changefreq>weekly</changefreq>
<priority>1.000</priority>
</url>
<url>
<loc>http://www.irexinc.org/calendar/</loc>
<changefreq>weekly</changefreq>
<priority>1.000</priority>
</url>
<url>
<loc>http://www.irexinc.org/by-laws/</loc>
<changefreq>yearly</changefreq>
<priority>0.2</priority>
</url>
<url>
<loc>http://www.irexinc.org/documents/</loc>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
</urlset> | Convert window tabs to unix tabs for xml files. | Convert window tabs to unix tabs for xml files.
| XML | mit | memborsky/irexinc.org,memborsky/irexinc.org,memborsky/irexinc.org | xml | ## Code Before:
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="bootstrap/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
>
<testsuites>
<testsuite name="Application Test Suite">
<directory>./app/tests/</directory>
</testsuite>
</testsuites>
</phpunit>
## Instruction:
Convert window tabs to unix tabs for xml files.
## Code After:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0">
<url>
<loc>http://www.irexinc.org/</loc>
<changefreq>daily</changefreq>
<priority>1.000</priority>
</url>
<url>
<loc>http://www.irexinc.org/members/</loc>
<changefreq>weekly</changefreq>
<priority>1.000</priority>
</url>
<url>
<loc>http://www.irexinc.org/calendar/</loc>
<changefreq>weekly</changefreq>
<priority>1.000</priority>
</url>
<url>
<loc>http://www.irexinc.org/by-laws/</loc>
<changefreq>yearly</changefreq>
<priority>0.2</priority>
</url>
<url>
<loc>http://www.irexinc.org/documents/</loc>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
</urlset> | <?xml version="1.0" encoding="UTF-8"?>
- <phpunit backupGlobals="false"
- backupStaticAttributes="false"
- bootstrap="bootstrap/autoload.php"
- colors="true"
- convertErrorsToExceptions="true"
- convertNoticesToExceptions="true"
- convertWarningsToExceptions="true"
- processIsolation="false"
- stopOnFailure="false"
- syntaxCheck="false"
- >
- <testsuites>
- <testsuite name="Application Test Suite">
- <directory>./app/tests/</directory>
- </testsuite>
- </testsuites>
- </phpunit>
+ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
+ xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0">
+
+ <url>
+ <loc>http://www.irexinc.org/</loc>
+ <changefreq>daily</changefreq>
+ <priority>1.000</priority>
+ </url>
+
+ <url>
+ <loc>http://www.irexinc.org/members/</loc>
+ <changefreq>weekly</changefreq>
+ <priority>1.000</priority>
+ </url>
+
+ <url>
+ <loc>http://www.irexinc.org/calendar/</loc>
+ <changefreq>weekly</changefreq>
+ <priority>1.000</priority>
+ </url>
+
+ <url>
+ <loc>http://www.irexinc.org/by-laws/</loc>
+ <changefreq>yearly</changefreq>
+ <priority>0.2</priority>
+ </url>
+
+ <url>
+ <loc>http://www.irexinc.org/documents/</loc>
+ <changefreq>monthly</changefreq>
+ <priority>0.5</priority>
+ </url>
+ </urlset> | 50 | 2.777778 | 33 | 17 |
5e510c03c8a80053fa6fac667067950809850d40 | app/views/users/_activity.erb | app/views/users/_activity.erb | <style>
.user-activity-info {
padding: 0.5em;
}
</style>
<div class="row mu-tab-body">
<div class="col-md-6">
<%= render partial: 'activity_indicator',
locals: {
title: t(:exercises),
stats: [{name: t(:solved_exercises_count), value: @activity.exercises.solved_count},
{name: t(:solved_exercises_percentage), value: @activity.exercises.solved_percentage}]
} %>
<%= render partial: 'activity_indicator',
locals: {
title: t(:forum),
stats: [{name: t(:messages), value: @activity.messages.count},
{name: t(:approved_messages), value: @activity.messages.approved}]
} %>
</div>
<div class="col-md-3 col-md-offset-3">
<ul class="nav nav-pills nav-stacked">
<li class="active"><a href="#">Total</a></li>
<li><a href="#">Semana 01/02</a></li>
<li><a href="#">Semana 25/01</a></li>
<li><a href="#">Semana 18/01</a></li>
<li><a href="#">Semana 11/01</a></li>
<li><a href="#">Semana 04/01</a></li>
</ul>
</div>
</div>
| <style>
.user-activity-info {
padding: 0.5em;
}
</style>
<div class="row mu-tab-body">
<div class="col-md-6">
<%= render partial: 'activity_indicator',
locals: {
title: t(:exercises),
stats: [{name: t(:solved_exercises_count), value: @activity[:exercises][:solved_count]},
{name: t(:solved_exercises_percentage), value: "#{@activity[:exercises][:solved_count] / @activity[:exercises][:count] * 100}%"}]
} %>
<%= render partial: 'activity_indicator',
locals: {
title: t(:forum),
stats: [{name: t(:messages), value: @activity[:messages][:count]},
{name: t(:approved_messages), value: @activity[:messages][:approved]}]
} %>
</div>
<div class="col-md-3 col-md-offset-3">
<ul class="nav nav-pills nav-stacked">
<li class="active"><a href="#">Total</a></li>
<li><a href="#">Semana 01/02</a></li>
<li><a href="#">Semana 25/01</a></li>
<li><a href="#">Semana 18/01</a></li>
<li><a href="#">Semana 11/01</a></li>
<li><a href="#">Semana 04/01</a></li>
</ul>
</div>
</div>
| Use real data on Activity view | Use real data on Activity view
| HTML+ERB | agpl-3.0 | mumuki/mumuki-laboratory,mumuki/mumuki-laboratory,mumuki/mumuki-laboratory,mumuki/mumuki-laboratory | html+erb | ## Code Before:
<style>
.user-activity-info {
padding: 0.5em;
}
</style>
<div class="row mu-tab-body">
<div class="col-md-6">
<%= render partial: 'activity_indicator',
locals: {
title: t(:exercises),
stats: [{name: t(:solved_exercises_count), value: @activity.exercises.solved_count},
{name: t(:solved_exercises_percentage), value: @activity.exercises.solved_percentage}]
} %>
<%= render partial: 'activity_indicator',
locals: {
title: t(:forum),
stats: [{name: t(:messages), value: @activity.messages.count},
{name: t(:approved_messages), value: @activity.messages.approved}]
} %>
</div>
<div class="col-md-3 col-md-offset-3">
<ul class="nav nav-pills nav-stacked">
<li class="active"><a href="#">Total</a></li>
<li><a href="#">Semana 01/02</a></li>
<li><a href="#">Semana 25/01</a></li>
<li><a href="#">Semana 18/01</a></li>
<li><a href="#">Semana 11/01</a></li>
<li><a href="#">Semana 04/01</a></li>
</ul>
</div>
</div>
## Instruction:
Use real data on Activity view
## Code After:
<style>
.user-activity-info {
padding: 0.5em;
}
</style>
<div class="row mu-tab-body">
<div class="col-md-6">
<%= render partial: 'activity_indicator',
locals: {
title: t(:exercises),
stats: [{name: t(:solved_exercises_count), value: @activity[:exercises][:solved_count]},
{name: t(:solved_exercises_percentage), value: "#{@activity[:exercises][:solved_count] / @activity[:exercises][:count] * 100}%"}]
} %>
<%= render partial: 'activity_indicator',
locals: {
title: t(:forum),
stats: [{name: t(:messages), value: @activity[:messages][:count]},
{name: t(:approved_messages), value: @activity[:messages][:approved]}]
} %>
</div>
<div class="col-md-3 col-md-offset-3">
<ul class="nav nav-pills nav-stacked">
<li class="active"><a href="#">Total</a></li>
<li><a href="#">Semana 01/02</a></li>
<li><a href="#">Semana 25/01</a></li>
<li><a href="#">Semana 18/01</a></li>
<li><a href="#">Semana 11/01</a></li>
<li><a href="#">Semana 04/01</a></li>
</ul>
</div>
</div>
| <style>
.user-activity-info {
padding: 0.5em;
}
</style>
<div class="row mu-tab-body">
<div class="col-md-6">
<%= render partial: 'activity_indicator',
locals: {
title: t(:exercises),
- stats: [{name: t(:solved_exercises_count), value: @activity.exercises.solved_count},
? ^ ^
+ stats: [{name: t(:solved_exercises_count), value: @activity[:exercises][:solved_count]},
? ^^ ^^^ +
- {name: t(:solved_exercises_percentage), value: @activity.exercises.solved_percentage}]
? ^ ^ ^ ^^^
+ {name: t(:solved_exercises_percentage), value: "#{@activity[:exercises][:solved_count] / @activity[:exercises][:count] * 100}%"}]
? +++ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ++ +++++++ ^^^^^^^^^^
} %>
<%= render partial: 'activity_indicator',
locals: {
title: t(:forum),
- stats: [{name: t(:messages), value: @activity.messages.count},
? ^ ^
+ stats: [{name: t(:messages), value: @activity[:messages][:count]},
? ^^ ^^^ +
- {name: t(:approved_messages), value: @activity.messages.approved}]
? ^ ^
+ {name: t(:approved_messages), value: @activity[:messages][:approved]}]
? ^^ ^^^ +
} %>
</div>
<div class="col-md-3 col-md-offset-3">
<ul class="nav nav-pills nav-stacked">
<li class="active"><a href="#">Total</a></li>
<li><a href="#">Semana 01/02</a></li>
<li><a href="#">Semana 25/01</a></li>
<li><a href="#">Semana 18/01</a></li>
<li><a href="#">Semana 11/01</a></li>
<li><a href="#">Semana 04/01</a></li>
</ul>
</div>
</div> | 8 | 0.235294 | 4 | 4 |
cc847b1946e412c7776782bd3b84be922d7c5c92 | roles/mistral/tasks/config.yml | roles/mistral/tasks/config.yml | - name: Copy Mistral config
sudo: true
copy:
src: mistral.conf
dest: /etc/mistral/mistral.conf
- name: Set mistral config values
sudo: true
ini_file:
dest=/etc/mistral/mistral.conf
section=database
option=connection
value=postgresql://mistral:{{mistral_db_password}}@{{mistral_db_server}}/{{mistral_db}}
- name: Copy Mistral log config
sudo: true
command: cp /opt/openstack/mistral/etc/wf_trace_logging.conf.sample /etc/mistral/wf_trace_logging.conf creates=/etc/mistral/wf_trace_logging.conf
- name: Change Mistral log path
sudo: true
lineinfile:
dest: /etc/mistral/wf_trace_logging.conf
regexp: '^args=\("/var/log/mistral.log'
line: 'args=("/var/log/mistral/mistral.log",)'
- name: Change Mistral trace path
sudo: true
lineinfile:
dest: /etc/mistral/wf_trace_logging.conf
regexp: '^args=\("/var/log/mistral_wf_trace.log'
line: 'args=("/var/log/mistral/mistral_wf_trace.log",)'
- name: Create init config
sudo: true
template:
src: init.j2
dest: /etc/init/mistral.conf
notify:
- restart mistral
| - name: Add Mistral config
sudo: true
template:
src: mistral.conf.j2
dest: /etc/mistral/mistral.conf
notify:
- restart mistral
- name: Copy Mistral log config
sudo: true
command: cp /opt/openstack/mistral/etc/wf_trace_logging.conf.sample /etc/mistral/wf_trace_logging.conf creates=/etc/mistral/wf_trace_logging.conf
- name: Change Mistral log path
sudo: true
lineinfile:
dest: /etc/mistral/wf_trace_logging.conf
regexp: '^args=\("/var/log/mistral.log'
line: 'args=("/var/log/mistral/mistral.log",)'
- name: Change Mistral trace path
sudo: true
lineinfile:
dest: /etc/mistral/wf_trace_logging.conf
regexp: '^args=\("/var/log/mistral_wf_trace.log'
line: 'args=("/var/log/mistral/mistral_wf_trace.log",)'
- name: Create init config
sudo: true
template:
src: init.j2
dest: /etc/init/mistral.conf
notify:
- restart mistral
| Move mistral conf template to host | Move mistral conf template to host
| YAML | apache-2.0 | StackStorm/ansible-st2,armab/ansible-st2 | yaml | ## Code Before:
- name: Copy Mistral config
sudo: true
copy:
src: mistral.conf
dest: /etc/mistral/mistral.conf
- name: Set mistral config values
sudo: true
ini_file:
dest=/etc/mistral/mistral.conf
section=database
option=connection
value=postgresql://mistral:{{mistral_db_password}}@{{mistral_db_server}}/{{mistral_db}}
- name: Copy Mistral log config
sudo: true
command: cp /opt/openstack/mistral/etc/wf_trace_logging.conf.sample /etc/mistral/wf_trace_logging.conf creates=/etc/mistral/wf_trace_logging.conf
- name: Change Mistral log path
sudo: true
lineinfile:
dest: /etc/mistral/wf_trace_logging.conf
regexp: '^args=\("/var/log/mistral.log'
line: 'args=("/var/log/mistral/mistral.log",)'
- name: Change Mistral trace path
sudo: true
lineinfile:
dest: /etc/mistral/wf_trace_logging.conf
regexp: '^args=\("/var/log/mistral_wf_trace.log'
line: 'args=("/var/log/mistral/mistral_wf_trace.log",)'
- name: Create init config
sudo: true
template:
src: init.j2
dest: /etc/init/mistral.conf
notify:
- restart mistral
## Instruction:
Move mistral conf template to host
## Code After:
- name: Add Mistral config
sudo: true
template:
src: mistral.conf.j2
dest: /etc/mistral/mistral.conf
notify:
- restart mistral
- name: Copy Mistral log config
sudo: true
command: cp /opt/openstack/mistral/etc/wf_trace_logging.conf.sample /etc/mistral/wf_trace_logging.conf creates=/etc/mistral/wf_trace_logging.conf
- name: Change Mistral log path
sudo: true
lineinfile:
dest: /etc/mistral/wf_trace_logging.conf
regexp: '^args=\("/var/log/mistral.log'
line: 'args=("/var/log/mistral/mistral.log",)'
- name: Change Mistral trace path
sudo: true
lineinfile:
dest: /etc/mistral/wf_trace_logging.conf
regexp: '^args=\("/var/log/mistral_wf_trace.log'
line: 'args=("/var/log/mistral/mistral_wf_trace.log",)'
- name: Create init config
sudo: true
template:
src: init.j2
dest: /etc/init/mistral.conf
notify:
- restart mistral
| - - name: Copy Mistral config
? ^^^^
+ - name: Add Mistral config
? ^^^
sudo: true
- copy:
+ template:
- src: mistral.conf
+ src: mistral.conf.j2
? +++
dest: /etc/mistral/mistral.conf
+ notify:
+ - restart mistral
-
- - name: Set mistral config values
- sudo: true
- ini_file:
- dest=/etc/mistral/mistral.conf
- section=database
- option=connection
- value=postgresql://mistral:{{mistral_db_password}}@{{mistral_db_server}}/{{mistral_db}}
- name: Copy Mistral log config
sudo: true
command: cp /opt/openstack/mistral/etc/wf_trace_logging.conf.sample /etc/mistral/wf_trace_logging.conf creates=/etc/mistral/wf_trace_logging.conf
- name: Change Mistral log path
sudo: true
lineinfile:
dest: /etc/mistral/wf_trace_logging.conf
regexp: '^args=\("/var/log/mistral.log'
line: 'args=("/var/log/mistral/mistral.log",)'
- name: Change Mistral trace path
sudo: true
lineinfile:
dest: /etc/mistral/wf_trace_logging.conf
regexp: '^args=\("/var/log/mistral_wf_trace.log'
line: 'args=("/var/log/mistral/mistral_wf_trace.log",)'
- name: Create init config
sudo: true
template:
src: init.j2
dest: /etc/init/mistral.conf
notify:
- restart mistral | 16 | 0.410256 | 5 | 11 |
da855247e11562e85bddd8191b990009a698c025 | example/package.json | example/package.json | {
"name": "vue-cropperjs-example",
"description": "Example project for vue-cropperjs package",
"author": {
"name": "Iftekhar Rifat",
"email": "rifat662@gmail.com",
"url": "https://github.com/Agontuk"
},
"scripts": {
"start": "webpack-dev-server --open --inline --hot"
},
"dependencies": {
"vue": ">=2.0.0",
"vue-cropperjs": "^2.1.0"
},
"devDependencies": {
"babel-core": "^6.22.1",
"babel-helper-vue-jsx-merge-props": "^2.0.2",
"babel-loader": "^6.2.10",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-vue-jsx": "^3.3.0",
"babel-plugin-vue-jsx-hot-reload": "^0.1.2",
"babel-preset-es2015": "^6.22.0",
"css-loader": "^0.26.1",
"file-loader": "^0.10.0",
"html-webpack-plugin": "^2.28.0",
"style-loader": "^0.13.1",
"webpack": "^1.13.3",
"webpack-dev-server": "^1.16.2"
}
}
| {
"name": "vue-cropperjs-example",
"description": "Example project for vue-cropperjs package",
"author": {
"name": "Iftekhar Rifat",
"email": "rifat662@gmail.com",
"url": "https://github.com/Agontuk"
},
"scripts": {
"start": "webpack-dev-server --open --inline --hot"
},
"dependencies": {
"vue": ">=2.0.0",
"vue-cropperjs": "https://github.com/Agontuk/vue-cropperjs.git#master"
},
"devDependencies": {
"babel-core": "^6.22.1",
"babel-helper-vue-jsx-merge-props": "^2.0.2",
"babel-loader": "^6.2.10",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-vue-jsx": "^3.3.0",
"babel-plugin-vue-jsx-hot-reload": "^0.1.2",
"babel-preset-es2015": "^6.22.0",
"css-loader": "^0.26.1",
"file-loader": "^0.10.0",
"html-webpack-plugin": "^2.28.0",
"style-loader": "^0.13.1",
"webpack": "^1.13.3",
"webpack-dev-server": "^1.16.2"
}
}
| Use master branch for example project | Use master branch for example project
| JSON | mit | Agontuk/vue-cropperjs,Agontuk/vue-cropperjs | json | ## Code Before:
{
"name": "vue-cropperjs-example",
"description": "Example project for vue-cropperjs package",
"author": {
"name": "Iftekhar Rifat",
"email": "rifat662@gmail.com",
"url": "https://github.com/Agontuk"
},
"scripts": {
"start": "webpack-dev-server --open --inline --hot"
},
"dependencies": {
"vue": ">=2.0.0",
"vue-cropperjs": "^2.1.0"
},
"devDependencies": {
"babel-core": "^6.22.1",
"babel-helper-vue-jsx-merge-props": "^2.0.2",
"babel-loader": "^6.2.10",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-vue-jsx": "^3.3.0",
"babel-plugin-vue-jsx-hot-reload": "^0.1.2",
"babel-preset-es2015": "^6.22.0",
"css-loader": "^0.26.1",
"file-loader": "^0.10.0",
"html-webpack-plugin": "^2.28.0",
"style-loader": "^0.13.1",
"webpack": "^1.13.3",
"webpack-dev-server": "^1.16.2"
}
}
## Instruction:
Use master branch for example project
## Code After:
{
"name": "vue-cropperjs-example",
"description": "Example project for vue-cropperjs package",
"author": {
"name": "Iftekhar Rifat",
"email": "rifat662@gmail.com",
"url": "https://github.com/Agontuk"
},
"scripts": {
"start": "webpack-dev-server --open --inline --hot"
},
"dependencies": {
"vue": ">=2.0.0",
"vue-cropperjs": "https://github.com/Agontuk/vue-cropperjs.git#master"
},
"devDependencies": {
"babel-core": "^6.22.1",
"babel-helper-vue-jsx-merge-props": "^2.0.2",
"babel-loader": "^6.2.10",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-vue-jsx": "^3.3.0",
"babel-plugin-vue-jsx-hot-reload": "^0.1.2",
"babel-preset-es2015": "^6.22.0",
"css-loader": "^0.26.1",
"file-loader": "^0.10.0",
"html-webpack-plugin": "^2.28.0",
"style-loader": "^0.13.1",
"webpack": "^1.13.3",
"webpack-dev-server": "^1.16.2"
}
}
| {
"name": "vue-cropperjs-example",
"description": "Example project for vue-cropperjs package",
"author": {
"name": "Iftekhar Rifat",
"email": "rifat662@gmail.com",
"url": "https://github.com/Agontuk"
},
"scripts": {
"start": "webpack-dev-server --open --inline --hot"
},
"dependencies": {
"vue": ">=2.0.0",
- "vue-cropperjs": "^2.1.0"
+ "vue-cropperjs": "https://github.com/Agontuk/vue-cropperjs.git#master"
},
"devDependencies": {
"babel-core": "^6.22.1",
"babel-helper-vue-jsx-merge-props": "^2.0.2",
"babel-loader": "^6.2.10",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-vue-jsx": "^3.3.0",
"babel-plugin-vue-jsx-hot-reload": "^0.1.2",
"babel-preset-es2015": "^6.22.0",
"css-loader": "^0.26.1",
"file-loader": "^0.10.0",
"html-webpack-plugin": "^2.28.0",
"style-loader": "^0.13.1",
"webpack": "^1.13.3",
"webpack-dev-server": "^1.16.2"
}
} | 2 | 0.064516 | 1 | 1 |
c69eb1876f899e66f0c305d975a1a6078fe958f3 | appveyor.yml | appveyor.yml | version: "{build}"
os: Windows Server 2012 R2
install:
- choco install atom -y
- cd %APPVEYOR_BUILD_FOLDER%
- "%LOCALAPPDATA%/atom/bin/apm clean"
- "%LOCALAPPDATA%/atom/bin/apm install"
build_script:
- cd %APPVEYOR_BUILD_FOLDER%
- "%LOCALAPPDATA%/atom/bin/apm test --path %LOCALAPPDATA%/atom/bin/atom.cmd"
test: off
deploy: off
| version: "{build}"
os: Windows Server 2012 R2
install:
- cd %APPVEYOR_BUILD_FOLDER%
- npm install
build_script:
- cd %APPVEYOR_BUILD_FOLDER%
- npm test
test: off
deploy: off
| Remove redundant atom install step | Remove redundant atom install step
| YAML | mit | NeekSandhu/event-kit,atom/event-kit | yaml | ## Code Before:
version: "{build}"
os: Windows Server 2012 R2
install:
- choco install atom -y
- cd %APPVEYOR_BUILD_FOLDER%
- "%LOCALAPPDATA%/atom/bin/apm clean"
- "%LOCALAPPDATA%/atom/bin/apm install"
build_script:
- cd %APPVEYOR_BUILD_FOLDER%
- "%LOCALAPPDATA%/atom/bin/apm test --path %LOCALAPPDATA%/atom/bin/atom.cmd"
test: off
deploy: off
## Instruction:
Remove redundant atom install step
## Code After:
version: "{build}"
os: Windows Server 2012 R2
install:
- cd %APPVEYOR_BUILD_FOLDER%
- npm install
build_script:
- cd %APPVEYOR_BUILD_FOLDER%
- npm test
test: off
deploy: off
| version: "{build}"
os: Windows Server 2012 R2
install:
- - choco install atom -y
- cd %APPVEYOR_BUILD_FOLDER%
+ - npm install
- - "%LOCALAPPDATA%/atom/bin/apm clean"
- - "%LOCALAPPDATA%/atom/bin/apm install"
build_script:
- cd %APPVEYOR_BUILD_FOLDER%
- - "%LOCALAPPDATA%/atom/bin/apm test --path %LOCALAPPDATA%/atom/bin/atom.cmd"
+ - npm test
test: off
deploy: off | 6 | 0.352941 | 2 | 4 |
33b5e210ffc32f9f7b3764e1f6f3d54e1f040783 | changes/flow.py | changes/flow.py | import logging
from plumbum import local, CommandNotFound
from changes.changelog import generate_changelog
from changes.packaging import build_package, install_package, upload_package, install_from_pypi
from changes.vcs import tag_and_push, commit_version_change
from changes.verification import run_tests
from changes.version import increment_version
log = logging.getLogger(__name__)
def perform_release(context):
"""Executes the release process."""
try:
run_tests()
if not context.skip_changelog:
generate_changelog(context)
increment_version(context)
build_package(context)
install_package(context)
upload_package(context)
install_from_pypi(context)
commit_version_change(context)
tag_and_push(context)
except:
log.exception('Error releasing')
| import logging
import click
from changes.changelog import generate_changelog
from changes.config import project_config, store_settings
from changes.packaging import build_distributions, install_package, upload_package, install_from_pypi
from changes.vcs import tag_and_push, commit_version_change, create_github_release, upload_release_distributions
from changes.verification import run_tests
from changes.version import increment_version
log = logging.getLogger(__name__)
def publish(context):
"""Publishes the project"""
commit_version_change(context)
if context.github:
# github token
project_settings = project_config(context.module_name)
if not project_settings['gh_token']:
click.echo('You need a GitHub token for changes to create a release.')
click.pause('Press [enter] to launch the GitHub "New personal access '
'token" page, to create a token for changes.')
click.launch('https://github.com/settings/tokens/new')
project_settings['gh_token'] = click.prompt('Enter your changes token')
store_settings(context.module_name, project_settings)
description = click.prompt('Describe this release')
upload_url = create_github_release(context, project_settings['gh_token'], description)
upload_release_distributions(
context,
project_settings['gh_token'],
build_distributions(context),
upload_url,
)
click.pause('Press [enter] to review and update your new release')
click.launch('{0}/releases/tag/{1}'.format(context.repo_url, context.new_version))
else:
tag_and_push(context)
def perform_release(context):
"""Executes the release process."""
try:
run_tests()
if not context.skip_changelog:
generate_changelog(context)
increment_version(context)
build_distributions(context)
install_package(context)
upload_package(context)
install_from_pypi(context)
publish(context)
except:
log.exception('Error releasing')
| Add github releases to publishing | Add github releases to publishing
| Python | mit | goldsborough/changes | python | ## Code Before:
import logging
from plumbum import local, CommandNotFound
from changes.changelog import generate_changelog
from changes.packaging import build_package, install_package, upload_package, install_from_pypi
from changes.vcs import tag_and_push, commit_version_change
from changes.verification import run_tests
from changes.version import increment_version
log = logging.getLogger(__name__)
def perform_release(context):
"""Executes the release process."""
try:
run_tests()
if not context.skip_changelog:
generate_changelog(context)
increment_version(context)
build_package(context)
install_package(context)
upload_package(context)
install_from_pypi(context)
commit_version_change(context)
tag_and_push(context)
except:
log.exception('Error releasing')
## Instruction:
Add github releases to publishing
## Code After:
import logging
import click
from changes.changelog import generate_changelog
from changes.config import project_config, store_settings
from changes.packaging import build_distributions, install_package, upload_package, install_from_pypi
from changes.vcs import tag_and_push, commit_version_change, create_github_release, upload_release_distributions
from changes.verification import run_tests
from changes.version import increment_version
log = logging.getLogger(__name__)
def publish(context):
"""Publishes the project"""
commit_version_change(context)
if context.github:
# github token
project_settings = project_config(context.module_name)
if not project_settings['gh_token']:
click.echo('You need a GitHub token for changes to create a release.')
click.pause('Press [enter] to launch the GitHub "New personal access '
'token" page, to create a token for changes.')
click.launch('https://github.com/settings/tokens/new')
project_settings['gh_token'] = click.prompt('Enter your changes token')
store_settings(context.module_name, project_settings)
description = click.prompt('Describe this release')
upload_url = create_github_release(context, project_settings['gh_token'], description)
upload_release_distributions(
context,
project_settings['gh_token'],
build_distributions(context),
upload_url,
)
click.pause('Press [enter] to review and update your new release')
click.launch('{0}/releases/tag/{1}'.format(context.repo_url, context.new_version))
else:
tag_and_push(context)
def perform_release(context):
"""Executes the release process."""
try:
run_tests()
if not context.skip_changelog:
generate_changelog(context)
increment_version(context)
build_distributions(context)
install_package(context)
upload_package(context)
install_from_pypi(context)
publish(context)
except:
log.exception('Error releasing')
| import logging
- from plumbum import local, CommandNotFound
+ import click
from changes.changelog import generate_changelog
+ from changes.config import project_config, store_settings
- from changes.packaging import build_package, install_package, upload_package, install_from_pypi
? ^^^^^^^
+ from changes.packaging import build_distributions, install_package, upload_package, install_from_pypi
? ^^^^^^^^^^^^^
- from changes.vcs import tag_and_push, commit_version_change
+ from changes.vcs import tag_and_push, commit_version_change, create_github_release, upload_release_distributions
from changes.verification import run_tests
from changes.version import increment_version
log = logging.getLogger(__name__)
+
+
+ def publish(context):
+ """Publishes the project"""
+ commit_version_change(context)
+
+ if context.github:
+ # github token
+ project_settings = project_config(context.module_name)
+ if not project_settings['gh_token']:
+ click.echo('You need a GitHub token for changes to create a release.')
+ click.pause('Press [enter] to launch the GitHub "New personal access '
+ 'token" page, to create a token for changes.')
+ click.launch('https://github.com/settings/tokens/new')
+ project_settings['gh_token'] = click.prompt('Enter your changes token')
+
+ store_settings(context.module_name, project_settings)
+ description = click.prompt('Describe this release')
+
+ upload_url = create_github_release(context, project_settings['gh_token'], description)
+
+ upload_release_distributions(
+ context,
+ project_settings['gh_token'],
+ build_distributions(context),
+ upload_url,
+ )
+
+ click.pause('Press [enter] to review and update your new release')
+ click.launch('{0}/releases/tag/{1}'.format(context.repo_url, context.new_version))
+ else:
+ tag_and_push(context)
def perform_release(context):
"""Executes the release process."""
try:
run_tests()
if not context.skip_changelog:
generate_changelog(context)
+
increment_version(context)
- build_package(context)
+ build_distributions(context)
+
install_package(context)
+
upload_package(context)
+
install_from_pypi(context)
- commit_version_change(context)
- tag_and_push(context)
? --------
+ publish(context)
? +++
except:
log.exception('Error releasing') | 48 | 1.548387 | 42 | 6 |
589f7ef9a237378f0b85f7867759d0c2de69c059 | src/main/java/com/auth0/net/Request.java | src/main/java/com/auth0/net/Request.java | package com.auth0.net;
import com.auth0.exception.APIException;
import com.auth0.exception.Auth0Exception;
import java.util.concurrent.CompletableFuture;
/**
* Class that represents an HTTP Request that can be executed.
*
* @param <T> the type of payload expected in the response after the execution.
*/
public interface Request<T> {
/**
* Executes this request synchronously.
*
* @return the response body JSON decoded as T
* @throws APIException if the request was executed but the response wasn't successful.
* @throws Auth0Exception if the request couldn't be created or executed successfully.
*/
T execute() throws Auth0Exception;
/**
* Executes this request asynchronously.
*
* @apiNote This method was added after the interface was released in version 1.0.
* It is defined as a default method for compatibility reasons.
* From version 2.0 on, the method will be abstract and all implementations of this interface
* will have to provide their own implementation.
*
* @implSpec The default implementation throws an {@linkplain UnsupportedOperationException}.
*
* @return a {@linkplain CompletableFuture} representing the specified request.
*/
default CompletableFuture<T> executeAsync() {
throw new UnsupportedOperationException("executeAsync");
}
}
| package com.auth0.net;
import com.auth0.exception.APIException;
import com.auth0.exception.Auth0Exception;
import java.util.concurrent.CompletableFuture;
/**
* Class that represents an HTTP Request that can be executed.
*
* @param <T> the type of payload expected in the response after the execution.
*/
public interface Request<T> {
/**
* Executes this request synchronously.
*
* @return the response body JSON decoded as T
* @throws APIException if the request was executed but the response wasn't successful.
* @throws Auth0Exception if the request couldn't be created or executed successfully.
*/
T execute() throws Auth0Exception;
/**
* Executes this request asynchronously.
*
* Note: This method was added after the interface was released in version 1.0.
* It is defined as a default method for compatibility reasons.
* From version 2.0 on, the method will be abstract and all implementations of this interface
* will have to provide their own implementation.
*
* The default implementation throws an {@linkplain UnsupportedOperationException}.
*
* @return a {@linkplain CompletableFuture} representing the specified request.
*/
default CompletableFuture<T> executeAsync() {
throw new UnsupportedOperationException("executeAsync");
}
}
| Fix JavaDoc tags for Java8 | Fix JavaDoc tags for Java8
| Java | mit | auth0/auth0-api-java,auth0/auth0-java | java | ## Code Before:
package com.auth0.net;
import com.auth0.exception.APIException;
import com.auth0.exception.Auth0Exception;
import java.util.concurrent.CompletableFuture;
/**
* Class that represents an HTTP Request that can be executed.
*
* @param <T> the type of payload expected in the response after the execution.
*/
public interface Request<T> {
/**
* Executes this request synchronously.
*
* @return the response body JSON decoded as T
* @throws APIException if the request was executed but the response wasn't successful.
* @throws Auth0Exception if the request couldn't be created or executed successfully.
*/
T execute() throws Auth0Exception;
/**
* Executes this request asynchronously.
*
* @apiNote This method was added after the interface was released in version 1.0.
* It is defined as a default method for compatibility reasons.
* From version 2.0 on, the method will be abstract and all implementations of this interface
* will have to provide their own implementation.
*
* @implSpec The default implementation throws an {@linkplain UnsupportedOperationException}.
*
* @return a {@linkplain CompletableFuture} representing the specified request.
*/
default CompletableFuture<T> executeAsync() {
throw new UnsupportedOperationException("executeAsync");
}
}
## Instruction:
Fix JavaDoc tags for Java8
## Code After:
package com.auth0.net;
import com.auth0.exception.APIException;
import com.auth0.exception.Auth0Exception;
import java.util.concurrent.CompletableFuture;
/**
* Class that represents an HTTP Request that can be executed.
*
* @param <T> the type of payload expected in the response after the execution.
*/
public interface Request<T> {
/**
* Executes this request synchronously.
*
* @return the response body JSON decoded as T
* @throws APIException if the request was executed but the response wasn't successful.
* @throws Auth0Exception if the request couldn't be created or executed successfully.
*/
T execute() throws Auth0Exception;
/**
* Executes this request asynchronously.
*
* Note: This method was added after the interface was released in version 1.0.
* It is defined as a default method for compatibility reasons.
* From version 2.0 on, the method will be abstract and all implementations of this interface
* will have to provide their own implementation.
*
* The default implementation throws an {@linkplain UnsupportedOperationException}.
*
* @return a {@linkplain CompletableFuture} representing the specified request.
*/
default CompletableFuture<T> executeAsync() {
throw new UnsupportedOperationException("executeAsync");
}
}
| package com.auth0.net;
import com.auth0.exception.APIException;
import com.auth0.exception.Auth0Exception;
import java.util.concurrent.CompletableFuture;
/**
* Class that represents an HTTP Request that can be executed.
*
* @param <T> the type of payload expected in the response after the execution.
*/
public interface Request<T> {
/**
* Executes this request synchronously.
*
* @return the response body JSON decoded as T
* @throws APIException if the request was executed but the response wasn't successful.
* @throws Auth0Exception if the request couldn't be created or executed successfully.
*/
T execute() throws Auth0Exception;
/**
* Executes this request asynchronously.
*
- * @apiNote This method was added after the interface was released in version 1.0.
? ----
+ * Note: This method was added after the interface was released in version 1.0.
? +
- * It is defined as a default method for compatibility reasons.
? ---------
+ * It is defined as a default method for compatibility reasons.
- * From version 2.0 on, the method will be abstract and all implementations of this interface
? ---------
+ * From version 2.0 on, the method will be abstract and all implementations of this interface
- * will have to provide their own implementation.
? ---------
+ * will have to provide their own implementation.
*
- * @implSpec The default implementation throws an {@linkplain UnsupportedOperationException}.
? ----------
+ * The default implementation throws an {@linkplain UnsupportedOperationException}.
*
* @return a {@linkplain CompletableFuture} representing the specified request.
*/
default CompletableFuture<T> executeAsync() {
throw new UnsupportedOperationException("executeAsync");
}
} | 10 | 0.25641 | 5 | 5 |
7f345e78f6825c676282114029a6c230dd063bfe | pinax/images/admin.py | pinax/images/admin.py | from django.contrib import admin
from .models import ImageSet, Image
class ImageInline(admin.TabularInline):
model = Image
fields = ["image", "preview"]
readonly_fields = ["preview"]
def preview(self, obj):
return "<img src='{}' />".format(obj.small_thumbnail.url)
preview.allow_tags = True
admin.site.register(
ImageSet,
list_display=["primary_image", "created_by", "created_at"],
raw_id_fields=["created_by"],
inlines=[ImageInline],
)
| from django.contrib import admin
from .models import ImageSet, Image
class ImageInline(admin.TabularInline):
model = Image
fields = ["image", "created_by", "preview"]
readonly_fields = ["preview"]
def preview(self, obj):
return "<img src='{}' />".format(obj.small_thumbnail.url)
preview.allow_tags = True
admin.site.register(
ImageSet,
list_display=["primary_image", "created_by", "created_at"],
raw_id_fields=["created_by"],
inlines=[ImageInline],
)
| Add "created_by" in inline fields | Add "created_by" in inline fields
Image couldn't be added via django admin, simply add "created_by" in inlines fields to make it working.
| Python | mit | arthur-wsw/pinax-images,pinax/pinax-images | python | ## Code Before:
from django.contrib import admin
from .models import ImageSet, Image
class ImageInline(admin.TabularInline):
model = Image
fields = ["image", "preview"]
readonly_fields = ["preview"]
def preview(self, obj):
return "<img src='{}' />".format(obj.small_thumbnail.url)
preview.allow_tags = True
admin.site.register(
ImageSet,
list_display=["primary_image", "created_by", "created_at"],
raw_id_fields=["created_by"],
inlines=[ImageInline],
)
## Instruction:
Add "created_by" in inline fields
Image couldn't be added via django admin, simply add "created_by" in inlines fields to make it working.
## Code After:
from django.contrib import admin
from .models import ImageSet, Image
class ImageInline(admin.TabularInline):
model = Image
fields = ["image", "created_by", "preview"]
readonly_fields = ["preview"]
def preview(self, obj):
return "<img src='{}' />".format(obj.small_thumbnail.url)
preview.allow_tags = True
admin.site.register(
ImageSet,
list_display=["primary_image", "created_by", "created_at"],
raw_id_fields=["created_by"],
inlines=[ImageInline],
)
| from django.contrib import admin
from .models import ImageSet, Image
class ImageInline(admin.TabularInline):
model = Image
- fields = ["image", "preview"]
+ fields = ["image", "created_by", "preview"]
? ++++++++++++++
readonly_fields = ["preview"]
def preview(self, obj):
return "<img src='{}' />".format(obj.small_thumbnail.url)
preview.allow_tags = True
admin.site.register(
ImageSet,
list_display=["primary_image", "created_by", "created_at"],
raw_id_fields=["created_by"],
inlines=[ImageInline],
) | 2 | 0.095238 | 1 | 1 |
cb269a3784efb16e2f6f0b69acab824848d064c9 | app/views/sessions/new.html.erb | app/views/sessions/new.html.erb |
<div class = "inner">
<ul class='errors'></ul>
<!-- ADD REMOTE TRUE TO FORM BELOW TO AJAXIFY! -->
<%= form_for :session, url: sessions_path do |f| %>
<%= f.email_field :email, placeholder: "Email" %>
<%= f.password_field :password, placeholder: "Password" %>
<div>
<%= f.submit "Log In" %>
</div>
<% end %>
</div>
|
<div className="row">
<div className="col-sm-1" />
<div className="col-sm-10">
<div>
<div className="panel panel-default">
<div className="panel-heading">
<h3 className="panel-title">
Login
</h3>
</div>
<div className="panel-body">
<ul class='errors'></ul>
<%= form_for :session, url: sessions_path, class: "col-sm-10 form-signin" do |f| %>
<%= f.email_field :email, placeholder: "Email", required:"", autofocus:"", class:"form-control" %>
<%= f.password_field :password, placeholder: "Password", class:"form-control", required:"" %>
<div>
<%= f.submit "Log In", class:"btn btn-lg btn-primary btn-block" %>
</div>
<% end %>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-1"></div>
</div>
| Add bootstrap divs to login form | Add bootstrap divs to login form
| HTML+ERB | mit | danmckeon/crconnect,danmckeon/crconnect,danmckeon/crconnect | html+erb | ## Code Before:
<div class = "inner">
<ul class='errors'></ul>
<!-- ADD REMOTE TRUE TO FORM BELOW TO AJAXIFY! -->
<%= form_for :session, url: sessions_path do |f| %>
<%= f.email_field :email, placeholder: "Email" %>
<%= f.password_field :password, placeholder: "Password" %>
<div>
<%= f.submit "Log In" %>
</div>
<% end %>
</div>
## Instruction:
Add bootstrap divs to login form
## Code After:
<div className="row">
<div className="col-sm-1" />
<div className="col-sm-10">
<div>
<div className="panel panel-default">
<div className="panel-heading">
<h3 className="panel-title">
Login
</h3>
</div>
<div className="panel-body">
<ul class='errors'></ul>
<%= form_for :session, url: sessions_path, class: "col-sm-10 form-signin" do |f| %>
<%= f.email_field :email, placeholder: "Email", required:"", autofocus:"", class:"form-control" %>
<%= f.password_field :password, placeholder: "Password", class:"form-control", required:"" %>
<div>
<%= f.submit "Log In", class:"btn btn-lg btn-primary btn-block" %>
</div>
<% end %>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-1"></div>
</div>
|
+ <div className="row">
+ <div className="col-sm-1" />
+ <div className="col-sm-10">
- <div class = "inner">
- <ul class='errors'></ul>
- <!-- ADD REMOTE TRUE TO FORM BELOW TO AJAXIFY! -->
- <%= form_for :session, url: sessions_path do |f| %>
- <%= f.email_field :email, placeholder: "Email" %>
- <%= f.password_field :password, placeholder: "Password" %>
<div>
- <%= f.submit "Log In" %>
+ <div className="panel panel-default">
+ <div className="panel-heading">
+ <h3 className="panel-title">
+ Login
+ </h3>
- </div>
+ </div>
? ++
+ <div className="panel-body">
+ <ul class='errors'></ul>
+ <%= form_for :session, url: sessions_path, class: "col-sm-10 form-signin" do |f| %>
+ <%= f.email_field :email, placeholder: "Email", required:"", autofocus:"", class:"form-control" %>
+ <%= f.password_field :password, placeholder: "Password", class:"form-control", required:"" %>
+ <div>
+ <%= f.submit "Log In", class:"btn btn-lg btn-primary btn-block" %>
+ </div>
- <% end %>
+ <% end %>
? ++
</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="col-sm-1"></div>
+ </div> | 33 | 2.75 | 24 | 9 |
12b528651f408d144e46edaff4dba8b5c5f95b9f | daemon/platform/windows/process_helper.rs | daemon/platform/windows/process_helper.rs | use anyhow::{bail, Result};
use std::process::{Child, Command};
use crate::task_handler::ProcessAction;
use log::info;
pub fn compile_shell_command(command_string: &str) -> Command {
// Chain two `powershell` commands, one that sets the output encoding to utf8 and then the user provided one.
let mut command = Command::new("powershell");
command.arg("-c").arg(format!(
"[Console]::OutputEncoding = [Text.UTF8Encoding]::UTF8; {}",
command_string
));
command
}
/// Send a signal to a windows process.
pub fn send_signal_to_child(
_child: &Child,
_action: &ProcessAction,
_children: bool,
) -> Result<bool> {
bail!("not supported on windows.")
}
/// Kill a child process
pub fn kill_child(task_id: usize, child: &mut Child, _kill_children: bool) -> bool {
match child.kill() {
Err(_) => {
info!("Task {} has already finished by itself", task_id);
false
}
Ok(_) => true,
}
}
| use anyhow::{bail, Result};
use std::process::{Child, Command};
use crate::task_handler::ProcessAction;
use log::info;
pub fn compile_shell_command(command_string: &str) -> Command {
// Chain two `powershell` commands, one that sets the output encoding to utf8 and then the user provided one.
let mut command = Command::new("powershell");
command.arg("-c").arg(format!(
"[Console]::OutputEncoding = [Text.UTF8Encoding]::UTF8; {}",
command_string
));
command
}
/// Send a signal to a windows process.
pub fn send_signal_to_child(
_child: &Child,
action: &ProcessAction,
_children: bool,
) -> Result<bool> {
match action {
ProcessAction::Pause => bail!("Pause is not yet supported on windows."),
ProcessAction::Resume => bail!("Resume is not yet supported on windows."),
ProcessAction::Kill => bail!("Kill is not yet supported on windows."),
}
}
/// Kill a child process
pub fn kill_child(task_id: usize, child: &mut Child, _kill_children: bool) -> bool {
match child.kill() {
Err(_) => {
info!("Task {} has already finished by itself", task_id);
false
}
Ok(_) => true,
}
}
| Use ProcessAction in Windows handler for clippy | Use ProcessAction in Windows handler for clippy
| Rust | mit | Nukesor/Pueue,Nukesor/Pueuew | rust | ## Code Before:
use anyhow::{bail, Result};
use std::process::{Child, Command};
use crate::task_handler::ProcessAction;
use log::info;
pub fn compile_shell_command(command_string: &str) -> Command {
// Chain two `powershell` commands, one that sets the output encoding to utf8 and then the user provided one.
let mut command = Command::new("powershell");
command.arg("-c").arg(format!(
"[Console]::OutputEncoding = [Text.UTF8Encoding]::UTF8; {}",
command_string
));
command
}
/// Send a signal to a windows process.
pub fn send_signal_to_child(
_child: &Child,
_action: &ProcessAction,
_children: bool,
) -> Result<bool> {
bail!("not supported on windows.")
}
/// Kill a child process
pub fn kill_child(task_id: usize, child: &mut Child, _kill_children: bool) -> bool {
match child.kill() {
Err(_) => {
info!("Task {} has already finished by itself", task_id);
false
}
Ok(_) => true,
}
}
## Instruction:
Use ProcessAction in Windows handler for clippy
## Code After:
use anyhow::{bail, Result};
use std::process::{Child, Command};
use crate::task_handler::ProcessAction;
use log::info;
pub fn compile_shell_command(command_string: &str) -> Command {
// Chain two `powershell` commands, one that sets the output encoding to utf8 and then the user provided one.
let mut command = Command::new("powershell");
command.arg("-c").arg(format!(
"[Console]::OutputEncoding = [Text.UTF8Encoding]::UTF8; {}",
command_string
));
command
}
/// Send a signal to a windows process.
pub fn send_signal_to_child(
_child: &Child,
action: &ProcessAction,
_children: bool,
) -> Result<bool> {
match action {
ProcessAction::Pause => bail!("Pause is not yet supported on windows."),
ProcessAction::Resume => bail!("Resume is not yet supported on windows."),
ProcessAction::Kill => bail!("Kill is not yet supported on windows."),
}
}
/// Kill a child process
pub fn kill_child(task_id: usize, child: &mut Child, _kill_children: bool) -> bool {
match child.kill() {
Err(_) => {
info!("Task {} has already finished by itself", task_id);
false
}
Ok(_) => true,
}
}
| use anyhow::{bail, Result};
use std::process::{Child, Command};
use crate::task_handler::ProcessAction;
use log::info;
pub fn compile_shell_command(command_string: &str) -> Command {
// Chain two `powershell` commands, one that sets the output encoding to utf8 and then the user provided one.
let mut command = Command::new("powershell");
command.arg("-c").arg(format!(
"[Console]::OutputEncoding = [Text.UTF8Encoding]::UTF8; {}",
command_string
));
command
}
/// Send a signal to a windows process.
pub fn send_signal_to_child(
_child: &Child,
- _action: &ProcessAction,
? -
+ action: &ProcessAction,
_children: bool,
) -> Result<bool> {
- bail!("not supported on windows.")
+ match action {
+ ProcessAction::Pause => bail!("Pause is not yet supported on windows."),
+ ProcessAction::Resume => bail!("Resume is not yet supported on windows."),
+ ProcessAction::Kill => bail!("Kill is not yet supported on windows."),
+ }
}
/// Kill a child process
pub fn kill_child(task_id: usize, child: &mut Child, _kill_children: bool) -> bool {
match child.kill() {
Err(_) => {
info!("Task {} has already finished by itself", task_id);
false
}
Ok(_) => true,
}
} | 8 | 0.222222 | 6 | 2 |
a6c3ea1a2dbaf794c2765dc559ad088d334c569f | packages/universal-cookie-express/src/index.ts | packages/universal-cookie-express/src/index.ts | // @ts-ignore
import Cookies, { CookieChangeOptions } from 'universal-cookie';
export default function universalCookieMiddleware() {
return function(req: any, res: any, next: () => void) {
req.universalCookies = new Cookies(req.headers.cookie || '');
req.universalCookies.addEventListener((change: CookieChangeOptions) => {
if (!res.cookie || res.headersSent) {
return;
}
if (change.value === undefined) {
res.clearCookie(change.name, change.options);
} else {
const expressOpt = Object.assign({}, change.options);
if (expressOpt.maxAge) {
// the standard for maxAge is seconds but express uses milliseconds
expressOpt.maxAge = change.options.maxAge * 1000;
}
res.cookie(change.name, change.value, expressOpt);
}
});
next();
};
}
| // @ts-ignore
import Cookies, { CookieChangeOptions } from 'universal-cookie';
export default function universalCookieMiddleware() {
return function(req: any, res: any, next: () => void) {
req.universalCookies = new Cookies(req.headers.cookie || '');
req.universalCookies.addEventListener((change: CookieChangeOptions) => {
if (!res.cookie || res.headersSent) {
return;
}
if (change.value === undefined) {
res.clearCookie(change.name, change.options);
} else {
const expressOpt = Object.assign({}, change.options);
if (expressOpt.maxAge && change.options && change.options.maxAge) {
// the standard for maxAge is seconds but express uses milliseconds
expressOpt.maxAge = change.options.maxAge * 1000;
}
res.cookie(change.name, change.value, expressOpt);
}
});
next();
};
}
| Add missing nullcheck for maxAge on express middleware | Add missing nullcheck for maxAge on express middleware
| TypeScript | mit | reactivestack/cookies,eXon/react-cookie,reactivestack/cookies,reactivestack/cookies | typescript | ## Code Before:
// @ts-ignore
import Cookies, { CookieChangeOptions } from 'universal-cookie';
export default function universalCookieMiddleware() {
return function(req: any, res: any, next: () => void) {
req.universalCookies = new Cookies(req.headers.cookie || '');
req.universalCookies.addEventListener((change: CookieChangeOptions) => {
if (!res.cookie || res.headersSent) {
return;
}
if (change.value === undefined) {
res.clearCookie(change.name, change.options);
} else {
const expressOpt = Object.assign({}, change.options);
if (expressOpt.maxAge) {
// the standard for maxAge is seconds but express uses milliseconds
expressOpt.maxAge = change.options.maxAge * 1000;
}
res.cookie(change.name, change.value, expressOpt);
}
});
next();
};
}
## Instruction:
Add missing nullcheck for maxAge on express middleware
## Code After:
// @ts-ignore
import Cookies, { CookieChangeOptions } from 'universal-cookie';
export default function universalCookieMiddleware() {
return function(req: any, res: any, next: () => void) {
req.universalCookies = new Cookies(req.headers.cookie || '');
req.universalCookies.addEventListener((change: CookieChangeOptions) => {
if (!res.cookie || res.headersSent) {
return;
}
if (change.value === undefined) {
res.clearCookie(change.name, change.options);
} else {
const expressOpt = Object.assign({}, change.options);
if (expressOpt.maxAge && change.options && change.options.maxAge) {
// the standard for maxAge is seconds but express uses milliseconds
expressOpt.maxAge = change.options.maxAge * 1000;
}
res.cookie(change.name, change.value, expressOpt);
}
});
next();
};
}
| // @ts-ignore
import Cookies, { CookieChangeOptions } from 'universal-cookie';
export default function universalCookieMiddleware() {
return function(req: any, res: any, next: () => void) {
req.universalCookies = new Cookies(req.headers.cookie || '');
req.universalCookies.addEventListener((change: CookieChangeOptions) => {
if (!res.cookie || res.headersSent) {
return;
}
if (change.value === undefined) {
res.clearCookie(change.name, change.options);
} else {
const expressOpt = Object.assign({}, change.options);
- if (expressOpt.maxAge) {
+ if (expressOpt.maxAge && change.options && change.options.maxAge) {
// the standard for maxAge is seconds but express uses milliseconds
expressOpt.maxAge = change.options.maxAge * 1000;
}
res.cookie(change.name, change.value, expressOpt);
}
});
next();
};
} | 2 | 0.074074 | 1 | 1 |
c9d2652f6f1e5af4c4976ff8e61aeeb1fbe10b5a | integration-test/src/main/resources/testsuites/e2e/azure-longrunning-e2e-tests.yaml | integration-test/src/main/resources/testsuites/e2e/azure-longrunning-e2e-tests.yaml | name: "azure-longrunning-e2e-tests"
tests:
- name: "azure-longrunning-e2e-tests"
classes:
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.sdx.SdxUpgradeTests
# TODO: re-enable if stabilized
# - name: com.sequenceiq.it.cloudbreak.testcase.e2e.sdx.SdxRecoveryTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.environment.EnvironmentStopStartTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.distrox.DistroXUpgradeTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.freeipa.FreeIpaUpgradeTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.distrox.ephemeral.DistroXStopStartTest
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.distrox.ephemeral.DistroXRepairTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.distrox.ephemeral.DistroXUpgradeTests | name: "azure-longrunning-e2e-tests"
tests:
- name: "azure-longrunning-e2e-tests"
classes:
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.sdx.SdxUpgradeTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.sdx.SdxRecoveryTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.environment.EnvironmentStopStartTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.distrox.DistroXUpgradeTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.freeipa.FreeIpaUpgradeTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.distrox.ephemeral.DistroXStopStartTest
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.distrox.ephemeral.DistroXRepairTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.distrox.ephemeral.DistroXUpgradeTests | Revert "CB-15109 - [e2e] AZURE SDX upgrade recovery test failure" | Revert "CB-15109 - [e2e] AZURE SDX upgrade recovery test failure"
As the fix for E2E test (https://github.com/hortonworks/cloudbreak/pull/11815/commits/c972e293c9e5128882605399073c24432e66e3f3) is merged to master
it can be re-enabled.
This reverts commit 82640202e726793bd8069fca27bc82a63dab541d.
| YAML | apache-2.0 | hortonworks/cloudbreak,hortonworks/cloudbreak,hortonworks/cloudbreak,hortonworks/cloudbreak,hortonworks/cloudbreak,hortonworks/cloudbreak | yaml | ## Code Before:
name: "azure-longrunning-e2e-tests"
tests:
- name: "azure-longrunning-e2e-tests"
classes:
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.sdx.SdxUpgradeTests
# TODO: re-enable if stabilized
# - name: com.sequenceiq.it.cloudbreak.testcase.e2e.sdx.SdxRecoveryTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.environment.EnvironmentStopStartTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.distrox.DistroXUpgradeTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.freeipa.FreeIpaUpgradeTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.distrox.ephemeral.DistroXStopStartTest
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.distrox.ephemeral.DistroXRepairTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.distrox.ephemeral.DistroXUpgradeTests
## Instruction:
Revert "CB-15109 - [e2e] AZURE SDX upgrade recovery test failure"
As the fix for E2E test (https://github.com/hortonworks/cloudbreak/pull/11815/commits/c972e293c9e5128882605399073c24432e66e3f3) is merged to master
it can be re-enabled.
This reverts commit 82640202e726793bd8069fca27bc82a63dab541d.
## Code After:
name: "azure-longrunning-e2e-tests"
tests:
- name: "azure-longrunning-e2e-tests"
classes:
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.sdx.SdxUpgradeTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.sdx.SdxRecoveryTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.environment.EnvironmentStopStartTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.distrox.DistroXUpgradeTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.freeipa.FreeIpaUpgradeTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.distrox.ephemeral.DistroXStopStartTest
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.distrox.ephemeral.DistroXRepairTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.distrox.ephemeral.DistroXUpgradeTests | name: "azure-longrunning-e2e-tests"
tests:
- name: "azure-longrunning-e2e-tests"
classes:
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.sdx.SdxUpgradeTests
- # TODO: re-enable if stabilized
- # - name: com.sequenceiq.it.cloudbreak.testcase.e2e.sdx.SdxRecoveryTests
? -
+ - name: com.sequenceiq.it.cloudbreak.testcase.e2e.sdx.SdxRecoveryTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.environment.EnvironmentStopStartTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.distrox.DistroXUpgradeTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.freeipa.FreeIpaUpgradeTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.distrox.ephemeral.DistroXStopStartTest
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.distrox.ephemeral.DistroXRepairTests
- name: com.sequenceiq.it.cloudbreak.testcase.e2e.distrox.ephemeral.DistroXUpgradeTests | 3 | 0.230769 | 1 | 2 |
1220579de21062312c49d18204fb7be8fb4971dd | README.md | README.md | adminbootstraptheme
===================
A theme for the Alaveteli admin interface that uses Twitter's
Bootstrap project to prettify it. It depends on (and is the default
admin theme for) Alaveteli verion 0.6 or above.
If you want to work on the CSS, you'll want to use
[bootstrap-sass](https://github.com/thomas-mcdonald/bootstrap-sass). Do something like:
$ gem install bootstrap-sass
$ gem install compass
$ compass compile --config .compass/config.rb
The javascript is included in a funky way
[for reasons explained in this commit](https://github.com/sebbacon/adminbootstraptheme/commit/45a73d53fc9e8f0b728933ff58764bd8d0612dab).
To change it, edit the coffeescript at
`lib/view/general/admin.coffee`, and then do something like:
$ coffee -o /tmp/ -c lib/views/general/admin.coffee
$ mv /tmp/admin.js lib/views/general/admin_js.erb
| adminbootstraptheme
===================
A theme for the Alaveteli admin interface that uses Twitter's
Bootstrap project to prettify it. It depends on (and is the default
admin theme for) Alaveteli verion 0.6 or above.
If you want to work on the CSS, you'll want to use
[bootstrap-sass](https://github.com/thomas-mcdonald/bootstrap-sass). Do something like:
$ gem install bootstrap-sass
$ gem install compass
$ compass compile --config .compass/config.rb
The javascript is included in a funky way
[for reasons explained in this commit](https://github.com/sebbacon/adminbootstraptheme/commit/45a73d53fc9e8f0b728933ff58764bd8d0612dab).
To change it, edit the coffeescript at
`lib/view/general/admin.coffee`, and then do something like:
$ coffee -o /tmp/ -c lib/views/general/admin.coffee
$ mv /tmp/admin.js lib/views/general/admin_js.erb
See
[tags](https://github.com/mysociety/adminbootstraptheme/tags) for the correct version of the code to use with your version of Alaveteli.
| Add note about Alaveteli release tags. | Add note about Alaveteli release tags.
| Markdown | mit | sebbacon/adminbootstraptheme,sebbacon/adminbootstraptheme,mysociety/adminbootstraptheme,mysociety/adminbootstraptheme | markdown | ## Code Before:
adminbootstraptheme
===================
A theme for the Alaveteli admin interface that uses Twitter's
Bootstrap project to prettify it. It depends on (and is the default
admin theme for) Alaveteli verion 0.6 or above.
If you want to work on the CSS, you'll want to use
[bootstrap-sass](https://github.com/thomas-mcdonald/bootstrap-sass). Do something like:
$ gem install bootstrap-sass
$ gem install compass
$ compass compile --config .compass/config.rb
The javascript is included in a funky way
[for reasons explained in this commit](https://github.com/sebbacon/adminbootstraptheme/commit/45a73d53fc9e8f0b728933ff58764bd8d0612dab).
To change it, edit the coffeescript at
`lib/view/general/admin.coffee`, and then do something like:
$ coffee -o /tmp/ -c lib/views/general/admin.coffee
$ mv /tmp/admin.js lib/views/general/admin_js.erb
## Instruction:
Add note about Alaveteli release tags.
## Code After:
adminbootstraptheme
===================
A theme for the Alaveteli admin interface that uses Twitter's
Bootstrap project to prettify it. It depends on (and is the default
admin theme for) Alaveteli verion 0.6 or above.
If you want to work on the CSS, you'll want to use
[bootstrap-sass](https://github.com/thomas-mcdonald/bootstrap-sass). Do something like:
$ gem install bootstrap-sass
$ gem install compass
$ compass compile --config .compass/config.rb
The javascript is included in a funky way
[for reasons explained in this commit](https://github.com/sebbacon/adminbootstraptheme/commit/45a73d53fc9e8f0b728933ff58764bd8d0612dab).
To change it, edit the coffeescript at
`lib/view/general/admin.coffee`, and then do something like:
$ coffee -o /tmp/ -c lib/views/general/admin.coffee
$ mv /tmp/admin.js lib/views/general/admin_js.erb
See
[tags](https://github.com/mysociety/adminbootstraptheme/tags) for the correct version of the code to use with your version of Alaveteli.
| adminbootstraptheme
===================
A theme for the Alaveteli admin interface that uses Twitter's
Bootstrap project to prettify it. It depends on (and is the default
admin theme for) Alaveteli verion 0.6 or above.
If you want to work on the CSS, you'll want to use
[bootstrap-sass](https://github.com/thomas-mcdonald/bootstrap-sass). Do something like:
$ gem install bootstrap-sass
$ gem install compass
$ compass compile --config .compass/config.rb
The javascript is included in a funky way
[for reasons explained in this commit](https://github.com/sebbacon/adminbootstraptheme/commit/45a73d53fc9e8f0b728933ff58764bd8d0612dab).
To change it, edit the coffeescript at
`lib/view/general/admin.coffee`, and then do something like:
$ coffee -o /tmp/ -c lib/views/general/admin.coffee
$ mv /tmp/admin.js lib/views/general/admin_js.erb
+
+ See
+ [tags](https://github.com/mysociety/adminbootstraptheme/tags) for the correct version of the code to use with your version of Alaveteli.
| 3 | 0.130435 | 3 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.