osbc 0.1.9 → 0.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac17b24da3884f8181d586a6431cfe2f91f18c0bf5f61381015564d2f114c726
4
- data.tar.gz: 485336fe2bea99f18817171dafb7fcf5daafce9395256e1d0ea39b216d9166ed
3
+ metadata.gz: b7bef96e041cbf759e0560eaa3e443e1edd8a7544396f624de313200e01f886e
4
+ data.tar.gz: 3fdd7e3ea74bc82a962c4b52307a3ad5fd02b115ebf622b1b10acb2d56ded8cb
5
5
  SHA512:
6
- metadata.gz: 28af2bfd01d963f82194fd09a56631104fab1cf60fb7f277ab6c53e7adbc2b2c405dfb2286758af40ac2a27108bed237ac31a5a6fd69eac2ec24f91d2f37f08a
7
- data.tar.gz: ba7e7ee0b4e356827edb5bd6088ebc4a5cd62d24e239311134bdd237bcb24b7b24374955b03ec12925844b91f88f2b8137abf1d882062fea72fccb0cc9b31be8
6
+ metadata.gz: 8e0c31360bb371cc43795e2364768aec7c281ebc9f430fcdb2cf1411600db60ae90d923ea0de66f60c346069b695b14d92ce09a280a6142b00b855c8ca59cbc5
7
+ data.tar.gz: ef6504c45af99faf0f1b1dcd5d13ee5763b75f952549cb7f72f65c1f564afac990eb340a901db93c056ddd97ca66e7dd0ee4a87cb5e887726c8f10d4a09bec62
data/.env_sample ADDED
@@ -0,0 +1,14 @@
1
+ FIRST_CHAIN_NAME=YOUR_CHAIN_NAME
2
+ FIRST_CHAIN_MAINTAINER=YOUR_NAME
3
+ FIRST_USER_NAME=YOUR_FIRST_USERNAME
4
+ FIRST_USER_EMAIL=firstuser@email.com
5
+ FIRST_USER_PASSWORD=YOUR_FIRST_USER_PASSWORD
6
+ CONTRACTS_LIMIT=2
7
+ SIGNATURES_LIMIT=5
8
+ REDIS_URL=redis://redis:6379
9
+ ENV_MACHINE=docker
10
+ GOOGLE_ANALYTICS_ID=G-XXXXXXXXXX
11
+ FIRESTORE_PROJECT_ID=YOUR_FIRESTORE_PROJECT_ID
12
+ FIRESTORE_KEY_FILE=YOUR_FIRESTORE_KEY_FILE
13
+ FIRESTORE_KEY_FILE_PATH=YOUR_FIRESTORE_KEY_FILE_PATH
14
+
data/CHANGELOG.md CHANGED
@@ -20,3 +20,11 @@
20
20
  ### Added
21
21
  - Edited gemspec
22
22
  - Edited README.md
23
+ ## [0.2.0]
24
+ ### Added
25
+ - Defined development plan, corrected enviroments
26
+ - Added Domain with SSL to demonstration enviroments
27
+ - Edited README.md documentation
28
+ - Added tracking to Google Analytics
29
+ - Added Google Cloud Firestore gem to gemfile
30
+ - Added .env to gitignore and created .env_sample file
data/Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
1
  # syntax=docker/dockerfile:1
2
- FROM ruby:3.0.3
2
+ FROM ruby:3.2.0
3
3
  RUN apt-get update -qq && apt-get install -y nodejs postgresql-client
4
4
  WORKDIR /myapp
5
5
  COPY Gemfile /myapp/Gemfile
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
  git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3
3
 
4
- ruby "3.0.3"
4
+ ruby "3.2.0"
5
5
 
6
6
  # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
7
7
  gem "rails", "~> 7.0"
@@ -66,6 +66,9 @@ gem "rails-controller-testing", "~> 1.0"
66
66
  # Active Record Import
67
67
  gem "activerecord-import"
68
68
 
69
+ # Google Firestore
70
+ gem "google-cloud-firestore", "~> 2.6"
71
+
69
72
 
70
73
  # Use Sass to process CSS
71
74
  # gem "sassc-rails"
data/Gemfile.lock CHANGED
@@ -1,69 +1,69 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- actioncable (7.0.4)
5
- actionpack (= 7.0.4)
6
- activesupport (= 7.0.4)
4
+ actioncable (7.0.4.1)
5
+ actionpack (= 7.0.4.1)
6
+ activesupport (= 7.0.4.1)
7
7
  nio4r (~> 2.0)
8
8
  websocket-driver (>= 0.6.1)
9
- actionmailbox (7.0.4)
10
- actionpack (= 7.0.4)
11
- activejob (= 7.0.4)
12
- activerecord (= 7.0.4)
13
- activestorage (= 7.0.4)
14
- activesupport (= 7.0.4)
9
+ actionmailbox (7.0.4.1)
10
+ actionpack (= 7.0.4.1)
11
+ activejob (= 7.0.4.1)
12
+ activerecord (= 7.0.4.1)
13
+ activestorage (= 7.0.4.1)
14
+ activesupport (= 7.0.4.1)
15
15
  mail (>= 2.7.1)
