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.
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.1
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-17 00:00:00.000000000 Z
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/rates_test.rb
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/rates_test.rb
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
@@ -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
- ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
2
- Migrating to CreateExchanges (20161115135521)
3
-  (0.2ms) BEGIN
4
-  (4.7ms) CREATE 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) 
5
-  (0.6ms) CREATE INDEX "index_exchanges_on_from_and_to" ON "exchanges" ("from", "to")
6
- SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161115135521"]]
7
-  (6.3ms) COMMIT
8
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
9
-  (1.8ms) 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
-  (1.3ms) 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
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
- 
33
-  (1.2ms) 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
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
46
- Migrating to CreateProducts (20161115145905)
47
-  (0.1ms) BEGIN
48
-  (9.3ms) 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) 
49
- SQL (6.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161115145905"]]
50
-  (6.1ms) COMMIT
51
- Migrating to CreatePlans (20161115150024)
52
-  (5.8ms) BEGIN
53
-  (7.0ms) 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) 
54
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161115150024"]]
55
-  (6.0ms) COMMIT
56
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
57
-  (1.7ms) 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
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
- 
69
-  (1.2ms) 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
-  (1.4ms) 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
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
- 
93
-  (1.2ms) 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
-  (1.3ms) 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
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
- 
117
-  (2.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
118
-  (22.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
119
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
120
- Migrating to CreateExchanges (20161115135521)
121
-  (0.2ms) BEGIN
122
-  (7.3ms) CREATE 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) 
123
-  (11.5ms) CREATE INDEX "index_exchanges_on_from_and_to" ON "exchanges" ("from", "to")
124
- SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161115135521"]]
125
-  (11.5ms) COMMIT
126
- Migrating to CreateProducts (20161115145905)
127
-  (11.3ms) BEGIN
128
-  (7.1ms) 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
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161115145905"]]
130
-  (4.6ms) COMMIT
131
- Migrating to CreatePlans (20161115150024)
132
-  (11.2ms) BEGIN
133
-  (7.0ms) 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
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161115150024"]]
135
-  (4.9ms) COMMIT
136
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
137
-  (1.7ms) 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
-  (1.3ms) 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
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
- 
161
-  (1.2ms) 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
-