seamess 0.1.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.
Files changed (59) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +166 -0
  4. data/Rakefile +24 -0
  5. data/app/assets/config/seamess_manifest.js +2 -0
  6. data/app/assets/javascripts/seamess/application.js +13 -0
  7. data/app/assets/javascripts/seamess/manager.js +6 -0
  8. data/app/assets/stylesheets/seamess/manager.sass +2 -0
  9. data/app/assets/stylesheets/seamess/partials/footer.sass +7 -0
  10. data/app/assets/stylesheets/seamess/partials/layouts.sass +19 -0
  11. data/app/assets/stylesheets/seamess/partials/manager.sass +48 -0
  12. data/app/assets/stylesheets/seamess/partials/masthead.sass +27 -0
  13. data/app/assets/stylesheets/seamess/partials/shared.sass +5 -0
  14. data/app/assets/stylesheets/seamess/partials/variables.sass +2 -0
  15. data/app/assets/stylesheets/seamess/seamess.sass +1 -0
  16. data/app/controllers/seamess/application_controller.rb +5 -0
  17. data/app/controllers/seamess/manager/base_controller.rb +5 -0
  18. data/app/controllers/seamess/manager/dashboard_controller.rb +4 -0
  19. data/app/controllers/seamess/manager/pages_controller.rb +52 -0
  20. data/app/controllers/seamess/pages_controller.rb +10 -0
  21. data/app/helpers/seamess/application_helper.rb +4 -0
  22. data/app/jobs/seamess/application_job.rb +4 -0
  23. data/app/mailers/seamess/application_mailer.rb +6 -0
  24. data/app/models/seamess/application_record.rb +5 -0
  25. data/app/models/seamess/page.rb +16 -0
  26. data/app/views/layouts/seamess/application.html.haml +16 -0
  27. data/app/views/layouts/seamess/columnar.html.haml +3 -0
  28. data/app/views/layouts/seamess/fluid.html.haml +3 -0
  29. data/app/views/layouts/seamess/manager.html.haml +19 -0
  30. data/app/views/layouts/seamess/pages.html.haml +5 -0
  31. data/app/views/seamess/common/_after_head.html.haml +3 -0
  32. data/app/views/seamess/common/_after_yield.html.haml +7 -0
  33. data/app/views/seamess/common/_before_yield.html.haml +5 -0
  34. data/app/views/seamess/common/_callouts.html.haml +1 -0
  35. data/app/views/seamess/common/_drip.html.haml +13 -0
  36. data/app/views/seamess/common/_facebook_pixel.html.haml +13 -0
  37. data/app/views/seamess/common/_footer.html.haml +1 -0
  38. data/app/views/seamess/common/_google_analytics.html.haml +10 -0
  39. data/app/views/seamess/common/_head.html.haml +12 -0
  40. data/app/views/seamess/common/_javascripts.html.haml +3 -0
  41. data/app/views/seamess/common/_manager_sidebar.html.haml +13 -0
  42. data/app/views/seamess/common/_navbar.html.haml +18 -0
  43. data/app/views/seamess/manager/dashboard/dashboard.html.haml +1 -0
  44. data/app/views/seamess/manager/pages/_form.html.haml +8 -0
  45. data/app/views/seamess/manager/pages/edit.html.haml +4 -0
  46. data/app/views/seamess/manager/pages/index.html.haml +21 -0
  47. data/app/views/seamess/manager/pages/new.html.haml +3 -0
  48. data/app/views/seamess/pages/show.html.haml +2 -0
  49. data/app/views/seamess/pages/styles.html.haml +50 -0
  50. data/config/initializers/simple_form.rb +209 -0
  51. data/config/routes.rb +14 -0
  52. data/db/migrate/20170827174002_create_seamess_pages.rb +10 -0
  53. data/db/migrate/20170829085602_change_seamess_pages_slug_to_nullable.rb +9 -0
  54. data/db/seeds.rb +25 -0
  55. data/lib/seamess.rb +14 -0
  56. data/lib/seamess/engine.rb +9 -0
  57. data/lib/seamess/version.rb +3 -0
  58. data/lib/tasks/seamess_tasks.rake +4 -0
  59. metadata +269 -0
