can_play 0.1.9 → 0.2.0

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
  SHA1:
3
- metadata.gz: d6dc17c15a1b6cfb8d414be291fffa2a8c0c1042
4
- data.tar.gz: 766a18b50d57f0271b3f15f9bea9e8c5a2b05fa3
3
+ metadata.gz: 829809925b3179fce5cb8b03140d5b66f65efacb
4
+ data.tar.gz: 4b05d13c459c921cc14af34ab07374471577d292
5
5
  SHA512:
6
- metadata.gz: 248b02c2fa7f2e0cbbb8a23ed822ce39c302fa48885ba7fc51d3928a1aa6ec13f0aff066f51db64dfeb77dc3fee21db746469f17f13ecb599f4feb26a6578de8
7
- data.tar.gz: 8099dbb6d7f64f0774775af8f4ed89e8867b170c21141dd99c6426a62e4cda0774907833d2c7b68e94c6a1d227d19159b5eddfc0ee7c2a186a7a90b262b6552c
6
+ metadata.gz: 4bfc3ce70ce00fe83bf83d3a8da069ee0996c230f7afdacebc4d8534b915da2a42b8932338090ac22f23b1dd57eeed99dc1c8a30e9cf18ffbfa1732138bcb157
7
+ data.tar.gz: 8945c14309e79517e5394ea23f219baa9de23598467dc8319c1c88b462bedcc65c99eb5e4e7630eb4ed1bcd3c4e5b93c781d627c0c577afde137d6667c83be7f
@@ -1,3 +1,3 @@
1
1
  module CanPlay
2
- VERSION = "0.1.9"
2
+ VERSION = "0.2.0"
3
3
  end
data/lib/can_play.rb CHANGED
@@ -71,9 +71,7 @@ module CanPlay
71
71
  opts = opts.with_indifferent_access
72
72
  group = {name: opts.delete(:name), klass: opts.delete(:klass)}
73
73
  elsif opts.is_a?(Module)
74
- can_play_name = I18n.t("can_play.class_name.#{opts.name.underscore.singularize}", default: '')
75
- model_name = I18n.t("activerecord.models.#{opts.name.underscore.singularize}", default: '')
76
- name = (can_play_name.present?||model_name.present?) ? opts.name.underscore.pluralize : opts.try(:table_name)
74
+ name = opts.try(:table_name).presence || opts.to_s.underscore.gsub('/', '_').pluralize
77
75
  group = {name: name, klass: opts}
78
76
  else
79
77
  # do nothing
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: can_play
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - happyming9527
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-22 00:00:00.000000000 Z
11
+ date: 2015-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  version: '0'
124
124
  requirements: []
125
125
  rubyforge_project:
126
- rubygems_version: 2.4.8
126
+ rubygems_version: 2.4.6
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: a permission system.