views 0.0.1
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 +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +37 -0
- data/lib/generators/views/templates/view.sql +0 -0
- data/lib/generators/views/view_generator.rb +15 -0
- data/lib/tasks/views.rake +7 -0
- data/lib/views/version.rb +3 -0
- data/lib/views.rb +52 -0
- data/test/dummy/Rakefile +5 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/models/product.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +12 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +29 -0
- data/test/dummy/config/application.rb +25 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +10 -0
- data/test/dummy/config/database.yml.travis +12 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +41 -0
- data/test/dummy/config/environments/production.rb +79 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +56 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/migrate/20161017172847_create_products.rb +10 -0
- data/test/dummy/db/schema.rb +26 -0
- data/test/dummy/db/views/guitars.sql +7 -0
- data/test/dummy/log/development.log +68 -0
- data/test/dummy/log/test.log +1138 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/generators_test.rb +19 -0
- data/test/tasks_test.rb +28 -0
- data/test/test_helper.rb +14 -0
- metadata +185 -0
@@ -0,0 +1,22 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
|
6
|
+
# Make sure the secret is at least 30 characters and all random,
|
7
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
+
# You can use `rake secret` to generate a secure secret key.
|
9
|
+
|
10
|
+
# Make sure the secrets in this file are kept private
|
11
|
+
# if you're sharing your code publicly.
|
12
|
+
|
13
|
+
development:
|
14
|
+
secret_key_base: a462a71b37fda26c6c5bb2512ba1c4409a7e98106ec5544e659a214a830e818b30323861f5edac24b84eb94a3da0aceb5fe71324eb4162af1bdfb932791e82c1
|
15
|
+
|
16
|
+
test:
|
17
|
+
secret_key_base: bca8c7ab4adb2e383b8febce8f8890fe46d44424e69636ae5abe55b05a79a2109272a262560ad63df5f2575c459cc37107cbc5e6ad134be0191d58c0be70db7e
|
18
|
+
|
19
|
+
# Do not keep production secrets in the repository,
|
20
|
+
# instead read values from the environment.
|
21
|
+
production:
|
22
|
+
secret_key_base: <%= ENV['SECRET_KEY_BASE'] %>
|
@@ -0,0 +1,26 @@
|
|
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 that you check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(version: 20161017172847) do
|
15
|
+
|
16
|
+
# These are extensions that must be enabled in order to support this database
|
17
|
+
enable_extension "plpgsql"
|
18
|
+
|
19
|
+
create_table "products", force: :cascade do |t|
|
20
|
+
t.string "name"
|
21
|
+
t.string "category"
|
22
|
+
t.datetime "created_at", null: false
|
23
|
+
t.datetime "updated_at", null: false
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.8ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2
|
+
Migrating to CreateUsers (20161017172847)
|
3
|
+
[1m[35m (0.2ms)[0m BEGIN
|
4
|
+
[1m[36m (25.2ms)[0m [1mCREATE TABLE "users" ("id" serial primary key, "name" character varying, "enabled" boolean, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
5
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
6
|
+
[1m[36m (2.3ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
7
|
+
[1m[35m (1.3ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
8
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
9
|
+
Migrating to CreateUsers (20161017172847)
|
10
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11
|
+
[1m[36m (2.4ms)[0m [1mCREATE TABLE "users" ("id" serial primary key, "name" character varying, "enabled" boolean, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
12
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161017172847"]]
|
13
|
+
[1m[36m (6.3ms)[0m [1mCOMMIT[0m
|
14
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
15
|
+
[1m[36m (1.7ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
16
|
+
FROM pg_constraint c
|
17
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
18
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
19
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
20
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
21
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
22
|
+
WHERE c.contype = 'f'
|
23
|
+
AND t1.relname = 'users'
|
24
|
+
AND t3.nspname = ANY (current_schemas(false))
|
25
|
+
ORDER BY c.conname
|
26
|
+
[0m
|
27
|
+
[1m[36m (2.3ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
28
|
+
[1m[35m (12.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
29
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
30
|
+
Migrating to CreateProducts (20161017172847)
|
31
|
+
[1m[35m (0.2ms)[0m BEGIN
|
32
|
+
[1m[36m (7.4ms)[0m [1mCREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
33
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161017172847"]]
|
34
|
+
[1m[36m (0.5ms)[0m [1mCOMMIT[0m
|
35
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
36
|
+
[1m[36m (1.8ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
37
|
+
FROM pg_constraint c
|
38
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
39
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
40
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
41
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
42
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
43
|
+
WHERE c.contype = 'f'
|
44
|
+
AND t1.relname = 'products'
|
45
|
+
AND t3.nspname = ANY (current_schemas(false))
|
46
|
+
ORDER BY c.conname
|
47
|
+
[0m
|
48
|
+
[1m[36m (35.2ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
49
|
+
[1m[35m (12.2ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
50
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.8ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
51
|
+
Migrating to CreateProducts (20161017172847)
|
52
|
+
[1m[35m (0.2ms)[0m BEGIN
|
53
|
+
[1m[36m (29.1ms)[0m [1mCREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
54
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161017172847"]]
|
55
|
+
[1m[36m (6.1ms)[0m [1mCOMMIT[0m
|
56
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
57
|
+
[1m[36m (11.5ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
58
|
+
FROM pg_constraint c
|
59
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
60
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
61
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
62
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
63
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
64
|
+
WHERE c.contype = 'f'
|
65
|
+
AND t1.relname = 'products'
|
66
|
+
AND t3.nspname = ANY (current_schemas(false))
|
67
|
+
ORDER BY c.conname
|
68
|
+
[0m
|