16
16
  net-imap
17
17
  net-pop
18
18
  net-smtp
19
- actionmailer (7.0.4)
20
- actionpack (= 7.0.4)
21
- actionview (= 7.0.4)
22
- activejob (= 7.0.4)
23
- activesupport (= 7.0.4)
19
+ actionmailer (7.0.4.1)
20
+ actionpack (= 7.0.4.1)
21
+ actionview (= 7.0.4.1)
22
+ activejob (= 7.0.4.1)
23
+ activesupport (= 7.0.4.1)
24
24
  mail (~> 2.5, >= 2.5.4)
25
25
  net-imap
26
26
  net-pop
27
27
  net-smtp
28
28
  rails-dom-testing (~> 2.0)
29
- actionpack (7.0.4)
30
- actionview (= 7.0.4)
31
- activesupport (= 7.0.4)
29
+ actionpack (7.0.4.1)
30
+ actionview (= 7.0.4.1)
31
+ activesupport (= 7.0.4.1)
32
32
  rack (~> 2.0, >= 2.2.0)
33
33
  rack-test (>= 0.6.3)
34
34
  rails-dom-testing (~> 2.0)
35
35
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
36
- actiontext (7.0.4)
37
- actionpack (= 7.0.4)
38
- activerecord (= 7.0.4)
39
- activestorage (= 7.0.4)
40
- activesupport (= 7.0.4)
36
+ actiontext (7.0.4.1)
37
+ actionpack (= 7.0.4.1)
38
+ activerecord (= 7.0.4.1)
39
+ activestorage (= 7.0.4.1)
40
+ activesupport (= 7.0.4.1)
41
41
  globalid (>= 0.6.0)
42
42
  nokogiri (>= 1.8.5)
43
- actionview (7.0.4)
44
- activesupport (= 7.0.4)
43
+ actionview (7.0.4.1)
44
+ activesupport (= 7.0.4.1)
45
45
  builder (~> 3.1)
46
46
  erubi (~> 1.4)
47
47
  rails-dom-testing (~> 2.0)
48
48
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
49
- activejob (7.0.4)
50
- activesupport (= 7.0.4)
49
+ activejob (7.0.4.1)
50
+ activesupport (= 7.0.4.1)
51
51
  globalid (>= 0.3.6)
52
- activemodel (7.0.4)
53
- activesupport (= 7.0.4)
54
- activerecord (7.0.4)
55
- activemodel (= 7.0.4)
56
- activesupport (= 7.0.4)
52
+ activemodel (7.0.4.1)
53
+ activesupport (= 7.0.4.1)
54
+ activerecord (7.0.4.1)
55
+ activemodel (= 7.0.4.1)
56
+ activesupport (= 7.0.4.1)
57
57
  activerecord-import (1.4.1)
58
58
  activerecord (>= 4.2)
59
- activestorage (7.0.4)
60
- actionpack (= 7.0.4)
61
- activejob (= 7.0.4)
62
- activerecord (= 7.0.4)
63
- activesupport (= 7.0.4)
59
+ activestorage (7.0.4.1)
60
+ actionpack (= 7.0.4.1)
61
+ activejob (= 7.0.4.1)
62
+ activerecord (= 7.0.4.1)
63
+ activesupport (= 7.0.4.1)
64
64
  marcel (~> 1.0)
65
65
  mini_mime (>= 1.1.0)
66
- activesupport (7.0.4)
66
+ activesupport (7.0.4.1)
67
67
  concurrent-ruby (~> 1.0, >= 1.0.2)
68
68
  i18n (>= 1.6, < 2)
69
69
  minitest (>= 5.1)
@@ -73,10 +73,10 @@ GEM
73
73
  ast (2.4.2)
74
74
  bcrypt (3.1.18)
75
75
  bindex (0.8.1)
76
- bootsnap (1.13.0)
76
+ bootsnap (1.15.0)
77
77
  msgpack (~> 1.2)
78
78
  builder (3.2.4)
79
- capybara (3.37.1)
79
+ capybara (3.38.0)
80
80
  addressable
81
81
  matrix
82
82
  mini_mime (>= 0.1.3)
@@ -85,7 +85,6 @@ GEM
85
85
  rack-test (>= 0.6.3)
86
86
  regexp_parser (>= 1.5, < 3.0)
87
87
  xpath (~> 3.2)
88
- childprocess (4.1.0)
89
88
  concurrent-ruby (1.1.10)
90
89
  connection_pool (2.3.0)
91
90
  crass (1.0.6)
@@ -93,9 +92,8 @@ GEM
93
92
  activerecord (>= 5.a)
94
93
  database_cleaner-core (~> 2.0.0)
95
94
  database_cleaner-core (2.0.1)
