economy 0.0.1 → 4.0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +27 -14
- data/lib/economy/configuration.rb +1 -1
- data/lib/economy/railtie.rb +1 -1
- data/lib/economy/version.rb +1 -1
- data/lib/economy.rb +0 -1
- data/lib/generators/economy/{install_generator.rb → install/install_generator.rb} +1 -1
- data/lib/generators/economy/{templates → install/templates}/initializer.rb +1 -1
- data/lib/generators/economy/{templates → install/templates}/migration.rb +0 -0
- data/lib/tasks/economy.rake +1 -0
- data/test/dummy/config/database.yml +2 -2
- data/test/dummy/config/initializers/economy.rb +2 -2
- data/test/dummy/public/404.html +57 -63
- data/test/dummy/public/422.html +57 -63
- data/test/dummy/public/500.html +56 -62
- data/test/generator_test.rb +1 -1
- data/test/{rates_test.rb → rate_test.rb} +1 -1
- metadata +7 -13
- data/test/dummy/db/schema.rb +0 -45
- data/test/dummy/log/development.log +0 -172
- data/test/dummy/log/test.log +0 -8574
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: economy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 4.0.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mmontossi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -95,9 +95,9 @@ files:
|
|
95
95
|
- lib/economy/rates/base.rb
|
96
96
|
- lib/economy/rates/yahoo.rb
|
97
97
|
- lib/economy/version.rb
|
98
|
-
- lib/generators/economy/install_generator.rb
|
99
|
-
- lib/generators/economy/templates/initializer.rb
|
100
|
-
- lib/generators/economy/templates/migration.rb
|
98
|
+
- lib/generators/economy/install/install_generator.rb
|
99
|
+
- lib/generators/economy/install/templates/initializer.rb
|
100
|
+
- lib/generators/economy/install/templates/migration.rb
|
101
101
|
- lib/tasks/economy.rake
|
102
102
|
- test/dummy/Rakefile
|
103
103
|
- test/dummy/app/assets/javascripts/application.js
|
@@ -135,9 +135,6 @@ files:
|
|
135
135
|
- test/dummy/db/migrate/20161115135521_create_exchanges.rb
|
136
136
|
- test/dummy/db/migrate/20161115145905_create_products.rb
|
137
137
|
- test/dummy/db/migrate/20161115150024_create_plans.rb
|
138
|
-
- test/dummy/db/schema.rb
|
139
|
-
- test/dummy/log/development.log
|
140
|
-
- test/dummy/log/test.log
|
141
138
|
- test/dummy/public/404.html
|
142
139
|
- test/dummy/public/422.html
|
143
140
|
- test/dummy/public/500.html
|
@@ -147,7 +144,7 @@ files:
|
|
147
144
|
- test/fixtures/yahoo/unknown.json
|
148
145
|
- test/generator_test.rb
|
149
146
|
- test/money_test.rb
|
150
|
-
- test/
|
147
|
+
- test/rate_test.rb
|
151
148
|
- test/record_test.rb
|
152
149
|
- test/support/money_helper.rb
|
153
150
|
- test/support/rates_helper.rb
|
@@ -213,9 +210,6 @@ test_files:
|
|
213
210
|
- test/dummy/db/migrate/20161115135521_create_exchanges.rb
|
214
211
|
- test/dummy/db/migrate/20161115145905_create_products.rb
|
215
212
|
- test/dummy/db/migrate/20161115150024_create_plans.rb
|
216
|
-
- test/dummy/db/schema.rb
|
217
|
-
- test/dummy/log/development.log
|
218
|
-
- test/dummy/log/test.log
|
219
213
|
- test/dummy/public/404.html
|
220
214
|
- test/dummy/public/422.html
|
221
215
|
- test/dummy/public/500.html
|
@@ -226,7 +220,7 @@ test_files:
|
|
226
220
|
- test/fixtures/yahoo/unknown.json
|
227
221
|
- test/generator_test.rb
|
228
222
|
- test/money_test.rb
|
229
|
-
- test/
|
223
|
+
- test/rate_test.rb
|
230
224
|
- test/record_test.rb
|
231
225
|
- test/support/money_helper.rb
|
232
226
|
- test/support/rates_helper.rb
|
data/test/dummy/db/schema.rb
DELETED
@@ -1,45 +0,0 @@
|
|
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: 20161115150024) do
|
15
|
-
|
16
|
-
# These are extensions that must be enabled in order to support this database
|
17
|
-
enable_extension "plpgsql"
|
18
|
-
|
19
|
-
create_table "exchanges", force: :cascade do |t|
|
20
|
-
t.string "service", limit: 30
|
21
|
-
t.string "from", limit: 3
|
22
|
-
t.string "to", limit: 3
|
23
|
-
t.decimal "rate", precision: 24, scale: 12
|
24
|
-
t.datetime "created_at", null: false
|
25
|
-
t.datetime "updated_at", null: false
|
26
|
-
end
|
27
|
-
|
28
|
-
add_index "exchanges", ["from", "to"], name: "index_exchanges_on_from_and_to", using: :btree
|
29
|
-
|
30
|
-
create_table "plans", force: :cascade do |t|
|
31
|
-
t.decimal "monthly_price", precision: 24, scale: 6
|
32
|
-
t.decimal "annually_price", precision: 24, scale: 6
|
33
|
-
t.string "currency", limit: 3
|
34
|
-
t.datetime "created_at", null: false
|
35
|
-
t.datetime "updated_at", null: false
|
36
|
-
end
|
37
|
-
|
38
|
-
create_table "products", force: :cascade do |t|
|
39
|
-
t.decimal "price", precision: 24, scale: 6
|
40
|
-
t.string "price_currency", limit: 3
|
41
|
-
t.datetime "created_at", null: false
|
42
|
-
t.datetime "updated_at", null: false
|
43
|
-
end
|
44
|
-
|
45
|
-
end
|
@@ -1,172 +0,0 @@
|
|
1
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.7ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2
|
-
Migrating to CreateExchanges (20161115135521)
|
3
|
-
[1m[35m (0.2ms)[0m BEGIN
|
4
|
-
[1m[36m (4.7ms)[0m [1mCREATE TABLE "exchanges" ("id" serial primary key, "source" character varying(30), "from" character varying(3), "to" character varying(3), "rate" decimal(24,12), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
5
|
-
[1m[35m (0.6ms)[0m CREATE INDEX "index_exchanges_on_from_and_to" ON "exchanges" ("from", "to")
|
6
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "20161115135521"]]
|
7
|
-
[1m[35m (6.3ms)[0m COMMIT
|
8
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
9
|
-
[1m[35m (1.8ms)[0m SELECT 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
|
10
|
-
FROM pg_constraint c
|
11
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
12
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
13
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
14
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
15
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
16
|
-
WHERE c.contype = 'f'
|
17
|
-
AND t1.relname = 'exchanges'
|
18
|
-
AND t3.nspname = ANY (current_schemas(false))
|
19
|
-
ORDER BY c.conname
|
20
|
-
|
21
|
-
[1m[36m (1.3ms)[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
|
22
|
-
FROM pg_constraint c
|
23
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
24
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
25
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
26
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
27
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
28
|
-
WHERE c.contype = 'f'
|
29
|
-
AND t1.relname = 'posts'
|
30
|
-
AND t3.nspname = ANY (current_schemas(false))
|
31
|
-
ORDER BY c.conname
|
32
|
-
[0m
|
33
|
-
[1m[35m (1.2ms)[0m SELECT 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
|
34
|
-
FROM pg_constraint c
|
35
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
36
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
37
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
38
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
39
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
40
|
-
WHERE c.contype = 'f'
|
41
|
-
AND t1.relname = 'users'
|
42
|
-
AND t3.nspname = ANY (current_schemas(false))
|
43
|
-
ORDER BY c.conname
|
44
|
-
|
45
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
46
|
-
Migrating to CreateProducts (20161115145905)
|
47
|
-
[1m[35m (0.1ms)[0m BEGIN
|
48
|
-
[1m[36m (9.3ms)[0m [1mCREATE TABLE "products" ("id" serial primary key, "price" decimal(24,6), "price_currency" character varying(3), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
49
|
-
[1m[35mSQL (6.4ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161115145905"]]
|
50
|
-
[1m[36m (6.1ms)[0m [1mCOMMIT[0m
|
51
|
-
Migrating to CreatePlans (20161115150024)
|
52
|
-
[1m[35m (5.8ms)[0m BEGIN
|
53
|
-
[1m[36m (7.0ms)[0m [1mCREATE TABLE "plans" ("id" serial primary key, "monthly_price" decimal(24,6), "annually_price" decimal(24,6), "currency" character varying(3), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
54
|
-
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161115150024"]]
|
55
|
-
[1m[36m (6.0ms)[0m [1mCOMMIT[0m
|
56
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
57
|
-
[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
|
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 = 'exchanges'
|
66
|
-
AND t3.nspname = ANY (current_schemas(false))
|
67
|
-
ORDER BY c.conname
|
68
|
-
[0m
|
69
|
-
[1m[35m (1.2ms)[0m SELECT 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
|
70
|
-
FROM pg_constraint c
|
71
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
72
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
73
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
74
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
76
|
-
WHERE c.contype = 'f'
|
77
|
-
AND t1.relname = 'plans'
|
78
|
-
AND t3.nspname = ANY (current_schemas(false))
|
79
|
-
ORDER BY c.conname
|
80
|
-
|
81
|
-
[1m[36m (1.4ms)[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
|
82
|
-
FROM pg_constraint c
|
83
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
84
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
85
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
86
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
87
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
88
|
-
WHERE c.contype = 'f'
|
89
|
-
AND t1.relname = 'posts'
|
90
|
-
AND t3.nspname = ANY (current_schemas(false))
|
91
|
-
ORDER BY c.conname
|
92
|
-
[0m
|
93
|
-
[1m[35m (1.2ms)[0m SELECT 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
|
94
|
-
FROM pg_constraint c
|
95
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
96
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
97
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
98
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
99
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
100
|
-
WHERE c.contype = 'f'
|
101
|
-
AND t1.relname = 'products'
|
102
|
-
AND t3.nspname = ANY (current_schemas(false))
|
103
|
-
ORDER BY c.conname
|
104
|
-
|
105
|
-
[1m[36m (1.3ms)[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
|
106
|
-
FROM pg_constraint c
|
107
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
108
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
109
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
110
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
111
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
112
|
-
WHERE c.contype = 'f'
|
113
|
-
AND t1.relname = 'users'
|
114
|
-
AND t3.nspname = ANY (current_schemas(false))
|
115
|
-
ORDER BY c.conname
|
116
|
-
[0m
|
117
|
-
[1m[36m (2.4ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
118
|
-
[1m[35m (22.4ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
119
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
120
|
-
Migrating to CreateExchanges (20161115135521)
|
121
|
-
[1m[35m (0.2ms)[0m BEGIN
|
122
|
-
[1m[36m (7.3ms)[0m [1mCREATE TABLE "exchanges" ("id" serial primary key, "service" character varying(30), "from" character varying(3), "to" character varying(3), "rate" decimal(24,12), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
123
|
-
[1m[35m (11.5ms)[0m CREATE INDEX "index_exchanges_on_from_and_to" ON "exchanges" ("from", "to")
|
124
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "20161115135521"]]
|
125
|
-
[1m[35m (11.5ms)[0m COMMIT
|
126
|
-
Migrating to CreateProducts (20161115145905)
|
127
|
-
[1m[36m (11.3ms)[0m [1mBEGIN[0m
|
128
|
-
[1m[35m (7.1ms)[0m CREATE TABLE "products" ("id" serial primary key, "price" decimal(24,6), "price_currency" character varying(3), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
129
|
-
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "20161115145905"]]
|
130
|
-
[1m[35m (4.6ms)[0m COMMIT
|
131
|
-
Migrating to CreatePlans (20161115150024)
|
132
|
-
[1m[36m (11.2ms)[0m [1mBEGIN[0m
|
133
|
-
[1m[35m (7.0ms)[0m CREATE TABLE "plans" ("id" serial primary key, "monthly_price" decimal(24,6), "annually_price" decimal(24,6), "currency" character varying(3), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
134
|
-
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "20161115150024"]]
|
135
|
-
[1m[35m (4.9ms)[0m COMMIT
|
136
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
137
|
-
[1m[35m (1.7ms)[0m SELECT 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
|
138
|
-
FROM pg_constraint c
|
139
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
140
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
141
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
142
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
143
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
144
|
-
WHERE c.contype = 'f'
|
145
|
-
AND t1.relname = 'exchanges'
|
146
|
-
AND t3.nspname = ANY (current_schemas(false))
|
147
|
-
ORDER BY c.conname
|
148
|
-
|
149
|
-
[1m[36m (1.3ms)[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
|
150
|
-
FROM pg_constraint c
|
151
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
152
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
153
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
154
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
155
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
156
|
-
WHERE c.contype = 'f'
|
157
|
-
AND t1.relname = 'plans'
|
158
|
-
AND t3.nspname = ANY (current_schemas(false))
|
159
|
-
ORDER BY c.conname
|
160
|
-
[0m
|
161
|
-
[1m[35m (1.2ms)[0m SELECT 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
|
162
|
-
FROM pg_constraint c
|
163
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
164
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
165
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
166
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
167
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
168
|
-
WHERE c.contype = 'f'
|
169
|
-
AND t1.relname = 'products'
|
170
|
-
AND t3.nspname = ANY (current_schemas(false))
|
171
|
-
ORDER BY c.conname
|
172
|
-
|