SaphyrWXK 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/SaphyrWXK.gemspec +5 -5
- data/lib/SaphyrWXK.rb +4 -1
- data/lib/SaphyrWXK/decorator/base.rb +11 -0
- data/lib/SaphyrWXK/decorator/extends.rb +18 -0
- data/lib/SaphyrWXK/version.rb +1 -1
- metadata +14 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e566f33c42a4fccfe2a6c49cc7344db1a3b258b8
|
4
|
+
data.tar.gz: 2abc3b379f231d501dac4c05f9674d669d7d02d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb00f56240c85150b29ad5df7f535dbeafb9c4253aacb49661a1159f90c5bf0408629f4d06bafb0957ef90e9c1d66438f0b78e2398eb6724628a6af3d8c872e1
|
7
|
+
data.tar.gz: e6cf754865e94616a484ff3e2da41d420420c37b7eb3320b8e17f049ad274b06830985c7eb59797338eddd45175125414b19b223625fe74c574305e02c766f04
|
data/SaphyrWXK.gemspec
CHANGED
@@ -14,11 +14,11 @@ Gem::Specification.new do |spec|
|
|
14
14
|
|
15
15
|
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
16
16
|
# delete this section to allow pushing this gem to any host.
|
17
|
-
if spec.respond_to?(:metadata)
|
18
|
-
|
19
|
-
else
|
20
|
-
|
21
|
-
end
|
17
|
+
# if spec.respond_to?(:metadata)
|
18
|
+
# spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
|
19
|
+
# else
|
20
|
+
# raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
21
|
+
# end
|
22
22
|
|
23
23
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
24
24
|
spec.bindir = "exe"
|
data/lib/SaphyrWXK.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
module SaphyrWXK::Decorator::ActiveRecordExtend
|
2
|
+
def decorate_with decorator_class
|
3
|
+
define_method :decorate, ->(**options){ decorator_class.new self, **options }
|
4
|
+
define_singleton_method :decorate, ->(**options){ all.map{ |record| decorator_class.new record, **options } }
|
5
|
+
end
|
6
|
+
|
7
|
+
ActiveRecord::Base.extend self
|
8
|
+
end
|
9
|
+
|
10
|
+
module SaphyrWXK::Decorator::ActionViewBaseExtend
|
11
|
+
def assign new_assigns
|
12
|
+
@_assigns = new_assigns.each do |key, value|
|
13
|
+
instance_variable_set("@#{key}", value.try(:decorate, view_context: self) || value)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
ActionView::Base.prepend self
|
18
|
+
end
|
data/lib/SaphyrWXK/version.rb
CHANGED
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: SaphyrWXK
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Petrachi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.10'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.10'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '10.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
41
|
description:
|
@@ -45,8 +45,8 @@ executables: []
|
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
|
-
- .gitignore
|
49
|
-
- .travis.yml
|
48
|
+
- ".gitignore"
|
49
|
+
- ".travis.yml"
|
50
50
|
- CODE_OF_CONDUCT.md
|
51
51
|
- Gemfile
|
52
52
|
- README.md
|
@@ -55,28 +55,29 @@ files:
|
|
55
55
|
- bin/console
|
56
56
|
- bin/setup
|
57
57
|
- lib/SaphyrWXK.rb
|
58
|
+
- lib/SaphyrWXK/decorator/base.rb
|
59
|
+
- lib/SaphyrWXK/decorator/extends.rb
|
58
60
|
- lib/SaphyrWXK/version.rb
|
59
61
|
homepage: https://github.com/petrachi/SaphyrWXK
|
60
62
|
licenses: []
|
61
|
-
metadata:
|
62
|
-
allowed_push_host: 'TODO: Set to ''http://mygemserver.com'''
|
63
|
+
metadata: {}
|
63
64
|
post_install_message:
|
64
65
|
rdoc_options: []
|
65
66
|
require_paths:
|
66
67
|
- lib
|
67
68
|
required_ruby_version: !ruby/object:Gem::Requirement
|
68
69
|
requirements:
|
69
|
-
- -
|
70
|
+
- - ">="
|
70
71
|
- !ruby/object:Gem::Version
|
71
72
|
version: '0'
|
72
73
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
73
74
|
requirements:
|
74
|
-
- -
|
75
|
+
- - ">="
|
75
76
|
- !ruby/object:Gem::Version
|
76
77
|
version: '0'
|
77
78
|
requirements: []
|
78
79
|
rubyforge_project:
|
79
|
-
rubygems_version: 2.
|
80
|
+
rubygems_version: 2.4.6
|
80
81
|
signing_key:
|
81
82
|
specification_version: 4
|
82
83
|
summary: Saphyr Kit for Saphyr WX
|