so_meta 0.1 → 0.2

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: 7cc31b12ab439bf5fbfac0762045583ad50ff114
4
- data.tar.gz: 8ba12f7521896e191c1a720eba78c968674acd9f
3
+ metadata.gz: 82705367b3364eff6ac8b2203bb90ec68b63719a
4
+ data.tar.gz: 2b817675f761c215d18cdb2a7db41e67a935471e
5
5
  SHA512:
6
- metadata.gz: 0a3ff149424b408af6a6857029916acca7bef5c72cf5ca0d809716982367b20dfe59a2dc6eedc32b85acbaa8b686d0e3e4edd402dcd6e1dc879adc3e0d4b9d1e
7
- data.tar.gz: 57dbce88cfa6e56aff0a18ed5ae9274210ffbfd9a26d014c261000e0c0204c739a7033136b152a46f267409d9f90615a463c35e17d040e27df1933dca2abc6c8
6
+ metadata.gz: 705bc1cdb69cac92febb3f4c5b6cb6ba012bebdd35fe4f9e7f8c16abba15e5414ebd8cc2c272169d1e34aec1f0bbdbd12024a9d28a4362d832a3da5a4814e55e
7
+ data.tar.gz: 5fcad65a807d6724c482da6b30024f27cd84f4c18dc6bd9e184720ffc7e330c291fce25773422feb49323b0919268346c3695db292e06f11710a215492e9103d
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format progress
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
- contact:
39
- title: "Contact %{name} | My Awesome New Rails Application" # Interpolation content from the view
40
- # By not specifying a description for this page, it'll inherit the defaults
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
@@ -1 +1,4 @@
1
1
  require "bundler/gem_tasks"
2
+ require 'rspec/core/rake_task'
3
+
4
+ task :default => :spec
@@ -1,5 +1,4 @@
1
1
  require "so_meta/version"
2
- require "so_meta/helper"
3
2
  require "so_meta/railtie" if defined?(Rails)
4
3
 
5
4
  module SoMeta
@@ -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.#{controller_name}.#{action_name}.#{name}", interpolation_data.merge(default: t("so_meta.defaults.#{name}")))
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)
@@ -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
- ActionView::Base.send :include, SoMeta::Helper
7
+ ActiveSupport.on_load(:action_view) do
8
+ include SoMeta::Helper
9
+ end
7
10
  end
8
11
  end
9
12
  end
@@ -1,3 +1,3 @@
1
1
  module SoMeta
2
- VERSION = "0.1"
2
+ VERSION = "0.2"
3
3
  end
@@ -20,4 +20,5 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.3"
22
22
  spec.add_development_dependency "rake"
23
+ spec.add_development_dependency "rspec"
23
24
  end
@@ -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.1'
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: 2013-09-14 00:00:00.000000000 Z
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.0.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