nostalgic 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/nostalgic/_text_field.html.erb +30 -0
- data/lib/nostalgic/form_builder.rb +1 -13
- data/lib/nostalgic/version.rb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +192 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e26badaf65300d38f61266c2f100ef26b2373ab
|
4
|
+
data.tar.gz: ac2c04fac8a683751bb42b1fbb9e7d0eb4233e22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 821b330a18dd8d26327123ea82dd39cce987a3eaf0cf575d2267996047a4a26496d666d088ea733c5975328289741d3418523fc981dad485ed0fd9aa02d0b69c
|
7
|
+
data.tar.gz: d69dfd09be25d0a29df67e703ff1a2bf11831406d775ef74d9ee5a6b78c466f83547ab2feeaca8026254b909bf8ec6bf9ded115518cf7fe199abef448cc7fcda
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<table class="nostalgic">
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<td>
|
5
|
+
<%= f.text_field attr, :class => css_class %>
|
6
|
+
</td>
|
7
|
+
<td>
|
8
|
+
<%= f.text_field "#{attr}_effective_at", :class => 'datepicker', :style => 'display: none;' %>
|
9
|
+
<%= image_tag 'nostalgic/list.png', :onclick => 'nostalgic.edit_nostalgic_attr(this); return false;' %>
|
10
|
+
</td>
|
11
|
+
</tr>
|
12
|
+
</thead>
|
13
|
+
<tbody style="display: none;">
|
14
|
+
<% f.object.public_send(attr.to_s.pluralize).each_with_index do |nostalgic_attr, i| %>
|
15
|
+
<%= f.fields_for "#{attr.to_s.pluralize}_attributes][#{i}]", nostalgic_attr do |f| %>
|
16
|
+
<tr>
|
17
|
+
<td>
|
18
|
+
<%= f.hidden_field :id %>
|
19
|
+
<%= f.hidden_field :_destroy %>
|
20
|
+
<%= f.text_field :value, :class => css_class, :disabled => true, :readonly => true %>
|
21
|
+
</td>
|
22
|
+
<td>
|
23
|
+
<%= f.text_field :effective_at, :class => 'datepicker', :disabled => true, :readonly => true %>
|
24
|
+
<%= image_tag 'nostalgic/minus.png', :onclick => 'nostalgic.remove_row(this); return false;' %>
|
25
|
+
</td>
|
26
|
+
</tr>
|
27
|
+
<% end %>
|
28
|
+
<% end %>
|
29
|
+
</tbody>
|
30
|
+
</table>
|
@@ -4,19 +4,7 @@ class ActionView::Helpers::FormBuilder
|
|
4
4
|
include ActionView::Helpers::AssetTagHelper
|
5
5
|
|
6
6
|
def nostalgic_text_field(method, options = {})
|
7
|
-
text_field
|
8
|
-
end
|
9
|
-
|
10
|
-
def nostalgic_number_field(method, options = {})
|
11
|
-
number_field(method, append_nostalgic_clsss(options))
|
12
|
-
end
|
13
|
-
|
14
|
-
private
|
15
|
-
|
16
|
-
def append_nostalgic_clsss(options = {})
|
17
|
-
klass = options.fetch(:class, '').split
|
18
|
-
klass.unshift('nostalgic')
|
19
|
-
options.merge(:class => klass.join(' '))
|
7
|
+
@template.render 'nostalgic/text_field', :f => self, :attr => method, :css_class => options[:class]
|
20
8
|
end
|
21
9
|
|
22
10
|
end
|
data/lib/nostalgic/version.rb
CHANGED
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
data/test/dummy/log/test.log
CHANGED
@@ -5987,5 +5987,197 @@ NostalgicTest: test_that_it_has_a_version_number
|
|
5987
5987
|
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5988
5988
|
--------------------------------------------
|
5989
5989
|
NostalgicTest: test_it_does_something_useful
|
5990
|
+
--------------------------------------------
|
5991
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
5992
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5993
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5994
|
+
[1m[36mFixture Delete (0.2ms)[0m [1mDELETE FROM "nostalgic_attrs"[0m
|
5995
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "nostalgic_attrs" ("id", "model_type", "model_id", "name", "value", "effective_at", "created_at", "updated_at") VALUES (1, 'User', 1, 'tel', '111-123-4567', '2016-08-16', '2016-09-16 05:15:42', '2016-09-16 05:15:42')
|
5996
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "nostalgic_attrs" ("id", "model_type", "model_id", "name", "value", "effective_at", "created_at", "updated_at") VALUES (2, 'User', 1, 'tel', '222-123-4567', '2016-09-16', '2016-09-16 05:15:42', '2016-09-16 05:15:42')[0m
|
5997
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "nostalgic_attrs" ("id", "model_type", "model_id", "name", "value", "effective_at", "created_at", "updated_at") VALUES (3, 'User', 1, 'tel', '333-123-4567', '2016-09-17', '2016-09-16 05:15:42', '2016-09-16 05:15:42')
|
5998
|
+
[1m[36mFixture Delete (0.0ms)[0m [1mDELETE FROM "users"[0m
|
5999
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "users" ("id", "email", "tel", "created_at", "updated_at") VALUES (1, 'test1@example.com', '222-123-4567', '2016-09-16 05:15:42', '2016-09-16 05:15:42')
|
6000
|
+
[1m[36m (1.3ms)[0m [1mcommit transaction[0m
|
6001
|
+
[1m[35m (0.0ms)[0m begin transaction
|
6002
|
+
-----------------------------------------
|
6003
|
+
Nostalgic::AttrTest: test_nostalgic_model
|
6004
|
+
-----------------------------------------
|
6005
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6006
|
+
[1m[35m (0.0ms)[0m begin transaction
|
6007
|
+
-------------------
|
6008
|
+
UserTest: test_tels
|
6009
|
+
-------------------
|
6010
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
6011
|
+
[1m[35mNostalgic::Attr Load (0.2ms)[0m SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
|
6012
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ?[0m [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
|
6013
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
6014
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
6015
|
+
-----------------------
|
6016
|
+
UserTest: test_save_tel
|
6017
|
+
-----------------------
|
6018
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
6019
|
+
[1m[36mNostalgic::Attr Load (0.1ms)[0m [1mSELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1[0m [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
|
6020
|
+
[1m[35mNostalgic::Attr Load (0.1ms)[0m SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6021
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
6022
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "users" SET "tel" = ?, "updated_at" = ? WHERE "users"."id" = ? [["tel", "444-123-4567"], ["updated_at", "2016-09-16 05:15:42.257358"], ["id", 1]]
|
6023
|
+
[1m[36mNostalgic::Attr Load (0.1ms)[0m [1mSELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND "nostalgic_attrs"."effective_at" = ? ORDER BY "nostalgic_attrs"."id" ASC LIMIT 1[0m [["model_type", "User"], ["model_id", 1], ["name", "tel"], ["effective_at", "2016-09-16"]]
|
6024
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "nostalgic_attrs" SET "value" = ?, "updated_at" = ? WHERE "nostalgic_attrs"."id" = ? [["value", "444-123-4567"], ["updated_at", "2016-09-16 05:15:42.260240"], ["id", 2]]
|
6025
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
6026
|
+
[1m[35mNostalgic::Attr Load (0.1ms)[0m SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6027
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
6028
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "users" SET "tel" = ?, "updated_at" = ? WHERE "users"."id" = ? [["tel", "555-123-4567"], ["updated_at", "2016-09-16 05:15:42.262167"], ["id", 1]]
|
6029
|
+
[1m[36mNostalgic::Attr Load (0.0ms)[0m [1mSELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND "nostalgic_attrs"."effective_at" = ? ORDER BY "nostalgic_attrs"."id" ASC LIMIT 1[0m [["model_type", "User"], ["model_id", 1], ["name", "tel"], ["effective_at", "2016-09-18"]]
|
6030
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "nostalgic_attrs" ("model_type", "model_id", "name", "effective_at", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["model_type", "User"], ["model_id", 1], ["name", "tel"], ["effective_at", "2016-09-18"], ["value", "555-123-4567"], ["created_at", "2016-09-16 05:15:42.263384"], ["updated_at", "2016-09-16 05:15:42.263384"]]
|
6031
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
6032
|
+
[1m[35mNostalgic::Attr Load (0.1ms)[0m SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6033
|
+
[1m[36mNostalgic::Attr Load (0.1ms)[0m [1mSELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-17') ORDER BY effective_at desc LIMIT 1[0m [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6034
|
+
[1m[35mNostalgic::Attr Load (0.1ms)[0m SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-18') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6035
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6036
|
+
[1m[35m (0.0ms)[0m begin transaction
|
6037
|
+
------------------
|
6038
|
+
UserTest: test_tel
|
6039
|
+
------------------
|
6040
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
6041
|
+
[1m[35mNostalgic::Attr Load (0.1ms)[0m SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
|
6042
|
+
[1m[36mNostalgic::Attr Load (0.1ms)[0m [1mSELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-15') ORDER BY effective_at desc LIMIT 1[0m [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6043
|
+
[1m[35mNostalgic::Attr Load (0.1ms)[0m SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6044
|
+
[1m[36mNostalgic::Attr Load (0.1ms)[0m [1mSELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-17') ORDER BY effective_at desc LIMIT 1[0m [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6045
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
6046
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
6047
|
+
------------------------------------------------
|
6048
|
+
NostalgicTest: test_that_it_has_a_version_number
|
6049
|
+
------------------------------------------------
|
6050
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
6051
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
6052
|
+
--------------------------------------------
|
6053
|
+
NostalgicTest: test_it_does_something_useful
|
6054
|
+
--------------------------------------------
|
6055
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
6056
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6057
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6058
|
+
[1m[36mFixture Delete (0.3ms)[0m [1mDELETE FROM "nostalgic_attrs"[0m
|
6059
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "nostalgic_attrs" ("id", "model_type", "model_id", "name", "value", "effective_at", "created_at", "updated_at") VALUES (1, 'User', 1, 'tel', '111-123-4567', '2016-08-16', '2016-09-16 06:42:45', '2016-09-16 06:42:45')
|
6060
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "nostalgic_attrs" ("id", "model_type", "model_id", "name", "value", "effective_at", "created_at", "updated_at") VALUES (2, 'User', 1, 'tel', '222-123-4567', '2016-09-16', '2016-09-16 06:42:45', '2016-09-16 06:42:45')[0m
|
6061
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "nostalgic_attrs" ("id", "model_type", "model_id", "name", "value", "effective_at", "created_at", "updated_at") VALUES (3, 'User', 1, 'tel', '333-123-4567', '2016-09-17', '2016-09-16 06:42:45', '2016-09-16 06:42:45')
|
6062
|
+
[1m[36mFixture Delete (0.0ms)[0m [1mDELETE FROM "users"[0m
|
6063
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "users" ("id", "email", "tel", "created_at", "updated_at") VALUES (1, 'test1@example.com', '222-123-4567', '2016-09-16 06:42:45', '2016-09-16 06:42:45')
|
6064
|
+
[1m[36m (2.9ms)[0m [1mcommit transaction[0m
|
6065
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6066
|
+
-----------------------------------------
|
6067
|
+
Nostalgic::AttrTest: test_nostalgic_model
|
6068
|
+
-----------------------------------------
|
6069
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
6070
|
+
[1m[35m (0.0ms)[0m begin transaction
|
6071
|
+
-----------------------
|
6072
|
+
UserTest: test_save_tel
|
6073
|
+
-----------------------
|
6074
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
6075
|
+
[1m[35mNostalgic::Attr Load (0.2ms)[0m SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
|
6076
|
+
[1m[36mNostalgic::Attr Load (0.1ms)[0m [1mSELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1[0m [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6077
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
6078
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "users" SET "tel" = ?, "updated_at" = ? WHERE "users"."id" = ?[0m [["tel", "444-123-4567"], ["updated_at", "2016-09-16 06:42:45.712741"], ["id", 1]]
|
6079
|
+
[1m[35mNostalgic::Attr Load (0.1ms)[0m SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND "nostalgic_attrs"."effective_at" = ? ORDER BY "nostalgic_attrs"."id" ASC LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"], ["effective_at", "2016-09-16"]]
|
6080
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "nostalgic_attrs" SET "value" = ?, "updated_at" = ? WHERE "nostalgic_attrs"."id" = ?[0m [["value", "444-123-4567"], ["updated_at", "2016-09-16 06:42:45.715146"], ["id", 2]]
|
6081
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
6082
|
+
[1m[36mNostalgic::Attr Load (0.1ms)[0m [1mSELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1[0m [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6083
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
6084
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "users" SET "tel" = ?, "updated_at" = ? WHERE "users"."id" = ?[0m [["tel", "555-123-4567"], ["updated_at", "2016-09-16 06:42:45.717439"], ["id", 1]]
|
6085
|
+
[1m[35mNostalgic::Attr Load (0.0ms)[0m SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND "nostalgic_attrs"."effective_at" = ? ORDER BY "nostalgic_attrs"."id" ASC LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"], ["effective_at", "2016-09-18"]]
|
6086
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "nostalgic_attrs" ("model_type", "model_id", "name", "effective_at", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["model_type", "User"], ["model_id", 1], ["name", "tel"], ["effective_at", "2016-09-18"], ["value", "555-123-4567"], ["created_at", "2016-09-16 06:42:45.719025"], ["updated_at", "2016-09-16 06:42:45.719025"]]
|
6087
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
6088
|
+
[1m[36mNostalgic::Attr Load (0.1ms)[0m [1mSELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1[0m [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6089
|
+
[1m[35mNostalgic::Attr Load (0.1ms)[0m SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-17') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6090
|
+
[1m[36mNostalgic::Attr Load (0.1ms)[0m [1mSELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-18') ORDER BY effective_at desc LIMIT 1[0m [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6091
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6092
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
6093
|
+
-------------------
|
6094
|
+
UserTest: test_tels
|
6095
|
+
-------------------
|
6096
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
6097
|
+
[1m[36mNostalgic::Attr Load (0.1ms)[0m [1mSELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1[0m [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
|
6098
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ? [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
|
6099
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
6100
|
+
[1m[35m (0.0ms)[0m begin transaction
|
6101
|
+
------------------
|
6102
|
+
UserTest: test_tel
|
6103
|
+
------------------
|
6104
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
6105
|
+
[1m[35mNostalgic::Attr Load (0.1ms)[0m SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
|
6106
|
+
[1m[36mNostalgic::Attr Load (0.1ms)[0m [1mSELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-15') ORDER BY effective_at desc LIMIT 1[0m [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6107
|
+
[1m[35mNostalgic::Attr Load (0.1ms)[0m SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6108
|
+
[1m[36mNostalgic::Attr Load (0.1ms)[0m [1mSELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-17') ORDER BY effective_at desc LIMIT 1[0m [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6109
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
6110
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
6111
|
+
------------------------------------------------
|
6112
|
+
NostalgicTest: test_that_it_has_a_version_number
|
6113
|
+
------------------------------------------------
|
6114
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
6115
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
6116
|
+
--------------------------------------------
|
6117
|
+
NostalgicTest: test_it_does_something_useful
|
6118
|
+
--------------------------------------------
|
6119
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6120
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6121
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6122
|
+
[1m[36mFixture Delete (0.2ms)[0m [1mDELETE FROM "nostalgic_attrs"[0m
|
6123
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "nostalgic_attrs" ("id", "model_type", "model_id", "name", "value", "effective_at", "created_at", "updated_at") VALUES (1, 'User', 1, 'tel', '111-123-4567', '2016-08-16', '2016-09-16 06:48:08', '2016-09-16 06:48:08')
|
6124
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "nostalgic_attrs" ("id", "model_type", "model_id", "name", "value", "effective_at", "created_at", "updated_at") VALUES (2, 'User', 1, 'tel', '222-123-4567', '2016-09-16', '2016-09-16 06:48:08', '2016-09-16 06:48:08')[0m
|
6125
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "nostalgic_attrs" ("id", "model_type", "model_id", "name", "value", "effective_at", "created_at", "updated_at") VALUES (3, 'User', 1, 'tel', '333-123-4567', '2016-09-17', '2016-09-16 06:48:08', '2016-09-16 06:48:08')
|
6126
|
+
[1m[36mFixture Delete (0.0ms)[0m [1mDELETE FROM "users"[0m
|
6127
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "users" ("id", "email", "tel", "created_at", "updated_at") VALUES (1, 'test1@example.com', '222-123-4567', '2016-09-16 06:48:08', '2016-09-16 06:48:08')
|
6128
|
+
[1m[36m (3.4ms)[0m [1mcommit transaction[0m
|
6129
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6130
|
+
-----------------------------------------
|
6131
|
+
Nostalgic::AttrTest: test_nostalgic_model
|
6132
|
+
-----------------------------------------
|
6133
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
6134
|
+
[1m[35m (0.0ms)[0m begin transaction
|
6135
|
+
-----------------------
|
6136
|
+
UserTest: test_save_tel
|
6137
|
+
-----------------------
|
6138
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
6139
|
+
[1m[35mNostalgic::Attr Load (0.2ms)[0m SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
|
6140
|
+
[1m[36mNostalgic::Attr Load (0.1ms)[0m [1mSELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1[0m [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6141
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
6142
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "users" SET "tel" = ?, "updated_at" = ? WHERE "users"."id" = ?[0m [["tel", "444-123-4567"], ["updated_at", "2016-09-16 06:48:08.929290"], ["id", 1]]
|
6143
|
+
[1m[35mNostalgic::Attr Load (0.1ms)[0m SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND "nostalgic_attrs"."effective_at" = ? ORDER BY "nostalgic_attrs"."id" ASC LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"], ["effective_at", "2016-09-16"]]
|
6144
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "nostalgic_attrs" SET "value" = ?, "updated_at" = ? WHERE "nostalgic_attrs"."id" = ?[0m [["value", "444-123-4567"], ["updated_at", "2016-09-16 06:48:08.931540"], ["id", 2]]
|
6145
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
6146
|
+
[1m[36mNostalgic::Attr Load (0.1ms)[0m [1mSELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1[0m [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6147
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
6148
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "users" SET "tel" = ?, "updated_at" = ? WHERE "users"."id" = ?[0m [["tel", "555-123-4567"], ["updated_at", "2016-09-16 06:48:08.933410"], ["id", 1]]
|
6149
|
+
[1m[35mNostalgic::Attr Load (0.0ms)[0m SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND "nostalgic_attrs"."effective_at" = ? ORDER BY "nostalgic_attrs"."id" ASC LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"], ["effective_at", "2016-09-18"]]
|
6150
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "nostalgic_attrs" ("model_type", "model_id", "name", "effective_at", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["model_type", "User"], ["model_id", 1], ["name", "tel"], ["effective_at", "2016-09-18"], ["value", "555-123-4567"], ["created_at", "2016-09-16 06:48:08.934840"], ["updated_at", "2016-09-16 06:48:08.934840"]]
|
6151
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
6152
|
+
[1m[36mNostalgic::Attr Load (0.1ms)[0m [1mSELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1[0m [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6153
|
+
[1m[35mNostalgic::Attr Load (0.2ms)[0m SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-17') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6154
|
+
[1m[36mNostalgic::Attr Load (0.1ms)[0m [1mSELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-18') ORDER BY effective_at desc LIMIT 1[0m [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6155
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6156
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
6157
|
+
------------------
|
6158
|
+
UserTest: test_tel
|
6159
|
+
------------------
|
6160
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
6161
|
+
[1m[36mNostalgic::Attr Load (0.1ms)[0m [1mSELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1[0m [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
|
6162
|
+
[1m[35mNostalgic::Attr Load (0.1ms)[0m SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-15') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6163
|
+
[1m[36mNostalgic::Attr Load (0.1ms)[0m [1mSELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1[0m [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6164
|
+
[1m[35mNostalgic::Attr Load (0.1ms)[0m SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-17') ORDER BY effective_at desc LIMIT 1 [["model_type", "User"], ["model_id", 1], ["name", "tel"]]
|
6165
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
6166
|
+
[1m[35m (0.0ms)[0m begin transaction
|
6167
|
+
-------------------
|
6168
|
+
UserTest: test_tels
|
6169
|
+
-------------------
|
6170
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
6171
|
+
[1m[35mNostalgic::Attr Load (0.1ms)[0m SELECT "nostalgic_attrs".* FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ? AND (effective_at <= '2016-09-16') ORDER BY effective_at desc LIMIT 1 [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
|
6172
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "nostalgic_attrs" WHERE "nostalgic_attrs"."model_id" = ? AND "nostalgic_attrs"."model_type" = ? AND "nostalgic_attrs"."name" = ?[0m [["model_id", 1], ["model_type", "User"], ["name", "tel"]]
|
6173
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6174
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
6175
|
+
------------------------------------------------
|
6176
|
+
NostalgicTest: test_that_it_has_a_version_number
|
6177
|
+
------------------------------------------------
|
6178
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
6179
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
6180
|
+
--------------------------------------------
|
6181
|
+
NostalgicTest: test_it_does_something_useful
|
5990
6182
|
--------------------------------------------
|
5991
6183
|
[1m[35m (0.0ms)[0m rollback transaction
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nostalgic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ichy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -64,14 +64,14 @@ dependencies:
|
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
67
|
+
version: '11.0'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
74
|
+
version: '11.0'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: sqlite3
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -105,6 +105,7 @@ files:
|
|
105
105
|
- app/helpers/nostalgic/application_helper.rb
|
106
106
|
- app/models/nostalgic/attr.rb
|
107
107
|
- app/views/layouts/nostalgic/application.html.erb
|
108
|
+
- app/views/nostalgic/_text_field.html.erb
|
108
109
|
- config/routes.rb
|
109
110
|
- db/migrate/20160807101438_create_nostalgic_attrs.rb
|
110
111
|
- db/migrate/20160816080815_change_column_created_at_on_nostalgic_attrs.rb
|