96
- debug (1.6.2)
97
- irb (>= 1.3.6)
98
- reline (>= 0.3.1)
95
+ date (3.3.3)
96
+ debug (1.7.1)
99
97
  devise (4.8.1)
100
98
  bcrypt (~> 3.0)
101
99
  orm_adapter (~> 0.1)
@@ -104,7 +102,7 @@ GEM
104
102
  warden (~> 1.2.3)
105
103
  diff-lcs (1.5.0)
106
104
  docile (1.4.0)
107
- erubi (1.11.0)
105
+ erubi (1.12.0)
108
106
  factory_bot (6.2.1)
109
107
  activesupport (>= 5.0.0)
110
108
  factory_bot_rails (6.2.0)
@@ -112,68 +110,122 @@ GEM
112
110
  railties (>= 5.0.0)
113
111
  faker (2.23.0)
114
112
  i18n (>= 1.8.11, < 2)
115
- globalid (1.0.0)
113
+ faraday (2.7.4)
114
+ faraday-net_http (>= 2.0, < 3.1)
115
+ ruby2_keywords (>= 0.0.4)
116
+ faraday-net_http (3.0.2)
117
+ faraday-retry (2.0.0)
118
+ faraday (~> 2.0)
119
+ gapic-common (0.16.0)
120
+ faraday (>= 1.9, < 3.a)
121
+ faraday-retry (>= 1.0, < 3.a)
122
+ google-protobuf (~> 3.14)
123
+ googleapis-common-protos (>= 1.3.12, < 2.a)
124
+ googleapis-common-protos-types (>= 1.3.1, < 2.a)
125
+ googleauth (~> 1.0)
126
+ grpc (~> 1.36)
127
+ globalid (1.0.1)
116
128
  activesupport (>= 5.0)
129
+ google-cloud-core (1.6.0)
130
+ google-cloud-env (~> 1.0)
131
+ google-cloud-errors (~> 1.0)
132
+ google-cloud-env (1.6.0)
133
+ faraday (>= 0.17.3, < 3.0)
134
+ google-cloud-errors (1.3.0)
135
+ google-cloud-firestore (2.8.0)
136
+ concurrent-ruby (~> 1.0)
137
+ google-cloud-core (~> 1.5)
138
+ google-cloud-firestore-v1 (~> 0.0)
139
+ rbtree (~> 0.4.2)
140
+ google-cloud-firestore-v1 (0.8.0)
141
+ gapic-common (>= 0.10, < 2.a)
142
+ google-cloud-errors (~> 1.0)
143
+ google-cloud-location (>= 0.0, < 2.a)
144
+ google-cloud-location (0.3.0)
145
+ gapic-common (>= 0.16.0, < 2.a)
146
+ google-cloud-errors (~> 1.0)
147
+ google-protobuf (3.21.12)
148
+ googleapis-common-protos (1.4.0)
149
+ google-protobuf (~> 3.14)
150
+ googleapis-common-protos-types (~> 1.2)
151
+ grpc (~> 1.27)
152
+ googleapis-common-protos-types (1.5.0)
153
+ google-protobuf (~> 3.14)
154
+ googleauth (1.3.0)
155
+ faraday (>= 0.17.3, < 3.a)
156
+ jwt (>= 1.4, < 3.0)
157
+ memoist (~> 0.16)
158
+ multi_json (~> 1.11)
159
+ os (>= 0.9, < 2.0)
160
+ signet (>= 0.16, < 2.a)
161
+ grpc (1.50.0)
162
+ google-protobuf (~> 3.21)
163
+ googleapis-common-protos-types (~> 1.0)
117
164
  i18n (1.12.0)
118
165
  concurrent-ruby (~> 1.0)
119
166
  importmap-rails (1.1.5)
120
167
  actionpack (>= 6.0.0)
121
168
  railties (>= 6.0.0)
122
- io-console (0.5.11)
123
- irb (1.4.2)
124
- reline (>= 0.3.0)
125
169
  jbuilder (2.11.5)
126
170
  actionview (>= 5.0.0)
127
171
  activesupport (>= 5.0.0)
128
- json (2.5.1)
129
- loofah (2.19.0)
172
+ json (2.6.3)
173
+ jwt (2.6.0)
174
+ loofah (2.19.1)
130
175
  crass (~> 1.0.2)
131
176
  nokogiri (>= 1.5.9)
132
- mail (2.7.1)
177
+ mail (2.8.0.1)
133
178
  mini_mime (>= 0.1.1)
179
+ net-imap
180
+ net-pop
181
+ net-smtp
134
182
  marcel (1.0.2)
135
183
  matrix (0.4.2)
184
+ memoist (0.16.2)
136
185
  method_source (1.0.0)
137
186
  mini_mime (1.1.2)
138
- minitest (5.16.3)
187
+ minitest (5.17.0)
139
188
  msgpack (1.6.0)
140
- net-imap (0.3.1)
189
+ multi_json (1.15.0)
190
+ net-imap (0.3.4)
191
+ date
141
192
  net-protocol
142
193
  net-pop (0.1.2)
143
194
  net-protocol
