shopapp 0.2.51 → 0.2.52
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 +2 -2
- data/bin/shopitapp +1 -1
- data/lib/shopapp/templates/shopapp_rails_new.rb +90 -21
- data/shopapp.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fe827e49df4d4f6c7fa3ba32fda853cf5e54caca9e40a6d8b8797057e81a5fcf
|
|
4
|
+
data.tar.gz: b644d58814d8036da138f20ebf0b455032cd5d9e8e45d0ad7a4cd1864efbf597
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 11e6a48cc197f74347d7f822f9d91ea29c9f2dde8764ba0cf672e5ed6818ed59b8ab9f47a2043756593c7f958ac9102da8199c7d39641affd450f49a4e06c890
|
|
7
|
+
data.tar.gz: c6275b093b9f6bed6e5e5aa89293e81a99cc4453462055d1884747148e1e78fe80dcea81a5d4e91643aefaf817704d9a048ab0fbf8270f5273bfb7d99f9538b3
|
data/README.md
CHANGED
|
@@ -39,7 +39,7 @@ each app on a different post, so that they can be developed in parallel on the
|
|
|
39
39
|
same machine and keep sessions separate.
|
|
40
40
|
|
|
41
41
|
Shoplift apps typically run on ports 3031 (Authlift) onwards. Get your own port
|
|
42
|
-
and set it
|
|
42
|
+
and set it through dev_port environment variable.
|
|
43
43
|
|
|
44
44
|
dev_port=3123 shopitapp demolift
|
|
45
45
|
|
|
@@ -66,4 +66,4 @@ Following creates default remote (zwr/demolift), but does not push:
|
|
|
66
66
|
|
|
67
67
|
To build new version of this gem, change the version in shopapp.gemspec and run:
|
|
68
68
|
|
|
69
|
-
git push; gem build shopapp.gemspec ; gem push shopapp-0.2.
|
|
69
|
+
git push; gem build shopapp.gemspec ; gem push shopapp-0.2.52.gem; gem install shopapp
|
data/bin/shopitapp
CHANGED
|
@@ -5,6 +5,6 @@ elsif (RUBY_VERSION != '2.5.1') && (!ENV['ignore_ruby_version'])
|
|
|
5
5
|
puts "ShopApp now insists on Ruby 2.5.1. Use 'ignore_ruby_version=1 shopitapp SHOPAPPNAME' to ignore."
|
|
6
6
|
else
|
|
7
7
|
puts "Creating shoplift app #{ARGV.first}"
|
|
8
|
-
cmd = "rails new #{ARGV.first} --skip-git --database=postgresql --skip-
|
|
8
|
+
cmd = "rails new #{ARGV.first} --skip-git --database=postgresql --skip-bundle --skip-test-unit --template=#{File.expand_path '../../lib/shopapp/templates/shopapp_rails_new.rb', __FILE__}"
|
|
9
9
|
exec cmd
|
|
10
10
|
end
|
|
@@ -57,7 +57,7 @@ create_file "config/database.yml", <<~DATABASE
|
|
|
57
57
|
route 'shoplift_single_sign_on'
|
|
58
58
|
|
|
59
59
|
generate(:model, "company", "code:string", "name:string", "info:json")
|
|
60
|
-
generate(:model, "company_state", "code:string", "state:string")
|
|
60
|
+
generate(:model, "company_state", "company:belongs_to", "code:string", "state:string")
|
|
61
61
|
generate('audited:install')
|
|
62
62
|
|
|
63
63
|
insert_into_file "app/models/company.rb", " audited\n", :after => "ApplicationRecord\n"
|
|
@@ -73,14 +73,17 @@ create_file "app/assets/stylesheets/application.scss", <<~SCSS
|
|
|
73
73
|
/*
|
|
74
74
|
*= require_self
|
|
75
75
|
*
|
|
76
|
-
* Insert what you need
|
|
76
|
+
* Insert what you need to this file, or add require_tree".
|
|
77
|
+
* Replace material with own compiled material from shopwindow project.
|
|
77
78
|
*/
|
|
79
|
+
@import "material";
|
|
78
80
|
@import "shopapp";
|
|
79
81
|
SCSS
|
|
80
82
|
|
|
81
83
|
remove_file "app/assets/javascripts/application.js"
|
|
82
84
|
create_file "app/assets/javascripts/application.js", <<~JS
|
|
83
|
-
//= require
|
|
85
|
+
//= require shopapp3
|
|
86
|
+
//= require turbolinks
|
|
84
87
|
//= require_tree .
|
|
85
88
|
JS
|
|
86
89
|
|
|
@@ -88,15 +91,19 @@ remove_file "app/views/layouts/application.html.erb"
|
|
|
88
91
|
create_file "app/views/layouts/application.html.haml", <<~LAYOUT
|
|
89
92
|
!!!
|
|
90
93
|
%html
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
%
|
|
98
|
-
|
|
99
|
-
|
|
94
|
+
%head
|
|
95
|
+
%meta(content="text/html; charset=UTF-8" http-equiv="Content-Type")/
|
|
96
|
+
%meta(charset="utf-8")/
|
|
97
|
+
%meta(content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport")/
|
|
98
|
+
%link(href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet")/
|
|
99
|
+
%link(href="https://fonts.googleapis.com/css?family=Fira+Sans:400,500,700" rel="stylesheet")/
|
|
100
|
+
%title #{@app_name}
|
|
101
|
+
= csrf_meta_tags
|
|
102
|
+
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
|
|
103
|
+
= javascript_include_tag 'application', 'data-turbolinks-track': 'reload'
|
|
104
|
+
%body
|
|
105
|
+
= render 'shopapp/shopapp3' do
|
|
106
|
+
= yield
|
|
100
107
|
LAYOUT
|
|
101
108
|
|
|
102
109
|
create_file '.gitignore', <<~GITIGNORE
|
|
@@ -138,20 +145,84 @@ create_file 'config/settings.yml', <<~SETTINGS
|
|
|
138
145
|
authlift_default_app_key:
|
|
139
146
|
authlift_default_scope:
|
|
140
147
|
|
|
141
|
-
# Deployment settings:
|
|
142
|
-
production_server: #{@app_name}.shoplift.fi
|
|
143
|
-
production_user: shoplift
|
|
144
|
-
production_dbserver:
|
|
145
|
-
production_dbuser:
|
|
146
|
-
|
|
147
148
|
# Override secret key base in local.yml if you do not want to use env. variables
|
|
148
149
|
# secret_key_base: ## SecureRandom.hex 64
|
|
149
150
|
SETTINGS
|
|
150
151
|
|
|
151
152
|
create_file 'config/local.yml', <<~SETTINGS
|
|
152
153
|
authlift_url: 'https://accounts.shoplift.fi/'
|
|
154
|
+
|
|
155
|
+
deployment:
|
|
156
|
+
stage:
|
|
157
|
+
folder: '#{@app_name}-stage/current'
|
|
158
|
+
server:
|
|
159
|
+
user: lifter
|
|
160
|
+
dbhost:
|
|
161
|
+
dbname: #{@app_name}_stage
|
|
162
|
+
production:
|
|
163
|
+
folder: '#{@app_name}-production/current'
|
|
164
|
+
server:
|
|
165
|
+
user: lifter
|
|
166
|
+
dbhost:
|
|
167
|
+
dbname: #{@app_name}_production
|
|
153
168
|
SETTINGS
|
|
154
169
|
|
|
170
|
+
create_file "Capfile", <<~FILECONTENT
|
|
171
|
+
require "capistrano/setup"
|
|
172
|
+
require "capistrano/deploy"
|
|
173
|
+
|
|
174
|
+
require "capistrano/scm/git"
|
|
175
|
+
install_plugin Capistrano::SCM::Git
|
|
176
|
+
|
|
177
|
+
require 'capistrano/rvm'
|
|
178
|
+
require "capistrano/bundler"
|
|
179
|
+
require "capistrano/rails/assets"
|
|
180
|
+
require "capistrano/rails/migrations"
|
|
181
|
+
require "capistrano/passenger"
|
|
182
|
+
# require "capistrano/yarn"
|
|
183
|
+
|
|
184
|
+
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
|
|
185
|
+
FILECONTENT
|
|
186
|
+
|
|
187
|
+
github_organization = ENV['github_organization'] || 'zwr'
|
|
188
|
+
github_project_name = ENV['github_project_name'] || @app_name
|
|
189
|
+
|
|
190
|
+
create_file "config/deploy.rb", <<~FILECONTENT
|
|
191
|
+
lock "~> 3.11.0"
|
|
192
|
+
|
|
193
|
+
set :application, "#{@app_name.capitalize}"
|
|
194
|
+
set :repo_url, "git@github.com:#{github_organization}/#{github_project_name}.git"
|
|
195
|
+
set :rvm_ruby_version, '2.5.1'
|
|
196
|
+
append :linked_files, 'config/local.yml'
|
|
197
|
+
append :linked_files, 'config/local.yml'
|
|
198
|
+
append :linked_files, 'config/database.yml'
|
|
199
|
+
|
|
200
|
+
set :deploy_to, "/home/shoplift/#{@app_name}"
|
|
201
|
+
set :passenger_restart_with_touch, true
|
|
202
|
+
FILECONTENT
|
|
203
|
+
|
|
204
|
+
create_file "config/deploy/stage.rb", <<~FILECONTENT
|
|
205
|
+
set :stage, :stage
|
|
206
|
+
set :rails_env, :production
|
|
207
|
+
set :branch, "stage"
|
|
208
|
+
set :rvm_type, :user
|
|
209
|
+
set :rvm_custom_path, '/usr/share/rvm'
|
|
210
|
+
|
|
211
|
+
set :deploy_to, "/home/lifter/#{@app_name}-stage"
|
|
212
|
+
server "#{@app_name}.zwr.fi", user: "lifter", roles: %w{app db web}
|
|
213
|
+
FILECONTENT
|
|
214
|
+
|
|
215
|
+
create_file "config/deploy/production.rb", <<~FILECONTENT
|
|
216
|
+
set :stage, :production
|
|
217
|
+
set :rails_env, :production
|
|
218
|
+
set :branch, "production"
|
|
219
|
+
set :rvm_type, :user
|
|
220
|
+
set :rvm_custom_path, '/usr/share/rvm'
|
|
221
|
+
|
|
222
|
+
set :deploy_to, "/home/lifter/#{@app_name}-production"
|
|
223
|
+
server "#{@app_name}.shoplift.fi", user: "lifter", roles: %w{app db web}
|
|
224
|
+
FILECONTENT
|
|
225
|
+
|
|
155
226
|
create_file 'lib/templates/rails/scaffold_controller/controller.rb.tt', <<~TEMPLATE
|
|
156
227
|
<% if namespaced? -%>
|
|
157
228
|
require_dependency "<%= namespaced_path %>/application_controller"
|
|
@@ -228,8 +299,6 @@ git add: '.'
|
|
|
228
299
|
git commit: "-a -m 'shopapp created'"
|
|
229
300
|
|
|
230
301
|
unless ENV['skip_github_remote']
|
|
231
|
-
github_organization = ENV['github_organization'] || 'zwr'
|
|
232
|
-
github_project_name = ENV['github_project_name'] || @app_name
|
|
233
302
|
git remote: "add origin git@github.com:#{github_organization}/#{github_project_name}.git"
|
|
234
303
|
git push: '-u origin master' unless ENV['skip_github_push']
|
|
235
304
|
end
|
|
@@ -248,4 +317,4 @@ puts
|
|
|
248
317
|
puts " $ cd #{@app_name}"
|
|
249
318
|
puts " $ rails g scaffold dog name:string"
|
|
250
319
|
puts " $ rake db:migrate"
|
|
251
|
-
puts " $ open http://localhost
|
|
320
|
+
puts " $ open http://localhost:#{@app_dev_port}/dogs ; rails s"
|
data/shopapp.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = 'shopapp'
|
|
3
|
-
s.version = '0.2.
|
|
3
|
+
s.version = '0.2.52'
|
|
4
4
|
s.date = '2019-05-03'
|
|
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!\
|