jap_mag 1.3.1 → 1.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e12032e8112941ff8369025bf1756381d5a5b22a76e21292563929ec89782596
4
- data.tar.gz: e43f8d23973ccb798833fa483cec7f836a64409583ebde40946492e16985519c
3
+ metadata.gz: ad7860047ecbc2f0eb308c5c14e8e07f9de20953f5dd711c2f8e1814e7cadeca
4
+ data.tar.gz: 434a1f22e88e06163adc8e203b1ea5ae59ca097feed8b2a86e339b0bd1540a6d
5
5
  SHA512:
6
- metadata.gz: 6279e898283afdc86c595b23f9cb460fd4060bee96a7c2c0e7c4b597794660bb602c7cf6e734a07daaf525d69456dd04395afcfdc9adf784aa8455390d5ae4bd
7
- data.tar.gz: '01790e45450d4eab622000f333619716bcc2e5fc1cc3c4538d39ca9745032b2d599af2ad5178793e6260c57235282965fb2e5d04ec5d6585d8585f5488fb63cb'
6
+ metadata.gz: 23c4a705759b652492b56e1f3570f166707bddf2e74a4c42f52224e020c2696657d2a705d421177015586a22d23d7bc4ccc8b8525d9560db6c5e5bd6b03d55d2
7
+ data.tar.gz: 15074ed2ba030db699231549944d3108bb37c116ee971df6102f8abfa940af4d424c2e7a4e0ca0a54d8ec2bd56a4c4a4cbfb5afe7ca0e8502b15edab6ab1e518
data/README.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # Introduction
2
2
 
3
- JapMag is a collection of frequently-used Rails controller methods and helpers.
3
+ JapMag is a collection of frequently-used Rails controller methods, helpers, Javascript functions and SASS mixins. It helps quickly bootstrap a Rails app.
4
+
5
+ For example, [current_controller_action_in?](https://github.com/felixding/JapMag/blob/master/lib/jap_mag.rb#L38) is a helper that checks if current request.controller and request.action match with a set of given rules. You can then for example show or hide certain things on your app depending if it matches or not.
6
+
7
+ Another example is [retina_image_tag](https://github.com/felixding/JapMag/blob/master/app/helpers/jap_mag_widgets_helper.rb#L164) which can easily generate HTML `img` tags for Retina/Non-retina screens. It also helps you deal with localized images.
8
+
9
+ This project was first created in 2012.
4
10
 
5
11
  ## Installation & Usage
6
12
 
@@ -1,7 +1,7 @@
1
1
  module JapMagWidgetsHelper
2
2
  def is_mobile_device?
3
3
  mobile_user_agents = 'palm|blackberry|nokia|phone|midp|mobi|symbian|chtml|ericsson|minimo|audiovox|motorola|samsung|telit|upg1|windows ce|ucweb|astel|plucker|x320|x240|j2me|sgh|portable|sprint|docomo|kddi|softbank|android|mmp|pdxgw|netfront|xiino|vodafone|portalmmm|sagem|mot-|sie-|ipod|up\\.b|webos|amoi|novarra|cdm|alcatel|pocket|iphone|mobileexplorer|mobile'
4
- request.user_agent.to_s.downcase =~ Regexp.new(mobile_user_agents)
4
+ (request.user_agent.to_s.downcase =~ Regexp.new(mobile_user_agents)) != nil
5
5
  end
6
6
 
7
7
  def get_body_class
@@ -1,3 +1,3 @@
1
1
  module JapMag
2
- VERSION = "1.3.1"
2
+ VERSION = "1.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jap_mag
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - DING Yu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-22 00:00:00.000000000 Z
11
+ date: 2021-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: will_paginate
@@ -72,8 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0'
74
74
  requirements: []
75
- rubyforge_project:
76
- rubygems_version: 2.7.7
75
+ rubygems_version: 3.1.4
77
76
  signing_key:
78
77
  specification_version: 4
79
78
  summary: jap_mag-