shopapp 0.1.33 → 0.1.34
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +68 -2
- data/lib/shopapp/templates/shopapp_rails_new.rb +7 -2
- 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
|
+
SHA256:
|
3
|
+
metadata.gz: c094f4c1d99e5eebd5d33f5617717fdce7597403afcc4dfb9fdad489e7b70544
|
4
|
+
data.tar.gz: '0585843798025b3e9dd7fc90c335709018ae18b57dce9aff7ceb2c3d4299400b'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3311e45c08a78e07598b31e9eb357ae18b052b6ca16ba746353562a81f634461917712b933141ec24c08f27bf9f833948c46335db556a52d6f20837c4fb5e67a
|
7
|
+
data.tar.gz: 7e8bd9720cf0ce8342ca4ef826311ca43bc3a8c176ddaf3aec74c92971ef01593c2147a856a7b9aca39f9939fdb8792226dbf5d3fd9c2aa7a5a7e08864f74c49
|
data/README.md
CHANGED
@@ -1,7 +1,73 @@
|
|
1
1
|
[![Gem Version](https://badge.fury.io/rb/shopapp.svg)](https://badge.fury.io/rb/shopapp)
|
2
2
|
|
3
|
-
Shopapp gem -
|
4
|
-
|
3
|
+
Shopapp gem - gem for Shoplift clients.
|
4
|
+
|
5
|
+
# Shoplift apps: ShopApps
|
6
|
+
|
7
|
+
ShopApps are Shoplift applications, and if they are written in Rails, they can
|
8
|
+
be made with Shopapp gem. It provides quick start, UI template and controllers
|
9
|
+
that force authentication with Authlift, Shoplift OAuth provider.
|
10
|
+
|
11
|
+
# Development Setup
|
12
|
+
|
13
|
+
* You must have account with Shoplift with membership for "zwr" company,
|
14
|
+
which is used for all app development.
|
15
|
+
* ShopApp will work on any \*nix, but is designed on and for OSX
|
16
|
+
* Postgres (latest), typically via Brew
|
17
|
+
* You will need Ruby 2.5.1, and typically via RVM, and few gems:
|
18
|
+
|
19
|
+
gem install bundler
|
20
|
+
gem install rails
|
21
|
+
gem install shopapp
|
22
|
+
|
23
|
+
# Creating a Shoplift App with Shopitup
|
24
|
+
|
25
|
+
Just do the following:
|
26
|
+
|
27
|
+
shopitapp demolift
|
28
|
+
cd demolift
|
29
|
+
rails g scaffold something code:string company:belongs_to
|
30
|
+
rails db:migrate
|
31
|
+
rails s
|
32
|
+
|
33
|
+
Rename the base controller for SomethingsController to one of
|
34
|
+
ShopApp base controllers, typically UserAuthenticatedController:
|
35
|
+
|
36
|
+
class ProductsController < UserAuthenticatedController
|
37
|
+
|
38
|
+
Hit the newly created route: http://localhost:3999/somethings
|
39
|
+
|
40
|
+
### Shopapps side by side - set development port
|
41
|
+
|
42
|
+
By default, Rails apps in development run on port 3000. It is recommended to run
|
43
|
+
each app on a different post, so that they can be developed in parallel on the
|
44
|
+
same machine and keep sessions separate.
|
45
|
+
|
46
|
+
Shoplift apps typically run on ports 3031 (Authlift) onwards. Get your own port
|
47
|
+
and set it thorugh dev_port environment variable.
|
48
|
+
|
49
|
+
dev_port=3123 shopitapp demolift
|
50
|
+
|
51
|
+
### Shopapps to github
|
52
|
+
|
53
|
+
This gem is meant for Shoplift team, so Shopitapp will set the Git remote to
|
54
|
+
zwr/project_name location on GitHub. If you want a different location, set the
|
55
|
+
github_organization and github_project_name or use skip_github_remote=1.
|
56
|
+
|
57
|
+
Setting variable skip_github_push=1 will create a remote but not push. If you do
|
58
|
+
not set it, make sure that you had previously created the remote on github and
|
59
|
+
exchanged public keys properly.
|
60
|
+
|
61
|
+
Following skips Git remote completely, but will still create Git repo and commit
|
62
|
+
initial code to it:
|
63
|
+
|
64
|
+
skip_github_remote=1 shopitapp demolift
|
65
|
+
|
66
|
+
Following creates default remote (zwr/demolift), but does not push:
|
67
|
+
|
68
|
+
skip_github_push=1 shopitapp demolift
|
69
|
+
|
70
|
+
# Developing this gem
|
5
71
|
|
6
72
|
To build new version of this gem, change the version in shopapp.gemspec and run:
|
7
73
|
|
@@ -148,8 +148,13 @@ create_file 'config/local.yml', <<~SETTINGS
|
|
148
148
|
git :init
|
149
149
|
git add: '.'
|
150
150
|
git commit: "-a -m 'shopapp created'"
|
151
|
-
|
152
|
-
|
151
|
+
|
152
|
+
unless ENV['skip_github_remote']
|
153
|
+
github_organization = ENV['github_organization'] || 'zwr'
|
154
|
+
github_project_name = ENV['github_project_name'] || @app_name
|
155
|
+
git remote: "add origin git@github.com:#{github_organization}/#{github_project_name}.git"
|
156
|
+
git push: '-u origin master' unless ENV['skip_github_push']
|
157
|
+
end
|
153
158
|
|
154
159
|
puts "Shopapp #{@app_name} created!"
|
155
160
|
puts
|
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.34'
|
4
|
+
s.date = '2018-06-11'
|
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.34
|
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-11 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.6
|
195
|
+
rubygems_version: 2.7.6
|
196
196
|
signing_key:
|
197
197
|
specification_version: 4
|
198
198
|
summary: Do a shoplift.
|