Xwitter 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.babelrc +26 -0
- data/.gitignore +19 -0
- data/.postcssrc.yml +3 -0
- data/.ruby-version +1 -0
- data/Gemfile +44 -0
- data/Gemfile.lock +247 -0
- data/LICENSE.txt +21 -0
- data/README.md +35 -0
- data/Rakefile +7 -0
- data/Schemafile +40 -0
- data/Xwitter.gemspec +28 -0
- data/app/assets/config/manifest.js +3 -0
- data/app/assets/images/.keep +0 -0
- data/app/assets/javascripts/application.js +16 -0
- data/app/assets/javascripts/cable.js +13 -0
- data/app/assets/javascripts/channels/.keep +0 -0
- data/app/assets/javascripts/messages.coffee +3 -0
- data/app/assets/javascripts/users.coffee +3 -0
- data/app/assets/stylesheets/application.css +15 -0
- data/app/assets/stylesheets/messages.scss +3 -0
- data/app/assets/stylesheets/scaffolds.scss +84 -0
- data/app/assets/stylesheets/users.scss +3 -0
- data/app/channels/application_cable/channel.rb +4 -0
- data/app/channels/application_cable/connection.rb +4 -0
- data/app/controllers/application_controller.rb +2 -0
- data/app/controllers/concerns/.keep +0 -0
- data/app/controllers/messages_controller.rb +79 -0
- data/app/controllers/profiles_controller.rb +48 -0
- data/app/helpers/application_helper.rb +2 -0
- data/app/helpers/messages_helper.rb +2 -0
- data/app/helpers/users_helper.rb +2 -0
- data/app/javascript/components/.gitkeep +0 -0
- data/app/javascript/packs/application.js +14 -0
- data/app/javascript/packs/application.scss +1 -0
- data/app/javascript/packs/hello_react.jsx +26 -0
- data/app/javascript/packs/hello_typescript.ts +4 -0
- data/app/javascript/packs/server_rendering.js +5 -0
- data/app/jobs/application_job.rb +2 -0
- data/app/mailers/application_mailer.rb +4 -0
- data/app/models/application_record.rb +3 -0
- data/app/models/concerns/.keep +0 -0
- data/app/models/message.rb +4 -0
- data/app/models/user.rb +6 -0
- data/app/views/layouts/application.html.slim +16 -0
- data/app/views/layouts/mailer.html.erb +13 -0
- data/app/views/layouts/mailer.text.erb +1 -0
- data/app/views/messages/_form.html.slim +12 -0
- data/app/views/messages/_index.html.slim +12 -0
- data/app/views/messages/_message.json.jbuilder +2 -0
- data/app/views/messages/_show.html.slim +11 -0
- data/app/views/messages/edit.html.slim +8 -0
- data/app/views/messages/index.html.slim +20 -0
- data/app/views/messages/index.json.jbuilder +1 -0
- data/app/views/messages/new.html.slim +5 -0
- data/app/views/messages/show.html.slim +9 -0
- data/app/views/messages/show.json.jbuilder +1 -0
- data/app/views/profiles/_form.html.slim +15 -0
- data/app/views/profiles/_user.json.jbuilder +2 -0
- data/app/views/profiles/edit.html.slim +5 -0
- data/app/views/profiles/show.html.slim +8 -0
- data/app/views/profiles/show.json.jbuilder +1 -0
- data/app/views/users/confirmations/new.html.erb +16 -0
- data/app/views/users/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/users/mailer/email_changed.html.erb +7 -0
- data/app/views/users/mailer/password_change.html.erb +3 -0
- data/app/views/users/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/users/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/users/passwords/edit.html.erb +25 -0
- data/app/views/users/passwords/new.html.erb +16 -0
- data/app/views/users/registrations/edit.html.erb +43 -0
- data/app/views/users/registrations/new.html.erb +29 -0
- data/app/views/users/sessions/new.html.slim +16 -0
- data/app/views/users/shared/_links.html.slim +21 -0
- data/app/views/users/unlocks/new.html.erb +16 -0
- data/bin/bundle +3 -0
- data/bin/console +14 -0
- data/bin/rails +9 -0
- data/bin/rake +9 -0
- data/bin/setup +8 -0
- data/bin/spring +17 -0
- data/bin/update +31 -0
- data/bin/webpack +15 -0
- data/bin/webpack-dev-server +15 -0
- data/bin/yarn +11 -0
- data/config/application.rb +19 -0
- data/config/boot.rb +4 -0
- data/config/cable.yml +10 -0
- data/config/credentials.yml.enc +1 -0
- data/config/database.yml +26 -0
- data/config/environment.rb +5 -0
- data/config/environments/development.rb +63 -0
- data/config/environments/production.rb +96 -0
- data/config/environments/test.rb +46 -0
- data/config/initializers/application_controller_renderer.rb +8 -0
- data/config/initializers/assets.rb +14 -0
- data/config/initializers/backtrace_silencers.rb +7 -0
- data/config/initializers/content_security_policy.rb +25 -0
- data/config/initializers/cookies_serializer.rb +5 -0
- data/config/initializers/devise.rb +290 -0
- data/config/initializers/filter_parameter_logging.rb +4 -0
- data/config/initializers/inflections.rb +16 -0
- data/config/initializers/mime_types.rb +4 -0
- data/config/initializers/wrap_parameters.rb +14 -0
- data/config/locales/devise.en.yml +64 -0
- data/config/locales/en.yml +33 -0
- data/config/puma.rb +34 -0
- data/config/routes.rb +7 -0
- data/config/spring.rb +6 -0
- data/config/storage.yml +34 -0
- data/config/webpack/development.js +5 -0
- data/config/webpack/environment.js +5 -0
- data/config/webpack/loaders/typescript.js +6 -0
- data/config/webpack/production.js +5 -0
- data/config/webpack/test.js +5 -0
- data/config/webpacker.yml +71 -0
- data/config.ru +5 -0
- data/db/seeds.rb +7 -0
- data/lib/Xwitter/version.rb +3 -0
- data/lib/Xwitter.rb +6 -0
- data/lib/assets/.keep +0 -0
- data/lib/tasks/.keep +0 -0
- data/log/.keep +0 -0
- data/package.json +20 -0
- data/public/404.html +67 -0
- data/public/422.html +67 -0
- data/public/500.html +66 -0
- data/public/apple-touch-icon-precomposed.png +0 -0
- data/public/apple-touch-icon.png +0 -0
- data/public/favicon.ico +0 -0
- data/public/robots.txt +1 -0
- data/storage/.keep +0 -0
- data/tsconfig.json +20 -0
- data/vendor/.keep +0 -0
- data/yarn.lock +6051 -0
- metadata +206 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9b50b28b796dfc085d711e55972d4ab8715581551eb7f208b04c15026bf11ea1
|
4
|
+
data.tar.gz: 0760f874e11fe179e2f5c31c82bbeaaec3a8f5f77b878e7d16221f4787a02abc
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5f9a0454aff54100bee78332684a25d6f08502cfec69fc14b5d15389722643b78cc2fde41c0aeaaf72cdb09644b4fca255680f92133830e11d41f7a087360fe1
|
7
|
+
data.tar.gz: c5c7b9e9d60941451702e55618d10a5b78d503d0d975ff550a7373ae3b1b6f27180d5547bca50b1d8cb0a54e3762d4176ad274f71874e75e44693861ca349e18
|
data/.babelrc
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
{
|
2
|
+
"presets": [
|
3
|
+
[
|
4
|
+
"env",
|
5
|
+
{
|
6
|
+
"modules": false,
|
7
|
+
"targets": {
|
8
|
+
"browsers": "> 1%",
|
9
|
+
"uglify": true
|
10
|
+
},
|
11
|
+
"useBuiltIns": true
|
12
|
+
}
|
13
|
+
],
|
14
|
+
"react"
|
15
|
+
],
|
16
|
+
"plugins": [
|
17
|
+
"syntax-dynamic-import",
|
18
|
+
"transform-object-rest-spread",
|
19
|
+
[
|
20
|
+
"transform-class-properties",
|
21
|
+
{
|
22
|
+
"spec": true
|
23
|
+
}
|
24
|
+
]
|
25
|
+
]
|
26
|
+
}
|
data/.gitignore
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
/.bundle/
|
2
|
+
/.yardoc
|
3
|
+
/_yardoc/
|
4
|
+
/coverage/
|
5
|
+
/doc/
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/tmp/
|
9
|
+
/log/
|
10
|
+
/db/migrate/
|
11
|
+
*.sqlite3
|
12
|
+
|
13
|
+
# Ignore master key for decrypting credentials and more.
|
14
|
+
/config/master.key
|
15
|
+
/public/packs
|
16
|
+
/public/packs-test
|
17
|
+
/node_modules
|
18
|
+
yarn-debug.log*
|
19
|
+
.yarn-integrity
|
data/.postcssrc.yml
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-2.5.1
|
data/Gemfile
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
3
|
+
|
4
|
+
ruby '2.5.1'
|
5
|
+
|
6
|
+
gem 'rails', '~> 5.2.1'
|
7
|
+
gem 'pg', require: false
|
8
|
+
|
9
|
+
gem 'puma', '~> 3.11'
|
10
|
+
gem 'slim-rails'
|
11
|
+
gem 'sass-rails', '~> 5.0'
|
12
|
+
gem 'webpacker', '~> 3.5'
|
13
|
+
gem 'react-rails'
|
14
|
+
gem 'ridgepole'
|
15
|
+
|
16
|
+
gem 'uglifier', '>= 1.3.0'
|
17
|
+
gem 'mini_racer', platforms: :ruby
|
18
|
+
gem 'coffee-rails', '~> 4.2'
|
19
|
+
gem 'turbolinks', '~> 5'
|
20
|
+
gem 'jbuilder', '~> 2.5'
|
21
|
+
gem 'bcrypt', '~> 3.1.7'
|
22
|
+
gem 'mini_magick', '~> 4.8'
|
23
|
+
gem 'bootsnap', '>= 1.1.0', require: false
|
24
|
+
|
25
|
+
# Authenticate
|
26
|
+
gem 'devise', '~> 4.5.0'
|
27
|
+
|
28
|
+
group :development, :test do
|
29
|
+
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
|
30
|
+
gem 'sqlite3'
|
31
|
+
end
|
32
|
+
|
33
|
+
group :development do
|
34
|
+
gem 'web-console', '>= 3.3.0'
|
35
|
+
gem 'listen', '>= 3.0.5', '< 3.2'
|
36
|
+
gem 'spring'
|
37
|
+
gem 'spring-watcher-listen', '~> 2.0.0'
|
38
|
+
end
|
39
|
+
|
40
|
+
group :test do
|
41
|
+
end
|
42
|
+
|
43
|
+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
44
|
+
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,247 @@
|
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
actioncable (5.2.1)
|
5
|
+
actionpack (= 5.2.1)
|
6
|
+
nio4r (~> 2.0)
|
7
|
+
websocket-driver (>= 0.6.1)
|
8
|
+
actionmailer (5.2.1)
|
9
|
+
actionpack (= 5.2.1)
|
10
|
+
actionview (= 5.2.1)
|
11
|
+
activejob (= 5.2.1)
|
12
|
+
mail (~> 2.5, >= 2.5.4)
|
13
|
+
rails-dom-testing (~> 2.0)
|
14
|
+
actionpack (5.2.1)
|
15
|
+
actionview (= 5.2.1)
|
16
|
+
activesupport (= 5.2.1)
|
17
|
+
rack (~> 2.0)
|
18
|
+
rack-test (>= 0.6.3)
|
19
|
+
rails-dom-testing (~> 2.0)
|
20
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
21
|
+
actionview (5.2.1)
|
22
|
+
activesupport (= 5.2.1)
|
23
|
+
builder (~> 3.1)
|
24
|
+
erubi (~> 1.4)
|
25
|
+
rails-dom-testing (~> 2.0)
|
26
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
27
|
+
activejob (5.2.1)
|
28
|
+
activesupport (= 5.2.1)
|
29
|
+
globalid (>= 0.3.6)
|
30
|
+
activemodel (5.2.1)
|
31
|
+
activesupport (= 5.2.1)
|
32
|
+
activerecord (5.2.1)
|
33
|
+
activemodel (= 5.2.1)
|
34
|
+
activesupport (= 5.2.1)
|
35
|
+
arel (>= 9.0)
|
36
|
+
activestorage (5.2.1)
|
37
|
+
actionpack (= 5.2.1)
|
38
|
+
activerecord (= 5.2.1)
|
39
|
+
marcel (~> 0.3.1)
|
40
|
+
activesupport (5.2.1)
|
41
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
42
|
+
i18n (>= 0.7, < 2)
|
43
|
+
minitest (~> 5.1)
|
44
|
+
tzinfo (~> 1.1)
|
45
|
+
arel (9.0.0)
|
46
|
+
babel-source (5.8.35)
|
47
|
+
babel-transpiler (0.7.0)
|
48
|
+
babel-source (>= 4.0, < 6)
|
49
|
+
execjs (~> 2.0)
|
50
|
+
bcrypt (3.1.12)
|
51
|
+
bindex (0.5.0)
|
52
|
+
bootsnap (1.3.2)
|
53
|
+
msgpack (~> 1.0)
|
54
|
+
builder (3.2.3)
|
55
|
+
byebug (10.0.2)
|
56
|
+
coffee-rails (4.2.2)
|
57
|
+
coffee-script (>= 2.2.0)
|
58
|
+
railties (>= 4.0.0)
|
59
|
+
coffee-script (2.4.1)
|
60
|
+
coffee-script-source
|
61
|
+
execjs
|
62
|
+
coffee-script-source (1.12.2)
|
63
|
+
concurrent-ruby (1.1.3)
|
64
|
+
connection_pool (2.2.2)
|
65
|
+
crass (1.0.4)
|
66
|
+
devise (4.5.0)
|
67
|
+
bcrypt (~> 3.0)
|
68
|
+
orm_adapter (~> 0.1)
|
69
|
+
railties (>= 4.1.0, < 6.0)
|
70
|
+
responders
|
71
|
+
warden (~> 1.2.3)
|
72
|
+
diffy (3.2.1)
|
73
|
+
erubi (1.7.1)
|
74
|
+
execjs (2.7.0)
|
75
|
+
ffi (1.9.25)
|
76
|
+
globalid (0.4.1)
|
77
|
+
activesupport (>= 4.2.0)
|
78
|
+
i18n (1.1.1)
|
79
|
+
concurrent-ruby (~> 1.0)
|
80
|
+
jbuilder (2.8.0)
|
81
|
+
activesupport (>= 4.2.0)
|
82
|
+
multi_json (>= 1.2)
|
83
|
+
libv8 (6.7.288.46.1)
|
84
|
+
listen (3.1.5)
|
85
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
86
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
87
|
+
ruby_dep (~> 1.2)
|
88
|
+
loofah (2.2.3)
|
89
|
+
crass (~> 1.0.2)
|
90
|
+
nokogiri (>= 1.5.9)
|
91
|
+
mail (2.7.1)
|
92
|
+
mini_mime (>= 0.1.1)
|
93
|
+
marcel (0.3.3)
|
94
|
+
mimemagic (~> 0.3.2)
|
95
|
+
method_source (0.9.1)
|
96
|
+
mimemagic (0.3.2)
|
97
|
+
mini_magick (4.9.2)
|
98
|
+
mini_mime (1.0.1)
|
99
|
+
mini_portile2 (2.3.0)
|
100
|
+
mini_racer (0.2.4)
|
101
|
+
libv8 (>= 6.3)
|
102
|
+
minitest (5.11.3)
|
103
|
+
msgpack (1.2.4)
|
104
|
+
multi_json (1.13.1)
|
105
|
+
nio4r (2.3.1)
|
106
|
+
nokogiri (1.8.5)
|
107
|
+
mini_portile2 (~> 2.3.0)
|
108
|
+
orm_adapter (0.5.0)
|
109
|
+
pg (1.1.3)
|
110
|
+
puma (3.12.0)
|
111
|
+
rack (2.0.6)
|
112
|
+
rack-proxy (0.6.5)
|
113
|
+
rack
|
114
|
+
rack-test (1.1.0)
|
115
|
+
rack (>= 1.0, < 3)
|
116
|
+
rails (5.2.1)
|
117
|
+
actioncable (= 5.2.1)
|
118
|
+
actionmailer (= 5.2.1)
|
119
|
+
actionpack (= 5.2.1)
|
120
|
+
actionview (= 5.2.1)
|
121
|
+
activejob (= 5.2.1)
|
122
|
+
activemodel (= 5.2.1)
|
123
|
+
activerecord (= 5.2.1)
|
124
|
+
activestorage (= 5.2.1)
|
125
|
+
activesupport (= 5.2.1)
|
126
|
+
bundler (>= 1.3.0)
|
127
|
+
railties (= 5.2.1)
|
128
|
+
sprockets-rails (>= 2.0.0)
|
129
|
+
rails-dom-testing (2.0.3)
|
130
|
+
activesupport (>= 4.2.0)
|
131
|
+
nokogiri (>= 1.6)
|
132
|
+
rails-html-sanitizer (1.0.4)
|
133
|
+
loofah (~> 2.2, >= 2.2.2)
|
134
|
+
railties (5.2.1)
|
135
|
+
actionpack (= 5.2.1)
|
136
|
+
activesupport (= 5.2.1)
|
137
|
+
method_source
|
138
|
+
rake (>= 0.8.7)
|
139
|
+
thor (>= 0.19.0, < 2.0)
|
140
|
+
rake (12.3.1)
|
141
|
+
rb-fsevent (0.10.3)
|
142
|
+
rb-inotify (0.9.10)
|
143
|
+
ffi (>= 0.5.0, < 2)
|
144
|
+
react-rails (2.4.7)
|
145
|
+
babel-transpiler (>= 0.7.0)
|
146
|
+
connection_pool
|
147
|
+
execjs
|
148
|
+
railties (>= 3.2)
|
149
|
+
tilt
|
150
|
+
responders (2.4.0)
|
151
|
+
actionpack (>= 4.2.0, < 5.3)
|
152
|
+
railties (>= 4.2.0, < 5.3)
|
153
|
+
ridgepole (0.7.4)
|
154
|
+
activerecord (>= 5.0.1, < 6)
|
155
|
+
diffy
|
156
|
+
ruby_dep (1.5.0)
|
157
|
+
sass (3.7.2)
|
158
|
+
sass-listen (~> 4.0.0)
|
159
|
+
sass-listen (4.0.0)
|
160
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
161
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
162
|
+
sass-rails (5.0.7)
|
163
|
+
railties (>= 4.0.0, < 6)
|
164
|
+
sass (~> 3.1)
|
165
|
+
sprockets (>= 2.8, < 4.0)
|
166
|
+
sprockets-rails (>= 2.0, < 4.0)
|
167
|
+
tilt (>= 1.1, < 3)
|
168
|
+
slim (3.0.9)
|
169
|
+
temple (>= 0.7.6, < 0.9)
|
170
|
+
tilt (>= 1.3.3, < 2.1)
|
171
|
+
slim-rails (3.1.3)
|
172
|
+
actionpack (>= 3.1)
|
173
|
+
railties (>= 3.1)
|
174
|
+
slim (~> 3.0)
|
175
|
+
spring (2.0.2)
|
176
|
+
activesupport (>= 4.2)
|
177
|
+
spring-watcher-listen (2.0.1)
|
178
|
+
listen (>= 2.7, < 4.0)
|
179
|
+
spring (>= 1.2, < 3.0)
|
180
|
+
sprockets (3.7.2)
|
181
|
+
concurrent-ruby (~> 1.0)
|
182
|
+
rack (> 1, < 3)
|
183
|
+
sprockets-rails (3.2.1)
|
184
|
+
actionpack (>= 4.0)
|
185
|
+
activesupport (>= 4.0)
|
186
|
+
sprockets (>= 3.0.0)
|
187
|
+
sqlite3 (1.3.13)
|
188
|
+
temple (0.8.0)
|
189
|
+
thor (0.20.0)
|
190
|
+
thread_safe (0.3.6)
|
191
|
+
tilt (2.0.8)
|
192
|
+
turbolinks (5.2.0)
|
193
|
+
turbolinks-source (~> 5.2)
|
194
|
+
turbolinks-source (5.2.0)
|
195
|
+
tzinfo (1.2.5)
|
196
|
+
thread_safe (~> 0.1)
|
197
|
+
uglifier (4.1.19)
|
198
|
+
execjs (>= 0.3.0, < 3)
|
199
|
+
warden (1.2.7)
|
200
|
+
rack (>= 1.0)
|
201
|
+
web-console (3.7.0)
|
202
|
+
actionview (>= 5.0)
|
203
|
+
activemodel (>= 5.0)
|
204
|
+
bindex (>= 0.4.0)
|
205
|
+
railties (>= 5.0)
|
206
|
+
webpacker (3.5.5)
|
207
|
+
activesupport (>= 4.2)
|
208
|
+
rack-proxy (>= 0.6.1)
|
209
|
+
railties (>= 4.2)
|
210
|
+
websocket-driver (0.7.0)
|
211
|
+
websocket-extensions (>= 0.1.0)
|
212
|
+
websocket-extensions (0.1.3)
|
213
|
+
|
214
|
+
PLATFORMS
|
215
|
+
ruby
|
216
|
+
|
217
|
+
DEPENDENCIES
|
218
|
+
bcrypt (~> 3.1.7)
|
219
|
+
bootsnap (>= 1.1.0)
|
220
|
+
byebug
|
221
|
+
coffee-rails (~> 4.2)
|
222
|
+
devise (~> 4.5.0)
|
223
|
+
jbuilder (~> 2.5)
|
224
|
+
listen (>= 3.0.5, < 3.2)
|
225
|
+
mini_magick (~> 4.8)
|
226
|
+
mini_racer
|
227
|
+
pg
|
228
|
+
puma (~> 3.11)
|
229
|
+
rails (~> 5.2.1)
|
230
|
+
react-rails
|
231
|
+
ridgepole
|
232
|
+
sass-rails (~> 5.0)
|
233
|
+
slim-rails
|
234
|
+
spring
|
235
|
+
spring-watcher-listen (~> 2.0.0)
|
236
|
+
sqlite3
|
237
|
+
turbolinks (~> 5)
|
238
|
+
tzinfo-data
|
239
|
+
uglifier (>= 1.3.0)
|
240
|
+
web-console (>= 3.3.0)
|
241
|
+
webpacker (~> 3.5)
|
242
|
+
|
243
|
+
RUBY VERSION
|
244
|
+
ruby 2.5.1p57
|
245
|
+
|
246
|
+
BUNDLED WITH
|
247
|
+
1.17.1
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 myun2
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# Xwitter
|
2
|
+
|
3
|
+
Twitter like interface
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'Xwitter'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install Xwitter
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
## Development
|
24
|
+
|
25
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
26
|
+
|
27
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
28
|
+
|
29
|
+
## Contributing
|
30
|
+
|
31
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/Xwitter.
|
32
|
+
|
33
|
+
## License
|
34
|
+
|
35
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/Schemafile
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# Export Schema
|
2
|
+
create_table :users do |t|
|
3
|
+
t.string :email, null: false
|
4
|
+
t.string :name
|
5
|
+
t.string :screen_name
|
6
|
+
t.string :encrypted_password, null: false
|
7
|
+
t.string :reset_password_token
|
8
|
+
t.boolean :public, null: false, default: true
|
9
|
+
t.datetime :reset_password_sent_at
|
10
|
+
t.datetime :remember_created_at
|
11
|
+
t.timestamps null: false
|
12
|
+
t.index ["name"], unique: true
|
13
|
+
end
|
14
|
+
|
15
|
+
create_table "messages", force: :cascade do |t|
|
16
|
+
t.bigint "user_id", null: false
|
17
|
+
t.text "text", null: false
|
18
|
+
t.datetime "created_at", null: false
|
19
|
+
t.index ["user_id"]
|
20
|
+
end
|
21
|
+
|
22
|
+
create_table "likes", force: :cascade do |t|
|
23
|
+
t.bigint "user_id", null: false
|
24
|
+
t.bigint "message_id", null: false
|
25
|
+
t.datetime "created_at", null: false
|
26
|
+
t.index ["user_id", "message_id"], unique: true
|
27
|
+
end
|
28
|
+
|
29
|
+
create_table "shares", force: :cascade do |t|
|
30
|
+
t.bigint "user_id", null: false
|
31
|
+
t.bigint "message_id", null: false
|
32
|
+
t.datetime "created_at", null: false
|
33
|
+
t.index ["user_id", "message_id"], unique: true
|
34
|
+
end
|
35
|
+
|
36
|
+
add_foreign_key "messages", "users"
|
37
|
+
add_foreign_key "likes", "users"
|
38
|
+
add_foreign_key "likes", "messages"
|
39
|
+
add_foreign_key "shares", "users"
|
40
|
+
add_foreign_key "shares", "messages"
|
data/Xwitter.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "Xwitter/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "Xwitter"
|
8
|
+
spec.version = Xwitter::VERSION
|
9
|
+
spec.authors = ["myun2"]
|
10
|
+
spec.email = ["myun2@mbr.nifty.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Twitter like interface}
|
13
|
+
spec.description = %q{Twitter like interface}
|
14
|
+
spec.homepage = "https://github.com/myun2/Xwitter"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Specify which files should be added to the gem when it is released.
|
18
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
19
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
20
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
+
end
|
22
|
+
spec.bindir = "exe"
|
23
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
+
spec.require_paths = ["lib"]
|
25
|
+
|
26
|
+
spec.add_development_dependency "bundler", "~> 1.17"
|
27
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
+
end
|
File without changes
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
|
5
|
+
// vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file. JavaScript code in this file should be added after the last require_* statement.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require rails-ujs
|
14
|
+
//= require activestorage
|
15
|
+
//= require turbolinks
|
16
|
+
//= require_tree .
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// Action Cable provides the framework to deal with WebSockets in Rails.
|
2
|
+
// You can generate new channels where WebSocket features live using the `rails generate channel` command.
|
3
|
+
//
|
4
|
+
//= require action_cable
|
5
|
+
//= require_self
|
6
|
+
//= require_tree ./channels
|
7
|
+
|
8
|
+
(function() {
|
9
|
+
this.App || (this.App = {});
|
10
|
+
|
11
|
+
App.cable = ActionCable.createConsumer();
|
12
|
+
|
13
|
+
}).call(this);
|
File without changes
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
|
6
|
+
* vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
10
|
+
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
|
+
* It is generally better to create a new file per style scope.
|
12
|
+
*
|
13
|
+
*= require_tree .
|
14
|
+
*= require_self
|
15
|
+
*/
|
@@ -0,0 +1,84 @@
|
|
1
|
+
body {
|
2
|
+
background-color: #fff;
|
3
|
+
color: #333;
|
4
|
+
margin: 33px;
|
5
|
+
font-family: verdana, arial, helvetica, sans-serif;
|
6
|
+
font-size: 13px;
|
7
|
+
line-height: 18px;
|
8
|
+
}
|
9
|
+
|
10
|
+
p, ol, ul, td {
|
11
|
+
font-family: verdana, arial, helvetica, sans-serif;
|
12
|
+
font-size: 13px;
|
13
|
+
line-height: 18px;
|
14
|
+
}
|
15
|
+
|
16
|
+
pre {
|
17
|
+
background-color: #eee;
|
18
|
+
padding: 10px;
|
19
|
+
font-size: 11px;
|
20
|
+
}
|
21
|
+
|
22
|
+
a {
|
23
|
+
color: #000;
|
24
|
+
|
25
|
+
&:visited {
|
26
|
+
color: #666;
|
27
|
+
}
|
28
|
+
|
29
|
+
&:hover {
|
30
|
+
color: #fff;
|
31
|
+
background-color: #000;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
th {
|
36
|
+
padding-bottom: 5px;
|
37
|
+
}
|
38
|
+
|
39
|
+
td {
|
40
|
+
padding: 0 5px 7px;
|
41
|
+
}
|
42
|
+
|
43
|
+
div {
|
44
|
+
&.field, &.actions {
|
45
|
+
margin-bottom: 10px;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
#notice {
|
50
|
+
color: green;
|
51
|
+
}
|
52
|
+
|
53
|
+
.field_with_errors {
|
54
|
+
padding: 2px;
|
55
|
+
background-color: red;
|
56
|
+
display: table;
|
57
|
+
}
|
58
|
+
|
59
|
+
#error_explanation {
|
60
|
+
width: 450px;
|
61
|
+
border: 2px solid red;
|
62
|
+
padding: 7px 7px 0;
|
63
|
+
margin-bottom: 20px;
|
64
|
+
background-color: #f0f0f0;
|
65
|
+
|
66
|
+
h2 {
|
67
|
+
text-align: left;
|
68
|
+
font-weight: bold;
|
69
|
+
padding: 5px 5px 5px 15px;
|
70
|
+
font-size: 12px;
|
71
|
+
margin: -7px -7px 0;
|
72
|
+
background-color: #c00;
|
73
|
+
color: #fff;
|
74
|
+
}
|
75
|
+
|
76
|
+
ul li {
|
77
|
+
font-size: 12px;
|
78
|
+
list-style: square;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
label {
|
83
|
+
display: block;
|
84
|
+
}
|
File without changes
|