veda-apps 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +10 -8
- data/LICENSE +21 -0
- data/README.md +16 -45
- data/lib/parser.rb +2 -4
- data/lib/veda/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0542c96e318ef577026b308353a4c3a5181ebfe4
|
4
|
+
data.tar.gz: 869a88dcd3f8d51596dde99b529590b045481ed9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 908db94bb23955b0554a91db4ed1dabdf23da376dc14ae18aca9a1a40c9b782b64a3b789bef72598bf2f494644a45ccd9a1b7e811bed70f65c4f0261b8e37d34
|
7
|
+
data.tar.gz: d887d4a00ef5dcf3688d11a25e27798901ffb880daa4a7c6392e4ebc1f3a3c20f03920188f49a2a61b20a0aded02aa23e72182bec8933eb97811623e3a1d2e9f
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
veda-apps (0.0.
|
4
|
+
veda-apps (0.0.4)
|
5
5
|
gli (= 2.17.1)
|
6
|
+
rest-client
|
6
7
|
|
7
8
|
GEM
|
8
9
|
remote: https://rubygems.org/
|
@@ -36,23 +37,25 @@ GEM
|
|
36
37
|
cucumber-tag_expressions (1.1.1)
|
37
38
|
cucumber-wire (0.0.1)
|
38
39
|
diff-lcs (1.3)
|
39
|
-
domain_name (0.5.
|
40
|
+
domain_name (0.5.20161129)
|
40
41
|
unf (>= 0.0.5, < 1.0.0)
|
41
42
|
ffi (1.9.18)
|
42
43
|
gherkin (5.0.0)
|
43
44
|
gli (2.17.1)
|
44
|
-
http-cookie (1.0.
|
45
|
+
http-cookie (1.0.3)
|
45
46
|
domain_name (~> 0.5)
|
46
|
-
mime-types (
|
47
|
+
mime-types (3.1)
|
48
|
+
mime-types-data (~> 3.2015)
|
49
|
+
mime-types-data (3.2016.0521)
|
47
50
|
multi_json (1.13.1)
|
48
51
|
multi_test (0.1.2)
|
49
52
|
netrc (0.11.0)
|
50
53
|
rake (12.3.0)
|
51
54
|
rdoc (6.0.1)
|
52
|
-
rest-client (
|
55
|
+
rest-client (2.0.2)
|
53
56
|
http-cookie (>= 1.0.2, < 2.0)
|
54
|
-
mime-types (>= 1.16, <
|
55
|
-
netrc (~> 0.
|
57
|
+
mime-types (>= 1.16, < 4.0)
|
58
|
+
netrc (~> 0.8)
|
56
59
|
rspec-expectations (3.7.0)
|
57
60
|
diff-lcs (>= 1.2.0, < 2.0)
|
58
61
|
rspec-support (~> 3.7.0)
|
@@ -69,7 +72,6 @@ DEPENDENCIES
|
|
69
72
|
aruba
|
70
73
|
rake
|
71
74
|
rdoc
|
72
|
-
rest-client
|
73
75
|
veda-apps!
|
74
76
|
|
75
77
|
BUNDLED WITH
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2018 shishir sapkota
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
@@ -1,62 +1,33 @@
|
|
1
|
-
#
|
2
|
-
###### There are many times when we write same thing in different app. Like qr scanner,
|
1
|
+
# veda-apps
|
2
|
+
###### There are many times when we write same thing in different app. Like qr scanner,create models from api.. etc. This is an attempt to automate the redundant task. Using command line we can generate specific task without writing all the codes. All codes generated can be customized according to your needs and are well tested. currently All codes are generated for Swift.
|
3
3
|
|
4
4
|
|
5
|
-
|
5
|
+
#### It is a collection of the common tools that we write over and over. And can create them with one line of code.
|
6
6
|
|
7
|
-
**step 1:**
|
8
7
|
|
9
|
-
|
8
|
+
examples:
|
10
9
|
|
11
|
-
|
10
|
+
```veda generate qr -f path_to_view_controller```
|
12
11
|
|
13
|
-
|
12
|
+
```veda generate model input.json```
|
14
13
|
|
15
|
-
|
14
|
+
### Wikis
|
15
|
+
#### QR scanner
|
16
16
|
|
17
|
-
|
17
|
+
https://github.com/Iccr/VedaApp/wiki/QRScanner
|
18
18
|
|
19
|
-
**step 2:**
|
20
19
|
|
21
|
-
|
20
|
+
#### Automatically Generate models from url:
|
22
21
|
|
23
|
-
|
22
|
+
https://github.com/Iccr/VedaApp/wiki/swift-model-generator
|
24
23
|
|
25
|
-
Add three files generated.
|
26
24
|
|
27
|
-
|
25
|
+
###### feedback are welcomed
|
28
26
|
|
29
27
|
|
30
|
-
|
31
|
-
|
32
|
-
```swift
|
33
|
-
extension ViewController {
|
34
|
-
func scan() {
|
35
|
-
self.openVedaQRScanner(source: self) { (viewcontroller, string) in
|
36
|
-
let qrString = string
|
37
|
-
print(qrString)
|
38
|
-
}
|
39
|
-
}
|
40
|
-
|
41
|
-
func openVedaQRScanner(source: UIViewController, completion: @escaping (VedaQRScannerViewController, String)->()) {
|
42
|
-
if let vc = UIStoryboard(name: "VedaQR", bundle: nil).instantiateInitialViewController() as? VedaQRScannerViewController {
|
43
|
-
vc.onObtained = completion
|
44
|
-
source.present(vc, animated: true, completion: nil)
|
45
|
-
}
|
46
|
-
}
|
47
|
-
}
|
48
|
-
|
49
|
-
```
|
50
|
-
|
51
|
-
**step3**:
|
52
|
-
|
53
|
-
create an outlet and open qrscanner
|
54
|
-
|
55
|
-
```swift
|
56
|
-
@IBAction func openQr(_ sender: UIButton) {
|
57
|
-
self.scan()
|
58
|
-
}
|
59
|
-
```
|
60
|
-
|
28
|
+
###### Found a **bug**, please open an issue.
|
61
29
|
|
62
30
|
Enjoy.
|
31
|
+
|
32
|
+
###### License
|
33
|
+
MIT
|
data/lib/parser.rb
CHANGED
@@ -139,8 +139,7 @@ class Parser
|
|
139
139
|
REALMCLASS
|
140
140
|
|
141
141
|
non_realm_funcs = <<-DEFAULT
|
142
|
-
\t\
|
143
|
-
\t\t\t\tself.init()
|
142
|
+
\t\trequired init?(map: Map) {
|
144
143
|
\t\t}
|
145
144
|
DEFAULT
|
146
145
|
# (map["friends"], ListTransform<User>())
|
@@ -162,10 +161,9 @@ DEFAULT
|
|
162
161
|
mapping_literals += mapping_literal
|
163
162
|
end
|
164
163
|
|
165
|
-
|
166
164
|
class_model = <<-CLASS
|
167
165
|
import ObjectMapper
|
168
|
-
import RealmSwift
|
166
|
+
#{@realm? "import RealmSwift\nimport ObjectMapper_Realm" : ""}
|
169
167
|
|
170
168
|
class #{class_name}:#{@realm? " Object," : ""} Mappable {
|
171
169
|
#{attribute_literals}
|
data/lib/veda/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: veda-apps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shishir sapkota
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -91,6 +91,7 @@ files:
|
|
91
91
|
- ".DS_Store"
|
92
92
|
- Gemfile
|
93
93
|
- Gemfile.lock
|
94
|
+
- LICENSE
|
94
95
|
- README.md
|
95
96
|
- Rakefile
|
96
97
|
- bin/veda
|