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 +4 -4
- data/README.md +1 -1
- data/app/models/concerns/shopapp_company.rb +16 -0
- data/lib/shopapp/templates/shopapp_rails_new.rb +15 -15
- data/shopapp.gemspec +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '053200578211b7f8614e2dc372590698dfb88cd580fb1e0853a128370f94e6be'
|
|
4
|
+
data.tar.gz: 297b4d823627019fefbec25de3954865909cbe617a23a3e7800f23d46053537e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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 :
|
|
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 "
|
|
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
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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
|
data/shopapp.gemspec
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = 'shopapp'
|
|
3
|
-
s.version = '0.2.
|
|
4
|
-
s.date = '2020-
|
|
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.
|
|
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-
|
|
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
|