effective_regions 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +580 -0
- data/Rakefile +23 -0
- data/app/assets/images/effective/templates/image_and_title.png +0 -0
- data/app/assets/javascripts/effective/snippets/current_user_info.js.coffee +24 -0
- data/app/controllers/effective/regions_controller.rb +154 -0
- data/app/helpers/effective_regions_helper.rb +108 -0
- data/app/models/concerns/acts_as_regionable.rb +34 -0
- data/app/models/effective/access_denied.rb +17 -0
- data/app/models/effective/region.rb +44 -0
- data/app/models/effective/snippets/current_user_info.rb +12 -0
- data/app/models/effective/snippets/snippet.rb +69 -0
- data/app/models/effective/templates/image_and_title.rb +13 -0
- data/app/models/effective/templates/template.rb +26 -0
- data/app/views/effective/snippets/_current_user_info.html.haml +10 -0
- data/app/views/effective/templates/_image_and_title.html.haml +5 -0
- data/config/routes.rb +19 -0
- data/db/migrate/01_create_effective_regions.rb.erb +23 -0
- data/lib/effective_regions.rb +57 -0
- data/lib/effective_regions/engine.rb +27 -0
- data/lib/effective_regions/version.rb +3 -0
- data/lib/generators/effective_regions/install_generator.rb +32 -0
- data/lib/generators/templates/README +1 -0
- data/lib/generators/templates/effective_regions.rb +71 -0
- data/lib/tasks/effective_regions_tasks.rake +4 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +59 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +58 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +16 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +20 -0
- data/spec/dummy/log/test.log +2 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/effective_regions_spec.rb +7 -0
- data/spec/spec_helper.rb +34 -0
- data/spec/support/factories.rb +1 -0
- metadata +199 -0
Binary file
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended to check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(:version => 0) do
|
15
|
+
|
16
|
+
end
|
Binary file
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Connecting to database specified by database.yml
|
2
|
+
[1m[36m (0.4ms)[0m [1mselect sqlite_version(*)[0m
|
3
|
+
[1m[35m (3.5ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
4
|
+
[1m[36m (2.2ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
5
|
+
[1m[35m (38.3ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
6
|
+
Connecting to database specified by database.yml
|
7
|
+
[1m[36m (1.6ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
8
|
+
Connecting to database specified by database.yml
|
9
|
+
[1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
10
|
+
[1m[35m (2.2ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
11
|
+
Connecting to database specified by database.yml
|
12
|
+
[1m[36m (1.9ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
13
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
14
|
+
[1m[36m (2.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
15
|
+
[1m[35m (2.7ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
16
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
17
|
+
[1m[35m (2.0ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('0')
|
18
|
+
Connecting to database specified by database.yml
|
19
|
+
[1m[36m (18.3ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
20
|
+
[1m[35m (0.2ms)[0m SELECT version FROM "schema_migrations"
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/404.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
23
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/422.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The change you wanted was rejected.</h1>
|
23
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/500.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>We're sorry, but something went wrong.</h1>
|
23
|
+
</div>
|
24
|
+
</body>
|
25
|
+
</html>
|
File without changes
|
@@ -0,0 +1,6 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
+
|
4
|
+
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
5
|
+
require File.expand_path('../../config/boot', __FILE__)
|
6
|
+
require 'rails/commands'
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
ENV["RAILS_ENV"] ||= 'test'
|
2
|
+
|
3
|
+
require File.expand_path("../dummy/config/environment", __FILE__)
|
4
|
+
|
5
|
+
require 'rspec/rails'
|
6
|
+
require 'rspec/autorun'
|
7
|
+
require 'factory_girl_rails'
|
8
|
+
|
9
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
10
|
+
# in spec/support/ and its subdirectories.
|
11
|
+
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f }
|
12
|
+
|
13
|
+
RSpec.configure do |config|
|
14
|
+
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
15
|
+
|
16
|
+
Rails.logger.level = 4 # Output only minimal stuff to test.log
|
17
|
+
|
18
|
+
config.use_transactional_fixtures = true # Make this false to once again use DatabaseCleaner
|
19
|
+
config.infer_base_class_for_anonymous_controllers = false
|
20
|
+
config.order = 'random'
|
21
|
+
end
|
22
|
+
|
23
|
+
class ActiveRecord::Base
|
24
|
+
mattr_accessor :shared_connection
|
25
|
+
@@shared_connection = nil
|
26
|
+
|
27
|
+
def self.connection
|
28
|
+
@@shared_connection || retrieve_connection
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
# Forces all threads to share the same connection. This works on
|
33
|
+
# Capybara because it starts the web server in a thread.
|
34
|
+
ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'factory_girl'
|
metadata
ADDED
@@ -0,0 +1,199 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: effective_regions
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Code and Effect
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-12-08 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: 3.2.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.2.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: effective_ckeditor
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
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: migrant
|
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: virtus
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: Create editable content regions within your existing, ordinary ActionView::Base
|
70
|
+
views, and update content with an actually-good full-screen WYSIWYG editor.
|
71
|
+
email:
|
72
|
+
- info@codeandeffect.com
|
73
|
+
executables: []
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- MIT-LICENSE
|
78
|
+
- README.md
|
79
|
+
- Rakefile
|
80
|
+
- app/assets/images/effective/templates/image_and_title.png
|
81
|
+
- app/assets/javascripts/effective/snippets/current_user_info.js.coffee
|
82
|
+
- app/controllers/effective/regions_controller.rb
|
83
|
+
- app/helpers/effective_regions_helper.rb
|
84
|
+
- app/models/concerns/acts_as_regionable.rb
|
85
|
+
- app/models/effective/access_denied.rb
|
86
|
+
- app/models/effective/region.rb
|
87
|
+
- app/models/effective/snippets/current_user_info.rb
|
88
|
+
- app/models/effective/snippets/snippet.rb
|
89
|
+
- app/models/effective/templates/image_and_title.rb
|
90
|
+
- app/models/effective/templates/template.rb
|
91
|
+
- app/views/effective/snippets/_current_user_info.html.haml
|
92
|
+
- app/views/effective/templates/_image_and_title.html.haml
|
93
|
+
- config/routes.rb
|
94
|
+
- db/migrate/01_create_effective_regions.rb.erb
|
95
|
+
- lib/effective_regions.rb
|
96
|
+
- lib/effective_regions/engine.rb
|
97
|
+
- lib/effective_regions/version.rb
|
98
|
+
- lib/generators/effective_regions/install_generator.rb
|
99
|
+
- lib/generators/templates/README
|
100
|
+
- lib/generators/templates/effective_regions.rb
|
101
|
+
- lib/tasks/effective_regions_tasks.rake
|
102
|
+
- spec/dummy/README.rdoc
|
103
|
+
- spec/dummy/Rakefile
|
104
|
+
- spec/dummy/app/assets/javascripts/application.js
|
105
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
106
|
+
- spec/dummy/app/controllers/application_controller.rb
|
107
|
+
- spec/dummy/app/helpers/application_helper.rb
|
108
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
109
|
+
- spec/dummy/config.ru
|
110
|
+
- spec/dummy/config/application.rb
|
111
|
+
- spec/dummy/config/boot.rb
|
112
|
+
- spec/dummy/config/database.yml
|
113
|
+
- spec/dummy/config/environment.rb
|
114
|
+
- spec/dummy/config/environments/development.rb
|
115
|
+
- spec/dummy/config/environments/production.rb
|
116
|
+
- spec/dummy/config/environments/test.rb
|
117
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
118
|
+
- spec/dummy/config/initializers/inflections.rb
|
119
|
+
- spec/dummy/config/initializers/mime_types.rb
|
120
|
+
- spec/dummy/config/initializers/secret_token.rb
|
121
|
+
- spec/dummy/config/initializers/session_store.rb
|
122
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
123
|
+
- spec/dummy/config/locales/en.yml
|
124
|
+
- spec/dummy/config/routes.rb
|
125
|
+
- spec/dummy/db/development.sqlite3
|
126
|
+
- spec/dummy/db/schema.rb
|
127
|
+
- spec/dummy/db/test.sqlite3
|
128
|
+
- spec/dummy/log/development.log
|
129
|
+
- spec/dummy/log/test.log
|
130
|
+
- spec/dummy/public/404.html
|
131
|
+
- spec/dummy/public/422.html
|
132
|
+
- spec/dummy/public/500.html
|
133
|
+
- spec/dummy/public/favicon.ico
|
134
|
+
- spec/dummy/script/rails
|
135
|
+
- spec/effective_regions_spec.rb
|
136
|
+
- spec/spec_helper.rb
|
137
|
+
- spec/support/factories.rb
|
138
|
+
homepage: https://github.com/code-and-effect/effective_regions
|
139
|
+
licenses:
|
140
|
+
- MIT
|
141
|
+
metadata: {}
|
142
|
+
post_install_message:
|
143
|
+
rdoc_options: []
|
144
|
+
require_paths:
|
145
|
+
- lib
|
146
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - ">="
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '0'
|
151
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
|
+
requirements:
|
153
|
+
- - ">="
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: '0'
|
156
|
+
requirements: []
|
157
|
+
rubyforge_project:
|
158
|
+
rubygems_version: 2.4.3
|
159
|
+
signing_key:
|
160
|
+
specification_version: 4
|
161
|
+
summary: Create editable content regions within your existing, ordinary ActionView::Base
|
162
|
+
views, and update content with an actually-good full-screen WYSIWYG editor.
|
163
|
+
test_files:
|
164
|
+
- spec/dummy/app/assets/javascripts/application.js
|
165
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
166
|
+
- spec/dummy/app/controllers/application_controller.rb
|
167
|
+
- spec/dummy/app/helpers/application_helper.rb
|
168
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
169
|
+
- spec/dummy/config/application.rb
|
170
|
+
- spec/dummy/config/boot.rb
|
171
|
+
- spec/dummy/config/database.yml
|
172
|
+
- spec/dummy/config/environment.rb
|
173
|
+
- spec/dummy/config/environments/development.rb
|
174
|
+
- spec/dummy/config/environments/production.rb
|
175
|
+
- spec/dummy/config/environments/test.rb
|
176
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
177
|
+
- spec/dummy/config/initializers/inflections.rb
|
178
|
+
- spec/dummy/config/initializers/mime_types.rb
|
179
|
+
- spec/dummy/config/initializers/secret_token.rb
|
180
|
+
- spec/dummy/config/initializers/session_store.rb
|
181
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
182
|
+
- spec/dummy/config/locales/en.yml
|
183
|
+
- spec/dummy/config/routes.rb
|
184
|
+
- spec/dummy/config.ru
|
185
|
+
- spec/dummy/db/development.sqlite3
|
186
|
+
- spec/dummy/db/schema.rb
|
187
|
+
- spec/dummy/db/test.sqlite3
|
188
|
+
- spec/dummy/log/development.log
|
189
|
+
- spec/dummy/log/test.log
|
190
|
+
- spec/dummy/public/404.html
|
191
|
+
- spec/dummy/public/422.html
|
192
|
+
- spec/dummy/public/500.html
|
193
|
+
- spec/dummy/public/favicon.ico
|
194
|
+
- spec/dummy/Rakefile
|
195
|
+
- spec/dummy/README.rdoc
|
196
|
+
- spec/dummy/script/rails
|
197
|
+
- spec/effective_regions_spec.rb
|
198
|
+
- spec/spec_helper.rb
|
199
|
+
- spec/support/factories.rb
|