144
- net-protocol (0.1.3)
195
+ net-protocol (0.2.1)
145
196
  timeout
146
- net-smtp (0.3.2)
197
+ net-smtp (0.3.3)
147
198
  net-protocol
148
199
  nio4r (2.5.8)
149
- nokogiri (1.13.9-x86_64-linux)
200
+ nokogiri (1.14.0-x86_64-linux)
150
201
  racc (~> 1.4)
151
202
  orm_adapter (0.5.0)
203
+ os (1.1.4)
152
204
  parallel (1.22.1)
153
- parser (3.1.2.1)
205
+ parser (3.2.0.0)
154
206
  ast (~> 2.4.1)
155
- pg (1.4.4)
156
- public_suffix (5.0.0)
207
+ pg (1.4.5)
208
+ public_suffix (5.0.1)
157
209
  puma (5.6.5)
158
210
  nio4r (~> 2.0)
159
- racc (1.6.0)
160
- rack (2.2.4)
211
+ racc (1.6.2)
212
+ rack (2.2.6.2)
161
213
  rack-test (2.0.2)
162
214
  rack (>= 1.3)
163
- rails (7.0.4)
164
- actioncable (= 7.0.4)
165
- actionmailbox (= 7.0.4)
166
- actionmailer (= 7.0.4)
167
- actionpack (= 7.0.4)
168
- actiontext (= 7.0.4)
169
- actionview (= 7.0.4)
170
- activejob (= 7.0.4)
171
- activemodel (= 7.0.4)
172
- activerecord (= 7.0.4)
173
- activestorage (= 7.0.4)
174
- activesupport (= 7.0.4)
215
+ rails (7.0.4.1)
216
+ actioncable (= 7.0.4.1)
217
+ actionmailbox (= 7.0.4.1)
218
+ actionmailer (= 7.0.4.1)
219
+ actionpack (= 7.0.4.1)
220
+ actiontext (= 7.0.4.1)
221
+ actionview (= 7.0.4.1)
222
+ activejob (= 7.0.4.1)
223
+ activemodel (= 7.0.4.1)
224
+ activerecord (= 7.0.4.1)
225
+ activestorage (= 7.0.4.1)
226
+ activesupport (= 7.0.4.1)
175
227
  bundler (>= 1.15.0)
176
- railties (= 7.0.4)
228
+ railties (= 7.0.4.1)
177
229
  rails-controller-testing (1.0.5)
178
230
  actionpack (>= 5.0.1.rc1)
179
231
  actionview (>= 5.0.1.rc1)
@@ -181,34 +233,33 @@ GEM
181
233
  rails-dom-testing (2.0.3)
182
234
  activesupport (>= 4.2.0)
183
235
  nokogiri (>= 1.6)
184
- rails-html-sanitizer (1.4.3)
185
- loofah (~> 2.3)
186
- railties (7.0.4)
187
- actionpack (= 7.0.4)
188
- activesupport (= 7.0.4)
236
+ rails-html-sanitizer (1.4.4)
237
+ loofah (~> 2.19, >= 2.19.1)
238
+ railties (7.0.4.1)
239
+ actionpack (= 7.0.4.1)
240
+ activesupport (= 7.0.4.1)
189
241
  method_source
190
242
  rake (>= 12.2)
191
243
  thor (~> 1.0)
192
244
  zeitwerk (~> 2.5)
193
245
  rainbow (3.1.1)
194
246
  rake (13.0.6)
247
+ rbtree (0.4.6)
195
248
  redis (4.8.0)
196
- regexp_parser (2.6.0)
197
- reline (0.3.1)
198
- io-console (~> 0.5)
249
+ regexp_parser (2.6.2)
199
250
  responders (3.0.1)
200
251
  actionpack (>= 5.0)
201
252
  railties (>= 5.0)
202
253
  rexml (3.2.5)
203
- rspec-core (3.11.0)
204
- rspec-support (~> 3.11.0)
205
- rspec-expectations (3.11.1)
254
+ rspec-core (3.12.0)
255
+ rspec-support (~> 3.12.0)
256
+ rspec-expectations (3.12.2)
206
257
  diff-lcs (>= 1.2.0, < 2.0)
207
- rspec-support (~> 3.11.0)
208
- rspec-mocks (3.11.1)
258
+ rspec-support (~> 3.12.0)
259
+ rspec-mocks (3.12.3)
209
260
  diff-lcs (>= 1.2.0, < 2.0)
210
- rspec-support (~> 3.11.0)
211
- rspec-rails (6.0.0)
261
+ rspec-support (~> 3.12.0)
262
+ rspec-rails (6.0.1)
212
263
  actionpack (>= 6.1)
213
264
  activesupport (>= 6.1)
214
265
  railties (>= 6.1)
@@ -216,39 +267,47 @@ GEM
216
267
  rspec-expectations (~> 3.11)
217
268
  rspec-mocks (~> 3.11)
218
269
  rspec-support (~> 3.11)
