shopapp 0.2.15 → 0.2.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shopapp/engine.rb +6 -2
- data/lib/shopapp/tasks/shopapp.rake +18 -0
- data/lib/shopapp/templates/shopapp_rails_new.rb +9 -2
- data/shopapp.gemspec +7 -2
- metadata +59 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 611a580084e038dbba738d05d09c862696495256be3de2ff3279389af4fdc3c7
|
4
|
+
data.tar.gz: 395364c956393d47fa450b1a7a0728f0b259a20f45cf61ec1a2647e909ee45fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86998c096933a669ea9494ac4dc30f735c56c8a0089444eae49a260a351b5566e70c59dc9e9e896e03da86cfe0590978f8033ea9d36b24062dd000a446c11f34
|
7
|
+
data.tar.gz: 44cb35d55b9f6ed3f0cde932024269cf5584bbf093c23a1f187294b35f72a8e984e88f189f5fe296b69ea7ef236b01c7355563c4a55418980a7bb15265cd0586
|
data/lib/shopapp/engine.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
namespace :shopapp do
|
2
|
+
desc 'pull prod db to local dev'
|
3
|
+
task pulldb: :environment do
|
4
|
+
timestamp = Time.now.strftime('%Y%m%d%H%M%S')
|
5
|
+
user = Rails.configuration.settings['production_dbuser'] || Rails.configuration.settings['production_user']
|
6
|
+
server = Rails.configuration.settings['production_dbserver'] || Rails.configuration.settings['production_server']
|
7
|
+
db_name = Rails.configuration.database_configuration['production']['database']
|
8
|
+
dev_db_name = Rails.configuration.database_configuration['development']['database']
|
9
|
+
dump_filename = "#{db_name}_#{timestamp}.dump"
|
10
|
+
|
11
|
+
puts "Create production db backup with #{dump_filename}"
|
12
|
+
system "ssh #{user}@#{server} 'pg_dump -Fc -c #{db_name} > #{dump_filename}'"
|
13
|
+
mkdir_p Rails.root.join('tmp')
|
14
|
+
system "scp #{user}@#{server}:#{dump_filename} #{Rails.root.join('tmp')}"
|
15
|
+
system "pg_restore --verbose -c --dbname #{dev_db_name} #{Rails.root.join('tmp', dump_filename)}"
|
16
|
+
puts 'Restored production database to local'
|
17
|
+
end
|
18
|
+
end
|
@@ -78,8 +78,8 @@ create_file "app/assets/stylesheets/application.scss", <<~SCSS
|
|
78
78
|
@import "shopapp";
|
79
79
|
SCSS
|
80
80
|
|
81
|
-
remove_file "app/assets/
|
82
|
-
create_file "app/assets/
|
81
|
+
remove_file "app/assets/javascripts/application.js"
|
82
|
+
create_file "app/assets/javascripts/application.js", <<~JS
|
83
83
|
//= require shopapp
|
84
84
|
//= require_tree .
|
85
85
|
JS
|
@@ -130,6 +130,7 @@ create_file 'config/settings.yml', <<~SETTINGS
|
|
130
130
|
# Authlift setup
|
131
131
|
port: #{@app_dev_port} # << TODO: CHANGE THIS AND SAME BELLOW IN authlift_redirect_uri
|
132
132
|
shopapp_name: #{@app_name}
|
133
|
+
shopapp_code: #{@app_name}.parameterize.underscore
|
133
134
|
authlift_url: <%= ((Rails.env == 'development') ? 'http://localhost:3031/' : 'https://accounts.shoplift.fi/') %>
|
134
135
|
authlift_app_id: #{@app_id = SecureRandom.hex 32}
|
135
136
|
authlift_app_secret: #{@app_secret = SecureRandom.hex 32}
|
@@ -137,6 +138,12 @@ create_file 'config/settings.yml', <<~SETTINGS
|
|
137
138
|
authlift_default_app_key:
|
138
139
|
authlift_default_scope:
|
139
140
|
|
141
|
+
# Deployment settings:
|
142
|
+
production_server: #{@app_name}.shoplift.fi
|
143
|
+
production_user: shoplift
|
144
|
+
production_dbserver:
|
145
|
+
production_dbuser:
|
146
|
+
|
140
147
|
# Override secret key base in local.yml if you do not want to use env. variables
|
141
148
|
# secret_key_base: ## SecureRandom.hex 64
|
142
149
|
SETTINGS
|
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 = '
|
3
|
+
s.version = '0.2.16'
|
4
|
+
s.date = '2019-01-01'
|
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.'
|
@@ -25,4 +25,9 @@ Gem::Specification.new do |s|
|
|
25
25
|
s.add_dependency 'pry-rails', '~> 0.3'
|
26
26
|
s.add_dependency 'oauth2', '~> 1.4'
|
27
27
|
s.add_dependency 'rest-client', '~> 2.0'
|
28
|
+
|
29
|
+
s.add_dependency 'capistrano', '~> 3.11'
|
30
|
+
s.add_dependency 'capistrano-rvm', '~> 0'
|
31
|
+
s.add_dependency 'capistrano-rails', '~> 1.2'
|
32
|
+
s.add_dependency 'capistrano-passenger', '~> 0.2.0'
|
28
33
|
end
|
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.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zeljko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -142,6 +142,62 @@ dependencies:
|
|
142
142
|
- - "~>"
|
143
143
|
- !ruby/object:Gem::Version
|
144
144
|
version: '2.0'
|
145
|
+
- !ruby/object:Gem::Dependency
|
146
|
+
name: capistrano
|
147
|
+
requirement: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - "~>"
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '3.11'
|
152
|
+
type: :runtime
|
153
|
+
prerelease: false
|
154
|
+
version_requirements: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - "~>"
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '3.11'
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: capistrano-rvm
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - "~>"
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
166
|
+
type: :runtime
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - "~>"
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '0'
|
173
|
+
- !ruby/object:Gem::Dependency
|
174
|
+
name: capistrano-rails
|
175
|
+
requirement: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - "~>"
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '1.2'
|
180
|
+
type: :runtime
|
181
|
+
prerelease: false
|
182
|
+
version_requirements: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - "~>"
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '1.2'
|
187
|
+
- !ruby/object:Gem::Dependency
|
188
|
+
name: capistrano-passenger
|
189
|
+
requirement: !ruby/object:Gem::Requirement
|
190
|
+
requirements:
|
191
|
+
- - "~>"
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: 0.2.0
|
194
|
+
type: :runtime
|
195
|
+
prerelease: false
|
196
|
+
version_requirements: !ruby/object:Gem::Requirement
|
197
|
+
requirements:
|
198
|
+
- - "~>"
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
version: 0.2.0
|
145
201
|
description: |-
|
146
202
|
Ha! Art thou Bedlam? Dost thou thirst base Trojan, to have me fold up Parca's fatal web? Hence!\
|
147
203
|
I am qualmish at the smell of leek.
|
@@ -173,6 +229,7 @@ files:
|
|
173
229
|
- lib/shopapp.rb
|
174
230
|
- lib/shopapp/engine.rb
|
175
231
|
- lib/shopapp/routes.rb
|
232
|
+
- lib/shopapp/tasks/shopapp.rake
|
176
233
|
- lib/shopapp/templates/shopapp_rails_new.rb
|
177
234
|
- shopapp.gemspec
|
178
235
|
homepage: http://rubygems.org/gems/shopapp
|