shopapp 0.1.32 → 0.1.33
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 +5 -5
- data/lib/shopapp/templates/shopapp_rails_new.rb +52 -5
- data/shopapp.gemspec +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 2ebf5f5a5dd3c9c9fb200cb4b96bc4f3a2a2c6ae
|
|
4
|
+
data.tar.gz: 291b00c4e845fbefa7a18746d79c2ab78d68ebcb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 45ac320617f3312e573971ba82f344a054c72edaa1e64955940f6ff063c5ffc2cf1699bc359ade1fa9b2bf9570822cb2c328b5106423b32b058484cdf93bffed
|
|
7
|
+
data.tar.gz: cff9e9a68b5c4c9ab25c0c15b71d8d0de33eae950467e6c176e552e55926949dcdfe9be00228f27e6f970126da73e8c89f5677257df0703a13e28c6f976cd865
|
|
@@ -21,6 +21,7 @@ gem 'uglifier', '>= 1.3.0'
|
|
|
21
21
|
gem 'therubyracer', platforms: :ruby
|
|
22
22
|
gem 'jbuilder', '~> 2.5'
|
|
23
23
|
gem 'bootsnap', '>= 1.1.0', require: false
|
|
24
|
+
gem "audited", "~> 4.7"
|
|
24
25
|
gem_group :development do
|
|
25
26
|
gem 'spring'
|
|
26
27
|
gem 'spring-watcher-listen', '~> 2.0.0'
|
|
@@ -57,11 +58,47 @@ route 'shoplift_single_sign_on'
|
|
|
57
58
|
|
|
58
59
|
generate(:model, "company", "code:string", "name:string", "info:json")
|
|
59
60
|
generate(:model, "company_state", "code:string", "state:string")
|
|
61
|
+
generate('audited:install')
|
|
62
|
+
|
|
63
|
+
insert_into_file "app/models/company.rb", " audited\n", :after => "ApplicationRecord\n"
|
|
64
|
+
insert_into_file "app/models/company_state.rb", " audited\n", :after => "ApplicationRecord\n"
|
|
65
|
+
|
|
60
66
|
|
|
61
67
|
rails_command "db:drop", env: 'development'
|
|
62
68
|
rails_command "db:create", env: 'development'
|
|
63
69
|
rails_command "db:migrate", env: 'development'
|
|
64
70
|
|
|
71
|
+
remove_file "app/assets/stylesheets/application.css"
|
|
72
|
+
create_file "app/assets/stylesheets/application.scss", <<~SCSS
|
|
73
|
+
/*
|
|
74
|
+
*= require_self
|
|
75
|
+
*
|
|
76
|
+
* Insert what you need after require_self, such as "require rails_bootstrap_forms".
|
|
77
|
+
*/
|
|
78
|
+
@import "shopapp";
|
|
79
|
+
SCSS
|
|
80
|
+
|
|
81
|
+
remove_file "app/assets/javascript/application.js"
|
|
82
|
+
create_file "app/assets/javascript/application.js", <<~JS
|
|
83
|
+
//= require shopapp
|
|
84
|
+
//= require_tree .
|
|
85
|
+
JS
|
|
86
|
+
|
|
87
|
+
remove_file "app/views/layouts/application.html.erb"
|
|
88
|
+
create_file "app/views/layouts/application.html.haml", <<~LAYOUT
|
|
89
|
+
!!!
|
|
90
|
+
%html
|
|
91
|
+
%head
|
|
92
|
+
%meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
|
|
93
|
+
%title #{@app_name}
|
|
94
|
+
= csrf_meta_tags
|
|
95
|
+
= stylesheet_link_tag 'application', media: 'all'
|
|
96
|
+
= javascript_include_tag 'application'
|
|
97
|
+
%body
|
|
98
|
+
= render 'shopapp/shopapp' do
|
|
99
|
+
= yield
|
|
100
|
+
LAYOUT
|
|
101
|
+
|
|
65
102
|
create_file '.gitignore', <<~GITIGNORE
|
|
66
103
|
# Ignore bundler config.
|
|
67
104
|
/.bundle
|
|
@@ -81,20 +118,22 @@ create_file '.gitignore', <<~GITIGNORE
|
|
|
81
118
|
|
|
82
119
|
# this is so we can develop shopapp gem inside this project
|
|
83
120
|
/vendor/shopapp
|
|
84
|
-
|
|
121
|
+
|
|
85
122
|
/config/local.yml
|
|
86
123
|
|
|
87
124
|
/public/assets
|
|
88
125
|
GITIGNORE
|
|
89
126
|
|
|
127
|
+
@app_dev_port = ENV['dev_port'] || 3999
|
|
128
|
+
|
|
90
129
|
create_file 'config/settings.yml', <<~SETTINGS
|
|
91
130
|
# Authlift setup
|
|
92
|
-
port:
|
|
131
|
+
port: #{@app_dev_port} # << TODO: CHANGE THIS AND SAME BELLOW IN authlift_redirect_uri
|
|
93
132
|
shopapp_name: #{@app_name}
|
|
94
133
|
authlift_url: <%= ((Rails.env == 'development') ? 'http://localhost:3031/' : 'https://accounts.shoplift.fi/') %>
|
|
95
|
-
authlift_app_id: #{SecureRandom.hex 32}
|
|
96
|
-
authlift_app_secret: #{SecureRandom.hex 32}
|
|
97
|
-
authlift_redirect_uri: http://localhost
|
|
134
|
+
authlift_app_id: #{@app_id = SecureRandom.hex 32}
|
|
135
|
+
authlift_app_secret: #{@app_secret = SecureRandom.hex 32}
|
|
136
|
+
authlift_redirect_uri: http://localhost:#{@app_dev_port}/auth/
|
|
98
137
|
authlift_default_app_key:
|
|
99
138
|
authlift_default_scope:
|
|
100
139
|
|
|
@@ -113,3 +152,11 @@ git remote: "add origin git@github.com:zmilojko/#{@app_name}.git"
|
|
|
113
152
|
git push: '-u origin master'
|
|
114
153
|
|
|
115
154
|
puts "Shopapp #{@app_name} created!"
|
|
155
|
+
puts
|
|
156
|
+
puts "To activate app in Authlift, execute the following:"
|
|
157
|
+
puts " app = Doorkeeper::Application.find_or_create_by(name: '#{@app_name}')"
|
|
158
|
+
puts " app.update_attributes uid: '#{@app_id}',"
|
|
159
|
+
puts " secret: '#{@app_secret}',"
|
|
160
|
+
puts " redirect_uri: 'http://localhost:#{@app_dev_port}/auth/'"
|
|
161
|
+
puts " Company.find_by_code(:zwr).applications << app unless Company.find_by_code(:zwr).applications.include? app"
|
|
162
|
+
|
data/shopapp.gemspec
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = 'shopapp'
|
|
3
|
-
s.version = '0.1.
|
|
4
|
-
s.date = '2018-06-
|
|
3
|
+
s.version = '0.1.33'
|
|
4
|
+
s.date = '2018-06-10'
|
|
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.1.
|
|
4
|
+
version: 0.1.33
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Zeljko
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-06-
|
|
11
|
+
date: 2018-06-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: railties
|
|
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
192
192
|
version: '0'
|
|
193
193
|
requirements: []
|
|
194
194
|
rubyforge_project:
|
|
195
|
-
rubygems_version: 2.
|
|
195
|
+
rubygems_version: 2.6.12
|
|
196
196
|
signing_key:
|
|
197
197
|
specification_version: 4
|
|
198
198
|
summary: Do a shoplift.
|