frosting 0.0.3 → 0.0.4

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,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YWZhYTY4OTY0YjFmMzUyODQ2NDExYTUxZWRhZTZmMGE3MTdmMjc0ZQ==
5
- data.tar.gz: !binary |-
6
- Yjg0ODZiZTNmODVhZmNmMjZiN2JlM2I0M2YxZTg3ZjJiZGE4Y2FkMQ==
2
+ SHA1:
3
+ metadata.gz: fb33f00a9fdbb545bc21a76f2f31b732ce7f60bf
4
+ data.tar.gz: f0320edacdfd4fa5118c5a3192be04a050288a46
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- ZTk1YWFmMTgwNjI1ZWIzYWJkMmI0MmE4YjMyOGUwMGRmNTI3MGViOWU0YzYx
10
- NmQ5ZDAzZjkxMDIzOWE2MTdjMzZjMWU4OGViMjZkOTY5NGY3ODEyN2MxNjIw
11
- OTIxZDgyZTFlMDEyZWIxNjQ2ODUxZTI3Y2MyMWNjZDg2Mzc3ODA=
12
- data.tar.gz: !binary |-
13
- MjQ1MmI3Y2MzZDRiMzUxN2JhMWJmYjMyZTMzYTZiMjZmM2M4ZWJkYTlmNWM4
14
- YjczOGZmZGI1OTExYWM1MjA2YTMyMDkxYWI2ZDZiN2Q3MzkwYTk4MWQxNmI1
15
- NThiNjA5ZWU0ZGRjYzQ5NTliYTc5NTgwZDJhNjNkMzNkYTY2MjU=
6
+ metadata.gz: 9cf30cf7f046469be73216da9c3ed8be8413909dbb815dd159e1aa280f70d6e3aa9aafdd0719d4ab66939081128aa0822a7611a1740d56eda15df1e8cc06df9e
7
+ data.tar.gz: 131db38ff4414643a241635a8f01b5228a33599ba2ed63719c26af3c05a485f723c1a5ed7afb267e1a6b24bd4fb69a3b226c015c6a49c53da7cad46aa5b974a7
data/frosting.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'frosting'
3
- s.version = '0.0.3'
3
+ s.version = '0.0.4'
4
4
  s.date = '2014-02-04'
5
5
  s.summary = "Let's make presenters easy."
6
6
  s.description = "Adds some methods to your controllers and a base presenter. Get that presentation logic out of your models."
@@ -4,7 +4,13 @@ module Frosting
4
4
  class Railtie < ::Rails::Railtie
5
5
  initializer 'frosting.presentation' do
6
6
  ActiveSupport.on_load(:action_controller) do
7
- include Frosting::Presentation
7
+ define_method :present do |resource|
8
+ Repository.present(resource, { context: view_context })
9
+ end
10
+
11
+ define_method :present_collection do |resources, options|
12
+ Repository.present_collection(resources, { context: view_context }.merge(options))
13
+ end
8
14
  end
9
15
  end
10
16
  end
@@ -1,3 +1,3 @@
1
1
  module Frosting
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frosting
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Eddy
@@ -15,14 +15,14 @@ dependencies:
15
15
  name: activesupport
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ! '>='
18
+ - - '>='
19
19
  - !ruby/object:Gem::Version
20
20
  version: '0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ! '>='
25
+ - - '>='
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
28
  - !ruby/object:Gem::Dependency
@@ -82,12 +82,12 @@ require_paths:
82
82
  - lib
83
83
  required_ruby_version: !ruby/object:Gem::Requirement
84
84
  requirements:
85
- - - ! '>='
85
+ - - '>='
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  requirements:
90
- - - ! '>='
90
+ - - '>='
91
91
  - !ruby/object:Gem::Version
92
92
  version: '0'
93
93
  requirements: []