219
- rspec-support (3.11.1)
220
- rubocop (1.36.0)
270
+ rspec-support (3.12.0)
271
+ rubocop (1.43.0)
221
272
  json (~> 2.3)
222
273
  parallel (~> 1.10)
223
- parser (>= 3.1.2.1)
274
+ parser (>= 3.2.0.0)
224
275
  rainbow (>= 2.2.2, < 4.0)
225
276
  regexp_parser (>= 1.8, < 3.0)
226
277
  rexml (>= 3.2.5, < 4.0)
227
- rubocop-ast (>= 1.20.1, < 2.0)
278
+ rubocop-ast (>= 1.24.1, < 2.0)
228
279
  ruby-progressbar (~> 1.7)
229
- unicode-display_width (>= 1.4.0, < 3.0)
230
- rubocop-ast (1.22.0)
280
+ unicode-display_width (>= 2.4.0, < 3.0)
281
+ rubocop-ast (1.24.1)
231
282
  parser (>= 3.1.1.0)
232
- rubocop-rails (2.16.1)
283
+ rubocop-capybara (2.17.0)
284
+ rubocop (~> 1.41)
285
+ rubocop-rails (2.17.4)
233
286
  activesupport (>= 4.2.0)
234
287
  rack (>= 1.1)
235
288
  rubocop (>= 1.33.0, < 2.0)
236
- rubocop-rspec (2.13.2)
289
+ rubocop-rspec (2.18.1)
237
290
  rubocop (~> 1.33)
291
+ rubocop-capybara (~> 2.17)
238
292
  ruby-progressbar (1.11.0)
293
+ ruby2_keywords (0.0.5)
239
294
  rubyzip (2.3.2)
240
- selenium-webdriver (4.5.0)
241
- childprocess (>= 0.5, < 5.0)
295
+ selenium-webdriver (4.7.1)
242
296
  rexml (~> 3.2, >= 3.2.5)
243
297
  rubyzip (>= 1.2.2, < 3.0)
244
298
  websocket (~> 1.0)
245
- shoulda-matchers (5.2.0)
299
+ shoulda-matchers (5.3.0)
246
300
  activesupport (>= 5.2.0)
247
- sidekiq (6.5.7)
248
- connection_pool (>= 2.2.5)
301
+ sidekiq (6.5.8)
302
+ connection_pool (>= 2.2.5, < 3)
249
303
  rack (~> 2.0)
250
304
  redis (>= 4.5.0, < 5)
251
- simplecov (0.21.2)
305
+ signet (0.17.0)
306
+ addressable (~> 2.8)
307
+ faraday (>= 0.17.5, < 3.a)
308
+ jwt (>= 1.5, < 3.0)
309
+ multi_json (~> 1.10)
310
+ simplecov (0.22.0)
252
311
  docile (~> 1.1)
253
312
  simplecov-html (~> 0.11)
254
313
  simplecov_json_formatter (~> 0.1)
@@ -261,28 +320,28 @@ GEM
261
320
  actionpack (>= 3.1)
262
321
  railties (>= 3.1)
263
322
  slim (>= 3.0, < 5.0)
264
- sprockets (4.1.1)
323
+ sprockets (4.2.0)
265
324
  concurrent-ruby (~> 1.0)
266
- rack (> 1, < 3)
325
+ rack (>= 2.2.4, < 4)
267
326
  sprockets-rails (3.4.2)
268
327
  actionpack (>= 5.2)
269
328
  activesupport (>= 5.2)
270
329
  sprockets (>= 3.0.0)
271
- stimulus-rails (1.1.0)
330
+ stimulus-rails (1.2.1)
272
331
  railties (>= 6.0.0)
273
- tailwindcss-rails (2.0.14-x86_64-linux)
332
+ tailwindcss-rails (2.0.21-x86_64-linux)
274
333
  railties (>= 6.0.0)
275
334
  temple (0.8.2)
276
335
  thor (1.2.1)
277
336
  tilt (2.0.11)
278
- timeout (0.3.0)
279
- turbo-rails (1.3.1)
337
+ timeout (0.3.1)
338
+ turbo-rails (1.3.2)
280
339
  actionpack (>= 6.0.0)
281
340
  activejob (>= 6.0.0)
282
341
  railties (>= 6.0.0)
283
342
  tzinfo (2.0.5)
284
343
  concurrent-ruby (~> 1.0)
285
- unicode-display_width (2.3.0)
344
+ unicode-display_width (2.4.2)
286
345
  warden (1.2.9)
287
346
  rack (>= 2.0.9)
288
347
  web-console (4.2.0)
@@ -300,7 +359,7 @@ GEM
300
359
  websocket-extensions (0.1.5)
301
360
  xpath (3.2.0)
302
361
  nokogiri (~> 1.8)
303
- zeitwerk (2.6.1)
362
+ zeitwerk (2.6.6)
304
363
 
305
364
  PLATFORMS
306
365
  x86_64-linux
@@ -314,6 +373,7 @@ DEPENDENCIES
314
373
  devise (~> 4.8)
