native 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: adf08cc05c139ad102c40376c26a7aa4ba109d5560264bf11f47074b6acb0dac
4
- data.tar.gz: 61bc8444e11fdfffc6121e795b76beeaf1599def2f6761e5ff06bb6f039be416
3
+ metadata.gz: 3c9487166fab6292d3ced2ed2e03d84bd9ba446e4462178be9b9f1a566edd1ac
4
+ data.tar.gz: a7fbcf4ebd7ab0a2e9c517efc08f362aeb29a5aabac5fe37aa65d838e818fccc
5
5
  SHA512:
6
- metadata.gz: cbd90a80e5dcb830be66244426b91536f5ba529676181a88c9cc2bf792d8b231ddd74a3fb19386e95d7cc2d90de314d0ec441ee85dd2303988134e6dfa63ad07
7
- data.tar.gz: 57bc32905f7ad0c1758d3a6039a4f39d4cd153a5c3dd978a8d18e7711c8c2751797daf3076330836c0ea8edd1b7209138cb6d0a866d054794b0f9d8f8df1adea
6
+ metadata.gz: 8599632781aedf75103f7a4de50f82904fe9fd3ef1d42c55a46887d13a0db9dcd811e25f1aadc5070c3d3aa57e7aeb38a11c1ba46109da8ecbe9ef5531a2e2bb
7
+ data.tar.gz: 74f1e4a8568ed6873f12f64d02bcfa07c8ae77d1fd9444421a7051545b49f1f746af28e8d08981318198411507e2e709f770c3c1738b54fdfcbc141a2b51832c
data/CHANGELOG.md CHANGED
@@ -4,6 +4,11 @@
4
4
 
5
5
  * nothing yet
6
6
 
7
+ ### 2.1.1 - 2017-12-28
8
+
9
+ * bugfixes
10
+ * fixed `uses_native_apps` method
11
+
7
12
  ### 2.1.0 - 2017-12-28
8
13
 
9
14
  * features
data/README.md CHANGED
@@ -166,6 +166,12 @@ end
166
166
 
167
167
  **Note:** Essentially `set_app_owner` has to return a class object *or* `nil`.
168
168
 
169
+ Now you are able to access the applications used by an user:
170
+
171
+ ```ruby
172
+ User.first.native_apps
173
+ ```
174
+
169
175
  ### View methods
170
176
 
171
177
  **`current_app`** Returns `App` object related to current session. Returns `nil` when the Rails is being used normally.
data/lib/native/owner.rb CHANGED
@@ -7,7 +7,7 @@ module Native
7
7
 
8
8
  module ClassMethods
9
9
  def uses_native_apps
10
- has_many :apps, class_name: 'Native::App', as: :owner, dependent: :destroy
10
+ has_many :native_apps, class_name: 'Native::App', as: :owner, dependent: :destroy
11
11
  end
12
12
  end
13
13
 
@@ -3,13 +3,15 @@ require 'rails'
3
3
  module Native
4
4
  class Railtie < Rails::Railtie
5
5
 
6
- initializer 'native.initialize' do
7
- Rails.application.config.assets.precompile += %w( native/android.js native/ios.js native/uwp.js native/chrome.js native/osx.js native/win32.js native/win64.js native/lin32.js native/lin64.js native/web.js native/android.css native/ios.css native/uwp.css native/chrome.css native/osx.css native/win32.css native/win64.css native/lin32.css native/lin64.css native/web.css )
8
-
6
+ initializer 'native.active_record' do
9
7
  ActiveSupport.on_load :active_record do
10
8
  include Native::Owner
11
9
  end
12
10
  end
13
11
 
12
+ initializer 'native.sprockets-rails' do
13
+ Rails.application.config.assets.precompile += %w( native/android.js native/ios.js native/uwp.js native/chrome.js native/osx.js native/win32.js native/win64.js native/lin32.js native/lin64.js native/web.js native/android.css native/ios.css native/uwp.css native/chrome.css native/osx.css native/win32.css native/win64.css native/lin32.css native/lin64.css native/web.css )
14
+ end
15
+
14
16
  end
15
17
  end
@@ -1,5 +1,5 @@
1
1
  module Native
2
2
 
3
- VERSION = '2.1.0'
3
+ VERSION = '2.1.1'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: native
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Hübotter