native 2.1.1 → 2.1.2
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/CHANGELOG.md +5 -0
- data/README.md +11 -9
- data/app/controllers/native/platforms_controller.rb +2 -4
- data/lib/native/version.rb +1 -1
- metadata +3 -4
- data/app/controllers/native/application_controller.rb +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 021c5831c428c4d827d6e21f274b3f9b5fdfb5bddbe84f973de9aedcd4850336
|
4
|
+
data.tar.gz: e8295425bbc47bb6e461b52c0cf9b63a03f03dfae3dcc9406274296e4610a186
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35b7df004ef8b30d2c086859833d975424b1cc0b76d8a731fb4957376d95bef847427fdc446032ce3a3ae15e01c3d6424620848c12e9758e7f980c3ee01faf85
|
7
|
+
data.tar.gz: 2ddff6aa9ff6e30e18f4e01125f5eb19b78ff26cc25a4def5bdf7c20e2072d5c87d7945af0b4a4823dd6bce7db14e382f95d156f5d7358b2c9c1ac13270560ef
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -14,13 +14,13 @@ Creating cross-platform apps with Rails has never been this simple, pleasing & p
|
|
14
14
|
|
15
15
|
**Platforms:**
|
16
16
|
|
17
|
-
* Android
|
18
|
-
* iOS
|
19
|
-
* Universal Windows Platform (Windows 10)
|
20
|
-
* Chrome
|
21
|
-
* OSX / MacOS
|
22
|
-
* Windows x32 / x64
|
23
|
-
* Linux x32 / x64
|
17
|
+
* Android (`android`)
|
18
|
+
* iOS (`ios`)
|
19
|
+
* Universal Windows Platform (Windows 10) (`uwp`)
|
20
|
+
* Chrome (`chrome`)
|
21
|
+
* OSX / MacOS (`osx`)
|
22
|
+
* Windows x32 / x64 (`win32`, `win64`)
|
23
|
+
* Linux x32 / x64 (`lin32`, `lin64`)
|
24
24
|
|
25
25
|
---
|
26
26
|
|
@@ -156,9 +156,11 @@ d.apps
|
|
156
156
|
|
157
157
|
If you are using Devise and your model is named `User`, the object returned by `current_user` will automatically be associated with the current app. If your Devise model is not named `User` or you are using a different user-management solution that does not implement a `current_user` method, you are able to override this default behavior.
|
158
158
|
|
159
|
-
Let's say our Devise model is named `Admin`. Just add a `
|
159
|
+
Let's say our Devise model is named `Admin`. Just add a `protected` method to your `ApplicationController`:
|
160
160
|
|
161
161
|
```ruby
|
162
|
+
protected
|
163
|
+
|
162
164
|
def set_app_owner
|
163
165
|
current_admin if current_admin
|
164
166
|
end
|
@@ -188,7 +190,7 @@ You can enable native notifications on most platforms. To handle notifications N
|
|
188
190
|
|
189
191
|
### Content scaling (Android)
|
190
192
|
|
191
|
-
NativeGap apps on Android often look scaled down. To fix this in your app add the following to `app/assets/native/android
|
193
|
+
NativeGap apps on Android often look scaled down. To fix this in your app add the following to `app/assets/javascripts/native/android.js`:
|
192
194
|
|
193
195
|
```js
|
194
196
|
//= require nativeScale
|
@@ -1,5 +1,3 @@
|
|
1
|
-
require_dependency 'native/application_controller'
|
2
|
-
|
3
1
|
module Native
|
4
2
|
class PlatformsController < ApplicationController
|
5
3
|
|
@@ -60,7 +58,7 @@ module Native
|
|
60
58
|
@app.platform = platform
|
61
59
|
@app.url = url
|
62
60
|
end
|
63
|
-
@app.owner =
|
61
|
+
@app.owner = set_app_owner
|
64
62
|
@app.last_used = Time.now
|
65
63
|
@app.save!
|
66
64
|
|
@@ -70,7 +68,7 @@ module Native
|
|
70
68
|
end
|
71
69
|
|
72
70
|
def set_app_owner
|
73
|
-
current_user if current_user
|
71
|
+
super || current_user if current_user
|
74
72
|
end
|
75
73
|
|
76
74
|
end
|
data/lib/native/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: native
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Hübotter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -71,7 +71,6 @@ files:
|
|
71
71
|
- LICENSE
|
72
72
|
- README.md
|
73
73
|
- Rakefile
|
74
|
-
- app/controllers/native/application_controller.rb
|
75
74
|
- app/controllers/native/platforms_controller.rb
|
76
75
|
- app/helpers/native_helper.rb
|
77
76
|
- app/models/concerns/native/app_lib.rb
|
@@ -124,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
123
|
version: '0'
|
125
124
|
requirements: []
|
126
125
|
rubyforge_project:
|
127
|
-
rubygems_version: 2.7.
|
126
|
+
rubygems_version: 2.7.4
|
128
127
|
signing_key:
|
129
128
|
specification_version: 4
|
130
129
|
summary: Build native apps for all major platforms from your Rails applications
|