metamagic 3.0.0.beta3 → 3.0.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: 7768fc3e2aa2de60d8bfc92153d5d7fb4c1bf866
4
- data.tar.gz: bec05d33cae27e0e3fb2f8cd9a7b144b4133fbcb
3
+ metadata.gz: 51fe3e857376924eb66e388066c0c0b6a26e0ec8
4
+ data.tar.gz: 76f4eefc651bcf2efa087e9a283db8e747856447
5
5
  SHA512:
6
- metadata.gz: 350d4181da76a6eb163a68709c95d555cedd6b44d772140cf9b538b342d4a3dd66657739f48df88011df6f7d132ef670649a54ad5fe4f9a7172605b10cb6a210
7
- data.tar.gz: de4ca669406cd60f156a17e669ec4aff3a1b673ebefa65fed909c92fd783211169cc45e3aab46893670edd0ec5f0067f8606d95dff60b3857a9b4879b8dd9a6b
6
+ metadata.gz: 4ad6a68d73ce4b98057ff488618ccec093e2b6cd1a75b4611fc4f80795916b336073f4f206a243e71d64ed843e96b73eb020d3003ea26c354a4a45f8a18671bd
7
+ data.tar.gz: 87383b4816f9403bdc96daa0e381cb6a6b3616409c0c977c51ed427c0509670918d9453cad3458873c97cfbc7a0ff16c7c071ea2faa841a5ce90aad36fd3b523
data/.travis.yml CHANGED
@@ -1,5 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
+ - 2.1.0
3
4
  - 2.0.0
4
5
  - 1.9.3
5
6
  notifications:
data/README.md CHANGED
@@ -248,6 +248,15 @@ This will render the following:
248
248
  <custom_tag first="custom:key_two" second="My second key" />
249
249
  ```
250
250
 
251
+ When you register a new tag type, a shortcut helper is automatically defined. The above could therefore also be written as:
252
+
253
+ ```erb
254
+ <%
255
+ custom key_one: "My first key",
256
+ key_two: "My second key"
257
+ %>
258
+ ```
259
+
251
260
  Requirements
252
261
  ------------
253
262
 
@@ -35,6 +35,8 @@ module Metamagic
35
35
  end
36
36
 
37
37
  def add(hash = {})
38
+ raise ArgumentError, "Defining meta properties via arrays has been removed in Metamagic v3.0 and replaced by some pretty helpers. Please see the readme at https://github.com/lassebunk/metamagic for more info." if hash.is_a?(Array)
39
+
38
40
  transform_hash(hash).each do |k, v|
39
41
  klass = self.class.tag_type_for_key(k)
40
42
  tag = if klass.is_a?(Proc)
@@ -1,3 +1,3 @@
1
1
  module Metamagic
2
- VERSION = "3.0.0.beta3"
2
+ VERSION = "3.0.0"
3
3
  end
@@ -99,4 +99,10 @@ class HelperMethodsTest < ActionView::TestCase
99
99
  assert_equal %{<title>My Title</title>\n<meta content="one, two, three" name="keywords" />\n<meta content="My description." name="description" />\n<meta content="http://test.com/image.png" property="og:image" />\n<meta content="summary" property="twitter:card" />},
100
100
  metamagic
101
101
  end
102
+
103
+ test "old property definition" do
104
+ assert_raises ArgumentError do
105
+ meta [:property => "og:image", :content => "http://mydomain.com/images/my_image.jpg"]
106
+ end
107
+ end
102
108
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metamagic
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.beta3
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lasse Bunk
@@ -118,9 +118,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
118
118
  version: '0'
119
119
  required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  requirements:
121
- - - ">"
121
+ - - ">="
122
122
  - !ruby/object:Gem::Version
123
- version: 1.3.1
123
+ version: '0'
124
124
  requirements: []
125
125
  rubyforge_project:
126
126
  rubygems_version: 2.2.1