so_meta 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +2 -0
- data/README.md +8 -3
- data/Rakefile +3 -0
- data/lib/so_meta.rb +0 -1
- data/lib/so_meta/helper.rb +1 -1
- data/lib/so_meta/railtie.rb +4 -1
- data/lib/so_meta/version.rb +1 -1
- data/so_meta.gemspec +1 -0
- data/spec/spec_helper.rb +19 -0
- metadata +28 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82705367b3364eff6ac8b2203bb90ec68b63719a
|
4
|
+
data.tar.gz: 2b817675f761c215d18cdb2a7db41e67a935471e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 705bc1cdb69cac92febb3f4c5b6cb6ba012bebdd35fe4f9e7f8c16abba15e5414ebd8cc2c272169d1e34aec1f0bbdbd12024a9d28a4362d832a3da5a4814e55e
|
7
|
+
data.tar.gz: 5fcad65a807d6724c482da6b30024f27cd84f4c18dc6bd9e184720ffc7e330c291fce25773422feb49323b0919268346c3695db292e06f11710a215492e9103d
|
data/.rspec
ADDED
data/README.md
CHANGED
@@ -35,9 +35,14 @@ en:
|
|
35
35
|
title: "About | My Awesome New Rails Application"
|
36
36
|
description: "Our company will blow your mind...like really."
|
37
37
|
|
38
|
-
|
39
|
-
|
40
|
-
|
38
|
+
pages-subresource: # Controller name - Pages::SubresourceController
|
39
|
+
about: # Action name - about
|
40
|
+
title: "About | My Awesome New Rails Application"
|
41
|
+
description: "Our company will blow your mind...like really."
|
42
|
+
|
43
|
+
contact:
|
44
|
+
title: "Contact %{name} | My Awesome New Rails Application" # Interpolation content from the view
|
45
|
+
# By not specifying a description for this page, it'll inherit the defaults
|
41
46
|
```
|
42
47
|
|
43
48
|
```Erb
|
data/Rakefile
CHANGED
data/lib/so_meta.rb
CHANGED
data/lib/so_meta/helper.rb
CHANGED
@@ -2,7 +2,7 @@ module SoMeta
|
|
2
2
|
module Helper
|
3
3
|
def so_meta(name)
|
4
4
|
interpolation_data = instance_variable_get("@so_meta_#{name}_interpolation") || {}
|
5
|
-
t("so_meta.#{
|
5
|
+
t("so_meta.#{controller_path.gsub(/\//, "-")}.#{action_name}.#{name}", interpolation_data.merge(default: t("so_meta.defaults.#{name}")))
|
6
6
|
end
|
7
7
|
|
8
8
|
def so_meta_interpolation(name, hash)
|
data/lib/so_meta/railtie.rb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
require 'rails'
|
2
|
+
require "so_meta/helper"
|
2
3
|
|
3
4
|
module SoMeta
|
4
5
|
class Railtie < Rails::Railtie
|
5
6
|
initializer "so_meta.helper" do
|
6
|
-
|
7
|
+
ActiveSupport.on_load(:action_view) do
|
8
|
+
include SoMeta::Helper
|
9
|
+
end
|
7
10
|
end
|
8
11
|
end
|
9
12
|
end
|
data/lib/so_meta/version.rb
CHANGED
data/so_meta.gemspec
CHANGED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require "so_meta"
|
2
|
+
|
3
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
4
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
5
|
+
# Require this file using `require "spec_helper"` to ensure that it is only
|
6
|
+
# loaded once.
|
7
|
+
#
|
8
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
9
|
+
RSpec.configure do |config|
|
10
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
11
|
+
config.run_all_when_everything_filtered = true
|
12
|
+
config.filter_run :focus
|
13
|
+
|
14
|
+
# Run specs in random order to surface order dependencies. If you find an
|
15
|
+
# order dependency and want to debug it, you can fix the order by providing
|
16
|
+
# the seed, which is printed after each run.
|
17
|
+
# --seed 1234
|
18
|
+
config.order = 'random'
|
19
|
+
end
|
metadata
CHANGED
@@ -1,41 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: so_meta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Hilkert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-08-01 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.3'
|
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.3'
|
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: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '0'
|
41
55
|
description: A gem to simply manage meta content (title, description, canonical url,
|
@@ -46,7 +60,8 @@ executables: []
|
|
46
60
|
extensions: []
|
47
61
|
extra_rdoc_files: []
|
48
62
|
files:
|
49
|
-
- .gitignore
|
63
|
+
- ".gitignore"
|
64
|
+
- ".rspec"
|
50
65
|
- Gemfile
|
51
66
|
- LICENSE.txt
|
52
67
|
- README.md
|
@@ -56,6 +71,7 @@ files:
|
|
56
71
|
- lib/so_meta/railtie.rb
|
57
72
|
- lib/so_meta/version.rb
|
58
73
|
- so_meta.gemspec
|
74
|
+
- spec/spec_helper.rb
|
59
75
|
homepage: https://github.com/brandonhilkert/so_meta
|
60
76
|
licenses:
|
61
77
|
- MIT
|
@@ -66,19 +82,20 @@ require_paths:
|
|
66
82
|
- lib
|
67
83
|
required_ruby_version: !ruby/object:Gem::Requirement
|
68
84
|
requirements:
|
69
|
-
- -
|
85
|
+
- - ">="
|
70
86
|
- !ruby/object:Gem::Version
|
71
87
|
version: '0'
|
72
88
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
73
89
|
requirements:
|
74
|
-
- -
|
90
|
+
- - ">="
|
75
91
|
- !ruby/object:Gem::Version
|
76
92
|
version: '0'
|
77
93
|
requirements: []
|
78
94
|
rubyforge_project:
|
79
|
-
rubygems_version: 2.
|
95
|
+
rubygems_version: 2.5.1
|
80
96
|
signing_key:
|
81
97
|
specification_version: 4
|
82
98
|
summary: A gem to simply manage meta content (title, description, canonical url, etc.)
|
83
99
|
from within a Rails application.
|
84
|
-
test_files:
|
100
|
+
test_files:
|
101
|
+
- spec/spec_helper.rb
|