315
374
  factory_bot_rails (~> 6.2)
316
375
  faker (~> 2.23)
376
+ google-cloud-firestore (~> 2.6)
317
377
  importmap-rails (~> 1.1)
318
378
  jbuilder (~> 2.11)
319
379
  pg (~> 1.4)
@@ -337,7 +397,7 @@ DEPENDENCIES
337
397
  webdrivers (~> 5.2)
338
398
 
339
399
  RUBY VERSION
340
- ruby 3.0.3p157
400
+ ruby 3.2.0p0
341
401
 
342
402
  BUNDLED WITH
343
- 2.2.32
403
+ 2.4.1
data/README.md CHANGED
@@ -1,10 +1,13 @@
1
- # <img src="https://outerspace-coding.herokuapp.com/assets/pq-70825bc795d25668cf4f11b06b990ed0d1c2cae887acce0625e5059226a7946a.png" width="25" height="25"> Outerspace Blockchain
1
+ # <img src="https://osbc-blockchain.herokuapp.com/assets/logo-70825bc795d25668cf4f11b06b990ed0d1c2cae887acce0625e5059226a7946a.png" width="25" height="25"> Outerspace Blockchain
2
2
  <!-- Outerspace Logo -->
3
+
4
+ ### This application is instable and under development.
5
+ ### Please, use it with caution and at your own risk.
3
6
  ### A Ruby implementation of web blockchain framework.
4
7
  #### Developed using TDD (Test Driven Development).
5
8
  #### Github Actions CI/CD pipeline.
6
- #### Chrome Selenium tests are used to test the blockchain in a browser and its interaction with the blockchain.
7
- #### Chrome Selenium are included in the docker compose without any additional setup.
9
+ #### Firestore is used to store the blockchain.
10
+
8
11
  #### Simplecov is used to test code coverage.
9
12
 
10
13
  #### Rails Engine is used to create the blockchain.
@@ -12,21 +15,29 @@
12
15
 
13
16
  #### Rspec is used to test the blockchain.
14
17
 
15
- ## Build Version: 0.1.7
16
- ### Last Update:
17
- #### Added Open Ticket Api Methods
18
- #### Refactored some methods and tests
19
- #### Removed coverage folder github repo
20
- ##### TODO
21
- ###### Add more tests
22
- ###### Add more features
23
- ###### Include pagination
24
- ###### Create Queries Folder
25
- ###### Test in kubernetes
26
- ###### Add more documentation
27
- ###### Add NFT Generator
28
- ###### Increase the environment variables for autoconfig
29
- ###### Add features to autogeneration of blockchain for better configuration
18
+ ## Build Version: 0.2.0
19
+
20
+ ## Todo
21
+ * [ ] Firebase integration (this will be use instead of Redis management)
22
+ * [ ] Add and correct tests
23
+ * [ ] Add and correct documentation
24
+ * [ ] Add user verification methods
25
+ * [ ] Better mobile layout
26
+ * [ ] Create the price visualization and the price history api
27
+ * [ ] Add more blockchain features
28
+ * [ ] Add more blockchain tests
29
+ * [ ] Add more blockchain documentation
30
+ * [ ] Add nft's classification class
31
+ * [ ] Add nft's modularization class
32
+ * [ ] Add nft's generator class
33
+ * [ ] Benchmark blockchain and mining
34
+ * [ ] Create a blockchain explorer
35
+ * [ ] Create a default blockchain wallet android app generator with flutter
36
+ * [ ] Create generators that will work with rails and flutter at the same time
37
+ * [ ] Create the user marketplace
38
+ * [ ] Integrate Blockchain Api in other projects
39
+
40
+ Kubernets integration will be worked on in the future.
30
41
 
31
42
  ## System dependencies
32
43
  1. Docker
@@ -53,7 +64,6 @@ gem install osbc
53
64
  ```bash
54
65
  osbc PATH
55
66
  ```
56
-
57
67
  ### Compile OSBC from source
58
68
  ========================
59
69
  <!-- Compile OSBC from source -->
@@ -205,4 +215,4 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/JesusG
205
215
 
206
216
  ## License
207
217
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
208
- * [LICENSE](LICENSE) - MIT License
218
+ * [LICENSE](LICENSE) - MIT License
data/app/models/chain.rb CHANGED
@@ -1,10 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Chain < ApplicationRecord
4
- validates :name, presence: true, uniqueness: true, length: { maximum: 20 }
4
+ validates :name, presence: true, uniqueness: true, length: { maximum: 40 }
5
5
  validates :maintainer, presence: true, length: { maximum: 50 }
6
6
  validates :chain_version, presence: true, length: { maximum: 20 }
7
7
  validates :description, presence: true, length: { maximum: 1000 }
8
8
 
9
9
  has_many :blocks, dependent: :destroy
10
10
  end
