billet 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/main.yml +18 -0
  3. data/.gitignore +11 -0
  4. data/.rspec +3 -0
  5. data/.rubocop.yml +10 -0
  6. data/CODE_OF_CONDUCT.md +84 -0
  7. data/Gemfile +10 -0
  8. data/Gemfile.lock +55 -0
  9. data/README.md +39 -0
  10. data/Rakefile +12 -0
  11. data/billet.gemspec +34 -0
  12. data/bin/console +15 -0
  13. data/bin/rspec +29 -0
  14. data/lib/billet/version.rb +5 -0
  15. data/lib/billet.rb +8 -0
  16. data/lib/generators/billet/namespace/USAGE +8 -0
  17. data/lib/generators/billet/namespace/namespace_generator.rb +165 -0
  18. data/lib/generators/billet/namespace/templates/Gemfile.erb +15 -0
  19. data/lib/generators/billet/namespace/templates/abilities/ability.rb.erb +14 -0
  20. data/lib/generators/billet/namespace/templates/assets/css.js.erb +4 -0
  21. data/lib/generators/billet/namespace/templates/assets/css.scss.erb +5 -0
  22. data/lib/generators/billet/namespace/templates/assets/js.js.erb +1 -0
  23. data/lib/generators/billet/namespace/templates/config/api_routes.rb.erb +13 -0
  24. data/lib/generators/billet/namespace/templates/config/locales/activerecord.yml.erb +12 -0
  25. data/lib/generators/billet/namespace/templates/config/locales/defaults.yml.erb +215 -0
  26. data/lib/generators/billet/namespace/templates/config/locales/module_name.yml.erb +5 -0
  27. data/lib/generators/billet/namespace/templates/config/locales/views.yml.erb +24 -0
  28. data/lib/generators/billet/namespace/templates/config/routes.rb.erb +3 -0
  29. data/lib/generators/billet/namespace/templates/controller_concerns/.keep +0 -0
  30. data/lib/generators/billet/namespace/templates/controller_concerns/api_current_identity.rb.erb +69 -0
  31. data/lib/generators/billet/namespace/templates/controller_concerns/current_identity.rb.erb +75 -0
  32. data/lib/generators/billet/namespace/templates/controllers/api_controllers/authorizations_controller.rb.erb +25 -0
  33. data/lib/generators/billet/namespace/templates/controllers/api_controllers/ping_controller.rb.erb +12 -0
  34. data/lib/generators/billet/namespace/templates/controllers/api_controllers/profiles_controller.rb.erb +14 -0
  35. data/lib/generators/billet/namespace/templates/controllers/api_controllers/projects_controller.rb.erb +35 -0
  36. data/lib/generators/billet/namespace/templates/controllers/api_controllers/user_identities_controller.rb.erb +14 -0
  37. data/lib/generators/billet/namespace/templates/controllers/crud_controllers/application_controller.rb.erb +93 -0
  38. data/lib/generators/billet/namespace/templates/controllers/crud_controllers/controller.rb.erb +1 -0
  39. data/lib/generators/billet/namespace/templates/controllers/crud_controllers/home_controller.rb.erb +11 -0
  40. data/lib/generators/billet/namespace/templates/drappers/application_drapper.rb.erb +25 -0
  41. data/lib/generators/billet/namespace/templates/drappers/concerns/display_name_glipper.rb.erb +32 -0
  42. data/lib/generators/billet/namespace/templates/drappers/concerns/timestamp_glipper.rb.erb +21 -0
  43. data/lib/generators/billet/namespace/templates/drappers/concerns/type_glipper.rb.erb +9 -0
  44. data/lib/generators/billet/namespace/templates/drappers/user_drapper.rb.erb +10 -0
  45. data/lib/generators/billet/namespace/templates/gemspec.erb +19 -0
  46. data/lib/generators/billet/namespace/templates/helpers/application_helper.rb.erb +27 -0
  47. data/lib/generators/billet/namespace/templates/lib/engine.rb.erb +13 -0
  48. data/lib/generators/billet/namespace/templates/lib/module.rb.erb +4 -0
  49. data/lib/generators/billet/namespace/templates/lib/version.rb.erb +3 -0
  50. data/lib/generators/billet/namespace/templates/views/api_views/application/index.json.jbuilder +6 -0
  51. data/lib/generators/billet/namespace/templates/views/api_views/application/show.json.jbuilder +1 -0
  52. data/lib/generators/billet/namespace/templates/views/api_views/authorizations/create.json.jbuilder +1 -0
  53. data/lib/generators/billet/namespace/templates/views/api_views/authorizations/failure.json.jbuilder +1 -0
  54. data/lib/generators/billet/namespace/templates/views/api_views/authorizations/index.json.jbuilder +4 -0
  55. data/lib/generators/billet/namespace/templates/views/api_views/ping/index.json.jbuilder +15 -0
  56. data/lib/generators/billet/namespace/templates/views/api_views/ping/secured.json.jbuilder +1 -0
  57. data/lib/generators/billet/namespace/templates/views/api_views/profiles/_detailed.json.jbuilder +6 -0
  58. data/lib/generators/billet/namespace/templates/views/api_views/projects/_show.json.jbuilder +6 -0
  59. data/lib/generators/billet/namespace/templates/views/api_views/user_identities/_short.json.jbuilder +6 -0
  60. data/lib/generators/billet/namespace/templates/views/crud_views/application/_analytics.html.haml +9 -0
  61. data/lib/generators/billet/namespace/templates/views/crud_views/application/_button_add.html.haml +2 -0
  62. data/lib/generators/billet/namespace/templates/views/crud_views/application/_button_destroy.html.haml +2 -0
  63. data/lib/generators/billet/namespace/templates/views/crud_views/application/_button_edit.html.haml +2 -0
  64. data/lib/generators/billet/namespace/templates/views/crud_views/application/_button_index.html.haml +2 -0
  65. data/lib/generators/billet/namespace/templates/views/crud_views/application/_button_show.html.haml +3 -0
  66. data/lib/generators/billet/namespace/templates/views/crud_views/application/_buttons_edit.html.haml +3 -0
  67. data/lib/generators/billet/namespace/templates/views/crud_views/application/_buttons_index.html.haml +2 -0
  68. data/lib/generators/billet/namespace/templates/views/crud_views/application/_buttons_new.html.haml +2 -0
  69. data/lib/generators/billet/namespace/templates/views/crud_views/application/_buttons_show.html.haml +3 -0
  70. data/lib/generators/billet/namespace/templates/views/crud_views/application/_container.html.haml +4 -0
  71. data/lib/generators/billet/namespace/templates/views/crud_views/application/_favicon.html.haml +15 -0
  72. data/lib/generators/billet/namespace/templates/views/crud_views/application/_flash.html.haml +4 -0
  73. data/lib/generators/billet/namespace/templates/views/crud_views/application/_footer.html.haml +4 -0
  74. data/lib/generators/billet/namespace/templates/views/crud_views/application/_form.html.haml +5 -0
  75. data/lib/generators/billet/namespace/templates/views/crud_views/application/_form_fields.html.haml +2 -0
  76. data/lib/generators/billet/namespace/templates/views/crud_views/application/_header.html.haml +11 -0
  77. data/lib/generators/billet/namespace/templates/views/crud_views/application/_header_edit.html.haml +2 -0
  78. data/lib/generators/billet/namespace/templates/views/crud_views/application/_header_index.html.haml +2 -0
  79. data/lib/generators/billet/namespace/templates/views/crud_views/application/_header_new.html.haml +2 -0
  80. data/lib/generators/billet/namespace/templates/views/crud_views/application/_header_show.html.haml +2 -0
  81. data/lib/generators/billet/namespace/templates/views/crud_views/application/_logo.html.haml +1 -0
  82. data/lib/generators/billet/namespace/templates/views/crud_views/application/_metas.html.haml +13 -0
  83. data/lib/generators/billet/namespace/templates/views/crud_views/application/_names.html.haml +7 -0
  84. data/lib/generators/billet/namespace/templates/views/crud_views/application/_primary_menu.html.haml +0 -0
  85. data/lib/generators/billet/namespace/templates/views/crud_views/application/_row.html.haml +2 -0
  86. data/lib/generators/billet/namespace/templates/views/crud_views/application/_row_header.html.haml +2 -0
  87. data/lib/generators/billet/namespace/templates/views/crud_views/application/_secondary_menu.html.haml +5 -0
  88. data/lib/generators/billet/namespace/templates/views/crud_views/application/_show.html.haml +14 -0
  89. data/lib/generators/billet/namespace/templates/views/crud_views/application/_states.html.haml +9 -0
  90. data/lib/generators/billet/namespace/templates/views/crud_views/application/edit.html.haml +5 -0
  91. data/lib/generators/billet/namespace/templates/views/crud_views/application/index.html.haml +16 -0
  92. data/lib/generators/billet/namespace/templates/views/crud_views/application/new.html.haml +5 -0
  93. data/lib/generators/billet/namespace/templates/views/crud_views/application/show.html.haml +5 -0
  94. data/lib/generators/billet/namespace/templates/views/crud_views/home/index.html.haml.erb +1 -0
  95. data/lib/generators/billet/namespace/templates/views/crud_views/layouts/application.html.haml.erb +23 -0
  96. metadata +139 -0
