light_mobile 0.0.10 → 0.0.11

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 88d79a8e16305070763ddc38dbf01dd81f96d7c9
4
- data.tar.gz: 0fc371a4cf626b37f0dddb366dae6ae349c49a60
3
+ metadata.gz: 0d478dcd68bc812a61d50e200a94def2e2c82af9
4
+ data.tar.gz: eae06f42db0d202410d33f6be6f1d6351d2015a0
5
5
  SHA512:
6
- metadata.gz: ae33bdce7513ac73725bbec6857ff6cae77c4836b95e1841340d472d3d038deece368453d636f1d3332556e1caa60a03cbe9ef596940d4d0973f2d3466069208
7
- data.tar.gz: 464743bec1cc0c681b30620a8df9b80709527f85fadb6b99940811b9d65450c7bffb5c01b8b1e3039ff2d017974ee6bc643c90c76b546154e16fd3aa3a879ea8
6
+ metadata.gz: 565e659480f7a03e1f95e6c71b76a64cc8ef0bb5f3114d23fb9a42f0137ca0d9b53c9cd73e24405613bd173b287f2bcbe31fc6c6a1439a4fe04eff09d6ebbbd6
7
+ data.tar.gz: 7cb45c7537177dbdae16ab6dc7d8cfa63f4a0b31062eb1017b1f78721cf022c734c1977d5f6d81b7efa4fe31dde63b652f8f5bb439305aa11d27b21959f30338
data/README.md CHANGED
@@ -21,6 +21,16 @@ class ApplicationController < ActionController::Base
21
21
  end
22
22
  ```
23
23
 
24
+ ### ApplicationHelper
25
+
26
+ Add this include to your ApplicationHelper.
27
+
28
+ ```ruby
29
+ module ApplicationHelper
30
+ include LightMobile::ApplicationHelper
31
+ end
32
+ ```
33
+
24
34
  ### MimeTypes
25
35
 
26
36
  Add this to "config/initializers/mime_types.rb":
@@ -51,6 +61,23 @@ Add a new file "app/assets/javascripts/application_mobile.js.coffee":
51
61
 
52
62
  ## Usage
53
63
 
64
+ ### Basic layout
65
+
66
+ ```haml
67
+ - content_for :menu_items do
68
+ - if signed_in?
69
+ .menu_item= link_to t(".frontpage"), root_path
70
+ - if can? :index, Organization
71
+ .menu_item= link_to Organization.model_name.human(count: 2), organizations_path
72
+ .menu_item= link_to t(".sign_out"), destroy_user_session_path, method: :delete
73
+
74
+ - content_for :head do
75
+ = stylesheet_link_tag "application_mobile"
76
+ = javascript_include_tag "application_mobile"
77
+
78
+ = render "layouts/light_mobile_basic_layout"
79
+ ```
80
+
54
81
  ### Tabs
55
82
 
56
83
  ```haml
@@ -1,4 +1,3 @@
1
- module LightMobile
2
- module ApplicationHelper
3
- end
1
+ module LightMobile::ApplicationHelper
2
+ include AgentHelpers::DetectorHelper
4
3
  end
data/lib/light_mobile.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require "light_mobile/engine"
2
2
  require "html_gen"
3
+ require "agent_helpers"
3
4
 
4
5
  module LightMobile
5
6
  def self.const_missing(name)
@@ -1,3 +1,3 @@
1
1
  module LightMobile
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: light_mobile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kasper Johansen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-12 00:00:00.000000000 Z
11
+ date: 2015-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.0.6
41
+ - !ruby/object:Gem::Dependency
42
+ name: agent_helpers
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: 0.0.5
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 0.0.5
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: sqlite3
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -138,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
152
  version: '0'
139
153
  requirements: []
140
154
  rubyforge_project:
141
- rubygems_version: 2.4.0
155
+ rubygems_version: 2.2.2
142
156
  signing_key:
143
157
  specification_version: 4
144
158
  summary: Lightweight UI for mobile Rails apps.