11
+
@@ -1,6 +1,15 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
+ <!-- Google tag (gtag.js) -->
5
+ <script async src="https://www.googletagmanager.com/gtag/js?id=<%= ENV['GOOGLE_ANALYTICS_ID'] %>"></script>
6
+ <script>
7
+ window.dataLayer = window.dataLayer || [];
8
+ function gtag(){dataLayer.push(arguments);}
9
+ gtag('js', new Date());
10
+
11
+ gtag('config', '<%= ENV['GOOGLE_ANALYTICS_ID'] %>');
12
+ </script>
4
13
  <title>OuterspaceBlockchain</title>
5
14
  <meta name="viewport" content="width=device-width,initial-scale=1">
6
15
  <%= csrf_meta_tags %>
@@ -4,6 +4,8 @@ require "active_support/core_ext/integer/time"
4
4
 
5
5
  Rails.application.configure do
6
6
  config.hosts << "lvh.me"
7
+ config.hosts << "outerspacecoding.com"
8
+ config.hosts << "osbc.outerspacecoding.com"
7
9
  # Settings specified here will take precedence over those in config/application.rb.
8
10
 
9
11
  # In the development environment your application's code is reloaded any time
@@ -1 +1 @@
1
- Sidekiq.strict_args!
1
+ # Sidekiq.strict_args!
data/db/seeds.rb CHANGED
@@ -4,6 +4,7 @@ def seed_exec
4
4
  create_first_chain
5
5
  create_acceptable_word_lists
6
6
  create_first_block
7
+ create_first_user
7
8
  end
8
9
 
9
10
  def dev_seed_exec
@@ -19,16 +20,13 @@ def dev_seed_exec
19
20
  end
20
21
 
21
22
  def create_first_chain
22
- Chain.create(
23
+ chain = Chain.find_or_create_by(
23
24
  name: ENV["FIRST_CHAIN_NAME"],
24
25
  maintainer: ENV["FIRST_CHAIN_MAINTAINER"],
25
26
  chain_version: "0.0.1",
26
27
  description: "This is a blockchain project generated with outerspace-blockchain."
27
28
  )
28
-
29
- puts "Chain created"
30
- puts "Chain name: #{ENV["FIRST_CHAIN_NAME"]}"
31
- puts "Chain maintainer: #{ENV["FIRST_CHAIN_MAINTAINER"]}"
29
+ chain.present? ? puts("First chain OK") : puts("Chain seed error")
32
30
  end
33
31
 
34
32
  def create_acceptable_word_lists
@@ -36,7 +34,7 @@ def create_acceptable_word_lists
36
34
  create_acceptable_symbol_sequences
37
35
  create_acceptable_number_sequences
38
36
  end
39
-
37
+
40
38
  def create_acceptable_words
41
39
  word_list = %w[the of and to a in
42
40
  is you that it he
@@ -93,7 +91,7 @@ end
93
91
 
94
92
 
95
93
  def create_first_block
96
- Block.create(
94
+ block = Block.find_or_create_by(
97
95
  chain: Chain.first,
98
96
  previous_hash: "0000000000000000000000000000000000000000000000000000000000000000",
99
97
  block_data: "This is the first block of the blockchain.",
@@ -101,10 +99,8 @@ def create_first_block
101
99
  connections: 0,
102
100
  contracts_count: 0,
103
101
  contracts_limit: ENV["CONTRACTS_LIMIT"].to_i,
104
- # timestamp: Time.now
105
102
  )
106
-
107
- puts "First block created"
103
+ block.present? ? puts("First block OK") : puts("Block seed error")
108
104
  end
109
105
 
110
106
  def create_test_users
@@ -127,6 +123,17 @@ def create_test_users
127
123
  end
128
124
  end
129
125
 
126
+ def create_first_user
127
+ if User.find_by(email: ENV["FIRST_USER_EMAIL"], username: ENV["FIRST_USER_USERNAME"])
128
+ puts "First user already exists"
129
+ else
130
+ User.create(
131
+ email: ENV["FIRST_USER_EMAIL"], username: ENV["FIRST_USER_USERNAME"], password: ENV["FIRST_USER_PASSWORD"], password_confirmation: ENV["FIRST_USER_PASSWORD"]
132
+ )
133
+ puts "First user created"
134
+ end
135
+ end
136
+
130
137
  if Rails.env.development?
131
138
  dev_seed_exec
132
139
  else
data/docker-compose.yml CHANGED
@@ -27,9 +27,9 @@ services:
27
27
  - redis
28
28
  - db
29
29
  - sidekiq
30
- - chrome
31
30
  env_file:
32
31
  - .env
32
+ tty: true
33
33
  sidekiq:
34
34
  build: .
35
35
  command: bundle exec sidekiq -C config/sidekiq.yml
@@ -40,14 +40,14 @@ services:
40
40
  - db
41
41
  env_file:
42
42
  - .env
43
- chrome:
44
- image: selenium/standalone-chrome
45
- ports:
46
- - "4444:4444"
47
- depends_on:
48
- - sidekiq
49
- volumes:
50
- - /dev/shm:/dev/shm
43
+ # chrome:
44
+ # image: selenium/standalone-chrome
45
+ # ports:
46
+ # - "4444:4444"
47
+ # depends_on:
48
+ # - sidekiq
49
+ # volumes:
50
+ # - /dev/shm:/dev/shm
51
51
  volumes:
52
52
  redis:
53
53
  postgres:
data/lib/osbc/osbc.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Osbc
4
- VERSION = "0.1.9"
4
+ VERSION = "0.2.0"
5
5
  class Osbc
6
6
  end
7
7
 
data/mining_concept.ipynb CHANGED
@@ -89,8 +89,8 @@
89
89
  }
90
90
  ],
91
91
  "source": [
92
- "key = '9e8b3f4bf92577861e06e3bc84a809794dd6a7ab9da1070a78eb763b3399595a'\n",
93
- "secret = 'a239c12ecc42911ecbc3b23a9539976caaa60f7d40028dea17cb67cc538c21bd'\n",
92
+ "key = \n",
93
+ "secret = \n",
94
94
  "\n",
95
95
  "headers = {\n",
96
96
  " 'X-API-KEY': key,\n",
@@ -245,7 +245,7 @@
245
245
  }
246
246
  ],
