shopapp 0.2.73 → 0.2.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 12e7042b3d671013da12c99d025c6bb44c6cc3e058a08cdb6d9ceba213de1293
4
- data.tar.gz: 55627d6f0aced17a560474185cbaf4c1dbee2926d258f4d9fd4bf36e03bcead1
3
+ metadata.gz: '053200578211b7f8614e2dc372590698dfb88cd580fb1e0853a128370f94e6be'
4
+ data.tar.gz: 297b4d823627019fefbec25de3954865909cbe617a23a3e7800f23d46053537e
5
5
  SHA512:
6
- metadata.gz: 68e3d39563a9779b3e151c5d519ce818eb618735477445a3773b17dac44a5220824765b66bc953b0126f15c1d6a900a5a941b19da7ffa121653ff53c7dea26af
7
- data.tar.gz: d8c35d82417f004100967fa9460c3d08440d514d84a208d59d87ce78c13b4f7f3ff0f6c24964448a8cc3863316156bb94f09ed16f229bf25bd583da5cadbd5c0
6
+ metadata.gz: 81d173090b0a83e5a4d451f514799e416c614e953fb4caa5b536d509b5b203a87c950c58204893f3395efdb01504b0e4cc5f3cc87c1f2fcbb53086e693aef245
7
+ data.tar.gz: 39d8d058113a62263a251c7710dd7c6b52f8f7c51761d31c84d2f5e431ef7a2a7d1726967e65dc55875367de57b18503239304fd2f7307e4cafa508d5dd27470
data/README.md CHANGED
@@ -93,4 +93,4 @@ shopapp to support i18n, add two methods to your ApplicationController:
93
93
 
94
94
  To build new version of this gem, change the version in shopapp.gemspec and run:
95
95
 
96
- gem build shopapp.gemspec ; gem push shopapp-0.2.73.gem; gem install shopapp
96
+ gem build shopapp.gemspec ; gem push shopapp-0.2.74.gem; gem install shopapp
@@ -0,0 +1,16 @@
1
+ require 'oauth2'
2
+
3
+ module ShopappCompany
4
+ extend ActiveSupport::Concern
5
+
6
+ def app_info
7
+ @app_info ||= JSON.parse client.request(:get, "http://localhost:3031/api/company/app_info.json?key=#{info['shoplift_key']}").body
8
+ end
9
+
10
+ def client
11
+ @oauth ||= OAuth2::Client.new Rails.configuration.settings['authlift_app_id'],
12
+ Rails.configuration.settings['authlift_app_secret'],
13
+ site: Rails.configuration.settings['authlift_url']
14
+ @token ||= @oauth.client_credentials.get_token scope: [Rails.configuration.settings['authlift_default_scope'], 'public'].compact.join(' ')
15
+ end
16
+ end
@@ -71,7 +71,7 @@ generate(:model, "company", "code:string", "name:string", "info:json")
71
71
  generate(:model, "company_state", "company:belongs_to", "code:string", "state:string")
72
72
  generate('audited:install')
73
73
 
74
- insert_into_file "app/models/company.rb", " has_many :application_states\n", :after => "ApplicationRecord\n"
74
+ insert_into_file "app/models/company.rb", " has_many :company_states\n", :after => "ApplicationRecord\n"
75
75
  insert_into_file "app/models/company.rb", " audited\n", :after => "ApplicationRecord\n"
76
76
  insert_into_file "app/models/company.rb", " include Panicker\n", :after => "ApplicationRecord\n"
77
77
  insert_into_file "app/models/company_state.rb", " audited\n", :after => "ApplicationRecord\n"
@@ -90,7 +90,7 @@ create_file "app/assets/stylesheets/application.scss", <<~SCSS
90
90
  * Replace material with own compiled material from shopwindow project.
91
91
  */
92
92
  @import "material";
93
- @import "shopapp";
93
+ @import "shopapp3";
94
94
  SCSS
95
95
 
96
96
  remove_file "app/assets/javascripts/application.js"
@@ -104,19 +104,19 @@ remove_file "app/views/layouts/application.html.erb"
104
104
  create_file "app/views/layouts/application.html.haml", <<~LAYOUT
105
105
  !!!
106
106
  %html
107
- %head
108
- %meta(content="text/html; charset=UTF-8" http-equiv="Content-Type")/
109
- %meta(charset="utf-8")/
110
- %meta(content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport")/
111
- %link(href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet")/
112
- %link(href="https://fonts.googleapis.com/css?family=Fira+Sans:400,500,700" rel="stylesheet")/
113
- %title #{@app_name}
114
- = csrf_meta_tags
115
- = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
116
- = javascript_include_tag 'application', 'data-turbolinks-track': 'reload'
117
- %body
118
- = render 'shopapp/shopapp3' do
119
- = yield
107
+ %head
108
+ %meta(content="text/html; charset=UTF-8" http-equiv="Content-Type")/
109
+ %meta(charset="utf-8")/
110
+ %meta(content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport")/
111
+ %link(href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet")/
112
+ %link(href="https://fonts.googleapis.com/css?family=Fira+Sans:400,500,700" rel="stylesheet")/
113
+ %title #{@app_name}
114
+ = csrf_meta_tags
115
+ = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
116
+ = javascript_include_tag 'application', 'data-turbolinks-track': 'reload'
117
+ %body
118
+ = render 'shopapp/shopapp3' do
119
+ = yield
120
120
  LAYOUT
121
121
 
122
122
  create_file '.gitignore', <<~GITIGNORE
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'shopapp'
3
- s.version = '0.2.73'
4
- s.date = '2020-01-13'
3
+ s.version = '0.2.74'
4
+ s.date = '2020-05-12'
5
5
  s.summary = 'Do a shoplift.'
6
6
  s.description = 'Ha! Art thou Bedlam? Dost thou thirst base Trojan, to have me fold up Parca\'s fatal web? Hence!\
7
7
  I am qualmish at the smell of leek.'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.73
4
+ version: 0.2.74
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zeljko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-13 00:00:00.000000000 Z
11
+ date: 2020-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -424,6 +424,7 @@ files:
424
424
  - app/helpers/shopapp_helper.rb
425
425
  - app/jobs/shopapp_monit_job.rb
426
426
  - app/models/concerns/panicker.rb
427
+ - app/models/concerns/shopapp_company.rb
427
428
  - app/views/layouts/_header_menu.html.haml
428
429
  - app/views/shopapp/403.html.haml
429
430
  - app/views/shopapp/_display_flag.haml