@@ -0,0 +1,9 @@
1
+ module <%= class_name %>
2
+ module TypeGlipper
3
+
4
+ def display_type
5
+ content_tag :span, t("##{o.class.to_s.underscore}", lookup: 'types'), class: 'object-type label label-info'
6
+ end
7
+
8
+ end
9
+ end
@@ -0,0 +1,10 @@
1
+ module <%= class_name %>
2
+ class UserDrapper < ApplicationDrapper
3
+ decorates User
4
+
5
+ def blank_display_name_assumptions
6
+ %w{full_name nickname name email_name slug}
7
+ end
8
+
9
+ end
10
+ end
@@ -0,0 +1,19 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+
3
+ # Maintain your gem's version:
4
+ require "<%= singular_name %>/version"
5
+
6
+ # Describe your gem and declare its dependencies:
7
+ Gem::Specification.new do |s|
8
+ s.name = "<%= singular_name %>"
9
+ s.version = <%= class_name %>::VERSION
10
+ s.authors = <%= `git log -10 --format='%aN' | sort -u`.strip.split(?\n).inspect %>
11
+ s.email = <%= `git log -10 --format='%cE' | sort -u`.strip.split(?\n).inspect %>
12
+ s.homepage = "http://<%= singular_name %>.dev"
13
+ s.summary = ""
14
+ s.description = ""
15
+
16
+ s.files = Dir["{app,config,db,lib}/**/*", "Rakefile", "README.rdoc"]
17
+
18
+ s.add_dependency "rails", "~> <%= Rails::VERSION::STRING %>", '>= <%= Rails::VERSION::MAJOR %>.<%= Rails::VERSION::MINOR %>'
19
+ end
@@ -0,0 +1,27 @@
1
+ module <%= class_name %>
2
+ module ApplicationHelper
3
+ extend ActiveSupport::Concern
4
+
5
+ included do
6
+ include AttributeHelper
7
+ include BooleanHelper
8
+ include DatalinkHelper
9
+ include ErbHelper
10
+ include FlashHelper
11
+ include GlipperHelper
12
+ include HtmlDomHelper
13
+ include I18nHelper
14
+ include NumberToPercentageHelper
15
+ include SentenceHelper
16
+ include TimeFormatHelper
17
+ include TitleHelper
18
+ end
19
+
20
+ protected
21
+
22
+ def glip(resource)
23
+ ::<%= class_name %>::ApplicationDrapper.decorate(resource, self)
24
+ end
25
+
26
+ end
27
+ end
@@ -0,0 +1,13 @@
1
+ module <%= class_name %>
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace <%= class_name %>
4
+
5
+ config.view_paths = [<%= class_name %>::Engine.root.join('app', 'views', '<%= singular_name %>')]
6
+
7
+ config.eager_load_paths += [<%= class_name %>::Engine.root.join('app', 'drappers')]
8
+ config.eager_load_paths += [<%= class_name %>::Engine.root.join('app', 'drappers', 'concerns')]
9
+
10
+ config.i18n.load_path += Dir[<%= class_name %>::Engine.root.join('config', 'locales', '**', '*.yml')]
11
+ config.i18n.load_path += Dir[<%= class_name %>::Engine.root.join('config', 'locales', '**', '*.rb')]
12
+ end
13
+ end
@@ -0,0 +1,4 @@
1
+ require "<%= singular_name %>/engine"
2
+
3
+ module <%= class_name %>
4
+ end
@@ -0,0 +1,3 @@
1
+ module <%= class_name %>
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,6 @@
1
+ json.data collection, partial: partial_name(resource_class, 'short'), as: :resource
2
+
3
+ json.links({})
4
+ json.links do
5
+ json.next api_url(url_for([resource_class, page: collection.next_page, only_path: false]), :get) if next_page?
6
+ end
@@ -0,0 +1 @@
1
+ json.partial! partial_name(resource_class, 'detailed'), resource: resource
@@ -0,0 +1 @@
1
+ json.error "Can't autorize application"
@@ -0,0 +1,4 @@
1
+ json.array! OmniAuth::Builder.providers do |provider|
2
+ json.name provider
3
+ json.url url_for([:provider, provider])
4
+ end
@@ -0,0 +1,15 @@
1
+ json.answer "pong"
2
+
3
+ if signed_in?
4
+ json.secured "pong"
5
+
6
+ json.links do
7
+ json.profile api_url(:profile, :get)
8
+ json.companies api_url(:companies, :get)
9
+ json.projects api_url(:projects, :get)
10
+ end
11
+ else
12
+ json.links do
13
+ json.authrizations api_url(:authorizations, :get)
14
+ end
15
+ end
@@ -0,0 +1,6 @@
1
+ json.uid resource.id
2
+ json.companies resource.companies, partial: partial_name(Company, 'short'), as: :resource
3
+
4
+ json.links do
5
+ json.update api_url(:profile, :patch)
6
+ end
@@ -0,0 +1,6 @@
1
+ json.name resource.name
2
+
3
+ json.links do
4
+ json.show api_url(resource, :get)
5
+ json.update api_url(:profile, :patch)
6
+ end
@@ -0,0 +1,6 @@
1
+ json.name resource.provider
2
+ json.url url_for([:provider, resource.provider.to_sym])
3
+
4
+ json.links do
5
+ json.destroy api_url(resource, :delete)
6
+ end
@@ -0,0 +1,9 @@
1
+ - if ENV['GOOGLE_ANALYTICS']
2
+ :javascript
3
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
4
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
5
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
6
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
7
+
8
+ ga('create', '#{ENV['GOOGLE_ANALYTICS']}', 'auto');
9
+ ga('send', 'pageview');
@@ -0,0 +1,2 @@
1
+ - if can? :create, resource_class
2
+ = link_to th('#new.button'), new_resource_url, class: "btn btn-default"
@@ -0,0 +1,2 @@
1
+ - if can? :destroy, resource
2
+ = link_to th('#destroy.button'), [resource], method: :delete, class: 'btn btn-danger', data: { confirm: th('#destroy.confirm') }
@@ -0,0 +1,2 @@
1
+ - if can? :edit, resource
2
+ = link_to th('#edit.button'), [:edit, resource], class: 'btn btn-default'
@@ -0,0 +1,2 @@
1
+ - if can? :view, resource_class
2
+ = link_to th('#index.button'), collection_url, class: 'btn btn-default'
@@ -0,0 +1,3 @@
1
+ - if can? :read, resource
2
+ = link_to [resource], class: 'btn btn-default btn-sm' do
3
+ = th('#show.button')
@@ -0,0 +1,3 @@
1
+ .pull-right.btn-group
2
+ = render 'button_index', resource_class: resource_class
3
+ = render 'button_destroy', resource: resource
@@ -0,0 +1,2 @@
1
+ .pull-right.btn-group
2
+ = render 'button_add', resource_class: resource_class
@@ -0,0 +1,2 @@
1
+ .pull-right.btn-group
2
+ = render 'button_index', resource_class: resource_class
@@ -0,0 +1,3 @@
1
+ .pull-right.btn-group
2
+ = render 'button_index', resource_class: resource_class
3
+ = render 'button_edit', resource: resource
@@ -0,0 +1,4 @@
1
+ %section#content
2
+ .container.container-center
3
+ = render 'flash'
4
+ = yield
@@ -0,0 +1,15 @@
1
+ %link{ rel: "apple-touch-icon", sizes: "57x57", href: "/apple-touch-icon-57x57.png" }/
2
+ %link{ rel: "apple-touch-icon", sizes: "114x114", href: "/apple-touch-icon-114x114.png" }/
3
+ %link{ rel: "apple-touch-icon", sizes: "72x72", href: "/apple-touch-icon-72x72.png" }/
4
+ %link{ rel: "apple-touch-icon", sizes: "144x144", href: "/apple-touch-icon-144x144.png" }/
5
+ %link{ rel: "apple-touch-icon", sizes: "60x60", href: "/apple-touch-icon-60x60.png" }/
6
+ %link{ rel: "apple-touch-icon", sizes: "120x120", href: "/apple-touch-icon-120x120.png" }/
7
+ %link{ rel: "apple-touch-icon", sizes: "76x76", href: "/apple-touch-icon-76x76.png" }/
8
+ %link{ rel: "apple-touch-icon", sizes: "152x152", href: "/apple-touch-icon-152x152.png" }/
9
+ %link{ rel: "icon", type: "image/png", href: "/favicon-196x196.png", sizes: "196x196" }/
10
+ %link{ rel: "icon", type: "image/png", href: "/favicon-160x160.png", sizes: "160x160" }/
11
+ %link{ rel: "icon", type: "image/png", href: "/favicon-96x96.png", sizes: "96x96" }/
12
+ %link{ rel: "icon", type: "image/png", href: "/favicon-16x16.png", sizes: "16x16" }/
13
+ %link{ rel: "icon", type: "image/png", href: "/favicon-32x32.png", sizes: "32x32" }/
14
+ %meta{ name: "msapplication-TileColor", content: "#ffc40d" }/
15
+ %meta{ name: "msapplication-TileImage", content: "/mstile-144x144.png" }/
@@ -0,0 +1,4 @@
1
+ - flash.each do |key, msg|
2
+ .alert.alert-dismissable{ class: "alert-#{flash_styleclass[key]}" }
3
+ = flash_button_tag
4
+ = msg
@@ -0,0 +1,4 @@
1
+ %footer.navbar.navbar-default.navbar-static-bottom{role: "navigation"}
2
+ .container-fluid
3
+ .container.container-center
4
+ .navbar-text= th '#copyright', year: Date.current.year, link: link_to(Settings.application.name, main_app.root_url)
@@ -0,0 +1,5 @@
1
+ = simple_form_for resource do |f|
2
+ = render 'form_fields', f: f
3
+ .btn-group
4
+ = f.submit class: 'btn btn-success'
5
+ = link_to th('#cancel'), resource.persisted? ? [resource] : collection_url, class: 'btn btn-default'
@@ -0,0 +1,2 @@
1
+ - resource_class.attributes_for_form.each do |attribute_name|
2
+ = f.input attribute_name
@@ -0,0 +1,11 @@
1
+ %header.navbar.navbar-default.navbar-static-top{role: "navigation"}
2
+ .container.container-center
3
+ %button.navbar-toggle{"data-target" => "#main-menu", "data-toggle" => "collapse", type: "button"}
4
+ %span.sr-only Toggle navigation
5
+ %span.icon-bar
6
+ %span.icon-bar
7
+ %span.icon-bar
8
+ .navbar-header
9
+ = render 'logo'
10
+ = render 'primary_menu'
11
+ = render 'secondary_menu'
@@ -0,0 +1,2 @@
1
+ %h1
2
+ %span=th "#edit.header", display_name: display_name(resource)
@@ -0,0 +1,2 @@
1
+ %h1
2
+ %span=th "#new.header", display_name: display_name(resource)
@@ -0,0 +1,2 @@
1
+ %h1
2
+ %span=th "#show.header", id: resource.id
@@ -0,0 +1 @@
1
+ = link_to Settings.application.name, [:root], class: 'navbar-brand'
@@ -0,0 +1,13 @@
1
+ %meta{content: "text/html;charset=UTF-8", "http-equiv" => "content-type"}/
2
+ %meta{content: "en", "http-equiv" => "Content-Language"}/
3
+ %meta{content: "no", "http-equiv" => "imagetoolbar"}/
4
+ %meta{content: "width = device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable = no", name: "viewport"}/
5
+ %meta{content: "black-translucent", name: "apple-mobile-web-app-status-bar-style"}/
6
+ %meta{content: "True", name: "HandheldFriendly"}/
7
+ %meta{content: "on", "http-equiv" => "cleartype"}/
8
+ %meta{content: "yes", name: "apple-mobile-web-app-capable"}/
9
+ %meta{content: "IE=edge,chrome=1", "http-equiv" => "X-UA-Compatible"}/
10
+ %meta{content: "progid:DXImageTransform.Microsoft.Fade(Duration=0.2)", "http-equiv" => "Page-Exit"}/
11
+ %meta{content: "width=device-width,initial-scale=1", name: "viewport"}/
12
+ %meta{content: "all", name: "robots"}/
13
+ %link{href: "/startup.png", rel: "apple-touch-startup-image"}/
@@ -0,0 +1,7 @@
1
+ sdgdsfgdsf
2
+ - if collection.any?
3
+ %ul.nav.nav-pills
4
+ - collection.each do |resource|
5
+ %li= display_link_to resource
6
+ - else
7
+ %i=th "#no_items"
@@ -0,0 +1,2 @@
1
+ %tr{ data: datalink_if(can?(:read, resource), url_for([resource])) }
2
+ %td= display_link_to resource
@@ -0,0 +1,5 @@
1
+ %ul.nav.navbar-nav.pull-right
2
+ -# - if signed_in?
3
+ -# %li= link_to th("#sign_out.button"), auth_out_path
4
+ -# - else
5
+ -# %li= link_to th("#sign_in.button"), auth_in_path
@@ -0,0 +1,14 @@
1
+ - resource_class.attributes_for_form.each do |attribute_name|
2
+ %dl
3
+ %dt=ha resource_class, attribute_name
4
+ %dd= resource.public_send(attribute_name)
5
+
6
+ %dl
7
+ %dt
8
+ =ha resource_class, :created_at
9
+ \/
10
+ =ha resource_class, :updated_at
11
+ %dd
12
+ =tw resource, :created_at
13
+ \/
14
+ =tw resource, :updated_at
@@ -0,0 +1,9 @@
1
+ .btn-group
2
+ %button.btn.dropdown-toggle{ class: state_styleclass(resource.state, :button), type: 'button', data: { toggle: 'dropdown' } }
3
+ /= icon_tag :state
4
+ = resource.human_state_name
5
+ %span.caret
6
+ %ul.dropdown-menu{ role: 'menu' }
7
+ - resource.state_events.each do |event_name|
8
+ %li
9
+ = link_to resource.class.human_state_event_name(event_name), [resource, { ActiveModel::Naming.param_key(resource) => { :state_event => event_name } }], method: :patch
@@ -0,0 +1,5 @@
1
+ .page-header
2
+ = render 'buttons_edit', resource_class: resource_class, resource: resource
3
+ = render 'header_edit', resource_collection_name: resource_collection_name, resource: resource
4
+
5
+ = render 'form', resource: resource
@@ -0,0 +1,16 @@
1
+ .page-header
2
+ = render 'buttons_index', resource_class: resource_class, collection: collection
3
+ = render 'header_index', resource_collection_name: resource_collection_name, collection: collection
4
+
5
+ .panel.panel-default
6
+ .panel-body.table-responsive
7
+ - if collection.any?
8
+ %table.table.table-hover
9
+ %thead
10
+ = render 'row_header', collection: collection
11
+ %tbody
12
+ = render partial: 'row', collection: collection, as: :resource
13
+ - else
14
+ %i=th '#no_items'
15
+ .panel-footer
16
+ =th '#total', count: collection.count
@@ -0,0 +1,5 @@
1
+ .page-header
2
+ = render 'buttons_new', resource: resource
3
+ = render 'header_new', resource_collection_name: resource_collection_name
4
+
5
+ = render 'form', resource: resource
@@ -0,0 +1,5 @@
1
+ .page-header
2
+ = render 'buttons_show', resource: resource
3
+ = render 'header_show', resource_collection_name: resource_collection_name, resource: resource
4
+
5
+ = render 'show'
@@ -0,0 +1 @@
1
+ home page which will be visible by <%= instance_name %> only
@@ -0,0 +1,23 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ = page_meta_for(:title)
5
+ = csrf_meta_tags
6
+ = render 'metas'
7
+ = render 'favicon'
8
+ = stylesheet_link_tag "<%= singular_name %>", media: "all", "data-turbolinks-track" => true
9
+ = javascript_include_tag "<%= singular_name %>", "data-turbolinks-track" => true
10
+
11
+ %link{href: Settings.application.name, rel: "copyright"}/
12
+ %link{href: Settings.application.name, rel: "author"}/
13
+
14
+ %body
15
+ = render 'header'
16
+ = render 'container'
17
+ = render 'footer'
18
+ = render 'analytics'
19
+
20
+ -# turbolinks doesnt re-read <head> tag, thus we have to update them from <body>
21
+ %meta{content: datetime_format_to_js(current_config.date_format), name: "date-format"}
22
+ %meta{content: datetime_format_to_js(current_config.date_time_format), name: "date-time-format"}
23
+ %meta{content: timezone_format_to_js(current_config.timezone), name: "timezone-format"}
metadata ADDED
@@ -0,0 +1,139 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: billet
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Alexey Osipenko
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2021-10-31 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Billet as core of application changes. Contains generators and rake tasks.
14
+ email:
15
+ - alexey@osipenko.in.ua
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - ".github/workflows/main.yml"
21
+ - ".gitignore"
22
+ - ".rspec"
23
+ - ".rubocop.yml"
24
+ - CODE_OF_CONDUCT.md
25
+ - Gemfile
26
+ - Gemfile.lock
27
+ - README.md
28
+ - Rakefile
29
+ - billet.gemspec
30
+ - bin/console
31
+ - bin/rspec
32
+ - lib/billet.rb
33
+ - lib/billet/version.rb
34
+ - lib/generators/billet/namespace/USAGE
35
+ - lib/generators/billet/namespace/namespace_generator.rb
36
+ - lib/generators/billet/namespace/templates/Gemfile.erb
37
+ - lib/generators/billet/namespace/templates/abilities/ability.rb.erb
38
+ - lib/generators/billet/namespace/templates/assets/css.js.erb
39
+ - lib/generators/billet/namespace/templates/assets/css.scss.erb
40
+ - lib/generators/billet/namespace/templates/assets/js.js.erb
41
+ - lib/generators/billet/namespace/templates/config/api_routes.rb.erb
42
+ - lib/generators/billet/namespace/templates/config/locales/activerecord.yml.erb
43
+ - lib/generators/billet/namespace/templates/config/locales/defaults.yml.erb
44
+ - lib/generators/billet/namespace/templates/config/locales/module_name.yml.erb
45
+ - lib/generators/billet/namespace/templates/config/locales/views.yml.erb
46
+ - lib/generators/billet/namespace/templates/config/routes.rb.erb
47
+ - lib/generators/billet/namespace/templates/controller_concerns/.keep
48
+ - lib/generators/billet/namespace/templates/controller_concerns/api_current_identity.rb.erb
49
+ - lib/generators/billet/namespace/templates/controller_concerns/current_identity.rb.erb
50
+ - lib/generators/billet/namespace/templates/controllers/api_controllers/authorizations_controller.rb.erb
51
+ - lib/generators/billet/namespace/templates/controllers/api_controllers/ping_controller.rb.erb
52
+ - lib/generators/billet/namespace/templates/controllers/api_controllers/profiles_controller.rb.erb
53
+ - lib/generators/billet/namespace/templates/controllers/api_controllers/projects_controller.rb.erb
54
+ - lib/generators/billet/namespace/templates/controllers/api_controllers/user_identities_controller.rb.erb
55
+ - lib/generators/billet/namespace/templates/controllers/crud_controllers/application_controller.rb.erb
56
+ - lib/generators/billet/namespace/templates/controllers/crud_controllers/controller.rb.erb
57
+ - lib/generators/billet/namespace/templates/controllers/crud_controllers/home_controller.rb.erb
58
+ - lib/generators/billet/namespace/templates/drappers/application_drapper.rb.erb
59
+ - lib/generators/billet/namespace/templates/drappers/concerns/display_name_glipper.rb.erb
60
+ - lib/generators/billet/namespace/templates/drappers/concerns/timestamp_glipper.rb.erb
61
+ - lib/generators/billet/namespace/templates/drappers/concerns/type_glipper.rb.erb
62
+ - lib/generators/billet/namespace/templates/drappers/user_drapper.rb.erb
63
+ - lib/generators/billet/namespace/templates/gemspec.erb
64
+ - lib/generators/billet/namespace/templates/helpers/application_helper.rb.erb
65
+ - lib/generators/billet/namespace/templates/lib/engine.rb.erb
66
+ - lib/generators/billet/namespace/templates/lib/module.rb.erb
67
+ - lib/generators/billet/namespace/templates/lib/version.rb.erb
68
+ - lib/generators/billet/namespace/templates/views/api_views/application/index.json.jbuilder
69
+ - lib/generators/billet/namespace/templates/views/api_views/application/show.json.jbuilder
70
+ - lib/generators/billet/namespace/templates/views/api_views/authorizations/create.json.jbuilder
71
+ - lib/generators/billet/namespace/templates/views/api_views/authorizations/failure.json.jbuilder
72
+ - lib/generators/billet/namespace/templates/views/api_views/authorizations/index.json.jbuilder
73
+ - lib/generators/billet/namespace/templates/views/api_views/ping/index.json.jbuilder
74
+ - lib/generators/billet/namespace/templates/views/api_views/ping/secured.json.jbuilder
75
+ - lib/generators/billet/namespace/templates/views/api_views/profiles/_detailed.json.jbuilder
76
+ - lib/generators/billet/namespace/templates/views/api_views/projects/_show.json.jbuilder
77
+ - lib/generators/billet/namespace/templates/views/api_views/user_identities/_short.json.jbuilder
78
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_analytics.html.haml
79
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_button_add.html.haml
80
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_button_destroy.html.haml
81
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_button_edit.html.haml
82
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_button_index.html.haml
83
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_button_show.html.haml
84
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_buttons_edit.html.haml
85
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_buttons_index.html.haml
86
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_buttons_new.html.haml
87
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_buttons_show.html.haml
88
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_container.html.haml
89
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_favicon.html.haml
90
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_flash.html.haml
91
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_footer.html.haml
92
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_form.html.haml
93
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_form_fields.html.haml
94
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_header.html.haml
95
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_header_edit.html.haml
96
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_header_index.html.haml
97
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_header_new.html.haml
98
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_header_show.html.haml
99
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_logo.html.haml
100
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_metas.html.haml
101
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_names.html.haml
102
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_primary_menu.html.haml
103
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_row.html.haml
104
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_row_header.html.haml
105
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_secondary_menu.html.haml
106
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_show.html.haml
107
+ - lib/generators/billet/namespace/templates/views/crud_views/application/_states.html.haml
108
+ - lib/generators/billet/namespace/templates/views/crud_views/application/edit.html.haml
109
+ - lib/generators/billet/namespace/templates/views/crud_views/application/index.html.haml
110
+ - lib/generators/billet/namespace/templates/views/crud_views/application/new.html.haml
111
+ - lib/generators/billet/namespace/templates/views/crud_views/application/show.html.haml
112
+ - lib/generators/billet/namespace/templates/views/crud_views/home/index.html.haml.erb
113
+ - lib/generators/billet/namespace/templates/views/crud_views/layouts/application.html.haml.erb
114
+ homepage: https://github.com/cimon-io/billet
115
+ licenses: []
116
+ metadata:
117
+ homepage_uri: https://github.com/cimon-io/billet
118
+ source_code_uri: https://github.com/cimon-io/billet_core
119
+ changelog_uri: https://github.com/cimon-io/billet-core/commits
120
+ post_install_message:
121
+ rdoc_options: []
122
+ require_paths:
123
+ - lib
124
+ required_ruby_version: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - ">="
127
+ - !ruby/object:Gem::Version
128
+ version: 2.3.0
129
+ required_rubygems_version: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ requirements: []
135
+ rubygems_version: 3.2.3
136
+ signing_key:
137
+ specification_version: 4
138
+ summary: Billet as core of application changes.
139
+ test_files: []