showcase 0.1.0 → 0.1.1
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 +4 -4
- data/README.md +12 -3
- data/lib/showcase/helpers.rb +0 -10
- data/lib/showcase/version.rb +1 -1
- data/showcase.gemspec +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9da87d3e97f733f9798a5d4db0ba8ead0e96fd81
|
4
|
+
data.tar.gz: c007232eadcecbc5447f520772e0a2eb7a2ff75a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f69407adef169d083d54fa092d2c3e981ffc414354932a6f171fdfc73136ee62a6f2cdce2179f01a8909b97da198d4018f471d410494e991629c0fdd2ce71f3b
|
7
|
+
data.tar.gz: 512c10d3efbf4592b558b29c1f6cc2df340e0d9715e8dc64160c69dc97266348f289a05666beb3c667a3f0c1709b293640fecaea62747c7703b4c51d54b51f20
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Showcase [](https://travis-ci.org/welaika/showcase)
|
2
2
|
|
3
|
-
|
3
|
+
A simple (< 100 lines of code) but powerful presenter implementation. Framework agnostic: works with Rails, Padrino or simply Sinatra.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -18,10 +18,18 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
With Rails, include `Showcase::Helpers` into your controller and/or views:
|
22
22
|
|
23
23
|
```ruby
|
24
|
-
|
24
|
+
# config/initializers/showcase.rb
|
25
|
+
ActionController::Base.send :include, Showcase::Helpers
|
26
|
+
ActionView::Base.send :include, Showcase::Helpers
|
27
|
+
```
|
28
|
+
|
29
|
+
With Padrino, include `Showcase::Helpers` in your app `helpers` block.
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
helpers do
|
25
33
|
include Showcase::Helpers
|
26
34
|
end
|
27
35
|
```
|
@@ -70,3 +78,4 @@ end
|
|
70
78
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
71
79
|
4. Push to the branch (`git push origin my-new-feature`)
|
72
80
|
5. Create new Pull Request
|
81
|
+
|
data/lib/showcase/helpers.rb
CHANGED
@@ -5,16 +5,6 @@ module Showcase
|
|
5
5
|
module Helpers
|
6
6
|
extend ActiveSupport::Concern
|
7
7
|
|
8
|
-
included do
|
9
|
-
if respond_to?(:helper_method)
|
10
|
-
helper_method :present
|
11
|
-
helper_method :present_collection
|
12
|
-
end
|
13
|
-
if respond_to?(:hide_action)
|
14
|
-
hide_action :presenter_context
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
8
|
def presenter_context
|
19
9
|
if respond_to? :view_context
|
20
10
|
view_context
|
data/lib/showcase/version.rb
CHANGED
data/showcase.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: showcase
|
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
|
- Stefano Verna
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-04-
|
11
|
+
date: 2013-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|