247
247
  "source": [
248
- "hash_to_send = '99893b819abfa80498f244fddd080f570cecdc994199d5c6a8148141401cdff1'\n",
248
+ "hash_to_send = \n",
249
249
  "\n",
250
250
  "params = { 'user_confirmation_hash' : hash_to_send }\n",
251
251
  "confirm_request = re.post('http://localhost/api/v1/confirm_block', headers=headers, params=params)\n",
@@ -270,7 +270,7 @@
270
270
  "name": "python",
271
271
  "nbconvert_exporter": "python",
272
272
  "pygments_lexer": "ipython3",
273
- "version": "3.9.2"
273
+ "version": "3.9.2 (default, Feb 28 2021, 17:03:44) \n[GCC 10.2.1 20210110]"
274
274
  },
275
275
  "orig_nbformat": 4,
276
276
  "vscode": {
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.description = "Blockchain implementation in Ruby using Rails and Docker"
13
13
  spec.homepage = "https://outerspace-blockchain.herokuapp.com/"
14
14
  spec.license = "MIT"
15
- spec.required_ruby_version = ">= 3.0.3"
15
+ spec.required_ruby_version = ">= 3.2.0"
16
16
 
17
17
  spec.metadata["allowed_push_host"] = "https://rubygems.org"
18
18
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: osbc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - jesus_gautamah
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-26 00:00:00.000000000 Z
11
+ date: 2023-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -291,15 +291,8 @@ dependencies:
291
291
  - !ruby/object:Gem::Version
292
292
  version: '2.11'
293
293
  description: |-
294
- Outerspace Web Blockchain Framework implementation in Ruby using Rails and Docker.
295
-
294
+ Outerspace Web Blockchain Framework implementation in Ruby using Rails, Docker and Firestore, instable and under development.
296
295
  Please visit https://github.com/JesusGautamah/outerspace-blockchain for more information.
297
-
298
- If you like the project or ideas, please consider donating to the project or star it on GitHub.
299
-
300
- It will be constructed for a long time and will be improved with the help of the community.
301
-
302
- Thank you for your support.
303
296
  email:
304
297
  - lima.jesuscc@gmail.com
305
298
  executables:
@@ -314,7 +307,7 @@ executables:
314
307
  extensions: []
315
308
  extra_rdoc_files: []
316
309
  files:
317
- - ".env"
310
+ - ".env_sample"
318
311
  - ".rspec"
319
312
  - ".rubocop.yml"
320
313
  - ".ruby-version"
@@ -602,7 +595,7 @@ metadata:
602
595
  homepage_uri: https://github.com/JesusGautamah/outerspace-blockchain
603
596
  source_code_uri: https://github.com/JesusGautamah/outerspace-blockchain
604
597
  changelog_uri: https://github.com/JesusGautamah/outerspace-blockchain/blob/main/CHANGELOG.md
605
- post_install_message:
598
+ post_install_message:
606
599
  rdoc_options: []
607
600
  require_paths:
608
601
  - lib
@@ -617,8 +610,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
617
610
  - !ruby/object:Gem::Version
618
611
  version: '0'
619
612
  requirements: []
620
- rubygems_version: 3.2.32
621
- signing_key:
613
+ rubygems_version: 3.4.1
614
+ signing_key:
622
615
  specification_version: 4
623
616
  summary: Outerspace Web Blockchain Framework implementation in Ruby
624
617
  test_files: []
data/.env DELETED
@@ -1,6 +0,0 @@
1
- FIRST_CHAIN_NAME=YOUR_CHAIN_NAME
2
- FIRST_CHAIN_MAINTAINER=YOUR_NAME
3
- CONTRACTS_LIMIT=2
4
- SIGNATURES_LIMIT=5
5
- REDIS_URL=redis://redis:6379
6
- ENV_MACHINE=docker