@@ -0,0 +1,14 @@
1
+ Seamess::Engine.routes.draw do
2
+ #
3
+ # Any route that comes before the wildcard will take priority, even if there
4
+ # is a page with the same slug.
5
+ namespace :manager, module: "manager" do
6
+ resources :pages
7
+ get "/", to: "dashboard#dashboard", as: :dashboard
8
+ root to: "dashboard#dashboard"
9
+ end
10
+
11
+ get "styles", to: "pages#styles", as: :styles
12
+ get "*slug", to: "pages#show"
13
+ root to: "pages#show"
14
+ end
@@ -0,0 +1,10 @@
1
+ class CreateSeamessPages < ActiveRecord::Migration[5.1]
2
+ def change
3
+ create_table :seamess_pages do |t|
4
+ t.string :title, nil: false, index: true
5
+ t.string :slug, nil: false, unique: true
6
+ t.text :body
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,9 @@
1
+ class ChangeSeamessPagesSlugToNullable < ActiveRecord::Migration[5.1]
2
+ def up
3
+ change_column :seamess_pages, :slug, :string, null: true
4
+ end
5
+
6
+ def down
7
+ change_column :seamess_pages, :slug, :string, null: false
8
+ end
9
+ end
@@ -0,0 +1,25 @@
1
+ # This file should contain all the record creation needed to seed the database with its default values.
2
+ # The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
3
+ #
4
+ # Examples:
5
+ #
6
+ # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
7
+ # Character.create(name: 'Luke', movie: movies.first)
8
+
9
+ ################################################################################
10
+ # Pages
11
+ ################################################################################
12
+
13
+ def entity_not_found?(klass, search_by, &block)
14
+ entity = klass.find_or_initialize_by(search_by)
15
+ if !entity.persisted?
16
+ block.call(entity)
17
+ puts "Created #{klass.to_s} with #{search_by.inspect}"
18
+ end
19
+ end
20
+
21
+ entity_not_found?(Seamess::Page, slug: '404') do |page404|
22
+ page404.title = "404 Not Found"
23
+ page404.body = "The requested page could not be found. Sorry!"
24
+ page404.save!
25
+ end
@@ -0,0 +1,14 @@
1
+ require "seamess/engine"
2
+ require "haml"
3
+ require "bootstrap"
4
+ require "jquery-rails"
5
+ require "active_link_to"
6
+ require "nestive"
7
+
8
+ module Seamess
9
+ mattr_accessor :admin_class
10
+
11
+ def self.admin_class
12
+ @@admin_class.constantize
13
+ end
14
+ end
@@ -0,0 +1,9 @@
1
+ module Seamess
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace Seamess
4
+
5
+ initializer "seamess.assets.precompile" do |app|
6
+ app.config.assets.precompile += %w( manager.css seamess/manager.js )
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,3 @@
1
+ module Seamess
2
+ VERSION = '0.1.0'
3
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :seamess do
3
+ # # Task goes here
4
+ # end
metadata ADDED
@@ -0,0 +1,269 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: seamess
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Rob Yurkowski
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-09-05 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 5.1.3
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 5.1.3
27
+ - !ruby/object:Gem::Dependency
28
+ name: sass-rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '5.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '5.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: haml
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bootstrap
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '='
60
+ - !ruby/object:Gem::Version
61
+ version: 4.0.0.beta
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '='
67
+ - !ruby/object:Gem::Version
68
+ version: 4.0.0.beta
69
+ - !ruby/object:Gem::Dependency
70
+ name: jquery-rails
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: kramdown
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: nestive
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: active_link_to
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: simple_form
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: pg
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: pry
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: pry-byebug
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ description: A Contemporary Content Management System
182
+ email:
183
+ - rob@yurkowski.net
184
+ executables: []
185
+ extensions: []
186
+ extra_rdoc_files: []
187
+ files:
188
+ - MIT-LICENSE
189
+ - README.md
190
+ - Rakefile
191
+ - app/assets/config/seamess_manifest.js
192
+ - app/assets/javascripts/seamess/application.js
193
+ - app/assets/javascripts/seamess/manager.js
194
+ - app/assets/stylesheets/seamess/manager.sass
195
+ - app/assets/stylesheets/seamess/partials/footer.sass
196
+ - app/assets/stylesheets/seamess/partials/layouts.sass
197
+ - app/assets/stylesheets/seamess/partials/manager.sass
198
+ - app/assets/stylesheets/seamess/partials/masthead.sass
199
+ - app/assets/stylesheets/seamess/partials/shared.sass
200
+ - app/assets/stylesheets/seamess/partials/variables.sass
201
+ - app/assets/stylesheets/seamess/seamess.sass
202
+ - app/controllers/seamess/application_controller.rb
203
+ - app/controllers/seamess/manager/base_controller.rb
204
+ - app/controllers/seamess/manager/dashboard_controller.rb
205
+ - app/controllers/seamess/manager/pages_controller.rb
206
+ - app/controllers/seamess/pages_controller.rb
207
+ - app/helpers/seamess/application_helper.rb
208
+ - app/jobs/seamess/application_job.rb
209
+ - app/mailers/seamess/application_mailer.rb
210
+ - app/models/seamess/application_record.rb
211
+ - app/models/seamess/page.rb
212
+ - app/views/layouts/seamess/application.html.haml
213
+ - app/views/layouts/seamess/columnar.html.haml
214
+ - app/views/layouts/seamess/fluid.html.haml
215
+ - app/views/layouts/seamess/manager.html.haml
216
+ - app/views/layouts/seamess/pages.html.haml
217
+ - app/views/seamess/common/_after_head.html.haml
218
+ - app/views/seamess/common/_after_yield.html.haml
219
+ - app/views/seamess/common/_before_yield.html.haml
220
+ - app/views/seamess/common/_callouts.html.haml
221
+ - app/views/seamess/common/_drip.html.haml
222
+ - app/views/seamess/common/_facebook_pixel.html.haml
223
+ - app/views/seamess/common/_footer.html.haml
224
+ - app/views/seamess/common/_google_analytics.html.haml
225
+ - app/views/seamess/common/_head.html.haml
226
+ - app/views/seamess/common/_javascripts.html.haml
227
+ - app/views/seamess/common/_manager_sidebar.html.haml
228
+ - app/views/seamess/common/_navbar.html.haml
229
+ - app/views/seamess/manager/dashboard/dashboard.html.haml
230
+ - app/views/seamess/manager/pages/_form.html.haml
231
+ - app/views/seamess/manager/pages/edit.html.haml
232
+ - app/views/seamess/manager/pages/index.html.haml
233
+ - app/views/seamess/manager/pages/new.html.haml
234
+ - app/views/seamess/pages/show.html.haml
235
+ - app/views/seamess/pages/styles.html.haml
236
+ - config/initializers/simple_form.rb
237
+ - config/routes.rb
238
+ - db/migrate/20170827174002_create_seamess_pages.rb
239
+ - db/migrate/20170829085602_change_seamess_pages_slug_to_nullable.rb
240
+ - db/seeds.rb
241
+ - lib/seamess.rb
242
+ - lib/seamess/engine.rb
243
+ - lib/seamess/version.rb
244
+ - lib/tasks/seamess_tasks.rake
245
+ homepage: ''
246
+ licenses:
247
+ - MIT
248
+ metadata: {}
249
+ post_install_message:
250
+ rdoc_options: []
251
+ require_paths:
252
+ - lib
253
+ required_ruby_version: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - ">="
256
+ - !ruby/object:Gem::Version
257
+ version: '0'
258
+ required_rubygems_version: !ruby/object:Gem::Requirement
259
+ requirements:
260
+ - - ">="
261
+ - !ruby/object:Gem::Version
262
+ version: '0'
263
+ requirements: []
264
+ rubyforge_project:
265
+ rubygems_version: 2.6.11
266
+ signing_key:
267
+ specification_version: 4
268
+ summary: A Contemporary Content Management System.
269
+ test_files: []