rooftop-rails-extras 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +24 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +621 -0
  5. data/README.md +162 -0
  6. data/Rakefile +2 -0
  7. data/app/controllers/concerns/rooftop/rails/extras/contact_form_handler.rb +46 -0
  8. data/app/helpers/rooftop/rails/extras/navigation_helper.rb +117 -0
  9. data/app/helpers/rooftop/rails/extras/related_fields_helper.rb +14 -0
  10. data/app/models/concerns/rooftop/rails/extras/contact_form.rb +51 -0
  11. data/app/models/concerns/rooftop/rails/extras/page_redirect.rb +20 -0
  12. data/app/models/concerns/rooftop/rails/extras/resolved_children.rb +21 -0
  13. data/app/models/concerns/rooftop/rails/extras/resource_search.rb +48 -0
  14. data/lib/generators/rooftop/extras_generator.rb +21 -0
  15. data/lib/generators/rooftop/page_generator.rb +14 -0
  16. data/lib/generators/rooftop/pages_controller_generator.rb +27 -0
  17. data/lib/generators/rooftop/post_generator.rb +9 -0
  18. data/lib/generators/rooftop/template_generator.rb +9 -0
  19. data/lib/generators/rooftop/templates/application.html.erb +14 -0
  20. data/lib/generators/rooftop/templates/index.html.erb +2 -0
  21. data/lib/generators/rooftop/templates/page_class.rb.erb +4 -0
  22. data/lib/generators/rooftop/templates/pages_controller.rb.erb +49 -0
  23. data/lib/generators/rooftop/templates/post_class.rb.erb +3 -0
  24. data/lib/generators/rooftop/templates/show.html.erb +3 -0
  25. data/lib/generators/rooftop/templates/template.html.erb +8 -0
  26. data/lib/rooftop/rails/extras/engine.rb +38 -0
  27. data/lib/rooftop/rails/extras/version.rb +7 -0
  28. data/lib/rooftop/rails/extras.rb +14 -0
  29. data/rooftop-rails-extras.gemspec +29 -0
  30. metadata +142 -0
@@ -0,0 +1,38 @@
1
+ module Rooftop
2
+ module Rails
3
+ module Extras
4
+ class Engine < ::Rails::Engine
5
+
6
+ isolate_namespace Rooftop::Rails::Extras
7
+
8
+ config.before_initialize do
9
+
10
+ end
11
+
12
+ initializer "add_helpers" do
13
+ ActiveSupport.on_load(:action_view) do
14
+ include Rooftop::Rails::Extras::NavigationHelper
15
+ include Rooftop::Rails::Extras::RelatedFieldsHelper
16
+
17
+ end
18
+ end
19
+
20
+ config.to_prepare do
21
+ ::Rails.application.eager_load!
22
+ if Rooftop::Page.page_classes.present?
23
+ Rooftop::Page.page_classes.each do |klass|
24
+ klass.send(:include, Rooftop::Rails::Extras::PageRedirect)
25
+ end
26
+ end
27
+ if Rooftop::Nested.nested_classes.present?
28
+ Rooftop::Nested.nested_classes.each do |klass|
29
+ klass.send(:include, Rooftop::Rails::Extras::ResolvedChildren)
30
+ end
31
+ end
32
+ end
33
+
34
+ end
35
+ end
36
+
37
+ end
38
+ end
@@ -0,0 +1,7 @@
1
+ module Rooftop
2
+ module Rails
3
+ module Extras
4
+ VERSION = "0.0.3"
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,14 @@
1
+ require 'rooftop'
2
+ require 'rooftop/rails'
3
+ require 'mail_form'
4
+
5
+ require 'require_all'
6
+ require_rel '.'
7
+
8
+ module Rooftop
9
+ module Rails
10
+ module Extras
11
+
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,29 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'rooftop/rails/extras/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "rooftop-rails-extras"
8
+ spec.version = Rooftop::Rails::Extras::VERSION
9
+ spec.authors = ["Ed Jones"]
10
+ spec.email = ["ed@errorstudio.co.uk"]
11
+ spec.summary = %q{A selection of handy mixins for building Rails sites quickly with Rooftop}
12
+ spec.description = %q{A selection of handy mixins for building Rails sites quickly with Rooftop}
13
+ spec.homepage = ""
14
+ spec.license = "GPLv3"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.6"
22
+ spec.add_development_dependency "rake"
23
+
24
+ spec.add_dependency 'require_all', '~> 1.3'
25
+ spec.add_dependency 'rooftop-rails', '0.0.6'
26
+ spec.add_dependency 'mail_form', '~> 1.5'
27
+
28
+
29
+ end
metadata ADDED
@@ -0,0 +1,142 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rooftop-rails-extras
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
+ platform: ruby
6
+ authors:
7
+ - Ed Jones
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-05-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: require_all
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '1.3'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '1.3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rooftop-rails
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '='
60
+ - !ruby/object:Gem::Version
61
+ version: 0.0.6
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '='
67
+ - !ruby/object:Gem::Version
68
+ version: 0.0.6
69
+ - !ruby/object:Gem::Dependency
70
+ name: mail_form
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: '1.5'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: '1.5'
83
+ description: A selection of handy mixins for building Rails sites quickly with Rooftop
84
+ email:
85
+ - ed@errorstudio.co.uk
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - .gitignore
91
+ - Gemfile
92
+ - LICENSE.txt
93
+ - README.md
94
+ - Rakefile
95
+ - app/controllers/concerns/rooftop/rails/extras/contact_form_handler.rb
96
+ - app/helpers/rooftop/rails/extras/navigation_helper.rb
97
+ - app/helpers/rooftop/rails/extras/related_fields_helper.rb
98
+ - app/models/concerns/rooftop/rails/extras/contact_form.rb
99
+ - app/models/concerns/rooftop/rails/extras/page_redirect.rb
100
+ - app/models/concerns/rooftop/rails/extras/resolved_children.rb
101
+ - app/models/concerns/rooftop/rails/extras/resource_search.rb
102
+ - lib/generators/rooftop/extras_generator.rb
103
+ - lib/generators/rooftop/page_generator.rb
104
+ - lib/generators/rooftop/pages_controller_generator.rb
105
+ - lib/generators/rooftop/post_generator.rb
106
+ - lib/generators/rooftop/template_generator.rb
107
+ - lib/generators/rooftop/templates/application.html.erb
108
+ - lib/generators/rooftop/templates/index.html.erb
109
+ - lib/generators/rooftop/templates/page_class.rb.erb
110
+ - lib/generators/rooftop/templates/pages_controller.rb.erb
111
+ - lib/generators/rooftop/templates/post_class.rb.erb
112
+ - lib/generators/rooftop/templates/show.html.erb
113
+ - lib/generators/rooftop/templates/template.html.erb
114
+ - lib/rooftop/rails/extras.rb
115
+ - lib/rooftop/rails/extras/engine.rb
116
+ - lib/rooftop/rails/extras/version.rb
117
+ - rooftop-rails-extras.gemspec
118
+ homepage: ''
119
+ licenses:
120
+ - GPLv3
121
+ metadata: {}
122
+ post_install_message:
123
+ rdoc_options: []
124
+ require_paths:
125
+ - lib
126
+ required_ruby_version: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - '>='
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
131
+ required_rubygems_version: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - '>='
134
+ - !ruby/object:Gem::Version
135
+ version: '0'
136
+ requirements: []
137
+ rubyforge_project:
138
+ rubygems_version: 2.2.2
139
+ signing_key:
140
+ specification_version: 4
141
+ summary: A selection of handy mixins for building Rails sites quickly with Rooftop
142
+ test_files: []