-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
93 additions
and
547 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
open_corporates: open_corporates_id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ | |
end | ||
|
||
def tab_list | ||
%i[wikirate_company details] | ||
%i[details wikirate_company] | ||
end | ||
|
||
view :details_tab do | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
event :clear_corporate_identifier_caches, :integrate do | ||
%w[NAMES EXCERPTS].each do |suffix| | ||
Card.cache.delete "CORPORATE-IDENTIFIER-#{suffix}" | ||
end | ||
end | ||
|
||
class << self | ||
def cards | ||
Card.search type: :corporate_identifier, sort: :name | ||
end | ||
|
||
def names | ||
Card.cache.fetch "CORPORATE-IDENTIFIER-NAMES" do | ||
cards.map do |ident| | ||
Type::WikirateCompany::Structure.corporate_identifier_accessor ident.codename | ||
ident.name | ||
end | ||
end | ||
end | ||
|
||
def excerpts | ||
Card.cache.fetch "CORPORATE-IDENTIFIER-EXCERPTS" do | ||
names.select do |name| | ||
excerpt? name.card.codename | ||
end | ||
end | ||
end | ||
|
||
def non_excerpts | ||
names - excerpts | ||
end | ||
|
||
private | ||
|
||
def excerpt? codename | ||
return unless codename | ||
|
||
fldmod = TypePlusRight::WikirateCompany.const_get_if_defined codename.to_s.camelcase | ||
fldmod&.include? Abstract::CompanyExcerpt | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters