opencomponents-rails 0.1.0 → 0.2.0

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
  SHA1:
3
- metadata.gz: 6d47325974d4ae94b62bf8fcb3ae04451fc25b51
4
- data.tar.gz: 0de0e3246eb1f39ec2e895ddbf971c7aeb94fdb9
3
+ metadata.gz: 67237c99982878de5cc456e03e50cd97aa4c2e44
4
+ data.tar.gz: 22e16622845d93aa0c54b5250328b812c26f4699
5
5
  SHA512:
6
- metadata.gz: 1f7f02a3300533e112efdc920cede57711ae24395e707f9403846dccd4649657d68ca6ff584bdc988e6f99b947e3ecbfb7115a1e4de8a25cf3bc76f70d006ab9
7
- data.tar.gz: ca4d058d2b3cb2e838d2297546c3386ce4b5221049febcaa019d22f65c37fea57fa062ec61cf3bf33c5e06768f1674a2256229fb1d468eb6dae6b7d50ea72aa3
6
+ metadata.gz: f3aaf5c02d09320c3cd331fab01aed9133c86e29de2e6e36611dfbd8dc594b358cc696eb34067e8e11d37643cb26b6974d2a76e719602a4c0de19e9c664e8856
7
+ data.tar.gz: 2e3234b173e2de201b984b541c8b879ac86180bd8ae48c66c7aed70d6704f69b7ecc005106de28a91d9acaf50034677d05740735cbf855d49f93355d8038afec
data/README.md CHANGED
@@ -1,7 +1,9 @@
1
1
  # OpenComponents::Rails
2
2
  [![Build Status](https://travis-ci.org/opentable/opencomponents-rails.svg?branch=master)][1]
3
+ [![Gem Version](https://badge.fury.io/rb/opencomponents-rails.svg)][2]
3
4
 
4
5
  [1]:https://travis-ci.org/opentable/opencomponents-rails
6
+ [2]:http://badge.fury.io/rb/opencomponents-rails
5
7
 
6
8
  OpenComponents for Rails. This gem provides view helper methods for component
7
9
  rendering on both server- and client-side.
@@ -47,7 +49,7 @@ pipeline, add the library to your javascript manifest:
47
49
 
48
50
  Once that's done, you can use the `oc_component_tag` method in your views. You can either
49
51
  pass the method a fully formed `href` attribute or use the same options as `OpenComponents`
50
- [Renderer][2].
52
+ [Renderer][3].
51
53
  ```erb
52
54
  <%= oc_component_tag('my-sweet-component', href: 'http://localhost:3030/my-sweet-component/1.0.1?name=Zan') %>
53
55
 
@@ -63,9 +65,9 @@ In your view, simply call `render_component`:
63
65
  <%= render_component('my-sweet-component', params: {name: 'Zan'}, version: '1.0.1') %>
64
66
  ```
65
67
 
66
- The method accepts the same options as the `OpenComponents` [Renderer][2].
68
+ The method accepts the same options as the `OpenComponents` [Renderer][3].
67
69
 
68
- [2]:http://www.rubydoc.info/gems/opencomponents/OpenComponents/Renderer
70
+ [3]:http://www.rubydoc.info/gems/opencomponents/OpenComponents/Renderer
69
71
 
70
72
  ## Contributing
71
73
  Would be pretty cool of you. Open an Issue or PR if you find bugs or have ideas for improvements.
@@ -4,6 +4,8 @@ module OpenComponents::Rails
4
4
 
5
5
  include ::ActionView::Helpers::TagHelper
6
6
 
7
+ OC_COMPONENT_TAG = 'oc-component'.freeze
8
+
7
9
  # Returns a rendered component.
8
10
  #
9
11
  # render_component('my-component')
@@ -20,7 +22,7 @@ module OpenComponents::Rails
20
22
  #
21
23
  # Raises an error if the registry request times out and client failover is
22
24
  # disabled, otherwise will return an unrendered <oc-component> tag for
23
- # client-side rendered.
25
+ # client-side rendering.
24
26
  def render_component(component, opts = {})
25
27
  super(component, opts).html_safe
26
28
  rescue OpenComponents::RegistryTimeout
@@ -42,7 +44,7 @@ module OpenComponents::Rails
42
44
  # OC registry, component name, and params and version if they're available.
43
45
  #
44
46
  # oc_component_tag('my-component', params: {name: 'Zan'}, version: '1.0.2')
45
- # # => <oc-component href="http://localhost:3030/my-component/1.0.2?name=Zan">
47
+ # # => <oc-component href="http://localhost:3030/my-component/1.0.2?name=Zan" />
46
48
  #
47
49
  # oc_component_tag('my-component', href: 'http://some.registry/my-component')
48
50
  # # => <oc-component href="http://some.registry/my-component" />
@@ -60,7 +62,7 @@ module OpenComponents::Rails
60
62
  options[:href] << "?#{opts[:params].to_param}" if opts[:params]
61
63
  end
62
64
 
63
- tag('oc-component', options)
65
+ tag(OC_COMPONENT_TAG, options)
64
66
  end
65
67
  end
66
68
  end
@@ -1,5 +1,5 @@
1
1
  module OpenComponents
2
2
  module Rails
3
- VERSION = '0.1.0'
3
+ VERSION = '0.2.0'.freeze
4
4
  end
5
5
  end
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.required_ruby_version = '>= 1.9.3'
8
8
 
9
9
  spec.add_dependency 'opencomponents', '~> 0.4.0'
10
- spec.add_dependency 'railties', '~> 4.1', '< 5.0.0.alpha'
10
+ spec.add_dependency 'railties', '>= 4.1', '< 6'
11
11
  spec.add_development_dependency 'bundler', '~> 1.10'
12
12
 
13
13
  spec.authors = ['Todd Bealmear']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opencomponents-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todd Bealmear
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-15 00:00:00.000000000 Z
11
+ date: 2016-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opencomponents
@@ -28,22 +28,22 @@ dependencies:
28
28
  name: railties
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '4.1'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
- version: 5.0.0.alpha
36
+ version: '6'
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - "~>"
41
+ - - ">="
42
42
  - !ruby/object:Gem::Version
43
43
  version: '4.1'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
- version: 5.0.0.alpha
46
+ version: '6'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  version: '0'
95
95
  requirements: []
96
96
  rubyforge_project:
97
- rubygems_version: 2.2.2
97
+ rubygems_version: 2.4.5.1
98
98
  signing_key:
99
99
  specification_version: 4
100
100
  summary: Renders OpenComponents in your Rails views.