shopapp 0.2.16 → 0.2.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/shopapp/deploy/USAGE +14 -0
- data/lib/generators/shopapp/deploy/deploy_generator.rb +54 -0
- data/shopapp.gemspec +2 -2
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5b6a99909f0e75c891df09ad77f5dfdd8c6e89b3928eac7a31ec287ef50069f
|
4
|
+
data.tar.gz: be03ef0e5a368136e2ccd1a584295c4f92355a2a3aab15e5b746eac9f03850df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3b1aa4a9b0aaf7ac1c21ff7aa413bd7721b2f1a01f7322304fff85cbe787d21a541fe1e82df689033b65612a206108d64f1d205453d1dd418f9bb3375988a62
|
7
|
+
data.tar.gz: e875a3ec805da57afe14b87e1904ec40450f026be2c8d7d6261fcc95e1058badd19168946b84d61654e5cac0464e0ad533bf603237e57c0f102298960b055e59
|
@@ -0,0 +1,14 @@
|
|
1
|
+
Description:
|
2
|
+
Adds Shoplift Capistrano setup to your project.
|
3
|
+
|
4
|
+
Example:
|
5
|
+
rails generate shopapp:deploy
|
6
|
+
|
7
|
+
This will create (and you should check them each):
|
8
|
+
Capfile - general capistrano components setup. Probably
|
9
|
+
OK as it is.
|
10
|
+
config/deploy.rb - general deployment setup for all environments.
|
11
|
+
Carefully check each of the variables set in
|
12
|
+
the file.
|
13
|
+
config/deploy/production.rb - Production specific variables. Check server
|
14
|
+
setup, the rest is likely OK as it is.
|
@@ -0,0 +1,54 @@
|
|
1
|
+
module Shopapp
|
2
|
+
end
|
3
|
+
|
4
|
+
class Shopapp::DeployGenerator < Rails::Generators::Base
|
5
|
+
source_root File.expand_path('templates', __dir__)
|
6
|
+
|
7
|
+
def app_code
|
8
|
+
(Rails.configuration.settings['shopapp_name'] ||
|
9
|
+
Rails.application.class.parent_name).to_s.downcase.parameterize.underscore
|
10
|
+
end
|
11
|
+
|
12
|
+
def create_capfile
|
13
|
+
create_file "Capfile", <<~FILECONTENT
|
14
|
+
require "capistrano/setup"
|
15
|
+
require "capistrano/deploy"
|
16
|
+
|
17
|
+
require "capistrano/scm/git"
|
18
|
+
install_plugin Capistrano::SCM::Git
|
19
|
+
|
20
|
+
require 'capistrano/rvm'
|
21
|
+
require "capistrano/bundler"
|
22
|
+
require "capistrano/rails/assets"
|
23
|
+
require "capistrano/rails/migrations"
|
24
|
+
require "capistrano/passenger"
|
25
|
+
# require "capistrano/yarn"
|
26
|
+
|
27
|
+
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
|
28
|
+
FILECONTENT
|
29
|
+
end
|
30
|
+
|
31
|
+
def create_config_deploy_rb
|
32
|
+
create_file "config/deploy.rb", <<~FILECONTENT
|
33
|
+
lock "~> 3.11.0"
|
34
|
+
|
35
|
+
set :application, "Prolift"
|
36
|
+
set :repo_url, "git@github.com:shoplift/#{app_code}.git"
|
37
|
+
set :rvm_ruby_version, '2.5.1'
|
38
|
+
append :linked_files, 'config/local.yml'
|
39
|
+
|
40
|
+
set :deploy_to, "/home/shoplift/#{app_code}"
|
41
|
+
set :passenger_restart_with_touch, true
|
42
|
+
FILECONTENT
|
43
|
+
end
|
44
|
+
|
45
|
+
def create_config_deploy_production_rb
|
46
|
+
create_file "config/deploy/production.rb", <<~FILECONTENT
|
47
|
+
set :stage, :production
|
48
|
+
set :rails_env, :production
|
49
|
+
set :branch, "master"
|
50
|
+
|
51
|
+
server "#{app_code}.shoplift.fi", user: "#{app_code}", roles: %w{app db web}
|
52
|
+
FILECONTENT
|
53
|
+
end
|
54
|
+
end
|
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 = '2019-01-
|
3
|
+
s.version = '0.2.17'
|
4
|
+
s.date = '2019-01-06'
|
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.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zeljko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -226,6 +226,8 @@ files:
|
|
226
226
|
- bin/shopitapp
|
227
227
|
- config/initializers/active_settings.rb
|
228
228
|
- config/initializers/audited.rb
|
229
|
+
- lib/generators/shopapp/deploy/USAGE
|
230
|
+
- lib/generators/shopapp/deploy/deploy_generator.rb
|
229
231
|
- lib/shopapp.rb
|
230
232
|
- lib/shopapp/engine.rb
|
231
233
|
- lib/shopapp/routes.rb
|